/* 高考助力站 —— 样式 */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --card-2: #f0f2f8;
  --line: #e3e6ef;
  --text: #1b2232;
  --muted: #667085;
  --primary: #2f5bea;
  --primary-soft: #e8eeff;
  --primary-text: #ffffff;
  --accent: #e8590c;
  --accent-soft: #fff1e8;
  --ok: #12855b;
  --ok-soft: #e4f6ee;
  --danger: #d1343e;
  --danger-soft: #fdecee;
  --heat-0: #e8ebf3;
  --heat-1: #2f5bea;
  --warn: #b54708;
  --warn-soft: #fff6e0;
  --bg-glass: rgba(245, 246, 250, .94);
  --focus-ring: rgba(47, 91, 234, .35);
  --dash: rgba(102, 112, 133, .55);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 14px;
  --tabbar-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e121b;
    --card: #161c28;
    --card-2: #1d2433;
    --line: #2a3243;
    --text: #e7eaf1;
    --muted: #98a2b3;
    --primary: #6d8dff;
    --primary-soft: #1f2a4a;
    --primary-text: #0e121b;
    --accent: #ff8f52;
    --accent-soft: #3a2418;
    --ok: #3fcf8e;
    --ok-soft: #13301f;
    --danger: #ff6b73;
    --danger-soft: #3a1a1d;
    --heat-0: #232b3b;
    --heat-1: #6d8dff;
    --warn: #fdb022;
    --warn-soft: #33270f;
    --bg-glass: rgba(14, 18, 27, .94);
    --focus-ring: rgba(109, 141, 255, .35);
    --dash: rgba(152, 162, 179, .55);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden, [hidden] { display: none !important; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 960px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; display: block; }
.topnav { display: none; gap: 4px; flex: 1; }
.topnav a, .tabbar a { color: var(--muted); }
.topnav a { padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.topnav a:hover { background: var(--card-2); text-decoration: none; }
.topnav a.active { color: var(--primary); background: var(--primary-soft); }
.user-chip {
  margin-left: auto; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--primary-soft); color: var(--primary); max-width: 40vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-chip:hover { text-decoration: none; }

/* 底部导航（手机） */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; }
.tabbar a:hover { text-decoration: none; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--primary); }

@media (min-width: 760px) {
  .topnav { display: flex; }
  .user-chip { margin-left: 0; }
  .tabbar { display: none; }
  body { padding-bottom: 40px; }
}

