:root {
  --bg: #0b1220;
  --card: #121a2b;
  --ink: #e8eefc;
  --muted: #8b9bb8;
  --line: #243149;
  --brand: #3dd6c6;
  --brand-dark: #2bb5a6;
  --ok: #3dd68c;
  --warn: #f0b429;
  --danger: #ff6b7a;

  /* 深色派生面：输入框、次级块、提示底色 */
  --field: #0d1524;
  --soft: #0f1829;
  --tint-brand: rgba(61, 214, 198, .10);
  --tint-ok: rgba(61, 214, 140, .10);
  --tint-warn: rgba(240, 180, 41, .10);
  --tint-danger: rgba(255, 107, 122, .10);

  color-scheme: dark;
}

/* 轻量毛玻璃：只给页顶顶栏、首页两大入口、预填底部操作条。
   后台卡片内部的 .top 不匹配 .wrap > .top，不会套上磨砂。
   下面这些组件自身的规则不要再写 background / border，以免盖掉这里。 */
.glass,
.wrap > .top,
.entry,
.wizard-nav {
  background: rgba(18, 26, 43, 0.72);
  border: 1px solid rgba(61, 214, 198, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .wrap > .top,
  .entry,
  .wizard-nav { background: #121a2b; }
}

* { box-sizing: border-box; }

/* 老款安卓 / 微信内置浏览器：快速连点按钮不再触发双击放大 */
a, button, input, select, textarea, label { touch-action: manipulation; }

/* clip 不生成新的滚动容器，顶栏和底部操作条的 sticky 仍然有效 */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px calc(56px + env(safe-area-inset-bottom)); }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  margin-bottom: 22px;
}
.wrap > .top {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 12px;
  border-radius: 10px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.brand { font-size: 18px; font-weight: 700; }
.home-link { color: var(--brand); text-decoration: none; font-size: 15px; }
h1 { font-size: 25px; line-height: 1.35; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.foot { color: var(--muted); font-size: 15px; margin-top: 24px; text-align: center; }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot a:active { color: var(--brand); }

/* 查询结果大卡片保持实色，保证长内容可读 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.entry {
  display: block;
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
.entry.primary { border-color: rgba(61, 214, 198, .5); }
.entry:active { filter: brightness(1.12); }
.entry .arrow { float: right; color: var(--brand); font-size: 22px; }
.entry .title { font-size: 20px; font-weight: 700; }
.entry .desc { color: var(--muted); font-size: 15px; margin-top: 4px; }

.field-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }

input, textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { min-height: 92px; line-height: 1.5; resize: vertical; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--brand);
  color: var(--bg);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn:active:not(:disabled) { filter: brightness(1.12); }
.btn.secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost { background: var(--soft); color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; }

.tip { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.linklike {
  border: 0; background: none; padding: 0;
  color: var(--brand); font-size: 15px; font-family: inherit;
  text-decoration: underline; cursor: pointer;
}

.notice {
  padding: 12px 14px;
  border: 1px solid rgba(240, 180, 41, .38);
  border-radius: 10px;
  background: var(--tint-warn);
  color: var(--warn);
  font-size: 15px;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.notice.ok { background: var(--tint-ok); border-color: rgba(61, 214, 140, .38); color: var(--ok); }
.notice.err { background: var(--tint-danger); border-color: rgba(255, 107, 122, .38); color: var(--danger); }
.hidden { display: none !important; }

/* 查询结果：三项信息合成一条真文字 */
.metrics {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.metrics .seg { white-space: nowrap; }
.metrics .sep { color: var(--brand); font-weight: 400; padding: 0 8px; }
.metrics .label { color: var(--muted); font-weight: 400; }

/* 步骤条：细线 + 小方点，无外发光 */
.progress { display: flex; margin: 20px 0 10px; }
.progress-step {
  flex: 1;
  min-width: 0;
  position: relative;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}
.progress-step::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.progress-step:first-child::before { left: 50%; }
.progress-step:last-child::before { right: 50%; }
.progress-step.reached::before { background: var(--brand); }
.dot {
  display: block;
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
}
.progress-step.reached .dot { background: var(--brand); border-color: var(--brand); }
.progress-step.current .dot { border-color: var(--brand); }
.progress-step.reached { color: var(--ink); font-weight: 600; }
.progress-step.current { color: var(--brand); }

.hint { font-size: 15px; margin: 12px 0 4px; }
.estimate { color: var(--muted); font-size: 15px; margin: 0; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.row:last-of-type { border-bottom: 0; }
.row span { color: var(--muted); flex: 0 0 auto; }
.row strong {
  min-width: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.row a { color: var(--brand); overflow-wrap: anywhere; }

.order { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.order-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-no { font-size: 17px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.order-code { color: var(--muted); font-size: 15px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.order-nick { font-weight: 600; margin-top: 4px; }
.order-summary { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.order-time { color: var(--muted); font-size: 15px; margin-top: 4px; overflow-wrap: anywhere; }
.step-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}
.step-btn {
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.step-btn:active:not(:disabled) { filter: brightness(1.12); }
.step-btn.active { background: var(--brand); border-color: var(--brand); color: var(--bg); font-weight: 600; }
.step-btn.past { background: var(--tint-ok); border-color: rgba(61, 214, 140, .4); color: var(--ok); }
.step-btn:disabled { opacity: .45; cursor: not-allowed; }
.new-order-box { margin-top: 14px; }
.new-order-box .row strong { font-size: 18px; color: var(--brand); }

/* 预填需求、预计耗时快选与后台新分区 */
.field-block { margin-bottom: 16px; }
.field-block:last-child { margin-bottom: 0; }
.field-hint { color: var(--muted); font-size: 15px; margin: 6px 0 0; }

.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tab {
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.category-tab:active { filter: brightness(1.12); }
.category-tab.active { background: var(--brand); border-color: var(--brand); color: var(--bg); font-weight: 600; }

.size-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.size-grid input { min-width: 0; padding: 10px 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.tag:active { filter: brightness(1.12); }
.tag.active { background: var(--tint-brand); border-color: var(--brand); color: var(--brand); font-weight: 600; }

.summary-preview {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#booking-link { overflow-wrap: anywhere; }
.designer-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--soft);
}
.designer-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.designer-row-head .tip { margin: 0; flex: 1; }
.prefill-code {
  margin: 6px 0 14px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brand);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.preset-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.preset {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.preset:active { filter: brightness(1.12); }
.preset.active { background: var(--brand); border-color: var(--brand); color: var(--bg); font-weight: 600; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.switch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; color: var(--muted); white-space: nowrap; cursor: pointer;
}
.switch input, .inline-check input {
  width: 18px; min-height: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 0; background: transparent;
  accent-color: var(--brand);
}
.count-badge {
  display: inline-block; min-width: 26px; padding: 1px 8px;
  border-radius: 999px; background: var(--tint-brand); color: var(--brand);
  font-size: 15px; text-align: center;
}

.prefill-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.prefill-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.detail-box {
  margin-top: 14px; padding: 14px;
  border: 1px solid rgba(61, 214, 198, .35); border-radius: 10px;
  background: var(--soft);
}
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.detail-box .summary-preview { background: var(--field); }

/* 云端字段树：分章节、9 种控件、条件子项与多件清单 */
.schema-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.schema-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.schema-section h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--ink); }
.schema-field { margin-bottom: 14px; }
.schema-field:last-child { margin-bottom: 0; }
.schema-label { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.field-hint-inline { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.sub-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--soft);
}
.sub-row strong { font-size: 15px; }
.sub-row input { flex: 1 1 120px; min-width: 0; }
.repeat-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
}
.repeat-row input:not([type="checkbox"]) { flex: 1 1 90px; min-width: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; min-width: 100%; }
.inline-check input { flex: 0 0 18px; }
#piece-summary, #plain-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 先拿号再填内容：详细规格默认收起 */
.detail-toggle > summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
  list-style: none;
}
.detail-toggle > summary::-webkit-details-marker { display: none; }
.detail-toggle > summary::before { content: '＋ '; color: var(--brand); }
.detail-toggle[open] > summary::before { content: '－ '; }
.detail-body { margin-top: 12px; }
.detail-body > .schema-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

/* 多设计师：筛选开关、归属补挂、不可改的档位 */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.owner-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.owner-row select { min-width: 120px; max-width: 180px; }

/* 专属进度短链与本机记录：长网址在 390 宽手机上换行，不横向溢出 */
.progress-link {
  display: block;
  padding: 12px 14px;
  margin: 12px 0;
  border: 1px dashed rgba(61, 214, 198, .4);
  border-radius: 10px;
  background: var(--soft);
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.booked-list { margin-top: 12px; }
.booked-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--soft);
}
.booked-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.booked-meta strong {
  font-size: 17px; color: var(--brand); overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.booked-meta span { color: var(--muted); font-size: 15px; }
.booked-row .actions { margin-top: 10px; }
.booked-row .btn { flex: 1 1 auto; }

/* 一页一问向导：一屏一件事，画面干净 */
.wizard-head h1 { margin-bottom: 6px; }
.code-strip {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.code-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.code-strip .prefill-code { font-size: 20px; }
.code-strip .actions { margin-top: 10px; }

.wizard-progress {
  margin-top: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.wizard-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--brand);
  transition: width .2s ease;
}

.wizard-page { padding: 4px 0 6px; }
.wizard-page > h2 { margin: 0 0 8px; font-size: 20px; }
.pick-list { margin-top: 16px; display: grid; gap: 8px; }

/* 字段没读回来之前，选品类区先给个转圈提示，别让客户盯着空白页 */
.pick-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 15px;
}
.spinner {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: pick-spin .8s linear infinite;
}
@keyframes pick-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}
.pick-name { font-size: 16px; font-weight: 600; }
.pick-stepper { display: flex; align-items: center; gap: 10px; }
.pick-stepper .btn.small { min-width: 44px; padding: 6px 12px; font-size: 18px; }
.pick-count { min-width: 24px; text-align: center; font-size: 17px; }
.wizard-page .schema-section { margin-top: 16px; }
.wizard-page .schema-section:first-child { margin-top: 10px; }
.wizard-nav {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px -16px -18px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-radius: 0 0 12px 12px;
}
.wizard-nav .btn { flex: 1 1 auto; }

@media (max-width: 460px) {
  .wrap { padding: 18px 14px calc(44px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; }
  h1 { font-size: 22px; }
  .wizard-nav { margin: 18px -16px -16px; flex-wrap: nowrap; gap: 8px; }
  .wizard-nav .btn { flex: 1 1 0; min-width: 0; padding: 10px 8px; font-size: 15px; }
  .size-grid { grid-template-columns: 1fr; }
  .category-tab { flex: 1 1 auto; }
  .designer-row-head { flex-wrap: wrap; }
  .booked-row .btn { flex: 1 1 100%; }
  .pick-row { padding: 10px; }
  /* 手机键盘弹起时，底部按钮先回到内容末尾，别盖住正在填的格子 */
  body.typing .wizard-nav { position: static; }
  body.typing .wizard-page { padding-bottom: 24px; }
}

/* 后台工具条：身份、退出、搜索与一横排标签按钮都放在吸顶磨砂顶栏里 */
.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.identity { min-width: 0; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.identity-row .btn { flex: 0 0 auto; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1 1 0; width: auto; min-width: 0; }
.search-row .btn { flex: 0 0 auto; }
#search-result { margin-top: 8px; }
#search-result:empty { display: none; }

.quick-nav { display: flex; gap: 8px; margin-top: 10px; }
.refresh-hint { margin-top: 10px; }
.hours-edit { margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--soft, #0f1829); border: 1px solid var(--line, #243149); }
.hours-edit .preset-group { margin-bottom: 8px; }
.hours-edit-row { display: flex; gap: 8px; align-items: center; }
.hours-edit-row input { flex: 1 1 auto; min-width: 0; }
.hours-edit-row .btn { flex: 0 0 auto; white-space: nowrap; min-width: 64px; }
.link-btn { border: 0; background: transparent; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; padding: 0 2px; }
.order-next { margin-top: 8px; }
.quick-link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.quick-link:active { filter: brightness(1.12); border-color: var(--brand); }
.quick-link.active {
  border-color: var(--brand);
  background: var(--tint-brand);
  color: var(--brand);
  font-weight: 600;
}

/* 队列列表：当前待完成 / 只看历史 二选一 */
.view-switch { display: flex; gap: 8px; }
.view-btn {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
}
.view-btn:active { filter: brightness(1.12); }
.view-btn.active {
  border-color: var(--brand);
  background: var(--tint-brand);
  color: var(--brand);
  font-weight: 600;
}

/* ============ 打赏 ============ */
/* 入口是一条不起眼的虚线行，点开才展开，不抢填表的注意力 */
.reward-toggle {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
}
.reward-toggle:active { border-color: var(--brand); color: var(--brand); }

.reward-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.reward-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon amount" "icon label";
  align-items: center;
  gap: 2px 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.reward-item:active { filter: brightness(1.12); }
.reward-item.active { border-color: var(--brand); background: var(--tint-brand); }
.reward-item-emoji { grid-area: icon; font-size: 24px; line-height: 1; }
.reward-item-img {
  grid-area: icon;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}
.reward-item-amount { grid-area: amount; font-size: 16px; font-weight: 600; }
.reward-item-label {
  grid-area: label;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.reward-item.active .reward-item-label { color: var(--brand); }

.reward-qr-box { margin: 16px 0 6px; text-align: center; }
.reward-qr {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
}

.reward-summary { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.reward-total { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.reward-recent { list-style: none; margin: 0; padding: 0; }
.reward-recent li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.reward-recent li:last-child { border-bottom: 0; }

/* 后台打赏记录 */
.reward-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.reward-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.reward-amount { font-size: 18px; font-weight: 700; }
.reward-meta { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.reward-message { margin: 8px 0 0; overflow-wrap: anywhere; }
.reward-row .actions { margin-top: 10px; }
.reward-empty { color: var(--muted); font-size: 15px; margin: 0; }

/* 后台：请客选项编辑 */
.reward-opt { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.reward-opt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.reward-opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reward-opt-row select { grid-column: 1 / -1; }
.reward-opt-imgrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.reward-opt-imgrow input[type="file"] { width: auto; max-width: 100%; padding: 8px; }
.reward-opt-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}
.reward-opt-default {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 15px;
}
.reward-opt-default input { width: auto; }
.reward-opt-read { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.reward-opt-read .reward-item-emoji { font-size: 24px; }

/* 后台：打赏排行 */
.reward-rank { list-style: none; margin: 0; padding: 0; }
.reward-rank li {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.reward-rank li:last-child { border-bottom: 0; }
.reward-rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
  font-size: 13px;
}
.reward-rank li:first-child .reward-rank-no { color: var(--brand); border: 1px solid var(--brand); }
.reward-rank-name { overflow-wrap: anywhere; }
.reward-rank-meta { color: var(--muted); font-size: 14px; text-align: right; }

/* 每一件的图纸 */
.attachment-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 16px; background: var(--soft); }
.attachment-box h3 { margin: 0 0 8px; font-size: 16px; }
.attachment-box .actions { margin: 10px 0; flex-wrap: wrap; }
.attachment-list { display: grid; gap: 8px; }
.attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--field); }
.attach-thumb, .attach-file-icon { width: 52px; height: 52px; flex: none; border-radius: 8px; object-fit: cover; background: #fff; }
.attach-file-icon { display: inline-flex; align-items: center; justify-content: center; background: var(--tint-brand); color: var(--brand); font-weight: 700; font-size: 13px; }
.attach-meta { display: flex; flex: 1 1 140px; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.attach-meta span { color: var(--muted); font-size: 13px; }
.attach-tag { display: inline-block; padding: 2px 6px; border: 1px solid var(--brand); border-radius: 6px; color: var(--brand); font-size: 12px; }
.attach-row .actions { margin: 0; gap: 6px; flex-wrap: wrap; }

/* 拍照标注编辑器（全屏覆盖层） */
#annotation-layer { position: fixed; inset: 0; z-index: 200; display: flex; background: rgba(6, 10, 18, .97); }
#annotation-layer.hidden { display: none; }
body.ann-open { overflow: hidden; }
.ann-shell { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 980px; height: 100%; margin: 0 auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
#annotation-layer.ann-fullscreen .ann-shell { max-width: none; border: 0; border-radius: 0; }
.ann-top, .ann-modes, .ann-tools, .ann-presets, .ann-styles, .ann-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ann-title { margin-right: auto; font-size: 16px; }
.ann-shell [data-ann-mode], .ann-shell [data-ann-act], .ann-shell [data-ann-preset],
.ann-shell [data-ann-size], .ann-shell [data-ann-color], .ann-shell [data-ann-bg] {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: var(--ink); font-size: 13px; cursor: pointer;
}
.ann-shell button.active { border-color: var(--brand); background: var(--tint-brand); color: var(--brand); }
.ann-actions .btn { background: var(--brand); border-color: var(--brand); color: #062027; }
.ann-dot { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; background: var(--preset, var(--brand)); vertical-align: middle; }
.ann-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 220px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #000; touch-action: none; }
#ann-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.ann-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-styles { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ann-style-label { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ann-edit-label { color: var(--muted); font-size: 13px; }
#ann-edit-input { flex: 1 1 160px; min-width: 120px; padding: 7px 9px; }
.ann-actions { margin-left: auto; }
.ann-check, .ann-input { position: absolute; z-index: 5; left: 10px; right: 10px; bottom: 10px; max-height: 78%; overflow: auto; padding: 14px; border: 1px solid var(--brand); border-radius: 12px; background: var(--card); }
.ann-check.hidden, .ann-input.hidden { display: none; }
.ann-check h3 { margin: 0 0 6px; font-size: 17px; }
.ann-check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 6px; margin: 8px 0; }
.ann-check-list label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ann-check-list input { width: auto; }
.ann-input label { display: block; margin-bottom: 8px; font-size: 14px; }
.ann-input .actions { margin-top: 10px; }
.ann-tip { min-height: 18px; margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 480px) {
  .ann-shell { padding: 6px; gap: 6px; }
  .ann-shell [data-ann-mode], .ann-shell [data-ann-act], .ann-shell [data-ann-preset],
  .ann-shell [data-ann-size], .ann-shell [data-ann-color], .ann-shell [data-ann-bg] { padding: 5px 7px; font-size: 12px; }
  .ann-actions { margin-left: 0; }
}
