/* =====================================================================
   冲鸭 v4.1 · Liquid Glass 视觉层
   在 styles.css 之后加载：只覆盖表层质感，不改布局与交互。
   参考 iOS 18 液态玻璃：半透明材质 + 背景折射 + 高光边 + 柔和大投影。
   ===================================================================== */

/* ---------- 1. 材质变量 ---------- */
:root {
  --lg-blur: blur(26px) saturate(180%);
  --lg-blur-sm: blur(16px) saturate(160%);
  --lg-tint: 78%;
  --lg-bg: color-mix(in srgb, var(--surface) var(--lg-tint), transparent);
  --lg-bg-2: color-mix(in srgb, var(--surface) 58%, transparent);
  --lg-ring: color-mix(in srgb, #ffffff 78%, var(--line));
  --lg-hl: rgba(255, 255, 255, 0.9);
  --lg-ink-glow: rgba(28, 107, 85, 0.16);
  --lg-shadow: 0 1px 1px rgba(24, 22, 18, 0.04), 0 10px 30px -14px rgba(46, 38, 26, 0.24), 0 34px 70px -46px rgba(46, 38, 26, 0.4);
  --lg-shadow-lg: 0 2px 2px rgba(24, 22, 18, 0.05), 0 22px 48px -22px rgba(46, 38, 26, 0.3), 0 60px 120px -60px rgba(46, 38, 26, 0.44);
  --lg-radius: 26px;
  --lg-radius-sm: 18px;
}

:root[data-theme="dark"],
:root[data-theme="auto"] {
  --lg-bg: color-mix(in srgb, #171a1f 72%, transparent);
  --lg-bg-2: color-mix(in srgb, #171a1f 52%, transparent);
  --lg-ring: rgba(255, 255, 255, 0.14);
  --lg-hl: rgba(255, 255, 255, 0.16);
  --lg-ink-glow: rgba(58, 180, 145, 0.22);
  --lg-shadow: 0 1px 1px rgba(0, 0, 0, 0.5), 0 10px 30px -12px rgba(0, 0, 0, 0.7), 0 40px 80px -50px rgba(0, 0, 0, 0.9);
  --lg-shadow-lg: 0 2px 3px rgba(0, 0, 0, 0.55), 0 24px 60px -24px rgba(0, 0, 0, 0.8), 0 80px 140px -70px rgba(0, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --lg-bg: color-mix(in srgb, #171a1f 72%, transparent);
    --lg-bg-2: color-mix(in srgb, #171a1f 52%, transparent);
    --lg-ring: rgba(255, 255, 255, 0.14);
    --lg-hl: rgba(255, 255, 255, 0.16);
    --lg-shadow: 0 1px 1px rgba(0, 0, 0, 0.5), 0 10px 30px -12px rgba(0, 0, 0, 0.7), 0 40px 80px -50px rgba(0, 0, 0, 0.9);
    --lg-shadow-lg: 0 2px 3px rgba(0, 0, 0, 0.55), 0 24px 60px -24px rgba(0, 0, 0, 0.8), 0 80px 140px -70px rgba(0, 0, 0, 1);
  }
}

/* ---------- 2. 背景透光层（玻璃要有东西可折射） ---------- */
body::after {
  content: "";
  position: fixed;
  inset: -18vh -12vw;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 14% 12%, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 68%),
    radial-gradient(32% 30% at 88% 8%, rgba(122, 143, 214, 0.28) 0%, transparent 66%),
    radial-gradient(40% 36% at 82% 86%, rgba(232, 196, 132, 0.3) 0%, transparent 70%),
    radial-gradient(34% 32% at 22% 92%, rgba(180, 143, 214, 0.22) 0%, transparent 68%);
  filter: blur(38px) saturate(120%);
  opacity: 0.85;
  animation: lg-drift 34s ease-in-out infinite alternate;
}
:root[data-theme="dark"] body::after,
:root[data-theme="auto"] body::after {
  opacity: 0.5;
  filter: blur(46px) saturate(110%);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] body::after { opacity: 0.5; filter: blur(46px) saturate(110%); }
}

@keyframes lg-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2.2%, 1.6%, 0) scale(1.04); }
  100% { transform: translate3d(2%, -1.4%, 0) scale(1.02); }
}

.app, .topnav, .main, .views, .view { position: relative; z-index: 1; }

