/* ==========================================================================
   盲医考 · 移动优先的无障碍设计系统
   ========================================================================== */

:root {
  --bg: #f3eee2;
  --bg-deep: #ebe3d2;
  --surface: #fffdf8;
  --surface-soft: #f8f3e8;
  --surface-strong: #efe6d4;
  --ink: #18251f;
  --ink-soft: #34443c;
  --muted: #5b665d;
  --line: #ddd2bf;
  --line-strong: #c9bca5;
  --jade: #0f5f53;
  --jade-dark: #0a433a;
  --jade-soft: #dcece6;
  --jade-mist: #eef6f2;
  --cinnabar: #a83a2c;
  --cinnabar-soft: #f6e1dc;
  --gold: #c08a35;
  --gold-soft: #f7ecd6;
  --blue: #315b7d;
  --success: #1d6b4f;
  --warning: #9a5a1b;
  --danger: #a32929;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(28, 38, 32, 0.05);
  --shadow: 0 14px 40px rgba(28, 38, 32, 0.09);
  --shadow-lift: 0 22px 55px rgba(19, 44, 35, 0.16);
  --font-scale: 1;
  --max: 1160px;
  --safe-top: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--safe-top);
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  line-height: 1.7;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 8%, rgba(192, 138, 53, 0.11), transparent 36%),
    radial-gradient(circle at 8% 78%, rgba(15, 95, 83, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.45), transparent 40%);
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1, h2, h3 {
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
}

a {
  color: var(--jade);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--jade-dark);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

