/* ============================================================
   语哨 — 视觉系统
   纸质底 + 墨色版心 + 朱砂强调，避免模板化“AI 科技风”
   ============================================================ */
:root {
  --ink: #E5EDEA;
  --ink-2: #C4CFCC;
  --ink-3: #A1AEAB;
  --muted: #87979A;
  --paper: #0C1213;
  --panel: #141B1D;
  --panel-2: #101718;
  --line: #253134;
  --line-2: #1A2325;
  --accent: #4FD1A5;
  --accent-soft: rgba(79,209,165,.12);
  --teal: #6E9C8E;
  --teal-soft: rgba(110,156,142,.16);
  --amber: #F59E0B;
  --amber-soft: rgba(245,158,11,.14);
  --ok: #34D399;
  --warn: #F59E0B;
  --radius: 3px;
  --shadow: 0 1px 0 rgba(21, 26, 31, .04), 0 12px 28px -18px rgba(21, 26, 31, .35);
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "STZhongsong", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --wrap: 1280px;
}

* { box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; }
html.large { font-size: 17.5px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 纸张细纹 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(rgba(21, 26, 31, .045) .6px, transparent .6px),
    radial-gradient(rgba(21, 26, 31, .03) .6px, transparent .6px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 4px 5px;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 顶栏 ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  /* 不能用 backdrop-filter：它会让顶栏成为 fixed 子元素的包含块，导致窄屏底部导航被固定到顶栏里 */
  background: rgba(20,27,29,.97);
  position: sticky; top: 0; z-index: 40;
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: block; flex-shrink: 0; border-radius: 10px; filter: drop-shadow(0 3px 10px rgba(79,209,165,.4)); }
.brand-text b { display: block; font-family: var(--serif); font-size: 1.16rem; letter-spacing: .14em; font-weight: 700; line-height: 1.1;
  background: linear-gradient(120deg, var(--ink) 15%, var(--accent) 60%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-text span { display: block; font-family: var(--mono); font-size: .58rem; letter-spacing: .15em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 8px 12px; color: var(--ink-2); font-size: .86rem; white-space: nowrap;
  border-bottom: 2px solid transparent; text-decoration: none;
}
.nav a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--line); }
.nav a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.top-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 32px; height: 32px; border: 1px solid var(--line); background: transparent;
  cursor: pointer; display: grid; place-items: center; font-family: var(--mono); font-size: .78rem;
  color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
/* 界面语言切换 */
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  height: 32px; padding: 0 10px; border: 1px solid var(--line);
  background: rgba(20,27,29,.55); color: var(--ink-2);
  font-family: inherit; font-size: .74rem; cursor: pointer;
  position: relative; z-index: 2;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--ink); color: var(--ink); }
.lang-btn i { font-style: normal; font-size: .58rem; opacity: .65; }
.lang-menu {
  position: fixed; z-index: 120; width: 210px; padding: 6px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--paper); border: 1px solid var(--ink);
  box-shadow: 0 20px 40px -22px rgba(21, 26, 31, .7);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  padding: 7px 8px; border: 1px solid transparent; background: transparent;
  color: var(--ink-2); font-family: inherit; font-size: .74rem;
  text-align: left; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.lang-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.lang-menu button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
/* 本地化进度提示 */
.i18n-busy {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  padding: 9px 14px; background: var(--ink); color: var(--paper);
  font-size: .78rem; letter-spacing: .04em; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8);
}
.i18n-busy::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px;
  border-radius: 50%; background: var(--accent); animation: blink 1s infinite;
}

/* ---------- 页头 ---------- */
.page-head { padding: 44px 0 26px; border-bottom: 1px solid var(--line); }
.kicker {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.28; margin: 0 0 10px; letter-spacing: .01em; }
.page-head p { margin: 0; max-width: 760px; color: var(--ink-3); font-size: .93rem; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- 首屏 ---------- */
.hero { padding: 54px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: start; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(2.3rem, 4.4vw, 3.5rem);
  line-height: 1.22; margin: 0 0 22px; letter-spacing: .01em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 1rem; color: var(--ink-3); max-width: 620px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 10px 18px; font-size: .87rem; cursor: pointer; text-decoration: none;
  transition: background .18s, color .18s, border-color .18s; border-radius: var(--radius);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--accent); }
