/* 小笔友兴趣小站 · 内测版
   纸感 + 墨绿 + 琥珀；不依赖外部字体/图床。 */
:root {
  --paper: #f5f0e5;
  --paper-2: #efe6d6;
  --ink: #25352c;
  --ink-soft: #5e6d63;
  --moss: #355444;
  --moss-2: #284335;
  --moss-3: #4f725d;
  --amber: #b07a3a;
  --amber-soft: #e5c79b;
  --line: #d8cbb8;
  --line-soft: #e6dccd;
  --white: #fffdf8;
  --danger: #9b4a3f;
  --shadow: 0 16px 40px rgba(50, 42, 30, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(176,122,58,.08), transparent 34%),
    radial-gradient(circle at 90% 80%, rgba(53,84,68,.07), transparent 36%),
    var(--paper);
  font-family: "Microsoft YaHei", "微软雅黑", "Noto Sans CJK SC", "PingFang SC", "Heiti SC", Arial, sans-serif;
  line-height: 1.72;
}
a { color: var(--moss); text-decoration: none; }
a:hover { color: var(--amber); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

/* ---------- 登录 / 邀请 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  background: var(--moss-2);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 64px 72px;
  color: #f8f1e4;
  background:
    radial-gradient(circle at 28% 20%, rgba(229,199,155,.18), transparent 32%),
    linear-gradient(145deg, #294637, #1e352a 70%);
}
.auth-brand:before {
  content: "";
  position: absolute; right: -140px; top: -90px;
  width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(229,199,155,.25);
  box-shadow: 0 0 0 44px rgba(229,199,155,.05), 0 0 0 88px rgba(229,199,155,.04);
}
.auth-brand:after {
  content: "";
  position: absolute; left: 72px; bottom: 54px;
  width: 120px; height: 1px; background: rgba(229,199,155,.55);
}
.auth-kicker {
  font-size: 12px; letter-spacing: .28em; color: #d8c7aa;
  text-transform: uppercase; margin-bottom: 28px;
}
.auth-brand h1 {
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.24; font-weight: 600; margin: 0 0 22px;
  letter-spacing: .01em;
}
.auth-brand p {
  max-width: 520px; color: #d9d1c1; font-size: 15px; line-height: 1.95;
}
.auth-mark {
  position: absolute; right: 64px; bottom: 44px;
  font-size: 12px; letter-spacing: .14em; color: #aebcaf;
}
.auth-card {
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.auth-box { width: min(380px, 100%); }
.auth-box h2 { font-size: 28px; margin: 0 0 8px; font-weight: 600; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 30px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 12px; letter-spacing: .08em;
  color: var(--ink-soft); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line);
  background: rgba(255,253,248,.7);
  color: var(--ink); border-radius: 10px;
  padding: 12px 14px; outline: none;
  transition: border .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--moss-3); box-shadow: 0 0 0 3px rgba(79,114,93,.12);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 11px 22px; background: var(--moss); color: #fff8ea;
  font-size: 14px; letter-spacing: .03em; transition: .2s;
}
.btn:hover { background: var(--moss-2); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--moss); }
.btn.ghost:hover { border-color: var(--moss-3); background: rgba(79,114,93,.06); }
.btn.small { padding: 7px 14px; font-size: 12px; }
.btn.wide { width: 100%; }
.btn.amber { background: var(--amber); }
.btn.amber:hover { background: #96652d; }
.btn.danger { background: var(--danger); }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.tiny { font-size: 11px; letter-spacing: .04em; }
.auth-foot { margin-top: 28px; font-size: 12px; color: var(--ink-soft); line-height: 1.8; }
.seal {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .12em; color: var(--moss);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; background: rgba(255,253,248,.5);
}
.seal:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ---------- 登录提示 ---------- */
.notice {
  border: 1px solid var(--line);
  background: rgba(255,253,248,.6);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 18px;
  font-size: 13px; color: var(--ink-soft);
}
.notice.bad { border-color: #d8b6ae; background: #fbf0ed; color: #7e3d34; }
.notice.good { border-color: #b9cdbc; background: #f1f7ef; color: #355444; }

/* ---------- 应用外壳 ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: linear-gradient(180deg, #294637, #233c2e);
  color: #e9e2d2; padding: 30px 24px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 34px; }
.brand-mark {
  width: 38px; height: 46px; flex: 0 0 38px;
  border: 1px solid rgba(229,199,155,.45); border-radius: 19px 19px 8px 8px;
  position: relative; margin-top: 2px;
}
.brand-mark:before {
  content: ""; position: absolute; left: 50%; top: 7px; width: 1px; height: 22px;
  background: rgba(229,199,155,.5); transform: translateX(-50%);
}
.brand-mark:after {
  content: ""; position: absolute; left: 8px; bottom: 8px; width: 20px; height: 8px;
  border: 1px solid rgba(229,199,155,.35); border-radius: 50%;
}
.brand-name { font-size: 16px; letter-spacing: .04em; line-height: 1.4; }
.brand-sub { font-size: 10px; color: #aebcaf; letter-spacing: .1em; margin-top: 5px; }
.nav { display: grid; gap: 4px; }
.nav a {
  color: #cfd8ca; font-size: 13px; padding: 9px 12px;
  border-radius: 9px; display: flex; align-items: center; gap: 10px;
}
.nav a:hover, .nav a.on { background: rgba(255,255,255,.07); color: #fff8ea; }
.nav a .dot { width: 5px; height: 5px; border-radius: 50%; background: #718575; }
.nav a.on .dot { background: var(--amber-soft); }
.side-sep { height: 1px; background: rgba(255,255,255,.09); margin: 22px 0; }
.side-user { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.09); }
.side-user strong { display: block; color: #f5eee0; font-size: 14px; font-weight: 500; }
.side-user span { font-size: 11px; color: #aebcaf; letter-spacing: .06em; }
.side-user form { margin-top: 12px; }
.side-user .btn { border-color: rgba(255,255,255,.16); color: #dfe6da; background: transparent; }
.side-user .btn:hover { background: rgba(255,255,255,.08); }
.main { min-width: 0; padding: 30px clamp(20px, 4vw, 58px) 64px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
.topbar h1 { font-size: clamp(26px, 3vw, 36px); line-height: 1.25; margin: 0; font-weight: 600; }
.topbar .sub { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 通用块 ---------- */
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: rgba(255,253,248,.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(52,45,32,.04);
}
.card.tight { padding: 16px 18px; }
.card h2, .card h3 { margin: 0 0 8px; line-height: 1.35; font-weight: 600; }
.card h2 { font-size: 21px; }
.card h3 { font-size: 16px; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.kicker { font-size: 11px; letter-spacing: .16em; color: var(--amber); text-transform: uppercase; margin-bottom: 8px; }
.rule { height: 1px; background: var(--line-soft); margin: 16px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; letter-spacing: .04em; color: var(--moss);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 9px; background: rgba(255,253,248,.4);
}
.tag.amber { color: #8b5c24; border-color: #e2c69c; background: #fbf3e6; }
.tag.danger { color: var(--danger); border-color: #e1c0b8; background: #fbf0ed; }
.list { display: grid; gap: 12px; }
.list-item {
  border: 1px solid var(--line-soft); border-radius: 13px;
  padding: 13px 15px; background: rgba(255,253,248,.55);
}
.list-item .meta { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 11px; }
.list-item .body { margin-top: 7px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.list-item .reply {
  margin-top: 10px; border-left: 2px solid var(--amber-soft);
  padding-left: 12px; color: var(--moss); font-size: 13px; line-height: 1.8;
}
.empty { color: var(--ink-soft); font-size: 13px; padding: 16px 0; text-align: center; }

/* ---------- 研究页 ---------- */
.hero {
  background:
    linear-gradient(120deg, rgba(41,70,55,.96), rgba(41,70,55,.82)),
    radial-gradient(circle at 80% 20%, rgba(229,199,155,.3), transparent 35%);
  color: #f7f0e1; border: 0;
  position: relative; overflow: hidden;
}
.hero:after {
  content: ""; position: absolute; right: -80px; bottom: -110px;
  width: 330px; height: 330px; border-radius: 50%;
  border: 1px solid rgba(229,199,155,.25);
  box-shadow: 0 0 0 28px rgba(229,199,155,.05), 0 0 0 56px rgba(229,199,155,.04);
}
.hero h2 { font-size: 24px; }
.hero p { color: #d9d2c2; max-width: 680px; }
.hero .tag { color: #e9dcc4; border-color: rgba(229,199,155,.35); background: rgba(255,255,255,.05); }
.script {
  display: grid; gap: 10px; counter-reset: step;
  margin-top: 14px;
}
.script-step {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  align-items: start; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12);
}
.script-step:first-child { border-top: 0; }
.script-step .n {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(229,199,155,.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #e9dcc4;
}
.script-step strong { display: block; font-size: 14px; font-weight: 500; color: #fff8ea; }
.script-step span { display: block; font-size: 12px; color: #c9d0c4; line-height: 1.7; }

.flow {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px; align-items: stretch; margin: 18px 0 6px;
}
.flow-node {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,253,248,.75); padding: 12px 10px;
  text-align: center; position: relative; min-height: 82px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.flow-node b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.flow-node span { font-size: 10px; color: var(--ink-soft); line-height: 1.5; }
.flow-node:not(:last-child):after {
  content: "→"; position: absolute; right: -12px; top: 50%;
  transform: translateY(-50%); color: var(--amber); font-size: 12px;
}
.flow-node.key { border-color: #d8b47e; background: #fbf3e6; }
.principle {
  border-left: 3px solid var(--amber); padding: 2px 0 2px 16px;
  margin: 16px 0 0; color: var(--ink); font-size: 14px; line-height: 1.9;
}
.principle b { color: var(--moss); }

.tiers { display: grid; gap: 12px; margin-top: 12px; }
.tier { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.tier .grade {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; border: 1px solid var(--line); color: var(--moss);
  background: var(--white);
}
.tier.a .grade { background: #fbf3e6; border-color: #e2c69c; color: #8b5c24; }
.tier h4 { margin: 3px 0 4px; font-size: 14px; }
.tier p { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.75; }

.school-list { display: grid; gap: 0; margin-top: 8px; }
.school {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 13px 0; border-top: 1px solid var(--line-soft); align-items: start;
}
.school:first-child { border-top: 0; }
.school b { font-size: 14px; font-weight: 600; display: block; }
.school span { font-size: 12px; color: var(--ink-soft); line-height: 1.7; display: block; margin-top: 3px; }
.school .why { font-size: 10px; color: #8b5c24; border: 1px solid #e2c69c; background: #fbf3e6; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }

.notes-grid { display: grid; gap: 12px; }
.note-card { border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; background: rgba(255,253,248,.6); }
.note-card .head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.note-card .body { margin: 8px 0 0; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.note-card .reply { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--amber-soft); font-size: 13px; color: var(--moss); white-space: pre-wrap; }
.note-card form { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.note-card textarea { min-height: 56px; }
.note-card form .field { margin: 0; }

.push-list { display: grid; gap: 12px; }
.push-card { border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; background: var(--white); }
.push-card .head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.push-card h4 { margin: 0; font-size: 15px; }
.push-card p { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); white-space: pre-wrap; }
.push-card img { margin-top: 10px; border-radius: 10px; max-height: 220px; object-fit: cover; }

.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.media-grid img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--paper-2); }

/* ---------- 孩子页 ---------- */
.kid .main { background:
  radial-gradient(circle at 92% 4%, rgba(229,199,155,.18), transparent 28%),
  radial-gradient(circle at 4% 90%, rgba(79,114,93,.08), transparent 28%);
}
.kid .topbar h1 { font-size: clamp(30px, 4vw, 46px); }
.kid .card { border-radius: 20px; }
.kid .card h2 { font-size: 23px; }
.kid .note-card, .kid .push-card { background: #fffdf8; }
.kid .list-item .body { font-size: 15px; }
.topic-box {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end;
  margin-top: 10px;
}
.topic-box .field { margin: 0; }
.topic-box input { font-size: 18px; padding: 14px 16px; }
.kid-hero {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px;
  align-items: stretch;
}
.kid-hero .hello { padding: 26px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); }
.kid-hero .hello h2 { font-size: 26px; margin-bottom: 4px; }
.kid-hero .hello .date { font-size: 12px; color: var(--ink-soft); letter-spacing: .06em; }
.kid-hero .quote {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  color: var(--moss); font-size: 14px; line-height: 1.9;
}
.kid-hero .illus {
  border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  background: #e9dcc7; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
}
.kid-hero .illus img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.ask-disabled {
  border: 1px dashed var(--line); border-radius: 16px; padding: 18px;
  background: rgba(255,253,248,.5); color: var(--ink-soft); font-size: 13px; line-height: 1.8;
}
.ask-disabled b { color: var(--moss); }
.note-form { display: grid; gap: 12px; }
.note-form .row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.note-form .actions { display: flex; justify-content: flex-end; }

/* ---------- 表格 / 管理 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { font-size: 11px; letter-spacing: .06em; color: var(--ink-soft); font-weight: 500; }
.table tr:last-child td { border-bottom: 0; }
.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fbf3e6; border: 1px solid #e2c69c; border-radius: 12px;
  padding: 16px; text-align: center; font-size: 22px; letter-spacing: .16em;
  color: #6f4a1e;
}
.invite-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.invite-row form { display: inline; }

/* ---------- 错误页 ---------- */
.error-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; }
.error-box { max-width: 520px; text-align: center; }
.error-box .code { font-size: 64px; color: var(--amber); line-height: 1; }
.error-box h1 { font-size: 24px; margin: 10px 0; }
.error-box p { color: var(--ink-soft); }

/* ---------- 移动端 ---------- */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 20px; }
  .brand { margin-bottom: 16px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-sep { display: none; }
  .side-user { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .side-user form { margin-top: 0; }
  .main { padding: 24px 18px 50px; }
  .topbar { flex-direction: column; }
  .grid.two, .grid.three, .kid-hero { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; }
  .flow-node:not(:last-child):after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
  .school { grid-template-columns: 1fr; }
  .note-card form { grid-template-columns: 1fr; }
  .note-form .row { grid-template-columns: 1fr; }
  .topic-box { grid-template-columns: 1fr; }
  .topic-box .btn { width: 100%; }
}
@media (max-width: 720px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { padding: 42px 28px 54px; min-height: 44vh; }
  .auth-brand:after { left: 28px; bottom: 28px; }
  .auth-brand h1 { font-size: 34px; }
  .auth-mark { right: 28px; bottom: 24px; }
  .auth-card { padding: 34px 22px 48px; }
  .nav { grid-template-columns: 1fr 1fr; }
  .nav a { font-size: 12px; padding: 8px 10px; }
  .media-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 家人小站 · 四孩之门 ---------- */
.gate-body {
  background: #d9c39b;
  overflow-x: hidden;
}
.gate {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #22372b;
  isolation: isolate;
}
.gate-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  filter: saturate(.92) contrast(.98);
  z-index: -2;
}
.gate-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(20, 36, 26, .62) 0%, rgba(20, 36, 26, .22) 38%, rgba(20, 36, 26, 0) 66%),
    linear-gradient(180deg, rgba(20, 36, 26, .16) 0%, rgba(20, 36, 26, 0) 30%, rgba(20, 36, 26, .34) 100%);
}
.gate-head {
  position: absolute;
  z-index: 5;
  top: clamp(28px, 5vh, 48px);
  left: clamp(24px, 6vw, 76px);
  max-width: 620px;
  color: #fff8e9;
  text-shadow: 0 2px 16px rgba(15, 27, 20, .50);
}
.wordmark {
  margin: 0;
  font-size: clamp(60px, 7.4vw, 100px);
  line-height: 1.02;
  letter-spacing: .10em;
  font-weight: 800;
  color: #fff8e6;
  -webkit-text-stroke: 2px rgba(30, 54, 41, .55);
  text-shadow: 0 2px 0 rgba(176, 122, 58, .55), 0 9px 24px rgba(15, 28, 20, .45);
}
.wordmark:after {
  content: "";
  display: block;
  width: min(52%, 240px);
  height: 7px;
  margin-top: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, #b07a3a, rgba(229, 199, 155, .25));
  transform: skewX(-18deg);
}
.wordmark-sub {
  display: block;
  margin-top: 18px;
  color: #f2dfbc;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
}
.gate-sub {
  margin: 15px 0 0;
  max-width: 470px;
  color: #fff3df;
  font-size: 18px;
  line-height: 1.82;
  text-shadow: 0 1px 10px rgba(15, 27, 20, .55);
}
.kid-stage {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 0;
  width: min(34vw, 500px);
  height: min(76vh, 640px);
  pointer-events: none;
}
.kid-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
.kid-slide.is-on { opacity: 1; transform: none; }
.kid-slide img {
  display: block;
  height: calc(100% - 34px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 14px rgba(30, 44, 31, .24));
  transform: scaleX(-1);
  transform-origin: center;
}
.kid-slide figcaption {
  margin-top: 9px;
  padding: 5px 14px;
  border: 1px solid rgba(120, 94, 55, .24);
  border-radius: 999px;
  background: rgba(255, 249, 235, .92);
  color: #40533f;
  font-size: 13px;
  letter-spacing: .10em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(40, 34, 22, .10);
}
.gate-card {
  position: absolute;
  z-index: 6;
  right: clamp(18px, 4vw, 64px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(440px, 34vw, 500px);
  padding: 34px 32px 28px;
  border: 1px solid rgba(120, 94, 55, .20);
  border-radius: 16px;
  background: #fffaf0;
  box-shadow: 0 18px 44px rgba(30, 40, 27, .14);
}
.gate-card-top h2 {
  margin: 14px 0 9px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  color: #2e4638;
}
.gate-card-sub {
  margin: 0 0 20px;
  color: #526054;
  font-size: 15px;
  line-height: 1.75;
}
.gate-card .field { margin-bottom: 16px; }
.gate-card .field label {
  margin-bottom: 7px;
  color: #5b695c;
  font-size: 13px;
  letter-spacing: .06em;
}
.gate-card .field input {
  padding: 13px 14px;
  font-size: 16px;
  background: #fffdf8;
}
.gate-card .btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px 22px;
  font-size: 16px;
}
.gate-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(151, 127, 89, .20);
  color: #6b5c45;
  font-size: 13px;
  line-height: 1.7;
}
.gate-card-foot {
  margin-top: 12px;
  color: #5f6b60;
  font-size: 13px;
  line-height: 1.7;
}
.gate-card-foot p { margin: 0 0 6px; }
.gate-card-foot a { color: #7a5d30; border-bottom: 1px solid rgba(122, 93, 48, .25); }

@media (max-width: 1100px) {
  .gate-head { left: 24px; }
  .wordmark { font-size: clamp(56px, 7vw, 82px); }
  .gate-sub { font-size: 17px; max-width: 410px; }
  .kid-stage { width: 34vw; height: 68vh; left: 0; }
  .gate-card { width: 420px; right: 20px; padding: 28px 24px 24px; }
  .gate-card-top h2 { font-size: 30px; }
}
@media (max-width: 980px) {
  .gate-body { overflow-y: auto; }
  .gate { min-height: 100svh; height: auto; overflow: hidden; padding-bottom: 24px; }
  .gate-bg { object-position: 58% 56%; }
  .gate-shade {
    background:
      linear-gradient(180deg, rgba(20, 36, 26, .52) 0%, rgba(20, 36, 26, .10) 36%, rgba(20, 36, 26, .26) 100%);
  }
  .gate-head {
    position: relative;
    top: auto;
    left: auto;
    margin: 20px 16px 0;
    max-width: none;
  }
  .wordmark { font-size: clamp(50px, 13vw, 72px); }
  .gate-sub { max-width: 440px; font-size: 17px; }
  .kid-stage {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    height: 32vh;
    min-height: 230px;
    max-height: 340px;
    margin: 10px 16px 0;
  }
  .gate-card {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: auto;
    margin: 18px 14px 0;
    padding: 26px 22px 22px;
  }
  .gate-card-top h2 { font-size: 30px; }
}
@media (max-width: 560px) {
  .gate-head { margin: 16px 12px 0; }
  .wordmark { font-size: 50px; letter-spacing: .07em; }
  .wordmark-sub { font-size: 11px; letter-spacing: .15em; }
  .gate-sub { font-size: 16px; line-height: 1.75; }
  .kid-stage { height: 34vh; min-height: 250px; max-height: 360px; margin: 8px 12px 0; }
  .kid-slide figcaption { font-size: 11px; padding: 4px 11px; }
  .gate-card { margin: 14px 10px 0; padding: 22px 18px 20px; border-radius: 14px; }
  .gate-card-top h2 { font-size: 28px; }
  .gate-card-sub { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .kid-slide { transition: none; }
}

.gate-code-form { margin: 0 0 4px; }

/* ---------- 家庭留言板 / 往期画报 ---------- */
.timeline { display: grid; gap: 12px; margin-top: 14px; }
.timeline-item {
  border: 1px solid var(--line-soft); border-radius: 14px;
  background: rgba(255, 253, 248, .58); padding: 14px 16px;
}
.timeline-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; flex-wrap: wrap;
}
.timeline-head strong { font-size: 14px; font-weight: 600; margin-right: 8px; }
.timeline-body {
  margin: 8px 0 0; white-space: pre-wrap;
  font-size: 14px; line-height: 1.85; color: var(--ink);
}
.archive-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.archive-card {
  display: grid; grid-template-columns: 58px 1fr; gap: 16px;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255, 253, 248, .7); padding: 18px 20px;
  box-shadow: 0 10px 28px rgba(52, 45, 32, .04);
}
.archive-card.missing { opacity: .58; }
.archive-no {
  font-size: 34px; line-height: 1; font-weight: 600;
  color: var(--amber); letter-spacing: .02em;
  padding-top: 2px;
}
.archive-main h2 { margin: 8px 0 2px; font-size: 19px; line-height: 1.35; }
.archive-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.archive-main .btn { margin-top: 12px; }
.archive-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.archive-actions .btn { margin-top: 0; }
/* ---------- 基地聊天 ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.chat-live {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--moss-3); font-size: 12px; letter-spacing: .06em;
  border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 7px 12px; background: rgba(255,253,248,.55);
}
.chat-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #5f8a6e; box-shadow: 0 0 0 3px rgba(95,138,110,.12);
}
.chat-card {
  padding: 0; overflow: hidden;
  box-shadow: 0 12px 32px rgba(52, 45, 32, .05);
}
.chat-stream {
  height: min(54vh, 520px); min-height: 320px;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 24px 10px;
  display: flex; flex-direction: column; gap: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(176,122,58,.07), transparent 32%),
    rgba(255,253,248,.34);
}
.chat-empty {
  margin: auto; max-width: 320px; text-align: center;
  color: var(--ink-soft); font-size: 13px; line-height: 1.9;
}
.chat-msg { max-width: min(76%, 620px); align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; }
.chat-meta {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 4px 5px; color: var(--ink-soft); font-size: 11px;
}
.chat-meta strong { color: var(--moss-3); font-size: 12px; font-weight: 600; }
.chat-msg.mine .chat-meta { justify-content: flex-end; }
.chat-bubble {
  border: 1px solid var(--line-soft); border-radius: 4px 14px 14px 14px;
  background: rgba(255,253,248,.86); padding: 10px 14px;
  font-size: 15px; line-height: 1.72; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: 0 4px 12px rgba(52,45,32,.035);
}
.chat-msg.mine .chat-bubble {
  border-color: rgba(53,84,68,.5); border-radius: 14px 4px 14px 14px;
  background: var(--moss); color: #fff8e9;
}
.chat-compose {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 14px 18px 10px; border-top: 1px solid var(--line-soft);
  background: rgba(255,253,248,.74);
}
.chat-compose textarea {
  flex: 1; min-height: 48px; max-height: 120px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); color: var(--ink);
  padding: 11px 13px; font-size: 15px; line-height: 1.6;
  resize: vertical; outline: none;
}
.chat-compose textarea:focus {
  border-color: var(--moss-3); box-shadow: 0 0 0 3px rgba(79,114,93,.12);
}
.chat-compose .btn { flex: none; min-width: 80px; padding: 11px 18px; }
.chat-compose .btn:disabled { opacity: .55; cursor: wait; }
.chat-hint {
  margin: 0; padding: 0 18px 14px;
  color: var(--ink-soft); font-size: 11px; line-height: 1.7;
}
/* ---------- 单聊 ---------- */
.dm-strip {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 16px; padding: 16px 18px;
  border: 1px solid var(--line-soft); border-radius: 16px;
  background: rgba(255,253,248,.58);
  box-shadow: 0 8px 22px rgba(52,45,32,.04);
}
.dm-strip-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.dm-strip-head strong { display: block; font-size: 16px; line-height: 1.35; color: var(--moss); }
.dm-strip-head span { color: var(--ink-soft); font-size: 11px; }
.dm-people { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-person {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line-soft); border-radius: 999px;
  background: var(--white); color: var(--ink);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dm-person:hover {
  border-color: var(--amber-soft); background: #fffaf0;
  color: var(--moss); transform: translateY(-1px);
}
.dm-person .chat-avatar { width: 26px; height: 26px; }
.dm-person-text { display: flex; flex-direction: column; line-height: 1.15; }
.dm-person-text strong { font-size: 12px; color: var(--moss-3); }
.dm-person-text small { font-size: 10px; color: var(--ink-soft); }
.dm-empty { color: var(--ink-soft); font-size: 12px; padding: 6px 2px; }
.dm-thread-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--line-soft);
  background: rgba(255,253,248,.68);
}
.dm-thread-head .chat-avatar { width: 32px; height: 32px; }
.dm-thread-head div { line-height: 1.25; }
.dm-thread-head strong { display: block; color: var(--moss); font-size: 14px; }
.dm-thread-head span { color: var(--ink-soft); font-size: 11px; }
.dm-privacy {
  margin-left: auto; color: var(--amber); font-size: 10px;
  letter-spacing: .06em; border: 1px solid var(--amber-soft);
  border-radius: 999px; padding: 3px 8px; white-space: nowrap;
}
@media (max-width: 720px) {
  .dm-strip { padding: 14px; }
  .dm-strip-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .dm-privacy { display: none; }
}
/* ---------- 聊天入口 / 私聊选人 ---------- */
.chat-hub-hero {
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: 26px; align-items: center;
  margin-top: 22px; padding: 26px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--white); box-shadow: var(--shadow);
}
.chat-hub-intro {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.chat-hub-mark {
  display: grid; place-items: center;
  width: 98px; height: 98px; margin-bottom: 6px;
  border-radius: 26px; color: var(--moss);
  background: radial-gradient(circle at 35% 30%, #fffdf7 0%, #eef2e9 100%);
  border: 1px solid rgba(79,114,93,.15);
}
.chat-hub-intro h2 {
  margin: 0; color: var(--moss); font-size: 25px; line-height: 1.35; font-weight: 600;
}
.chat-hub-intro p {
  margin: 0; max-width: 340px;
  color: var(--ink-soft); font-size: 13px; line-height: 1.8;
}
.chat-hub-actions {
  display: flex; flex-direction: column; gap: 12px;
}
.chat-entry-btn {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "kicker arrow"
    "title arrow"
    "note arrow";
  align-items: center; column-gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line); border-radius: 17px;
  background: #fbfaf4; color: var(--ink);
  box-shadow: 0 6px 16px rgba(52,45,32,.04);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.chat-entry-btn:hover {
  color: var(--ink); transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(52,45,32,.10);
}
.chat-entry-btn.group:hover { border-color: var(--moss); background: #f6faf2; }
.chat-entry-btn.private:hover { border-color: var(--amber); background: #fffaf1; }
.chat-entry-kicker {
  grid-area: kicker; color: var(--ink-soft);
  font-size: 9px; letter-spacing: .18em; line-height: 1.2;
}
.chat-entry-btn strong {
  grid-area: title; color: var(--moss); font-size: 25px; font-weight: 600; line-height: 1.25;
}
.chat-entry-btn.private strong { color: var(--amber); }
.chat-entry-btn small {
  grid-area: note; color: var(--ink-soft); font-size: 11px; line-height: 1.4;
}
.chat-entry-arrow {
  grid-area: arrow; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--moss); background: rgba(79,114,93,.08);
  font-size: 18px; line-height: 1;
}
.chat-entry-btn.private .chat-entry-arrow {
  color: var(--amber); background: rgba(176,122,58,.09);
}
.chat-hub-note {
  margin: 16px 0 0; color: var(--ink-soft);
  font-size: 11px; line-height: 1.7;
}
.private-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin-top: 20px;
}
.private-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--white); color: var(--ink);
  box-shadow: 0 8px 20px rgba(52,45,32,.04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.private-card:hover {
  color: var(--ink); transform: translateY(-1px);
  border-color: var(--amber-soft); box-shadow: 0 12px 26px rgba(52,45,32,.09);
}
.private-avatar { width: 54px; height: 54px; }
.private-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.private-copy strong { color: var(--moss); font-size: 17px; }
.private-copy small { color: var(--ink-soft); font-size: 11px; }
.private-go {
  margin-left: auto; flex: none;
  color: var(--amber); font-size: 11px; font-weight: 600;
}
.private-go b { font-weight: 600; }
.private-empty { color: var(--ink-soft); font-size: 13px; padding: 20px 2px; }
.private-hint { margin: 16px 0 0; padding: 0; }
@media (max-width: 720px) {
  .chat-hub-hero { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .chat-hub-mark { width: 76px; height: 76px; border-radius: 20px; }
  .chat-hub-mark svg { width: 50px; height: 50px; }
  .chat-hub-intro h2 { font-size: 22px; }
  .chat-entry-btn { padding: 15px 16px; }
  .chat-entry-btn strong { font-size: 23px; }
  .private-grid { grid-template-columns: 1fr; }
  .private-card { padding: 14px; }
}
@media (max-width: 720px) {
  .chat-stream { height: 50vh; min-height: 280px; padding: 18px 14px 8px; }
  .chat-msg { max-width: 88%; }
  .chat-compose { display: grid; grid-template-columns: 1fr auto; padding: 12px 12px 8px; }
  .chat-compose textarea { min-height: 52px; }
  .chat-hint { padding: 0 12px 12px; }
}

@media (max-width: 760px) {
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card { grid-template-columns: 48px 1fr; padding: 16px; }
  .archive-no { font-size: 28px; }
}


/* ---------- 头像 ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; flex: none;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
}
.avatar-sm { width: 38px; height: 38px; }
.avatar-lg { width: 92px; height: 92px; border: 3px solid var(--white); box-shadow: 0 8px 22px rgba(50,42,30,.16); }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff8ea; background: var(--amber);
  font-size: 15px; font-weight: 600; line-height: 1;
  border-color: rgba(255,255,255,.2);
}
.side-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-person > div { min-width: 0; }

/* ---------- 个人资料 ---------- */
.profile-preview {
  display: flex; align-items: center; gap: 18px;
  padding: 22px; border: 1px solid var(--line-soft);
  border-radius: 16px; background: var(--white);
  box-shadow: var(--shadow);
}
.profile-preview strong { display: block; font-size: 22px; line-height: 1.3; }
.profile-preview span { color: var(--ink-soft); font-size: 13px; }
.profile-note { margin-top: 16px; }
.profile-note .list-item { border-color: var(--line-soft); }
.profile-form .btn { margin-top: 4px; }

.avatar-picker-card { margin-top: 18px; }
.avatar-group { margin-top: 18px; }
.avatar-group + .avatar-group { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.avatar-group h3 { margin: 0 0 10px; font-size: 18px; color: var(--moss); }
.avatar-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.avatar-choice-form { margin: 0; }
.avatar-choice {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; padding: 14px 10px 12px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--white); color: var(--ink); font: inherit;
  cursor: pointer; text-align: center;
  box-shadow: 0 2px 0 rgba(50,42,30,.04);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.avatar-choice:hover {
  transform: translateY(-1px); border-color: var(--moss);
  box-shadow: 0 8px 20px rgba(50,42,30,.10);
}
.avatar-choice img {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--white); box-shadow: 0 6px 16px rgba(50,42,30,.14);
}
.avatar-choice span { font-size: 13px; line-height: 1.2; color: var(--ink-soft); }
.avatar-choice.is-current { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(79,114,93,.12); }
.avatar-choice.is-preview { cursor: default; opacity: .88; }
.avatar-choice.is-preview:hover { transform: none; border-color: var(--line); box-shadow: 0 2px 0 rgba(50,42,30,.04); }
.avatar-tag {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 700; line-height: 1.4;
}
.current-tag { background: var(--moss); color: #fff8ea; }
.preview-tag { background: var(--paper-2); color: var(--moss); border: 1px solid var(--line); }
.avatar-upload {
  display: flex; align-items: center; gap: 24px;
  padding: 20px; border: 1px solid var(--line-soft); border-radius: 16px;
  background: var(--white);
}
.avatar-upload-preview {
  flex: none; display: grid; place-items: center;
  width: 112px; height: 112px; border-radius: 18px;
  background: var(--paper); border: 1px dashed var(--line);
}
.avatar-upload-copy { flex: 1; min-width: 0; }
.avatar-upload-copy .field { margin-top: 0; }
.avatar-upload-copy .btn { margin-top: 4px; }

/* ---------- 兴趣共读 ---------- */
.read-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; margin-top: 20px;
}
.read-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
}
.read-cover { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.read-cover img { width: 100%; height: 100%; object-fit: cover; }
.read-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.read-kicker { font-size: 11px; letter-spacing: .14em; color: var(--amber); font-weight: 700; }
.read-card h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.read-source { color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.read-text { margin: 2px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink); }
.read-q { margin: 2px 0 0; padding: 10px 12px; border-left: 3px solid var(--amber-soft); background: var(--paper); font-size: 13px; line-height: 1.7; }
.read-q b { color: var(--moss); }
.read-words { display: flex; flex-wrap: wrap; gap: 6px; }
.read-words span { font-size: 11px; color: var(--moss); background: rgba(79,114,93,.09); border-radius: 999px; padding: 4px 9px; }
.read-actions { margin-top: auto; padding-top: 6px; }
@media (max-width: 980px) {
  .read-grid { grid-template-columns: 1fr; }
  .read-cover { aspect-ratio: 16 / 8; }
}
@media (max-width: 720px) {
  .profile-preview { align-items: flex-start; flex-direction: column; gap: 12px; }
  .read-card h2 { font-size: 18px; }
  .avatar-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatar-choice img { width: 76px; height: 76px; }
  .avatar-upload { flex-direction: column; align-items: flex-start; gap: 14px; }
  .avatar-upload-preview { width: 92px; height: 92px; }
}

.chat-avatar {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid var(--line-soft); background: var(--paper-2);
}
.chat-avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--amber-soft); color: var(--moss-2); font-size: 11px; font-weight: 700;
}
.chat-meta { align-items: center; }
.avatar-xs { width: 30px; height: 30px; }
.timeline-person { display: flex; align-items: center; gap: 8px; }
.timeline-person strong { margin: 0; }

.read-how .script-step { border-color: var(--line-soft); }
.read-how .script-step .n { color: var(--moss); border-color: var(--amber-soft); }
.read-how .script-step strong { color: var(--moss); }
.read-how .script-step span { color: var(--ink-soft); }

/* ---------- 头像折叠区（2026-11-29 紧凑版） ---------- */
.avatar-card { margin-top: 18px; }
.avatar-fold {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
}
.avatar-fold > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}
.avatar-fold > summary::-webkit-details-marker { display: none; }
.avatar-fold-face { flex: none; display: grid; place-items: center; }
.avatar-fold-face .avatar { width: 52px; height: 52px; border: 2px solid var(--white); box-shadow: 0 5px 14px rgba(50,42,30,.14); }
.avatar-fold-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.avatar-fold-copy strong { font-size: 17px; line-height: 1.3; color: var(--moss); }
.avatar-fold-copy span { font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.avatar-fold-cue {
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--moss);
  background: var(--paper);
}
.avatar-fold-cue .when-open { display: none; }
.avatar-fold[open] .avatar-fold-cue .when-closed { display: none; }
.avatar-fold[open] .avatar-fold-cue .when-open { display: inline; }
.avatar-fold-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line-soft);
}
.avatar-fold-block h3 { margin: 0 0 6px; font-size: 17px; color: var(--moss); }
.avatar-fold-block + .rule { margin: 18px 0; }
.avatar-picker.compact {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.avatar-picker.compact .avatar-choice {
  padding: 10px 8px;
  border-radius: 14px;
}
.avatar-picker.compact .avatar-choice img { width: 72px; height: 72px; }
.avatar-peek {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
}
.avatar-peek > summary {
  cursor: pointer;
  color: var(--moss);
  font-size: 14px;
  font-weight: 600;
}
.avatar-peek > summary::-webkit-details-marker { display: none; }
.avatar-peek-group { margin-top: 14px; }
.avatar-peek-group h4 { margin: 0 0 4px; font-size: 14px; color: var(--ink-soft); }
.avatar-peek .avatar-choice { cursor: default; }
.avatar-upload.compact { padding: 14px; gap: 16px; }
.avatar-upload.compact .avatar-upload-preview { width: 84px; height: 84px; border-radius: 14px; }
@media (max-width: 720px) {
  .avatar-fold > summary { padding: 10px 12px; gap: 10px; }
  .avatar-fold-face .avatar { width: 46px; height: 46px; }
  .avatar-fold-copy strong { font-size: 16px; }
  .avatar-fold-cue { padding: 4px 10px; }
  .avatar-fold-body { padding: 14px 12px 16px; }
  .avatar-picker.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .avatar-picker.compact .avatar-choice { padding: 8px 4px; }
  .avatar-picker.compact .avatar-choice img { width: 58px; height: 58px; }
  .avatar-upload.compact { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---------- 研究入口 / 孩子兴趣页 ---------- */
.research-hub { align-items: stretch; }
.research-mark {
  color: var(--amber);
  background: radial-gradient(circle at 35% 30%, #fffaf0 0%, #f6ede0 100%);
  border-color: rgba(176,122,58,.16);
}
.research-hub .chat-hub-actions { gap: 10px; }
.research-entry { min-height: 96px; }
.research-entry .chat-entry-kicker { color: var(--amber); }
.research-entry.moss .chat-entry-kicker { color: var(--moss); }
.research-entry strong { font-size: 27px; }
.research-entry small { max-width: 390px; }
.research-gallery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 16px 0 4px;
}
.research-gallery figure {
  margin: 0; overflow: hidden; border: 1px solid var(--line);
  border-radius: 14px; background: var(--white);
}
.research-gallery img {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  object-fit: cover; background: var(--paper-2);
}
.research-gallery figcaption {
  padding: 9px 11px 10px; color: var(--ink-soft);
  font-size: 12px; line-height: 1.7;
}
.research-gallery figcaption b { color: var(--moss); }
.research-child-hero { align-items: start; }
.research-child-hero .hello h2 { font-size: 24px; line-height: 1.45; }
.research-child-hero .illus { min-height: 320px; height: 340px; }
@media (max-width: 720px) { .research-child-hero .illus { height: 300px; } }
@media (max-width: 720px) {
  .research-gallery { grid-template-columns: 1fr; }
  .research-entry { min-height: 0; }
  .research-entry strong { font-size: 23px; }
}

/* ---------- 语音留言 ---------- */
[hidden] { display: none !important; }
.voice-composer {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 12px 13px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255,253,248,.68);
}
.voice-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
}
.voice-record-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  min-width: 104px;
  height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(53,84,68,.32);
  border-radius: 999px;
  background: var(--moss);
  color: #fff8e9;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 3px 9px rgba(40,67,53,.12);
}
.voice-record-btn:hover { background: var(--moss-2); color: #fff8e9; }
.voice-record-btn.is-recording {
  background: var(--danger);
  border-color: var(--danger);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
.voice-record-btn:disabled { opacity: .55; cursor: wait; }
.voice-icon { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
.voice-copy { display: grid; gap: 4px; min-width: 0; }
.voice-status {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.voice-status.is-error { color: var(--danger); }
.voice-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.voice-tools a,
.voice-file-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--moss);
  font-size: 12px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.voice-tools a:hover,
.voice-file-btn:hover { color: var(--amber); }
.voice-secure-link { font-weight: 600; }
.voice-file-input {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.voice-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
}
.voice-preview audio {
  flex: 1 1 260px;
  width: 100%;
  min-width: 0;
  height: 38px;
  accent-color: var(--moss);
}
.voice-clear {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 12px;
}
.voice-clear:hover { border-color: var(--amber); color: var(--amber); }
.timeline-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--white);
}
.timeline-voice .voice-message {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 440px;
  height: 36px;
  accent-color: var(--moss);
}
.voice-duration {
  flex: none;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chat-bubble.has-voice { min-width: 260px; white-space: normal; }
.chat-bubble .voice-message {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 36px;
  margin-top: 4px;
  accent-color: var(--moss);
}
.chat-msg.mine .chat-bubble .voice-duration { color: #f0e5d0; }
.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.chat-compose textarea { grid-column: 1; min-width: 0; }
.chat-compose .btn { grid-column: 2; grid-row: 1; align-self: end; }
.chat-compose .chat-voice { grid-column: 1 / -1; grid-row: 2; margin: 0; }
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(155,74,63,.22); }
  50% { box-shadow: 0 0 0 7px rgba(155,74,63,0); }
}
@media (max-width: 520px) {
  .voice-head { grid-template-columns: 1fr; gap: 8px; }
  .voice-record-btn { width: 100%; height: 44px; }
  .voice-preview audio { flex-basis: 100%; }
  .chat-bubble.has-voice { min-width: 230px; }
  .chat-bubble .voice-message { max-width: none; }
}

#family-form > .btn {
  display: flex;
  width: fit-content;
  margin: 14px auto 0;
}

/* 站内资源只供在线查看，不提供下载入口 */
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
audio {
  -webkit-touch-callout: none;
}
.media-item { min-width: 0; }
.media-item img { width: 100%; }

/* ---------- 调香实验室 · 宥道专属 ---------- */
.lab-body .main { max-width: 1180px; }
.lab-body .topbar { margin-bottom: 18px; }
.lab-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 20px; padding: 28px 30px;
  background:
    radial-gradient(circle at 78% 22%, rgba(229,199,155,.35), transparent 28%),
    radial-gradient(circle at 10% 100%, rgba(53,84,68,.10), transparent 35%),
    linear-gradient(135deg, #fffdf8 0%, #f4ecd9 100%);
  border-color: #d7c39d;
  box-shadow: 0 18px 46px rgba(64, 51, 31, .10);
}
.lab-hero:after {
  content: ""; position: absolute; right: -40px; bottom: -70px;
  width: 280px; height: 280px; border-radius: 50%;
  border: 1px solid rgba(176,122,58,.20);
  box-shadow: 0 0 0 26px rgba(176,122,58,.035), 0 0 0 52px rgba(176,122,58,.025);
  pointer-events: none;
}
.lab-hero-copy { position: relative; z-index: 1; }
.lab-hero-copy h2 {
  font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(34px, 4.6vw, 52px); line-height: 1.2;
  letter-spacing: .02em; margin: 4px 0 14px; color: #2f4b3c;
}
.lab-hero-copy p { max-width: 760px; color: #536455; font-size: 14px; line-height: 1.95; margin: 0 0 14px; }
.lab-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.lab-badges .tag { background: rgba(255,253,248,.7); }
.lab-sync-note {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed #cdb58d; background: rgba(255,253,248,.66);
  color: #5b4a31; font-size: 12.5px; line-height: 1.8;
}
.lab-sync-note b { color: #355444; }
.lab-hero-art {
  min-height: 330px; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.lab-hero-art svg { width: min(100%, 360px); height: auto; filter: drop-shadow(0 18px 24px rgba(80, 62, 34, .12)); }
.lab-station-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin: 18px 0 20px;
}
.lab-station {
  position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 10px;
  align-items: start; padding: 16px 15px 14px 15px; min-height: 132px;
  border: 1px solid #d9ccb9; border-radius: 16px; background: rgba(255,253,248,.72);
  color: var(--ink); box-shadow: 0 8px 22px rgba(50,42,30,.05);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.lab-station:hover { transform: translateY(-2px); border-color: #bfa172; box-shadow: 0 14px 28px rgba(50,42,30,.09); color: var(--ink); }
.lab-station-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: #eef3ea; color: #355444; border: 1px solid #d7e2d5;
}
.lab-station-icon svg { width: 24px; height: 24px; }
.lab-station-icon { grid-row: 1 / span 2; }
.lab-station strong { grid-column: 2; display: block; font-size: 16px; line-height: 1.3; margin-top: 2px; }
.lab-station small { grid-column: 2; display: block; color: var(--ink-soft); font-size: 12px; line-height: 1.65; margin-top: 4px; }
.lab-station-arrow { position: absolute; right: 14px; bottom: 10px; color: #a47a44; font-size: 11px; letter-spacing: .06em; }
.lab-main-grid { align-items: start; }
.lab-panel { scroll-margin-top: 20px; }
.lab-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.lab-panel-head h2 { margin: 2px 0 0; }
.lab-form { display: grid; gap: 10px; margin-top: 14px; }
.lab-form .field { margin: 0; }
.lab-form .field label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; letter-spacing: .02em; }
.lab-form input, .lab-form select, .lab-form textarea { width: 100%; }
.lab-form textarea { min-height: 76px; }
.lab-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lab-readonly {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 11px;
  border: 1px dashed #cdb58d; background: #fbf6ea; color: #6b5a3e;
  font-size: 12.5px; line-height: 1.75;
}
.lab-flow-mini {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-soft);
  color: var(--ink-soft); font-size: 11px; letter-spacing: .02em;
}
.lab-flow-mini i { color: #b07a3a; font-style: normal; }
.lab-formula-card {
  margin-top: 14px; padding: 16px 16px 14px; border-radius: 14px;
  border: 1px solid #d8c8ae; background: #fffdf8;
}
.lab-formula-card.locked { background: #f6f1e6; border-style: dashed; opacity: .82; }
.lab-formula-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lab-formula-head h3 { margin: 2px 0 0; font-size: 18px; }
.lab-formula-details, .lab-run-details { margin-top: 10px; }
.lab-formula-details summary, .lab-run-details summary {
  cursor: pointer; color: #355444; font-size: 12px; list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.lab-formula-details summary:before, .lab-run-details summary:before {
  content: "+"; width: 16px; height: 16px; border-radius: 50%;
  display: inline-grid; place-items: center; background: #eaf0e5; color: #355444;
  font-size: 12px; line-height: 1;
}
.lab-formula-details[open] summary:before, .lab-run-details[open] summary:before { content: "−"; }
.lab-table-wrap { max-height: 360px; overflow: auto; margin-top: 10px; border: 1px solid var(--line-soft); border-radius: 10px; }
.lab-formula-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fffdf8; }
.lab-formula-table th, .lab-formula-table td { padding: 7px 9px; border-bottom: 1px solid #eee5d7; text-align: left; white-space: nowrap; }
.lab-formula-table th { position: sticky; top: 0; background: #f2eadb; color: #5d4d36; font-weight: 600; z-index: 1; }
.lab-formula-table td:nth-child(3), .lab-formula-table td:nth-child(4), .lab-formula-table td:nth-child(5),
.lab-formula-table th:nth-child(3), .lab-formula-table th:nth-child(4), .lab-formula-table th:nth-child(5) { text-align: right; }
.lab-formula-table tr:last-child td { border-bottom: 0; }
.lab-locked-line { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #f5eddc; color: #7a6546; font-size: 12px; }
.lab-locked-line span { margin-right: 4px; }
.lab-records { margin-top: 20px; }
.lab-run-list { display: grid; gap: 10px; margin-top: 12px; }
.lab-run { padding: 13px 15px; border: 1px solid var(--line-soft); border-radius: 13px; background: #fffdf8; }
.lab-run-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.lab-run-head strong { margin-left: 8px; font-size: 14px; }
.lab-run-summary { margin: 8px 0 0; color: #4f5f54; font-size: 13px; line-height: 1.75; }
.lab-run-note { margin-top: 8px; padding-left: 11px; border-left: 2px solid #e2c69c; color: #6d5a3d; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; }
.lab-locked {
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  background: linear-gradient(135deg, #2d4a3b, #20372b); color: #f0e7d6;
  border-color: #20372b; overflow: hidden;
}
.lab-locked-copy h2 { color: #fff8e9; }
.lab-locked-copy p { color: #d8cfbe; margin-bottom: 0; max-width: 700px; }
.lab-locked-copy .kicker { color: #d6bd93; }
.lab-locked-badge {
  flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(229,199,155,.35);
  border-radius: 999px; color: #e5c79b; font-size: 11px; letter-spacing: .12em;
}
@media (max-width: 1060px) {
  .lab-station-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .lab-hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .lab-hero-art { min-height: 220px; order: -1; }
  .lab-hero-art svg { width: min(100%, 250px); }
  .lab-main-grid { grid-template-columns: 1fr; }
  .lab-station-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .lab-station-strip { grid-template-columns: 1fr; }
  .lab-three { grid-template-columns: 1fr; }
  .lab-hero-copy h2 { font-size: 34px; }
  .lab-locked { align-items: flex-start; flex-direction: column; }
  .lab-station { min-height: 110px; }
  .lab-run-head { flex-direction: column; gap: 3px; }
  .lab-run-head > div { display: block; }
  .lab-run-head strong { display: block; margin: 6px 0 0 0; line-height: 1.45; }
  .lab-run-head .tiny { align-self: flex-end; }
}
/* ===== 基地游乐场：飞行棋 ===== */
.hidden { display: none !important; }

.playland {
  background:
    radial-gradient(circle at 12% 4%, rgba(176,122,58,.10), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(53,84,68,.10), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(176,122,58,.06), transparent 32%),
    var(--paper);
}

.play-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 22px;
  align-items: center;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255,253,248,.94), rgba(239,230,214,.72)),
    var(--paper-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.play-hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(53,84,68,.10) .7px, transparent .8px);
  background-size: 9px 9px;
  opacity: .45; pointer-events: none;
}
.play-hero-copy { position: relative; z-index: 1; }
.play-hero-copy h2 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.play-hero-copy p { margin: 0; max-width: 620px; color: var(--ink-soft); line-height: 1.8; font-size: 14px; }
.play-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.play-entry { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.play-join-form { display: flex; gap: 8px; flex-wrap: wrap; }
.play-join-form input {
  min-width: 168px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--white); color: var(--ink);
  font: inherit; font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
}
.play-join-form input:focus { outline: none; border-color: var(--moss-3); box-shadow: 0 0 0 3px rgba(79,114,93,.12); }
.play-hero-art { position: relative; z-index: 1; display: flex; justify-content: center; }
.play-mini-ring {
  position: relative;
  width: min(100%, 258px);
  aspect-ratio: 1;
  border: 2px dashed rgba(53,84,68,.35);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fffdf8 0 44%, rgba(255,253,248,.55) 45% 100%);
  box-shadow: inset 0 0 0 12px rgba(53,84,68,.04), 0 16px 32px rgba(50,42,30,.08);
}
.play-mini-ring .mini-token {
  position: absolute; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 6px 12px rgba(50,42,30,.18);
}
.play-mini-ring .mini-token.seat-1 { background: #355444; top: -2px; left: 50%; transform: translateX(-50%); }
.play-mini-ring .mini-token.seat-2 { background: #b07a3a; right: 0; top: 52%; transform: translateY(-50%); }
.play-mini-ring .mini-token.seat-3 { background: #7a6a8e; bottom: 0; left: 50%; transform: translateX(-50%); }
.play-mini-ring .mini-token.seat-4 { background: #8a5a4a; left: 0; top: 52%; transform: translateY(-50%); }
.play-mini-ring .mini-dice {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 62px; height: 62px; border-radius: 14px;
  background: var(--moss); color: #fff; display: grid; place-items: center;
  font-size: 30px; font-weight: 700;
  box-shadow: 0 10px 22px rgba(40,67,53,.28);
  border: 3px solid #fffdf8;
}
.play-guide { margin-bottom: 2px; }
.play-code-note {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: rgba(53,84,68,.06); border: 1px solid var(--line-soft);
}
.play-code-note span { font-size: 10px; letter-spacing: .14em; color: var(--ink-soft); text-transform: uppercase; }
.play-code-note b { font-size: 20px; letter-spacing: .08em; color: var(--moss); }
.play-code-note small { color: var(--ink-soft); font-size: 12px; line-height: 1.6; }

.play-rooms { background: rgba(255,253,248,.84); }
.play-room-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.play-room-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--white); color: var(--ink); text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.play-room-card:hover { border-color: var(--moss-3); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(50,42,30,.07); }
.play-room-code {
  flex: 0 0 auto; min-width: 76px; padding: 7px 8px; border-radius: 8px;
  background: var(--moss); color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums;
}
.play-room-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.play-room-main strong { font-size: 14px; }
.play-room-main span { color: var(--ink-soft); font-size: 12px; }
.play-room-arrow { color: var(--ink-soft); font-size: 18px; padding: 0 2px; }

.play-room-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 14px;
}
.play-room-code-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,253,248,.78);
}
.play-room-code-badge span { font-size: 9px; letter-spacing: .16em; color: var(--ink-soft); }
.play-room-code-badge b { color: var(--moss); letter-spacing: .14em; font-size: 17px; font-variant-numeric: tabular-nums; }
.play-room-count { color: var(--ink-soft); font-size: 12px; }

.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.play-board-card {
  padding: 12px; border: 1px solid var(--line); border-radius: 20px;
  background: rgba(255,253,248,.88); box-shadow: var(--shadow);
}
.play-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  aspect-ratio: 1;
}
.play-tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
  gap: 1px; padding: 4px 5px; min-width: 0; min-height: 0;
  border: 1px solid var(--line-soft); border-radius: 8px;
  background: #fdf9ef; overflow: hidden;
}
.play-tile-no { font-size: 8px; line-height: 1; color: rgba(37,53,44,.45); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.play-tile-label { font-size: clamp(9px, 1.05vw, 12px); line-height: 1.1; font-weight: 600; color: var(--moss); }
.play-tile-sub { font-size: 8px; line-height: 1; color: var(--ink-soft); }
.play-tile.plain .play-tile-label { color: var(--ink-soft); font-weight: 400; }
.play-tile.base { background: var(--moss); border-color: var(--moss-2); }
.play-tile.base .play-tile-no { color: rgba(255,255,255,.5); }
.play-tile.base .play-tile-label { color: #fffdf8; font-size: clamp(10px, 1.2vw, 14px); }
.play-tile.base .play-tile-sub { color: rgba(255,253,248,.75); }
.play-tile.boost { background: #eef3e2; border-color: #d5dfc2; }
.play-tile.hazard { background: #f7e9db; border-color: #e7cfb5; }
.play-tile.hazard .play-tile-label { color: #92563b; }
.play-tokens {
  position: absolute; left: 3px; right: 3px; bottom: 3px;
  display: flex; flex-wrap: wrap; gap: 2px; align-items: flex-end;
}
.play-token {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 9px; line-height: 1; font-weight: 700;
  border: 1.5px solid rgba(255,255,255,.88);
  box-shadow: 0 2px 4px rgba(50,42,30,.18);
}
.play-token.seat-1 { background: #355444; }
.play-token.seat-2 { background: #b07a3a; }
.play-token.seat-3 { background: #7a6a8e; }
.play-token.seat-4 { background: #8a5a4a; }

.play-center {
  grid-area: 2 / 2 / 7 / 7;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 16px; text-align: center;
  border: 1px solid var(--line); border-radius: 14px;
  background:
    radial-gradient(circle at 50% 34%, rgba(176,122,58,.13), transparent 40%),
    linear-gradient(145deg, #fffdf8, #f1e8d8);
  overflow: hidden;
}
.play-center-kicker { font-size: 8px; letter-spacing: .18em; color: var(--ink-soft); }
.play-center h2 { margin: 0; font-size: clamp(17px, 2.1vw, 26px); line-height: 1.15; color: var(--moss); }
.play-dice {
  width: clamp(52px, 7vw, 78px); height: clamp(52px, 7vw, 78px);
  border: 2px solid rgba(255,253,248,.9); border-radius: 16px;
  background: var(--moss); color: #fffdf8;
  font: inherit; font-size: clamp(22px, 3vw, 34px); font-weight: 700;
  box-shadow: 0 10px 24px rgba(40,67,53,.26), inset 0 1px 0 rgba(255,255,255,.25);
  cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.play-dice:hover:not(:disabled) { background: var(--moss-2); transform: translateY(-2px) rotate(-2deg); }
.play-dice:active:not(:disabled) { transform: translateY(0) scale(.97); }
.play-dice:disabled { background: #9aa69a; box-shadow: none; cursor: default; color: rgba(255,255,255,.65); }
.play-dice.rolling { animation: play-dice-roll .5s ease; }
@keyframes play-dice-roll {
  0% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-14deg) scale(1.08); }
  50% { transform: rotate(12deg) scale(1.04); }
  75% { transform: rotate(-6deg) scale(1.02); }
  100% { transform: rotate(0) scale(1); }
}
.play-turn-label { font-size: 12px; color: var(--ink-soft); line-height: 1.5; min-height: 18px; }
.play-winner-banner {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  margin-top: 4px; padding: 8px 16px; border-radius: 10px;
  background: rgba(176,122,58,.14); border: 1px solid #e2c69c;
}
.play-winner-banner span { font-size: 8px; letter-spacing: .2em; color: #8b5c24; }
.play-winner-banner strong { font-size: 15px; color: #8b5c24; }
.play-winner-banner small { font-size: 10px; color: var(--ink-soft); }

.play-side { display: flex; flex-direction: column; }
.play-panel { background: rgba(255,253,248,.88); }
.play-player-list { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 12px; }
.play-player {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--white);
}
.play-player.on { border-color: var(--moss-3); background: rgba(53,84,68,.05); box-shadow: inset 3px 0 0 var(--moss-3); }
.play-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.play-dot.seat-1, .play-dot.seat-1 { background: #355444; }
.play-dot.seat-2 { background: #b07a3a; }
.play-dot.seat-3 { background: #7a6a8e; }
.play-dot.seat-4 { background: #8a5a4a; }
.play-player-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.play-player-main b { font-size: 13px; line-height: 1.3; }
.play-player-main small { font-size: 10px; color: var(--ink-soft); }
.play-progress { font-size: 12px; font-weight: 700; color: var(--moss); font-variant-numeric: tabular-nums; }
.play-room-actions { margin-top: 10px; }
.play-room-actions form { margin: 0; }
.play-room-actions .btn { width: 100%; }
.play-room-actions .btn:disabled {
  background: #a7b0a5; color: rgba(255,255,255,.72); cursor: default;
  transform: none; box-shadow: none;
}
.play-room-actions .tiny { margin: 8px 0 0; text-align: center; line-height: 1.7; }

.play-log-card { background: rgba(255,253,248,.78); }
.play-log-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 360px; overflow: auto; }
.play-log-item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 7px;
  padding: 6px 0; border-bottom: 1px dashed var(--line-soft);
  font-size: 12px; line-height: 1.6;
}
.play-log-item:last-child { border-bottom: none; }
.play-log-item time { color: rgba(37,53,44,.45); font-size: 10px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.play-log-item span { color: var(--ink-soft); overflow-wrap: anywhere; }
.play-log-item.win span { color: #8b5c24; font-weight: 600; }

.play-join-card { max-width: 640px; margin: 0 auto; background: rgba(255,253,248,.9); }
.play-seat-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.play-seat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line-soft); border-radius: 99px;
  background: var(--white); font-size: 12px;
}

@media (max-width: 980px) {
  .play-layout { grid-template-columns: 1fr; }
  .play-side { order: 2; }
  .play-board-card { max-width: 720px; width: 100%; margin: 0 auto; }
  .play-hero { grid-template-columns: 1fr; }
  .play-hero-art { order: -1; }
  .play-mini-ring { width: min(100%, 210px); }
}
@media (max-width: 640px) {
  .play-hero { padding: 18px; border-radius: 18px; }
  .play-hero-copy h2 { font-size: 25px; }
  .play-hero-copy p { font-size: 13px; }
  .play-entry { flex-direction: column; align-items: stretch; }
  .play-entry form, .play-entry .btn { width: 100%; }
  .play-join-form { flex-direction: column; }
  .play-join-form input { min-width: 0; width: 100%; }
  .play-room-card { align-items: flex-start; flex-wrap: wrap; }
  .play-room-code { min-width: 66px; font-size: 13px; }
  .play-room-main { flex: 1 1 100%; order: 3; }
  .play-room-arrow { display: none; }
  .play-board-card { padding: 7px; border-radius: 14px; }
  .play-board { gap: 3px; }
  .play-tile { padding: 2px 3px; border-radius: 5px; }
  .play-tile-no { font-size: 6px; }
  .play-tile-label { font-size: 8px; }
  .play-tile-sub { font-size: 6px; }
  .play-token { width: 14px; height: 14px; font-size: 8px; border-width: 1px; }
  .play-center { gap: 4px; padding: 6px; border-radius: 8px; }
  .play-center-kicker, .play-center h2 { display: none; }
  .play-dice { width: 46px; height: 46px; border-radius: 11px; font-size: 20px; }
  .play-turn-label { font-size: 10px; }
  .play-winner-banner { padding: 5px 8px; }
  .play-winner-banner strong { font-size: 12px; }
  .play-room-head { align-items: flex-start; }
  .play-room-code-badge { width: 100%; justify-content: space-between; }
}

/* ---------- 调香工坊 · 小游戏 ---------- */
.lab-cta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 12px;
}
.lab-cta span { color: #746448; font-size: 12px; }
.game-layout {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: 18px; align-items: start;
}
.game-panel { padding: 22px 24px; }
.game-control { background: linear-gradient(150deg, #fffdf8, #f4ecd9); }
.game-showcase { background: linear-gradient(155deg, #f6f1e4, #ebe1cc); }
.game-step { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.game-step > span {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #355444; color: #f6ead3; font-size: 13px; flex: 0 0 auto;
}
.game-step h2 { margin: 0; font-size: 23px; }
.game-step .tag { margin-left: auto; }
.game-form { display: grid; gap: 10px; margin-top: 14px; }
.game-form .field label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; }
.game-config-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 9px; }
.game-config-grid select { font-size: 12.5px; }
.game-params { min-height: 162px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.65; }
.game-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.game-format { margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); color: #7a6b51; font-size: 11.5px; line-height: 1.8; }
.game-format code { background: #f1e7d4; padding: 1px 4px; border-radius: 4px; color: #5f4a2e; }
.game-error {
  margin: 10px 0 0; padding: 10px 13px; border-radius: 10px;
  border: 1px solid #d8b1a4; background: #f7e7e1; color: #8e453b; font-size: 12.5px;
}
.game-product { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 330px; animation: gameIn .45s ease both; }
@keyframes gameIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.game-bottle { position: relative; width: 190px; height: 320px; flex: 0 0 auto; filter: drop-shadow(0 18px 24px rgba(69, 52, 29, .18)); }
.game-bottle-cap {
  position: absolute; left: 76px; top: 4px; width: 38px; height: 34px;
  border-radius: 9px 9px 4px 4px; background: linear-gradient(#786648, #3f3424);
  border: 1px solid #5f4e35; box-shadow: inset 0 1px rgba(255,255,255,.25);
}
.game-bottle-neck {
  position: absolute; left: 86px; top: 35px; width: 18px; height: 38px;
  border-radius: 4px; background: linear-gradient(90deg, #efe4cd, #c8b58e);
  border: 1px solid #ab9670;
}
.game-bottle-body {
  position: absolute; left: 10px; top: 68px; width: 170px; height: 238px;
  border-radius: 30px 30px 42px 42px;
  background: linear-gradient(120deg, rgba(255,253,248,.95), rgba(225,211,184,.62));
  border: 1px solid #a9936b; overflow: hidden;
  box-shadow: inset 6px 0 14px rgba(255,255,255,.5), inset -10px 0 18px rgba(120, 101, 70, .15);
}
.game-bottle-liquid {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  background: linear-gradient(180deg, var(--juice), color-mix(in srgb, var(--juice) 78%, #542d12));
  opacity: .9;
}
.game-bottle-liquid:after {
  content: ""; position: absolute; left: 18px; right: 18px; top: 8px; height: 2px;
  background: rgba(255,255,255,.45); border-radius: 50%;
}
.game-bottle-label {
  position: absolute; left: 22px; right: 22px; top: 76px;
  min-height: 94px; padding: 12px 11px 10px; text-align: center;
  background: #fbf3df; border: 1px solid #c4ab7d; border-radius: 4px;
  box-shadow: 0 4px 10px rgba(80, 63, 35, .12);
  color: #3f3524;
}
.game-bottle-label small { display: block; font-size: 7.5px; letter-spacing: .05em; color: #8e7750; line-height: 1.5; }
.game-bottle-label b { display: block; font-family: Georgia, "Songti SC", serif; font-size: 19px; line-height: 1.3; margin: 6px 0 4px; }
.game-bottle-label span { display: block; font-size: 9px; color: #766244; letter-spacing: .08em; }
.game-product-meta { display: grid; gap: 15px; min-width: 100px; }
.game-grade {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  font-family: Georgia, "Songti SC", serif; font-size: 62px; line-height: 1;
  color: #355444; background: #f7eedb; border: 2px solid #c4aa7b;
  box-shadow: inset 0 0 0 6px #f1e3c6;
}
.game-score { display: grid; text-align: center; }
.game-score b { font-size: 26px; color: #355444; line-height: 1.2; }
.game-score span { font-size: 11px; color: #86765b; }
.game-dominant { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6d5c42; }
.game-color-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.game-story { margin-top: 10px; padding: 12px 14px; border-left: 3px solid #b07a3a; background: rgba(255,253,248,.62); color: #5a4c37; font-size: 13px; line-height: 1.85; }
.game-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.game-stat-grid > div { padding: 8px 9px; border: 1px solid #d9c8ab; border-radius: 9px; background: rgba(255,253,248,.7); text-align: center; }
.game-stat-grid b { display: block; color: #355444; font-size: 18px; line-height: 1.25; }
.game-stat-grid span { display: block; color: #82725a; font-size: 10px; margin-top: 2px; }
.game-batch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.game-batch span { padding: 4px 7px; border-radius: 6px; background: #eee3cf; color: #6d5b41; font-size: 10.5px; }
.game-empty-bottle { display: grid; place-items: center; gap: 12px; min-height: 370px; text-align: center; color: #857257; font-size: 12px; line-height: 1.8; }
.game-empty-bottle .game-bottle { opacity: .55; }
.game-formula-panel { margin-top: 18px; }
.game-layer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 12px 0 4px; }
.game-layer { padding: 10px 12px; border-radius: 10px; color: #fffdf6; }
.game-layer b { display: block; font-size: 13px; }
.game-layer span { font-size: 20px; font-family: Georgia, serif; }
.game-layer.top { background: linear-gradient(135deg, #c6a24f, #a97d33); }
.game-layer.heart { background: linear-gradient(135deg, #b56f7d, #8e4f5f); }
.game-layer.base { background: linear-gradient(135deg, #6c795a, #45563e); }
.game-table-wrap { max-height: 420px; }
.game-shelf { margin-top: 18px; }
.game-shelf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.game-shelf-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px;
  border: 1px solid #d8c8ae; border-radius: 12px; background: #fffdf8; color: var(--ink);
}
.game-shelf-card:hover { color: var(--ink); border-color: #bd9f6b; background: #fffaf0; }
.game-shelf-card strong { display: block; font-size: 13px; }
.game-shelf-card small { display: block; color: #857257; font-size: 10.5px; margin-top: 2px; }
.mini-bottle {
  width: 30px; height: 62px; flex: 0 0 auto; position: relative;
  border-radius: 8px 8px 12px 12px; border: 1px solid #a9936b;
  background: linear-gradient(120deg, rgba(255,253,248,.9), rgba(225,211,184,.55));
  overflow: hidden;
}
.mini-bottle span { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: var(--juice); opacity: .8; }
.mini-bottle:before { content: ""; position: absolute; left: 10px; top: -7px; width: 8px; height: 9px; border-radius: 2px; background: #4e402b; }
@media (max-width: 900px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-product { min-height: 0; padding: 18px 0 8px; }
  .game-shelf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .game-panel { padding: 18px 16px; }
  .game-config-grid { grid-template-columns: 1fr 1fr; }
  .game-stat-grid { grid-template-columns: 1fr 1fr; }
  .game-shelf-grid { grid-template-columns: 1fr; }
  .game-product { flex-direction: column; gap: 12px; }
  .game-product-meta { grid-template-columns: repeat(3, auto); align-items: center; display: flex; }
  .game-grade { width: 62px; height: 62px; font-size: 42px; }
  .game-bottle { width: 170px; height: 286px; transform: scale(.92); transform-origin: center; }
  .game-bottle-cap { left: 66px; }
  .game-bottle-neck { left: 76px; }
  .game-bottle-body { left: 8px; width: 154px; height: 214px; }
  .game-layer-row { grid-template-columns: 1fr; }
}

/* ---------- 卡片实验室 · 调香/蒸馏模拟 ---------- */
.sim-body .main { max-width: 1180px; }
.sim-body .topbar { margin-bottom: 18px; }
.sim-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.sim-panel-head h2 { margin: 2px 0 0; }

.sim-lab-hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr); gap: 22px;
  padding: 28px; margin-bottom: 18px; border-radius: 24px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 88% 12%, rgba(176,122,58,.14), transparent 28%), linear-gradient(120deg, #fffdf8, #f0e7d7);
}
.sim-lab-hero h2 { font-size: clamp(28px, 3.5vw, 42px); line-height: 1.12; margin: 8px 0 10px; letter-spacing: -.03em; }
.sim-lab-hero p { color: #536455; font-size: 14px; line-height: 1.85; margin: 0 0 14px; max-width: 680px; }
.sim-lab-hero-mark { position: relative; min-height: 210px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: end; }
.sim-lab-hero-mark span { display: grid; place-items: center; border: 1px solid #d8c6a7; border-radius: 18px; background: rgba(255,253,248,.62); color: #8a6b43; font-family: Georgia, serif; font-size: 26px; min-height: 92px; }
.sim-lab-hero-mark span:nth-child(2) { transform: translateY(-14px); }
.sim-lab-hero-mark span:nth-child(3) { transform: translateY(8px); }
.sim-lab-hero-mark span:nth-child(4) { transform: translateY(-6px); }

.sim-lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.sim-lab-card { padding: 20px; display: flex; flex-direction: column; min-height: 340px; border-radius: 20px; }
.sim-lab-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sim-lab-card h2 { margin: 2px 0 0; font-size: 22px; }
.sim-lab-card > p { min-height: 42px; margin: 8px 0 12px; }
.sim-card-btn { align-self: flex-start; margin-top: auto; }
.sim-lab-hint { color: #7b684d; font-size: 12px; line-height: 1.6; margin-top: auto; }
.sim-link-card { text-decoration: none; color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s; }
.sim-link-card:hover { transform: translateY(-3px); border-color: #bfa172; box-shadow: 0 16px 30px rgba(50,42,30,.10); }
.sim-link-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid #eee4d5; }
.sim-link-line b { font-size: 12px; color: #6d5a40; }
.sim-link-line span { color: #a46f32; font-weight: 700; font-size: 13px; white-space: nowrap; }
.sim-link-visual { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 120px; margin: 6px 0 10px; background: #fbf5e9; border-radius: 14px; overflow: hidden; }
.sim-bottle-visual { position: relative; }
.mini-bottle-shape { width: 46px; height: 76px; border-radius: 10px 10px 14px 14px; border: 1px solid #8f7958; background: linear-gradient(#f5ead2, #d4a56a); position: relative; display: block; }
.mini-bottle-shape:before { content: ""; position: absolute; left: 15px; top: -12px; width: 16px; height: 12px; background: #7d6645; border-radius: 4px 4px 0 0; }
.mini-bottle-shape i { position: absolute; inset: 34% 0 0; background: #cf7e88; opacity: .8; border-radius: 0 0 14px 14px; }
.mini-star { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #c8aa78; background: #fff8e9; color: #8f6130; font-family: Georgia, serif; font-size: 22px; }
.mini-flask { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #9b8766; background: linear-gradient(#f6eedc, #d9b16f); }
.mini-tube { width: 42px; height: 4px; background: #b39a72; }
.mini-receiver { width: 36px; height: 52px; border-radius: 6px 6px 12px 12px; border: 1px solid #9b8766; background: linear-gradient(#f8f2e5 52%, #c58b43 52%); }
.sim-distill-visual i { width: 8px; height: 8px; border-radius: 50%; background: #c9994b; opacity: .7; }
.sim-bottle-card { display: flex; flex-direction: column; }

.smell-paper { position: relative; flex: 1; min-height: 120px; margin: 2px 0 12px; border-radius: 10px; background: linear-gradient(100deg, #fffdf4, #f3e7cf 70%, #e7d2ad); border: 1px solid #d7c39e; box-shadow: 0 8px 16px rgba(90,70,40,.08); padding: 18px 18px 14px; overflow: hidden; }
.smell-paper:before { content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; width: 6px; background: #b07a3a; opacity: .45; }
.smell-paper-line { display: block; width: 50px; height: 1px; background: #cbb68e; margin-bottom: 14px; }
.smell-paper-copy small { display: block; color: #8a7658; font-size: 11px; letter-spacing: .13em; }
.smell-paper-copy strong { display: block; font-family: Georgia, "Songti SC", serif; font-size: 28px; margin: 5px 0 6px; color: #45392b; }
.smell-paper-copy em { color: #7b684d; font-size: 13px; font-style: normal; }
.smell-paper-number { position: absolute; right: 16px; bottom: 12px; font-family: Georgia, serif; color: #b0915f; font-size: 24px; }
.smell-timeline { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9a8465; font-size: 11px; margin: 0 0 10px; }
.smell-timeline i { flex: 1; height: 1px; background: #dfd2bc; }
.tower-stack { display: grid; gap: 7px; margin: 4px 0 10px; }
.tower-layer { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; border: 1px solid #dfceb1; border-radius: 12px; padding: 10px 14px; cursor: pointer; color: #45392b; transition: transform .15s, border-color .15s; }
.tower-layer:hover { transform: translateX(3px); border-color: #b98c53; }
.tower-layer small { grid-column: 1; font-size: 10px; letter-spacing: .1em; color: #887352; }
.tower-layer strong { grid-column: 1; font-size: 19px; font-family: Georgia, "Songti SC", serif; }
.tower-layer span { grid-column: 2; grid-row: 1 / span 2; font-size: 10px; color: #9a8465; }
.tower-top { background: #f5dfae; width: 78%; }
.tower-heart { background: #f0c0c8; width: 89%; }
.tower-base { background: #cdbfa1; width: 100%; }
.sim-records { margin-top: 2px; }
.sim-record-list { display: grid; gap: 10px; margin-top: 10px; }
.sim-record { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid #eee4d5; border-radius: 12px; background: #fffdf8; }
.sim-record strong { font-size: 14px; }
.sim-record small { color: #9a8465; font-size: 11px; }
.sim-record p { grid-column: 1 / -1; margin: 2px 0 0; color: #5d6d5a; font-size: 12px; line-height: 1.6; }
.sim-record em { grid-column: 1 / -1; color: #8a7658; font-size: 12px; font-style: normal; }

/* 调香工坊 */
.sim-error { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #e3b7a7; border-radius: 12px; background: #fff4ef; color: #9a4b35; font-size: 13px; line-height: 1.6; }
.sim-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; align-items: start; min-width: 0; }
.sim-workbench { padding: 22px; border-radius: 20px; min-width: 0; }
.sim-aside { position: sticky; top: 16px; display: grid; gap: 14px; }
.sim-step { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sim-step > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #355444; color: #fff8e8; font-family: Georgia, serif; font-size: 16px; flex: 0 0 auto; }
.sim-step h2 { margin: 2px 0 0; }
.sim-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #eee4d5; }
.sim-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.sim-section-head h3 { margin: 0; font-size: 17px; }
.sim-section-head span { color: #9a8465; font-size: 11px; }
.sim-option-grid { display: grid; gap: 9px; }
.sim-target-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sim-config-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sim-option { position: relative; display: flex; flex-direction: column; gap: 3px; border: 1px solid #e3d6c2; border-radius: 13px; background: #fffdf8; padding: 12px 13px; cursor: pointer; color: #4e4638; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.sim-option input { position: absolute; opacity: 0; pointer-events: none; }
.sim-option:hover { border-color: #bfa172; transform: translateY(-1px); }
.sim-option.is-checked, .sim-option:has(input:checked) { border-color: var(--accent, #b07a3a); background: #fffaf0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #b07a3a) 22%, transparent); }
.sim-option-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent, #b07a3a); margin-bottom: 3px; }
.sim-option strong { font-size: 15px; line-height: 1.35; }
.sim-option small { color: #8a7658; font-size: 11px; line-height: 1.5; }
.sim-option em { color: #9b8465; font-size: 10px; font-style: normal; line-height: 1.45; }
.sim-mini-option { padding: 10px 12px; }
.sim-mini-option strong { font-size: 17px; font-family: Georgia, serif; }
.sim-mini-option small { font-size: 10px; }
.sim-family-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.sim-family-chip { border: 1px solid #e4d8c6; border-radius: 999px; background: #fffdf8; color: #7b684d; padding: 6px 12px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.sim-family-chip.is-active { background: #355444; border-color: #355444; color: #fff8e8; }
.sim-ingredient-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px 4px 4px 2px; }
.sim-ingredient { position: relative; min-height: 92px; text-align: left; display: flex; flex-direction: column; gap: 2px; border: 1px solid #e3d6c2; border-radius: 12px; background: #fffdf8; padding: 11px 11px 10px; cursor: pointer; color: #4e4638; transition: border-color .15s, background .15s, transform .15s; }
.sim-ingredient:hover { border-color: #bfa172; transform: translateY(-1px); }
.sim-ingredient.is-selected { border-color: #b07a3a; background: #fff6e6; box-shadow: 0 0 0 2px rgba(176,122,58,.15); }
.sim-ingredient-dot { width: 9px; height: 9px; border-radius: 50%; margin-bottom: 3px; }
.sim-ingredient strong { font-size: 14px; line-height: 1.3; }
.sim-ingredient small { color: #8a7658; font-size: 10px; }
.sim-ingredient em { color: #9b8465; font-size: 10px; font-style: normal; line-height: 1.4; margin-top: 2px; }
.sim-add { position: absolute; right: 9px; top: 9px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #f0e5d2; color: #8b5d2c; font-size: 14px; line-height: 1; }
.sim-ingredient.is-selected .sim-add { background: #355444; color: #fff8e8; }
.sim-tray { margin-top: 16px; border: 1px dashed #d8c6a7; border-radius: 14px; padding: 12px 14px; background: #fffbf2; }
.sim-tray-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sim-tray-head strong { font-size: 14px; }
.sim-tray-head span { color: #7b684d; font-size: 12px; }
.sim-tray-head b { color: #8f5b26; font-family: Georgia, serif; font-size: 16px; }
.sim-tray-empty { color: #a18a70; font-size: 12px; line-height: 1.6; }
.sim-tray-rows { display: grid; gap: 6px; }
.sim-tray-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 30px 54px 16px 30px 24px; gap: 6px; align-items: center; padding: 7px 8px; background: #fffdf8; border: 1px solid #eee4d5; border-radius: 10px; }
.sim-tray-dot { width: 9px; height: 9px; border-radius: 50%; }
.sim-tray-name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sim-tray-name strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-tray-name small { font-size: 10px; color: #9a8465; }
.sim-step-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #ddceb7; background: #fffaf0; color: #6d512e; font-size: 16px; line-height: 1; cursor: pointer; }
.sim-step-btn:hover { background: #f3e8d6; }
.sim-gram-input { width: 54px; border: 1px solid #ddceb7; border-radius: 7px; padding: 5px 4px; text-align: center; font-size: 12px; background: #fffdf8; }
.sim-gram-unit { color: #9a8465; font-size: 11px; }
.sim-remove { width: 24px; height: 24px; border: 0; background: transparent; color: #9a8465; font-size: 16px; cursor: pointer; }
.sim-remove:hover { color: #a34f38; }
.sim-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.sim-form-note { color: #9a8465; font-size: 11px; line-height: 1.6; margin-top: 10px; }
.sim-preview { padding: 18px; border-radius: 20px; text-align: center; }
.sim-bottle { position: relative; width: 150px; height: 228px; margin: 8px auto 10px; --juice: #b58a55; }
.sim-bottle-cap { position: absolute; left: 50%; top: 0; width: 26px; height: 22px; margin-left: -13px; border-radius: 6px 6px 3px 3px; background: linear-gradient(90deg, #5f4d35, #93744d); z-index: 2; }
.sim-bottle-neck { position: absolute; left: 50%; top: 20px; width: 22px; height: 30px; margin-left: -11px; background: linear-gradient(90deg, #ece1c9, #fbf5e8, #dfcfb2); border-left: 1px solid #cbb68e; border-right: 1px solid #cbb68e; z-index: 1; }
.sim-bottle-body { position: absolute; left: 7px; right: 7px; bottom: 0; top: 46px; border-radius: 34% 34% 14px 14px / 22% 22% 14px 14px; background: linear-gradient(105deg, rgba(255,255,255,.9), rgba(244,233,211,.8) 55%, rgba(216,196,160,.5)); border: 1px solid #cbb68e; overflow: hidden; box-shadow: 0 16px 26px rgba(80,60,30,.14); }
.sim-bottle-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, color-mix(in srgb, var(--juice) 72%, white), var(--juice)); opacity: .9; transition: height .25s, background .25s; }
.sim-bottle-label { position: absolute; left: 50%; top: 46%; width: 100px; margin-left: -50px; padding: 7px 6px 6px; background: #fffaf0; border: 1px solid #ded0b8; transform: translateY(-50%); box-shadow: 0 3px 7px rgba(70,50,20,.08); }
.sim-bottle-label small { display: block; font-size: 7px; letter-spacing: .03em; color: #8e7750; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-bottle-label b { display: block; font-family: Georgia, "Songti SC", serif; font-size: 13.5px; line-height: 1.25; margin: 3px 0 2px; color: #45392b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-bottle-label span { display: block; font-size: 9px; color: #8a7658; }
.sim-live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 8px; }
.sim-live-stats div { padding: 8px 4px; border: 1px solid #eee4d5; border-radius: 9px; background: #fffdf8; }
.sim-live-stats b { display: block; font-family: Georgia, serif; font-size: 16px; color: #5c4b35; }
.sim-live-stats span { font-size: 10px; color: #9a8465; }
.sim-live-note { color: #8a7658; font-size: 12px; line-height: 1.6; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee4d5; }
.sim-tip-card { padding: 16px 18px; border-radius: 18px; background: #f5efdf; }
.sim-tip-card p { margin: 4px 0 0; font-size: 12px; line-height: 1.75; color: #6c5a40; }

.sim-result-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); gap: 18px; align-items: stretch; margin-bottom: 18px; }
.sim-result-bottle-card { padding: 22px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #fff9ec, #f1e6d3); }
.sim-result-bottle { width: 100%; display: flex; justify-content: center; align-items: center; gap: 14px; }
.sim-result-bottle .sim-bottle { width: 170px; height: 252px; margin: 0; }
.sim-result-medal { display: flex; flex-direction: column; align-items: center; gap: 0; }
.sim-result-medal span { width: 58px; height: 58px; border-radius: 50%; border: 2px solid #c5a46e; background: #fff8e8; display: grid; place-items: center; font-family: Georgia, serif; font-size: 30px; color: #8f5b26; }
.sim-result-medal strong { font-family: Georgia, serif; font-size: 26px; color: #45392b; line-height: 1.1; }
.sim-result-medal small { color: #9a8465; font-size: 10px; }
.sim-result-target { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: #fffdf8; border: 1px solid #e5d7c1; font-size: 12px; color: #6d5a40; }
.sim-target-dot { width: 9px; height: 9px; border-radius: 50%; }
.sim-result-copy { padding: 22px; border-radius: 20px; }
.sim-result-copy h2 { margin: 4px 0 8px; font-size: clamp(24px, 2.8vw, 34px); }
.sim-result-verdict { color: #5f705d; font-size: 13px; line-height: 1.8; margin: 0 0 14px; }
.sim-result-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sim-result-stats div { padding: 9px 7px; border: 1px solid #eee4d5; border-radius: 9px; background: #fffdf8; text-align: center; }
.sim-result-stats b { display: block; font-family: Georgia, serif; font-size: 17px; color: #5c4b35; }
.sim-result-stats span { display: block; font-size: 10px; color: #9a8465; margin-top: 2px; }
.sim-batch { display: flex; flex-wrap: wrap; gap: 6px 12px; color: #9a8465; font-size: 11px; margin: 12px 0 16px; }
.sim-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-formula-panel { padding: 20px 22px; border-radius: 20px; margin-bottom: 18px; }
.sim-shelf { margin-bottom: 10px; }

/* 蒸馏台 */
.distill-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; align-items: start; }
.distill-material-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.distill-heat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.distill-time-grid, .sim-time-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.distill-material em { color: #9b8465; font-size: 10px; font-style: normal; line-height: 1.45; }
.sim-control-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px 76px 18px 34px; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid #eee4d5; border-radius: 11px; background: #fffdf8; margin-bottom: 8px; }
.sim-control-label { display: flex; flex-direction: column; gap: 2px; }
.sim-control-label strong { font-size: 13px; }
.sim-control-label small { color: #9a8465; font-size: 10px; }
.sim-control-row input { width: 76px; text-align: center; border: 1px solid #ddceb7; border-radius: 8px; padding: 7px 5px; background: #fffaf0; font-size: 14px; }
.distill-preview-card { padding: 18px; border-radius: 20px; }
.distill-stage { position: relative; height: 242px; margin: 4px 0 10px; border-radius: 16px; background: linear-gradient(180deg, #f8f2e4, #efe3cd); overflow: hidden; --juice: #8b8bb5; }
.distill-flask { position: absolute; left: 11%; bottom: 62px; width: 112px; height: 92px; border-radius: 46% 46% 40% 40%; border: 1px solid #b29a75; background: linear-gradient(110deg, rgba(255,255,255,.75), rgba(238,225,204,.55)); box-shadow: inset 8px 5px 12px rgba(255,255,255,.7); }
.distill-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 47%; border-radius: 0 0 40% 40%; background: linear-gradient(180deg, color-mix(in srgb, var(--juice) 65%, white), var(--juice)); opacity: .86; }
.distill-neck { position: absolute; left: 46%; bottom: 148px; width: 22px; height: 46px; background: linear-gradient(90deg, #efe5d1, #fffaf0, #dfcfb2); border-left: 1px solid #bda77f; border-right: 1px solid #bda77f; }
.distill-tube { position: absolute; left: 28%; bottom: 180px; width: 34%; height: 7px; border-radius: 7px; background: #c4ad86; }
.distill-condenser { position: absolute; left: 58%; top: 33px; width: 74px; height: 134px; border: 1px solid #b29a75; border-radius: 12px; background: rgba(255,250,240,.7); overflow: hidden; }
.distill-condenser i { display: block; height: 2px; background: #c4ad86; margin: 11px 8px; transform: rotate(-17deg); }
.distill-receiver { position: absolute; right: 5%; bottom: 42px; width: 84px; height: 104px; border: 1px solid #b29a75; border-radius: 8px 8px 14px 14px; background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(240,229,210,.6)); overflow: hidden; }
.distill-hydrosol { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(180deg, #e8ecdf, #d4d9c4); opacity: .82; }
.distill-oil { position: absolute; left: 0; right: 0; bottom: 37%; height: 8%; background: var(--juice); opacity: .82; }
.distill-drop { position: absolute; left: 47%; top: 8%; width: 7px; height: 7px; border-radius: 50%; background: var(--juice); animation: sim-drop 1.8s infinite; }
.distill-burner { position: absolute; left: 8%; bottom: 16px; width: 78px; height: 16px; border-radius: 50%; background: #b76e39; opacity: .5; }
.distill-burner span { position: absolute; left: 15px; bottom: 10px; width: 48px; height: 30px; border-radius: 50% 50% 30% 30%; background: linear-gradient(#e9ad4a, #c46d35); opacity: .8; filter: blur(2px); animation: sim-fire 1.2s infinite alternate; }
.distill-vapor { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.7); border: 1px solid rgba(180,160,125,.35); animation: sim-vapor 3s infinite; }
.distill-vapor.v1 { left: 29%; bottom: 160px; animation-delay: -.4s; }
.distill-vapor.v2 { left: 37%; bottom: 146px; animation-delay: -1.2s; }
.distill-vapor.v3 { left: 48%; bottom: 154px; animation-delay: -2s; }
.distill-stage.is-running .distill-vapor { animation-duration: 1.1s; }
.distill-label-label { position: absolute; right: 12px; bottom: 7px; color: #9a8465; font-size: 9px; letter-spacing: .08em; }
.distill-preview-meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.distill-preview-meta strong { font-family: Georgia, "Songti SC", serif; font-size: 20px; color: #45392b; }
.distill-preview-meta span { color: #9a8465; font-size: 11px; }
.distill-result-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr); gap: 18px; margin-bottom: 18px; }
.distill-result-stage-card { padding: 22px; border-radius: 20px; position: relative; }
.distill-stage-result { height: 300px; background: radial-gradient(circle at 45% 35%, #fff9ed, #efdfc4); }
.distill-result-medal { position: absolute; right: 22px; top: 22px; display: flex; flex-direction: column; align-items: center; }
.distill-result-medal span { width: 54px; height: 54px; border-radius: 50%; border: 1px solid #c5a46e; background: #fff8e8; display: grid; place-items: center; font-family: Georgia, serif; font-size: 27px; color: #8f5b26; }
.distill-result-medal strong { font-family: Georgia, serif; font-size: 24px; color: #45392b; }
.distill-result-medal small { color: #9a8465; font-size: 10px; }
.distill-result-copy { padding: 22px; border-radius: 20px; }
.distill-result-copy h2 { margin: 4px 0 8px; font-size: clamp(22px, 2.6vw, 32px); }
.distill-param-row { display: flex; flex-wrap: wrap; gap: 6px 12px; color: #8a7658; font-size: 11px; margin: 12px 0; }
.distill-lesson { display: grid; gap: 7px; padding: 12px 14px; border-radius: 12px; background: #f7f1e4; border: 1px solid #eee4d5; }
.distill-lesson p { margin: 0; font-size: 12px; line-height: 1.65; color: #6d5a40; }
.distill-lesson b { display: inline-block; width: 36px; color: #8f5b26; }
.distill-mini { width: 34px; height: 52px; border: 1px solid #b29a75; border-radius: 6px 6px 11px 11px; background: linear-gradient(180deg, #f8f2e5 55%, #dcd5c2 55%); position: relative; }
.distill-mini span { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: var(--juice); opacity: .65; }
.distill-mini span:after { content: ""; position: absolute; left: 0; right: 0; bottom: 70%; height: 4px; background: #fff8e8; opacity: .7; }

@keyframes sim-drop { 0% { transform: translateY(-4px); opacity: .3; } 60% { opacity: .8; } 100% { transform: translateY(90px); opacity: 0; } }
@keyframes sim-fire { from { transform: scaleY(.9); opacity: .55; } to { transform: scaleY(1.12); opacity: .9; } }
@keyframes sim-vapor { 0% { transform: translate(0, 0) scale(.7); opacity: .0; } 30% { opacity: .8; } 100% { transform: translate(58px, -40px) scale(1.3); opacity: 0; } }

@media (max-width: 980px) {
  .sim-lab-hero { grid-template-columns: 1fr; }
  .sim-lab-hero-mark { display: none; }
  .sim-lab-grid, .sim-layout, .distill-layout, .sim-result-layout, .distill-result-layout { grid-template-columns: minmax(0, 1fr); }
  .sim-aside { position: static; grid-template-columns: 1fr 1fr; }
  .sim-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .distill-time-grid, .sim-time-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .sim-lab-hero { padding: 20px; }
  .sim-lab-hero h2 { font-size: 30px; }
  .sim-lab-grid { gap: 12px; }
  .sim-lab-card { min-height: 0; padding: 16px; }
  .sim-workbench, .sim-result-copy, .distill-result-copy { padding: 16px; }
  .sim-aside { grid-template-columns: 1fr; }
  .sim-ingredient-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-target-grid, .distill-material-grid, .distill-heat-grid { grid-template-columns: 1fr 1fr; }
  .sim-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sim-tray-row { grid-template-columns: 9px minmax(0, 1fr) 28px 46px 12px 28px 20px; gap: 4px; }
  .sim-gram-input { width: 46px; }
  .sim-result-bottle { gap: 8px; }
  .sim-result-bottle .sim-bottle { width: 136px; height: 205px; }
  .distill-stage { height: 200px; }
  .distill-stage-result { height: 230px; }
  .distill-flask { left: 7%; width: 88px; height: 76px; bottom: 50px; }
  .distill-neck { left: 42%; bottom: 120px; width: 18px; height: 38px; }
  .distill-tube { left: 23%; bottom: 147px; width: 40%; }
  .distill-condenser { left: 57%; width: 58px; height: 100px; }
  .distill-receiver { right: 3%; width: 66px; height: 84px; bottom: 32px; }
  .distill-label-label { display: none; }
  .sim-control-row { grid-template-columns: minmax(0, 1fr) 30px 64px 14px 30px; gap: 5px; }
  .sim-control-row input { width: 64px; }
  .sim-result-actions { width: 100%; }
  .sim-result-actions .btn { flex: 1; text-align: center; }
}

/* 研究页里的宥道模拟成品 */
.research-sim-card { padding: 18px 20px; }
.research-sim-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.research-sim-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid #eee4d5; border-radius: 11px; background: #fffdf8; }
.research-sim-dot { width: 12px; height: 12px; border-radius: 50%; }
.research-sim-item strong { display: block; font-size: 13px; }
.research-sim-item small { display: block; color: #8a7658; font-size: 10px; line-height: 1.5; margin-top: 2px; }
@media (max-width: 720px) { .research-sim-grid { grid-template-columns: 1fr; } }

/* ===== 2026-11-29 八段位 / 课本对照 / 气味侦探 / 叠香积木 ===== */
.sim-grade-banner { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; padding: 9px 12px; border: 1px solid #e4d8c6; border-radius: 13px; background: #fffaf0; }
.sim-grade-banner .sim-grade-letter { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 22px; border: 2px solid currentColor; background: #fff; }
.sim-grade-banner strong { display: block; font-size: 17px; line-height: 1.3; }
.sim-grade-banner small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.55; color: #7b684d; }
.sim-grade-banner.grade-bad { color: #7c3f36; border-color: #d8b6ac; background: #fbefeb; }
.sim-grade-banner.grade-low { color: #7e5b38; border-color: #d9c3a0; background: #fbf4e7; }
.sim-grade-banner.grade-plain { color: #655e4e; border-color: #d8d0c0; background: #f8f5ed; }
.sim-grade-banner.grade-good { color: #3f654c; border-color: #b9d0b9; background: #eff7ec; }
.sim-grade-banner.grade-great { color: #8d5b23; border-color: #e1c28f; background: #fff4dc; }
.sim-grade-banner.grade-legend { color: #8b5d16; border-color: #d8ad57; background: linear-gradient(110deg, #fff8df, #f8e5ae); box-shadow: 0 4px 14px rgba(157,105,31,.12); }
.sim-grade-banner.grade-legend strong { letter-spacing: .04em; }

.sim-textbook { margin-top: 14px; border: 1px solid #e6dac8; border-radius: 14px; background: #fbf7ed; padding: 12px 13px; }
.sim-textbook-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.sim-textbook-head strong { display: block; font-size: 15px; color: #45392b; }
.sim-textbook-head small { text-align: right; font-size: 9px; line-height: 1.5; color: #988568; max-width: 55%; }
.sim-textbook-list { display: grid; gap: 5px; }
.sim-textbook-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 7px; align-items: start; padding: 6px 0; border-top: 1px dashed #e6dac8; }
.sim-textbook-row:first-child { border-top: 0; padding-top: 0; }
.sim-textbook-status { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: #9f8e73; }
.sim-textbook-row.tone-ok .sim-textbook-status { background: #55775d; }
.sim-textbook-row.tone-warn .sim-textbook-status { background: #b48244; }
.sim-textbook-row.tone-bad .sim-textbook-status { background: #9a5646; }
.sim-textbook-row.tone-plain .sim-textbook-status { background: #8f8574; }
.sim-textbook-row strong { display: block; font-size: 12px; color: #554733; }
.sim-textbook-row small { display: block; font-size: 10px; line-height: 1.5; color: #806c50; }
.sim-textbook-row em { font-style: normal; font-size: 9px; color: #aa9678; white-space: nowrap; padding-top: 2px; }

.smell-stage { display: flex; flex-direction: column; }
.smell-paper { min-height: 156px; }
.smell-paper.is-revealed { border-color: #b98c53; box-shadow: 0 10px 22px rgba(120,85,40,.13); }
.smell-paper-copy strong { font-size: 19px; line-height: 1.35; max-width: 88%; }
.smell-paper-copy em { display: block; max-width: 88%; line-height: 1.5; }
.smell-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 9px; }
.smell-progress { color: #9a8465; font-size: 11px; }
.smell-choices { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.smell-choice { border: 1px solid #d9c6a8; background: #fffdf7; color: #5e4b35; border-radius: 999px; padding: 7px 11px; font-size: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.smell-choice:hover { border-color: #b78a50; background: #fff5e3; }
.smell-choice.is-correct { border-color: #55775d; background: #e8f3e3; color: #35533e; }
.smell-choice.is-wrong { border-color: #b36b5c; background: #f7e1db; color: #7d3f34; }
.smell-choice:disabled { cursor: default; opacity: .8; }
.smell-feedback { min-height: 18px; font-size: 11px; line-height: 1.5; color: #8a7658; margin: 0 0 7px; }
.smell-feedback.ok { color: #3f654c; }
.smell-feedback.bad { color: #925242; }
.smell-next { align-self: flex-start; }

.mini-result { margin-top: 12px; border: 1px solid #e0cfb2; border-radius: 14px; padding: 12px 13px; background: #fff9ec; }
.mini-result-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.mini-grade { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 24px; border: 2px solid currentColor; background: #fff; }
.mini-grade.grade-bad { color: #7c3f36; }
.mini-grade.grade-low { color: #7e5b38; }
.mini-grade.grade-plain { color: #655e4e; }
.mini-grade.grade-good { color: #3f654c; }
.mini-grade.grade-great { color: #8d5b23; }
.mini-grade.grade-legend { color: #8b5d16; }
.mini-result-head strong { display: block; font-size: 16px; color: #45392b; }
.mini-result-head small { display: block; margin-top: 2px; color: #9a8465; font-size: 10px; }
.mini-result p { margin: 0 0 8px; font-size: 12px; line-height: 1.65; color: #66533d; }

.tower-builder { display: grid; gap: 10px; }
.tower-stack-build { display: grid; gap: 7px; margin: 2px 0 2px; transform-origin: 50% 100%; transition: transform .25s ease; }
.tower-slot { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 2px 9px; align-items: center; min-height: 54px; padding: 8px 10px; border: 1px dashed #d8c4a4; border-radius: 12px; background: #fffdf7; cursor: pointer; }
.tower-slot.is-full { border-style: solid; background: #fff9ee; }
.tower-slot:nth-child(1) { margin-right: 18%; background: #fbf0d2; }
.tower-slot:nth-child(2) { margin-right: 8%; margin-left: 4%; background: #fae7e8; }
.tower-slot:nth-child(3) { background: #efe4cf; }
.tower-slot-label small { display: block; font-size: 10px; letter-spacing: .06em; color: #816d51; }
.tower-slot-label b { display: block; font-size: 11px; color: #5e4b35; font-weight: 500; }
.tower-slot-chips { min-height: 28px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tower-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e1d2b9; border-radius: 999px; background: #fff; color: #554733; padding: 4px 8px 4px 6px; font-size: 11px; cursor: pointer; }
.tower-chip span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tower-chip i { font-style: normal; color: #a28f72; font-size: 10px; }
.tower-slot-hint { grid-column: 2; font-size: 9px; color: #a08b6d; }
.tower-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tower-block { position: relative; text-align: left; border: 1px solid #e2d4bf; border-radius: 11px; background: #fffdf8; padding: 8px 9px; color: #4e4638; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.tower-block:hover { border-color: #b98c53; transform: translateY(-1px); }
.tower-block.is-selected { border-color: #b07a3a; background: #fff3dd; box-shadow: 0 0 0 2px rgba(176,122,58,.13); }
.tower-block.is-used { opacity: .38; }
.tower-block-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 4px; vertical-align: 1px; }
.tower-block strong { font-size: 13px; }
.tower-block small { display: block; margin: 1px 0 3px; color: #997f5d; font-size: 10px; }
.tower-block em { display: block; color: #9a8465; font-size: 9px; line-height: 1.4; font-style: normal; }
.tower-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.tower-status { flex: 1; min-width: 130px; color: #8a7658; font-size: 10px; line-height: 1.45; }

@media (max-width: 680px) {
  .sim-textbook-row { grid-template-columns: 24px minmax(0, 1fr); }
  .sim-textbook-row em { display: none; }
  .tower-slot:nth-child(1) { margin-right: 12%; }
  .tower-slot:nth-child(2) { margin-left: 2%; margin-right: 5%; }
  .tower-palette { grid-template-columns: 1fr 1fr; }
  .smell-paper-copy strong { font-size: 17px; }
}
[hidden], .smell-choices[hidden], .mini-result[hidden], .smell-next[hidden], #smell-result[hidden], #tower-result[hidden] { display: none !important; }
.smell-guide { margin-top: 8px; padding-top: 9px; border-top: 1px dashed #e2d3bc; display: flex; flex-wrap: wrap; gap: 6px 13px; color: #8d7657; font-size: 10px; }
.smell-guide div { display: flex; align-items: center; gap: 4px; }
.smell-guide b { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: #f0e3cf; color: #8b5d2c; font-size: 9px; }
.sim-rank-card { margin: 0 0 14px; padding: 14px 18px; border-radius: 18px; }
.sim-rank-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.sim-rank-head h2 { margin: 2px 0 0; font-size: 20px; }
.sim-rank-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.sim-rank-item { border: 1px solid #e1d5c2; border-radius: 10px; padding: 7px 8px; background: #fffdf8; min-width: 0; }
.sim-rank-item span { display: block; font-family: Georgia, serif; font-size: 16px; color: #8f5b26; }
.sim-rank-item strong { display: block; font-size: 11px; color: #554733; line-height: 1.3; margin-top: 2px; }
.sim-rank-item.grade-bad { background: #fbefeb; border-color: #d8b6ac; color: #7c3f36; }
.sim-rank-item.grade-low { background: #fbf4e7; border-color: #d9c3a0; color: #7e5b38; }
.sim-rank-item.grade-plain { background: #f8f5ed; border-color: #d8d0c0; color: #655e4e; }
.sim-rank-item.grade-good { background: #eff7ec; border-color: #b9d0b9; color: #3f654c; }
.sim-rank-item.grade-great { background: #fff4dc; border-color: #e1c28f; color: #8d5b23; }
.sim-rank-item.grade-legend { background: linear-gradient(110deg,#fff8df,#f8e5ae); border-color: #d8ad57; color: #8b5d16; }
.sim-rank-item.grade-bad span, .sim-rank-item.grade-bad strong { color: #7c3f36; }
.sim-rank-item.grade-low span, .sim-rank-item.grade-low strong { color: #7e5b38; }
.sim-rank-item.grade-plain span, .sim-rank-item.grade-plain strong { color: #655e4e; }
.sim-rank-item.grade-good span, .sim-rank-item.grade-good strong { color: #3f654c; }
.sim-rank-item.grade-great span, .sim-rank-item.grade-great strong { color: #8d5b23; }
.sim-rank-item.grade-legend span, .sim-rank-item.grade-legend strong { color: #8b5d16; }
@media (max-width: 900px) { .sim-rank-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.smell-family-deck { margin-top: 10px; padding: 9px 10px; border: 1px solid #e6d8c5; border-radius: 12px; background: #fffbf2; }
.smell-family-deck-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.smell-family-deck-head span { font-size: 11px; color: #5e4b35; }
.smell-family-deck-head small { font-size: 9px; color: #a08b6d; }
.smell-family-tiles { display: flex; flex-wrap: wrap; gap: 4px; }
.smell-family-tile { padding: 4px 7px; border-radius: 999px; font-size: 10px; border: 1px solid #e0d3bf; background: #fff; color: #65543d; }
.smell-family-tile[data-family="柑橘"] { background: #fdf0d1; border-color: #e8c986; }
.smell-family-tile[data-family="花香"] { background: #fbe9ec; border-color: #e6b7c1; }
.smell-family-tile[data-family="草本"] { background: #eaf4e5; border-color: #b9d4ad; }
.smell-family-tile[data-family="木香"] { background: #f2e7d7; border-color: #cfb291; }
.smell-family-tile[data-family="甜香"] { background: #fbf1dc; border-color: #e2c99e; }
.smell-family-tile[data-family="辛香"] { background: #f8e3d9; border-color: #dda98f; }
.smell-family-tile[data-family="树脂"] { background: #eee4d7; border-color: #cbb291; }
.smell-note { margin: 7px 0 0; font-size: 10px; line-height: 1.5; color: #9a8465; }

/* complete distillation still + process demo */
.distill-stage { height: auto; aspect-ratio: 520 / 340; }
.distill-stage-result { height: auto; }
.distill-stage .still-svg { display: block; width: 100%; height: auto; }
.still-stand rect, .still-stand path { fill: #b7a184; stroke: #a08b6c; stroke-width: 1; }
.still-burner rect { fill: #9f7650; }
.still-flame { fill: #df9d4b; opacity: 0; transform-origin: 100px 286px; }
.distill-stage.is-running .still-flame { opacity: .9; animation: stillFlame .7s ease-in-out infinite alternate; }
.still-glass { fill: rgba(255,255,255,.36); stroke: #ad9779; stroke-width: 1.2; }
.still-liquid { fill: var(--juice, #8b8bb5); opacity: .55; }
.still-tube { fill: none; stroke: #ad9779; stroke-width: 2; }
.still-steam { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 4; stroke-dasharray: 8 15; opacity: 0; }
.distill-stage.is-running .still-steam { opacity: .8; animation: stillSteam 1.1s linear infinite; }
.still-jacket { fill: rgba(255,250,240,.66); stroke: #ad9779; stroke-width: 1.2; }
.still-inner { fill: rgba(255,255,255,.7); stroke: #ad9779; stroke-width: 1; }
.still-water-line { fill: none; stroke: #b9ced1; stroke-width: 5; opacity: .6; }
.still-cold-in { fill: none; stroke: #b9ced1; stroke-width: 3; }
.still-droplet { fill: #8eaab3; opacity: 0; }
.distill-stage.is-running .still-droplet { opacity: .9; animation: stillDrop 1.4s ease-in infinite; }
.distill-stage.is-running .still-droplet.d2 { animation-delay: .35s; }
.distill-stage.is-running .still-droplet.d3 { animation-delay: .7s; }
.still-bubble { fill: #fff; opacity: 0; }
.distill-stage.is-running .still-bubble { opacity: .85; animation: stillBubble 1.15s ease-in infinite; }
.distill-stage.is-running .still-bubble.b2 { animation-delay: .3s; }
.distill-stage.is-running .still-bubble.b3 { animation-delay: .55s; }
.still-hydrosol { fill: #b9ccd1; opacity: .7; }
.still-oil { fill: #d6ad58; opacity: .9; }
.still-receiver-neck { fill: none; stroke: #ad9779; stroke-width: 1.2; }
.still-callout circle { fill: #c88a3f; }
.still-callout text { fill: #fff; font: 700 9px/1 Georgia, "Songti SC", serif; }
.still-label { fill: #7d674b; font: 11px/1 "Songti SC", serif; }
.still-small { fill: #8e7a5f; font: 8px/1 "Songti SC", serif; }
.distill-stage-result .still-flame, .distill-stage-result .still-steam, .distill-stage-result .still-bubble, .distill-stage-result .still-droplet { opacity: 0; animation: none; }
.distill-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; color: #8d7658; font-size: 11px; }
.distill-legend span { display: inline-flex; align-items: center; gap: 4px; }
.distill-legend b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #c88a3f; color: #fff; font-size: 9px; }
.distill-process { margin-top: 12px; padding: 13px 14px 12px; border: 1px solid #dec9a7; border-radius: 15px; background: #fbf3e4; }
.distill-process-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #7d674b; font-size: 11px; }
.distill-process-top b { font-weight: 700; color: #9b642f; }
.distill-process-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; margin: 0 0 9px; padding: 0; list-style: none; }
.distill-process-steps li { border-radius: 7px; padding: 6px 2px; text-align: center; background: #f3e6d2; color: #a28b70; font-size: 10px; }
.distill-process-steps li.is-active { background: #c88a3f; color: #fff; font-weight: 700; }
.distill-process-steps li.is-done { background: #e7d3b5; color: #7d5d36; }
.distill-process-bar { height: 4px; border-radius: 99px; background: #ead9c1; overflow: hidden; }
.distill-process-bar i { display: block; height: 100%; width: 25%; border-radius: inherit; background: #c88a3f; transition: width .3s ease; }
.distill-process p { margin: 9px 0 0; color: #7f694f; font-size: 11px; line-height: 1.55; }
@keyframes stillFlame { from { transform: scaleY(.92); } to { transform: scaleY(1.06); } }
@keyframes stillSteam { to { stroke-dashoffset: -46; } }
@keyframes stillDrop { from { transform: translateY(-4px); opacity: .3; } 70% { opacity: 1; } to { transform: translateY(26px); opacity: 0; } }
@keyframes stillBubble { from { transform: translateY(8px); opacity: .1; } to { transform: translateY(-22px); opacity: .85; } }
@media (max-width: 760px) {
  .distill-stage { height: auto; }
  .distill-process-steps li { font-size: 9px; }
}
.distill-layout { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); }
.distill-result-layout { align-items: start; }
@media (max-width: 760px) { .distill-layout { grid-template-columns: minmax(0, 1fr); } }
/* 三调塔课本对位 */
.tower-textbook { margin: 10px 0 12px; padding: 12px 13px; border: 1px solid #e4d3b9; border-radius: 13px; background: #fbf5e9; }
.tower-textbook-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; color: #7d674b; font-size: 11px; margin-bottom: 8px; }
.tower-textbook-head span { font-weight: 700; letter-spacing: .08em; color: #a06b33; }
.tower-textbook-head small { color: #9a8465; font-size: 10px; }
.tower-textbook-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-bottom: 8px; }
.tower-textbook-grid div { padding: 7px 7px 6px; border-radius: 8px; background: #fffaf0; border: 1px solid #efe2cf; }
.tower-textbook-grid b { display: block; color: #60482e; font-size: 12px; margin-bottom: 2px; }
.tower-textbook-grid span { display: block; color: #9a8465; font-size: 10px; line-height: 1.45; }
.tower-textbook-case, .tower-textbook-note { margin: 0; color: #7e6a50; font-size: 10.5px; line-height: 1.6; }
.tower-textbook-case b { color: #9a642e; }
.tower-textbook-note { margin-top: 6px; color: #97836b; }
@media (max-width: 640px) {
  .tower-textbook-grid { grid-template-columns: 1fr; }
  .tower-textbook-grid div { display: flex; gap: 7px; align-items: baseline; }
  .tower-textbook-grid b { flex: none; margin: 0; }
}
.sim-actions .btn:disabled, .distill-form .btn:disabled { opacity: .48; cursor: not-allowed; filter: saturate(.75); }
.sim-name-reason { margin: -2px 0 10px; padding-left: 9px; border-left: 2px solid #d8b37a; color: #80694e; font-size: 11px; line-height: 1.6; }
.sim-name-badge { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #f0dfbf; color: #7d5525; font-size: 9px; letter-spacing: .08em; vertical-align: middle; }
.sim-name-edit { margin: 12px 0 2px; padding: 11px 12px; border: 1px solid #e2d1b5; border-radius: 14px; background: rgba(255, 250, 240, .8); text-align: left; }
.sim-name-edit label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sim-name-edit label strong { color: #6d542f; font-size: 12px; }
.sim-name-edit label small { color: #a08a6d; font-size: 9px; }
.sim-name-edit input { width: 100%; margin-top: 7px; padding: 8px 10px; border: 1px solid #ddc9a9; border-radius: 9px; background: #fffdf8; color: #4b3b27; font: inherit; font-size: 12px; outline: none; }
.sim-name-edit input:focus { border-color: #b8894b; box-shadow: 0 0 0 2px rgba(176, 130, 46, .12); }
.sim-name-auto { display: block; margin-top: 6px; color: #9a8468; font-size: 9.5px; line-height: 1.5; }
.sim-lock-note { margin: 8px 0 0; color: #9a8468; font-size: 9.5px; line-height: 1.5; }
.sim-result-copy h2 { word-break: break-word; }
.sim-rename-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 3px; }
.sim-rename-row h2 { margin: 0; }
.sim-rename-form { display: flex; align-items: center; gap: 6px; flex: 1 1 280px; min-width: 210px; }
.sim-rename-input { flex: 1; min-width: 110px; padding: 8px 10px; border: 1px solid #ddc9a9; border-radius: 9px; background: #fffdf8; color: #4b3b27; font: inherit; font-size: 12px; outline: none; }
.sim-rename-input:focus { border-color: #b8894b; box-shadow: 0 0 0 2px rgba(176, 130, 46, .12); }
.sim-rename-hint { margin: 0 0 9px; color: #9a8468; font-size: 9.5px; line-height: 1.5; }
.sim-bottle-label b { white-space: normal; font-size: 11.5px; line-height: 1.25; max-height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#tower-check.is-ready { box-shadow: 0 0 0 2px rgba(176, 130, 46, .18); }
.distill-process-clock { display: flex; align-items: baseline; gap: 7px; margin: -2px 0 9px; color: #9b7a50; }
.distill-process-clock b { font-family: Georgia, serif; font-size: 21px; color: #9b642f; }
.distill-process-clock span { font-size: 10px; }
.distill-process-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.distill-process-bar i { width: 0; transition: width .12s linear; }
.distill-stage .still-oil-preview { opacity: 0; }
.distill-stage.is-running[data-phase="0"] .still-steam,
.distill-stage.is-running[data-phase="0"] .still-droplet,
.distill-stage.is-running[data-phase="0"] .still-bubble,
.distill-stage.is-running[data-phase="0"] .still-oil-preview { opacity: 0; animation: none; }
.distill-stage.is-running[data-phase="1"] .still-bubble { opacity: .9; animation: stillBubble 1.05s ease-in infinite; }
.distill-stage.is-running[data-phase="1"] .still-steam { opacity: .32; animation: stillSteam 1.7s linear infinite; }
.distill-stage.is-running[data-phase="1"] .still-liquid { animation: stillBrew 1.15s ease-in-out infinite; transform-origin: 100px 275px; }
.distill-stage.is-running[data-phase="2"] .still-bubble { opacity: .9; animation: stillBubble .9s ease-in infinite; }
.distill-stage.is-running[data-phase="2"] .still-steam { opacity: .95; animation: stillSteam .72s linear infinite; }
.distill-stage.is-running[data-phase="2"] .still-jacket,
.distill-stage.is-running[data-phase="3"] .still-jacket { fill: rgba(224, 242, 241, .95); }
.distill-stage.is-running[data-phase="3"] .still-droplet { opacity: .95; animation: stillDrop 1.1s ease-in infinite; }
.distill-stage.is-running[data-phase="3"] .still-steam { opacity: .75; animation: stillSteam .9s linear infinite; }
.distill-stage.is-running[data-phase="4"] .still-droplet { opacity: .9; animation: stillDrop 1.3s ease-in infinite; }
.distill-stage.is-running[data-phase="4"] .still-steam { opacity: .38; animation: stillSteam 1.4s linear infinite; }
.distill-stage.is-running[data-phase="4"] .still-oil-preview { opacity: .92; animation: stillOilRise .8s ease-out both; }
.still-bubble.b4 { animation-delay: .18s; }
.still-bubble.b5 { animation-delay: .42s; }
@keyframes stillBrew { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes stillOilRise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: .92; } }
.sim-bottle-label b { font-size: 10.5px; }
.sim-tower-card { grid-column: 1 / -1; }
.sim-tower-card .tower-palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tower-hand-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 0 7px; color: #7d674b; font-size: 11px; }
.tower-hand-head b { color: #a06b33; }
.sim-bottle-grade { display: block; margin-top: 2px; color: #9a6b2f; font-size: 9px; letter-spacing: .04em; }
@media (max-width: 760px) {
  .sim-tower-card { grid-column: auto; }
  .sim-tower-card .tower-palette { grid-template-columns: 1fr 1fr; }
}

/* 教材配方卷：只读、按批量换算，不占游戏卡池 */
.tb-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.tb-tab, .tb-batch { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border: 1px solid #dccdb6; border-radius: 999px; background: #fbf7ed; color: #6d5638; font-size: 12px; text-decoration: none; }
.tb-tab:hover, .tb-batch:hover { border-color: #b98b51; color: #8b5a22; }
.tb-tab.is-active, .tb-batch.is-active { background: #8b5a22; border-color: #8b5a22; color: #fff; }
.tb-batch-group { display: flex; align-items: center; gap: 6px; margin-left: auto; color: #8b7a63; font-size: 11px; }
.tb-batch { padding: 6px 10px; }
.tb-summary { margin-bottom: 14px; }
.tb-summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tb-summary-head h2 { margin: 2px 0 3px; font-size: 22px; color: #45392b; }
.tb-summary-head p { margin: 0; }
.tb-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.tb-summary-grid div { padding: 9px 10px; border: 1px solid #e6dac8; border-radius: 12px; background: #fbf7ed; }
.tb-summary-grid small { display: block; color: #988568; font-size: 10px; }
.tb-summary-grid b { display: block; margin-top: 3px; color: #554733; font-size: 14px; }
.tb-warn { margin: 12px 0 0; padding: 9px 10px; border-left: 3px solid #b48244; background: #fff7e7; color: #7d5a2c; font-size: 12px; line-height: 1.6; }
.tb-note { margin: 9px 0 0; color: #806c50; font-size: 12px; line-height: 1.65; }
.tb-card { margin-bottom: 14px; }
.tb-table-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 9px; }
.tb-table-head h2 { margin: 2px 0 0; font-size: 20px; color: #45392b; }
.tb-table-head small { max-width: 52%; color: #988568; font-size: 10px; line-height: 1.55; text-align: right; }
.tb-table-wrap { overflow: auto; border: 1px solid #e6dac8; border-radius: 12px; background: #fffdf7; }
.tb-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 12px; }
.tb-table th { position: sticky; top: 0; z-index: 2; padding: 9px 8px; background: #f1e7d6; color: #6d5638; font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
.tb-table td { padding: 8px; border-top: 1px dashed #e6dac8; color: #554733; vertical-align: top; }
.tb-table tr.is-functional td { background: #f4eee3; color: #7b6a53; }
.tb-table tr.is-bridge td { background: #fff7e7; }
.tb-table strong { display: block; font-size: 12px; color: #4e3f2b; }
.tb-table small { display: block; margin-top: 2px; color: #9c886a; font-size: 9px; line-height: 1.4; }
.tb-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-table .note { min-width: 220px; color: #806c50; font-size: 10px; line-height: 1.5; }
.tb-table tfoot td { border-top: 2px solid #dccdb6; background: #fbf7ed; font-weight: 700; color: #6d5638; }
.tb-notes h2 { margin: 2px 0 8px; font-size: 20px; color: #45392b; }
.tb-notes p { margin: 8px 0; color: #6f5d45; font-size: 12px; line-height: 1.7; }
.tb-notes ul { margin: 6px 0 8px 18px; padding: 0; color: #6f5d45; font-size: 12px; line-height: 1.7; }
@media (max-width: 760px) {
  .tb-summary-grid { grid-template-columns: 1fr 1fr; }
  .tb-summary-head, .tb-table-head { display: block; }
  .tb-table-head small { display: block; max-width: none; margin-top: 5px; text-align: left; }
  .tb-batch-group { margin-left: 0; }
}