ul, ol {
  padding-left: 1.25em;
}

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

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(-180%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* ---------- Layout ---------- */

.app-frame {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.app-main {
  min-width: 0;
  padding: 0 34px 54px;
  max-width: var(--max);
}

main {
  display: block;
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 22px;
  border-right: 1px solid rgba(201, 188, 165, 0.55);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-seal {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fffdf7;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 48%),
    var(--jade);
  font-family: "Songti SC", serif;
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 8px 18px rgba(15, 95, 83, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 1.32rem;
  letter-spacing: 0.06em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.19em;
  font-weight: 600;
}

.brand--mobile {
  display: none;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 650;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.nav-item:hover {
  background: rgba(255, 253, 248, 0.7);
  color: var(--jade);
}

.nav-item.is-active {
  color: var(--jade-dark);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 15px;
  bottom: 15px;
  width: 4px;
  border-radius: 4px;
  background: var(--jade);
}

.nav-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  color: currentColor;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-label {
  font-size: 0.98rem;
}

.rail-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid rgba(221, 210, 191, 0.7);
}

.rail-user span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rail-user strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-user small {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--jade-soft);
  color: var(--jade-dark);
  font-weight: 800;
}

.rail-note {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.6;
  padding-left: 4px;
}

.topbar {
  position: sticky;
  top: var(--safe-top);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 0 16px;
  background: linear-gradient(180deg, var(--bg) 72%, rgba(243, 238, 226, 0.7));
  backdrop-filter: blur(12px);
}

.topbar-heading {
  min-width: 0;
  flex: 1;
}

.eyebrow {
  color: var(--jade);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 750;
  text-transform: uppercase;
}

.topbar-title {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  min-width: 46px;
  min-height: 46px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.icon-btn:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--jade);
}

.icon-btn__label {
  display: none;
  font-size: 0.72rem;
}

.icon-letter {
  width: 21px;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 12px 5px 8px;
  border-radius: 16px;
  border: 1px solid #e4d5b6;
  background: linear-gradient(135deg, #fff9e9, #f6e8c8);
  color: #6f4a0e;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.wallet-chip span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.wallet-chip strong {
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.wallet-chip small {
  font-size: 0.6rem;
  color: #8b6524;
  letter-spacing: 0.06em;
}

.wallet-dot {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: radial-gradient(circle at 32% 28%, #ffe9a8, #c08a35 70%);
  box-shadow: inset 0 0 0 1px rgba(120, 77, 9, 0.2);
}

.tabbar {
  display: none;
}

.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.app-footer a {
  color: var(--muted);
}

/* ---------- Typography helpers ---------- */

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-head h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2::before {
  content: "";
  width: 7px;
  height: 22px;
  border-radius: 6px;
  background: var(--jade);
  display: inline-block;
}

.section-head p {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.section-link {
  color: var(--jade);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.tiny { font-size: 0.7rem; }
.strong { font-weight: 700; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 34px; }
.nowrap { white-space: nowrap; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-line: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid var(--btn-line);
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.btn-primary {
  --btn-bg: var(--jade);
  --btn-fg: #fffdf7;
  --btn-line: var(--jade);
  box-shadow: 0 10px 22px rgba(15, 95, 83, 0.2);
}

.btn-primary:hover {
  --btn-bg: var(--jade-dark);
  --btn-fg: #fff;
}

.btn-dark {
  --btn-bg: var(--ink);
  --btn-fg: #fffdf7;
  --btn-line: var(--ink);
}

.btn-gold {
  --btn-bg: #f5e5c4;
  --btn-fg: #66440c;
  --btn-line: #e4c98f;
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-line: var(--line-strong);
}

.btn-danger {
  --btn-bg: var(--cinnabar-soft);
  --btn-fg: #7d261c;
  --btn-line: #e6bdb3;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 11px;
}

.btn-lg {
  min-height: 56px;
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--jade);
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card--flat {
  box-shadow: none;
}

.card--soft {
  background: var(--surface-soft);
}

.card--dark {
  background: var(--jade-dark);
  border-color: var(--jade-dark);
  color: #f7f2e6;
}

.card--dark a {
  color: #ffe7b4;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

/* ---------- Badges & chips ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.3;
}

.badge--jade {
  background: var(--jade-soft);
  color: var(--jade-dark);
}

.badge--gold {
  background: var(--gold-soft);
  color: #77500f;
}

.badge--red {
  background: var(--cinnabar-soft);
  color: #812b20;
}

.badge--blue {
  background: #e1ebf3;
  color: #244c6b;
}

.badge--muted {
  background: #eeebe3;
  color: var(--muted);
}

.badge--success {
  background: #dcefe4;
  color: #185d41;
}

.badge--warning {
  background: #f8e7cb;
  color: #855012;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--jade);
  color: var(--jade);
}

.chip.is-active {
  background: var(--jade);
  border-color: var(--jade);
  color: #fffdf7;
}

.chip--filter {
  min-height: 42px;
}

/* ---------- Progress ---------- */

.progress {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
  position: relative;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), #2d8a76);
  min-width: 2px;
}

.progress--thin {
  height: 6px;
}

.progress--gold > span {
  background: linear-gradient(90deg, #d8a64e, var(--gold));
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 7px;
}

.ring {
  --value: 0;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--jade) calc(var(--value) * 1%), var(--surface-strong) 0);
  position: relative;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface);
}

.ring > span {
  position: relative;
  font-weight: 800;
  font-size: 1rem;
  color: var(--jade-dark);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 30px 30px 28px;
  color: #fbf6e9;
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 222, 160, 0.22), transparent 24%),
    radial-gradient(circle at 74% 94%, rgba(255, 255, 255, 0.11), transparent 34%),
    linear-gradient(135deg, #0c4d43 0%, #0f5f53 52%, #174f45 100%);
  box-shadow: var(--shadow-lift);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 246, 220, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 310px;
  height: 310px;
  right: -100px;
  top: -130px;
}

.hero::after {
  width: 190px;
  height: 190px;
  right: -20px;
  bottom: -120px;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.8fr);
  gap: 26px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f4d79d;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: #f4d79d;
}

.hero h1,
.hero h2 {
  color: #fffaf0;
  font-size: clamp(1.7rem, 4.4vw, 2.55rem);
  line-height: 1.28;
  margin: 12px 0 10px;
  letter-spacing: -0.02em;
}

.hero p {
  color: rgba(250, 245, 233, 0.8);
  max-width: 48ch;
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero .btn {
  --btn-bg: rgba(255, 253, 247, 0.96);
  --btn-fg: #123f36;
  --btn-line: transparent;
}

.hero .btn-ghost {
  --btn-bg: transparent;
  --btn-fg: #fff8e8;
  --btn-line: rgba(255, 248, 232, 0.42);
}

.hero-panel {
  background: rgba(255, 253, 247, 0.11);
  border: 1px solid rgba(255, 248, 232, 0.2);
  border-radius: 20px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.hero-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.76rem;
  color: #f4d79d;
  margin-bottom: 14px;
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-stat strong {
  font-family: "Songti SC", serif;
  font-size: 2rem;
  line-height: 1;
  color: #fffaf0;
}

.hero-stat span {
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.76rem;
}

.hero-panel .progress {
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel .progress > span {
  background: #f2cf8b;
}

/* ---------- Welcome / landing ---------- */

.welcome-body {
  background:
    radial-gradient(circle at 18% 14%, rgba(192, 138, 53, 0.16), transparent 34%),
    radial-gradient(circle at 84% 80%, rgba(15, 95, 83, 0.14), transparent 38%),
    #f3eee2;
}

.welcome {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 40px;
}

.welcome-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 48px;
  align-items: center;
  min-height: 540px;
}

.welcome-copy .display {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 16px 0 20px;
}

.welcome-copy .display em {
  font-style: normal;
  color: var(--jade);
  position: relative;
  white-space: nowrap;
}

.welcome-copy .display em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 9px;
  background: var(--gold-soft);
  z-index: -1;
  border-radius: 3px;
}

.welcome-lead {
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.9;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.welcome-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.welcome-stat strong {
  display: block;
  font-family: "Songti SC", serif;
  font-size: 1.55rem;
  color: var(--jade-dark);
}

.welcome-stat span {
  color: var(--muted);
  font-size: 0.72rem;
}

.welcome-art {
  position: relative;
  min-height: 480px;
}

.phone-shell {
  width: 300px;
  height: 580px;
  margin: 0 auto;
  border-radius: 42px;
  background: #18251f;
  padding: 10px;
  box-shadow: 0 40px 90px rgba(20, 45, 36, 0.28);
  transform: rotate(2.4deg);
}

.phone-screen {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #f7f1e4;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
}

.phone-head strong {
  font-family: "Songti SC", serif;
  font-size: 1.05rem;
}

.phone-date {
  font-size: 0.58rem;
  color: var(--muted);
}

.phone-hero {
  border-radius: 17px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(140deg, #0d5146, #177363);
}

.phone-hero small {
  color: #f0d59e;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.phone-hero strong {
  display: block;
  font-family: "Songti SC", serif;
  font-size: 1.1rem;
  margin: 5px 0 8px;
}

.phone-hero .progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
}

.phone-hero .progress > span {
  background: #f2cf8b;
}

.phone-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.phone-tile {
  background: #fffdf7;
  border: 1px solid #e6dcc9;
  border-radius: 13px;
  padding: 11px;
}

.phone-tile b {
  display: block;
  font-size: 0.72rem;
}

.phone-tile span {
  color: var(--muted);
  font-size: 0.58rem;
}

.phone-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffdf7;
  border: 1px solid #ece3d2;
  border-radius: 12px;
  padding: 8px 10px;
}

.phone-row i {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: var(--jade-soft);
  display: grid;
  place-items: center;
  color: var(--jade-dark);
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
}

.phone-row span {
  font-size: 0.62rem;
  font-weight: 650;
}

.phone-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding: 8px 4px 2px;
  border-top: 1px solid #e8dfcf;
  color: var(--muted);
  font-size: 0.52rem;
  text-align: center;
}

.phone-nav b {
  color: var(--jade);
  display: block;
  font-size: 0.66rem;
}

.art-note {
  position: absolute;
  right: 2%;
  bottom: 12%;
  max-width: 210px;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.art-note strong {
  display: block;
  color: var(--jade-dark);
  margin-bottom: 2px;
}

.art-badge {
  position: absolute;
  left: 0;
  top: 9%;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--jade-dark);
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 70px;
}

.welcome-feature {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}

.welcome-feature .num {
  color: var(--gold);
  font-family: "Songti SC", serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.welcome-feature h3 {
  font-size: 1.04rem;
  margin: 8px 0 6px;
}

.welcome-feature p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

/* ---------- Auth ---------- */

.auth-wrap {
  max-width: 440px;
  margin: 4vh auto 0;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.7rem;
  margin: 14px 0 6px;
}

.auth-sub {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 22px;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-card {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 15px;
  background: var(--gold-soft);
  border: 1px solid #e8d2a6;
  font-size: 0.78rem;
  color: #6c4b15;
}

.demo-card code {
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.field-help {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--jade);
  box-shadow: 0 0 0 4px rgba(15, 95, 83, 0.1);
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.6;
}

.check input {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  accent-color: var(--jade);
  flex: 0 0 20px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.form-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-section h2 {
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.form-section > p {
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 16px;
}

/* ---------- Messages ---------- */

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
}

.message-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
  flex: 0 0 8px;
  margin-top: 7px;
}

.message--success { border-color: #b9dcc9; background: #f2fbf5; }
.message--success .message-dot { background: var(--success); }
.message--error { border-color: #e6bdb3; background: #fdf4f1; }
.message--error .message-dot { background: var(--danger); }
.message--warning { border-color: #e8d2a6; background: #fffaef; }
.message--warning .message-dot { background: var(--warning); }
.message--info .message-dot { background: var(--blue); }

/* ---------- Dashboard ---------- */

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 18px;
}

.continue-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: #f9f4e6;
  background:
    radial-gradient(circle at 88% 18%, rgba(244, 215, 157, 0.22), transparent 28%),
    linear-gradient(135deg, #123f36, #0f5f53 58%, #1c6b5c);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.continue-card::after {
  content: "学";
  position: absolute;
  right: 20px;
  bottom: -30px;
  font-family: "Songti SC", serif;
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
}

.continue-card .eyebrow {
  color: #f0d59e;
}

.continue-card h2 {
  color: #fffaf0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 8px 0 4px;
}

.continue-card p {
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.8rem;
}

.continue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.continue-meta .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #f8eed8;
}

.continue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.continue-actions .btn {
  --btn-bg: rgba(255, 253, 247, 0.95);
  --btn-fg: #123f36;
  --btn-line: transparent;
}

.continue-actions .btn-ghost {
  --btn-bg: transparent;
  --btn-fg: #fff8e8;
  --btn-line: rgba(255, 248, 232, 0.35);
}

.goal-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.goal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.goal-top h2 {
  font-size: 1rem;
}

.goal-number {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.goal-number strong {
  font-family: "Songti SC", serif;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--jade-dark);
}

.goal-number span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.mini-stat {
  background: var(--surface);
  padding: 10px 8px;
  text-align: center;
}

.mini-stat strong {
  display: block;
  font-size: 1.1rem;
  color: var(--ink);
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.62rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  min-height: 94px;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--jade);
  color: var(--ink);
}

.quick-card b {
  font-size: 0.82rem;
}

.quick-card span {
  color: var(--muted);
  font-size: 0.68rem;
}

.quick-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--jade-soft);
  color: var(--jade-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

/* ---------- Course grid ---------- */

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.course-card {
  --course-color: var(--jade);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  min-height: 164px;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.course-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--course-color);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.course-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.course-glyph {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--course-color);
  font-family: "Songti SC", serif;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.course-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.course-card p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.66rem;
}

.course-weight {
  color: var(--course-color);
  font-weight: 800;
}

/* ---------- List rows ---------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.list-row:hover {
  border-color: var(--jade);
  transform: translateX(2px);
  color: var(--ink);
}

.list-index {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--jade-dark);
  font-family: "Songti SC", serif;
  font-weight: 800;
  font-size: 0.9rem;
}

.list-main {
  min-width: 0;
  flex: 1;
}

.list-main strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-main small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.list-row.is-done .list-index {
  background: var(--jade-soft);
  color: var(--jade-dark);
}

.list-row.is-locked {
  opacity: 0.72;
}

/* ---------- Chapter ---------- */

.chapter-head {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 15%, rgba(192, 138, 53, 0.15), transparent 30%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.chapter-head h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 8px 0 10px;
}

.chapter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.chapter-breadcrumb {
  color: var(--muted);
  font-size: 0.72rem;
}

.chapter-breadcrumb a {
  color: var(--muted);
}

.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.study-main {
  min-width: 0;
}

.study-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 100px;
}

.tab-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
}

.tab-link {
  flex: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tab-link:hover {
  color: var(--jade);
}

.tab-link.is-active {
  background: var(--surface);
  color: var(--jade-dark);
  box-shadow: var(--shadow-sm);
}

.article-body {
  font-size: 0.92rem;
  line-height: 1.95;
  color: var(--ink-soft);
}

.article-body p {
  margin: 0 0 1em;
}

.article-body strong {
  color: var(--ink);
  font-weight: 800;
}

.article-body ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.article-body li {
  margin-bottom: 5px;
}

.article-body h2,
.article-body h3 {
  margin: 1.2em 0 0.5em;
  color: var(--ink);
}

.keypoint-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: point;
}

.keypoint {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--jade-mist);
  border: 1px solid #d5e7df;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.keypoint::before {
  counter-increment: point;
  content: counter(point);
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--jade);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.audio-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #d5e7df;
  border-radius: 16px;
  background: var(--jade-mist);
}