/* 正在计时的悬浮提示 */
.timer-pill { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 19; }
.timer-pill a {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
}
.timer-pill a:hover { text-decoration: none; }
.timer-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* 布局 */
.container { max-width: 960px; margin: 0 auto; padding: 16px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.page-head p { margin-top: 2px; }
.stack { display: grid; gap: 14px; align-content: start; }
.stack > *, .grid-2 > * { min-width: 0; }  /* 防止宽表格把网格撑出屏幕 */
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head a { font-size: 14px; }

/* 按钮与表单 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--primary); color: var(--primary-text);
  transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn.ghost { background: var(--card-2); color: var(--text); border-color: var(--line); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ok { background: var(--ok-soft); color: var(--ok); }
.btn.lg { height: 48px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; min-width: 0;
}
textarea.input { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: 2px solid var(--focus-ring); border-color: var(--primary); }
.form { display: grid; gap: 12px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
input[type=range] { accent-color: var(--primary); width: 100%; }
.form-error { color: var(--danger); font-size: 13px; min-height: 1em; }

.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--card-2); border-radius: 10px; border: 1px solid var(--line); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
}
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 13px;
  padding: 4px 12px; border-radius: 999px; cursor: pointer;
}
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.tag.primary { background: var(--primary-soft); color: var(--primary); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

/* 首页倒计时 */
.hero {
  position: relative; overflow: hidden; color: #fff; border: 0;
  background: linear-gradient(135deg, #2f5bea 0%, #4f46e5 55%, #7c3aed 100%);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero .label { opacity: .85; font-size: 14px; }
.hero .days { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
.hero .days b { font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -1px; }
.hero .days span { font-size: 18px; font-weight: 600; }
.hero .hms { font-size: 18px; font-weight: 600; opacity: .95; }
.hero .meta { margin-top: 10px; font-size: 13px; opacity: .8; }
.hero-body { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero-side { display: flex; gap: 10px; }
.hero-side div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px 14px; min-width: 92px; }
.hero-side b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-side span { font-size: 12px; opacity: .85; }
@media (min-width: 760px) { .hero .days b { font-size: 84px; } }

.quote { border-left: 4px solid var(--accent); }
.quote .text { font-size: 17px; font-weight: 600; line-height: 1.7; }
.quote .src { margin-top: 6px; color: var(--muted); font-size: 13px; text-align: right; }

.progress { height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--card-2); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

.target-main { display: flex; align-items: center; gap: 14px; }
.target-badge {
  width: 52px; height: 52px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 22px;
}
.target-main .name { font-size: 18px; font-weight: 700; }
.is-example { border: 1.5px dashed var(--dash); border-radius: 12px; padding: 14px; }
.list li.is-example { background: transparent; padding: 10px 12px; }
.is-example .target-badge { background: var(--card-2); color: var(--muted); }
.tag.example { background: transparent; color: var(--muted); border: 1px dashed currentColor; font-weight: 600; vertical-align: 2px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tool {
  display: grid; gap: 4px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--card); color: var(--text); box-shadow: var(--shadow); position: relative;
}
.tool:hover { text-decoration: none; border-color: var(--primary); }
.tool .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.tool .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool b { font-size: 15px; }
.tool span { font-size: 12px; color: var(--muted); }
.tool.soon { opacity: .6; pointer-events: none; box-shadow: none; }
.tool .tag { position: absolute; top: 12px; right: 12px; }

/* 番茄钟 */
.timer-wrap { display: grid; justify-items: center; gap: 18px; padding: 8px 0; }
.ring { position: relative; width: min(280px, 72vw); height: min(280px, 72vw); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .bg { stroke: var(--card-2); }
.ring .fg { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.ring.break .fg { stroke: var(--ok); }
.ring .center { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .time { font-size: clamp(44px, 14vw, 60px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.ring .state { color: var(--muted); font-size: 14px; }

.list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card-2); border-radius: 10px; }
.list li .grow { flex: 1; min-width: 0; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--card); color: var(--danger); }

/* 打卡热力图 */
.heat-wrap { overflow-x: auto; padding-bottom: 4px; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); grid-auto-columns: minmax(12px, 1fr); gap: 4px; width: 100%; max-width: 620px; min-width: 260px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--heat-0); }
.heat i.on { background: var(--heat-1); }
.heat i.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat i.pad { background: transparent; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--heat-0); display: inline-block; }
.legend i.on { background: var(--heat-1); }

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 4px; min-width: 0; }
.bar .v { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar .col { width: 100%; max-width: 36px; display: flex; align-items: flex-end; }
.bar .col i { display: block; width: 100%; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar.today .col i { background: var(--accent); }
.bar .d { font-size: 12px; color: var(--muted); }

.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 48px 1fr 60px; align-items: center; gap: 8px; font-size: 13px; }
.hbar .track { height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.hbar .m { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 日历时间轴 */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .pt { position: absolute; left: 2px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); }
.timeline li.done .pt { background: var(--line); }
.timeline li.current .pt { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li.upcoming .pt { border-color: var(--primary); }
.timeline .when { font-size: 13px; color: var(--muted); }
.timeline li.done h3, .timeline li.done p { color: var(--muted); }
.timeline li.current { }
.timeline p { font-size: 14px; margin-top: 2px; }

/* 导航 */
.link-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.link-card {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); min-width: 0;
}
.link-card:hover { border-color: var(--primary); text-decoration: none; }
.link-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-card b { font-size: 15px; }
.link-card .nm { font-size: 13px; color: var(--muted); }
.link-card .url { font-size: 12px; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 赋分 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; }
.table-wrap { overflow-x: auto; }
.result {
  display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px;
  background: var(--primary-soft); flex-wrap: wrap;
}
.result .big { font-size: 44px; font-weight: 800; color: var(--primary); line-height: 1; font-variant-numeric: tabular-nums; }
.result .desc { display: grid; gap: 2px; font-size: 14px; min-width: 0; }
.result code { font-size: 13px; word-break: break-all; }
.notice { font-size: 13px; color: var(--muted); background: var(--card-2); border-radius: 10px; padding: 10px 12px; }

/* 空状态 / 登录提示 */
.empty { text-align: center; padding: 26px 12px; display: grid; gap: 10px; justify-items: center; }
.empty .ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 20px; }

/* 提示与弹窗 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px;
  max-width: calc(100vw - 32px); box-shadow: var(--shadow); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
@media (min-width: 760px) { .toast { bottom: 32px; } }

.modal-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 40; background: rgba(10, 14, 24, .45);
  display: grid; place-items: center; padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.modal .btn-row { justify-content: flex-end; }

.footer { text-align: center; color: var(--muted); font-size: 12px; margin: 26px 0 6px; line-height: 1.8; }

/* ---------- 兼容性：iOS Safari / 微信内置浏览器 ---------- */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); }
  .input:focus { outline-color: color-mix(in srgb, var(--primary) 35%, transparent); }
  .is-example { border-color: color-mix(in srgb, var(--muted) 55%, transparent); }
}
@supports not (aspect-ratio: 1) {
  .heat i { height: 12px; }
}
/* 手机上输入框字号小于 16px 时 iOS 会在聚焦时自动放大页面 */
@media (pointer: coarse) {
  .input, select.input, textarea.input { font-size: 16px; }
}
/* iOS 的日期输入框默认居中、高度不随 height 变化，空值时还会塌缩 */
@supports (-webkit-touch-callout: none) {
  input[type=date].input, input[type=time].input {
    -webkit-appearance: none; appearance: none; display: block; min-height: 42px; line-height: 40px; text-align: left;
  }
  input[type=date].input::-webkit-date-and-time-value { text-align: left; margin: 0; }
}