/* ---------- 3. 通用玻璃面板 ----------
   注意：backdrop-filter 非常贵（每个元素一次离屏取样）。只给「大容器 + 少量」用，
   列表行 / 统计小卡一律用不透明渐变模拟玻璃感，否则词库一屏 60 行 = 60 次模糊，直接卡死。 */
.panel,
.plan-panel,
.venue,
.eq-card,
.sent-side,
.sent-main,
.study-head,
.rd-hero,
.wrong-panel,
.vocab-panel,
.target-panel {
  background: var(--lg-bg) !important;
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  border: 1px solid var(--lg-ring) !important;
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    inset 0 -1px 0 color-mix(in srgb, var(--ink) 6%, transparent),
    var(--lg-shadow) !important;
}

/* 小卡 / 列表行：不跑模糊，用更实的渐变底做出同样的玻璃层次 */
.lib-row,
.kpi,
.train-card,
.plan-school,
.score-card,
.wri-left,
.wri-right,
.heatmap,
.maplab {
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--surface) 92%, transparent) 0%,
      color-mix(in srgb, var(--surface) 74%, transparent) 100%) !important;
  border: 1px solid var(--lg-ring) !important;
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    var(--lg-shadow) !important;
}

.panel, .plan-panel, .venue, .eq-card, .sent-side, .sent-main, .wrong-panel, .vocab-panel, .target-panel {
  border-radius: var(--lg-radius) !important;
}

.train-card, .plan-school, .kpi, .lib-row, .study-head, .rd-hero, .score-card {
  border-radius: var(--lg-radius-sm) !important;
}

/* 卡片悬浮：轻微上浮 + 高光更亮 */
.train-card, .plan-school, .lib-row, .sent-card {
  transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.34s ease, border-color 0.34s ease;
}
.train-card:hover, .plan-school:hover, .lib-row:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--lg-ring)) !important;
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    0 2px 3px rgba(24, 22, 18, 0.05),
    0 22px 46px -20px color-mix(in srgb, var(--accent) 34%, rgba(46, 38, 26, 0.32)),
    var(--lg-shadow) !important;
}

/* ---------- 4. 顶栏 / 导航：悬浮玻璃条 ---------- */
.topnav {
  margin: 14px 18px 0;
  padding: 8px 14px;
  border-radius: 22px;
  background: var(--lg-bg-2);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  border: 1px solid var(--lg-ring);
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    0 1px 2px rgba(24, 22, 18, 0.04),
    0 20px 44px -26px rgba(46, 38, 26, 0.42);
  position: sticky;
  top: 10px;
  z-index: 40;
}

.nav {
  padding: 4px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
}