.audio-box audio {
  width: 100%;
  min-height: 42px;
}

.audio-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--jade);
  color: #fff;
  font-size: 1.1rem;
}

.side-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.side-card h3 {
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.side-card p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.side-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.side-actions .btn {
  justify-content: flex-start;
  min-height: 44px;
  font-size: 0.8rem;
}

/* ---------- Reader ---------- */

.reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reader {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.reader h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.reader p {
  font-size: 1.06rem;
  line-height: 2.12;
  margin-bottom: 1.1em;
  color: var(--ink-soft);
  text-indent: 2em;
}

.reader p:first-of-type::first-letter {
  font-family: "Songti SC", serif;
  font-size: 1.5em;
  color: var(--jade);
}

.reader-note {
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #6d4c16;
  font-size: 0.76rem;
  margin-bottom: 18px;
}

/* ---------- Questionbank index ---------- */

.bank-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.bank-score {
  padding: 24px;
  border-radius: var(--radius-xl);
  color: #f9f4e6;
  background:
    radial-gradient(circle at 84% 10%, rgba(244, 215, 157, 0.22), transparent 28%),
    linear-gradient(135deg, #1d3c33, #0f5f53);
  box-shadow: var(--shadow);
}

.bank-score h2 {
  color: #fffaf0;
  font-size: 1.45rem;
  margin: 8px 0 4px;
}

.bank-score p {
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.78rem;
}

.bank-score .mini-stats {
  margin-top: 18px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.16);
}

.bank-score .mini-stat {
  background: rgba(255, 255, 255, 0.1);
}

.bank-score .mini-stat strong {
  color: #fffaf0;
}

.bank-score .mini-stat span {
  color: rgba(255, 250, 240, 0.62);
}

.bank-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bank-shortcut {
  position: relative;
  padding: 17px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.bank-shortcut:hover {
  border-color: var(--jade);
  color: var(--ink);
}

.bank-shortcut b {
  font-size: 0.92rem;
}

.bank-shortcut small {
  color: var(--muted);
  font-size: 0.67rem;
}

.bank-shortcut .glyph {
  position: absolute;
  right: 10px;
  bottom: -8px;
  font-family: "Songti SC", serif;
  font-size: 3.2rem;
  color: var(--jade-soft);
  line-height: 1;
}

.bank-shortcut--wide {
  grid-column: 1 / -1;
}

.exam-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exam-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.exam-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--jade-soft);
  color: var(--jade-dark);
  font-family: "Songti SC", serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.exam-main {
  flex: 1;
  min-width: 0;
}

.exam-main h3 {
  font-size: 0.94rem;
}

.exam-main p {
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 2px;
}

.exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

/* ---------- Session ---------- */

.session-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.session-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  margin-bottom: 12px;
}

.session-bar-main {
  flex: 1;
  min-width: 0;
}

.session-bar-main strong {
  font-size: 0.86rem;
}

.session-bar-main small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--cinnabar);
  min-width: 64px;
  text-align: right;
}