/* ---------- 通用小组件 ---------- */
.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.sub-h { font-size: 14px; color: var(--muted); font-weight: 600; margin: 14px 0 8px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.progress.sm { height: 6px; }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.check { width: 20px; height: 20px; flex: none; accent-color: var(--primary); margin: 0; cursor: pointer; }

/* 开关 */
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch-row .grow { flex: 1; min-width: 0; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 44px; height: 26px; margin: 0;
  border-radius: 999px; background: var(--line); cursor: pointer; transition: background .2s; outline-offset: 2px;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s;
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { opacity: .5; }

/* 恢复码 */
.recovery-code {
  font: 700 22px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 1px; text-align: center;
  padding: 14px 8px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  overflow-wrap: anywhere; -webkit-user-select: all; user-select: all;
}
@media (max-width: 380px) { .recovery-code { font-size: 18px; letter-spacing: 0; } }
/* 注册蜜罐字段：移出可视区域（不用 display:none，部分程序会跳过隐藏字段） */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* 首页三格统计：手机上也排成一行 */
.stat-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) { .stat-row.three .stat { padding: 10px; } .stat-row.three .stat b { font-size: 20px; } }
/* 首页“待办”统计可点击 */
a.stat-link { color: var(--text); display: block; }
a.stat-link:hover { text-decoration: none; outline: 1px solid var(--primary); }

/* 今日待办 */
.todo-add { display: flex; gap: 8px; }
.todo-add .input { flex: 1; }
.todo-list { margin-top: 10px; }
.todo-list li { flex-wrap: wrap; row-gap: 4px; }
.todo-list li .todo-text { flex: 1 1 9em; overflow-wrap: anywhere; word-break: break-word; }
.todo.done .todo-text { color: var(--muted); text-decoration: line-through; }
.todo-actions { display: flex; gap: 2px; margin-left: auto; }
.todo-actions .icon-btn { font-size: 12px; padding: 4px; }

/* 成就徽章 */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--card-2); min-width: 0; }
.badge-ico { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); }
.badge-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.badge.earned .badge-ico { background: var(--accent-soft); color: var(--accent); }
.badge-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.badge-body b { font-size: 14px; }
.badge-body .muted { line-height: 1.4; }
.badge:not(.earned) .badge-body b { color: var(--muted); }
.badge .tag { justify-self: start; }
@media (max-width: 480px) {
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge { flex-direction: column; gap: 8px; }
  .badge-ico { width: 30px; height: 30px; }
}

/* 考前清单 */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist li { display: flex; align-items: flex-start; gap: 8px; }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 4px; cursor: pointer; flex: 1; min-width: 0; }
.check-item .check { margin-top: 2px; }
.ci { display: grid; gap: 2px; min-width: 0; }
.ci-text { overflow-wrap: anywhere; }
.check-item input:checked + .ci .ci-text { color: var(--muted); text-decoration: line-through; }
.checklist li.custom .icon-btn { margin-top: 6px; }
.cl-add-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) auto; gap: 8px; }
@media (max-width: 480px) { .cl-add-row { grid-template-columns: minmax(0, 1fr) auto; } .cl-add-row select { grid-column: 1 / -1; } }

/* 自习室与排行榜 */
.room-hero { display: grid; gap: 12px; }
.room-count { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.room-count b { font-size: 44px; line-height: 1; color: var(--primary); font-weight: 800; }
.avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.list li.me, .board li.me { outline: 1.5px solid var(--primary); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.board li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--card-2); }
.board li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .rk { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--card); color: var(--muted); }
.board .rk.top { background: var(--accent-soft); color: var(--accent); }

