/* ============================================================
   依晨学习星球 — 设计系统
   原则：活泼但不幼幼（初一学生）、大字号、高对比、大点击区
   ============================================================ */

:root {
  --bg: #FFF7EF;
  --card: #FFFFFF;
  --ink: #33304A;
  --muted: #8B87A0;
  --line: #EFEBE4;

  --violet: #6C5CE7;  --violet-deep: #5546D6;  --violet-soft: #EFEBFF;
  --teal:   #10A99B;  --teal-deep:   #0B8A7F;  --teal-soft:   #DDF5F2;
  --amber:  #F59E0B;  --amber-deep:  #D2850A;  --amber-soft:  #FFF3D6;
  --pink:   #EC5F9B;  --pink-deep:   #D14A85;  --pink-soft:   #FFE8F1;
  --green:  #2FA968;  --green-deep:  #238A53;  --green-soft:  #E3F7EC;
  --red:    #E4485C;  --red-deep:    #C43649;  --red-soft:    #FDE9EC;

  --radius: 20px;
  --shadow: 0 4px 0 rgba(51, 48, 74, 0.07);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(rgba(108, 92, 231, 0.055) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}

#app { max-width: 760px; margin: 0 auto; padding: 0 16px 96px; }

h1, h2, h3 { margin: 0; line-height: 1.3; }
p { margin: 0.4em 0; }

/* 英文内容：大一号、加粗、清晰字距（照顾 b/d/p/q 辨识） */
.en { font-weight: 700; letter-spacing: 0.02em; font-size: 1.12em; }

/* ---------------- 顶栏 / 底部导航 ---------------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px 10px;
}
.topbar .logo { font-size: 20px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.topbar .logo .planet { font-size: 26px; }

.flame {
  background: var(--amber-soft); color: var(--amber-deep);
  border-radius: 999px; padding: 5px 14px; font-weight: 800; font-size: 15px;
  border: 2px solid #FFDF9E;
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-top: 2px solid var(--line);
  padding: 6px 12px calc(8px + env(safe-area-inset-bottom));
}
.tabbar-inner { display: flex; gap: 6px; width: 100%; max-width: 560px; }
.tab {
  flex: 1; text-align: center; padding: 7px 4px 5px; border-radius: 16px;
  font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer;
  border: none; background: none; font-family: var(--font);
}
.tab .ico { display: block; font-size: 22px; line-height: 1.15; }
.tab.on { color: var(--violet-deep); background: var(--violet-soft); }

/* ---------------- 卡片 / 按钮 / 徽章 ---------------- */

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin: 14px 0;
  border: 2px solid transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 17px; font-weight: 800;
  border-radius: 16px; padding: 13px 22px; cursor: pointer;
  border: none; color: #fff; background: var(--violet);
  box-shadow: 0 4px 0 var(--violet-deep);
  transition: transform 0.06s, box-shadow 0.06s, filter 0.15s;
  text-decoration: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--violet-deep); }
.btn:disabled { filter: grayscale(0.6); opacity: 0.6; cursor: not-allowed; }
.btn.teal  { background: var(--teal);  box-shadow: 0 4px 0 var(--teal-deep); }
.btn.teal:active { box-shadow: 0 1px 0 var(--teal-deep); }
.btn.amber { background: var(--amber); box-shadow: 0 4px 0 var(--amber-deep); }
.btn.amber:active { box-shadow: 0 1px 0 var(--amber-deep); }
.btn.ghost {
  background: #fff; color: var(--violet-deep); border: 2px solid var(--violet-soft);
  box-shadow: 0 3px 0 var(--violet-soft);
}
.btn.big { font-size: 19px; padding: 16px 28px; width: 100%; }
.btn.small { font-size: 14px; padding: 8px 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--violet-deep); }