.timer.is-urgent {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% { opacity: 0.55; }
}

.session-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.7rem;
}

.session-progress .progress {
  flex: 1;
}

.question-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.question-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.question-stem {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(1.18rem, 2.6vw, 1.45rem);
  line-height: 1.75;
  font-weight: 700;
  margin-bottom: 20px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  cursor: pointer;
  min-height: 58px;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease),
    transform 0.16s var(--ease);
}

.option:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option-letter {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1px;
}

.option-text {
  font-size: 0.9rem;
  line-height: 1.65;
}

.option:has(input:checked) {
  border-color: var(--jade);
  background: var(--jade-mist);
  box-shadow: 0 0 0 3px rgba(15, 95, 83, 0.1);
}

.option:has(input:checked) .option-letter {
  background: var(--jade);
  border-color: var(--jade);
  color: #fff;
}

.option:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.option.is-correct {
  border-color: #6fb08f;
  background: #f0faf4;
}

.option.is-correct .option-letter {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.option.is-wrong {
  border-color: #d2887a;
  background: #fdf3f0;
}

.option.is-wrong .option-letter {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.option.is-disabled {
  cursor: default;
  opacity: 0.85;
}

.practical-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d5e7df;
  background: var(--jade-mist);
}

.practical-card h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.practical-card .prompt {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.8;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.rating-btn {
  min-height: 56px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  font-weight: 700;
  font-size: 0.82rem;
}

.rating-btn:hover {
  border-color: var(--jade);
}

.rating-btn[data-rating="mastered"]:hover {
  background: #e6f5ec;
  border-color: var(--success);
}

.rating-btn[data-rating="fuzzy"]:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.rating-btn[data-rating="unknown"]:hover {
  background: var(--cinnabar-soft);
  border-color: var(--cinnabar);
}

.feedback {
  margin-top: 16px;
  padding: 16px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.feedback.is-correct {
  border-color: #b9dcc9;
  background: #f2fbf5;
}

.feedback.is-wrong {
  border-color: #e6bdb3;
  background: #fdf5f2;
}

.feedback h3 {
  font-size: 0.92rem;
  margin-bottom: 5px;
}

.feedback p {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.navigator {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.nav-dot {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface);
}

.nav-dot.is-answered {
  background: var(--jade-soft);
  border-color: #b9d7ca;
  color: var(--jade-dark);
}

.nav-dot.is-current {
  background: var(--jade);
  border-color: var(--jade);
  color: #fff;
}

/* ---------- Result ---------- */

.result-hero {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 138, 53, 0.2), transparent 50%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.score-ring {
  --value: 0;
  width: 132px;
  height: 132px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--jade) calc(var(--value) * 1%), var(--surface-strong) 0);
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--surface);
  border-radius: 50%;
}

.score-ring-inner {
  position: relative;
  text-align: center;
}

.score-ring-inner strong {
  display: block;
  font-family: "Songti SC", serif;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--jade-dark);
}

