﻿/* =========================================================
   鐮旇嫳绮捐 路 璁捐绯荤粺
   绾稿紶鏆栫櫧 + 澧ㄧ豢 + 榛勯摐閲戯紝闃呰浼樺厛锛屾墦鍗板弸濂?   ========================================================= */

:root {
  --paper: #f3eee3;
  --paper-deep: #ece5d6;
  --surface: #fffdf8;
  --surface-2: #f8f4ea;
  --ink: #17251f;
  --ink-2: #34463d;
  --ink-3: #66766d;
  --ink-4: #8d9a92;
  --line: #e0d9c8;
  --line-strong: #cfc6b1;
  --emerald: #0d5c46;
  --emerald-2: #14795c;
  --emerald-3: #e5f0ea;
  --gold: #b4883f;
  --gold-2: #d9c08a;
  --red: #b23b32;
  --red-2: #fbf0ed;
  --blue: #2e5b9a;
  --shadow-sm: 0 2px 8px rgba(23, 37, 31, .05);
  --shadow-md: 0 14px 40px rgba(23, 37, 31, .09);
  --shadow-lg: 0 30px 80px rgba(23, 37, 31, .14);
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --serif-zh: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sidebar-w: 268px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(180, 136, 63, .08), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--emerald); text-decoration: none; }
svg { width: 20px; height: 20px; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { background: rgba(180, 136, 63, .28); }

/* ---------- 婊氬姩鏉?---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(23, 37, 31, .18); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(23, 37, 31, .3); background-clip: content-box; border: 3px solid transparent; }

/* =========================================================
   渚ц竟鏍?   ========================================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 20px;
  color: #e9e4d4;
  background:
    radial-gradient(500px 260px at 15% 0%, rgba(67, 122, 99, .35), transparent 65%),
    linear-gradient(165deg, #17342a 0%, #10241c 52%, #0c1a15 100%);
  border-right: 1px solid rgba(217, 192, 138, .12);
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  background-image: radial-gradient(rgba(255, 255, 255, .9) .6px, transparent .6px);
  background-size: 5px 5px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 26px; position: relative; z-index: 1; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  color: #0d2a21;
  background: linear-gradient(145deg, #e7d3a3, #bf9552);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px rgba(0, 0, 0, .25);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif-zh); font-size: 20px; letter-spacing: .12em; color: #f6f1e2; }
.brand-text span { font-size: 8.5px; letter-spacing: .18em; color: rgba(233, 228, 212, .45); margin-top: 3px; }

.new-btn {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 16px;
  border: 1px solid rgba(217, 192, 138, .35);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(217, 192, 138, .16), rgba(217, 192, 138, .05));
  color: #f1e9d4;
  font-weight: 600;
  letter-spacing: .04em;
  transition: .2s;
}
.new-btn:hover { background: rgba(217, 192, 138, .22); border-color: rgba(217, 192, 138, .6); transform: translateY(-1px); }
.new-btn svg { width: 18px; height: 18px; color: var(--gold-2); }

.nav { margin-top: 26px; display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 11px 14px;
  border: 0; border-radius: 9px;
  background: transparent;
  color: rgba(233, 228, 212, .72);
  font-size: 14px;
  text-align: left;
  transition: .18s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(217, 192, 138, .13); color: #f3e6c6; }
.nav-item.active svg { color: var(--gold-2); opacity: 1; }
.nav-item em {
  margin-left: auto; font-style: normal; font-size: 11px;
  min-width: 22px; height: 19px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 20px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7);
}
.nav-item em:empty { display: none; }

.mini-history { margin-top: 30px; position: relative; z-index: 1; min-height: 0; display: flex; flex-direction: column; }
.mini-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 10px; }
.mini-head span { font-size: 10.5px; letter-spacing: .18em; color: rgba(233, 228, 212, .38); }
.mini-head button { border: 0; background: none; color: rgba(233, 228, 212, .45); font-size: 11px; padding: 2px; }
.mini-head button:hover { color: var(--gold-2); }
.mini-list { display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.mini-item {
  border: 0; background: transparent; text-align: left;
  padding: 8px 10px; border-radius: 7px;
  display: flex; flex-direction: column; gap: 1px;
  color: rgba(233, 228, 212, .7);
  transition: .18s;
}
.mini-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.mini-item b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mini-item span { font-size: 10.5px; color: rgba(233, 228, 212, .35); }
.mini-empty { padding: 10px 12px; font-size: 12px; color: rgba(233, 228, 212, .35); line-height: 1.6; }

.sidebar-foot { margin-top: auto; position: relative; z-index: 1; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .07); }
.auth-status { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: rgba(233, 228, 212, .55); padding: 0 4px 10px; }
.auth-status i { width: 7px; height: 7px; border-radius: 50%; background: #c9a24f; box-shadow: 0 0 0 3px rgba(201, 162, 79, .15); flex: none; }
.auth-status.ok i { background: #58b98d; box-shadow: 0 0 0 3px rgba(88, 185, 141, .15); }
.auth-status.bad i { background: #d06a5f; box-shadow: 0 0 0 3px rgba(208, 106, 95, .15); }
.ghost-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px;
  border: 0; border-radius: 8px; background: none;
  color: rgba(233, 228, 212, .55); font-size: 13px;
}
.ghost-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ghost-btn svg { width: 17px; height: 17px; }
.sidebar-note { font-size: 10.5px; line-height: 1.7; color: rgba(233, 228, 212, .28); margin: 14px 4px 0; }

/* =========================================================
   涓诲尯鍩?/ 椤舵爮
   ========================================================= */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 62px; flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 34px;
  background: rgba(243, 238, 227, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(207, 198, 177, .5);
}
.crumb { font-size: 12.5px; letter-spacing: .08em; color: var(--ink-3); display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.save-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-4); letter-spacing: .02em; white-space: nowrap; flex: none; }
.save-hint i { width: 6px; height: 6px; border-radius: 50%; background: #3ca878; flex: none; }
.menu-btn { display: none !important; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
  transition: .18s;
}
.icon-btn:hover { background: rgba(23, 37, 31, .06); border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }

.view { width: 100%; max-width: 1180px; margin: 0 auto; padding: 34px 40px 90px; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font-size: 13.5px; font-weight: 500;
  transition: .18s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-2); border-color: var(--emerald-2); }
.btn-gold { background: linear-gradient(135deg, #c29a52, #a97e34); border-color: #a97e34; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--red); border-color: #e6c8c3; background: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 15px 24px; font-size: 15px; border-radius: 11px; }

/* =========================================================
   棣栭〉
   ========================================================= */
.hero { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; padding: 24px 0 10px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .22em; font-weight: 600;
  color: var(--gold); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold-2); }
.hero h1 {
  font-family: var(--serif-zh); font-weight: 700;
  font-size: clamp(38px, 3.6vw, 54px);
  line-height: 1.28; letter-spacing: .01em;
  margin: 18px 0 20px; color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--emerald); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 8px;
  background: linear-gradient(90deg, rgba(217, 192, 138, .55), rgba(217, 192, 138, .08));
  z-index: -1; border-radius: 2px;
}
.hero .lede { font-size: 15px; line-height: 2; color: var(--ink-3); max-width: 500px; margin: 0 0 30px; }
.hero-stats { display: flex; gap: 38px; padding-top: 8px; }
.stat b { display: block; font-family: var(--serif); font-size: 25px; color: var(--emerald); line-height: 1.2; }
.stat span { font-size: 11.5px; color: var(--ink-4); letter-spacing: .05em; }
.hero-quote { margin-top: 34px; padding-left: 16px; border-left: 2px solid var(--gold-2); font-family: var(--serif); font-size: 13.5px; font-style: italic; color: var(--ink-3); line-height: 1.8; }

/* 涓婁紶鍗＄墖 */
.upload-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.upload-card::before {
  content: ""; position: absolute; inset: 7px; border-radius: 15px;
  border: 1px solid rgba(180, 136, 63, .12); pointer-events: none;
}
.upload-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.upload-head h2 { font-family: var(--serif-zh); font-size: 19px; margin: 0; letter-spacing: .04em; }
.upload-head span { font-size: 11px; color: var(--ink-4); letter-spacing: .08em; }
.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: 13px;
  background: linear-gradient(180deg, #fbf8f1, #f7f2e7);
  padding: 26px 18px;
  text-align: center;
  transition: .2s;
  cursor: pointer;
  overflow: hidden;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--emerald-2); background: #f2f7f3; }
