/* ============================================================
   VoiceCast — Warm-Paper Editorial (light theme)
   Tokens: bg #FAF7F2 · ink #1F1B16 · accent #B4534A (rose-brown)
   Display: Songti/Noto Serif · Body: system sans · Num: mono
   Motion: cubic-bezier(.32,.72,0,1) 200–600ms
   ============================================================ */
:root {
  --bg: #FAF7F2;
  --paper: #FFFFFF;
  --paper-2: #F6F1E8;
  --paper-3: #EFE9DD;
  --ink: #1F1B16;
  --ink-2: #5F574C;
  --ink-3: #94897A;
  --accent: #B4534A;
  --accent-ink: #8E3F38;
  --accent-wash: rgba(180, 83, 74, .09);
  --accent-soft: rgba(180, 83, 74, .32);
  --line: #E8E0D2;
  --line-strong: #D6CCBA;
  --ok: #57744F;
  --ok-wash: rgba(87, 116, 79, .11);
  --warn: #96762C;
  --warn-wash: rgba(150, 118, 44, .12);
  --danger: #A93B2C;
  --danger-wash: rgba(169, 59, 44, .09);
  --mark-yellow: #F2DE9A;

  --font-display: 'Songti SC', 'Noto Serif SC', 'STSong', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'MiSans', 'Noto Sans SC', 'Segoe UI', sans-serif;
  --font-num: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --ease: cubic-bezier(.32, .72, 0, 1);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --sh-card: 0 1px 2px rgba(31, 27, 22, .04), 0 18px 44px -20px rgba(180, 83, 74, .13);
  --sh-pop: 0 2px 6px rgba(31, 27, 22, .06), 0 24px 56px -22px rgba(180, 83, 74, .24);
  --sh-btn: 0 8px 20px -10px rgba(180, 83, 74, .42);
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* grain paper 0.04 */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.08 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 70;
}
::selection { background: rgba(180, 83, 74, .2); }

h1, h2, h3, h4 { color: var(--ink); }
a { color: var(--accent-ink); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; }
audio { display: block; width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 20px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; transform: translateY(1px); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 700; letter-spacing: .02em;
}
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  position: relative;
  padding: 10px 13px; min-height: 44px;
  display: inline-flex; align-items: center;
  font-size: .84rem; font-weight: 500; color: var(--ink-2);
  border-radius: 8px;
  transition: color .2s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 7px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--accent-wash); }
.nav a.on { color: var(--accent-ink); font-weight: 600; }
.nav a.on::after { transform: scaleX(1); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.tsp-banner {
  font-size: .7rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--accent-soft); color: var(--accent-ink);
  white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.tsp-banner:hover { background: var(--accent-wash); }
@media (max-width: 620px) { .tsp-banner { display: none; } .brand-name { font-size: 1.02rem; } }
@media (max-width: 430px) { .nav { margin-left: 0; } .nav a { padding: 8px 8px; } }
/* EN labels are wider than zh: keep the whole topbar inside a 360px track */
@media (max-width: 480px) {
  .topbar-in { gap: 8px; padding: 8px 14px; }
  .nav { margin-left: 0; gap: 0; }
  .nav a { padding: 8px 7px; font-size: .78rem; }
  .nav a::after { left: 7px; right: 7px; }
  .brand-name { font-size: .95rem; }
}

/* ---------- wizard strip ---------- */
.wizard-strip {
  display: flex; gap: 14px; align-items: center; justify-content: center;
  background: var(--accent-wash);
  border-bottom: 1px solid var(--line);
  padding: 9px 16px; font-size: .84rem; color: var(--ink-2);
}

/* ---------- app shell ---------- */
.app {
  max-width: 920px; margin: 0 auto;
  padding: clamp(30px, 5.5vw, 76px) 20px 90px;
}
.app > * + * { margin-top: 24px; }

/* ---------- typography ---------- */
.eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.6vw, 2.75rem);
  line-height: 1.22; letter-spacing: .01em;
  margin: 0 0 14px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin: 0 0 4px; line-height: 1.3;
}
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(31, 27, 22, .05);
  transition: transform .22s var(--ease), box-shadow .3s var(--ease),
    background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent-soft); box-shadow: 0 8px 18px -10px rgba(180, 83, 74, .3); }