.nav-pill {
  background: linear-gradient(180deg, color-mix(in srgb, #fff 92%, var(--accent-soft)), color-mix(in srgb, var(--accent-soft) 72%, #fff)) !important;
  box-shadow:
    0 1px 1px rgba(24, 22, 18, 0.08),
    0 6px 16px -6px color-mix(in srgb, var(--accent) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}
:root[data-theme="dark"] .nav-pill,
:root[data-theme="auto"] .nav-pill {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 34%, #1b1f24), #171a1f) !important;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.nav-item { border-radius: 13px; }
.nav-item.is-active { color: var(--accent-ink); }
:root[data-theme="dark"] .nav-item.is-active,
:root[data-theme="auto"] .nav-item.is-active { color: #eaf6f0; }

.icon-btn, .chip, .streak {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  backdrop-filter: var(--lg-blur-sm);
  border: 1px solid var(--lg-ring);
  box-shadow: inset 0 1px 0 var(--lg-hl), var(--shadow-sm);
}

/* ---------- 5. 按钮 / 芯片 / 分段控件 ---------- */
.btn {
  border-radius: 14px;
  border: 1px solid var(--lg-ring);
  background: var(--lg-bg-2);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  backdrop-filter: var(--lg-blur-sm);
  box-shadow: inset 0 1px 0 var(--lg-hl), 0 1px 2px rgba(24, 22, 18, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--lg-ring));
  box-shadow: inset 0 1px 0 var(--lg-hl), 0 10px 24px -14px rgba(46, 38, 26, 0.5);
}
.btn:active { transform: translateY(0) scale(0.985); }

.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 92%, #fff), var(--accent)) !important;
  border-color: color-mix(in srgb, var(--accent) 70%, #fff) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 20px -10px color-mix(in srgb, var(--accent) 75%, transparent) !important;
}

.seg {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  padding: 4px;
  border-radius: 15px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 50%, transparent);
}
.seg-btn { border-radius: 11px; }
.seg-btn.is-on {
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  backdrop-filter: var(--lg-blur-sm);
  box-shadow: inset 0 1px 0 var(--lg-hl), 0 4px 12px -8px rgba(46, 38, 26, 0.5);
}

.schip, .fa-tab, .fa-ftab, .rd-tabs button, .eq-tab, .sent-tab {
  border-radius: 999px;
  border: 1px solid var(--lg-ring);
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  backdrop-filter: var(--lg-blur-sm);
  box-shadow: inset 0 1px 0 var(--lg-hl), 0 1px 2px rgba(24, 22, 18, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.schip:hover, .fa-tab:hover, .fa-ftab:hover, .eq-tab:hover { transform: translateY(-1px); }
.schip.is-on, .fa-tab.is-on, .fa-ftab.is-on, .eq-tab.is-on {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--lg-ring));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 88%, #fff), color-mix(in srgb, var(--accent-soft) 62%, #fff));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 16px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* 复习页侧栏的「句子课」入口卡 */
.rail-course {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px 13px 11px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--lg-ring));
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent-soft) 56%, transparent), color-mix(in srgb, var(--accent-soft) 8%, transparent));
  color: var(--ink);
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--lg-hl);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.rail-course:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--lg-ring));
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent-soft) 78%, transparent), color-mix(in srgb, var(--accent-soft) 18%, transparent));
}
.rc-head { display: flex; align-items: center; gap: 9px; }
.rc-ico {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent-ink);
}
.rc-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rc-title b { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.rc-title em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-arrow { margin-left: auto; color: var(--faint); flex: 0 0 15px; transition: transform 0.2s var(--ease), color 0.2s var(--ease); }
.rail-course:hover .rc-arrow { transform: translateX(2px); color: var(--accent); }
.rc-bar {
  display: block;
  height: 3px;
  margin: 9px 0 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}
.rc-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s var(--ease-out); }
.rc-meta { display: block; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .rail-course,
:root[data-theme="auto"] .rail-course {
  background: linear-gradient(160deg, rgba(46, 139, 111, 0.18), rgba(46, 139, 111, 0.04));
  border-color: rgba(126, 200, 172, 0.22);
}
:root[data-theme="dark"] .rc-title b,
:root[data-theme="auto"] .rc-title b { color: #eaf4f0; }
:root[data-theme="dark"] .rc-ico,
:root[data-theme="auto"] .rc-ico { color: #cdeadf; background: rgba(126, 200, 172, 0.16); }

/* ---------- 6b. 复习流程的顺滑度：滑块 / 换模式 / 评分 ---------- */
.seg { position: relative; }
.seg-pill {
  position: absolute;
  top: 3px;
  left: 0;
  height: 30px;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.38s var(--ease-spring), width 0.38s var(--ease-spring), opacity 0.2s var(--ease);
}
.seg-pill.no-anim { transition: none; }
.seg-btn { position: relative; z-index: 1; background: transparent; }
.seg-btn.is-on { background: transparent; box-shadow: none; color: var(--ink); font-weight: 600; }
:root[data-theme="dark"] .seg-pill,
:root[data-theme="auto"] .seg-pill { background: rgba(255, 255, 255, 0.13); box-shadow: none; }

/* 换模式：旧卡面淡出 → 新卡面浮入 */
.card-stage { transition: opacity 0.16s var(--ease), transform 0.16s var(--ease); }
.card-stage.is-swap-out { opacity: 0; transform: translateY(6px) scale(0.995); }
.card-stage.is-swap-in { animation: stageIn 0.36s var(--ease-out) both; }
@keyframes stageIn {
  from { opacity: 0; transform: translateY(12px) scale(0.994); }
  to { opacity: 1; transform: none; }
}

/* 评分按钮：解锁时依次浮起，而不是整块硬切 */
.ratings:not(.is-locked) .rating { animation: rateIn 0.34s var(--ease-out) both; }
.ratings:not(.is-locked) .rating:nth-child(2) { animation-delay: 0.045s; }
.ratings:not(.is-locked) .rating:nth-child(3) { animation-delay: 0.09s; }
.ratings:not(.is-locked) .rating:nth-child(4) { animation-delay: 0.135s; }
@keyframes rateIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .seg-pill, .card-stage, .ratings:not(.is-locked) .rating { transition: none; animation: none; }
}

/* 听音模式：选项多，卡面按内容长，不再内部滚动 */
.card3d.is-auto { height: auto; min-height: 400px; }
.card3d.is-auto .card3d-inner { height: auto; }
.card3d.is-auto .face { position: relative; inset: auto; min-height: 400px; overflow: visible; }


/* 小控件（chip / 段控 / 选择器 / 按钮）：一律不跑 backdrop-filter。
   一屏 60 个 chip 各做一次模糊，是词库卡顿的主因。 */
.chip,
.chip.tiny,
.schip,
.seg-btn,
.seg,
.mini-select,
.icon-btn,
.btn,
.streak,
.date-chip,
.stats-tools .btn {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.chip,
.chip.tiny,
.schip,
.seg-btn,
.mini-select {
  background: color-mix(in srgb, var(--surface) 78%, transparent) !important;
}
/* ---------- 5b. 对比度修正：原本「深底白字」的选中态改成浅玻璃 + 深字 ---------- */
.schip.is-on,
.fa-tab.is-on,
.sm.is-on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 92%, #fff), color-mix(in srgb, var(--accent-soft) 64%, #fff)) !important;
  border-color: color-mix(in srgb, var(--accent) 46%, var(--lg-ring)) !important;
  color: var(--accent-ink) !important;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 16px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}
.fa-tab.is-on em { color: color-mix(in srgb, var(--accent-ink) 60%, transparent) !important; }

:root[data-theme="dark"] .schip.is-on,
:root[data-theme="dark"] .fa-tab.is-on,
:root[data-theme="dark"] .sm.is-on,
:root[data-theme="auto"] .schip.is-on,
:root[data-theme="auto"] .fa-tab.is-on,
:root[data-theme="auto"] .sm.is-on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, #1b1f24), #171a1f) !important;
  color: #eaf6f0 !important;
  border-color: color-mix(in srgb, var(--accent) 44%, transparent) !important;
}

/* ---------- 6. 输入与下拉 ---------- */
input[type="text"], input[type="search"], input[type="number"], input[type="date"], textarea, .mini-select {
  border-radius: 13px;
  border: 1px solid var(--lg-ring);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  -webkit-backdrop-filter: var(--lg-blur-sm);
  backdrop-filter: var(--lg-blur-sm);
  box-shadow: inset 0 1px 0 var(--lg-hl), inset 0 -1px 0 color-mix(in srgb, var(--ink) 5%, transparent);
}
input:focus, textarea:focus, .mini-select:focus {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--lg-ring));
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}
.fld-lab { text-shadow: 0 1px 0 var(--surface); }