/* 错题本 */
.flash { display: grid; gap: 14px; }
.flash-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flash-front { font-size: 17px; font-weight: 600; line-height: 1.7; padding: 16px; border-radius: 12px; background: var(--card-2); }
.flash-back { font-size: 15px; line-height: 1.7; padding: 16px; border-radius: 12px; border: 1.5px dashed var(--dash); }
.rv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-actions .btn.block { grid-column: 1 / -1; }
.cards-filter { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 8px; }
@media (max-width: 480px) { .cards-filter { grid-template-columns: minmax(0, 1fr); } }
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card-list li { padding: 12px; border-radius: 12px; background: var(--card-2); display: grid; gap: 8px; min-width: 0; }
.cl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-front { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cl-back { margin-top: 6px; font-size: 14px; }
.card-list details summary { cursor: pointer; color: var(--primary); font-size: 13px; }
.cl-actions { justify-content: flex-end; gap: 4px; }

/* 兴趣测评 */
.quiz-text { font-size: 18px; font-weight: 600; line-height: 1.7; margin: 18px 0; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer;
}
.quiz-opt.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.quiz-opt .dot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); font-size: 13px; }
.quiz-code { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.quiz-code b { font-size: 44px; line-height: 1; letter-spacing: 4px; color: var(--primary); font-weight: 800; }
.quiz-bars .hbar { grid-template-columns: 52px minmax(0, 1fr) 56px; }
.quiz-bars .hbar .track i { background: var(--muted); opacity: .5; }
.quiz-bars .hbar.top .track i { background: var(--primary); opacity: 1; }
.quiz-bars .hbar.top > span:first-child { font-weight: 700; }
/* 只在有鼠标悬停的设备上高亮，避免手机点完后下一题同位置的选项看起来像已选中 */
@media (hover: hover) {
  .quiz-opt:hover { border-color: var(--primary); }
  a.chip:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
}

/* 模拟志愿表 */
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.plan-list .plan-item { align-items: flex-start; }
.plan-item .grow > div { overflow-wrap: anywhere; }
.plan-item .grow .tag { margin: 2px 2px 0 0; }
.plan-pos { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--card); color: var(--primary); }
.plan-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; flex: none; max-width: 9.5em; }
.plan-acts .icon-btn:disabled { opacity: .35; cursor: default; background: transparent; color: var(--muted); }
.plan-acts .icon-btn:not(:disabled):hover { color: var(--primary); }
.plan-acts [data-remove]:hover { color: var(--danger) !important; }
@media (max-width: 480px) {
  .plan-list .plan-item { flex-wrap: wrap; }
  .plan-acts { max-width: none; width: 100%; justify-content: flex-start; padding-left: 40px; }
}
.group-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 院校库筛选与院校信息 */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-row select.input { width: auto; max-width: 100%; }
.info-line { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }

/* 政策问答 */
.qa-item { background: var(--card-2); border-radius: 10px; padding: 10px 12px; }
.qa-item summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: flex-start; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::before { content: '›'; color: var(--primary); font-weight: 700; transition: transform .15s; display: inline-block; }
.qa-item[open] summary::before { transform: rotate(90deg); }
.qa-item p a { overflow-wrap: anywhere; }

/* 打印：只打印内容，隐藏导航与操作按钮 */
@media print {
  :root { --bg: #fff; --card: #fff; --card-2: #f4f5f7; --text: #000; --muted: #444; color-scheme: light; }
  body { background: #fff !important; padding: 0 !important; }
  .topbar, .tabbar, .timer-pill, .toast, .modal-backdrop, .no-print, .btn, .footer { display: none !important; }
  .container { max-width: none; padding: 0; margin: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .plan-item { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
.major-grid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 420px) { .major-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* 页脚与关于我们 */
.site-footer { max-width: 960px; margin: 0 auto; padding: 4px 16px 18px; text-align: center; font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; }
.site-footer a { color: var(--muted); padding: 2px 0; }
.site-footer a:hover { color: var(--primary); text-decoration: none; }
.about-nav { margin-bottom: 14px; }
a.chip { text-decoration: none; color: inherit; }
.about section { scroll-margin-top: 76px; }
.about p + p, .about p + ul, .about ul + p { margin-top: 8px; }
.about-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.contact-box { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--card-2); display: grid; gap: 6px; justify-items: start; }
.contact-mail { font-size: 18px; letter-spacing: .3px; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
@media print { .site-footer { display: none !important; } }