.score-ring-inner span {
  color: var(--muted);
  font-size: 0.66rem;
}

.result-hero h1 {
  font-size: 1.55rem;
}

.result-hero p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.result-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.result-stat strong {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
}

.result-stat span {
  color: var(--muted);
  font-size: 0.65rem;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 16px;
}

.review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-stem {
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.65;
}

.review-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  font-size: 0.76rem;
}

.answer-pill {
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
}

.answer-pill.ok {
  background: #e5f5eb;
  color: #185d41;
}

.answer-pill.no {
  background: var(--cinnabar-soft);
  color: #812b20;
}

.explanation {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* ---------- News / policy ---------- */

.news-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 16px;
}

.feature-article {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 28px;
  color: #fbf6e9;
  background:
    radial-gradient(circle at 88% 10%, rgba(244, 215, 157, 0.24), transparent 30%),
    linear-gradient(135deg, #17251f, #0d5146 55%, #1b6a5b);
  box-shadow: var(--shadow);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.feature-article::after {
  content: "闻";
  position: absolute;
  right: 18px;
  top: -28px;
  font-family: "Songti SC", serif;
  font-size: 10rem;
  color: rgba(255, 255, 255, 0.055);
  line-height: 1;
}

.feature-article h2 {
  color: #fffaf0;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  margin: 10px 0 8px;
  max-width: 22ch;
}

.feature-article p {
  color: rgba(255, 250, 240, 0.74);
  font-size: 0.8rem;
  max-width: 52ch;
}

.feature-article .badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.14);
  color: #f8eed8;
}

.news-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-side-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.news-side-card h3 {
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.news-side-card p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}

.article-card:hover {
  border-color: var(--jade);
  color: var(--ink);
}

.article-card h3 {
  font-size: 0.98rem;
  line-height: 1.5;
}

.article-card p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.6fr);
  gap: 20px;
  align-items: start;
}

.article-page {
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.article-page h1 {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  margin: 10px 0 12px;
  line-height: 1.45;
}

.article-page .article-meta {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.takeaway {
  margin: 20px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 12px 12px 0;
  font-size: 0.83rem;
  line-height: 1.8;
  color: #604311;
}

.takeaway strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  color: #875f1c;
}

.source-line {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  word-break: break-all;
}

.policy-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.policy-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.policy-card h3 {
  font-size: 0.96rem;
  line-height: 1.5;
}

.policy-card p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.7;
}

.policy-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.match-score {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
}

.match-score__bar {
  width: 52px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.match-score__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--jade);
}