/* ---------- 7. 复习卡 / 模考 / 弹层 ---------- */
.card-stage .card3d, .card-face {
  border-radius: 28px !important;
  border: 1px solid var(--lg-ring) !important;
  background: var(--lg-bg) !important;
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    inset 0 -1px 0 color-mix(in srgb, var(--ink) 6%, transparent),
    var(--lg-shadow-lg) !important;
}

.modal, .modal-card, .sheet, .mock, .wri {
  background: var(--lg-bg) !important;
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
}

.toast {
  border-radius: 16px;
  border: 1px solid var(--lg-ring);
  background: var(--lg-bg) !important;
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  box-shadow: inset 0 1px 0 var(--lg-hl), var(--lg-shadow);
}

/* ---------- 8. 视图入场：玻璃轻微缩放浮现 ---------- */
.view.is-active > .view-head,
.view.is-active > .panel:first-of-type {
  animation: lg-rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes lg-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.994); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- 9. 降级：不支持 backdrop-filter 时退回实体底 ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel, .plan-panel, .train-card, .plan-school, .lib-row, .topnav, .btn, .toast {
    background: var(--surface) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .view.is-active > .view-head, .view.is-active > .panel:first-of-type { animation: none; }
}

/* ---------- 10. 长列表性能：屏外行不参与布局/绘制 ----------
   注意：词库行不能开 content-visibility——隐藏行上 scrollIntoView / 点击定位会失效，
   翻页后点单词会出现「没反应」。只对不需要精确定位的院校卡保留。 */
