/* ==========================================================================
   模铸匠魂・智启未来 —— 中国红 · 亮色视觉规范
   所有颜色只在 :root 定义，页面里不要写死颜色。
   ========================================================================== */
:root {
  --red: #C8161D;          /* 主色 中国红 */
  --red-deep: #9E1B1E;     /* 深红：标题、按下态 */
  --red-soft: #FDECEC;     /* 浅红底 */
  --red-line: #F2C4C4;     /* 浅红描边 */
  --gold: #D4A017;         /* 金：仅用于强调与徽章 */
  --gold-soft: #FBF3DC;
  --paper: #FFF8F0;        /* 米白宣纸背景 */
  --card: #FFFFFF;
  --ink: #2B2B2B;          /* 正文墨色 */
  --sub: #6B6B6B;          /* 次要文字 */
  --mute: #A39A92;
  --line: #EFE4D8;
  --ok: #2E7D4F;
  --ok-soft: #E6F4EC;
  --warn: #B26A00;
  --warn-soft: #FFF3DD;
  --shadow: 0 6px 20px rgba(158, 27, 30, .08);
  --radius: 14px;
  --tab-h: 64px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  font-size: 15px; line-height: 1.65;
  background-image:
    radial-gradient(circle at 12% -10%, rgba(200, 22, 29, .07), transparent 40%),
    radial-gradient(circle at 110% 20%, rgba(212, 160, 23, .07), transparent 35%);
  background-attachment: fixed;
}
a { color: var(--red); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
.hidden { display: none !important; }
.serif { font-family: var(--serif); }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }

/* ---------------------------------------------------------------- 顶栏 --- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 248, 240, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .inner { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .seal { width: 36px; height: 36px; font-size: 13px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--red-deep); letter-spacing: 1px; white-space: nowrap; }
.brand-en { font-size: 9.5px; letter-spacing: 1.6px; color: var(--sub); white-space: nowrap; }
.avatar-btn {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--red);
  background: var(--red-soft); color: var(--red-deep); font-family: var(--serif); font-weight: 700;
  display: grid; place-items: center; flex: none;
}

/* 印章 */
.seal {
  width: 44px; height: 44px; border-radius: 8px; background: var(--red); color: #fff;
  font-family: var(--serif); font-weight: 700; display: grid; place-items: center; line-height: 1.05;
  font-size: 14px; letter-spacing: 1px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), inset 0 0 0 4px var(--red);
  text-align: center; flex: none;
}
.seal.off { background: #EDE5DD; color: #A0948A; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), inset 0 0 0 4px #E9DFD5; }
.seal.gold { background: var(--gold); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), inset 0 0 0 4px var(--gold); }