.policy-hero {
  padding: 26px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 0%, rgba(192, 138, 53, 0.15), transparent 32%),
    var(--surface);
  border: 1px solid var(--line);
}

.policy-hero h1 {
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  margin: 8px 0 10px;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.policy-section {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.policy-section h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-section h2::before {
  content: "";
  width: 5px;
  height: 17px;
  border-radius: 3px;
  background: var(--gold);
}

.policy-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  list-style: none;
}

.policy-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.policy-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jade);
}

.policy-steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.policy-step {
  counter-increment: step;
  display: flex;
  gap: 11px;
  font-size: 0.8rem;
  line-height: 1.7;
}

.policy-step::before {
  content: counter(step);
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--jade);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  margin-top: 1px;
}

.match-panel {
  padding: 20px;
  border-radius: 18px;
  background: var(--jade-dark);
  color: #f8f2e4;
  position: sticky;
  top: 100px;
}

.match-panel h2 {
  color: #fffaf0;
  font-size: 1.05rem;
}

.match-panel p {
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.75rem;
  line-height: 1.7;
  margin-top: 6px;
}

.match-panel .match-score {
  margin: 12px 0;
  color: #f2cf8b;
  font-size: 0.78rem;
}

.match-panel .match-score__bar {
  background: rgba(255, 255, 255, 0.18);
  width: 100%;
  height: 8px;
}

.match-panel .match-score__bar span {
  background: #f2cf8b;
}

.match-panel .btn {
  margin-top: 12px;
  --btn-bg: #f6e7c7;
  --btn-fg: #3f2a08;
  --btn-line: transparent;
}

.match-panel .btn-ghost {
  --btn-bg: transparent;
  --btn-fg: #fff8e8;
  --btn-line: rgba(255, 248, 232, 0.38);
}

.match-reasons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.match-reasons li {
  position: relative;
  padding-left: 16px;
  color: rgba(255, 250, 240, 0.74);
  font-size: 0.7rem;
  line-height: 1.6;
}

.match-reasons li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: #f2cf8b;
  font-weight: 800;
}

.plan-hero {
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 86% 10%, rgba(192, 138, 53, 0.18), transparent 34%),
    linear-gradient(135deg, #123f36, #0f5f53);
  color: #fff9ed;
  box-shadow: var(--shadow);
}

.plan-hero h1 {
  color: #fffaf0;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  margin: 8px 0;
}

.plan-hero p {
  color: rgba(255, 250, 240, 0.78);
  font-size: 0.86rem;
  line-height: 1.8;
}

.plan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.plan-badges .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #f8eed8;
}

.plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.65fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.plan-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  margin-bottom: 12px;
}

.plan-block h2 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.plan-step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.plan-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.plan-step-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--jade-soft);
  color: var(--jade-dark);
  font-weight: 800;
  font-size: 0.72rem;
}

.plan-step h3 {
  font-size: 0.88rem;
  margin-bottom: 3px;
}

.plan-step p {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.7;
}

.plan-step small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 4px;
}

.caveat {
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #684914;
  font-size: 0.74rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

/* ---------- Me / profile ---------- */

.me-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 0%, rgba(192, 138, 53, 0.16), transparent 30%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.me-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1d7263, #0f5f53);
  color: #fffaf0;
  font-family: "Songti SC", serif;
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 95, 83, 0.2);
}

.me-main {
  flex: 1;
  min-width: 200px;
}

.me-main h1 {
  font-size: 1.45rem;
}

.me-main p {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 3px;
}

.me-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eligibility-card {
  --tone: var(--jade);
  border-left: 5px solid var(--tone);
  padding: 18px;
  border-radius: 15px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eligibility-card--success { --tone: var(--success); }
.eligibility-card--warning { --tone: var(--warning); }
.eligibility-card--neutral { --tone: var(--muted); }

.eligibility-card h2 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.eligibility-card p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.check-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.76rem;
  line-height: 1.65;
}

.check-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  margin-top: 1px;
}