.sent-side .sent-row,
.plan-school {
  content-visibility: auto;
  contain-intrinsic-size: 0 58px;
}

/* ---------- 11. 梦校页 v2：仪表盘 hero + 哑光校卡 + 竖向时间轴 ---------- */
.plan-hero {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.15fr);
  gap: 26px;
  padding: 26px 28px;
  margin-bottom: 16px;
  border-radius: var(--lg-radius) !important;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%),
    var(--lg-bg) !important;
  border: 1px solid var(--lg-ring) !important;
  box-shadow:
    inset 0 1px 0 var(--lg-hl),
    var(--lg-shadow) !important;
  align-items: center;
}
.ph-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.ph-num { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 2px; }
.ph-num b {
  font-size: clamp(54px, 6vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 780;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.ph-num span { font-size: 16px; color: var(--muted); font-weight: 600; }
.ph-cap { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.ph-bar {
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}
.ph-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ph-barcap { font-size: 11.5px; color: var(--faint); margin-top: 8px; font-variant-numeric: tabular-nums; }

.ph-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ph-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
}
.ph-tile span { font-size: 11px; letter-spacing: 0.02em; color: var(--faint); }
.ph-tile b { font-size: 26px; line-height: 1.1; font-weight: 760; color: var(--ink); font-variant-numeric: tabular-nums; }
.ph-tile em { font-size: 11.5px; font-style: normal; color: var(--muted); }

/* 校卡：左侧色轨 + 截止胶囊 */
.plan-school { padding-left: 22px !important; overflow: hidden; }
.plan-school::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px;
}
.plan-school.tone-main::before { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent)); }
.plan-school.tone-sub::before { background: linear-gradient(180deg, #7a8fd6, color-mix(in srgb, #7a8fd6 30%, transparent)); }
.plan-school.tone-safe::before { background: linear-gradient(180deg, #c99a4e, color-mix(in srgb, #c99a4e 30%, transparent)); }
.plan-school.tone-alt::before { background: linear-gradient(180deg, #b9b3a6, color-mix(in srgb, #b9b3a6 30%, transparent)); }
.ps-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.ps-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.ps-chip.is-ghost { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.ps-chip.is-hot { background: color-mix(in srgb, #c99a4e 20%, transparent); color: #7d5a1c; font-weight: 600; }
.ps-needs li { display: flex; gap: 7px; align-items: flex-start; }
.ps-needs li i {
  flex: 0 0 auto;
  width: 5px; height: 5px;
  margin-top: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* 时间轴：竖线 + 圆点 + 年份分隔 */
.plan-tl { padding: 22px 24px 12px; }
.tl-year {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--faint);
  font-weight: 700;
  margin: 14px 0 6px;
  padding-left: 2px;
}
.tl-year:first-of-type { margin-top: 2px; }
.tl-row {
  display: grid;
  grid-template-columns: 16px 62px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0 9px 2px;
  border: 0 !important;
  position: relative;
}
.tl-row:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9.5px;
  top: 50%;
  bottom: -50%;
  width: 1px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.tl-row.is-past::before { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tl-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--surface);
  margin-left: 3px;
}
.tl-row.is-soon .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.tl-row.is-past .tl-dot { border-color: color-mix(in srgb, var(--ink) 14%, transparent); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.tl-row .tl-date { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl-row .tl-label { font-size: 13.5px; color: var(--ink-2); }
.tl-row.is-soon .tl-label { color: var(--ink); font-weight: 600; }
.tl-row.is-past .tl-label { color: var(--faint); }
.tl-row .tl-days { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-row.is-soon .tl-days { color: var(--accent-ink); font-weight: 600; }

@media (max-width: 980px) {
  .plan-hero { grid-template-columns: 1fr; }
  .ph-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ph-side { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 16px 52px 1fr; }
  .tl-row .tl-days { grid-column: 3; text-align: left; font-size: 11.5px; }
}
.ps-range {
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin: -2px 0 2px;
}
.plan-school .ps-meta { margin-bottom: 4px; }
.plan-school .ps-needs { margin-top: 8px; }
.plan-school .ps-needs li { padding: 2px 0; font-size: 12.5px; line-height: 1.55; }
.plan-school .ps-note { margin-top: 8px; }
.ps-chip.ps-state.ok { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); font-weight: 600; }
.ps-chip.ps-state.warn { background: color-mix(in srgb, #c8922e 18%, transparent); color: #7d5a1c; font-weight: 600; }
.ps-chip.ps-state.bad { background: color-mix(in srgb, #c0504d 16%, transparent); color: #8c3733; font-weight: 600; }
.plan-school .ps-head { margin-bottom: 2px; }
.plan-school .ps-name { font-size: 15px; }

/* ===== v5.2 提示卡 / 档位条 / 提意见气泡 ===== */
.hint-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 18px 14px;
  margin-bottom: 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), color-mix(in srgb, var(--accent) 2%, var(--surface)));
  box-shadow: var(--shadow-sm);
  animation: hintIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
}
@keyframes hintIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.995); }
  to { opacity: 1; transform: none; }
}
.hint-card.is-out { opacity: 0; transform: translateY(-6px); transition: opacity 0.24s var(--ease), transform 0.24s var(--ease); }
.hc-ico {
  flex: 0 0 26px; height: 26px; margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-ink);
  font-size: 13px; font-weight: 800;
}
.hc-body { flex: 1; min-width: 0; }
.hc-body b { display: block; font-size: 14px; letter-spacing: -0.01em; color: var(--ink); }
.hc-body p { margin: 5px 0 0; font-size: 12.8px; line-height: 1.75; color: var(--muted); }
.hc-tips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.hc-tips i {
  font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--muted); white-space: nowrap;
}
.hc-x {
  flex: 0 0 auto; width: 26px; height: 26px; margin: -4px -6px 0 0;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--faint); font-size: 17px; line-height: 1; cursor: pointer;
  transition: all 0.18s var(--ease);
}
.hc-x:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }

/* 档位条 */
.tier-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 2px 2px 12px; font-size: 12px; color: var(--muted);
}
.tier-bar b { font-size: 12.5px; color: var(--ink); font-weight: 650; }
.tier-bar span { color: var(--faint); }
.tb {
  font-style: normal; font-size: 11.5px; padding: 2px 9px; border-radius: 99px;
  border: 1px solid transparent;
}
.tb.is-a { background: color-mix(in srgb, #d9534f 11%, transparent); color: #a53b38; }
.tb.is-b { background: color-mix(in srgb, #7a8fd6 14%, transparent); color: #4a5c94; }
.tb.is-c { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-ink); }
.tb.is-d { background: color-mix(in srgb, #b9b3a6 18%, transparent); color: #6b665c; }

/* 卡头档位章（按分数动态变色） */
.ps-tier.is-a { background: color-mix(in srgb, #d9534f 12%, transparent); color: #a53b38; }
.ps-tier.is-b { background: color-mix(in srgb, #7a8fd6 16%, transparent); color: #45568c; }
.ps-tier.is-c { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.ps-tier.is-d { background: color-mix(in srgb, #b9b3a6 20%, transparent); color: #6b665c; }

/* 提意见：呼吸小圆点 */
.icon-btn.has-dot { position: relative; color: var(--accent-ink); }
.icon-btn.has-dot::after {
  content: '';
  position: absolute; top: 5px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #d9534f;
  box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.55);
  animation: dotPulse 1.9s ease-out infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(217, 83, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0); }
}

/* 提意见：首次气泡 */
.idea-tip {
  position: fixed;
  z-index: 70;
  max-width: 246px;
  padding: 10px 13px 11px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 34px rgba(20, 22, 26, 0.24);
  opacity: 0; transform: translateY(-5px) scale(0.98);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
  cursor: pointer;
}
.idea-tip.is-on { opacity: 1; transform: none; }
.idea-tip b { display: block; font-size: 12.5px; }
.idea-tip span { display: block; font-size: 11.5px; line-height: 1.6; opacity: 0.72; margin-top: 3px; }
.idea-tip i {
  position: absolute; top: -5px; right: 16px;
  width: 10px; height: 10px; background: var(--ink);
  transform: rotate(45deg); border-radius: 2px;
}
[data-theme="dark"] .idea-tip { background: #e9edf2; color: #14171b; }
[data-theme="dark"] .idea-tip i { background: #e9edf2; }

@media (prefers-reduced-motion: reduce) {
  .hint-card, .icon-btn.has-dot::after { animation: none; }
}
