/* ==========================================================================
   职场中文生存指南 — Design tokens & base
   Phong cách: công sở / nhà máy hiện đại, chuyên nghiệp, thực chiến.
   ========================================================================== */
:root{
  --bg: #f5f5f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --ink: #1c1c1e;
  --ink-soft: #44464a;
  --muted: #6b7280;
  --border: #e5e5e4;
  --border-strong: #d4d4d3;

  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-soft: #fff1e8;
  --accent-ring: rgba(234,88,12,.25);

  --red: #dc2626;
  --red-soft: #fef2f2;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --blue: #2563eb;
  --blue-soft: #eff6ff;

  --charcoal: #202023;
  --charcoal-2: #2c2c30;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05), 0 1px 1px rgba(0,0,0,.03);
  --shadow: 0 4px 14px rgba(20,20,20,.07);
  --shadow-lg: 0 12px 32px rgba(20,20,20,.12);

  --font-vi: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-zh: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --header-h: 60px;
  --nav-h: 64px;
  --container: 960px;
}

*,*::before,*::after{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin:0;
  font-family: var(--font-vi);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1,h2,h3,h4{ margin: 0 0 6px; line-height: 1.25; letter-spacing: -.01em; }
p{ margin: 0 0 8px; }
a{ color: inherit; }
button{ font-family: inherit; }
ul{ margin:0; padding:0; list-style:none; }
img{ max-width: 100%; display:block; }
.zh{ font-family: var(--font-zh); }
.hidden{ display:none !important; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ============ App shell ============ */
.app-shell{ min-height: 100%; display:flex; flex-direction: column; }
.view{ flex:1; width:100%; max-width: var(--container); margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 28px); outline:none; }
@media (min-width: 860px){
  .view{ padding: 24px 24px 48px; }
}

/* ============ Header ============ */
.site-header{
  position: sticky; top:0; z-index: 40;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display:flex; align-items:center;
}
.site-header .header-inner{
  width:100%; max-width: var(--container); margin:0 auto; padding:0 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:16px; cursor:pointer; }
.brand .logo{ width:34px; height:34px; border-radius:9px; background:linear-gradient(145deg,var(--accent),var(--accent-dark)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-family: var(--font-zh); }
.brand .brand-text{ display:flex; flex-direction:column; line-height:1.1; }
.brand .brand-text small{ font-weight:500; color:var(--muted); font-size:11px; }
.header-actions{ display:flex; align-items:center; gap:10px; }
.streak-chip{ display:flex; align-items:center; gap:4px; background:var(--accent-soft); color:var(--accent-dark); font-weight:700; font-size:13px; padding:6px 10px; border-radius:999px; }
.avatar-btn{ width:34px; height:34px; border-radius:50%; background:var(--charcoal); color:#fff; border:none; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; }

/* ============ Bottom Nav ============ */
.bottom-nav{
  position: sticky; bottom:0; z-index: 40;
  height: var(--nav-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  display:flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  text-decoration:none; color: var(--muted); font-size:11px; font-weight:600;
}
.bottom-nav a .nav-icon{ font-size:20px; line-height:1; }
.bottom-nav a.active{ color: var(--accent-dark); }
.bottom-nav a.active .nav-icon{ transform: translateY(-1px); }

/* ============ Buttons ============ */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius: var(--radius-sm); border:1px solid transparent; font-weight:700; font-size:14px; padding:11px 18px; cursor:pointer; transition:.15s ease; white-space:nowrap; }
.btn:active{ transform: scale(.98); }
.btn-primary{ background: var(--accent); color:#fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover{ background: var(--accent-dark); }
.btn-dark{ background: var(--charcoal); color:#fff; }
.btn-dark:hover{ background:#000; }
.btn-outline{ background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent-dark); }
.btn-ghost{ background: transparent; color: var(--ink-soft); }
.btn-ghost:hover{ background: var(--surface-2); }
.btn-sm{ padding:7px 12px; font-size:13px; border-radius:8px; }
.btn-lg{ padding:14px 24px; font-size:16px; border-radius:12px; }
.btn-block{ width:100%; }
.btn-icon{ padding:8px; border-radius:10px; }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn-danger{ background: var(--red-soft); color: var(--red); }
.btn-success{ background: var(--green-soft); color: var(--green); }

/* ============ Cards / surfaces ============ */
.card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad{ padding:16px; }
.section-title{ display:flex; align-items:center; justify-content:space-between; margin:22px 0 10px; }
.section-title h2{ font-size:15px; text-transform:uppercase; letter-spacing:.04em; color: var(--ink-soft); }
.section-title .link{ font-size:13px; font-weight:700; color:var(--accent-dark); cursor:pointer; text-decoration:none; }

/* ============ Hero ============ */
.hero{ position:relative; overflow:hidden; border-radius: var(--radius-lg); background: linear-gradient(155deg,var(--charcoal) 0%, var(--charcoal-2) 60%, #3a2418 100%); color:#fff; padding:40px 22px; margin-bottom:18px; }
.hero::after{ content:""; position:absolute; inset:0; background: radial-gradient(600px 260px at 85% -10%, rgba(234,88,12,.35), transparent 60%); pointer-events:none; }
.hero .eyebrow{ display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.16); font-size:12px; font-weight:700; padding:5px 11px; border-radius:999px; margin-bottom:14px; }
.hero h1{ font-size: clamp(26px,5vw,40px); font-weight:800; margin-bottom:10px; position:relative; }
.hero h1 .zh{ display:block; font-size: .5em; color: var(--accent); font-weight:700; margin-bottom:6px; letter-spacing:.02em; }
.hero p.lead{ color:rgba(255,255,255,.75); font-size:15px; max-width:520px; margin-bottom:20px; position:relative; }
.hero .hero-stats{ display:flex; gap:22px; margin:20px 0 4px; flex-wrap:wrap; position:relative; }
.hero .hero-stats div{ min-width:90px; }
.hero .hero-stats b{ display:block; font-size:20px; color:#fff; }
.hero .hero-stats span{ font-size:12px; color:rgba(255,255,255,.6); }
.hero .cta-row{ display:flex; gap:10px; flex-wrap:wrap; position:relative; margin-top:20px; }

/* ============ Auth ============ */
.auth-wrap{ max-width:400px; margin:20px auto; }
.form-group{ margin-bottom:14px; }
.form-group label{ display:block; font-size:13px; font-weight:700; margin-bottom:6px; color: var(--ink-soft); }
.form-control{ width:100%; padding:11px 13px; border:1px solid var(--border-strong); border-radius:10px; font-size:15px; background:var(--surface); color:var(--ink); }
.form-control:focus{ outline:none; border-color: var(--accent); box-shadow:0 0 0 3px var(--accent-ring); }
.form-hint{ font-size:12px; color:var(--muted); margin-top:5px; }
.form-error{ font-size:12px; color:var(--red); margin-top:5px; }
.tab-switch{ display:flex; background:var(--surface-2); border-radius:10px; padding:4px; margin-bottom:18px; }
.tab-switch button{ flex:1; border:none; background:transparent; padding:9px; border-radius:8px; font-weight:700; font-size:13px; color:var(--muted); cursor:pointer; }
.tab-switch button.active{ background:#fff; color:var(--ink); box-shadow: var(--shadow-sm); }

/* ============ Dashboard ============ */
.dash-greet{ font-size:20px; font-weight:800; margin-bottom:2px; }
.dash-sub{ color:var(--muted); font-size:14px; margin-bottom:16px; }
.stat-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:10px; margin-bottom:18px; }
@media(min-width:640px){ .stat-grid{ grid-template-columns: repeat(4,1fr); } }
.stat-tile{ background:var(--surface); border:1px solid var(--border); border-radius: var(--radius); padding:14px; }
.stat-tile .icon{ font-size:18px; }
.stat-tile b{ display:block; font-size:19px; margin-top:6px; }
.stat-tile span{ font-size:12px; color:var(--muted); }
.today-card{ display:flex; align-items:center; justify-content:space-between; gap:14px; background:linear-gradient(120deg,var(--charcoal),var(--charcoal-2)); color:#fff; border-radius: var(--radius-lg); padding:20px; margin-bottom:18px; }
.today-card ul{ display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:10px; }
.today-card li{ font-size:13px; color:rgba(255,255,255,.85); display:flex; align-items:center; gap:6px; }
.continue-card{ display:flex; align-items:center; gap:14px; padding:16px; }
.continue-card .prog-ring{ flex-shrink:0; }
.continue-card .info{ flex:1; min-width:0; }
.continue-card .info b{ display:block; font-size:15px; }
.continue-card .info span{ font-size:13px; color:var(--muted); }
.quicklinks{ display:grid; grid-template-columns: repeat(2,1fr); gap:10px; margin-top:18px; }
@media(min-width:640px){ .quicklinks{ grid-template-columns: repeat(4,1fr);} }
.quicklink{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; text-align:center; cursor:pointer; transition:.15s; }
.quicklink:hover{ border-color:var(--accent); transform:translateY(-2px); }
.quicklink .qi{ font-size:22px; margin-bottom:6px; }
.quicklink b{ display:block; font-size:13px; }

/* ============ Progress bar ============ */
.progress-track{ width:100%; height:8px; background:var(--border); border-radius:999px; overflow:hidden; }
.progress-track > i{ display:block; height:100%; background: linear-gradient(90deg,var(--accent),var(--accent-dark)); border-radius:999px; transition:width .4s ease; }
.progress-track.sm{ height:6px; }

/* ============ Roadmap ============ */
.roadmap{ display:flex; flex-direction:column; gap:10px; position:relative; }
.roadmap-node{ display:flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; cursor:pointer; transition:.15s; }
.roadmap-node:hover{ border-color: var(--accent); }
.roadmap-node.locked{ opacity:.55; cursor:not-allowed; }
.roadmap-node .num{ flex-shrink:0; width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; background:var(--surface-2); color:var(--muted); border:1px solid var(--border); }
.roadmap-node.done .num{ background:var(--green-soft); color:var(--green); border-color:transparent; }
.roadmap-node.current .num{ background:var(--accent); color:#fff; border-color:transparent; }
.roadmap-node .body{ flex:1; min-width:0; }
.roadmap-node .body b{ display:block; font-size:14px; }
.roadmap-node .body .zh-title{ font-size:12px; color:var(--muted); }
.roadmap-node .status{ font-size:18px; flex-shrink:0; }
.roadmap-node .body .mini-prog{ margin-top:8px; max-width:180px; }

/* ============ Tabs (lesson) ============ */
.lesson-header{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:18px; margin-bottom:14px; }
.lesson-header .crumb{ font-size:12px; color:var(--muted); font-weight:700; cursor:pointer; margin-bottom:6px; }
.lesson-header h1{ font-size:20px; }
.lesson-header .zh-sub{ color:var(--accent-dark); font-weight:700; font-size:14px; margin-bottom:10px; }
.tabbar{ display:flex; gap:4px; overflow-x:auto; -webkit-overflow-scrolling:touch; border-bottom:1px solid var(--border); margin-bottom:16px; scrollbar-width:none; }
.tabbar::-webkit-scrollbar{ display:none; }
.tabbar button{ flex-shrink:0; padding:10px 14px; border:none; background:transparent; font-weight:700; font-size:13.5px; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
.tabbar button.active{ color: var(--accent-dark); border-color: var(--accent); }

/* checklist */
.goal-list{ display:flex; flex-direction:column; gap:8px; }
.goal-item{ display:flex; align-items:flex-start; gap:10px; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 14px; font-size:14px; }
.goal-item .chk{ width:20px; height:20px; border-radius:50%; background:var(--green-soft); color:var(--green); flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:12px; margin-top:1px; }

/* ============ Vocabulary card ============ */
.vocab-grid{ display:grid; grid-template-columns: 1fr; gap:12px; }
@media(min-width:700px){ .vocab-grid{ grid-template-columns: 1fr 1fr; } }
.vocab-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px; }
.vocab-card .vc-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.vocab-card .hz{ font-family: var(--font-zh); font-size:28px; font-weight:700; }
.vocab-card .py{ color:var(--accent-dark); font-weight:600; font-size:14px; margin:2px 0 2px; }
.vocab-card .vi{ color:var(--ink-soft); font-size:14px; }
.vocab-card .vc-actions{ display:flex; gap:6px; }
.vocab-card .icon-btn{ width:34px; height:34px; border-radius:9px; border:1px solid var(--border); background:var(--surface-2); cursor:pointer; font-size:15px; display:flex; align-items:center; justify-content:center; }
.vocab-card .icon-btn.on{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-dark); }
.vocab-card .vc-detail{ margin-top:12px; padding-top:12px; border-top:1px dashed var(--border); font-size:13.5px; }
.vocab-card .vc-detail .label{ font-weight:700; color:var(--ink-soft); font-size:12px; text-transform:uppercase; letter-spacing:.03em; margin:8px 0 4px; }
.vocab-card .collocations{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{ background:var(--surface-2); border:1px solid var(--border); border-radius:999px; padding:4px 10px; font-size:12.5px; font-family: var(--font-zh); }
.example-line{ margin-bottom:6px; }
.example-line .hz{ font-size:15px; }
.example-line .py{ font-size:12.5px; color:var(--accent-dark); }
.example-line .vi{ font-size:12.5px; color:var(--muted); }
.vocab-toolbar{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }

/* ============ Flashcard ============ */
.flash-stage{ display:flex; flex-direction:column; align-items:center; padding:10px 0 20px; }
.flash-progress{ width:100%; max-width:420px; margin-bottom:16px; }
.flashcard{ width:100%; max-width:420px; height:280px; perspective:1200px; cursor:pointer; }
.flashcard .fc-inner{ position:relative; width:100%; height:100%; transition: transform .5s; transform-style:preserve-3d; }
.flashcard.flipped .fc-inner{ transform: rotateY(180deg); }
.fc-face{ position:absolute; inset:0; backface-visibility:hidden; border-radius:var(--radius-lg); background:var(--surface); border:1px solid var(--border); box-shadow: var(--shadow); display:flex; flex-direction:column; align-items:center; justify-content:center; padding:22px; text-align:center; }
.fc-face.back{ transform: rotateY(180deg); }
.fc-face .hz-big{ font-family: var(--font-zh); font-size:52px; font-weight:700; }
.fc-face .py-big{ color:var(--accent-dark); font-weight:700; font-size:18px; margin-top:10px; }
.fc-face .vi-big{ font-size:16px; color:var(--ink-soft); margin-top:4px; }
.fc-face .ex{ margin-top:14px; font-size:13.5px; color:var(--muted); }
.fc-hint{ font-size:12px; color:var(--muted); margin-top:12px; }
.recall-row{ display:grid; grid-template-columns: repeat(4,1fr); gap:8px; width:100%; max-width:420px; margin-top:18px; }
.recall-btn{ border:none; border-radius:12px; padding:12px 4px; font-weight:700; font-size:12.5px; cursor:pointer; color:#fff; }
.recall-btn.r1{ background:#dc2626; }
.recall-btn.r2{ background:#d97706; }
.recall-btn.r3{ background:#16a34a; }
.recall-btn.r4{ background:#2563eb; }

/* ============ Grammar ============ */
.grammar-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; margin-bottom:14px; }
.grammar-card .g-formula{ display:inline-block; background:var(--charcoal); color:#fff; font-family: var(--font-zh); font-weight:700; padding:8px 14px; border-radius:10px; margin:8px 0 12px; font-size:16px; }
.grammar-card .g-explain{ color:var(--ink-soft); font-size:14px; margin-bottom:10px; }
.grammar-card .g-examples{ background:var(--surface-2); border-radius:10px; padding:12px; }

/* ============ Sentence list ============ */
.sentence-list{ display:flex; flex-direction:column; gap:8px; }
.sentence-item{ display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 14px; }
.sentence-item .s-body{ flex:1; min-width:0; }
.sentence-item .s-body .hz{ font-family: var(--font-zh); font-size:16px; font-weight:600; }
.sentence-item .s-body .py{ font-size:12.5px; color:var(--accent-dark); }
.sentence-item .s-body .vi{ font-size:12.5px; color:var(--muted); }
.sentence-item .s-actions{ display:flex; gap:6px; flex-shrink:0; }
.mask-btn{ width:30px;height:30px;border-radius:8px;border:1px solid var(--border); background:var(--surface-2); font-size:13px; cursor:pointer; }
.masked{ filter: blur(5px); user-select:none; }

/* ============ Dialogue ============ */
.dialogue-toolbar{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
.dlg-title{ font-weight:800; font-size:15px; margin:20px 0 10px; display:flex; align-items:center; gap:8px; }
.dlg-bubble{ max-width:82%; margin-bottom:10px; padding:11px 14px; border-radius:16px; background:var(--surface); border:1px solid var(--border); }
.dlg-bubble.A{ border-bottom-left-radius:4px; }
.dlg-bubble.B{ margin-left:auto; background: var(--accent-soft); border-color: transparent; border-bottom-right-radius:4px; }
.dlg-bubble .speaker{ font-size:11px; font-weight:800; color:var(--muted); margin-bottom:3px; }
.dlg-bubble.B .speaker{ color:var(--accent-dark); }
.dlg-bubble .hz{ font-family:var(--font-zh); font-size:16px; }
.dlg-bubble .py{ font-size:12.5px; color:var(--accent-dark); margin-top:2px; }
.dlg-bubble .vi{ font-size:12.5px; color:var(--muted); margin-top:2px; }
.dlg-bubble.active{ box-shadow:0 0 0 2px var(--accent); }
.role-select{ display:flex; gap:8px; margin-bottom:12px; }
.role-select button{ flex:1; }

/* ============ Listening ============ */
.level-tabs{ display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.listen-stage{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:26px 18px; text-align:center; }
.listen-big-btn{ width:84px; height:84px; border-radius:50%; background:linear-gradient(145deg,var(--accent),var(--accent-dark)); color:#fff; border:none; font-size:32px; cursor:pointer; box-shadow:var(--shadow); }
.speed-row{ display:flex; gap:8px; justify-content:center; margin-top:14px; }
.reveal-row{ display:flex; gap:8px; justify-content:center; margin-top:18px; flex-wrap:wrap; }
.reveal-box{ margin-top:16px; min-height:20px; }
.reveal-box .hz{ font-family:var(--font-zh); font-size:22px; font-weight:700; }
.reveal-box .py{ color:var(--accent-dark); font-weight:600; margin-top:4px; }
.reveal-box .vi{ color:var(--ink-soft); margin-top:4px; }
.choice-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.choice-btn{ border:1px solid var(--border-strong); background:var(--surface); border-radius:12px; padding:14px 8px; font-family:var(--font-zh); font-size:16px; font-weight:600; cursor:pointer; }
.choice-btn.correct{ background:var(--green-soft); border-color:var(--green); color:var(--green); }
.choice-btn.wrong{ background:var(--red-soft); border-color:var(--red); color:var(--red); }

/* ============ Reflex / Roleplay ============ */
.chat-window{ display:flex; flex-direction:column; gap:10px; min-height:200px; margin-bottom:14px; }
.chat-msg{ max-width:85%; padding:11px 14px; border-radius:16px; font-size:14px; }
.chat-msg.boss{ background:var(--surface); border:1px solid var(--border); border-bottom-left-radius:4px; }
.chat-msg.me{ margin-left:auto; background:var(--charcoal); color:#fff; border-bottom-right-radius:4px; }
.chat-msg.feedback{ background:var(--green-soft); color:#166534; font-size:13px; border-bottom-left-radius:4px; }
.chat-msg .boss-tag{ font-size:11px; font-weight:800; color:var(--muted); margin-bottom:3px; }
.chat-input-row{ display:flex; gap:8px; align-items:center; position:sticky; bottom:calc(var(--nav-h) + 10px); background:var(--bg); padding-top:6px; }
.mic-btn{ width:46px; height:46px; border-radius:50%; border:none; background:var(--accent); color:#fff; font-size:20px; cursor:pointer; flex-shrink:0; }
.mic-btn.recording{ background:var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse{ 0%{ box-shadow:0 0 0 0 rgba(220,38,38,.5);} 70%{ box-shadow:0 0 0 12px rgba(220,38,38,0);} 100%{ box-shadow:0 0 0 0 rgba(220,38,38,0);} }
.scenario-grid{ display:grid; grid-template-columns:1fr; gap:10px; }
@media(min-width:640px){ .scenario-grid{ grid-template-columns:1fr 1fr;} }
.scenario-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; cursor:pointer; display:flex; gap:12px; align-items:center; }
.scenario-card:hover{ border-color:var(--accent); }
.scenario-card .sc-ico{ font-size:24px; }

/* ============ Exercises / Quiz ============ */
.quiz-progress-row{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.quiz-progress-row span{ font-size:12.5px; font-weight:700; color:var(--muted); white-space:nowrap; }
.quiz-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:22px 18px; }
.quiz-kicker{ font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--accent-dark); margin-bottom:8px; }
.quiz-prompt{ font-size:19px; font-weight:700; margin-bottom:18px; }
.quiz-prompt.zh{ font-family:var(--font-zh); font-size:24px; }
.quiz-options{ display:flex; flex-direction:column; gap:10px; }
.quiz-option{ display:flex; align-items:center; gap:10px; text-align:left; border:1.5px solid var(--border-strong); background:var(--surface); border-radius:12px; padding:13px 14px; font-size:15px; cursor:pointer; }
.quiz-option .opt-tag{ width:24px; height:24px; border-radius:50%; background:var(--surface-2); border:1px solid var(--border); font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.quiz-option:hover{ border-color:var(--accent); }
.quiz-option.selected{ border-color:var(--accent); background:var(--accent-soft); }
.quiz-option.correct{ border-color:var(--green); background:var(--green-soft); color:#166534; }
.quiz-option.wrong{ border-color:var(--red); background:var(--red-soft); color:#991b1b; }
.quiz-input{ width:100%; }
.quiz-feedback{ margin-top:16px; padding:13px 14px; border-radius:12px; font-size:14px; }
.quiz-feedback.ok{ background:var(--green-soft); color:#166534; }
.quiz-feedback.bad{ background:var(--red-soft); color:#991b1b; }
.quiz-footer{ display:flex; justify-content:space-between; align-items:center; margin-top:18px; gap:10px; }
.scramble-pool, .scramble-answer{ display:flex; flex-wrap:wrap; gap:8px; min-height:46px; padding:8px; border-radius:12px; }
.scramble-answer{ background:var(--surface-2); border:1px dashed var(--border-strong); }
.scramble-chip{ background:var(--surface); border:1px solid var(--border-strong); border-radius:9px; padding:9px 13px; font-family:var(--font-zh); font-size:16px; cursor:pointer; box-shadow:var(--shadow-sm); }
.dictation-compare{ font-family:var(--font-zh); font-size:17px; line-height:1.9; }
.dictation-compare .ok-ch{ color:var(--ink); }
.dictation-compare .bad-ch{ color:#fff; background:var(--red); border-radius:4px; padding:0 2px; }

/* ============ Test results ============ */
.score-hero{ text-align:center; padding:26px 16px; }
.score-ring-wrap{ display:flex; justify-content:center; margin-bottom:14px; }
.score-big{ font-size:44px; font-weight:800; }
.score-breakdown{ display:flex; flex-direction:column; gap:10px; margin-top:18px; }
.score-row{ display:flex; align-items:center; gap:10px; font-size:13.5px; }
.score-row .label{ width:110px; flex-shrink:0; font-weight:700; color:var(--ink-soft); }
.score-row .pct{ width:38px; text-align:right; font-weight:700; flex-shrink:0; }

/* ============ Mistakes ============ */
.filter-row{ display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; margin-bottom:14px; }
.filter-chip{ flex-shrink:0; border:1px solid var(--border-strong); background:var(--surface); border-radius:999px; padding:7px 13px; font-size:13px; font-weight:700; cursor:pointer; color:var(--ink-soft); }
.filter-chip.active{ background:var(--charcoal); color:#fff; border-color:var(--charcoal); }
.mistake-item{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:13px 14px; margin-bottom:8px; }
.mistake-item .cat{ font-size:11px; font-weight:800; color:var(--red); text-transform:uppercase; margin-bottom:4px; }
.mistake-item .q{ font-size:14.5px; font-weight:600; }
.mistake-item .a{ font-size:13px; color:var(--muted); margin-top:4px; }
.empty-state{ text-align:center; padding:50px 16px; color:var(--muted); }
.empty-state .es-ico{ font-size:40px; margin-bottom:10px; }

/* ============ Survival ============ */
.survival-group{ margin-bottom:22px; }
.survival-group h3{ font-size:14px; text-transform:uppercase; letter-spacing:.03em; color:var(--accent-dark); margin-bottom:10px; }
.survival-phrase{ display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:8px; }
.survival-phrase .hz{ font-family:var(--font-zh); font-size:17px; font-weight:600; }
.survival-phrase .py{ font-size:12.5px; color:var(--accent-dark); }
.survival-phrase .big-audio{ width:44px; height:44px; border-radius:50%; background:var(--accent); color:#fff; border:none; font-size:18px; flex-shrink:0; cursor:pointer; }

/* ============ Search ============ */
.search-box{ position:relative; margin-bottom:16px; }
.search-box input{ width:100%; padding:14px 16px 14px 44px; border-radius:14px; border:1px solid var(--border-strong); font-size:15px; background:var(--surface); }
.search-box .si{ position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:17px; color:var(--muted); }
.search-result{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:13px 14px; margin-bottom:8px; }
.search-result .hz{ font-family:var(--font-zh); font-size:17px; font-weight:700; }

/* ============ Admin ============ */
.admin-table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.admin-table th, .admin-table td{ text-align:left; padding:10px 10px; border-bottom:1px solid var(--border); }
.admin-table th{ color:var(--muted); font-size:11.5px; text-transform:uppercase; }
.admin-toolbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; gap:10px; flex-wrap:wrap; }
.modal-backdrop{ position:fixed; inset:0; background:rgba(20,20,20,.5); display:flex; align-items:flex-end; justify-content:center; z-index:100; }
@media(min-width:640px){ .modal-backdrop{ align-items:center; } }
.modal{ background:#fff; width:100%; max-width:520px; max-height:88vh; overflow:auto; border-radius:20px 20px 0 0; padding:20px; }
@media(min-width:640px){ .modal{ border-radius:18px; } }

/* ============ Toast ============ */
.toast-root{ position:fixed; bottom:calc(var(--nav-h) + 14px); left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; width:100%; padding:0 16px; pointer-events:none; }
.toast{ background:var(--charcoal); color:#fff; font-size:13.5px; font-weight:600; padding:10px 16px; border-radius:10px; box-shadow:var(--shadow-lg); animation: toast-in .2s ease; }
@keyframes toast-in{ from{ opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);} }

/* ============ Misc ============ */
.badge{ display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:800; padding:3px 8px; border-radius:999px; }
.badge-locked{ background:var(--surface-2); color:var(--muted); }
.badge-new{ background:var(--blue-soft); color:var(--blue); }
.skeleton{ background: linear-gradient(90deg,var(--border) 25%, #eee 37%, var(--border) 63%); background-size:400% 100%; animation: sk 1.4s ease infinite; border-radius:10px; }
@keyframes sk{ 0%{background-position:100% 50%;} 100%{background-position:0 50%;} }
.divider{ height:1px; background:var(--border); margin:18px 0; border:none; }
.muted{ color:var(--muted); }
.text-center{ text-align:center; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-8{margin-top:8px}.mb-8{margin-bottom:8px}