.dropzone.dragover { box-shadow: inset 0 0 0 3px rgba(13, 92, 70, .08); }
.dz-icon {
  width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--emerald); color: #fff;
  box-shadow: 0 8px 18px rgba(13, 92, 70, .22);
}
.dz-icon svg { width: 22px; height: 22px; }
.dropzone b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 3px; }
.dropzone p { margin: 0; font-size: 11.5px; color: var(--ink-4); }
.dropzone input { display: none; }
.dz-badge {
  position: absolute; top: 10px; right: 12px;
  font-size: 9.5px; letter-spacing: .08em; color: var(--gold);
  border: 1px solid rgba(180, 136, 63, .3); padding: 2px 6px; border-radius: 20px;
}

.preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.preview-item { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 4; background: #eee; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item button {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: rgba(15, 25, 21, .72); color: #fff;
  display: grid; place-items: center; font-size: 12px; line-height: 1;
}
.preview-item span { position: absolute; left: 5px; bottom: 4px; font-size: 9px; color: #fff; background: rgba(15, 25, 21, .6); padding: 0 5px; border-radius: 3px; }
.preview-add {
  aspect-ratio: 3 / 4; border: 1.5px dashed var(--line-strong); border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-4); background: #fbf8f1;
}
.preview-add:hover { border-color: var(--emerald); color: var(--emerald); }

.field-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.field-label { font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; flex: none; }
.segmented { display: flex; flex-wrap: wrap; gap: 3px; background: #f3eee3; border: 1px solid var(--line); border-radius: 8px; padding: 3px; flex: 1; }
.segmented button {
  border: 0; background: transparent; border-radius: 6px;
  padding: 5px 9px; font-size: 11.5px; color: var(--ink-3);
  transition: .16s; flex: 1; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--surface); color: var(--emerald); font-weight: 600; box-shadow: 0 1px 4px rgba(23, 37, 31, .1); }

.upload-advanced { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.upload-advanced summary {
  font-size: 11.5px; color: var(--ink-4); cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 6px;
}
.upload-advanced summary::-webkit-details-marker { display: none; }
.upload-advanced summary::before { content: "+"; font-size: 13px; color: var(--gold); }
.upload-advanced[open] summary::before { content: "−"; }
.adv-body { display: flex; flex-direction: column; gap: 9px; padding-top: 11px; }
.adv-row { display: flex; align-items: center; gap: 8px; }
.adv-row label { font-size: 11.5px; color: var(--ink-3); width: 66px; flex: none; }
.select, .input, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; padding: 7px 9px; font-size: 12.5px; outline: none;
  transition: .15s;
}
.select:focus, .input:focus, .textarea:focus { border-color: var(--emerald-2); box-shadow: 0 0 0 3px rgba(13, 92, 70, .08); }
.textarea { resize: vertical; min-height: 54px; line-height: 1.6; }
.switch { position: relative; display: inline-flex; width: 34px; height: 19px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 20px; background: var(--line-strong); transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--emerald); }
.switch input:checked + i::after { transform: translateX(15px); }
.upload-actions { margin-top: 16px; }
.upload-actions .btn { width: 100%; }
.upload-note { text-align: center; font-size: 10.5px; color: var(--ink-4); margin: 9px 0 0; line-height: 1.6; }

/* 鐗规€?/ 娴佺▼ */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 64px 0 22px; }
.section-head h2 { font-family: var(--serif-zh); font-size: 25px; margin: 0; letter-spacing: .04em; }
.section-head p { margin: 0; font-size: 12px; color: var(--ink-4); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; position: relative; overflow: hidden;
}
.how-card .num {
  font-family: var(--serif); font-size: 44px; line-height: 1;
  color: rgba(180, 136, 63, .22); position: absolute; right: 16px; top: 8px;
}
.how-card h3 { font-size: 14.5px; margin: 0 0 7px; display: flex; align-items: center; gap: 8px; }
.how-card h3 i { width: 22px; height: 22px; border-radius: 50%; background: var(--emerald-3); color: var(--emerald); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; }
.how-card p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.75; }

.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.recent-card {
  display: flex; gap: 13px; align-items: center;
  padding: 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-align: left; transition: .18s;
}
.recent-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.recent-thumb { width: 54px; height: 68px; border-radius: 6px; object-fit: cover; background: #e9e2d4; flex: none; border: 1px solid var(--line); }
.recent-info { min-width: 0; }
.recent-info b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-info span { font-size: 10.5px; color: var(--ink-4); }
.recent-empty { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--ink-4); font-size: 12.5px; border: 1px dashed var(--line-strong); border-radius: 12px; }

/* =========================================================
   瑙ｆ瀽杩涜涓?   ========================================================= */
