/* ============================================================
   AI 错题讲解小助手 · 自然有机 · 草木
   配色严格遵循视觉规范中的色值
   ============================================================ */
:root {
  --c-primary: #41659f;
  --c-secondary: #6a59b1;
  --c-accent: #6e3dc2;
  --c-bg: #f8fafb;
  --c-surface: #ffffff;
  --c-text: #1b222c;
  --c-text-2: #5c687a;
  --c-border: #dbdfe6;

  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;

  --shadow-soft: 0 12px 32px -14px rgba(65, 101, 159, 0.18);
  --shadow-lift: 0 20px 46px -18px rgba(110, 61, 194, 0.30);
  --grad-main: linear-gradient(135deg, #41659f 0%, #6a59b1 100%);
  --grad-cta: linear-gradient(135deg, #6a59b1 0%, #6e3dc2 100%);
  --grad-soft: linear-gradient(135deg, rgba(65,101,159,.10), rgba(110,61,194,.10));

  --font-title: 'Quicksand', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.25; margin: 0 0 .35em; }
p { margin: 0 0 .6em; }
a { color: var(--c-primary); }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--c-text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 有机 blob 背景 ---------- */
.bg-blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; filter: blur(10px); opacity: .55; }
.blob-1 { width: 560px; height: 560px; top: -170px; right: -140px;
  background: radial-gradient(circle at 32% 32%, rgba(65,101,159,.30), rgba(110,61,194,.12) 58%, transparent 74%);
  border-radius: 58% 42% 55% 45% / 52% 60% 40% 48%;
  animation: drift1 20s ease-in-out infinite; }
.blob-2 { width: 420px; height: 420px; top: 38%; left: -190px;
  background: radial-gradient(circle at 60% 40%, rgba(110,61,194,.22), rgba(65,101,159,.08) 60%, transparent 76%);
  border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%;
  animation: drift2 26s ease-in-out infinite; }
.blob-3 { width: 300px; height: 300px; bottom: -90px; right: 8%;
  background: radial-gradient(circle at 40% 40%, rgba(106,89,177,.24), rgba(65,101,159,.06) 62%, transparent 78%);
  border-radius: 62% 38% 44% 56% / 48% 56% 44% 52%;
  animation: drift1 24s ease-in-out infinite reverse; }
.blob-4 { width: 240px; height: 240px; top: 14%; left: 26%;
  background: radial-gradient(circle at 50% 50%, rgba(65,101,159,.14), transparent 70%);
  border-radius: 50% 50% 50% 50% / 60% 40% 60% 40%;
  animation: drift2 30s ease-in-out infinite; }
.dot-field {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(106,89,177,.10) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 68%);
  opacity: .6;
}
@keyframes drift1 { 0%,100% { transform: translate(0,0) rotate(0deg) scale(1); } 50% { transform: translate(26px,-22px) rotate(9deg) scale(1.05); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) rotate(0deg) scale(1); } 50% { transform: translate(-24px,20px) rotate(-8deg) scale(1.06); } }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,250,251,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219,223,230,.8);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.brand-mark { display: inline-flex; width: 38px; height: 38px; }
.brand-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(65,101,159,.28)); }
.brand-text { font-family: var(--font-title); font-weight: 700; font-size: 18px; color: var(--c-text); letter-spacing: .2px; }
.brand-text em { font-style: normal; color: var(--c-accent); margin-left: 2px; }
.desktop-nav { display: flex; gap: 4px; margin: 0 auto; }
.desktop-nav button {
  border: 0; background: transparent; padding: 9px 15px; border-radius: 999px;
  font-size: 15px; color: var(--c-text-2); transition: all .22s ease;
}
.desktop-nav button:hover { color: var(--c-primary); background: rgba(65,101,159,.08); }
.desktop-nav button.active { color: #fff; background: var(--grad-main); box-shadow: var(--shadow-soft); }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-border);
  background: var(--c-surface); color: var(--c-text-2); display: inline-flex; align-items: center; justify-content: center;
  transition: all .22s ease; font-size: 17px;
}
.icon-btn:hover { color: var(--c-accent); border-color: var(--c-accent); transform: rotate(-8deg) scale(1.05); }
.icon-btn.danger:hover { color: #c0392b; border-color: #e8b4b0; }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- 通用按钮 ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease, background .2s ease;
  box-shadow: 0 8px 20px -10px rgba(65,101,159,.35);
}
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { padding: 14px 30px; font-size: 16.5px; border-radius: 18px; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-cta { color: #fff; background: var(--grad-cta); box-shadow: 0 12px 26px -12px rgba(110,61,194,.55); }
.btn-cta:hover { box-shadow: 0 16px 32px -12px rgba(110,61,194,.65); transform: translateY(-2px); }
.btn-primary { color: #fff; background: var(--grad-main); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-light { color: var(--c-primary); background: #fff; border: 1.5px solid rgba(65,101,159,.35); }
.btn-light:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.btn-ghost { color: var(--c-text-2); background: transparent; border: 1.5px solid var(--c-border); box-shadow: none; }
.btn-ghost:hover { color: var(--c-accent); border-color: var(--c-accent); }
.btn-soft { color: var(--c-accent); background: rgba(110,61,194,.08); box-shadow: none; border: 1.5px solid rgba(110,61,194,.25); }
.btn-soft:hover { background: rgba(110,61,194,.14); }
.link { background: none; border: 0; color: var(--c-accent); font-size: 14px; padding: 4px 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft); padding: 22px;
}
.hoverable { transition: transform .3s ease, box-shadow .3s ease; }
.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* ---------- 视图切换 ---------- */
.view { display: none; }
.view.active { display: block; animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.sec-title { font-size: 22px; font-weight: 700; color: var(--c-text); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; padding: 48px 0 20px; }
.hero-tag {
  display: inline-block; font-size: 13.5px; color: var(--c-accent); background: rgba(110,61,194,.08);
  border: 1px solid rgba(110,61,194,.22); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 700; color: var(--c-text); }
.hero h1 em { font-style: normal; background: var(--grad-cta); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-copy > p { font-size: 16.5px; color: var(--c-text-2); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 18px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--c-text-2); }
.hero-points span { display: inline-flex; align-items: center; gap: 6px; }
.hero-art { display: flex; justify-content: center; }
.hero-blob {
  position: relative; width: min(360px, 92%); aspect-ratio: 8/7;
  border-radius: 62% 38% 55% 45% / 55% 48% 52% 45%;
  background: var(--grad-soft); border: 1.5px solid rgba(65,101,159,.18);
  box-shadow: var(--shadow-soft); padding: 10px;
  animation: blobBob 9s ease-in-out infinite;
}
.hero-blob svg { width: 100%; height: 100%; }
@keyframes blobBob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.float-tag {
  position: absolute; font-size: 13px; font-weight: 600; color: var(--c-primary);
  background: #fff; border: 1px solid var(--c-border); border-radius: 999px; padding: 6px 12px;
  box-shadow: var(--shadow-soft); white-space: nowrap;
}
.t1 { top: 6%; left: -6%; animation: floaty 5s ease-in-out infinite; }
.t2 { top: 40%; right: -8%; color: #2e7d4f; border-color: #cde7d8; animation: floaty 6s 1s ease-in-out infinite; }
.t3 { bottom: 8%; left: 4%; animation: floaty 5.5s .6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- 三步卡片 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0; position: relative; }
.step-card { position: relative; overflow: hidden; }
.step-card::after {
  content: ''; position: absolute; width: 120px; height: 120px; right: -46px; top: -46px; border-radius: 50%;
  background: radial-gradient(circle, rgba(110,61,194,.14), transparent 70%); pointer-events: none;
}
.step-ico { font-size: 30px; display: block; margin-bottom: 10px; }
.step-num {
  position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad-main); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 700; font-size: 14px;
}
.step-card h3 { font-size: 18px; }
.step-card p { color: var(--c-text-2); font-size: 14.5px; margin: 0; }

/* ---------- 最近 / 继续 ---------- */
.resume-card { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.resume-card .btn { flex-shrink: 0; }
.resume-txt b { font-family: var(--font-title); }
.resume-txt p { margin: 2px 0 0; font-size: 14px; }
.recent { margin-bottom: 40px; }

/* ---------- 历史 / 最近列表项 ---------- */
.his-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; margin-bottom: 12px; transition: transform .25s ease, box-shadow .25s ease; }
.his-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.his-ic {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 16px;
  background: var(--grad-soft); border: 1px solid rgba(65,101,159,.16);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.his-main { flex: 1; min-width: 0; }
.his-top { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.his-time { font-size: 12.5px; color: var(--c-text-2); }
.his-text { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.his-actions { display: flex; gap: 8px; flex-shrink: 0; }
.his-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 16px; }

.chip {
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text-2);
  border-radius: 999px; padding: 5px 13px; font-size: 13.5px; transition: all .2s ease;
}
.chip.active { color: #fff; background: var(--grad-main); border-color: transparent; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; }
.empty .empty-ic { font-size: 52px; display: block; margin-bottom: 14px; }
.empty p { color: var(--c-text-2); }

/* ---------- 录入 ---------- */
.input-card { padding: 28px; }
.seg {
  display: inline-flex; background: rgba(65,101,159,.07); border: 1px solid var(--c-border);
  border-radius: 999px; padding: 4px; margin: 6px 0 20px; gap: 4px;
}
.seg-btn {
  border: 0; background: transparent; padding: 9px 22px; border-radius: 999px;
  font-size: 15px; color: var(--c-text-2); transition: all .22s ease; font-weight: 600;
}
.seg-btn.active { background: #fff; color: var(--c-accent); box-shadow: var(--shadow-soft); }
.subject-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.subject-row .muted { margin-right: 4px; }

.dropzone { border-radius: var(--r-lg); padding: 38px 20px; text-align: center; cursor: pointer; border: 2px dashed var(--c-border); background: rgba(255,255,255,.6); transition: all .25s ease; outline: none; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag { border-color: var(--c-accent); background: rgba(110,61,194,.05); }
.dz-ic { font-size: 44px; display: block; margin-bottom: 8px; }
.dz-inner p { margin: 4px 0; }
.dz-inner b { color: var(--c-primary); }

#photoPreview { margin-top: 14px; }
#photoPreview img { border-radius: var(--r-lg); border: 1px solid var(--c-border); box-shadow: var(--shadow-soft); max-height: 320px; display: block; margin: 0 auto; }
.photo-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.ocr-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.ocr-track { flex: 1; height: 10px; border-radius: 999px; background: rgba(65,101,159,.12); overflow: hidden; }
.ocr-fill { height: 100%; width: 0; border-radius: 999px; background: var(--grad-cta); transition: width .3s ease; }
#ocrPct { font-family: var(--font-title); font-weight: 700; font-size: 13px; color: var(--c-accent); min-width: 38px; text-align: right; }

.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--c-text-2); margin: 18px 0 7px; }
textarea, input[type="text"], input[type="password"] {
  width: 100%; border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  background: #fff; padding: 13px 15px; font-size: 15px; font-family: var(--font-body);
  color: var(--c-text); transition: border-color .2s ease, box-shadow .2s ease; resize: vertical;
}
textarea:focus, input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(110,61,194,.12); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.parse-row { margin-top: 22px; display: flex; justify-content: center; }
.parse-row .btn { min-width: 280px; }

/* ---------- 讲解 ---------- */
.explain-head { margin-bottom: 18px; }
.explain-head .chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip-sub { background: var(--grad-soft); color: var(--c-primary); border: 1px solid rgba(65,101,159,.22); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.chip-type { background: rgba(110,61,194,.08); color: var(--c-accent); border: 1px solid rgba(110,61,194,.2); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.problem-text { font-size: 17px; color: var(--c-text); background: rgba(65,101,159,.05); border: 1px dashed rgba(65,101,159,.3); border-radius: var(--r-md); padding: 14px 16px; margin: 0; }

.player { position: relative; overflow: hidden; padding: 0; }
.player-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--c-border); }
.step-label { font-family: var(--font-title); font-weight: 700; color: var(--c-accent); font-size: 14px; }
.segs { display: flex; gap: 6px; padding: 14px 22px 4px; }
.seg { height: 8px; flex: 1; border: 0; border-radius: 999px; background: rgba(65,101,159,.14); padding: 0; transition: background .3s ease, transform .2s ease; }
.seg.done { background: var(--grad-main); }
.seg.cur { background: var(--grad-cta); transform: scaleY(1.4); }
.step-body { padding: 22px 26px 10px; min-height: 180px; animation: fadeUp .4s ease both; }
.step-no {
  width: 46px; height: 46px; border-radius: 16px; background: var(--grad-cta); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; font-size: 20px; margin-bottom: 12px;
  box-shadow: 0 10px 20px -8px rgba(110,61,194,.5);
}
.step-body h3 { font-size: 21px; }
.step-text { font-size: 16.5px; color: var(--c-text); }
.diagram { margin: 14px 0 6px; border-radius: var(--r-md); background: var(--grad-soft); border: 1px solid rgba(65,101,159,.14); padding: 10px; }
.diag-svg { width: 100%; height: auto; display: block; }
.player-nav { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px 22px; flex-wrap: wrap; }
.player-nav .btn { flex: 1; min-width: 130px; }

.kps-wrap { margin-top: 26px; }
.kp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.kp {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; gap: 12px; box-shadow: var(--shadow-soft);
  border-left: 4px solid var(--c-accent); transition: transform .25s ease;
}
.kp:hover { transform: translateY(-3px); }
.kp-badge { flex-shrink: 0; width: 34px; height: 34px; border-radius: 12px; background: var(--grad-cta); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.kp h4 { margin: 0 0 2px; font-size: 15px; }
.kp p { margin: 0; color: var(--c-text-2); font-size: 13.5px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 40px; }
.cta-row .btn { flex: 1; min-width: 200px; }

/* ---------- 练习 ---------- */
.practice-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 16px; }
.practice-top h2 { margin-bottom: 0; }
.var-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 40px; }
.var-card { display: flex; flex-direction: column; gap: 10px; }
.var-head { display: flex; align-items: center; gap: 10px; }
.var-no { width: 34px; height: 34px; border-radius: 50%; background: var(--grad-main); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; }
.var-head h3 { font-size: 16.5px; margin: 0; flex: 1; }
.diff { font-size: 12px; color: var(--c-accent); background: rgba(110,61,194,.08); border: 1px solid rgba(110,61,194,.2); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.var-q { font-size: 15.5px; }
.hint-box { background: rgba(65,101,159,.06); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; color: var(--c-text-2); animation: fadeUp .3s ease both; }
.solve-box { background: rgba(110,61,194,.06); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; color: var(--c-text); animation: fadeUp .3s ease both; }
.answer-row { display: flex; gap: 10px; }
.answer-row input { flex: 1; padding: 10px 14px; font-size: 15px; }
.feedback { font-size: 14.5px; font-weight: 600; min-height: 0; opacity: 0; height: 0; overflow: hidden; transition: all .3s ease; }
.feedback.show { opacity: 1; height: auto; margin-top: 2px; }
.feedback.ok { color: #1e7d46; }
.feedback.err { color: #c0392b; }

/* ---------- 加载遮罩 ---------- */
.loading-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(248,250,251,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.loading-overlay.show { opacity: 1; pointer-events: auto; }
.load-inner { text-align: center; }
.load-blob { width: 110px; height: 110px; margin: 0 auto 18px; }
.load-blob svg { width: 100%; height: 100%; animation: spin 9s linear infinite; }
.petal { fill: none; stroke-width: 7; stroke-linecap: round; opacity: .85; }
.p1 { stroke: var(--c-primary); stroke-dasharray: 90 220; animation: petalSpin 2.6s ease-in-out infinite; }
.p2 { stroke: var(--c-secondary); stroke-dasharray: 60 250; animation: petalSpin 2.6s .4s ease-in-out infinite reverse; }
.p3 { stroke: var(--c-accent); stroke-dasharray: 120 190; animation: petalSpin 2.6s .8s ease-in-out infinite; }
@keyframes petalSpin { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(90deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
#loadingMsg { font-family: var(--font-title); font-weight: 600; color: var(--c-accent); font-size: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 24px);
  background: var(--c-text); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 14.5px; box-shadow: var(--shadow-lift); z-index: 120;
  opacity: 0; pointer-events: none; transition: all .3s ease; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--grad-main); }
.toast.error { background: linear-gradient(135deg, #c0392b, #e74c3c); }

/* ---------- 模态 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(27,34,44,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal { width: min(460px, 100%); max-height: 88vh; overflow: auto; padding: 24px; animation: fadeUp .35s ease both; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 20px; }
.modal-body .muted { margin-bottom: 14px; }
.mode-switch { display: grid; gap: 10px; margin-bottom: 6px; }
.radio-card { display: block; border: 1.5px solid var(--c-border); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; transition: all .2s ease; }
.radio-card:hover { border-color: var(--c-accent); }
.radio-card:has(input:checked) { border-color: var(--c-accent); background: rgba(110,61,194,.05); }
.radio-card input { accent-color: var(--c-accent); }
.radio-card span { display: inline-flex; flex-direction: column; font-weight: 600; margin-left: 8px; vertical-align: middle; }
.radio-card i { font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--c-text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- 移动端底部导航 ---------- */
.tabbar { display: none; }

/* ---------- 微交互 ---------- */
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
.shake { animation: shake .4s ease; }
@keyframes popIn { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: popIn .45s ease both; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; text-align: center; }
  .hero-copy > p { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-points { justify-content: center; }
  .hero-art { order: -1; }
  .hero-blob { width: min(280px, 86%); }
  .steps { grid-template-columns: 1fr; }
  .desktop-nav { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--c-border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .tabbar button {
    border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 11px; color: var(--c-text-2); padding: 6px 10px; border-radius: 16px; transition: all .2s ease;
  }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.active { color: var(--c-accent); background: rgba(110,61,194,.08); }
  main.wrap { padding-bottom: 90px; }
  .parse-row .btn { width: 100%; }
  .cta-row .btn { min-width: 100%; }
  .resume-card { flex-direction: column; align-items: stretch; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