/* ---------------------------------------------------------------- 布局 --- */
.page { max-width: 560px; margin: 0 auto; padding: 14px 16px calc(var(--tab-h) + 28px); }
.page.wide { max-width: 1200px; padding-bottom: 40px; }
.section-title {
  font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--red-deep);
  display: flex; align-items: center; gap: 8px; margin: 6px 0 12px;
}
.section-title::before { content: ""; width: 5px; height: 20px; background: var(--red); border-radius: 3px; }
.hero {
  border-radius: 18px; padding: 18px 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%); box-shadow: var(--shadow);
}
.hero::after {   /* 祥云纹 */
  content: ""; position: absolute; right: -30px; top: -30px; width: 160px; height: 160px; opacity: .16;
  background:
    radial-gradient(circle at 30% 50%, transparent 22px, #fff 23px, #fff 26px, transparent 27px),
    radial-gradient(circle at 62% 42%, transparent 30px, #fff 31px, #fff 34px, transparent 35px),
    radial-gradient(circle at 48% 70%, transparent 18px, #fff 19px, #fff 22px, transparent 23px);
}
.hero h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 21px; letter-spacing: 1px; }
.hero p { margin: 0; opacity: .92; font-size: 13.5px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card.red { border: 1.5px solid var(--red-line); }
.card h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 17px; color: var(--red-deep); }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------------------------------------------------------------- 按钮 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; font-size: 15px;
  background: var(--red); color: #fff; transition: transform .1s, background .2s; white-space: nowrap;
}
.btn:active { transform: scale(.97); background: var(--red-deep); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.btn.soft { background: var(--red-soft); color: var(--red-deep); }
.btn.gold { background: var(--gold); }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn.ok { background: var(--ok); }
.link-btn { background: none; border: 0; color: var(--red); padding: 0; font-weight: 600; }

/* ---------------------------------------------------------------- 表单 --- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--sub); margin-bottom: 5px; }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.textarea { min-height: 96px; resize: vertical; }

/* ---------------------------------------------------------------- 标签 --- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: var(--red-soft); color: var(--red-deep); border: 1px solid var(--red-line); white-space: nowrap;
}
.chip.gold { background: var(--gold-soft); color: #8A6700; border-color: #EBD9A3; }
.chip.gray { background: #F4EFE9; color: var(--sub); border-color: var(--line); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: #BFE3CD; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: #F1D7A7; }

/* ---------------------------------------------------------- 底部三 Tab --- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(158, 27, 30, .06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--tab-h); padding: 8px 12px; gap: 10px; }
.tab {
  border: 0; background: transparent; border-radius: 14px; color: var(--sub); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: 12.5px; font-weight: 600;
}
.tab i { font-size: 18px; }
.tab .tab-zh { font-family: var(--serif); font-size: 15px; letter-spacing: 2px; }
.tab.on { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(200, 22, 29, .3); }

/* ---------------------------------------------------------------- 卡牌 --- */
.steps { display: flex; gap: 6px; margin: 12px 0 14px; }
.steps .st { flex: 1; text-align: center; font-size: 11.5px; color: var(--mute); }
.steps .st b { display: block; height: 5px; border-radius: 3px; background: #EADFD4; margin-bottom: 4px; }
.steps .st.done b { background: var(--red-line); }
.steps .st.cur { color: var(--red-deep); font-weight: 700; }
.steps .st.cur b { background: var(--red); }

.flip { perspective: 1200px; }
.flip-inner { position: relative; transition: transform .6s; transform-style: preserve-3d; min-height: 360px; }
.flip.on .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 18px; overflow: hidden; background: #fff; border: 2px solid var(--red); box-shadow: var(--shadow);
}
.flip-back { transform: rotateY(180deg); padding: 16px; overflow-y: auto; }

.mentor-card { position: relative; }
.mentor-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--red-soft); }
.mentor-photo.ph { display: grid; place-items: center; font-family: var(--serif); font-size: 46px; color: var(--red); }
.mentor-body { padding: 12px 14px 14px; }
.mentor-name { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--red-deep); }
.mentor-quote { font-family: var(--serif); color: var(--ink); border-left: 3px solid var(--gold); padding-left: 10px; margin: 8px 0; font-size: 14px; }
.rank-badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.score-ring { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255,255,255,.92); border-radius: 12px; padding: 4px 10px; font-weight: 700; color: var(--red-deep); font-size: 13px; }
.reasons { list-style: none; padding: 0; margin: 8px 0 0; }
.reasons li { position: relative; padding-left: 22px; margin: 6px 0; font-size: 13.5px; }
.reasons li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; display: grid; place-items: center; margin-top: 3px; }
.bars { display: grid; grid-template-columns: 64px 1fr 34px; gap: 6px 8px; align-items: center; font-size: 12px; color: var(--sub); }
.bars .bar { height: 7px; border-radius: 4px; background: #F3E9DF; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--red); border-radius: 4px; }

.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; margin: 0 -2px; }
.carousel > * { flex: 0 0 86%; scroll-snap-align: center; }
.carousel::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- 聊天 --- */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--red-soft); color: var(--red-deep); font-family: var(--serif); display: grid; place-items: center; font-weight: 700; }
.msg .bubble { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 9px 12px; font-size: 14px; max-width: 82%; }
.msg .who { font-size: 12px; color: var(--sub); margin-bottom: 2px; }
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble { background: var(--red); color: #fff; border: 0; border-radius: 14px 4px 14px 14px; }
.typing { color: var(--mute); font-size: 13px; }

/* ---------------------------------------------------------------- 小测 --- */
.opt {
  display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: 11px 14px; margin: 8px 0; font-size: 14.5px;
}
.opt.on { border-color: var(--red); background: var(--red-soft); color: var(--red-deep); font-weight: 600; }
.progress { height: 6px; background: #F1E6DB; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--red); transition: width .3s; }
.dim-row { display: grid; grid-template-columns: 72px 1fr 72px; gap: 8px; align-items: center; font-size: 12.5px; margin: 8px 0; }
.dim-row .track { position: relative; height: 8px; background: #F1E6DB; border-radius: 4px; }
.dim-row .track::after { content: ""; position: absolute; left: 50%; top: -3px; width: 1px; height: 14px; background: var(--mute); }
.dim-row .dot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--red); transform: translate(-50%, -50%); }

/* -------------------------------------------------------------- 精神图谱 -- */
.howto { margin: 14px 0 12px; background: #fff; border: 1.5px dashed var(--red-line); border-radius: var(--radius); padding: 12px 12px 10px; }
.howto-t { font-family: var(--serif); font-weight: 700; color: var(--red-deep); font-size: 15px; margin-bottom: 8px; }
.howto-steps { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.howto-steps > div { flex: 1; text-align: center; font-size: 11.5px; line-height: 1.35; color: var(--ink); }
.howto-steps > div b { display: grid; place-items: center; width: 26px; height: 26px; margin: 0 auto 4px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; }
.howto-steps > div.gold b { background: var(--gold); }
.howto-steps > i { color: var(--red-line); font-size: 11px; flex: none; }

.zone-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.zb { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); }
.zb .seal { width: 40px; height: 40px; font-size: 13px; }
.zb-n { font-size: 11.5px; font-weight: 700; line-height: 1.3; text-align: center; }
.zb-p { font-size: 11px; color: var(--sub); }
.zb.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.smap-card { padding: 10px 10px 12px; overflow: hidden; }
.smap {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 50%, #FFF4EA 0%, #FFFDFB 62%, #fff 100%); border-radius: 50%;
}
.smap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.smap .ring { fill: none; stroke: var(--red-line); stroke-width: .25; stroke-dasharray: 1 1.2; }
.smap .ring2 { fill: rgba(200, 22, 29, .035); stroke: var(--red-line); stroke-width: .25; }
.smap .ln-main { stroke: var(--red); stroke-width: .55; opacity: .55; }
.smap .ln-sub { stroke: #E3D6CA; stroke-width: .3; stroke-dasharray: .8 .8; }
.smap .ln-sub.on { stroke: var(--gold); stroke-width: .45; stroke-dasharray: none; }
.sm-center {
  position: absolute; left: 50%; top: 50%; width: 25%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #E23A3F, var(--red) 55%, var(--red-deep));
  color: #fff; font-family: var(--serif); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: clamp(11px, 3.2vw, 15px); line-height: 1.35; letter-spacing: 1px; text-align: center;
  box-shadow: 0 0 0 5px rgba(200, 22, 29, .12), 0 8px 20px rgba(158, 27, 30, .3);
}
.sm-k {
  position: absolute; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; padding: 0;
  background: #fff; border: 2px solid var(--red); color: var(--red-deep); font-family: var(--serif); font-weight: 700;
  font-size: clamp(10px, 2.9vw, 13.5px); line-height: 1.25; box-shadow: 0 4px 12px rgba(158, 27, 30, .12); z-index: 2;
}
.sm-k.lit { background: linear-gradient(145deg, #E9BE3A, var(--gold)); border-color: var(--gold); color: #fff; }
.sm-k.sel { box-shadow: 0 0 0 4px rgba(200, 22, 29, .22), 0 4px 12px rgba(158, 27, 30, .2); }
.sm-m {
  position: absolute; width: 9.6%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; padding: 0;
  border: 2px dashed var(--red-line); background: #fff; z-index: 3; animation: breathe 2.4s ease-in-out infinite;
}
.sm-m img, .sm-m .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: grayscale(.9); opacity: .75; display: block; }
.sm-m .ph { display: grid; place-items: center; background: #F1E9E1; color: var(--sub); font-family: var(--serif); font-size: clamp(11px, 3vw, 15px); }
.sm-name {
  position: absolute; white-space: nowrap; pointer-events: none; z-index: 4; line-height: 1.2;
  font-size: clamp(9px, 2.5vw, 11.5px); color: var(--sub); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
}
.sm-name.lit { color: #8A6700; font-weight: 700; }
.sm-k sup {
  position: absolute; right: -6%; top: -6%; min-width: 30%; padding: 1px 4px; border-radius: 999px; line-height: 1.4;
  background: var(--red); color: #fff; font-family: var(--sans); font-size: clamp(8px, 2.1vw, 10px); font-weight: 600;
}
.sm-k.lit sup { background: var(--red-deep); }
.sm-m.lit { border: 2.5px solid var(--gold); animation: none; box-shadow: 0 0 0 3px rgba(212, 160, 23, .25), 0 0 14px rgba(212, 160, 23, .45); }
.sm-m.lit img, .sm-m.lit .ph { filter: none; opacity: 1; }
.sm-m.pend { border-color: var(--warn); border-style: solid; animation: none; }
.sm-m .ok { position: absolute; right: -4px; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 8px; display: grid; place-items: center; border: 1.5px solid #fff; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(200, 22, 29, 0); } 50% { box-shadow: 0 0 0 4px rgba(200, 22, 29, .14); } }
.smap-legend { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--sub); margin-top: 22px; }
.smap-legend b { color: var(--red-deep); }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.lg-off { border: 1.5px dashed var(--red-line); background: #EDE5DD; }
.lg-on { background: var(--gold); box-shadow: 0 0 0 2px rgba(212, 160, 23, .3); }

.node-card { margin-top: 12px; }
.nm-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.nm-row:first-of-type { border-top: 0; }
.nm-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--red-soft); filter: grayscale(.6); }
.nm-av.ph { display: grid; place-items: center; font-family: var(--serif); color: var(--red); font-size: 18px; }
.nm-row.lit .nm-av { filter: none; box-shadow: 0 0 0 2px var(--gold); }

.light-task { margin: 12px 0; border: 2px solid var(--gold); background: linear-gradient(180deg, var(--gold-soft), #fff 70%); border-radius: 14px; padding: 12px 14px; }
.lt-head { font-family: var(--serif); font-weight: 700; color: #8A6700; font-size: 16px; }
.lt-q { font-weight: 700; margin: 6px 0 2px; }
.qk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #F3ECE4; color: var(--sub); font-size: 12px; font-weight: 700; margin-right: 8px; }
.opt.on .qk { background: var(--red); color: #fff; }
.opt.wrong { border-color: #E5A3A3; background: #FFF4F4; color: var(--sub); }
.opt.wrong .qk { background: #E5A3A3; color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.opt.right .qk { background: var(--ok); color: #fff; }
.opt[disabled] { opacity: .6; }
.lt-msg { color: var(--red-deep); min-height: 18px; }
.lt-alt { margin-top: 8px; }
.lt-alt summary { cursor: pointer; color: var(--red); font-size: 13px; }
.light-done { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); color: #8A6700; font-weight: 700; }

/* -------------------------------------------------------------- 闯关 ----- */
.level { position: relative; padding-left: 26px; }
.level::before { content: ""; position: absolute; left: 9px; top: 30px; bottom: -14px; width: 2px; background: var(--red-line); }
.level:last-child::before { display: none; }
.level .lv-dot { position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.level.locked .lv-dot { background: #D8CCC0; }
.level.locked .card { opacity: .6; }
.task { border-top: 1px dashed var(--line); padding: 10px 0; }
.task:first-of-type { border-top: 0; }
.task .t { font-weight: 700; }
.task .src { font-size: 12px; color: var(--gold); }

/* ---------------------------------------------------------- 弹窗 / 提示 -- */
.mask { position: fixed; inset: 0; background: rgba(43, 20, 20, .45); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--paper); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .25s ease;
}
@media (min-width: 720px) { .mask { align-items: center; } .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sheet-head h3 { margin: 0; font-family: var(--serif); color: var(--red-deep); font-size: 18px; }
.sheet-close { margin-left: auto; border: 0; background: var(--red-soft); color: var(--red-deep); width: 32px; height: 32px; border-radius: 50%; }
.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 99; background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--red-deep); }
.coin-pop { color: var(--gold); font-weight: 700; }

.empty { text-align: center; color: var(--mute); padding: 28px 0; font-size: 14px; }
.photo-pick { border: 2px dashed var(--red-line); border-radius: 12px; padding: 16px; text-align: center; color: var(--sub); background: #fff; cursor: pointer; }
.photo-pick img { max-height: 200px; margin: 0 auto; border-radius: 8px; }

/* ---------------------------------------------------------------- 表格 --- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--red-soft); color: var(--red-deep); font-weight: 600; position: sticky; top: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }

/* ---------------------------------------------------------------- 教师端 -- */
.admin-top { background: var(--red); color: #fff; }
.admin-top .inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-top .title { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-nav a, .admin-nav button { color: #fff; background: rgba(255,255,255,.12); border: 0; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; }
.admin-nav .on { background: #fff; color: var(--red-deep); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 800; color: var(--red-deep); font-family: var(--serif); }
.kpi .k { font-size: 12.5px; color: var(--sub); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.chart { width: 100%; height: 300px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .select, .filters .input { width: auto; min-width: 140px; padding: 7px 10px; }

@media (max-width: 380px) {
  .brand-en { display: none; }
  .node-mentors { grid-template-columns: repeat(2, 1fr); }
}