.progress-view { max-width: 780px; margin: 30px auto 0; }
.progress-head { text-align: center; margin-bottom: 34px; }
.progress-head h1 { font-family: var(--serif-zh); font-size: 32px; margin: 12px 0 8px; }
.progress-head p { color: var(--ink-3); font-size: 13.5px; margin: 0; }
.pulse-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); margin-right: 7px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(13, 92, 70, .35); } 50% { box-shadow: 0 0 0 7px rgba(13, 92, 70, 0); } }
.stage-list {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 8px 24px; box-shadow: var(--shadow-sm);
}
.stage {
  display: flex; gap: 16px; padding: 20px 0; position: relative;
  border-bottom: 1px dashed var(--line);
}
.stage:last-child { border-bottom: 0; }
.stage-icon {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: #f1ece1; color: var(--ink-4); font-family: var(--serif);
  border: 1px solid var(--line);
  transition: .3s;
}
.stage-icon svg { width: 18px; height: 18px; }
.stage.active .stage-icon { background: var(--emerald); border-color: var(--emerald); color: #fff; box-shadow: 0 0 0 5px rgba(13, 92, 70, .1); }
.stage.active .stage-icon .spinner { width: 16px; height: 16px; border-color: rgba(255, 255, 255, .28); border-top-color: #fff; }
.stage.done .stage-icon { background: var(--emerald-3); border-color: #c4ded2; color: var(--emerald); }
.stage.error .stage-icon { background: var(--red-2); border-color: #eccdc8; color: var(--red); font-weight: 700; }
.stage.error .stage-body b { color: var(--red); }
.stage.error .stage-status { color: var(--red); }
.stage-body { flex: 1; min-width: 0; }
.stage-body b { font-size: 14.5px; display: block; margin-bottom: 3px; }
.stage-body p { margin: 0; font-size: 12.5px; color: var(--ink-4); }
.stage.active .stage-body b { color: var(--emerald); }
.stage.done .stage-body b { color: var(--ink-2); }
.stage-status { font-size: 10.5px; color: var(--ink-4); letter-spacing: .06em; align-self: center; }
.stage.active .stage-status { color: var(--emerald); }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(13, 92, 70, .2); border-top-color: var(--emerald);
  animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 0 4px; }
.progress-meta { display: flex; gap: 18px; align-items: center; font-size: 11.5px; color: var(--ink-4); }
.progress-meta b { color: var(--ink-2); font-family: var(--mono); font-weight: 500; }
.progress-tip {
  margin-top: 24px; padding: 16px 18px; border-radius: 10px;
  background: rgba(180, 136, 63, .07); border: 1px solid rgba(180, 136, 63, .18);
  font-size: 12px; color: #7a6238; line-height: 1.8;
}
.progress-tip b { color: #5f4a25; }
.progress-error { margin-top: 20px; padding: 18px; border-radius: 10px; background: var(--red-2); border: 1px solid #eccdc8; color: #7c2f28; font-size: 13px; }
.progress-error b { display: block; margin-bottom: 4px; }

/* =========================================================
   璁蹭箟
   ========================================================= */
.guide-shell { position: relative; }
.doc-toolbar {
  position: sticky; top: 62px; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  margin: -10px -4px 22px; padding: 9px 12px;
  background: rgba(243, 238, 227, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(207, 198, 177, .55);
}
.doc-toolbar .title-mini { font-family: var(--serif-zh); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38%; }
.doc-toolbar .spacer { flex: 1; }
.paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  padding: 58px 64px 64px;
  position: relative;
}
.paper::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 4px;
  background: linear-gradient(90deg, rgba(180, 136, 63, .07), transparent 12%, transparent 88%, rgba(180, 136, 63, .05));
}

/* 鏂囨。澶?*/
.doc-head { border-bottom: 3px double var(--ink); padding-bottom: 26px; margin-bottom: 26px; }
.doc-kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
  background: var(--emerald-3); color: var(--emerald);
  border: 1px solid #cfe3d9;
}
.tag.gold { background: #fbf5e8; color: #8a6829; border-color: #ead9b7; }
.tag.red { background: var(--red-2); color: var(--red); border-color: #efd3ce; }
.tag.plain { background: #f4f0e6; color: var(--ink-3); border-color: var(--line); }
.doc-head h1 {
  font-family: var(--serif-zh); font-weight: 700;
  font-size: clamp(30px, 3vw, 40px); line-height: 1.35;
  margin: 0 0 10px; letter-spacing: .01em;
}
.doc-source { font-family: var(--serif); font-size: 13.5px; color: var(--ink-3); font-style: italic; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc-meta div { display: flex; flex-direction: column; gap: 1px; }
.doc-meta span { font-size: 10px; color: var(--ink-4); letter-spacing: .1em; }
.doc-meta b { font-size: 14px; font-weight: 600; }
.doc-meta b.good { color: var(--emerald); }
.doc-meta b.bad { color: var(--red); }

/* 瀵艰 */
.intro-card {
  display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px;
  padding: 22px 24px; margin: 26px 0 8px;
  background: linear-gradient(135deg, #faf6eb, #f6f0e1);
  border: 1px solid #e8ddc5; border-left: 3px solid var(--gold);
  border-radius: 3px;
}
.intro-card h3 { font-size: 10.5px; letter-spacing: .18em; color: var(--gold); margin: 0 0 6px; text-transform: uppercase; }
.intro-card p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.intro-card .gist { font-family: var(--serif-zh); font-size: 15.5px; line-height: 1.8; }
.intro-side { border-left: 1px dashed #ddcfb2; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.intro-side div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--ink-3); }
.intro-side b { font-family: var(--serif); color: var(--ink); font-size: 14px; }

.warn-banner {
  margin: 18px 0; padding: 11px 14px; border-radius: 6px;
  background: #fdf6e7; border: 1px solid #eddab3; color: #7c612a;
  font-size: 12px; line-height: 1.75;
}
.warn-banner b { display: block; margin-bottom: 2px; }

.legend-bar {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  padding: 10px 0; margin-top: 18px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--ink-4);
}
.legend-bar span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend-dot.correct { background: var(--emerald); }
.legend-dot.wrong { background: var(--red); }
.legend-dot.neutral { background: var(--line-strong); }

.doc-toc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 4px 0 6px; padding: 11px 0 10px;
  border-bottom: 1px solid var(--line);
}
.doc-toc .toc-label { font-size: 10px; letter-spacing: .16em; color: var(--ink-4); margin-right: 4px; }
.doc-toc button {
  font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 2px 9px; transition: .15s; background: transparent;
}
.doc-toc button:hover { color: var(--emerald); border-color: var(--emerald); background: var(--emerald-3); }

.demo-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; margin-bottom: 20px;
  border: 1px solid #d9c08a; border-radius: 8px;
  background: linear-gradient(135deg, #fbf5e5, #f7efdb);
  font-size: 12.5px; color: #6d5427;
}
.demo-banner b { color: #513d18; }
.demo-banner .btn { margin-left: auto; }

/* 绡囩珷 */
.passage { margin-top: 54px; scroll-margin-top: 130px; }
.passage-head { display: flex; align-items: flex-start; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); margin-bottom: 6px; }
.passage-index {
  font-family: var(--serif); font-size: 46px; line-height: .9;
  color: transparent; -webkit-text-stroke: 1px var(--gold); flex: none; margin-top: 2px;
}
.passage-head h2 { font-family: var(--serif-zh); font-size: 21px; margin: 0 0 3px; letter-spacing: .05em; }
.passage-head .p-fn { display: inline-block; font-size: 11px; color: var(--emerald); background: var(--emerald-3); border-radius: 3px; padding: 1px 7px; margin-left: 8px; vertical-align: 2px; letter-spacing: .05em; }
.passage-head p { margin: 0; font-size: 11.5px; color: var(--ink-4); }
.passage-head .p-tools { margin-left: auto; display: flex; gap: 6px; align-self: center; }

.block-label {
  display: flex; align-items: center; gap: 10px;
  margin: 30px 0 14px;
  font-size: 10.5px; letter-spacing: .18em; color: var(--ink-3);
  text-transform: uppercase;
}
.block-label::before { content: attr(data-no); font-family: var(--serif); color: var(--gold); font-size: 11px; letter-spacing: .05em; }
.block-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 閫愬彞 */
.dot-sentence { open-quote: none; }
.sent {
  position: relative;
  padding: 14px 16px 13px 18px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: background .2s, border-color .2s;
}
.sent + .sent { border-top: 1px dashed rgba(224, 217, 200, .65); }
.sent:hover { background: #fbf8f1; border-left-color: var(--gold-2); }
.sent-en {
  font-family: var(--serif); font-size: 18px; line-height: 1.95;
  color: #1d2c25; letter-spacing: .005em;
}
.sent-en .hl { background: linear-gradient(180deg, transparent 58%, rgba(217, 192, 138, .45) 58%); color: inherit; padding: 0 1px; border-radius: 2px; }
.sent-zh {
  margin-top: 8px; padding-left: 12px;
  border-left: 2px solid var(--line-strong);
  font-size: 13.5px; line-height: 1.85; color: var(--ink-3);
}
.sent-zh .zh-tag { font-size: 9.5px; letter-spacing: .1em; color: var(--gold); margin-right: 7px; border: 1px solid rgba(180, 136, 63, .35); padding: 0 4px; border-radius: 2px; vertical-align: 1px; }
.sent-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.word-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 3px 8px; border-radius: 5px;
  background: #f6f1e5; border: 1px solid #e9e0cc;
  font-size: 11.5px; line-height: 1.5;
  transition: .15s; text-align: left; max-width: 100%;
}
.word-chip .wc-top { display: inline-flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.word-chip .use {
  font-size: 10.5px; line-height: 1.5; color: #7d7462;
  border-top: 1px dashed rgba(180, 136, 63, .22); padding-top: 2px; margin-top: 1px;
}
.word-chip:hover { border-color: var(--gold-2); background: #fbf6e9; }
.word-chip b { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--ink); }
.word-chip .ipa { color: var(--gold); font-family: var(--serif); font-size: 11px; }
.word-chip .pos { color: var(--ink-4); font-style: italic; font-size: 10.5px; }
.word-chip .mean { color: var(--ink-2); }
.sent-phrases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.sent-phrase {
  display: inline-flex; align-items: baseline; gap: 5px; flex-wrap: wrap;
  padding: 3px 9px; border-radius: 999px;
  background: #eef6f1; border: 1px solid #d3e6db;
  font-size: 11.5px; color: #2f5f4a;
}
.sent-phrase b { font-family: var(--serif); font-size: 12.5px; color: #144a36; }
.sent-phrase em { font-style: normal; color: #3f6b57; }
.sent-phrase i { font-style: normal; font-size: 10.5px; color: #6f8d7c; }

.sent-analysis {
  margin-top: 9px; padding: 8px 11px;
  border-left: 2px solid #cbb27a; background: #fbf7ec; border-radius: 0 6px 6px 0;
  font-size: 12px; line-height: 1.75; color: var(--ink-2);
}
.sent-analysis .sa-row { display: flex; gap: 8px; }
.sent-analysis .sa-row + .sa-row { margin-top: 3px; }
.sent-analysis .sa-row b {
  flex: none; min-width: 30px; font-size: 10.5px; font-weight: 600;
  color: #8a6f35; letter-spacing: .04em; padding-top: 2px;
}
  .sent-note {
  margin-top: 8px; font-size: 11.5px; color: #7a6238;
  background: rgba(180, 136, 63, .07); border-radius: 4px;
padding: 4px 8px; display: inline-block; line-height: 1.7;
}
.sent-note b { color: #5f4a25; }

/* 绌烘牸鎸夐挳 */
.blank {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--emerald); background: var(--emerald);
  color: #fff; border-radius: 3px;
  font-family: var(--sans); font-size: 11px; line-height: 1;
  padding: 2px 4px; margin: 0 2px;
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(13, 92, 70, .2);
  transition: .15s;
}
.blank b { font-size: 10px; border-left: 1px solid rgba(255, 255, 255, .35); padding-left: 3px; margin-left: 1px; }
.blank:hover { transform: translateY(-3px); box-shadow: 0 3px 8px rgba(13, 92, 70, .28); }
.blank.wrong { background: var(--red); border-color: var(--red); }
.blank.neutral { background: #7b8a81; border-color: #7b8a81; }
.blank.flash { animation: blankFlash 1.2s ease; }
@keyframes blankFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 136, 63, 0); } 30% { box-shadow: 0 0 0 6px rgba(180, 136, 63, .3); } }

/* 鐭 */
.vocab-mini {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px;
  padding: 4px 0 12px; border-bottom: 1px dotted var(--line); margin-bottom: 12px;
}
.vocab-mini span { font-size: 12px; color: var(--ink-3); line-height: 1.7; padding: 2px 0; }
.vocab-mini b { font-family: var(--serif); font-size: 13px; color: var(--ink); font-weight: 600; }
.vocab-mini i { font-family: var(--serif); color: var(--gold); font-style: normal; font-size: 11px; }
.vocab-mini em { color: var(--ink-4); font-size: 10.5px; }
.sub-label { font-size: 10px; letter-spacing: .14em; color: var(--ink-4); margin: 0 0 7px; }
.phrase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.phrase-item { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.phrase-item b { font-family: var(--serif); font-size: 14px; color: var(--emerald); white-space: nowrap; }
.phrase-item span { font-size: 12.5px; color: var(--ink-3); }
.phrase-item em { font-style: normal; font-size: 10.5px; color: var(--ink-4); display: block; margin-top: 1px; }

/* 鍏ㄦ璇戞枃 */
.para-translation {
  padding: 15px 18px;
  background: #faf7ef; border: 1px solid var(--line); border-left: 3px solid var(--gold-2);
  border-radius: 0 6px 6px 0;
  font-size: 13.5px; line-height: 2; color: var(--ink-2);
  position: relative;
}
.para-translation::before {
  content: "译"; position: absolute; right: 14px; top: 8px;
  font-family: var(--serif-zh); font-size: 34px; color: rgba(180, 136, 63, .12);
}
.discourse { color: var(--emerald); font-weight: 700; }

/* 闀块毦鍙?*/
.long-card { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fdfbf6; overflow: hidden; }
.long-card summary {
  padding: 11px 15px; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-2);
}
.long-card summary::-webkit-details-marker { display: none; }
.long-card summary::before {
  content: "+"; width: 18px; height: 18px; border-radius: 50%;
  background: var(--emerald-3); color: var(--emerald);
  display: grid; place-items: center; font-size: 12px; flex: none;
}
.long-card[open] summary::before { content: "−"; }
.long-card summary .ls-tag { font-size: 9.5px; color: var(--gold); letter-spacing: .12em; border: 1px solid rgba(180, 136, 63, .3); padding: 0 5px; border-radius: 2px; flex: none; }
.long-card summary .ls-en { font-family: var(--serif); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.long-body { padding: 4px 18px 16px 43px; font-size: 12.5px; }
.long-body .ls-row { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.long-body .ls-row:last-child { border-bottom: 0; }
.long-body .ls-row > b { font-size: 10.5px; color: var(--gold); letter-spacing: .08em; font-weight: 600; }
.long-body .ls-row > div { color: var(--ink-2); line-height: 1.8; }
.long-body .clause { margin-bottom: 5px; }
.long-body .clause b { color: var(--emerald); font-weight: 600; }
.long-body .clause em { font-style: normal; font-size: 10.5px; color: var(--ink-4); border: 1px solid var(--line); padding: 0 4px; border-radius: 2px; margin-left: 5px; }

/* 棰樼洰鍗＄墖 */
.q-card {
  border: 1px solid var(--line); border-radius: 10px;
  background: #fffefa; margin-top: 18px;
  scroll-margin-top: 130px;
  overflow: hidden;
  transition: box-shadow .25s, border-color .25s;
}
.q-card.flash { box-shadow: 0 0 0 3px rgba(180, 136, 63, .28); border-color: var(--gold-2); }
.q-head {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 18px; background: #faf6ec; border-bottom: 1px solid var(--line);
}
.q-no {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  font-family: var(--serif); font-size: 17px;
}
.q-head-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-type { font-size: 10px; letter-spacing: .08em; color: var(--ink-3); background: #eee7d8; border-radius: 3px; padding: 2px 7px; }
.q-answer { font-size: 11.5px; color: var(--emerald); font-weight: 600; }
.q-answer b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 3px; background: var(--emerald); color: #fff; font-size: 11px; margin-left: 3px; }
.q-student { font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.q-student b { font-family: var(--serif); font-size: 13px; }
.q-student b.good { color: var(--emerald); }
.q-student b.bad { color: var(--red); }
.q-body { padding: 16px 18px 18px; }
.q-stem { font-family: var(--serif); font-size: 14.5px; line-height: 1.8; margin: 0 0 12px; color: var(--ink); }
.q-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 15px; }
.q-card.options-wide .q-options { grid-template-columns: 1fr; }
.opt {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 9px;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  background: #fdfbf6; font-size: 12.5px;
  overflow: hidden;
}
.opt-label {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-size: 11px; color: var(--ink-3);
  background: #fff; font-family: var(--serif);
}
.opt-main { min-width: 0; overflow-wrap: anywhere; }
.opt-main b { font-family: var(--serif); font-size: 13.5px; font-weight: 600; }
.opt-main .opt-mean { font-size: 11px; color: var(--ink-4); margin-left: 6px; white-space: nowrap; }
.opt-main p { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.opt-verdict { font-size: 9.5px; letter-spacing: .06em; align-self: start; color: var(--ink-4); }
.opt.correct { border-color: #bfdccd; background: #f2f8f4; }
.opt.correct .opt-label { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.opt.correct .opt-verdict { color: var(--emerald); font-weight: 600; }
.opt.wrong { opacity: .82; }

.q-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-panel { border: 1px solid var(--line); border-radius: 7px; padding: 12px 14px; background: #fdfcf8; }
.q-panel h4 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.q-panel ol { margin: 0; padding-left: 17px; }
.q-panel ol li { font-size: 12px; line-height: 1.75; color: var(--ink-2); margin-bottom: 4px; }
.q-panel ol li::marker { color: var(--gold); font-family: var(--serif); }
.clue-quote {
  margin: 0 0 7px; padding: 8px 10px;
  border-left: 2px solid var(--gold-2); background: #fbf7ec;
  font-family: var(--serif); font-size: 12px; line-height: 1.7; color: var(--ink-2);
}
.clue-explain { margin: 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.q-trap {
  margin-top: 12px; padding: 13px 15px;
  background: var(--red-2); border: 1px solid #efd6d1; border-left: 3px solid var(--red);
  border-radius: 4px;
}
.q-trap.good { background: #f1f7f3; border-color: #d3e6db; border-left-color: var(--emerald); }
.q-trap h4 { margin: 0 0 7px; font-size: 11.5px; letter-spacing: .04em; color: var(--red); }
.q-trap.good h4 { color: var(--emerald); }
.q-trap .trap-choice {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  background: var(--red); color: #fff; border-radius: 3px;
  font-family: var(--serif); font-size: 12px; margin-right: 6px; vertical-align: -3px;
}
.q-trap.good .trap-choice { background: var(--emerald); }
.q-trap p { margin: 0 0 6px; font-size: 12px; line-height: 1.8; color: #63342f; }
.q-trap.good p { color: #285440; }
.q-trap p:last-child { margin-bottom: 0; }
.q-trap .lesson { padding-top: 6px; border-top: 1px dashed rgba(178, 59, 50, .22); }
.q-trap .lesson b { color: var(--red); }
.q-trap.good .lesson b { color: var(--emerald); }
.q-empty { font-size: 11.5px; color: var(--ink-4); padding: 10px; border: 1px dashed var(--line); border-radius: 5px; }

/* 绔犺妭 */
.chapter { margin-top: 66px; scroll-margin-top: 120px; }
.chapter-head { display: flex; align-items: flex-end; gap: 16px; border-bottom: 3px double var(--ink); padding-bottom: 14px; margin-bottom: 26px; }
.chapter-no { font-family: var(--serif); font-size: 13px; color: var(--gold); letter-spacing: .12em; border: 1px solid var(--gold-2); padding: 4px 9px; border-radius: 2px; }
.chapter-head h2 { font-family: var(--serif-zh); font-size: 26px; margin: 0; letter-spacing: .05em; }
.chapter-head p { margin: 0 0 3px auto; font-size: 11px; color: var(--ink-4); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold-2), var(--line)); }
.flow-item { position: relative; padding: 0 0 22px 18px; }
.flow-item::before {
  content: ""; position: absolute; left: -27px; top: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--gold);
}
.flow-item:last-child { padding-bottom: 0; }
.flow-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.flow-p { font-family: var(--serif); font-size: 11px; color: var(--gold); letter-spacing: .1em; border: 1px solid rgba(180, 136, 63, .3); padding: 1px 7px; border-radius: 20px; }
.flow-top h3 { margin: 0; font-size: 14.5px; }
.flow-item p { margin: 0 0 5px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.flow-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.flow-tags span { font-size: 10.5px; color: var(--ink-3); background: #f3eee3; border-radius: 3px; padding: 1px 7px; }
.flow-tags span b { color: var(--ink-2); font-weight: 500; }
.pattern-card {
  margin-top: 26px; padding: 20px 22px;
  background: var(--emerald); color: #f0ece0; border-radius: 6px;
  position: relative; overflow: hidden;
}
.pattern-card::after {
  content: "”"; position: absolute; right: 18px; top: -18px;
  font-family: var(--serif); font-size: 110px; color: rgba(255, 255, 255, .07);
}
.pattern-card h3 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .18em; color: var(--gold-2); }
.pattern-card .pattern { font-family: var(--serif-zh); font-size: 21px; margin: 0 0 8px; color: #fff; }
.pattern-card p { margin: 0; font-size: 13px; line-height: 1.9; color: rgba(240, 236, 224, .82); }

/* 澶嶇洏 */
.answer-card {
  display: flex; align-items: center; gap: 24px;
  padding: 18px 22px; background: #f8f4e9; border: 1px solid #e7dcc4; border-radius: 6px;
}
.answer-card .label { font-size: 10.5px; letter-spacing: .16em; color: var(--gold); flex: none; }
.answer-card strong { font-family: var(--serif); font-size: 21px; letter-spacing: .12em; color: var(--ink); line-height: 1.5; }
.vocab-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 12.5px; }
.vocab-table th {
  text-align: left; font-size: 9.5px; letter-spacing: .12em; color: var(--ink-4);
  font-weight: 500; padding: 0 10px 7px; border-bottom: 1px solid var(--ink);
}
.vocab-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.vocab-table td:first-child { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--emerald); white-space: nowrap; }
.vocab-table td.ipa { font-family: var(--serif); color: var(--gold); white-space: nowrap; }
.vocab-table td.pos { color: var(--ink-4); font-style: italic; white-space: nowrap; }
.vocab-table td.note { color: var(--ink-3); font-size: 11.5px; }
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.tip-card { padding: 13px 15px; border: 1px solid var(--line); border-radius: 5px; background: #fdfbf6; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); display: flex; gap: 10px; }
.tip-card i { font-style: normal; font-family: var(--serif); color: var(--gold); font-size: 12px; flex: none; }
.next-steps { margin-top: 18px; border-left: 2px solid var(--emerald); padding: 2px 0 2px 16px; }
.next-steps h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; color: var(--emerald); }
.next-steps li { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); margin-bottom: 3px; }
.doc-foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 10px; color: var(--ink-4); letter-spacing: .08em; }

/* =========================================================
   鍘嗗彶
   ========================================================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 10px 0 26px; }
.page-head h1 { font-family: var(--serif-zh); font-size: 32px; margin: 0 0 4px; }
.page-head p { margin: 0; font-size: 12.5px; color: var(--ink-4); }
.history-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hist-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: .2s; position: relative;
}
.hist-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.hist-cover { aspect-ratio: 16 / 7; background: linear-gradient(135deg, #17342a, #0d5c46); position: relative; overflow: hidden; }
.hist-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: .82; }
.hist-cover .cover-tags { position: absolute; top: 9px; left: 9px; display: flex; gap: 5px; }
.hist-cover .cover-tags .tag { background: rgba(255, 253, 248, .9); border-color: transparent; }
.hist-body { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; }
.hist-body h3 { font-family: var(--serif-zh); font-size: 15.5px; margin: 0 0 3px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-body .hist-meta { font-size: 10.5px; color: var(--ink-4); display: flex; gap: 10px; flex-wrap: wrap; }
.hist-stats { display: flex; gap: 16px; margin: 11px 0 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hist-stats div { display: flex; flex-direction: column; }
.hist-stats b { font-family: var(--serif); font-size: 17px; color: var(--emerald); line-height: 1.2; }
.hist-stats span { font-size: 9.5px; color: var(--ink-4); }
.hist-actions { margin-top: auto; display: flex; gap: 6px; }
.hist-actions .btn { flex: 1; padding: 6px 8px; font-size: 11.5px; }
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(255, 253, 248, .6); }
.empty-state .empty-icon { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%; background: var(--emerald-3); color: var(--emerald); display: grid; place-items: center; }
.empty-state .empty-icon svg { width: 26px; height: 26px; }
.empty-state h3 { font-family: var(--serif-zh); font-size: 20px; margin: 0 0 6px; }
.empty-state p { margin: 0 0 18px; font-size: 12.5px; color: var(--ink-4); }

/* =========================================================
   寮圭獥 / Toast
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 26, 21, .45); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: min(560px, 100%); max-height: min(86vh, 720px); overflow: auto;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 26px 28px; animation: modalUp .25s ease;
}
@keyframes modalUp { from { transform: translateY(12px); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-head h2 { font-family: var(--serif-zh); font-size: 21px; margin: 0 0 3px; }
.modal-head p { margin: 0; font-size: 11.5px; color: var(--ink-4); }
.modal-section { margin-bottom: 20px; }
.modal-section h3 { font-size: 10.5px; letter-spacing: .14em; color: var(--gold); margin: 0 0 8px; }
.radio-card { display: flex; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 7px; cursor: pointer; transition: .15s; }
.radio-card:hover { border-color: var(--line-strong); }
.radio-card.selected { border-color: var(--emerald); background: #f4f9f6; }
.radio-card input { margin-top: 3px; accent-color: var(--emerald); }
.radio-card div { min-width: 0; }
.radio-card b { display: block; font-size: 13px; }
.radio-card span { font-size: 11px; color: var(--ink-4); line-height: 1.6; display: block; }
.radio-card .status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); margin-right: 5px; }
.radio-card .status-dot.ok { background: #3ca878; }
.radio-card .status-dot.bad { background: var(--red); }
.key-field { margin-top: 8px; }
.key-field label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-row label { font-size: 11px; color: var(--ink-3); display: block; margin-bottom: 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 22px; }
.modal-note { font-size: 10.5px; color: var(--ink-4); line-height: 1.7; margin-top: 14px; }
.help-list { margin: 0; padding-left: 20px; }
.help-list li { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); margin-bottom: 8px; }
.help-list li::marker { color: var(--gold); font-family: var(--serif); }
.help-list b { color: var(--emerald); }
.invite-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.invite-row code {
  flex: 1; min-width: 0;
  padding: 9px 12px;
  border: 1px dashed #d9c08a; border-radius: 7px;
  background: #fbf5e5; color: #5d4a26;
  font-family: var(--mono); font-size: 14px; letter-spacing: .06em;
  word-break: break-all;
}
.invite-row .btn { flex: none; }

.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 9px 18px; border-radius: 8px;
  background: rgba(20, 35, 29, .94); color: #f3eee2;
  font-size: 12.5px; box-shadow: var(--shadow-md);
  animation: toastIn .25s ease; max-width: 90vw;
}
.toast.error { background: #7e2c25; }
.toast.success { background: #12543f; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   AI 鍔╂暀
   ========================================================= */
.chat-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 70;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 30px; border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(135deg, #14795c, #0b4d3a);
  color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(13, 92, 70, .32);
  transition: .2s; opacity: 0; pointer-events: none; transform: translateY(10px);
}
.chat-fab.show { opacity: 1; pointer-events: auto; transform: none; }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(13, 92, 70, .4); }
.chat-fab svg { width: 18px; height: 18px; }

.chat-panel {
  position: fixed; right: 26px; bottom: 26px; z-index: 80;
  width: 402px; height: min(690px, calc(100vh - 52px));
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(16px) scale(.98);
  transition: .22s cubic-bezier(.2, .8, .3, 1);
  transform-origin: bottom right;
}
.chat-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; background: linear-gradient(135deg, #17342a, #0d5c46); color: #f2ecdd;
}
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #e7d3a3, #bf9552); color: #17342a; display: grid; place-items: center; font-family: var(--serif-zh); font-size: 15px; flex: none; }
.chat-head div:nth-child(2) { flex: 1; min-width: 0; }
.chat-head strong { display: block; font-size: 13.5px; }
.chat-head span { font-size: 10.5px; color: rgba(242, 236, 221, .58); }
.chat-head .icon-btn { color: rgba(255, 255, 255, .7); }
.chat-head .icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.chat-banner {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 15px; background: #f8f4e9; border-bottom: 1px solid var(--line);
  font-size: 10.5px; color: var(--ink-3);
}
.chat-banner svg { width: 13px; height: 13px; color: var(--gold); }
.chat-banner span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-messages { flex: 1; overflow-y: auto; padding: 15px 15px 6px; display: flex; flex-direction: column; gap: 11px; background: #fdfbf6; }
.msg { display: flex; gap: 8px; max-width: 92%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { width: 25px; height: 25px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 10px; font-family: var(--serif-zh); }
.msg.assistant .avatar { background: var(--emerald-3); color: var(--emerald); }
.msg.user .avatar { background: #e8dfcc; color: #6d5a34; }
.msg .bubble {
  padding: 9px 12px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.75;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-2); word-break: break-word;
}
.msg.user .bubble { background: var(--emerald); border-color: var(--emerald); color: #f5f2e8; border-top-right-radius: 3px; }
.msg.assistant .bubble { border-top-left-radius: 3px; }
.msg .bubble p { margin: 0 0 6px; }
.msg .bubble p:last-child { margin-bottom: 0; }
.msg .bubble ul { margin: 4px 0; padding-left: 16px; }
.msg .bubble li { margin-bottom: 2px; }
.msg .bubble strong { color: var(--emerald); font-weight: 600; }
.msg.user .bubble strong { color: #fff; }
.msg .bubble code { background: rgba(23, 37, 31, .07); padding: 1px 4px; border-radius: 3px; font-family: var(--mono); font-size: 11px; }
.chat-thinking { display: inline-flex; gap: 4px; align-items: center; padding: 3px 0; }
.chat-thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--emerald); opacity: .35; animation: chatDot 1.2s infinite; }
.chat-thinking i:nth-child(2) { animation-delay: .15s; }
.chat-thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.chat-suggestions { display: flex; gap: 5px; flex-wrap: wrap; padding: 7px 14px 9px; background: #fdfbf6; border-top: 1px solid var(--line); }
.chat-suggestions button {
  border: 1px solid var(--line); background: #fff; border-radius: 20px;
  padding: 4px 9px; font-size: 10.5px; color: var(--ink-3);
  transition: .15s; text-align: left;
}
.chat-suggestions button:hover { border-color: var(--emerald); color: var(--emerald); }
.chat-form { display: flex; gap: 6px; align-items: flex-end; padding: 10px 12px 6px; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea {
  flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 8px 10px; font-size: 12.5px; line-height: 1.55; min-height: 36px; max-height: 110px;
  outline: none; background: #fdfbf6;
}
.chat-form textarea:focus { border-color: var(--emerald); background: #fff; }
.chat-form button {
  width: 36px; height: 36px; border-radius: 9px; border: 0;
  background: var(--emerald); color: #fff; display: grid; place-items: center; flex: none;
}
.chat-form button:disabled { opacity: .4; }
.chat-form button svg { width: 17px; height: 17px; }
.chat-hint { margin: 0; padding: 0 12px 9px; font-size: 9px; color: var(--ink-4); text-align: center; background: #fff; }

/* =========================================================
   鍏朵粬
   ========================================================= */
.scrim { display: none; }
.noscript { padding: 30px; text-align: center; background: #fff; }
.muted { color: var(--ink-4); }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }

/* =========================================================
   鐧诲綍 / 棣栨鍒涘缓璐﹀彿
   ========================================================= */
body.auth-locked #app,
body.auth-locked .chat-fab,
body.auth-locked .chat-panel { display: none !important; }
[hidden] { display: none !important; }

.auth-screen {
  position: fixed; inset: 0; z-index: 300;
  overflow-y: auto;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 700px at 78% -12%, rgba(180, 136, 63, .18), transparent 62%),
    radial-gradient(900px 600px at 8% 110%, rgba(13, 92, 70, .12), transparent 55%),
    var(--paper);
}
.auth-shell {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 48px));
  display: grid; grid-template-columns: 1.04fr .96fr;
  border: 1px solid rgba(207, 198, 177, .7);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 34px 90px rgba(23, 37, 31, .22);
  background: var(--surface);
}
.auth-art {
  position: relative;
  padding: 44px 48px 38px;
  display: flex; flex-direction: column;
  color: #ece6d6;
  background:
    radial-gradient(600px 340px at 85% -10%, rgba(217, 192, 138, .18), transparent 65%),
    linear-gradient(160deg, #17342a 0%, #10241c 52%, #0b1913 100%);
  overflow: hidden;
}
.auth-art::after {
  content: "READ";
  position: absolute; right: -18px; bottom: -38px;
  font-family: var(--serif); font-size: 190px; letter-spacing: -.05em;
  color: rgba(255, 255, 255, .028); pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .brand-text strong { color: #f6f1e2; }
.auth-brand .brand-text span { color: rgba(233, 228, 212, .4); }
.auth-art-body { margin-top: auto; padding: 42px 0 30px; position: relative; z-index: 1; }
.auth-art .eyebrow { color: var(--gold-2); }
.auth-art .eyebrow::before { background: rgba(217, 192, 138, .55); }
.auth-art h1 {
  font-family: var(--serif-zh); font-size: clamp(32px, 3.1vw, 45px);
  line-height: 1.35; margin: 16px 0 16px; color: #f8f4e8; letter-spacing: .01em;
}
.auth-art h1 em { font-style: normal; color: var(--gold-2); }
.auth-lede { font-size: 13.5px; line-height: 1.95; color: rgba(236, 230, 214, .62); max-width: 430px; margin: 0 0 28px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; flex-direction: column; gap: 2px; padding-left: 16px; position: relative; }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-2); }
.auth-points b { font-size: 13px; color: #f1ebdc; font-weight: 600; letter-spacing: .02em; }
.auth-points span { font-size: 11.5px; line-height: 1.75; color: rgba(236, 230, 214, .48); }
.auth-quote {
  position: relative; z-index: 1; margin-top: 26px; padding-top: 18px;
  border-top: 1px solid rgba(217, 192, 138, .18);
  font-family: var(--serif); font-size: 12px; font-style: italic;
  line-height: 1.85; color: rgba(236, 230, 214, .42);
}

.auth-form-side {
  display: grid; place-items: center;
  padding: 38px 42px;
  background:
    radial-gradient(500px 300px at 110% -10%, rgba(180, 136, 63, .09), transparent 60%),
    var(--surface);
}
.auth-card { width: min(382px, 100%); }
.auth-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; color: var(--ink-3); font-size: 12.5px; }
.auth-loading .spinner { width: 20px; height: 20px; border-color: rgba(13, 92, 70, .18); border-top-color: var(--emerald); }
.auth-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.auth-mini-icon {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  color: var(--emerald); background: var(--emerald-3); border: 1px solid #cee3d8;
}
.auth-mini-icon svg { width: 20px; height: 20px; }
.auth-kicker { display: block; font-size: 9px; letter-spacing: .18em; color: var(--gold); font-weight: 600; margin-bottom: 2px; }
.auth-card h2 { font-family: var(--serif-zh); font-size: 25px; margin: 0; letter-spacing: .03em; }
.auth-sub { font-size: 12px; color: var(--ink-4); line-height: 1.75; margin: 0 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field > span { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.auth-field input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(13, 92, 70, .08); }
.auth-field input::placeholder { color: #b4b1a6; }
.auth-error {
  font-size: 11.5px; line-height: 1.6; color: #8c3028;
  background: var(--red-2); border: 1px solid #efd3ce; border-radius: 6px;
  padding: 8px 10px;
}
.auth-submit { width: 100%; margin-top: 4px; height: 46px; border-radius: 9px; }
.auth-submit:disabled { opacity: .6; }
.auth-switch { text-align: center; margin-top: 17px; font-size: 11.5px; color: var(--ink-4); line-height: 1.8; }
.auth-switch button { border: 0; background: none; color: var(--emerald); font-size: 11.5px; font-weight: 600; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; }
.auth-forgot { text-align: center; margin: 9px 0 0; font-size: 10px; line-height: 1.7; color: var(--ink-4); }
.auth-forgot b { color: var(--ink-3); font-weight: 600; }
.auth-meta {
  margin-top: 18px; padding: 10px 12px;
  background: #f7f2e6; border: 1px dashed #ddcfb2; border-radius: 7px;
  font-size: 10.5px; color: #7a6238; line-height: 1.75;
}
.auth-meta b { display: block; font-family: var(--mono); font-size: 11.5px; color: #5d4a26; margin-top: 2px; word-break: break-all; }
.auth-foot { margin: 20px 0 0; font-size: 9.5px; line-height: 1.7; color: var(--ink-4); text-align: center; }

/* 渚ц竟鏍忚处鍙峰崱 */
.user-card {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; margin-bottom: 10px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(217, 192, 138, .14);
  border-radius: 10px;
}
.user-avatar {
  width: 31px; height: 31px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #e7d3a3, #bf9552);
  color: #17342a; font-family: var(--serif-zh); font-size: 13px; font-weight: 700;
}
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.user-meta b { font-size: 12.5px; color: #f1ebdc; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 9.5px; color: rgba(236, 230, 214, .4); }
.user-card .icon-btn { width: 28px; height: 28px; color: rgba(236, 230, 214, .45); }
.user-card .icon-btn:hover { color: #f1ebdc; background: rgba(255, 255, 255, .08); border-color: transparent; }
.user-card .icon-btn svg { width: 15px; height: 15px; }

/* =========================================================
   鍝嶅簲寮?   ========================================================= */
@media (max-width: 1180px) {
  .view { padding: 28px 28px 80px; }
  .hero { gap: 34px; }
  .paper { padding: 44px 40px 50px; }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) and (min-width: 981px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: 42px; }
  .hero .lede { max-width: 640px; }
  .how-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 276px; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: grid !important; }
  .scrim.show { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(12, 26, 21, .4); backdrop-filter: blur(2px); }
  .topbar { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: 42px; }
  .how-grid { grid-template-columns: 1fr; }
  .q-options, .q-panels { grid-template-columns: 1fr; }
  .phrase-grid { grid-template-columns: 1fr; }
  .vocab-mini { grid-template-columns: 1fr; }
  .intro-card { grid-template-columns: 1fr; }
  .intro-side { border-left: 0; border-top: 1px dashed #ddcfb2; padding: 12px 0 0; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .intro-side div { gap: 5px; }
  .doc-toolbar .title-mini { display: none; }
  .doc-toolbar { top: 62px; overflow-x: auto; }
  .chat-panel { right: 10px; bottom: 10px; width: calc(100vw - 20px); height: min(720px, calc(100vh - 20px)); }
}
@media (max-width: 900px) {
  .auth-screen { padding: 14px; align-items: center; }
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-art { padding: 24px 26px 20px; }
  .auth-art-body { padding: 20px 0 4px; }
  .auth-art h1 { font-size: 30px; margin: 10px 0 8px; }
  .auth-lede { margin-bottom: 0; max-width: none; }
  .auth-points, .auth-quote { display: none; }
  .auth-form-side { padding: 28px 24px 34px; }
}
@media (max-width: 640px) {
  .view { padding: 20px 16px 76px; }
  .topbar { height: 56px; }
  .doc-toolbar { top: 56px; }
  .hero h1 { font-size: 34px; }
  .hero .lede { font-size: 14px; }
  .hero-stats { gap: 22px; }
  .stat b { font-size: 21px; }
  .upload-card { padding: 17px; }
  .preview-grid { grid-template-columns: repeat(3, 1fr); }
  .paper { padding: 26px 18px 36px; border-radius: 3px; }
  .doc-head h1 { font-size: 26px; }
  .doc-meta { gap: 14px; }
  .passage { margin-top: 40px; }
  .passage-index { font-size: 34px; }
  .sent { padding-left: 10px; padding-right: 4px; }
  .sent-en { font-size: 16.5px; }
  .sent-zh { font-size: 12.5px; }
  .passage-head h2 { font-size: 18px; }
  .history-grid, .recent-grid { grid-template-columns: 1fr; }
  .vocab-table td.ipa, .vocab-table th.ipa { display: none; }
  .tips-grid { grid-template-columns: 1fr; }
  .chapter-head { flex-wrap: wrap; }
  .chapter-head p { margin-left: 0; width: 100%; }
  .answer-card { flex-direction: column; align-items: flex-start; gap: 5px; }
  .answer-card strong { font-size: 17px; }
  .doc-toolbar .btn span { display: none; }
  .doc-toolbar .btn { padding: 8px; }
  .chat-fab { right: 14px; bottom: 14px; padding: 11px 15px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .modal { padding: 20px; }
  .modal-row { grid-template-columns: 1fr; }

  .auth-screen { padding: 0; align-items: stretch; background: var(--surface); }
  .auth-shell { border: 0; border-radius: 0; box-shadow: none; min-height: 100vh; display: block; }
  .auth-art { display: none; }
  .auth-form-side { min-height: 100vh; padding: 11vh 20px calc(26px + env(safe-area-inset-bottom)); align-items: flex-start; }
  .auth-card h2 { font-size: 24px; }
  .auth-field input { height: 48px; font-size: 16px; }
  .auth-submit { height: 50px; font-size: 15px; }
  .user-card { margin-bottom: 8px; }
}
@media (pointer: coarse) {
  .btn, .nav-item, .icon-btn, .mini-item, .segmented button, .doc-toc button { min-height: 40px; }
  .auth-field input, .input, .select, .textarea, #chatInput { font-size: 16px; }
  .blank { min-height: 24px; min-width: 26px; }
}
@supports (padding: max(0px)) {
  .topbar {
    padding-left: max(34px, env(safe-area-inset-left));
    padding-right: max(34px, env(safe-area-inset-right));
  }
  .chat-fab { right: max(26px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); }
}

/* =========================================================
   鍒掕瘝鏌ヨ & 棰樺崱鍐呰仈
   ========================================================= */
.sent-en .hl {
  cursor: pointer;
  background: linear-gradient(180deg, transparent 62%, rgba(217, 192, 138, .32) 62%);
  border-radius: 2px;
  transition: background .15s;
}
.sent-en .hl:hover { background: rgba(217, 192, 138, .5); }
.sent-en .hl.active { background: rgba(180, 136, 63, .3); }

button.word-chip { font: inherit; cursor: pointer; }
button.word-chip:active { transform: translateY(1px); }
.sent-fill {
  margin-top: 7px; font-size: 11px; padding: 4px 9px;
  color: #7a6238; border-color: #e2d7bd; background: #fdfaf1;
}
.sent-fill:hover { background: #fbf3df; border-color: var(--gold-2); }

.sel-pop {
  position: fixed; z-index: 240;
  background: #fffdf7;
  border: 1px solid #e2d7bd;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(35, 45, 38, .16), 0 2px 6px rgba(35, 45, 38, .06);
  padding: 11px 13px 12px;
  max-height: min(62vh, 460px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: selpop-in .14s ease-out;
}
@keyframes selpop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.selpop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.selpop-head b { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.selpop-head .ipa { margin-left: 6px; font-family: var(--serif); font-size: 12px; color: var(--gold); }
.selpop-head .pos { margin-left: 5px; font-size: 11px; font-style: italic; color: var(--ink-4); }
.selpop-close { padding: 2px; margin: -3px -3px 0 0; }
.selpop-close svg { width: 14px; height: 14px; }
.selpop-body { margin-top: 5px; }
.selpop-mean { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.selpop-sub { margin-top: 6px; font-size: 12px; line-height: 1.65; color: var(--ink-3); }
.selpop-sub b { color: var(--gold); margin-right: 5px; font-weight: 600; }
.selpop-ex { margin-top: 7px; font-size: 12px; line-height: 1.6; color: var(--ink-2); font-family: var(--serif); border-left: 2px solid var(--line-strong); padding-left: 8px; }
.selpop-ex span { color: var(--ink-4); font-family: var(--sans); font-size: 11.5px; }
.selpop-src { margin-top: 7px; font-size: 11px; line-height: 1.6; color: var(--ink-4); font-family: var(--serif); }
.selpop-words { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--ink-3); }
.selpop-words span { line-height: 1.55; }
.selpop-words b { font-family: var(--serif); font-size: 12.5px; color: var(--ink); }
.selpop-words i { color: var(--gold); font-style: normal; font-size: 11px; }
.selpop-words em { color: var(--ink-4); font-style: italic; }
.selpop-words u { display: block; text-decoration: none; font-size: 10.5px; color: #857a63; }
.selpop-loading { margin-top: 8px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.selpop-error { margin-top: 8px; font-size: 12px; color: var(--red); line-height: 1.6; }
.selpop-actions { display: flex; gap: 7px; margin-top: 10px; }
.selpop-actions .btn { padding: 5px 11px; font-size: 11.5px; }
.spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(180, 136, 63, .25); border-top-color: var(--gold);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.q-card.q-inline {
  margin: 4px 0 22px 2px;
  border-left: 3px solid var(--gold-2);
  background: #fffdf8;
  position: relative;
}
.q-card.q-inline::before {
  content: "本题解析 · 紧接上文";
  position: absolute; top: -9px; left: 14px;
  font-size: 9.5px; letter-spacing: .08em; color: #8a6f35;
  background: #fbf3df; border: 1px solid #e8d9b5; border-radius: 3px;
  padding: 1px 6px;
}
.q-card.q-inline .q-head { background: #f9f3e4; }
.q-anchor { color: var(--gold); font-weight: 600; }
.q-index { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.q-index button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: #fdfbf5;
  font-size: 11.5px; color: var(--ink-3); cursor: pointer;
  transition: .15s;
}
.q-index button:hover { border-color: var(--gold-2); background: #fbf5e6; }
.q-index b { font-family: var(--serif); font-size: 13px; color: var(--ink); }
.q-index em { font-style: normal; font-size: 11px; }
.q-index em.good { color: var(--emerald); }
.q-index em.bad { color: var(--red); }
.q-index i { font-style: normal; font-size: 10.5px; color: var(--ink-4); }

.boot-fail {
  position: fixed; inset: auto 16px 16px 16px; z-index: 300;
  background: #fff6e8; border: 1px solid #e8c58c; border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 12px 30px rgba(60, 45, 20, .18);
  font-size: 13px; color: #5a4526; line-height: 1.7;
}
.boot-fail b { display: block; font-size: 14px; margin-bottom: 4px; color: #7a4f16; }
.boot-fail button {
  margin-top: 10px; padding: 8px 16px; border-radius: 8px; border: none;
  background: var(--emerald, #0d5c46); color: #fff; font-size: 13px; cursor: pointer;
}

/* =========================================================
   鎵撳嵃
   ========================================================= */
@media print {
  @page { size: A4; margin: 13mm 12mm 14mm; }
  html, body { background: #fff !important; }
  body { font-size: 10.5pt; color: #000; }
  .sidebar, .topbar, .chat-fab, .chat-panel, .doc-toolbar, .scrim,
  .toast-root, #modalRoot, .no-print, .demo-banner, .demo-banner .btn, .q-head .q-student,
  .passage-head .p-tools, .legend-bar { display: none !important; }
  .main { margin: 0 !important; }
  .view { max-width: none; padding: 0; animation: none; }
  .paper { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .paper::before { display: none; }
  .doc-head { border-bottom: 2.5pt double #000; }
  .doc-kicker .tag { border: .5pt solid #999; background: #fff !important; color: #333 !important; }
  .doc-head h1 { font-size: 22pt; }
  .intro-card { background: #f7f7f7 !important; border: .5pt solid #bbb; border-left: 2pt solid #666; }
  .pattern-card { background: #f2f2f2 !important; color: #000 !important; border: .5pt solid #999; }
  .pattern-card p, .pattern-card .pattern { color: #000 !important; }
  .passage { margin-top: 22pt; }
  .passage-head { border-bottom: 1pt solid #000; }
  .passage-index { -webkit-text-stroke: .5pt #777; }
  .block-label { margin: 14pt 0 7pt; color: #333; }
  .sent { padding: 5pt 0 6pt 8pt; page-break-inside: avoid; }
  .sent-en { font-size: 11.5pt; line-height: 1.75; }
  .sent-zh { font-size: 9.5pt; }
  .sent-note { background: #f4f4f4 !important; }
  .vocab-mini { border-bottom: .5pt solid #ccc; }
  .para-translation { background: #f7f7f7 !important; border: .5pt solid #bbb; border-left: 2pt solid #666; }
  .discourse { color: #000 !important; font-weight: 700; }
  .word-chip { background: #f5f5f5 !important; border: .5pt solid #ccc; }
  .blank { background: #333 !important; border-color: #333; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .blank.wrong { background: #999 !important; border-color: #999; }
  .blank, .q-answer b, .q-no, .q-trap .trap-choice, .opt.correct .opt-label {
    background: #fff !important; color: #000 !important; border: .6pt solid #000 !important;
  }
  .blank b { border-left-color: #000; }
  .q-card, .long-card, .q-trap, .intro-card, .flow-item, .tip-card, .answer-card,
  .phrase-item, .vocab-mini span, .opt, .q-panel { page-break-inside: avoid; break-inside: avoid; }
  .vocab-table tr { break-inside: avoid; page-break-inside: avoid; }
  .q-card { page-break-inside: auto; break-inside: auto; }
  .q-head { break-after: avoid; page-break-after: avoid; }
  .q-options { break-inside: avoid; }
  .q-panels { break-inside: avoid; }
  .phrase-grid { display: block; }
  .phrase-item { width: 100%; }
  .block-label, .sub-label, .passage-head, .chapter-head { break-after: avoid; page-break-after: avoid; }
  .q-head { background: #f2f2f2 !important; }
  .q-trap { background: #f7f7f7 !important; border: .5pt solid #aaa; border-left: 2pt solid #555; }
  .q-trap .trap-choice { background: #555 !important; }
  .q-panel { background: #fafafa !important; }
  .chapter { page-break-before: auto; margin-top: 26pt; }
  .chapter-head { border-bottom: 2pt double #000; }
  .timeline::before { background: #999; }
  .flow-item::before { border-color: #333; }
  .vocab-table th { border-bottom: 1pt solid #000; }
  .vocab-table td { border-bottom: .5pt solid #ddd; }
  .doc-foot { border-top: .5pt solid #999; }
  details > summary { display: none !important; }
  details > * { display: block !important; }
  a { color: #000; text-decoration: none; }
  .guide-shell { break-after: auto; }
}