.badge {
  display: inline-block; border-radius: 999px; padding: 2px 11px;
  font-size: 12.5px; font-weight: 800; vertical-align: middle;
}
.badge.due    { background: var(--red-soft);  color: var(--red-deep); }
.badge.soon   { background: var(--amber-soft); color: var(--amber-deep); }
.badge.ok     { background: var(--green-soft); color: var(--green-deep); }
.badge.locked { background: #F0EEE8; color: var(--muted); }
.badge.master { background: linear-gradient(120deg, #FFF3D6, #FFE8F1); color: #B07A00; }

/* ---------------- 首页 ---------------- */

.hello { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 2px; }
.fox {
  font-size: 40px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(51,48,74,.12));
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.bubble {
  background: #fff; border-radius: 4px 18px 18px 18px; padding: 12px 16px;
  box-shadow: var(--shadow); font-weight: 600; flex: 1;
}

.stat-row { display: flex; gap: 10px; margin: 14px 0; }
.stat {
  flex: 1; background: #fff; border-radius: 16px; text-align: center;
  padding: 12px 6px 10px; box-shadow: var(--shadow);
}
.stat .num { font-size: 24px; font-weight: 800; }
.stat .lab { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border: 2px solid var(--line); border-radius: 18px;
  padding: 13px 15px; cursor: pointer; font-family: var(--font);
  transition: border-color 0.15s, transform 0.06s; width: 100%;
}
.task:active { transform: scale(0.985); }
.task.new { border-color: var(--violet-soft); background: var(--violet-soft); }
.task.due { border-color: #FFD1D8; background: #FFF7F8; }
.task .emo { font-size: 30px; }
.task .tt { font-weight: 800; font-size: 16.5px; }
.task .sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.task .go { margin-left: auto; font-size: 22px; }

.section-title { font-size: 15px; font-weight: 800; color: var(--muted); margin: 22px 2px 4px; letter-spacing: 0.05em; }

/* ---------------- 学习地图 ---------------- */

.group-head { display: flex; align-items: center; gap: 8px; margin: 20px 2px 8px; font-weight: 800; font-size: 16px; }
.group-head .dot { width: 14px; height: 14px; border-radius: 50%; }

.kp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .kp-grid { grid-template-columns: 1fr; } }

.kpcard {
  position: relative; background: #fff; border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow); cursor: pointer; border: 2.5px solid transparent;
  transition: transform 0.08s; font-family: var(--font); text-align: left; width: 100%;
}
.kpcard:active { transform: scale(0.97); }
.kpcard .emo { font-size: 32px; }
.kpcard .name { font-weight: 800; margin-top: 4px; font-size: 15.5px; line-height: 1.35; }
.kpcard .meta { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kpcard.locked { filter: grayscale(1); opacity: 0.55; }
.kpcard .lockpin { position: absolute; top: 10px; right: 12px; font-size: 18px; }
.stars { color: #F5A623; font-size: 14px; letter-spacing: 1px; }

/* ---------------- 知识点弹层 ---------------- */

.modal-mask {
  position: fixed; inset: 0; background: rgba(51, 48, 74, 0.45); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; border-radius: 26px 26px 0 0; width: 100%; max-width: 760px;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  animation: rise 0.22s ease-out;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 20px; }
.modal .actions { display: flex; gap: 10px; margin-top: 16px; }
.modal .actions .btn { flex: 1; }

/* ---------------- 讲解播放器（帧驱动"视频"） ---------------- */

.player { margin: 12px 0; }

.stage {
  position: relative; background: #fff; border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 16 / 10.5;
  border: 2px solid var(--line);
}
.stage-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 3.2cqw 4.5cqw; font-weight: 800;
  background: linear-gradient(rgba(255,255,255,0.94), rgba(255,255,255,0));
}
.stage-head .scene-name { font-size: 3.4cqw; color: var(--muted); }
.stage-head .kp-name { font-size: 3.4cqw; color: var(--violet-deep); }

.stage-body { position: absolute; inset: 0; padding: 11cqw 7cqw 5cqw; overflow: hidden; }

/* 节拍元素通用：由 JS 按帧设置透明度/位移 */
.beat { position: relative; }

.beat-title { font-size: 6.4cqw; font-weight: 800; margin: 1.5cqw 0 2.5cqw; }
.beat-big   { font-size: 5.6cqw; font-weight: 800; margin: 2cqw 0; text-align: center; }
.beat-text  { font-size: 4.1cqw; margin: 1.6cqw 0; line-height: 1.6; }
.beat-rule {
  font-size: 4.6cqw; font-weight: 800; display: inline-block;
  background: var(--violet-soft); color: var(--violet-deep);
  border-radius: 3cqw; padding: 2.2cqw 4.5cqw; margin: 2cqw 0;
}
.beat-rule.teal  { background: var(--teal-soft);  color: var(--teal-deep); }
.beat-rule.amber { background: var(--amber-soft); color: var(--amber-deep); }
.beat-rule.pink  { background: var(--pink-soft);  color: var(--pink-deep); }
.beat-tip {
  font-size: 3.7cqw; color: #7A5B12; background: var(--amber-soft);
  border-radius: 3cqw; padding: 2.4cqw 4cqw; margin: 2.4cqw 0 0; line-height: 1.6;
}
.beat-quote {
  font-size: 4.2cqw; font-style: italic; color: var(--muted);
  border-left: 1.2cqw solid var(--violet-soft); padding-left: 3cqw; margin: 2cqw 0;
}

.beat-cards { display: flex; gap: 2.5cqw; flex-wrap: wrap; margin: 2.5cqw 0; }
.mini-card {
  background: #F7F5FF; border: 2px solid var(--violet-soft); border-radius: 3.4cqw;
  padding: 2.4cqw 3.6cqw; text-align: center; min-width: 17cqw;
}
.mini-card .e { font-size: 6.5cqw; line-height: 1.3; }
.mini-card .en-line { font-size: 3.9cqw; }
.mini-card .zh-line { font-size: 3cqw; color: var(--muted); font-weight: 600; margin-top: 0.6cqw; }

.beat-table { border-collapse: collapse; margin: 2.2cqw auto; font-size: 3.9cqw; }
.beat-table th, .beat-table td {
  border: 2px solid var(--line); padding: 1.8cqw 4cqw; text-align: center;
}
.beat-table th { background: var(--violet-soft); color: var(--violet-deep); }
.beat-table td.en-cell { font-weight: 700; }

/* 例句小剧场 */
.beat-example { margin: 2.6cqw 0; }
.ex-sentence { font-size: 4.8cqw; line-height: 1.7; }
.ex-blank {
  display: inline-block; min-width: 13cqw; text-align: center;
  border-bottom: 0.7cqw solid var(--muted); color: var(--green-deep);
  font-weight: 800; padding: 0 1cqw;
}
.ex-blank.pulsing { animation: pulse-b 1.1s ease-in-out infinite; }
@keyframes pulse-b { 0%,100% { border-color: var(--muted); } 50% { border-color: var(--amber); } }
.ex-wrong {
  display: inline-block; color: var(--red); font-weight: 800; margin-left: 1.5cqw;
  text-decoration: line-through; text-decoration-thickness: 0.55cqw;
}
.ex-mark { font-size: 4.2cqw; margin-left: 1cqw; }
.ex-why {
  font-size: 3.6cqw; color: var(--red-deep); background: var(--red-soft);
  border-radius: 2.4cqw; display: inline-block; padding: 1.6cqw 3.4cqw; margin-top: 2cqw;
}
.ex-ok { color: var(--green-deep); font-weight: 800; }
.ex-fix {
  display: inline-block; background: var(--green-soft); border: 2px solid var(--green);
  color: var(--green-deep); font-weight: 800; border-radius: 2.6cqw;
  padding: 1.4cqw 3.4cqw; margin-top: 2cqw; font-size: 4.5cqw;
}
.ex-blank.struck {
  color: var(--red); text-decoration: line-through; text-decoration-thickness: 0.5cqw;
}
.cursor { color: var(--violet); animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.retry-banner {
  background: var(--pink-soft); color: var(--pink-deep); border-radius: 12px;
  padding: 8px 14px; font-weight: 800; font-size: 14px; margin: 10px 0;
}

/* 控制条 */
.controls { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pbtn {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--violet); color: #fff; font-size: 18px;
  box-shadow: 0 3px 0 var(--violet-deep); flex-shrink: 0;
}
.pbtn:active { transform: translateY(2px); box-shadow: none; }
.pbtn.mini { width: 38px; height: 38px; font-size: 15px; background: #fff; color: var(--violet-deep); border: 2px solid var(--violet-soft); box-shadow: 0 2px 0 var(--violet-soft); }

.scrub { flex: 1; height: 8px; appearance: none; -webkit-appearance: none; background: var(--violet-soft); border-radius: 99px; cursor: pointer; }
.scrub::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--violet); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.time-label { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 74px; text-align: right; }

.scene-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
}
.chip.on { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); }

.poster {
  position: absolute; inset: 0; z-index: 10; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(160deg, var(--violet-soft), #fff 70%);
  transition: opacity 0.25s;
}
.poster .play-big {
  width: 88px; height: 88px; border-radius: 50%; background: var(--violet);
  color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 var(--violet-deep), 0 10px 24px rgba(108,92,231,0.4);
}
.poster .pt { font-weight: 800; font-size: 19px; }
.poster .pd { color: var(--muted); font-weight: 600; font-size: 14px; }

/* ---------------- 答题 ---------------- */

.quiz-top { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.quiz-count { font-weight: 800; color: var(--muted); font-size: 14px; }
.dots { display: flex; gap: 5px; }
.dot-i { width: 9px; height: 9px; border-radius: 50%; background: #E4E1F5; }
.dot-i.done-ok { background: var(--green); }
.dot-i.done-no { background: var(--red); }
.dot-i.now { background: var(--violet); transform: scale(1.25); }

.stem-card {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow);
  padding: 22px 20px; margin: 12px 0; text-align: center;
}
.stem-card .qtext { font-size: 23px; line-height: 1.65; }
.blank-in {
  border: none; border-bottom: 3px dashed var(--violet); outline: none;
  font: inherit; font-weight: 800; color: var(--violet-deep);
  width: 108px; text-align: center; background: var(--violet-soft);
  border-radius: 8px 8px 0 0; padding: 2px 6px; font-size: 22px;
}
.blank-in:focus { background: #E6E1FF; }

.opts { display: flex; flex-direction: column; gap: 11px; margin: 16px 0; }
.opt {
  display: flex; align-items: center; gap: 13px; width: 100%;
  background: #fff; border: 2.5px solid var(--line); border-radius: 17px;
  padding: 14px 16px; cursor: pointer; font-family: var(--font);
  font-size: 18.5px; font-weight: 700; text-align: left;
  transition: border-color 0.12s, transform 0.06s;
}
.opt:active { transform: scale(0.985); }
.opt .abc {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: var(--violet-soft); color: var(--violet-deep);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.right .abc { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.wrong .abc { background: var(--red); color: #fff; }
.opt.dim { opacity: 0.5; }

.fill-row { display: flex; gap: 10px; margin: 16px 0; }
.fill-input {
  flex: 1; font-family: var(--font); font-size: 20px; font-weight: 700;
  border: 2.5px solid var(--line); border-radius: 15px; padding: 12px 16px; outline: none;
}
.fill-input:focus { border-color: var(--violet); }
.fill-input.right { border-color: var(--green); background: var(--green-soft); }
.fill-input.wrong { border-color: var(--red); background: var(--red-soft); animation: shake 0.4s; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}

.quiz-actions { display: flex; gap: 10px; margin: 14px 0; }
.hint-btn {
  background: none; border: none; color: var(--amber-deep); font-family: var(--font);
  font-weight: 800; font-size: 14.5px; cursor: pointer; padding: 6px 2px;
}
.hint-text {
  background: var(--amber-soft); border-radius: 12px; padding: 10px 14px;
  color: #7A5B12; font-weight: 600; font-size: 15px; margin: 8px 0;
}

/* 对错反馈 */
.feedback { border-radius: 18px; padding: 15px 17px; margin: 12px 0; animation: pop-in 0.25s ease-out; }
@keyframes pop-in { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.feedback.ok { background: var(--green-soft); border: 2px solid var(--green); }
.feedback.no { background: var(--red-soft); border: 2px solid var(--red); }
.feedback .fb-line { font-size: 19px; font-weight: 800; }
.feedback.ok .fb-line { color: var(--green-deep); }
.feedback.no .fb-line { color: var(--red-deep); }
.feedback .fb-sub { font-weight: 600; margin-top: 3px; font-size: 15px; }

/* 知识点讲解卡（错题弹出） */
.explain-card {
  background: #fff; border: 2.5px solid var(--amber); border-radius: 20px;
  padding: 17px 18px; margin: 12px 0; box-shadow: var(--shadow);
  animation: pop-in 0.3s ease-out;
}
.explain-card .ec-tag {
  display: inline-block; background: var(--amber-soft); color: var(--amber-deep);
  font-weight: 800; font-size: 13px; border-radius: 999px; padding: 3px 12px; margin-bottom: 8px;
}
.explain-card .ec-rule { font-weight: 800; font-size: 17.5px; margin: 4px 0; }
.explain-card .ec-ex { margin: 8px 0 2px; background: #F8F7FC; border-radius: 12px; padding: 10px 14px; }
.explain-card .ec-tip { color: var(--muted); font-size: 14.5px; margin-top: 8px; font-weight: 600; }

/* 结果页 */
.result-hero { text-align: center; padding: 26px 10px 10px; }
.result-hero .big-emoji { font-size: 64px; }
.result-hero .score { font-size: 44px; font-weight: 800; }
.result-stars { font-size: 40px; letter-spacing: 6px; margin: 8px 0; }
.level-banner {
  margin: 14px auto; display: inline-block; border-radius: 999px; padding: 9px 22px;
  font-weight: 800; font-size: 16px;
}
.level-banner.up   { background: var(--green-soft); color: var(--green-deep); }
.level-banner.keep { background: var(--amber-soft); color: var(--amber-deep); }
.level-banner.down { background: var(--red-soft); color: var(--red-deep); }

.wrong-list { text-align: left; }
.wrong-item { border-top: 2px dashed var(--line); padding: 12px 2px; }
.wrong-item:first-child { border-top: none; }

/* ---------------- 总结页 ---------------- */

.chart-card { padding: 16px 14px 10px; }
.chart-legend { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.chart-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 128px; margin-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 100%; cursor: default; }
.bar-cnt { font-size: 10px; font-weight: 800; color: var(--muted); min-height: 13px; line-height: 13px; }
.bar-stack { width: 68%; max-width: 22px; border-radius: 3px; background: #EFEDF5; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; height: 100px; }
.bar-seg { width: 100%; }
.bar-seg.okk { background: var(--teal); }
.bar-seg.noo { background: var(--red); border-bottom: 2px solid var(--card); }
.bar-seg.topr { border-radius: 5px 5px 2px 2px; }
.bar-lab { font-size: 10px; color: var(--muted); font-weight: 700; }
#chart-tip {
  position: fixed; z-index: 400; pointer-events: none; display: none;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 7px 11px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}

.point-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-top: 2px dashed var(--line); }
.point-row:first-child { border-top: none; }
.point-row .pname { flex: 1; font-weight: 700; font-size: 15px; }
.point-row .pacc { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.point-row .pacc.bad { color: var(--red-deep); }
.point-row .pacc.good { color: var(--green-deep); }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; border-top: 2px dashed var(--line); }
.setting-row:first-child { border-top: none; }
.setting-row .sl { font-weight: 700; }
.setting-row .sd { font-size: 13px; color: var(--muted); font-weight: 600; }

.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: #D9D6E8; border-radius: 999px; cursor: pointer; transition: 0.2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(22px); }

/* ---------------- 通用 ---------------- */

.back-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.back-btn {
  border: none; background: #fff; border-radius: 12px; padding: 8px 14px;
  font-family: var(--font); font-weight: 800; font-size: 14.5px; cursor: pointer;
  color: var(--muted); box-shadow: var(--shadow);
}

.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%);
  background: var(--ink); color: #fff; border-radius: 14px; padding: 11px 20px;
  font-weight: 700; font-size: 15px; z-index: 200; animation: toast-in 0.25s ease-out;
  max-width: 86vw; text-align: center;
}
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

#confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* 合规备案页脚（小而低调） */
.beian { text-align: center; font-size: 11px; color: #C2BECF; padding: 28px 0 18px; }
.beian a { color: inherit; text-decoration: none; margin: 0 10px; }

.empty-tip { text-align: center; color: var(--muted); font-weight: 600; padding: 30px 10px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01s !important; transition-duration: 0.01s !important; }
}