.btn.sm { padding: 6px 12px; font-size: .8rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.console {
  background: var(--ink); color: #101718; padding: 22px 22px 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.console::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px;
}
.console-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,.16); padding-bottom: 12px; margin-bottom: 16px; }
.console-head .mono { font-size: .66rem; letter-spacing: .12em; color: #9aa3aa; }
.live { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: .64rem; color: #b9c1c6; letter-spacing: .08em; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #4FD1A5; box-shadow: 0 0 0 3px rgba(127,191,143,.15); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.13); position: relative; z-index: 1; }
.stat { background: var(--ink); padding: 16px 14px 13px; }
.stat b { display: block; font-family: var(--mono); font-size: 2rem; line-height: 1.1; color: #fff; font-weight: 500; letter-spacing: -.02em; }
.stat span { display: block; font-size: .72rem; color: #9aa3aa; margin-top: 5px; }
.stat em { font-style: normal; color: #d8b26a; font-size: .72rem; }
.console-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.16); font-family: var(--mono); font-size: .64rem; color: #8f989f; position: relative; z-index: 1; }

/* ---------- 区块 ---------- */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.block-title { display: flex; align-items: baseline; gap: 14px; }
.block-title .idx { font-family: var(--mono); font-size: .7rem; color: var(--accent); letter-spacing: .1em; }
.block-title h2 { font-family: var(--serif); font-size: 1.72rem; margin: 0; font-weight: 700; letter-spacing: .01em; }
.block-title .en { font-family: var(--mono); font-size: .62rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.block-head p { margin: 6px 0 0; color: var(--muted); font-size: .85rem; max-width: 560px; }
.more { font-size: .82rem; color: var(--accent); white-space: nowrap; }

/* ---------- 模块卡 ---------- */
.module-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.module {
  background: var(--panel); padding: 22px 18px 20px; min-height: 214px;
  display: flex; flex-direction: column; color: var(--ink); text-decoration: none;
  transition: background .18s;
}
.module:hover { background: #1A2325; text-decoration: none; }
.module .n { font-family: var(--mono); font-size: .68rem; color: var(--accent); letter-spacing: .1em; }
.module h3 { font-family: var(--serif); font-size: 1.12rem; margin: 14px 0 8px; line-height: 1.4; }
.module p { font-size: .8rem; color: var(--ink-3); margin: 0 0 auto; line-height: 1.65; }
.module .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: .72rem; color: var(--muted); }
.module .foot b { font-family: var(--mono); color: var(--ink); font-weight: 500; font-size: .82rem; }
.module:hover .foot b { color: var(--accent); }

/* ---------- 情报流 ---------- */
.split { display: grid; grid-template-columns: 1.55fr .95fr; gap: 40px; align-items: start; }
.intel-list { border-top: 1px solid var(--ink); }
.intel {
  display: grid; grid-template-columns: 86px 1fr; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.intel .meta { font-size: .7rem; color: var(--muted); line-height: 1.9; }
.intel .meta b { display: block; color: var(--ink-2); font-weight: 500; }
.intel h3 { font-size: .98rem; margin: 0 0 6px; line-height: 1.55; font-weight: 600; }
.intel p { margin: 0 0 6px; font-size: .82rem; color: var(--ink-3); line-height: 1.7; }
.intel .orig { font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: .68rem; padding: 1px 7px; border: 1px solid var(--line); color: var(--ink-3);
  background: var(--panel); white-space: nowrap;
}
.tag.accent { border-color: rgba(79,209,165,.35); color: var(--accent); background: var(--accent-soft); }
.tag.teal { border-color: rgba(110,156,142,.4); color: var(--teal); background: var(--teal-soft); }
.tag.amber { border-color: rgba(245,158,11,.4); color: var(--amber); background: var(--amber-soft); }
.tag.ink { border-color: var(--ink); color: var(--paper); background: var(--ink); }

.side-card { background: var(--panel); border: 1px solid var(--line); padding: 20px; margin-bottom: 18px; }
.side-card h4 { margin: 0 0 14px; font-family: var(--serif); font-size: 1rem; display: flex; justify-content: space-between; align-items: baseline; }
.side-card h4 span { font-family: var(--mono); font-size: .6rem; color: var(--muted); letter-spacing: .1em; }
.mini-bars { display: grid; gap: 10px; }
.mini-bar { display: grid; grid-template-columns: 58px 1fr 34px; align-items: center; gap: 10px; font-size: .76rem; color: var(--ink-3); }
.mini-bar .track { height: 6px; background: var(--panel-2); position: relative; }
.mini-bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--teal); }
.mini-bar .fill.accent { background: var(--accent); }
.mini-bar b { font-family: var(--mono); font-weight: 500; font-size: .72rem; text-align: right; color: var(--ink-2); }

/* ---------- 页面骨架 ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.field { display: flex; align-items: center; gap: 7px; }
.field label { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.input, .select {
  border: 1px solid var(--line); background: var(--panel); padding: 8px 10px;
  font-size: .84rem; border-radius: var(--radius); min-width: 0;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,26,31,.07); }
.input.search { min-width: 280px; }
.count { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-left: auto; }
.count b { color: var(--accent); font-weight: 500; }

.results { padding: 8px 0 40px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 26px 0 10px; }
.pager button {
  min-width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel);
  font-family: var(--mono); font-size: .76rem; cursor: pointer; color: var(--ink-2);
}
.pager button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { font-size: .72rem; color: var(--muted); padding: 0 6px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: .83rem; }
table.data thead th {
  background: var(--panel-2); text-align: left; font-weight: 600; font-size: .72rem;
  letter-spacing: .04em; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: #1A2325; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .zh { font-weight: 600; }
table.data .src { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.pill { display: inline-block; font-size: .66rem; padding: 1px 7px; border: 1px solid; white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.12); }
.pill.wait { color: var(--warn); border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.12); }

/* ---------- 抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(21,26,31,.32); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(480px, 92vw);
  background: var(--panel); border-left: 1px solid var(--ink); z-index: 61;
  transform: translateX(102%); transition: transform .26s cubic-bezier(.3,.7,.3,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.drawer-head h3 { font-family: var(--serif); margin: 0; font-size: 1.25rem; line-height: 1.4; }
.drawer-body { padding: 20px 22px 40px; overflow-y: auto; }
.drawer .close { border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--ink-3); line-height: 1; padding: 4px; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 14px; font-size: .84rem; }
.kv dt { color: var(--muted); font-size: .75rem; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- 翻译 ---------- */
.trans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.pane { border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 380px; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.pane-head .select { border-color: transparent; background: transparent; font-weight: 600; font-size: .86rem; padding: 4px 6px; }
.pane-head .tools { display: flex; gap: 4px; }
.textarea {
  flex: 1; border: 0; background: transparent; resize: none; padding: 16px;
  font-size: .95rem; line-height: 1.8; min-height: 260px; outline: none;
}
.output { padding: 16px; font-size: .95rem; line-height: 1.85; white-space: pre-wrap; word-break: break-word; flex: 1; }
.output .hit { background: rgba(79,209,165,.14); padding: 0 2px; border-bottom: 1px solid #4FD1A5; }
.src-preview { border-top: 1px dashed var(--line); background: rgba(169,59,42,.03); padding: 10px 16px 12px; }
.src-preview-head { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.src-preview-body { font-size: .84rem; line-height: 1.75; white-space: pre-wrap; word-break: break-word; max-height: 132px; overflow: auto; }
.src-preview-body .hit { background: rgba(79,209,165,.14); padding: 0 2px; border-bottom: 1px solid #4FD1A5; }
.gloss-check { margin-bottom: 12px; padding: 8px 10px; font-size: .74rem; line-height: 1.6; border-left: 3px solid var(--teal); background: rgba(30,90,83,.06); }
.gloss-check.warn { border-left-color: #4FD1A5; background: rgba(246,226,184,.35); }
.cite { font-size: .72rem; line-height: 1.65; color: var(--muted); word-break: break-word; margin: 2px 0 6px; }
.cite a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.cite a:hover { text-decoration: underline; }
.pane-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); }
.swap { display: grid; place-items: center; }
.swap button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.swap button:hover { border-color: var(--ink); }
.trans-bar { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.mode-note { font-size: .74rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; }
.mode-note b { color: var(--teal); font-weight: 600; }
.panel { border: 1px solid var(--line); background: var(--panel); padding: 20px; }
.panel h3 { font-family: var(--serif); font-size: 1.08rem; margin: 0 0 14px; display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 span { font-family: var(--mono); font-size: .62rem; color: var(--muted); letter-spacing: .1em; }
.term-hit { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .83rem; }
.term-hit:last-child { border-bottom: 0; }
.term-hit .t { font-weight: 600; background: rgba(169,59,42,.10); padding: 0 2px; }
.term-hit .o { color: var(--teal); font-size: .8rem; text-align: right; word-break: break-word; background: rgba(30,90,83,.08); padding: 0 2px; }
.term-hit .s { display: block; font-family: var(--mono); font-size: .64rem; color: var(--muted); }
.example { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.example:last-child { border-bottom: 0; }
.example .a { font-size: .82rem; }
.example .b { font-size: .82rem; color: var(--teal); }
.example .m { font-family: var(--mono); font-size: .64rem; color: var(--muted); margin-top: 3px; }

/* ---------- 问答 ---------- */
.qa-grid { display: grid; grid-template-columns: 1.45fr .85fr; gap: 36px; align-items: start; }
.qa-box { border: 1px solid var(--ink); background: var(--panel); }
.qa-input { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.qa-input textarea { flex: 1; border: 0; background: transparent; padding: 14px 16px; resize: none; min-height: 76px; outline: none; font-size: .92rem; line-height: 1.7; }
.qa-input .btn { margin: 10px; align-self: flex-end; }
.answer { padding: 22px; min-height: 220px; }
.answer .status { display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: .66rem; color: var(--muted); letter-spacing: .06em; margin-bottom: 14px; }
.answer .body { font-size: .93rem; line-height: 1.9; white-space: pre-wrap; }
.answer .body p { margin: 0 0 10px; }
.cite { display: inline-block; font-family: var(--mono); font-size: .68rem; border: 1px solid var(--line); padding: 0 4px; margin: 0 2px; color: var(--teal); cursor: pointer; text-decoration: none; }
.cite:hover { border-color: var(--teal); text-decoration: none; }
.chunks { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.chunk { border-left: 2px solid var(--line); padding: 4px 0 4px 12px; }
.chunk .h { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; font-weight: 600; }
.chunk .x { font-size: .78rem; color: var(--ink-3); margin-top: 3px; }
.chunk .m { font-family: var(--mono); font-size: .64rem; color: var(--muted); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.ask-list { display: grid; gap: 8px; }
.ask-list button { text-align: left; border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; font-size: .82rem; cursor: pointer; color: var(--ink-2); }
.ask-list button:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- 简报 ---------- */
.brief-layout { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; margin-top: 26px; overflow-x: clip; }
.brief-layout > * { min-width: 0; }
.pick-list { max-height: 460px; overflow-y: auto; border: 1px solid var(--line); background: var(--panel); }
.pick { display: grid; grid-template-columns: 18px 1fr; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); font-size: .79rem; cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick:hover { background: #1A2325; }
.pick input { margin-top: 4px; accent-color: var(--accent); }
.pick .s { display: block; font-family: var(--mono); font-size: .62rem; color: var(--muted); margin-top: 2px; }
.brief-paper { background: #1A2325; border: 1px solid var(--line); padding: 46px 52px; min-height: 560px; box-shadow: var(--shadow); }
.brief-paper .bh { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.brief-paper h2 { font-family: var(--serif); font-size: 1.55rem; margin: 0; }
.brief-paper .meta { font-family: var(--mono); font-size: .66rem; color: var(--muted); text-align: right; line-height: 1.8; }
.brief-paper h4 { font-family: var(--serif); font-size: 1.02rem; margin: 24px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent); }
.brief-paper p { margin: 0 0 8px; font-size: .87rem; line-height: 1.9; }
.brief-paper .foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); }
.brief-empty { color: var(--muted); font-size: .86rem; text-align: center; padding: 80px 20px; }

/* ---------- 关于页 ---------- */
.doc-grid { display: grid; grid-template-columns: 220px 1fr; gap: 44px; align-items: start; }
.doc-side { position: sticky; top: 92px; display: grid; gap: 2px; }
.doc-side a { font-size: .82rem; color: var(--ink-3); padding: 7px 10px; border-left: 2px solid var(--line); text-decoration: none; }
.doc-side a:hover, .doc-side a.on { color: var(--accent); border-left-color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.prose h2 { font-family: var(--serif); font-size: 1.42rem; margin: 38px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1rem; margin: 22px 0 8px; }
.prose p, .prose li { font-size: .88rem; color: var(--ink-2); line-height: 1.9; }
.prose ul { padding-left: 18px; }
.prose code { font-family: var(--mono); font-size: .8em; background: var(--panel-2); padding: 1px 5px; }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; font-size: .82rem; color: var(--ink-2); }
.arch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 16px 0 8px; }
.arch div { background: var(--panel); padding: 14px; font-size: .78rem; }
.arch b { display: block; font-family: var(--mono); font-size: .62rem; color: var(--accent); letter-spacing: .1em; margin-bottom: 6px; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0 46px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.foot-grid h5 { font-size: .78rem; margin: 0 0 10px; color: var(--ink); letter-spacing: .04em; }
.foot-grid p, .foot-grid a { font-size: .76rem; color: var(--muted); line-height: 1.9; display: block; }
.foot-bottom { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: .64rem; color: var(--muted); flex-wrap: wrap; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 10px 18px; font-size: .82rem;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 80; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { padding: 60px 20px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: .76rem; }

/* ---------- 国家与语种 ---------- */
.culture-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.culture-item { background: var(--panel); padding: 24px 24px 22px; }
.culture-item > .mono { font-size: .62rem; letter-spacing: .16em; color: var(--accent); }
.culture-item h3 { font-family: var(--serif); font-size: 1.12rem; margin: 8px 0 10px; line-height: 1.4; }
.culture-item p { margin: 0 0 14px; font-size: .84rem; color: var(--ink-3); line-height: 1.9; }
.cc-plain { font-size: .78rem; color: var(--ink-2); line-height: 1.7; overflow-wrap: anywhere; }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2);
  font-size: .76rem; padding: 6px 12px; cursor: pointer; border-radius: 999px;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#regionBar { gap: 6px; flex-wrap: wrap; margin-right: 6px; }
.lang-filter { margin-top: 14px; font-size: .8rem; color: var(--ink-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.country-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 18px;
}
.cc { background: var(--panel); padding: 22px 22px 20px; display: flex; flex-direction: column; min-width: 0; }
.cc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.cc-code {
  width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
}
.cc-name { flex: 1; min-width: 0; }
.cc-name h3 { font-family: var(--serif); font-size: 1.18rem; margin: 0; line-height: 1.3; }
.cc-name span { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.cc-region { font-size: .66rem; color: var(--teal); border: 1px solid rgba(110,156,142,.4); background: var(--teal-soft); padding: 1px 7px; white-space: nowrap; }
.cc-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin: 14px 0 12px;
}
.cc-facts div { background: var(--paper); padding: 8px 10px; min-width: 0; }
.cc-facts dt { font-size: .64rem; color: var(--muted); letter-spacing: .06em; }
.cc-facts dd { margin: 2px 0 0; font-size: .8rem; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.cc-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 8px; }
.cc-label { font-size: .68rem; color: var(--muted); padding-top: 3px; white-space: nowrap; }
.cc-agency { font-size: .8rem; margin: 12px 0 0; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; line-height: 1.7; }
.cc-agency .cc-label { padding-top: 0; }
.cc-culture { font-size: .82rem; color: var(--ink-3); line-height: 1.85; margin: 12px 0 0; }
.cc-culture.cc-extra { margin-top: 6px; }
.cc-marks { margin-top: 10px; }
.cc-more { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.cc-more summary { cursor: pointer; font-size: .76rem; color: var(--accent); }
.cc-more ul { margin: 10px 0 0; padding-left: 16px; }
.cc-more li { font-size: .79rem; color: var(--ink-2); line-height: 1.8; margin-bottom: 4px; }
.cc-emg { font-size: .78rem; color: var(--ink-3); background: var(--panel-2); padding: 8px 10px; margin: 10px 0 0; line-height: 1.75; }
.lang-table .native { font-size: .76rem; color: var(--muted); }
.lang-table .num { text-align: right; }
.lang-table button.on { border-color: var(--accent); color: var(--accent); }

/* ---------- 常用话术 ---------- */
.phrase-bar { border: 1px solid var(--line); background: var(--panel); padding: 16px 18px 14px; margin: 18px 0 4px; }
.phrase-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.phrase-head b { font-family: var(--serif); font-size: .95rem; }
.phrase-head span { font-size: .72rem; color: var(--muted); }
.phrase-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px; }
.phrase-group { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; align-items: start; }
.phrase-cat { font-size: .68rem; color: var(--accent); padding-top: 5px; white-space: nowrap; }
.phrase { border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: .76rem; line-height: 1.5; padding: 5px 10px; text-align: left; cursor: pointer; }
.phrase:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.icon-btn.on { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- 目标语快捷切换 ---------- */
.lang-switch {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; align-items: start;
  padding: 14px 18px 16px; margin-top: 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: linear-gradient(180deg, var(--panel), #101718);
  box-shadow: 0 16px 32px -32px rgba(21, 26, 31, .7);
}
.lang-switch.compact {
  grid-template-columns: 1fr; gap: 6px; padding: 10px 12px 12px;
  margin: 12px 0; border-left-width: 2px; box-shadow: none;
}
.lang-switch-head { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; min-width: 0; }
.lang-switch-label {
  font-family: var(--serif); font-size: .9rem; font-weight: 700;
  letter-spacing: .06em; color: var(--ink); white-space: nowrap;
}
.lang-switch-current { font-family: var(--mono); font-size: .64rem; color: var(--accent); letter-spacing: .03em; white-space: nowrap; }
.lang-chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.lang-chip {
  border: 1px solid var(--line); background: #141B1D; color: var(--ink-2);
  padding: 5px 12px 6px; cursor: pointer; border-radius: 2px; text-align: left;
  display: flex; flex-direction: column; gap: 1px; line-height: 1.3;
  transition: border-color .16s, background .16s, color .16s, transform .16s, box-shadow .16s;
}
.lang-chip b { font-size: .78rem; font-weight: 600; }
.lang-chip small { font-family: var(--serif); font-size: .66rem; color: var(--muted); letter-spacing: .02em; }
.lang-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 16px -14px rgba(21, 26, 31, .8); }
.lang-chip:hover small { color: var(--accent); }
.lang-chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: inset 3px 0 0 var(--accent); }
.lang-chip.on small { color: #87979A; }
.lang-switch.compact .lang-chip { padding: 4px 9px 5px; }
.lang-switch.compact .lang-chip b { font-size: .74rem; }

/* ---------- 语音输入 ---------- */
.mic-btn { touch-action: none; user-select: none; -webkit-user-select: none;
  border: 1px solid rgba(169, 59, 42, .28); background: var(--accent-soft); color: var(--accent);
  font-size: .74rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: background .16s, color .16s, border-color .16s;
}
.mic-btn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mic-btn:hover { border-color: var(--accent); color: var(--accent); }
.mic-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mic-btn.on::before { background: #1A2325; animation: blink 1.1s infinite; }
.mic-status { padding: 7px 14px; font-size: .74rem; color: var(--teal); border-top: 1px dashed var(--line); background: var(--teal-soft); line-height: 1.6; }
.mic-status[data-tone="warn"] { color: var(--warn); background: var(--amber-soft); }
.mic-meter { height: 4px; margin: 0 14px 8px; background: rgba(30, 90, 83, .14); border-radius: 2px; overflow: hidden; }
.mic-meter span { display: block; width: 2%; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: 2px; transition: width .08s linear; }
.mic-opts { display: flex; align-items: center; gap: 8px; padding: 6px 14px 8px; font-size: .7rem; color: var(--muted); border-top: 1px dashed var(--line-2); }
.mic-device {
  flex: 1 1 auto; min-width: 0; max-width: 220px; font-size: .7rem; padding: 3px 6px;
  border: 1px solid var(--line); background: #141B1D; color: var(--ink-2); border-radius: 2px; cursor: pointer;
}
.mic-link { border: 0; background: none; padding: 0; color: var(--teal); font-size: .7rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.mic-link:hover { color: var(--accent); }

/* ---------- 视觉润色 ---------- */
body {
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(30, 90, 83, .07), transparent 62%),
    radial-gradient(800px 420px at 0% 2%, rgba(169, 59, 42, .06), transparent 58%),
    var(--paper);
}
.topbar { border-top: 2px solid var(--ink); background: rgba(12,18,19,.94); }
.hero { position: relative; overflow: hidden; padding: 64px 0 50px; }
.hero::before {
  content: "ASEAN"; position: absolute; right: -.05em; bottom: -.24em;
  font-family: var(--serif); font-size: clamp(7rem, 17vw, 16rem); line-height: .8;
  letter-spacing: .02em; color: rgba(21, 26, 31, .035); pointer-events: none; user-select: none;
}
.hero .lede { font-size: 1.03rem; line-height: 1.95; }
.hero h1 em { position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .1em; background: rgba(169, 59, 42, .16); }
.hero-actions .btn { padding: 11px 21px; }
.hero-actions .btn:not(.ghost):hover { box-shadow: 0 12px 24px -14px rgba(169, 59, 42, .75); }
.console { border-top: 3px solid var(--accent); box-shadow: 0 28px 60px -38px rgba(21, 26, 31, .8); }
.page-head { background: linear-gradient(180deg, rgba(30, 90, 83, .05), transparent 82%); position: relative; border-bottom-color: var(--line-2); }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 68px; height: 2px; background: var(--accent); }
section.block { padding: 64px 0; }
.block-head { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.block-title { position: relative; padding-left: 14px; }
.block-title::before { content: ""; position: absolute; left: 0; top: .28em; bottom: .28em; width: 2px; background: var(--accent); }
.block-title h2 { text-wrap: balance; }
.module { transition: background .18s, transform .22s ease, box-shadow .22s ease; }
.module .n { display: inline-block; width: max-content; padding: 0 6px; border: 1px solid var(--line); }
.module:hover { transform: translateY(-3px); box-shadow: inset 0 2px 0 var(--accent), 0 22px 36px -30px rgba(21, 26, 31, .75); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-grid > div:first-child { animation: rise .5s ease-out both; }
.console { animation: rise .55s ease-out .08s both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.side-card, .panel, .pane { box-shadow: 0 18px 38px -36px rgba(21, 26, 31, .8); }
.pane-head { background: linear-gradient(180deg, #101718, #101718); }
.textarea { background: #141B1D; }
.textarea.boxed {
  border: 1px solid var(--line); background: #1A2325; padding: 10px;
  min-height: 88px; border-radius: var(--radius);
}
.textarea.boxed:focus { border-color: var(--ink); }
.output { background: linear-gradient(180deg, #141B1D, #101718); }
.btn { letter-spacing: .02em; }
.tag, .chip { transition: background .16s, color .16s, border-color .16s; }
footer { border-top: 2px solid var(--ink); }
.foot-grid h5 { letter-spacing: .08em; }

/* ---------- 细节打磨 ---------- */
.btn { transition: background .16s, color .16s, border-color .16s, transform .16s, box-shadow .16s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -18px rgba(169, 59, 42, .9); }
.btn.ghost:hover { transform: none; box-shadow: none; background: var(--accent-soft); }
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 3px rgba(169, 59, 42, .12); }
.phrase { transition: background .16s, color .16s, border-color .16s, transform .16s; }
.phrase:hover { transform: translateY(-1px); }
.pane { transition: box-shadow .22s ease, border-color .22s ease; }
.pane:focus-within { border-color: #253134; box-shadow: 0 26px 50px -42px rgba(21, 26, 31, .9); }
.panel { transition: box-shadow .22s ease; }
.panel:hover { box-shadow: 0 22px 44px -40px rgba(21, 26, 31, .85); }
table.data tbody tr:hover { background: #141B1D; }
.drawer-head { background: linear-gradient(180deg, var(--panel), #101718); }
.page-head h1 { text-wrap: balance; }

/* ---------- 特色功能 ---------- */
#features { scroll-margin-top: 84px; }
.feature-band {
  position: relative; overflow: hidden;
  background: var(--ink); color: #101718;
  padding: 56px 0 60px; border-top: 3px solid var(--accent);
}
.feature-band::before {
  content: "SIGNATURE"; position: absolute; right: -.06em; bottom: -.26em;
  font-family: var(--serif); font-size: clamp(5rem, 13vw, 12rem); line-height: .8;
  letter-spacing: .04em; color: rgba(255, 255, 255, .04);
  pointer-events: none; user-select: none;
}
.feature-band .wrap { position: relative; z-index: 1; }
.feature-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.feature-head .block-title h2 { color: #fff; }
.feature-head .block-title .en { color: #8f989f; }
.feature-head p { margin: 8px 0 0; color: #6B7891; font-size: .86rem; max-width: 640px; }
.feature-head .more { color: #87979A; white-space: nowrap; font-size: .78rem; }
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .16);
}
.feature-item {
  display: flex; flex-direction: column; background: #1b2228; padding: 22px 20px 18px;
  color: #101718; text-decoration: none; transition: background .18s, transform .22s ease;
}
.feature-item:hover { background: #232d35; text-decoration: none; }
.feature-item .tagx { font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; color: #d98a72; }
.feature-item h3 { font-family: var(--serif); font-size: 1.1rem; line-height: 1.45; margin: 12px 0 8px; color: #fff; }
.feature-item p { margin: 0; font-size: .8rem; line-height: 1.7; color: #7A869E; }
.feature-item .fx { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.feature-item .fx span {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .06em; color: #87979A;
  border: 1px solid rgba(255, 255, 255, .22); padding: 2px 6px;
}
.feature-item .go {
  display: flex; justify-content: space-between; align-items: center; margin-top: auto;
  padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--mono); font-size: .64rem; color: #8f989f;
}
.feature-item:hover .go { color: #e0b48f; }

/* ---------- 首屏信息条 / 交互状态 ---------- */
.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: 22px;
}
.hero-facts div { background: rgba(20,27,29,.72); padding: 10px 12px; min-width: 0; }
.hero-facts b {
  display: block; font-family: var(--mono); font-size: .58rem; font-weight: 600;
  letter-spacing: .14em; color: var(--accent); margin-bottom: 3px;
}
.hero-facts span { display: block; font-size: .74rem; line-height: 1.65; color: var(--ink-3); overflow-wrap: anywhere; }

.btn:active { transform: translateY(0); box-shadow: none; }
.btn.loading { pointer-events: none; opacity: .82; }
.btn.loading::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 问答：阶段进度 / 置信度 / 反馈 / 多轮 ---------- */
.stages { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; }
.stage {
  display: flex; align-items: center; gap: 7px; padding: 5px 9px;
  border: 1px solid var(--line); background: var(--paper);
  font-family: var(--mono); font-size: .63rem; letter-spacing: .03em; color: var(--muted);
}
.stage i {
  width: 16px; height: 16px; display: grid; place-items: center; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 50%; font-style: normal; font-size: .56rem;
}
.stage small { font-size: .58rem; opacity: .7; }
.stage.done { color: var(--teal); border-color: rgba(110,156,142,.4); background: var(--teal-soft); }
.stage.done i { color: #fff; background: var(--teal); border-color: var(--teal); }
.stage.active { color: var(--ink); border-color: var(--ink); }
.stage.active i { color: #fff; background: var(--accent); border-color: var(--accent); animation: blink 1.1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.stage-note { font-size: .78rem; color: var(--ink-3); }

.confidence-warn {
  border-left: 3px solid var(--amber); background: var(--amber-soft);
  padding: 8px 12px; margin: 0 0 14px; font-size: .78rem; line-height: 1.7; color: var(--ink-2);
}
.answer .status { flex-wrap: wrap; }
.status-tools { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; }
.link-btn {
  border: 0; background: none; padding: 2px 0; cursor: pointer;
  color: var(--teal); font-family: inherit; font-size: .72rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent); }
.answer-foot { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.answer .body p { margin: 0 0 9px; }

.chunk { scroll-margin-top: 92px; transition: background .3s, border-color .3s; }
.chunk:target { background: var(--accent-soft); border-left-color: var(--accent); }
.chunk .m a { color: var(--teal); }
.chunk-full summary { cursor: pointer; margin-top: 5px; font-size: .72rem; color: var(--teal); }
.chunk-full div { margin-top: 6px; padding-left: 9px; border-left: 2px solid var(--line-2); font-size: .78rem; line-height: 1.75; color: var(--ink-3); }

.fb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: var(--ink-3); }
.fb-btn {
  border: 1px solid var(--line); background: var(--panel); padding: 4px 12px;
  font-family: inherit; font-size: .75rem; cursor: pointer; border-radius: var(--radius);
}
.fb-btn:hover { border-color: var(--ink); }
.fb-btn.on { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.fb-reasons { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .73rem; color: var(--muted); }
.fb-reasons[hidden] { display: none; }
.fb-reasons button {
  border: 1px solid var(--line); background: var(--paper); padding: 3px 9px;
  font-family: inherit; font-size: .72rem; cursor: pointer; border-radius: var(--radius);
}
.fb-reasons button:hover { border-color: var(--accent); color: var(--accent); }
.fb-thanks { color: var(--teal); }

.qa-thread { margin-top: 16px; border: 1px solid var(--line); background: var(--panel); padding: 12px 16px; }
.qa-thread[hidden] { display: none; }
.thread-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .05em; color: var(--muted);
}
.turn { border-top: 1px dashed var(--line); padding: 8px 0; }
.turn summary { cursor: pointer; font-size: .79rem; line-height: 1.6; color: var(--ink); }
.turn summary .mono { color: var(--accent); margin-right: 6px; }
.turn .a { margin-top: 6px; font-size: .78rem; line-height: 1.8; color: var(--ink-3); white-space: pre-wrap; }
.turn .m { margin-top: 4px; font-family: var(--mono); font-size: .61rem; color: var(--muted); }

/* ---------- 翻译：场景入口 / 术语解释卡 / 译文切语 ---------- */
.scene-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.scene-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 6px 12px; border: 1px solid var(--line); background: var(--paper);
  font-family: inherit; cursor: pointer; border-radius: var(--radius);
  transition: border-color .16s, background .16s, color .16s;
}
.scene-tab b { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.scene-tab small { font-family: var(--mono); font-size: .55rem; letter-spacing: .1em; color: var(--muted); }
.scene-tab:hover { border-color: var(--accent); }
.scene-tab:hover b { color: var(--accent); }
.scene-tab.on { background: var(--ink); border-color: var(--ink); }
.scene-tab.on b { color: var(--paper); }
.scene-tab.on small { color: #87979A; }

.out-lang {
  height: 28px; max-width: 148px; padding: 0 6px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2); font-family: inherit;
  font-size: .72rem; border-radius: var(--radius); cursor: pointer;
}
.plain-panel { margin: 18px 0 0; }
.plain-panel[hidden] { display: none; }
.plain-out {
  margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line-2);
  background: var(--paper); color: var(--ink-2);
  font-size: .86rem; line-height: 1.9; white-space: pre-wrap;
}
.plain-out.muted { color: var(--muted); }
#termTip {
  position: fixed; z-index: 140; max-width: 260px; padding: 9px 11px;
  background: var(--ink); color: #0C1213; font-size: .72rem; line-height: 1.65;
  white-space: pre-line; pointer-events: none;
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .85);
}
#termTip[hidden] { display: none; }
.term-tip { cursor: help; }
.term-tip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 语言菜单：常用前置 + 其余折叠 */
.lang-menu {
  display: block; width: 230px; max-height: min(72vh, 520px); overflow-y: auto;
}
.lang-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lang-menu-grid[hidden] { display: none; }
.lang-menu .lang-more {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; margin: 5px 0; padding: 6px 8px;
  border: 0; border-top: 1px dashed var(--line); background: none;
  color: var(--muted); font-family: var(--mono); font-size: .62rem;
  letter-spacing: .04em; cursor: pointer; white-space: nowrap;
}
.lang-menu .lang-more span { color: var(--accent); }
.lang-menu .lang-more i { font-style: normal; font-size: .56rem; }
.lang-menu .lang-more:hover { color: var(--ink); }

/* 小屏导航按钮 */
.nav-toggle { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .split, .qa-grid, .brief-layout { grid-template-columns: 1fr; }
  .trans-grid { grid-template-columns: 1fr; }
  .swap { transform: rotate(90deg); }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-side { position: static; display: flex; flex-wrap: wrap; }
  .arch { grid-template-columns: repeat(2, 1fr); }
  .country-grid { grid-template-columns: 1fr; }
  .culture-grid { grid-template-columns: 1fr; }
  .phrase-groups { grid-template-columns: 1fr; }
  .lang-switch { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px 14px; }
  .lang-switch-head { flex-direction: row; align-items: baseline; gap: 10px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .btn { min-height: 42px; }
  .input, .select { min-height: 40px; }
  .feature-band { padding: 36px 0 40px; }
  .feature-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-item { padding: 18px 16px 14px; }
  .topbar-inner { height: 58px; gap: 8px; }
  .brand-text span { display: none; }
  .hero-grid > *, .trans-grid > *, .qa-grid > *, .split > * { min-width: 0; }
  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: clamp(1.9rem, 8.2vw, 2.4rem); }
  .hero .lede { font-size: .94rem; }
  .console { padding: 18px 16px 14px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; top: auto; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 2px; z-index: 45; gap: 0; justify-content: flex-start; scroll-behavior: smooth; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav a { font-size: .66rem; padding: 12px 5px; letter-spacing: -.01em; border-bottom: 0; border-top: 2px solid transparent; flex-shrink: 0; }
  .nav a.on { border-top-color: var(--accent); }
  body { padding-bottom: 58px; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .module { min-height: 190px; }
  .intel { grid-template-columns: 1fr; gap: 6px; }
  .intel .meta { display: flex; gap: 12px; }
  .intel .meta b { display: inline; }
  .brief-paper { padding: 24px 20px; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .input.search { min-width: 0; width: 100%; }
  .toolbar .field { width: 100%; }
  .field .input, .field .select { flex: 1; }
  .arch { grid-template-columns: 1fr; }
  .brief-layout > *, .brief-layout .panel, .lang-switch.compact { min-width: 0; }
  .pick > span { min-width: 0; overflow-wrap: anywhere; }
  .lang-switch.compact { max-width: 100%; }
  .brief-paper, .brief-paper p, .brief-paper .foot { overflow-wrap: anywhere; }
  .brief-paper a { word-break: break-all; }
  .brief-paper .bh { flex-wrap: wrap; gap: 8px; }
  .brief-paper .meta { text-align: left; }
}

@media print {
  body { background: #1A2325; }
  body::before, .topbar, .page-head, .toolbar, .pick-list, footer, .no-print { display: none !important; }
  .brief-paper { border: 0; box-shadow: none; padding: 0; }
  .brief-layout { display: block; }
}

/* ---------- 小屏：汉堡导航与新组件适配 ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  body { padding-bottom: 0; }
  .nav {
    display: none; position: fixed; left: 0; right: 0; top: 58px; bottom: auto;
    grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 14px 16px;
    background: var(--panel); border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--ink); z-index: 46;
    max-height: calc(100dvh - 58px); overflow-y: auto;
  }
  body.nav-open .nav { display: grid; }
  .nav a {
    font-size: .82rem; padding: 11px 10px; border: 1px solid var(--line-2);
    border-top: 1px solid var(--line-2); border-radius: var(--radius);
    white-space: normal; line-height: 1.4; letter-spacing: 0;
  }
  .nav a.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .nav a:hover { background: #1A2325; }
  .hero-facts { grid-template-columns: 1fr; }
  .stages { gap: 6px; }
  .stage { font-size: .6rem; padding: 4px 7px; }
  .stage small { display: none; }
  .status-tools { margin-left: 0; width: 100%; }
  .scene-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .scene-tab { width: 100%; }
  .lang-menu { width: min(260px, calc(100vw - 16px)); }
  .pane-head { flex-wrap: wrap; gap: 6px; }
  .pane-head .tools { flex-wrap: wrap; }
  .out-lang { max-width: 130px; }
  .top-tools { gap: 6px; }
  .lang-btn { max-width: 96px; }
  .lang-btn-label { display: inline-block; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
}

/* ---------- dark theme: solid surfaces ---------- */
.skip, .btn, .console, .stat, .tag.ink, .pager button.on, .chip.on, .lang-chip.on, .scene-tab.on, #termTip {
  background: #141B1D; border-color: #253134; color: #E5EDEA;
}
.btn { border-color: #253134; }
.btn:hover { background: #4FD1A5; border-color: #4FD1A5; color: #0C1213; }
.console { background: #101718; color: #C4CFCC; }
.console .stat { background: #141B1D; }
.feature-band { background: #101718; color: #C4CFCC; }
.side-card { background: #141B1D !important; border-color: #253134 !important; }
.module:hover, .pick:hover, table.data tbody tr:hover, .nav a:hover { background: #1A2325; }
.brief-paper { background: #141B1D; }
.textarea { background: #101718; color: #E5EDEA; }
.output { background: #101718; }
.pane-head { background: #101718; }
body::before { display: none; }

/* ============================================================
   浅色主题（Light theme）
   通过 html[data-theme="light"] 覆盖变量与硬编码深色表面
   ============================================================ */
html[data-theme="light"] {
  --ink: #1B2A26;
  --ink-2: #3D4A46;
  --ink-3: #5A6B66;
  --muted: #6E7F7A;
  --paper: #F3F6F5;
  --panel: #FFFFFF;
  --panel-2: #EDF2F0;
  --line: #D7E0DD;
  --line-2: #E4EBE8;
  --accent: #0EA47B;
  --accent-soft: rgba(14,164,123,.12);
  --teal: #2F7E6B;
  --teal-soft: rgba(47,126,107,.12);
  --amber: #D97706;
  --amber-soft: rgba(217,119,6,.12);
  --ok: #059669;
  --warn: #D97706;
  --shadow: 0 1px 0 rgba(30,40,36,.03), 0 12px 28px -18px rgba(30,40,36,.22);
}
html[data-theme="light"] body {
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(14,164,123,.05), transparent 62%),
    radial-gradient(800px 420px at 0% 2%, rgba(47,126,107,.06), transparent 58%),
    var(--paper);
}
/* 顶栏与语言按钮底色改为浅色半透明 */
html[data-theme="light"] .topbar { background: rgba(255,255,255,.94); }
html[data-theme="light"] .lang-btn { background: rgba(255,255,255,.7); }
/* 硬编码深色表面 → 浅色面板 */
html[data-theme="light"] .side-card { background: var(--panel) !important; border-color: var(--line) !important; }
html[data-theme="light"] .brief-paper { background: var(--panel); }
html[data-theme="light"] .textarea { background: var(--panel); color: var(--ink); }
html[data-theme="light"] .textarea.boxed { background: var(--panel-2); }
html[data-theme="light"] .output { background: var(--panel); }
html[data-theme="light"] .pane-head { background: var(--panel-2); }
html[data-theme="light"] .drawer-head { background: var(--panel); }
html[data-theme="light"] .lang-switch { background: linear-gradient(180deg, var(--panel), var(--panel-2)); }
html[data-theme="light"] .lang-chip { background: var(--panel); }
html[data-theme="light"] .mic-device { background: var(--panel); }
html[data-theme="light"] .hero-facts div { background: var(--panel); }
/* 悬停态改为浅色 */
html[data-theme="light"] .module:hover,
html[data-theme="light"] .pick:hover,
html[data-theme="light"] table.data tbody tr:hover,
html[data-theme="light"] .nav a:hover { background: var(--panel-2); }
/* 墨色按钮 / 选中态：浅色主题下用墨色底 + 白字，hover 用主色 */
html[data-theme="light"] .btn { background: var(--ink); border-color: var(--ink); color: #fff; }
html[data-theme="light"] .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="light"] .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
html[data-theme="light"] .btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
html[data-theme="light"] .skip,
html[data-theme="light"] .tag.ink,
html[data-theme="light"] .pager button.on,
html[data-theme="light"] .chip.on,
html[data-theme="light"] .lang-chip.on,
html[data-theme="light"] .scene-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
html[data-theme="light"] .lang-chip.on small,
html[data-theme="light"] .scene-tab.on small { color: var(--muted); }
html[data-theme="light"] .icon-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* 术语命中高亮使用浅色主色 */
html[data-theme="light"] .output .hit,
html[data-theme="light"] .src-preview-body .hit { background: var(--accent-soft); border-bottom-color: var(--accent); }
/* 控制台 / 招牌区块保持深色反色设计 */
html[data-theme="light"] .console { background: #101718; color: #C4CFCC; }
html[data-theme="light"] .console .stat { background: #141B1D; }
html[data-theme="light"] .feature-band { background: #101718; color: #C4CFCC; }