.check-mark.is-ok {
  background: var(--jade-soft);
  color: var(--jade-dark);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.profile-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.profile-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: #fff9ed;
  background:
    radial-gradient(circle at 90% 10%, rgba(244, 215, 157, 0.26), transparent 30%),
    linear-gradient(135deg, #3a2a12, #7b571e 55%, #a57a2e);
  box-shadow: var(--shadow);
}

.wallet-card::after {
  content: "呗";
  position: absolute;
  right: 16px;
  bottom: -24px;
  font-family: "Songti SC", serif;
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
}

.wallet-card h2 {
  color: #fffaf0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.wallet-balance {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 8px 0 14px;
  position: relative;
  z-index: 1;
}

.wallet-balance strong {
  font-family: "Songti SC", serif;
  font-size: 2.7rem;
  line-height: 1;
}

.wallet-balance span {
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.75rem;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.wallet-actions .btn {
  --btn-bg: rgba(255, 253, 247, 0.95);
  --btn-fg: #4a330c;
  --btn-line: transparent;
}

.transaction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.78rem;
}

.transaction:last-child {
  border-bottom: 0;
}

.transaction small {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
}

.transaction .amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.transaction .amount.plus { color: var(--success); }
.transaction .amount.minus { color: var(--cinnabar); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.product-card.is-owned {
  border-color: #b9dcc9;
  background: #f8fdf9;
}

.product-glyph {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: #6b4a10;
  font-family: "Songti SC", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.product-card h3 {
  font-size: 1rem;
}

.product-card p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.price strong {
  font-family: "Songti SC", serif;
  font-size: 1.5rem;
  color: var(--cinnabar);
}

.price span {
  color: var(--muted);
  font-size: 0.68rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 15px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--jade);
  font-weight: 800;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.stat-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.stat-card strong {
  display: block;
  font-family: "Songti SC", serif;
  font-size: 1.4rem;
  color: var(--jade-dark);
  line-height: 1.1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.66rem;
}

/* ---------- Empty / errors ---------- */

.empty {
  text-align: center;
  padding: 46px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.55);
}

.empty-glyph {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--jade-soft);
  color: var(--jade-dark);
  font-family: "Songti SC", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.empty h2 {
  font-size: 1.08rem;
}

.empty p {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 5px 0 16px;
}

/* ---------- Search ---------- */

.search-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.search-bar input {
  border: 0;
  background: transparent;
  min-height: 44px;
  box-shadow: none;
}

.search-bar input:focus {
  box-shadow: none;
}

.search-group {
  margin-top: 24px;
}

.search-group h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-group h2 span {
  color: var(--muted);
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 400;
}

/* ---------- High contrast ---------- */

body.high-contrast {
  --bg: #000;
  --bg-deep: #000;
  --surface: #0a0a0a;
  --surface-soft: #141414;
  --surface-strong: #222;
  --ink: #fff;
  --ink-soft: #f2f2f2;
  --muted: #d8d8d8;
  --line: #fff;
  --line-strong: #fff;
  --jade: #ffe14d;
  --jade-dark: #ffe14d;
  --jade-soft: #2a2600;
  --jade-mist: #171600;
  --cinnabar: #ff8a75;
  --cinnabar-soft: #2b0d08;
  --gold: #ffd166;
  --gold-soft: #2a2100;
  --success: #7dffb2;
  --warning: #ffc46b;
  --danger: #ff8a75;
}

body.high-contrast::before {
  display: none;
}

body.high-contrast .hero,
body.high-contrast .continue-card,
body.high-contrast .bank-score,
body.high-contrast .feature-article,
body.high-contrast .plan-hero,
body.high-contrast .wallet-card,
body.high-contrast .match-panel {
  background: #000 !important;
  border: 2px solid #fff;
  color: #fff;
}

body.high-contrast .hero h1,
body.high-contrast .hero h2,
body.high-contrast .continue-card h2,
body.high-contrast .bank-score h2,
body.high-contrast .feature-article h2,
body.high-contrast .plan-hero h1,
body.high-contrast .wallet-card h2 {
  color: #fff;
}

body.high-contrast .hero p,
body.high-contrast .continue-card p,
body.high-contrast .bank-score p,
body.high-contrast .feature-article p,
body.high-contrast .plan-hero p {
  color: #f2f2f2;
}

body.high-contrast .btn {
  border-width: 2px;
}

body.high-contrast .card,
body.high-contrast .question-card,
body.high-contrast .article-page,
body.high-contrast .reader,
body.high-contrast .profile-card {
  border-width: 2px;
}

body.high-contrast .option:has(input:checked) {
  outline: 3px solid #ffe14d;
}

body.high-contrast .progress > span {
  background: #ffe14d;
}

body.high-contrast .course-card::before {
  background: #ffe14d;
}

/* ---------- Responsive ---------- */

@media (min-width: 1100px) {
  .icon-btn__label {
    display: inline;
  }

  .icon-btn {
    padding: 6px 10px;
  }
}

@media (max-width: 1080px) {
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .app-frame {
    display: block;
  }

  .side-rail {
    display: none;
  }

  .app-main {
    padding: 0 16px calc(92px + env(safe-area-inset-bottom));
    max-width: 100%;
  }

  .topbar {
    gap: 10px;
    padding: 10px 0 10px;
  }

  .brand--mobile {
    display: inline-flex;
  }

  .brand--mobile .brand-seal {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.15rem;
  }

  .brand--mobile .brand-text strong {
    font-size: 1.1rem;
  }

  .topbar-heading {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 1px;
  }

  .icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 5px;
  }

  .icon-btn__label {
    display: none;
  }

  .wallet-chip {
    min-height: 40px;
    padding: 4px 9px 4px 6px;
  }

  .wallet-chip .wallet-dot {
    width: 22px;
    height: 22px;
  }

  .tabbar {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 248, 0.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 -8px 28px rgba(28, 38, 32, 0.07);
  }

  .tabbar .nav-item {
    flex-direction: column;
    gap: 2px;
    min-height: 54px;
    padding: 5px 4px;
    border-radius: 12px;
    font-size: 0.66rem;
    justify-content: center;
  }

  .tabbar .nav-item.is-active {
    background: var(--jade-soft);
    box-shadow: none;
  }

  .tabbar .nav-item.is-active::before {
    display: none;
  }

  .tabbar .nav-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .tabbar .nav-label {
    font-size: 0.65rem;
    font-weight: 700;
  }

  .app-footer {
    margin-top: 30px;
    padding-bottom: 8px;
    font-size: 0.66rem;
  }

  .hero-grid,
  .dashboard-hero,
  .bank-hero,
  .news-hero,
  .study-layout,
  .article-layout,
  .policy-layout,
  .plan-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px 20px;
  }

  .hero-panel {
    display: none;
  }

  .study-side,
  .match-panel {
    position: static;
  }

  .study-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .welcome {
    padding: 18px 18px 50px;
  }

  .welcome-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
  }

  .welcome-art {
    min-height: 0;
    display: none;
  }

  .welcome-top {
    margin-bottom: 24px;
  }

  .welcome-links .btn:first-child {
    display: none;
  }

  .welcome-stats {
    gap: 18px;
  }

  .welcome-features {
    margin-top: 40px;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .result-stats {
    gap: 14px;
  }
}

