/* 落定原型 · 共用样式（原型，用完即删）。配色取自 client/tailwind.config.js：暖白底、墨色字、古铜金细线。 */
:root {
  --paper: #FAFAF7; --cream: #F4F1EA; --surface: #FFFFFF; --parchment: #F8F4E9;
  --ink: #14110D; --ink-soft: #5C564C; --mute: #948C7F;
  --line: #E5E1D8; --line-strong: #C9C3B5; --line-faint: #EAE6DC;
  --gold: #9C7B3E; --gold-deep: #7A5F2D; --gold-wash: #F2E8D0;
  --seal: #B6362F;
  --ok: #5E8068; --warn: #B9802A; --bad: #A24C3E; --off: #948C7F;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
  line-height: 1.6;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
}
.wrap { max-width: 480px; margin: 0 auto; }
button { font-family: inherit; color: inherit; cursor: pointer; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .off { color: var(--off); }

/* ---------- 改细节的底部抽屉（三种样式共用） ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(20, 17, 13, .28); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; background: var(--surface);
  border-radius: 16px 16px 0 0; border-top: 1px solid var(--gold);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow: auto;
}
.sheet h3 { font-family: var(--serif); font-weight: 400; font-size: 17px; margin: 0 0 2px; letter-spacing: .04em; }
.sheet .sub { color: var(--ink-soft); font-size: 12.5px; margin: 0 0 12px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px;
         padding: 12px 0; border-bottom: 1px solid var(--line-faint); font-size: 15px; }
.field > span { color: var(--ink-soft); white-space: nowrap; }
.field input, .field select {
  font: inherit; color: var(--ink); background: var(--cream); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 10px; min-width: 0; max-width: 62%;
}
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 10px; font-size: 13.5px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--gold); color: #fff; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong);
                  background: var(--surface); font-size: 18px; line-height: 1; }
.stepper b { min-width: 48px; text-align: center; font-weight: 500; }
.locked { margin-top: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px;
          color: var(--ink-soft); font-size: 13.5px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.locked button { border: 1px solid var(--gold-deep); color: var(--gold-deep); background: transparent;
                 border-radius: 8px; padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.sheet-acts { display: flex; gap: 10px; margin-top: 16px; }
.sheet-acts button { flex: 1; padding: 13px; border-radius: 10px; font-size: 15px; border: 1px solid var(--line-strong); background: var(--surface); }
.sheet-acts button.go { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ---------- 原型观察窗（真产品里没有这块） ---------- */
.inspector {
  margin: 28px auto 0; max-width: 480px; border: 1px dashed #B8B2A6; border-radius: 12px;
  background: #F1EFEA; font-family: var(--mono); font-size: 11.5px; color: #4A463F;
}
.inspector summary { padding: 10px 12px; cursor: pointer; font-family: var(--sans); font-size: 12.5px; color: #6B665D; list-style: none; }
.inspector summary::-webkit-details-marker { display: none; }
.inspector summary b { font-weight: 600; }
.inspector .body { padding: 0 12px 12px; }
.inspector h4 { font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: #6B665D; margin: 12px 0 4px; letter-spacing: .04em; }
.inspector .kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid #E2DFD8; }
.inspector .kv span:first-child { color: #7C776E; white-space: nowrap; }
.inspector .kv span:last-child { text-align: right; }
.inspector .changed { background: #FBEFC9; }
.inspector .note { font-family: var(--sans); font-size: 12px; line-height: 1.6; color: #5C564C; margin: 6px 0; }
.inspector ul { margin: 0; padding-left: 16px; }
.inspector a { color: var(--gold-deep); }

/* ---------- 原型切换条（真产品里没有这块） ---------- */
.switcher {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50; display: flex; align-items: center; gap: 2px;
  background: #1D1A16; color: #F4F1EA; border-radius: 999px; padding: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-family: var(--sans); font-size: 13px;
}
.switcher button { background: transparent; border: 0; color: #F4F1EA; width: 40px; height: 36px; border-radius: 999px; font-size: 16px; }
.switcher button:active { background: rgba(255, 255, 255, .12); }
.switcher .label { padding: 0 6px; white-space: nowrap; min-width: 150px; text-align: center; }
.switcher .label small { display: block; font-size: 10px; color: #A8A197; line-height: 1.2; }

/* ---------- 撤销条 ---------- */
.undo-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 45;
  width: calc(100% - 32px); max-width: 448px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: 14px;
}
.undo-bar button { background: transparent; border: 0; color: var(--gold-wash); font-size: 14px; font-weight: 600; white-space: nowrap; padding: 4px 2px; }

/* ---------- 盖印 ---------- */
.seal-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border: 2px solid var(--seal); border-radius: 6px; color: var(--seal);
  font-family: "STKaiti", "Kaiti SC", "KaiTi", var(--serif); font-weight: 700; font-size: 20px; line-height: 1.1;
  text-align: center; transform: rotate(-8deg); opacity: .88;
}
.seal-in { animation: seal-in .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes seal-in { from { transform: rotate(-8deg) scale(1.8); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: .88; } }