.btn:active { transform: scale(.97); }
.btn.accent {
  background: var(--accent); border-color: var(--accent); color: #FDF9F4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--sh-btn);
}
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--accent-wash); color: var(--ink); box-shadow: none; border-color: transparent; }
.btn.small { min-height: 36px; padding: 7px 15px; font-size: .8rem; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
/* button-in-button trailing icon */
.cta-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 255, 255, .2); color: inherit;
  margin-left: 4px; flex: none;
}
.btn.ghost .cta-ico, .btn:not(.accent) .cta-ico { background: var(--accent-wash); color: var(--accent-ink); }

.ic { flex: none; vertical-align: -3px; }

/* ---------- record orb (physical press) ---------- */
.orb {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--accent); color: #FDF9F4;
  display: flex; align-items: center; justify-content: center;
  border: none; flex: none;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .25),
    inset 0 -7px 14px rgba(70, 20, 16, .28),
    0 18px 34px -14px rgba(180, 83, 74, .6);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.orb:active, .entry-card:active .orb {
  transform: scale(.96);
  box-shadow:
    inset 0 4px 12px rgba(70, 20, 16, .4),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 8px 18px -10px rgba(180, 83, 74, .5);
}

/* ---------- cards (double ring: white shell + kernel inset) ---------- */
.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3.4vw, 30px);
  box-shadow: var(--sh-card);
}
.kernel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 4px rgba(255, 255, 255, .16);
}

/* ---------- home: asymmetric entry grid (1 big + 2 small) ---------- */
.entry-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
#entryRecord { grid-row: span 2; }
.entry-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px);
  cursor: pointer;
  box-shadow: var(--sh-card);
  position: relative;
  transition: transform .24s var(--ease), box-shadow .3s var(--ease);
}
.entry-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(31, 27, 22, .04), 0 26px 56px -22px rgba(180, 83, 74, .24); }
.entry-card:active { transform: scale(.985); }
.entry-num {
  font-family: var(--font-num); font-size: .68rem; letter-spacing: .18em;
  color: var(--ink-3);
}
.entry-card h3 {
  margin: 0; font-family: var(--font-display);
  font-size: 1.18rem; font-weight: 600; line-height: 1.35;
}
.entry-card p { margin: 0; color: var(--ink-2); font-size: .84rem; }
.entry-ico {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-wash); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.entry-big { justify-content: space-between; }
.entry-big .orb-wrap { display: flex; align-items: center; gap: 20px; margin: 8px 0 4px; }
.entry-big .orb-hint { font-size: .78rem; color: var(--ink-3); line-height: 1.7; }
#recState { min-height: 1.4em; font-size: .82rem; }
#recUse { align-self: flex-start; margin-top: 6px; }
.entry-card.recording { box-shadow: 0 2px 4px rgba(31, 27, 22, .04), 0 26px 56px -22px rgba(180, 83, 74, .3); }
.entry-card.recording .orb {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .25),
    inset 0 -7px 14px rgba(70, 20, 16, .28),
    0 0 0 6px var(--accent-wash), 0 18px 34px -14px rgba(180, 83, 74, .6);
}
@media (max-width: 767px) {
  .entry-grid { grid-template-columns: minmax(0, 1fr); }
  #entryRecord { grid-row: auto; }
}

/* home lower: streak + drafts (minmax(0,·) so nowrap meta can't blow the track) */
.home-lower { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .home-lower { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); } }
.streak-num {
  font-family: var(--font-display);
  font-size: 3rem; line-height: 1; color: var(--accent);
  display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px;
}
.streak-num small { font-family: var(--font-body); font-size: .85rem; color: var(--ink-2); font-weight: 500; }

