.cx-wqd-panel {
  --cx-wqd-page: var(--page, #eef8f5);
  --cx-wqd-card: var(--card, #fff);
  --cx-wqd-text: var(--text, #173f36);
  --cx-wqd-muted: var(--muted, #7a908b);
  --cx-wqd-line: var(--line, #e2eeea);
  --cx-wqd-green: var(--green, #0fb486);
  --cx-wqd-green-deep: var(--green-deep, #087e62);
  --cx-wqd-mint: var(--mint, #dff6ee);
  --cx-wqd-danger: var(--danger, #d85454);
  position: fixed;
  z-index: 105;
  top: 0;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 430px);
  height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--cx-wqd-text);
  background: var(--cx-wqd-page);
  box-shadow: 0 0 70px rgba(20, 60, 47, .16);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  transform: translateX(-50%);
  isolation: isolate;
}

.cx-wqd-panel[hidden] { display: none !important; }
.cx-wqd-panel * { box-sizing: border-box; }
.cx-wqd-panel button,
.cx-wqd-panel input,
.cx-wqd-panel select,
.cx-wqd-panel textarea { min-width: 0; max-width: 100%; margin: 0; color: inherit; font: inherit; }
.cx-wqd-panel button { padding: 0; border: 0; background: transparent; }
.cx-wqd-panel button:not(:disabled),.cx-wqd-panel select { cursor: pointer; }
.cx-wqd-panel button:disabled { cursor: not-allowed; opacity: .55; }
.cx-wqd-panel img { display: block; max-width: 100%; }

.cx-wqd-nav {
  position: relative;
  z-index: 4;
  display: grid;
  min-height: calc(48px + env(safe-area-inset-top));
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: end;
  padding: env(safe-area-inset-top) 8px 6px;
  background: rgba(238, 248, 245, .96);
  backdrop-filter: blur(18px) saturate(145%);
}
.cx-wqd-nav > button { display: grid; width: 36px; height: 36px; place-items: center; align-self: center; border-radius: 50%; color: #111; font-size: 30px; font-weight: 300; line-height: 1; }
.cx-wqd-nav > h2 { align-self: center; margin: 0; overflow: hidden; color: #111; font-size: 17px; font-weight: 500; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cx-wqd-scroll { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.cx-wqd-content { display: grid; width: 100%; min-height: 100%; gap: 10px; padding: 0 14px calc(35px + env(safe-area-inset-bottom)); overflow-x: hidden; }

.cx-wqd-card { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--cx-wqd-line); border-radius: 21px; background: var(--cx-wqd-card); }
.cx-wqd-image-card { padding: 12px; }
.cx-wqd-scan-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cx-wqd-scan-heading > div { min-width: 0; flex: 1; }
.cx-wqd-scan-heading h1,.cx-wqd-info-card > h2,.cx-wqd-reason-card > h2,.cx-wqd-comment-card > h2 { margin: 0; font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.cx-wqd-scan-heading p { margin: 3px 0 0; color: var(--cx-wqd-muted); font-size: 10px; line-height: 1.45; }
.cx-wqd-delete { display: flex; width: 26px; height: 26px; flex: 0 0 26px; align-items: center; justify-content: center; }
.cx-wqd-delete > span { position: relative; width: 13px; height: 15px; }
.cx-wqd-delete > span > i { position: absolute; top: 1px; left: 1px; width: 11px; height: 2px; border-radius: 2px; background: #d64e45; }
.cx-wqd-delete > span > i::before { position: absolute; top: -3px; left: 3px; width: 5px; height: 3px; border: 2px solid #d64e45; border-bottom: 0; border-radius: 2px 2px 0 0; content: ""; }
.cx-wqd-delete > span > b { position: absolute; right: 1px; bottom: 0; left: 1px; height: 10px; border: 2px solid #d64e45; border-top: 0; border-radius: 0 0 2px 2px; }

.cx-wqd-image-stage { display: block; width: 100%; overflow: hidden; border: 1px solid #e3ece9 !important; border-radius: 9px; background: #f7faf9 !important; }
.cx-wqd-image-stage img { width: 100%; height: auto; min-height: 150px; max-height: 62vh; background: #f7faf9; object-fit: contain; }
.cx-wqd-image-caption { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 4px 0; color: #71847e; font-size: 9.5px; }
.cx-wqd-image-caption span:first-child { min-width: 0; overflow: hidden; color: var(--cx-wqd-green-deep); text-overflow: ellipsis; white-space: nowrap; }
.cx-wqd-image-caption span:last-child { flex: 0 0 auto; }
.cx-wqd-image-loading { display: flex; min-height: 210px; align-items: center; justify-content: center; border-radius: 9px; background: #f3f8f6; color: #648078; font-size: 11px; }
.cx-wqd-no-image { display: grid; justify-items: center; gap: 5px; padding: 40px 12px; border-radius: 9px; background: #f5f8f7; color: #526a64; text-align: center; }
.cx-wqd-no-image > span { margin-bottom: 4px; font-size: 35px; }
.cx-wqd-no-image > strong { font-size: 13px; }
.cx-wqd-no-image > small { max-width: 270px; color: var(--cx-wqd-muted); font-size: 10px; line-height: 1.5; }
.cx-wqd-media-strip { display: flex; width: 100%; gap: 6px; margin-top: 8px; padding: 2px 1px 4px; overflow-x: auto; scrollbar-width: none; }
.cx-wqd-media-strip::-webkit-scrollbar { display: none; }
.cx-wqd-media-strip > button { display: grid; width: 71px; min-width: 71px; gap: 4px; padding: 4px; border: 1px solid #d9e8e3; border-radius: 8px; background: #fff; }
.cx-wqd-media-strip > button.is-active { border-color: var(--cx-wqd-green); background: var(--cx-wqd-mint); box-shadow: 0 0 0 2px rgba(14, 174, 123, .1); }
.cx-wqd-media-strip img { width: 62px; height: 42px; border-radius: 5px; background: #edf3f1; object-fit: cover; }
.cx-wqd-media-strip span { display: block; overflow: hidden; color: #61766f; font-size: 9px; line-height: 1.3; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cx-wqd-media-strip .is-active span { color: var(--cx-wqd-green-deep); font-weight: 700; }

.cx-wqd-info-card,.cx-wqd-reason-card,.cx-wqd-comment-card { padding: 13px; }
.cx-wqd-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
.cx-wqd-category-grid > label,.cx-wqd-knowledge-field { display: grid; min-height: 46px; padding: 9px; border: 1px solid #dcebe6; border-radius: 7px; background: #f6faf8; text-align: left; }
.cx-wqd-category-grid > label > span,.cx-wqd-knowledge-field > span { display: block; color: var(--cx-wqd-muted); font-size: 9.5px; }
.cx-wqd-category-grid select { width: 100%; height: 22px; margin-top: 2px; padding: 0 17px 0 0; border: 0; outline: 0; background: transparent; font-size: 11.5px; font-weight: 700; appearance: auto; }
.cx-wqd-category-grid select.is-status { color: var(--cx-wqd-green); }
.cx-wqd-knowledge-field { border-color: #cfe7df; background: #f3fbf8; }
.cx-wqd-knowledge-field > strong { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 4px; margin-top: 4px; overflow: hidden; font-size: 11.5px; }
.cx-wqd-knowledge-field > strong b { flex: 0 0 auto; color: var(--cx-wqd-green); font-size: 13px; }
.cx-wqd-knowledge-field > small { display: block; min-width: 0; margin-top: 2px; overflow: hidden; color: #7a8d87; font-size: 7.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }

.cx-wqd-detail-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); gap: 6px; margin-top: 9px; }
.cx-wqd-detail-actions > button { display: flex; width: 100%; min-height: 34px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 9px; background: #e5f7f0; color: var(--cx-wqd-green-deep); font-size: 11px; }
.cx-wqd-detail-actions > button:last-child { background: var(--cx-wqd-green); color: #fff; }
.cx-wqd-detail-actions > button span { min-height: 13px; margin-left: 3px; padding: 0 4px; border-radius: 4px; background: #fff1b8; color: #996600; font-size: 7px; line-height: 13px; }

.cx-wqd-reason-select { position: relative; display: block; min-height: 36px; margin-top: 8px; border: 1px solid #d8e8e2; border-radius: 8px; background: #f7fbf9; }
.cx-wqd-reason-select::after { position: absolute; top: 50%; right: 9px; color: var(--cx-wqd-green); content: "⌄"; font-size: 11px; transform: translateY(-55%); pointer-events: none; }
.cx-wqd-reason-select select { width: 100%; height: 35px; padding: 0 27px 0 9px; border: 0; outline: 0; background: transparent; color: #445f57; font-size: 11px; appearance: none; }
.cx-wqd-reason-card textarea { display: block; width: 100%; min-height: 60px; margin-top: 7px; padding: 8px 9px; resize: vertical; border: 1px solid #d8e8e2; border-radius: 8px; outline: 0; background: #fff; color: #40584f; font-size: 11px; line-height: 1.55; }
.cx-wqd-reason-card > button { display: flex; width: 100%; min-height: 34px; align-items: center; justify-content: center; margin-top: 7px; border-radius: 9px; background: var(--cx-wqd-green); color: #fff; font-size: 11px; }
.cx-wqd-comment-card p { margin: 8px 0 0; color: #40584f; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.cx-wqd-empty { margin-top: 10px; padding: 42px 18px; border: 1px dashed #bcd9d0; border-radius: 20px; background: rgba(255, 255, 255, .62); color: var(--cx-wqd-muted); font-size: 12px; text-align: center; }

.cx-wqd-image-preview { position: absolute; z-index: 15; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #08100e; color: #fff; }
.cx-wqd-image-preview[hidden] { display: none !important; }
.cx-wqd-image-preview > header { display: grid; min-height: calc(48px + env(safe-area-inset-top)); grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: end; padding: env(safe-area-inset-top) 6px 6px; background: rgba(4, 12, 10, .9); }
.cx-wqd-image-preview > header button { display: grid; width: 36px; height: 36px; place-items: center; align-self: center; color: #fff; font-size: 27px; }
.cx-wqd-image-preview > header strong { align-self: center; font-size: 16px; font-weight: 500; text-align: center; }
.cx-wqd-preview-viewport { display: grid; min-height: 0; place-items: center; overflow: hidden; padding: 12px; cursor: grab; touch-action: none; }
.cx-wqd-preview-viewport:active { cursor: grabbing; }
.cx-wqd-preview-transform { display: grid; max-width: 100%; max-height: 100%; place-items: center; transform-origin: center; will-change: transform; }
.cx-wqd-image-preview img { max-width: 100%; max-height: calc(100dvh - 130px - env(safe-area-inset-top)); background: #fff; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.cx-wqd-image-preview > footer { display: grid; min-height: calc(48px + env(safe-area-inset-bottom)); grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: start; padding: 0 10px env(safe-area-inset-bottom); background: rgba(4, 12, 10, .9); }
.cx-wqd-image-preview > footer button { display: grid; width: 44px; height: 44px; place-items: center; color: #fff; font-size: 31px; font-weight: 250; }
.cx-wqd-image-preview > footer button:last-child { justify-self: end; }
.cx-wqd-image-preview > footer span { align-self: center; color: rgba(255, 255, 255, .78); font-size: 12px; text-align: center; }

.cx-wqd-knowledge-layer { position: absolute; z-index: 20; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(12, 42, 34, .52); }
.cx-wqd-knowledge-layer[hidden] { display: none !important; }
.cx-wqd-knowledge-sheet { display: flex; width: 100%; height: 84%; max-height: 84%; min-width: 0; flex-direction: column; gap: 7px; padding: 13px 12px calc(12px + env(safe-area-inset-bottom)); overflow: hidden; border-radius: 18px 18px 0 0; background: #f5fbf9; }
.cx-wqd-knowledge-sheet > header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 9px; }
.cx-wqd-knowledge-sheet > header strong,.cx-wqd-knowledge-sheet > header small { display: block; }
.cx-wqd-knowledge-sheet > header strong { font-size: 14.5px; }
.cx-wqd-knowledge-sheet > header small { margin-top: 2px; color: #71857f; font-size: 9px; }
.cx-wqd-knowledge-sheet > header button { display: flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border-radius: 50%; background: #e3f2ed; color: #365f54; font-size: 15px; }
.cx-wqd-knowledge-search { display: grid; grid-template-columns: 21px minmax(0, 1fr); align-items: center; gap: 4px; padding: 0 7px; border: 1px solid #cde4dc; border-radius: 10px; background: #fff; }
.cx-wqd-knowledge-search > span { color: #07805f; font-size: 13px; text-align: center; }
.cx-wqd-knowledge-search input { width: 100%; height: 35px; border: 0; outline: 0; background: transparent; font-size: 11px; }
.cx-wqd-knowledge-body { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 7px; }
.cx-wqd-knowledge-note { margin: 0; padding: 1px 2px; color: #71857f; font-size: 9px; }
.cx-wqd-knowledge-tabs { display: grid; width: 100%; min-width: 0; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.cx-wqd-knowledge-tabs > button { display: grid; width: 100%; min-height: 46px; grid-template-columns: 17px minmax(0, 1fr); gap: 3px; align-items: center; padding: 5px 4px; border: 1px solid #d2e5df; border-radius: 8px; background: #fff; color: #5d756e; text-align: left; line-height: 1.2; }
.cx-wqd-knowledge-tabs > button > span { display: flex; width: 17px; height: 17px; align-items: center; justify-content: center; border-radius: 50%; background: #e7f3ef; color: #4b6e64; font-size: 8px; font-weight: 700; }
.cx-wqd-knowledge-tabs > button div { min-width: 0; }
.cx-wqd-knowledge-tabs strong,.cx-wqd-knowledge-tabs small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-wqd-knowledge-tabs strong { font-size: 9px; font-weight: 650; }
.cx-wqd-knowledge-tabs small { margin-top: 2px; color: #82928e; font-size: 7px; }
.cx-wqd-knowledge-tabs > button.is-active { border-color: #0aaa7a; background: #e7f8f2; color: #087d5f; box-shadow: 0 0 0 2px rgba(10, 170, 122, .08); }
.cx-wqd-knowledge-tabs > button.is-active > span { background: #0aaa7a; color: #fff; }
.cx-wqd-knowledge-path { padding: 7px 8px; border-radius: 9px; background: #e8f6f1; }
.cx-wqd-knowledge-path span,.cx-wqd-knowledge-path strong { display: block; }
.cx-wqd-knowledge-path span { color: #688079; font-size: 8px; }
.cx-wqd-knowledge-path strong { margin-top: 2px; overflow: hidden; color: #176b55; font-size: 9.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.cx-wqd-knowledge-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 0 2px; }
.cx-wqd-knowledge-heading strong { font-size: 10.5px; font-weight: 650; }
.cx-wqd-knowledge-heading small { color: #71857f; font-size: 8.5px; }
.cx-wqd-knowledge-results { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.cx-wqd-knowledge-empty { padding: 28px 10px; color: #71857f; font-size: 10px; text-align: center; }
.cx-wqd-knowledge-result { display: grid; width: 100%; min-width: 0; grid-template-columns: 32px minmax(0, 1fr) 31px; gap: 6px; align-items: center; margin-bottom: 5px; padding: 8px; border: 1px solid #d5e7e1 !important; border-radius: 9px; background: #fff !important; text-align: left; }
.cx-wqd-knowledge-result > span { display: flex; width: 29px; min-height: 20px; align-items: center; justify-content: center; padding: 2px; border-radius: 6px; background: #edf4f2; color: #526f67; font-size: 7.5px; font-weight: 650; }
.cx-wqd-knowledge-result > span.level-2 { background: #eef5ff; color: #3b6a9c; }
.cx-wqd-knowledge-result > span.level-3 { background: #f3efff; color: #6b55a2; }
.cx-wqd-knowledge-result > span.level-4 { background: #fff1e8; color: #ad5f26; }
.cx-wqd-knowledge-result > div { min-width: 0; }
.cx-wqd-knowledge-result strong,.cx-wqd-knowledge-result small { display: block; }
.cx-wqd-knowledge-result strong { font-size: 10.5px; }
.cx-wqd-knowledge-result small { margin-top: 2px; overflow: hidden; color: #71857f; font-size: 8px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.cx-wqd-knowledge-result > b { color: #07805f; font-size: 9px; font-weight: 600; text-align: right; }
.cx-wqd-knowledge-result.is-selected { border-color: #0aaa7a !important; background: #eaf8f3 !important; }
.cx-wqd-knowledge-confirm { display: flex; width: 100%; min-height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 10px; background: #0aaa7a !important; color: #fff !important; font-size: 10.5px; line-height: 1.35; font-weight: 650; }
.cx-wqd-knowledge-confirm:disabled { background: #dce7e3 !important; color: #8a9995 !important; }

.cx-wqd-dialog-backdrop { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(14, 33, 28, .42); backdrop-filter: blur(3px); }
.cx-wqd-dialog-backdrop[hidden] { display: none !important; }
.cx-wqd-dialog { width: min(100%, 310px); overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 22px 60px rgba(8, 35, 27, .24); text-align: center; }
.cx-wqd-dialog h3 { margin: 0; padding: 23px 22px 0; color: #182f29; font-size: 17px; font-weight: 650; }
.cx-wqd-dialog p { margin: 10px 0 0; padding: 0 22px 22px; color: #637873; font-size: 13px; line-height: 1.6; }
.cx-wqd-dialog footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #e5ece9; }
.cx-wqd-dialog footer button { min-height: 49px; border-right: 1px solid #e5ece9; color: #536b64; font-size: 14px; }
.cx-wqd-dialog footer button:last-child { border: 0; }
.cx-wqd-dialog footer .is-danger { color: #d64e45; font-weight: 650; }
.cx-wqd-dialog footer .is-primary { color: var(--cx-wqd-green-deep); font-weight: 650; }

@media (max-width: 350px) {
  .cx-wqd-content { padding-right: 12px; padding-left: 12px; }
  .cx-wqd-knowledge-tabs > button { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .cx-wqd-knowledge-tabs small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-wqd-panel *, .cx-wqd-panel *::before, .cx-wqd-panel *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
