/* 数学能力提升 · 公共样式：顶栏、按钮、卡片、首页、模块头、闯关、弹窗 */
:root {
  --bg: #fffaf2;
  --ink: #2d2a32;
  --muted: #7a7385;
  --line: #ece5da;
  --card: #fff;
  --good: #1fae6b;
  --bad: #ef5350;
  --gold: #ffb800;
  --mc: #ff7a45;
  --mc-soft: #fff1e8;
  --radius: 22px;
  --shadow: 0 8px 26px rgba(80, 60, 30, .09);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #ffe9cf 0, transparent 35%),
    radial-gradient(circle at 95% 10%, #dff1ff 0, transparent 35%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 22px;
  background: rgba(255, 250, 242, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; text-decoration: none; }
.brand-logo { font-size: 26px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.star-total { font-weight: 700; color: #b07b00; background: #fff3cc; padding: 5px 12px; border-radius: 99px; font-size: 14px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; font-size: 18px;
}
.icon-btn:hover { background: #fff4e6; }
.main { max-width: 1120px; margin: 0 auto; padding: 22px 18px 80px; }

/* ---------- 通用 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 14px; border: 2px solid var(--line); background: #fff;
  cursor: pointer; font-weight: 600; text-decoration: none; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { border-color: var(--mc); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--mc); border-color: var(--mc); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--mc) 70%, #000); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.big { padding: 12px 22px; font-size: 17px; border-radius: 16px; }
.btn.small { padding: 5px 11px; font-size: 14px; border-radius: 11px; }
.row { display: flex; align-items: center; margin: 12px 0; }
.row.gap { gap: 10px; }
.row.center { justify-content: center; }
.row.wrap, .row.gap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 160px; }
.muted { color: var(--muted); font-size: 14px; }
.center-text { text-align: center; }
label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin: 6px 0; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 18px; border: 1px solid #f3ede3;
}
.card-title { font-size: 19px; margin-bottom: 10px; }

.seg-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.seg {
  border: 2px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: all .15s;
}
.seg:hover { border-color: var(--mc); }
.seg.on { background: var(--mc); border-color: var(--mc); color: #fff; }

.stepper { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.step-val { min-width: 74px; text-align: center; font-size: 22px; font-weight: 800; color: var(--mc); }

.range { width: 100%; accent-color: var(--mc); height: 28px; cursor: pointer; }

.big-num { font-size: 26px; text-align: center; margin: 10px 0; }
.big-num b { font-size: 48px; color: var(--mc); }
.big-num small { color: var(--muted); font-size: 16px; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.skill-pick { background: #fff; border: 2px solid var(--line, #eadfce); border-radius: 18px; padding: 14px 16px; text-align: left; }
.skill-pick b { display: block; font-size: 16px; margin-bottom: 6px; }
.skill-pick p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.skill-result { background: #fff; border: 2px solid var(--line, #eadfce); border-radius: 16px; padding: 12px 14px; margin: 10px 0; }
.skill-result.good { border-color: #b7ebc6; }
.skill-result.weak { border-color: #ffc9c9; background: #fff8f8; }
.skill-result-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.skill-result p { margin: 8px 0; line-height: 1.5; }
.t-skill { font-size: 13px; color: var(--muted); font-weight: 700; }
.eq-big { font-size: 22px; font-weight: 800; text-align: center; margin: 10px 0; color: var(--ink); }
.eq-big.small { font-size: 17px; }

.bubble {
  background: var(--mc-soft); border-radius: 16px; padding: 12px 16px; margin: 12px 0;
  border: 2px dashed color-mix(in srgb, var(--mc) 35%, transparent); font-size: 15px;
}
.bubble.good { background: #e8f8ef; border-color: #8fd9b3; border-style: solid; }
.bubble.warn { background: #fff0ef; border-color: #f5aaa6; border-style: solid; }
.bubble.accent { background: #fff8db; border-color: #ffd65c; border-style: solid; font-weight: 600; }
.bubble small { display: block; margin-top: 6px; color: var(--muted); }
.pop { animation: pop .45s ease; }
@keyframes pop { 0% { transform: scale(.92); opacity: .4; } 60% { transform: scale(1.03); } 100% { transform: scale(1); opacity: 1; } }

.badge { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #f2eee8; font-weight: 700; font-size: 14px; }
.badge.gold { background: #fff3cc; color: #a26f00; }

.conv-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.conv-cell { background: #faf7f2; border-radius: 14px; padding: 12px 8px; text-align: center; border: 2px solid transparent; }
.conv-cell b { display: block; font-size: 21px; word-break: break-all; }
.conv-cell span { color: var(--muted); font-size: 14px; }
.conv-cell.on { border-color: var(--mc); background: var(--mc-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.chip:hover { border-color: var(--mc); background: var(--mc-soft); }

.ctrl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; align-items: start; }

.goal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin: 10px 0;
  border-radius: 14px; background: #fff8db; border: 2px solid #ffe08a;
}
.goal.done { background: #e8f8ef; border-color: #8fd9b3; }
.goal b { font-size: 18px; color: #b46b00; }
.goal.done b { color: var(--good); }

.readout { font-size: 20px; text-align: center; margin: 8px 0; }
.readout b { font-size: 30px; color: var(--mc); }

.toast {
  position: fixed; left: 50%; top: 76px; transform: translate(-50%, -20px); opacity: 0; z-index: 200;
  background: #2d2a32; color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  transition: all .3s; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.flash { animation: flash .8s ease; }
@keyframes flash { 0%, 100% { background: transparent; } 30% { background: #fff1a8; } }

/* ---------- 首页地图 ---------- */
.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center;
  background: linear-gradient(135deg, #fff 0%, #fff4e4 100%); border-radius: 30px; padding: 32px; box-shadow: var(--shadow); margin-bottom: 28px;
}
.hero h1 { font-size: clamp(30px, 4.5vw, 46px); letter-spacing: 2px; margin-bottom: 10px; }
.hero p { color: #5d5666; font-size: 16px; }
.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; justify-items: center; }
.hero-art span {
  font-size: 50px; width: 92px; height: 92px; display: grid; place-items: center; background: #fff; border-radius: 26px; box-shadow: var(--shadow);
  animation: bob 3s ease-in-out infinite; animation-delay: calc(var(--i) * .3s);
}
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.sec-title { font-size: 22px; margin: 26px 4px 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.sec-title small { font-size: 14px; color: var(--muted); font-weight: 500; }
.path { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.path-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 30px; color: #c9b9a4; }
.path-arrow span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.life-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fam-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mcard {
  position: relative; display: flex; flex-direction: column; text-decoration: none; background: #fff; border-radius: 24px; padding: 22px;
  box-shadow: var(--shadow); border: 3px solid transparent; transition: transform .2s, border-color .2s, box-shadow .2s; overflow: hidden;
}
.mcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 90px; background: var(--mc-soft); z-index: 0; }
.mcard > * { position: relative; }
.mcard:hover { transform: translateY(-6px); border-color: var(--mc); box-shadow: 0 18px 40px rgba(80,60,30,.15); }
.mcard-step { position: absolute; top: 14px; right: 14px; background: var(--mc); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.mcard-icon { font-size: 52px; width: 84px; height: 84px; display: grid; place-items: center; background: #fff; border-radius: 24px; box-shadow: 0 6px 16px rgba(0,0,0,.07); margin-bottom: 12px; }
.mcard h3 { font-size: 22px; color: var(--mc); }
.mcard-units { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.mcard-desc { margin: 0 0 12px; font-size: 15px; }
.mcard-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mcard-tabs span { font-size: 12px; background: #f6f2ec; border-radius: 99px; padding: 3px 9px; }
.mcard-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.go { font-weight: 800; color: var(--mc); }

.stars { display: inline-flex; gap: 2px; font-size: 22px; color: #e3ddd3; }
.stars .on { color: var(--gold); text-shadow: 0 2px 0 #e09a00; }

/* ---------- 模块头 ---------- */
.mod-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.back { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.back:hover { border-color: var(--mc); }
.mod-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.mod-icon { font-size: 40px; width: 64px; height: 64px; display: grid; place-items: center; background: var(--mc-soft); border-radius: 20px; flex-shrink: 0; }
.mod-title h1 { font-size: 26px; color: var(--mc); }
.mod-title p { margin: 0; color: var(--muted); font-size: 14px; }
.tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px; margin-bottom: 18px; background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; text-decoration: none; padding: 9px 16px; border-radius: 13px; font-weight: 700; color: #5d5666; transition: background .15s; }
.tab:hover { background: var(--mc-soft); }
.tab.on { background: var(--mc); color: #fff; }
.tab-body { animation: fadeIn .3s ease; }

/* ---------- 闯关 ---------- */
.quiz { max-width: 720px; margin: 0 auto; }
.q-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.q-count { font-weight: 700; }
.q-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.q-dot { width: 14px; height: 14px; border-radius: 50%; background: #e8e1d6; }
.q-dot.cur { background: var(--mc); transform: scale(1.25); }
.q-dot.ok { background: var(--good); }
.q-dot.no { background: var(--bad); }
.q-card { background: #fff; border-radius: 26px; padding: 30px 26px; box-shadow: var(--shadow); text-align: center; }
.q-icon { font-size: 60px; margin-bottom: 6px; }
.q-text { font-size: clamp(22px, 3.6vw, 32px); font-weight: 800; margin: 10px 0 18px; line-height: 1.8; }
.q-input {
  width: 150px; font: inherit; font-size: inherit; text-align: center; padding: 2px 8px; margin: 0 8px;
  border: none; border-bottom: 4px solid var(--mc); background: var(--mc-soft); border-radius: 10px 10px 0 0; outline: none; color: var(--mc);
}
.q-input.ok { border-color: var(--good); color: var(--good); background: #e8f8ef; }
.q-input.no { border-color: var(--bad); color: var(--bad); background: #fff0ef; text-decoration: line-through; }
.q-blank { display: inline-block; min-width: 90px; border-bottom: 4px solid var(--mc); margin: 0 8px; color: var(--mc); }
.q-blank.ok { color: var(--good); border-color: var(--good); }
.q-blank.no { color: var(--bad); border-color: var(--bad); }
.q-choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0; }
.btn.choice { font-size: 20px; min-width: 96px; padding: 12px 18px; }
.btn.choice.right { background: #e8f8ef; border-color: var(--good); color: var(--good); opacity: 1; }
.btn.choice.wrong { background: #fff0ef; border-color: var(--bad); color: var(--bad); opacity: 1; }
.q-fb { min-height: 10px; margin: 10px 0; font-size: 17px; }
.q-fb.ok b { color: var(--good); }
.q-fb.no b { color: var(--bad); }
.q-explain { margin-top: 8px; color: #5d5666; font-size: 15px; background: #faf7f2; border-radius: 12px; padding: 8px 12px; display: inline-block; }
.q-end h2 { font-size: 28px; margin: 10px 0; }
.q-end p { color: #5d5666; }
.q-stars { font-size: 60px; color: #e3ddd3; letter-spacing: 6px; }
.q-stars .on { color: var(--gold); text-shadow: 0 4px 0 #e09a00; animation: pop .5s; }


/* ---------- 知识卡 ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(30, 24, 40, .45); z-index: 150; display: grid; place-items: center; padding: 16px; animation: fadeIn .2s; }
.modal { background: #fff; border-radius: 26px; max-width: 980px; width: 100%; max-height: 90vh; overflow: auto; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h2 { color: #2a4d9b; font-size: 22px; }
.kn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.kn-sec { border: 2px solid #cfe8c4; border-radius: 16px; padding: 12px 14px; }
.kn-sec h3 { font-size: 17px; margin-bottom: 6px; }
.kn-row { display: grid; grid-template-columns: auto auto 1fr; gap: 6px; padding: 3px 0; font-size: 15px; align-items: baseline; }
.kn-row i { font-style: normal; color: var(--muted); }
.kn-row b { color: #e0352b; }

/* ---------- 公式卡（各模块的实验共用） ---------- */
.law {
  background: linear-gradient(120deg, var(--mc-soft, #fff1e8), #fff);
  border: 2px solid color-mix(in srgb, var(--mc, #ff7a45) 30%, transparent);
  border-radius: 20px; padding: 14px 20px; margin-bottom: 16px;
}
.law-title { font-weight: 800; color: var(--mc, #ff7a45); font-size: 15px; }
.law-fx { font-size: clamp(18px, 3vw, 26px); margin: 4px 0; overflow-x: auto; font-weight: 800; white-space: nowrap; }
.law p { margin: 4px 0 0; color: #5d5666; font-size: 14px; }
.stackbar { display: flex; height: 48px; border-radius: 14px; overflow: hidden; margin: 10px 0; background: #f3efe8; }
.stackbar i { display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; min-width: 28px; overflow: hidden; }
.stackbar .a { background: #ff922b; } .stackbar .b { background: #4dabf7; } .stackbar .c { background: #51cf66; }
.kids { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.kid { text-align: center; }
.stack { display: flex; flex-direction: column-reverse; align-items: center; min-height: 24px; }
.block { display: block; width: 32px; height: 15px; border-radius: 4px; margin-top: 3px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.block.b0 { background: #ff922b; } .block.b1 { background: #4dabf7; } .block.b2 { background: #69db7c; } .block.b3 { background: #da77f2; }
.kid-name { font-weight: 800; margin-top: 4px; }
.plates { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 8px 0; }
.plate { width: 96px; min-height: 76px; border-radius: 48px; background: #fff; border: 3px solid #e9c46a; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 1px; padding: 8px; box-shadow: 0 4px 0 #f3e6c4; }
.plate.rest { border-style: dashed; border-color: #e03131; background: #fff5f5; }
.dots { display: grid; gap: 4px; justify-content: center; margin: 8px auto; width: fit-content; }
.dots span { width: 16px; height: 16px; border-radius: 50%; background: var(--mc, #ff7a45); display: block; }
.track { position: relative; height: 96px; background: linear-gradient(#d8f5c8, #efe6d6 42%, #e7d3a1); border-radius: 16px; margin: 12px 0; overflow: hidden; }
.road { position: absolute; left: 4%; right: 4%; top: 62px; height: 8px; background: #8d6e63; border-radius: 8px; }
.runner { position: absolute; top: 12px; font-size: 34px; line-height: 1; transform: translateX(-50%); }
.runner small { display: block; font-size: 12px; font-weight: 800; text-align: center; color: #5d5666; }
.bridge-deck { position: absolute; top: 48px; height: 30px; background: #dee2e6; border: 3px solid #868e96; border-radius: 8px; }
.train { position: absolute; top: 16px; height: 40px; background: #339af0; border-radius: 10px; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.river { position: relative; height: 110px; border-radius: 16px; overflow: hidden; margin: 12px 0; background: repeating-linear-gradient(90deg, #74c0fc 0 16px, #4dabf7 16px 32px); background-size: 64px 100%; animation: flow 1.2s linear infinite; }
@keyframes flow { to { background-position: 64px 0; } }
.boat { position: absolute; top: 28px; font-size: 36px; transform: translateX(-50%); }
.zoo { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.animal { width: 68px; text-align: center; background: #fff; border-radius: 14px; padding: 6px 4px; border: 2px solid var(--line); }
.animal b { display: block; font-size: 28px; line-height: 1.2; }
.drawers { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.drawer { width: 86px; min-height: 108px; border: 3px solid #b197fc; border-radius: 14px; background: #f8f0ff; display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center; gap: 2px; padding: 6px; }
.drawer.hot { border-color: #e03131; background: #fff0ef; }
.drawer .ball { font-size: 16px; }
.beaker-wrap { display: flex; justify-content: center; margin: 8px 0; }
.beaker { width: 120px; height: 170px; border: 4px solid #91a7ff; border-top: 4px solid transparent; border-radius: 0 0 28px 28px; position: relative; overflow: hidden; background: #f8f9fa; }
.liquid { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column-reverse; }
.solute { width: 100%; } .solvent { width: 100%; background: repeating-linear-gradient(180deg, rgba(255,255,255,.35) 0 6px, transparent 6px 12px); }
.tag { display: inline-flex; flex-direction: column; background: #fff3bf; border: 2px dashed #f08c00; border-radius: 14px; padding: 8px 14px; font-weight: 800; min-width: 120px; }
.tag small { font-weight: 600; color: #8a6a2f; }
.bank { background: linear-gradient(135deg, #e7f5ff, #fff); border-radius: 16px; padding: 12px 14px; border: 2px solid #a5d8ff; }
.pair-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.frect { background: #f8f9fa; border-radius: 12px; padding: 8px; text-align: center; }
.fgrid { display: grid; gap: 3px; margin: 0 auto 4px; width: fit-content; }
.fcell { width: 14px; height: 14px; border-radius: 3px; background: #7950f2; }
.mline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.mchip { background: #f3f0ff; border-radius: 999px; padding: 6px 12px; font-weight: 800; border: 0; cursor: pointer; }
.mchip.on { background: #7048e8; color: #fff; }
.board { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; background: linear-gradient(#f7fbff, #fff); border: 2px solid #e7eef8; border-radius: 18px; touch-action: none; user-select: none; }
.board .ink { stroke: #364fc7; stroke-width: 4; fill: none; stroke-linecap: round; }
.board .inkfill { fill: #364fc7; stroke: none; }
.board .pt { fill: #fff; stroke: #364fc7; stroke-width: 3; }
.board .pt.on { fill: #ffd43b; }
.board .hit { fill: transparent; stroke: none; }
.board .lab { font-size: 15px; font-weight: 700; fill: #2d2a32; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.board .arc { fill: none; stroke: #f76707; stroke-width: 3; }
.board .thin { stroke: #b8c0d4; stroke-width: 3; }
.board .dash { stroke: #0ca678; stroke-width: 3; stroke-dasharray: 7 6; fill: none; }
.board .hot { stroke: #e03131; stroke-width: 4; fill: none; }
.board .fill { stroke: none; }
.board .mark { fill: none; stroke: #e03131; stroke-width: 3; }
.board .ghost { fill: #fff; stroke: #99a; stroke-width: 2; }
.kind { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; background: var(--mc-soft, #fff1e8); color: var(--mc, #ff7a45); }
.chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 8px 0; }
.chain b { background: #f6f2ec; border-radius: 999px; padding: 4px 10px; }
.chain b.on { background: var(--mc, #ff7a45); color: #fff; }

/* ---------- 响应式 ---------- */
@media (prefers-reduced-motion: reduce) {
  .river { animation: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .life-grid, .fam-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { padding: 8px 12px; }
  .brand span:last-child { display: none; }
  .star-total { font-size: 12px; white-space: nowrap; padding: 4px 8px; }
  .top-actions { gap: 6px; }
  .top-actions .btn.small { padding: 5px 8px; font-size: 12px; white-space: nowrap; }
  .top-actions .icon-btn { width: 32px; height: 32px; }
  .mod-head { flex-wrap: wrap; }
  .mod-title h1 { font-size: 21px; }
  .card { padding: 16px 14px; }
  .q-input { width: 110px; }
}
@media print {
  .topbar, .main { display: none; }
  .modal-back { position: static; background: none; }
  .modal { max-height: none; box-shadow: none; }
  .modal .row { display: none; }
}