/* ---------- usage calendar (streak card) ---------- */
.cal-title {
  font-family: var(--font-num); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3); margin: 10px 0 8px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-dow {
  font-family: var(--font-num); font-size: .58rem; color: var(--ink-3);
  text-align: center; letter-spacing: .04em; padding-bottom: 2px;
}
.cal-cell {
  aspect-ratio: 1; border-radius: 7px;
  background: var(--paper-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: .62rem; color: var(--ink-3);
  transition: transform .18s var(--ease), box-shadow .22s var(--ease);
}
.cal-cell:not(.blank):hover { transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(31, 27, 22, .28); }
.cal-cell.blank { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent-wash); }
.cal-cell.l1 { background: var(--accent-wash); border-color: var(--accent-soft); color: var(--accent-ink); }
.cal-cell.l2 { background: var(--accent-soft); border-color: var(--accent-soft); color: #FDF9F4; }
.cal-cell.l3 { background: var(--accent); border-color: var(--accent); color: #FDF9F4; }

/* ---------- chips / badges / tabs ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: center; }
.chip {
  padding: 8px 16px; border-radius: 999px; font-size: .82rem; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.chip:hover { border-color: var(--accent-soft); color: var(--ink); transform: translateY(-1px); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip.locked { opacity: .55; }
.badge {
  font-family: var(--font-num); font-size: .68rem; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--paper-3); color: var(--ink-2); white-space: nowrap;
}
.badge.ok { background: var(--ok-wash); color: var(--ok); }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0 18px; padding-bottom: 4px; }
.tab {
  padding: 9px 18px; border-radius: 999px; font-size: .86rem; font-weight: 500;
  border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.tab:hover { border-color: var(--accent-soft); color: var(--ink); }
.tab.on { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ---------- waveform / player ---------- */
.wave-wrap { padding: 18px 16px 10px; display: grid; gap: 4px; justify-items: center; }
.waveform { width: 100%; height: 88px; display: block; }
.player-wrap { padding: 12px 14px; margin-bottom: 12px; }

/* ---------- editor: editorial split ---------- */
.duo { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 768px) {
  .duo { grid-template-columns: 1fr 1fr; gap: 18px; }
  .duo .pane:first-child { border-right: 4px solid var(--paper-3); border-radius: var(--r-md) 4px 4px var(--r-md); }
}
.pane { padding: 16px 16px 14px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.pane:focus-within { border-color: var(--accent-soft); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 3px var(--accent-wash); }
.pane h4, .pane-label {
  margin: 0 0 10px; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
textarea.script-box {
  width: 100%; min-height: 230px;
  background: transparent; color: var(--ink);
  border: none; outline: none; resize: vertical;
  font-size: .93rem; line-height: 1.85;
  font-family: var(--font-body);
}
mark.sensitive {
  background: var(--mark-yellow); color: #4A3D1E;
  border-radius: 3px; padding: 0 3px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.sensitive-view {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
  font-size: .88rem; line-height: 1.9; max-height: 200px; overflow: auto;
  margin: 8px 0;
}

/* rewrite tools */
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.tool-row .btn { box-shadow: none; }

/* ---------- duration bar ---------- */
.durbar { padding: 14px 16px 12px; margin: 16px 0 6px; }
.durbar .track { height: 6px; background: var(--paper-3); border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(31, 27, 22, .06); }
.durbar .fill { height: 100%; background: var(--accent); width: 0%; transition: width .45s var(--ease); }
.durbar .row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .76rem; color: var(--ink-3); margin-top: 9px;
}
.durbar .row b { font-family: var(--font-num); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
input[type=range] { accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; }

/* ---------- candidates ---------- */
.title-cand {
  padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--paper-2); border: 1px solid var(--line);
  margin: 8px 0; cursor: pointer; font-size: .88rem; line-height: 1.7;
  display: flex; gap: 10px; align-items: flex-start;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.title-cand:hover {
  border-color: var(--accent-soft); background: var(--paper);
  transform: translateX(3px);
  box-shadow: 0 6px 16px -10px rgba(180, 83, 74, .3);
}
.title-cand .ic { color: var(--accent); margin-top: 3px; }

/* ---------- form selection (comparison cards) ---------- */
.form-grid { display: grid; gap: 12px; margin: 10px 0 4px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-opt {
  position: relative; display: flex; flex-direction: column; gap: 7px;
  padding: 18px 18px 16px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: border-color .22s var(--ease), background-color .22s var(--ease), box-shadow .3s var(--ease), transform .22s var(--ease);
}
.form-opt:hover { border-color: var(--accent-soft); transform: translateY(-2px); }
.form-opt.on {
  border-color: var(--accent); background: #FDF4F2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 26px -14px rgba(180, 83, 74, .4);
}
.form-opt.locked { opacity: .78; }
.fo-head { display: flex; align-items: center; gap: 10px; }
.fo-ico {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--accent-wash); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.form-opt.on .fo-ico { background: var(--accent); color: #FDF9F4; }
.fo-title { font-weight: 600; font-size: .92rem; }
.fo-price { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .78rem; color: var(--accent-ink); font-weight: 600; }
.fo-desc { font-size: .78rem; color: var(--ink-2); line-height: 1.7; margin: 0; }
.fo-check {
  position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: transparent; background: var(--paper);
  transition: background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.form-opt.on .fo-check { background: var(--accent); border-color: var(--accent); color: #FDF9F4; }
.fo-lock { position: absolute; top: 14px; right: 42px; color: var(--ink-3); }

/* ---------- segments / statuses ---------- */
.seg-list { display: grid; gap: 8px; }
.seg {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 14px; font-size: .85rem;
}
.seg .idx { font-family: var(--font-num); font-size: .68rem; color: var(--ink-3); margin-right: 8px; }
.seg .seg-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.seg .seg-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg .seg-thumb {
  width: 44px; height: 27px; object-fit: cover; flex: none;
  border-radius: 5px; border: 1px solid var(--line-strong); display: block;
}
.seg .st {
  font-family: var(--font-num); font-size: .66rem; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.st.pending { background: var(--paper-3); color: var(--ink-3); }
.st.rendering, .st.submitted, .st.running { background: var(--accent-wash); color: var(--accent-ink); }
.st.success { background: var(--ok-wash); color: var(--ok); }
.st.degraded { background: var(--warn-wash); color: var(--warn); }
.st.failed { background: var(--danger-wash); color: var(--danger); }

/* ---------- render 3-phase stepper ---------- */
.rstepper { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 8px; }
.rstepper::before {
  content: ''; position: absolute; top: 16px; left: 16.66%; right: 16.66%;
  height: 1.5px; background: var(--line-strong);
}
.rs-n { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; }
.rs-c {
  width: 33px; height: 33px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: .92rem; color: var(--ink-3);
  position: relative; z-index: 1;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.rs-n.done .rs-c { background: var(--accent); border-color: var(--accent); color: #FDF9F4; }
.rs-n.now .rs-c { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--accent-wash); }
.rs-t { font-size: .78rem; font-weight: 600; }
.rs-s { font-family: var(--font-num); font-size: .64rem; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.rs-n.now .rs-s { color: var(--accent-ink); }
.rs-n.done .rs-s { color: var(--ok); }

.prog-track { height: 6px; background: var(--paper-3); border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(31, 27, 22, .06); }
.prog-fill { height: 100%; width: 0%; background: var(--accent); transition: width .5s var(--ease); }
.prog-label { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .74rem; color: var(--ink-3); margin: 7px 0 0; }

/* ---------- phone frame / safe area ---------- */
.phone {
  position: relative; width: 212px; aspect-ratio: 9/16; margin: 20px auto 6px;
  border-radius: 26px; overflow: hidden;
  background: var(--paper-2);
  box-shadow:
    inset 0 0 0 6px var(--paper),
    inset 0 0 0 7px var(--line-strong),
    0 28px 52px -26px rgba(180, 83, 74, .32);
}
.phone.landscape { width: 320px; aspect-ratio: 16/9; border-radius: 20px; }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone .empty { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--font-num); font-size: .7rem; letter-spacing: .2em; color: var(--ink-3); }
.phone-cap { text-align: center; font-family: var(--font-num); font-size: .7rem; color: var(--ink-3); letter-spacing: .1em; }
.safe-overlay { position: absolute; inset: 0; pointer-events: none; }
.safe-overlay .zone-top, .safe-overlay .zone-bottom, .safe-overlay .zone-right, .safe-overlay .zone-left {
  position: absolute;
  background: repeating-linear-gradient(45deg, rgba(180, 83, 74, .3) 0 6px, rgba(180, 83, 74, .1) 6px 12px);
}
.safe-overlay .zone-top { left: 0; top: 0; right: 0; height: var(--st, 12%); }
.safe-overlay .zone-bottom { left: 0; bottom: 0; right: 0; height: var(--sb, 22%); }
.safe-overlay .zone-right { top: 0; bottom: 0; right: 0; width: var(--sr, 8%); }
.safe-overlay .zone-left { top: 0; bottom: 0; left: 0; width: var(--sl, 3%); }

/* ---------- lists ---------- */
.list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 10px; border-bottom: 1px solid var(--line);
  font-size: .9rem; border-radius: 8px;
  transition: background-color .2s var(--ease);
}
.list-item:hover { background: var(--accent-wash); }
.list-item .meta { color: var(--ink-3); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: .68rem; letter-spacing: .02em; }
.list-item .li-main { min-width: 0; }
.list-item .li-main > div:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; margin: 14px 0; }
.field label { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea,
.write-area {
  background: var(--paper); border: 1px solid var(--line-strong); color: var(--ink);
  border-radius: var(--r-md); padding: 12px 14px; font-size: .9rem; width: 100%;
  font-family: inherit; min-height: 44px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 2px 5px rgba(31, 27, 22, .03);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus, .write-area:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field input[type=range] { padding: 0; box-shadow: none; min-height: 36px; }
.hint { font-size: .72rem; color: var(--ink-3); margin: 6px 0 0; }

.set-sec { margin-top: 26px; }
.set-sec:first-of-type { margin-top: 10px; }
.set-sec > h4 {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 4px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
}

/* ---------- consent / wizard steps (progress dots) ---------- */
.steps { display: flex; gap: 8px; margin: 16px 0 6px; }
.steps .dot { flex: 1; height: 3px; border-radius: 99px; background: var(--line); transition: background-color .4s var(--ease); }
.steps .dot.on { background: var(--accent); }
.step-label { font-family: var(--font-num); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }

blockquote.pull {
  font-family: var(--font-display);
  font-size: 1.08rem; line-height: 1.95; color: var(--ink);
  border: none; border-left: 3px solid var(--accent);
  background: var(--paper-2); border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 18px; margin: 16px 0;
}
.wiz-quote {
  font-family: var(--font-display);
  font-size: 1.02rem; line-height: 1.95; color: var(--ink);
  border-left: 3px solid var(--accent);
  background: var(--paper-2); border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 18px; margin: 16px 0;
}

.consent-meta { display: grid; gap: 8px; margin: 14px 0; }
.consent-meta .cm-row { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--ink-2); line-height: 1.7; }
.consent-meta .cm-row .ic { color: var(--accent); margin-top: 3px; }
.photo-prev { width: 100%; border-radius: var(--r-md); margin-top: 12px; border: 1px solid var(--line); display: none; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px;
  transform: translateX(-50%) translateY(10px);
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 12px 22px; border-radius: 999px; font-size: .85rem;
  box-shadow: var(--sh-pop);
  opacity: 0; transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none; z-index: 90; max-width: 88vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  text-align: center; padding: 44px 20px 60px;
  color: var(--ink-3); font-size: .74rem; line-height: 2;
}
.footer .aigc-note { color: var(--warn); display: flex; gap: 8px; justify-content: center; align-items: center; margin: 0 0 6px; }
.fn-ic { display: inline-flex; color: var(--warn); }
.invite-foot { margin: 4px 0; }
.invite-foot a {
  color: var(--accent-ink); font-weight: 600;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
}
.copy { margin: 6px 0 0; }
.copy-brand { font-family: var(--font-display); font-weight: 700; color: var(--ink-2); }

/* ---------- states ---------- */
.rec-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); margin-right: 7px;
  box-shadow: 0 0 0 3px var(--danger-wash);
  animation: pulse 1.1s var(--ease) infinite;
}
@keyframes pulse { 50% { opacity: .3; box-shadow: 0 0 0 1px var(--danger-wash); } }

.empty { text-align: center; color: var(--ink-3); padding: 26px 0; font-size: .84rem; }
.empty-composed { text-align: center; padding: 34px 16px 30px; display: grid; justify-items: center; gap: 10px; }
.empty-composed .ec-ico {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--paper-2); border: 1px solid var(--line);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.empty-composed .ec-t { font-family: var(--font-display); font-size: 1rem; color: var(--ink-2); margin: 0; }
.empty-composed .ec-d { font-size: .8rem; color: var(--ink-3); margin: 0; line-height: 1.8; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mt { margin-top: 14px; }
.muted { color: var(--ink-2); font-size: .82rem; }
.warn-text { color: var(--warn); font-size: .85rem; }
.error-text {
  color: var(--danger); font-size: .84rem; white-space: pre-wrap; margin: 12px 0 0;
}
.error-text:empty { display: none; }
.inline-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--warn-wash); border: 1px solid rgba(150, 118, 44, .22);
  border-radius: var(--r-sm); padding: 11px 14px;
  font-size: .82rem; color: var(--warn); line-height: 1.7; margin: 12px 0;
}
.inline-note .ic { margin-top: 3px; }

/* ---------- skeleton ---------- */
.skel { display: grid; gap: 14px; padding: 10px 2px; }
.skel-t { height: 28px; width: 44%; border-radius: 8px; background: var(--paper-3); animation: skpulse 1.3s var(--ease) infinite alternate; }
.skel-l { height: 14px; border-radius: 7px; background: var(--paper-3); animation: skpulse 1.3s var(--ease) infinite alternate; }
.skel-l.short { width: 62%; }
@keyframes skpulse { from { opacity: 1; } to { opacity: .45; } }

/* ---------- staggered entrance ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .rec-dot { animation: none; }
  .skel-t, .skel-l { animation: none; }
}

/* ---------- touch targets ---------- */
@media (pointer: coarse) {
  .btn.small { min-height: 44px; }
  .chip, .tab { min-height: 44px; }
  .tsp-banner { min-height: 44px; }
}