@media (max-width: 620px) {
  html {
    font-size: calc(15.5px * var(--font-scale));
  }

  .app-main {
    padding-left: 13px;
    padding-right: 13px;
  }

  .course-grid,
  .bank-shortcuts,
  .product-grid,
  .form-grid,
  .quick-grid,
  .stat-grid,
  .study-side {
    grid-template-columns: 1fr;
  }

  .bank-shortcut--wide {
    grid-column: auto;
  }

  .bank-shortcuts {
    grid-template-columns: 1fr 1fr;
  }

  .bank-shortcut--wide {
    grid-column: 1 / -1;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1,
  .hero h2 {
    font-size: 1.62rem;
  }

  .section {
    margin-top: 28px;
  }

  .section-head {
    align-items: center;
  }

  .section-head h2 {
    font-size: 1.16rem;
  }

  .section-head p {
    display: none;
  }

  .continue-card {
    padding: 20px;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-card {
    min-height: 84px;
  }

  .chapter-head {
    padding: 19px;
  }

  .chapter-actions .btn {
    flex: 1;
  }

  .question-card {
    padding: 16px;
  }

  .option {
    padding: 12px;
    gap: 10px;
  }

  .option-text {
    font-size: 0.85rem;
  }

  .session-bar {
    padding: 11px;
    gap: 8px;
  }

  .timer {
    font-size: 0.94rem;
    min-width: 56px;
  }

  .navigator {
    gap: 5px;
  }

  .nav-dot {
    width: 32px;
    height: 32px;
  }

  .rating-row {
    grid-template-columns: 1fr;
  }

  .me-hero {
    padding: 19px;
    gap: 13px;
  }

  .me-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 17px;
    font-size: 1.4rem;
  }

  .me-actions {
    width: 100%;
  }

  .me-actions .btn {
    flex: 1;
  }

  .wallet-card {
    padding: 20px;
  }

  .article-page {
    padding: 18px;
  }

  .plan-hero,
  .policy-hero {
    padding: 20px;
  }

  .welcome-copy .display {
    font-size: 2.45rem;
  }

  .welcome-features {
    grid-template-columns: 1fr;
  }

  .welcome-links .btn {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .auth-card {
    padding: 22px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .side-rail,
  .tabbar,
  .topbar-actions,
  .app-footer {
    display: none !important;
  }

  .app-frame {
    display: block;
  }

  body {
    background: #fff;
  }

  .reader,
  .article-page {
    box-shadow: none;
    border: 0;
  }
}

/* 结构化正文小标题 */
.article-body h3.rich-heading {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 1.04rem;
  margin: 1.25em 0 0.45em;
  color: var(--ink);
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}

.article-body h4.rich-subheading {
  font-size: 0.9rem;
  margin: 1em 0 0.3em;
  color: var(--jade-dark);
}

/* 已作答但未交卷时，保留选择痕迹而不泄露正误 */
.option.is-chosen {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.option.is-chosen .option-letter {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.auth-body .tabbar {
  display: none;
}

.auth-body .app-main {
  padding-bottom: 40px;
}

/* 手机端列表：给标题换行空间，避免被侧边徽标挤成省略号 */
.brand--mobile .brand-text strong {
  white-space: nowrap;
}

@media (max-width: 620px) {
  .list-row {
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
  }

  .list-main strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.5;
  }

  .list-main small {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .list-side {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 96px;
    row-gap: 4px;
    font-size: 0.62rem;
  }

  .list-row .badge {
    font-size: 0.62rem;
    padding: 2px 7px;
  }

  .exam-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .exam-card > .btn {
    margin-left: 64px;
  }

  .bank-score h2 {
    font-size: 1.28rem;
  }

  .topbar .wallet-chip {
    margin-left: 2px;
  }
}

/* Capacitor iOS：WebView 全屏时给状态栏留出安全区 */
html.native-app body { padding-top: 58px; }
html.native-app .topbar { top: 58px; }
html.native-app .tabbar { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

/* 2026-10 无障碍审计修正：页脚/面包屑的触控目标 */
.app-footer a, .app-footer span { display: inline-flex; align-items: center; min-height: 24px; }
.chapter-breadcrumb a { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 2px; }

/* 2026-10 无障碍审计：让卡片标题/来源链接达到 24px 触控目标 */
.policy-card h3 a,
.link-arrow,
.source-line a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
