/* 夏日英語護照 — 設計系統: 暖紙 + 郵票打卡 + 三色身份 */
:root {
  --paper: #FFF6E9;
  --card: #FFFFFF;
  --ink: #3A3226;
  --muted: #8A7E6C;
  --line: #EADFC8;
  --red: #E5484D;
  --green: #2E9E5B;
  --green-bg: #E9F8EF;
  --red-bg: #FDEBEC;
  --gold: #FFB937;
  --kc: #FF9C4A;
  --r: 18px;
  --shadow: 0 2px 10px rgba(120, 90, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15171E; --card: #1E212B; --ink: #EFE8D8; --muted: #9A937F;
    --line: #2C303C; --red: #FF6B6B; --green: #4CC47E; --green-bg: #1C3227;
    --red-bg: #3A2226; --shadow: 0 2px 12px rgba(0, 0, 0, .35);
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, "PingFang TC", "Hiragino Sans TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  background: var(--paper);
  background-image: radial-gradient(rgba(140, 100, 40, .05) 1.1px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 56px;
}
@media (prefers-color-scheme: dark) {
  body { background-image: radial-gradient(rgba(255, 240, 200, .045) 1.1px, transparent 1.3px); }
}
body[data-track="p3"] { --kc: #FF7043; }
body[data-track="p6"] { --kc: #1F9E8E; }
body[data-track="s1"] { --kc: #5C6BC0; }
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 210px; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--kc) 14%, transparent), transparent);
}
#app { position: relative; z-index: 1; max-width: 660px; margin: 0 auto; padding: 0 16px; }
button { font-family: inherit; cursor: pointer; }
b { color: color-mix(in srgb, var(--kc) 78%, var(--ink)); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ===== topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  margin: 0 -16px 10px; padding: 12px 14px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px dashed var(--line);
}
.backbtn, .mutebtn {
  width: 40px; height: 40px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); font-size: 18px; font-weight: 900; color: var(--ink); flex: none;
}
.tb-title { font-weight: 800; font-size: 16px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-pills { display: flex; gap: 6px; }
.pill { font-size: 13px; font-weight: 800; padding: 5px 9px; border-radius: 99px; background: var(--card); border: 2px solid var(--line); white-space: nowrap; }
.pill.fire { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }

/* ===== 首頁 ===== */
.home-hero { text-align: center; padding: 42px 8px 26px; }
.hero-stamps { font-size: 26px; letter-spacing: 14px; margin-bottom: 8px; }
.hero-stamps span { display: inline-block; transform: rotate(-10deg); }
.hero-stamps span:nth-child(2) { transform: rotate(6deg) translateY(-4px); }
.hero-stamps span:nth-child(3) { transform: rotate(-4deg); }
.home-hero h1 {
  font-size: clamp(30px, 8vw, 42px); font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(120deg, #FF7043, #FFB937 45%, #1F9E8E 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-weight: 600; margin-top: 10px; font-size: 15px; }
.kid-list { display: grid; gap: 14px; }
.kid-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 16px;
  background: var(--card); border: 2.5px solid var(--line); border-radius: 22px;
  border-left: 8px solid var(--kc); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s ease;
}
.kid-card:active { transform: scale(.98); }
.kid-emoji {
  font-size: 34px; width: 62px; height: 62px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--kc) 14%, var(--card)); border-radius: 50%;
  border: 2.5px dashed color-mix(in srgb, var(--kc) 55%, var(--line));
}
.kid-info { flex: 1; min-width: 0; }
.kid-name { font-size: 19px; font-weight: 900; }
.editname { border: none; background: none; font-size: 14px; opacity: .6; }
.kid-sub { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.kid-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--paper); border: 1.5px solid var(--line); }
.chip.ok { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.chip.todo { background: color-mix(in srgb, var(--gold) 18%, var(--paper)); border-color: var(--gold); }
.prog-bar { height: 10px; border-radius: 99px; background: var(--paper); border: 1.5px solid var(--line); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--kc), color-mix(in srgb, var(--kc) 60%, var(--gold))); transition: width .4s; }
.kid-pct { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.kid-go { font-weight: 900; color: var(--kc); white-space: nowrap; font-size: 15px; }
.home-foot { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; padding: 30px 0 10px; }
.foot-dim { opacity: .65; font-size: 12px; }

/* ===== tabs ===== */
.tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.tab {
  flex: 1; padding: 11px 6px; font-size: 14px; font-weight: 800; color: var(--muted);
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
}
.tab.active { color: #fff; background: var(--kc); border-color: var(--kc); box-shadow: 0 3px 0 color-mix(in srgb, var(--kc) 60%, #000); }

/* ===== 旅程地圖 ===== */
.cta-card {
  position: relative; background: linear-gradient(135deg, var(--kc), color-mix(in srgb, var(--kc) 65%, #000 8%));
  color: #fff; border-radius: 22px; padding: 20px 18px; margin-bottom: 20px; cursor: pointer;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--kc) 55%, #000), var(--shadow);
  overflow: hidden;
}
.cta-card::after { content: "📮"; position: absolute; right: -6px; bottom: -14px; font-size: 74px; opacity: .18; transform: rotate(-12deg); }
.cta-card:active { transform: translateY(3px); box-shadow: 0 3px 0 color-mix(in srgb, var(--kc) 55%, #000); }
.cta-card.grad { cursor: default; }
.cta-tag { display: inline-block; font-size: 12px; font-weight: 900; background: rgba(255,255,255,.22); padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; letter-spacing: 1px; }
.cta-big { font-size: 21px; font-weight: 900; line-height: 1.3; }
.cta-sub { font-size: 13px; opacity: .92; font-weight: 700; margin-top: 5px; }
.cta-btn { display: inline-block; margin-top: 12px; background: #fff; color: var(--kc); font-weight: 900; padding: 9px 20px; border-radius: 99px; font-size: 15px; }
.week-block {
  background: var(--card); border: 2.5px solid var(--line); border-top: 6px solid var(--wc);
  border-radius: 20px; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.week-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.week-emoji { font-size: 30px; }
.week-t { font-weight: 900; font-size: 17px; }
.week-te { font-size: 12.5px; color: var(--muted); font-weight: 700; font-style: italic; }
.week-intro { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.intro-chip { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--paper); border: 1.5px dashed var(--line); padding: 4px 9px; border-radius: 10px; }
.path { position: relative; padding-left: 6px; }
.path::before { content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; border-left: 3px dashed color-mix(in srgb, var(--wc) 45%, var(--line)); }
.day-node { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; }
.day-node.locked { cursor: default; opacity: .5; filter: grayscale(.7); }
.day-dot {
  width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 3px solid var(--wc); color: var(--wc);
  font-weight: 900; font-size: 16px; z-index: 1;
}
.day-node.done .day-dot { background: var(--wc); color: #fff; }
.day-node.today .day-dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wc) 45%, transparent); } 50% { box-shadow: 0 0 0 9px transparent; } }
.day-n { font-size: 12.5px; font-weight: 900; color: var(--muted); }
.flag { color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--card)); padding: 1px 7px; border-radius: 99px; margin-left: 4px; font-size: 11px; }
.day-label { font-weight: 800; font-size: 15.5px; }
.mini-stamp { margin-left: auto; font-size: 20px; transform: rotate(10deg); }

/* ===== 日課 ===== */
.practice-note { background: color-mix(in srgb, var(--gold) 16%, var(--card)); border: 2px dashed var(--gold); border-radius: 14px; padding: 9px 13px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.secdots { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 16px; }
.sd { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; font-weight: 800; color: var(--muted); opacity: .55; min-width: 44px; }
.sd em { font-style: normal; font-size: 17px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 50%; margin-bottom: 2px; }
.sd.cur { opacity: 1; color: var(--kc); }
.sd.cur em { border-color: var(--kc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kc) 22%, transparent); }
.sd.done { opacity: .9; color: var(--green); }
.sd.done em { background: var(--green-bg); border-color: var(--green); }
.sd-line { width: 12px; height: 2px; background: var(--line); margin-bottom: 14px; }
.day-body { padding-bottom: 30px; }
.step-h { font-size: 18px; font-weight: 900; margin: 6px 0 12px; }
.goals { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.goal-chip { font-size: 13px; font-weight: 800; background: var(--card); border: 2px solid color-mix(in srgb, var(--wc) 45%, var(--line)); padding: 6px 11px; border-radius: 12px; }

.lesson-card { background: var(--card); border: 2.5px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.l-head { font-size: 17px; font-weight: 900; padding-bottom: 9px; margin-bottom: 11px; border-bottom: 2px dashed var(--line); }
.l-body p { margin-bottom: 7px; font-size: 15.5px; }
.formula {
  font-weight: 900; font-size: 15.5px; background: color-mix(in srgb, var(--wc) 10%, var(--paper));
  border: 2px dashed color-mix(in srgb, var(--wc) 55%, var(--line)); border-radius: 12px;
  padding: 9px 13px; margin: 10px 0; text-align: center;
}
.examples { margin-top: 10px; display: grid; gap: 8px; }
.example-row { background: var(--paper); border-radius: 12px; padding: 9px 12px; }
.ex-en { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ex-zh { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.btn-say { border: none; background: color-mix(in srgb, var(--kc) 14%, var(--card)); border-radius: 99px; font-size: 14px; padding: 4px 9px; flex: none; }
.btn-say:active { transform: scale(.9); }
.wrong-box { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); }
.wb-bad { background: var(--red-bg); padding: 8px 12px; font-weight: 700; font-size: 14.5px; }
.wb-good { background: var(--green-bg); padding: 8px 12px; font-weight: 700; font-size: 14.5px; }
.vocab-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.vchip { display: inline-flex; align-items: center; gap: 5px; background: var(--paper); border: 2px solid var(--line); border-radius: 99px; padding: 6px 11px; font-size: 14px; font-weight: 800; color: var(--ink); }
.vchip i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }
.l-tablewrap { overflow-x: auto; margin: 4px 0 8px; }
.l-table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 300px; }
.l-table th { background: color-mix(in srgb, var(--wc) 14%, var(--paper)); font-weight: 900; }
.l-table th, .l-table td { border: 1.5px solid var(--line); padding: 7px 9px; text-align: left; }
.l-note { font-size: 13.5px; font-weight: 700; color: var(--muted); }

/* 題目 */
.q-prog { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.from-chip { background: var(--card); border: 1.5px dashed var(--line); border-radius: 99px; padding: 2px 8px; font-size: 11.5px; }
.qbox { background: var(--card); border: 2.5px solid var(--line); border-radius: var(--r); padding: 18px 16px; box-shadow: var(--shadow); }
.q-text { font-size: 17.5px; font-weight: 800; margin-bottom: 14px; line-height: 1.5; }
.opts { display: grid; gap: 10px; }
.opt {
  text-align: left; font-size: 16.5px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: 2.5px solid var(--line); border-radius: 14px;
  padding: 13px 15px; transition: transform .1s;
}
.opt:not(.lock):not(.disabled):active { transform: scale(.98); }
.opt.disabled { opacity: .45; }
.opt.lock { cursor: default; }
.opt.correct { border-color: var(--green); background: var(--green-bg); }
.opt.picked-right { animation: pop .35s ease; }
.opt.wrong { border-color: var(--red); background: var(--red-bg); animation: shake .4s ease; }
@keyframes pop { 40% { transform: scale(1.04); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.why { margin-top: 12px; background: var(--paper); border-left: 4px solid var(--gold); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; font-weight: 700; }

.listen-zone { text-align: center; padding: 6px 0 14px; }
.listen-play {
  font-size: 17px; font-weight: 900; color: #fff; background: var(--kc);
  border: none; border-radius: 99px; padding: 13px 26px; margin: 0 5px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--kc) 60%, #000);
}
.listen-play:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--kc) 60%, #000); }
.listen-play.slow { background: var(--card); color: var(--ink); border: 2.5px solid var(--line); box-shadow: 0 4px 0 var(--line); font-size: 15px; padding: 12px 18px; }
.listen-hint { font-size: 13.5px; color: var(--muted); font-weight: 700; margin-top: 10px; }

.reveal-zone { text-align: center; padding-top: 4px; }
.reveal-ans { text-align: left; }
.ra-a { background: color-mix(in srgb, var(--gold) 14%, var(--paper)); border: 2px dashed var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.ra-a.big-word { text-align: center; font-size: 26px; letter-spacing: 1px; }
.selfmark { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--muted); }
.sm-yes, .sm-no { flex: 1; min-width: 110px; font-size: 16px; font-weight: 900; padding: 12px; border-radius: 14px; border: none; color: #fff; }
.sm-yes { background: var(--green); box-shadow: 0 4px 0 color-mix(in srgb, var(--green) 60%, #000); }
.sm-no { background: var(--red); box-shadow: 0 4px 0 color-mix(in srgb, var(--red) 60%, #000); }
.sm-yes:active, .sm-no:active { transform: translateY(3px); box-shadow: none; }

.next-bar { margin-top: 18px; display: flex; gap: 10px; }
.next-bar.col { flex-direction: column; }
.btn {
  flex: 1; font-size: 17px; font-weight: 900; color: #fff; background: var(--kc);
  border: none; border-radius: 16px; padding: 15px 20px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--kc) 60%, #000);
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--kc) 60%, #000); }
.btn:disabled { opacity: .4; box-shadow: 0 5px 0 color-mix(in srgb, var(--kc) 30%, #999); }
.btn-ghost { background: var(--card); color: var(--kc); border: 2.5px solid var(--kc); box-shadow: 0 5px 0 color-mix(in srgb, var(--kc) 35%, var(--line)); }
.btn-reveal { max-width: 260px; margin: 0 auto; }

.sec-result { text-align: center; padding: 40px 0; }
.sr-big { font-size: 44px; font-weight: 900; }
.sr-txt { font-size: 17px; font-weight: 800; color: var(--muted); margin-top: 8px; }

.review-list { display: grid; gap: 9px; margin-bottom: 6px; }
.review-card { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 11px 13px; }
.rc-day { flex: none; font-size: 11.5px; font-weight: 900; color: #fff; background: var(--wc, var(--kc)); border-radius: 8px; padding: 3px 7px; margin-top: 2px; }
.review-card b { display: block; font-size: 15px; }
.review-card i { font-style: normal; font-size: 13.5px; color: var(--muted); font-weight: 600; }

.task-card { background: var(--card); border: 2.5px dashed color-mix(in srgb, var(--wc) 55%, var(--line)); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.task-type { display: inline-block; font-size: 12.5px; font-weight: 900; background: color-mix(in srgb, var(--wc) 14%, var(--paper)); border-radius: 99px; padding: 4px 11px; margin-bottom: 8px; }
.task-title { font-size: 17px; font-weight: 900; margin-bottom: 8px; }
.task-steps { padding-left: 22px; display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.task-tip { margin-top: 11px; font-size: 13.5px; font-weight: 700; color: var(--muted); background: var(--paper); border-radius: 10px; padding: 9px 11px; }
.checks { display: grid; gap: 9px; }
.check { display: flex; align-items: center; gap: 10px; text-align: left; font-size: 15.5px; font-weight: 700; color: var(--ink); background: var(--card); border: 2.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.cbox { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2.5px solid var(--line); display: grid; place-items: center; background: var(--paper); }
.check.on { border-color: var(--green); background: var(--green-bg); }
.check.on .cbox { background: var(--green); border-color: var(--green); }
.check.on .cbox::after { content: "✓"; color: #fff; font-weight: 900; font-size: 15px; }

/* 完成 & 印仔 */
.done-wrap { text-align: center; padding: 26px 0; }
.stamp-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.stamp {
  width: 178px; height: 178px; border: 4.5px double var(--red); border-radius: 50%;
  color: var(--red); display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 3px; transform: rotate(-8deg); font-weight: 900; letter-spacing: 2px;
  background: radial-gradient(circle, color-mix(in srgb, var(--red) 7%, transparent), transparent 65%);
  animation: stampIn .55s cubic-bezier(.2, 1.7, .45, 1) both;
}
@keyframes stampIn { from { transform: scale(2.3) rotate(8deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.stamp-day { font-size: 30px; }
.stamp-date { font-size: 14px; border-top: 2px solid var(--red); border-bottom: 2px solid var(--red); padding: 2px 10px; }
.stamp-ok { font-size: 15px; }
.done-praise { font-size: 24px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dp-en { background: linear-gradient(120deg, var(--kc), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dp-zh { font-size: 17px; }
.done-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.done-stats span { font-size: 13.5px; font-weight: 800; background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 6px 12px; }
.perfect-tag { display: inline-block; margin-top: 12px; font-size: 15px; font-weight: 900; color: #fff; background: linear-gradient(120deg, var(--gold), var(--red)); padding: 7px 16px; border-radius: 99px; }
.badge-toasts { margin-top: 14px; display: grid; gap: 8px; }
.badge-toast { font-size: 15px; font-weight: 900; background: color-mix(in srgb, var(--gold) 22%, var(--card)); border: 2.5px solid var(--gold); border-radius: 14px; padding: 11px; animation: pop .5s ease; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -32px; font-size: 22px; font-style: normal; animation: fall 2.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(106vh) rotate(320deg); opacity: .85; } }

/* ===== 打卡簿 ===== */
.streak-hero { text-align: center; background: var(--card); border: 2.5px solid var(--line); border-radius: 22px; padding: 22px 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.streak-big { font-size: 46px; font-weight: 900; }
.streak-cap { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 12px; }
.stat-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.stat { font-size: 15px; font-weight: 900; background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 72px; }
.stat i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; }
.cal-card { background: var(--card); border: 2.5px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav button { width: 36px; height: 36px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); font-size: 18px; font-weight: 900; color: var(--ink); }
.cal-title { font-weight: 900; font-size: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: 12px; font-weight: 900; color: var(--muted); padding: 4px 0; }
.cal-cell { position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--paper); border: 1.5px solid var(--line); display: grid; place-items: center; }
.cal-cell.empty { background: transparent; border: none; }
.cal-cell.today { border: 2.5px solid var(--kc); }
.cal-cell.stamped { background: color-mix(in srgb, var(--red) 8%, var(--paper)); }
.cal-n { font-size: 12.5px; font-weight: 800; color: var(--muted); position: absolute; top: 3px; left: 6px; }
.cal-stamp { font-size: 19px; transform: rotate(12deg); margin-top: 6px; }
.sec-h { font-size: 16px; font-weight: 900; margin: 18px 0 10px; }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
.badge { background: var(--card); border: 2.5px solid var(--gold); border-radius: 16px; padding: 12px 6px; text-align: center; }
.badge.locked { border-color: var(--line); filter: grayscale(1); opacity: .45; }
.badge-e { font-size: 26px; display: block; }
.badge-n { font-size: 11.5px; font-weight: 800; color: var(--muted); }

/* ===== 知識樹 ===== */
.tree-cap { text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.tree { position: relative; padding-left: 10px; }
.tree::before { content: ""; position: absolute; left: 26px; top: 8px; bottom: 8px; border-left: 3px solid var(--line); }
.tree-week { position: relative; margin-bottom: 14px; }
.tree-node { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.tree-node span { width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: 19px; background: var(--card); border: 3px solid var(--wc); border-radius: 50%; }
.tree-node b { font-size: 15.5px; }
.tree-node i { font-style: italic; font-size: 12px; color: var(--muted); font-weight: 700; margin-left: 6px; }
.tree-leaves { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px 48px; }
.tree-day { font-size: 12.5px; font-weight: 800; color: var(--muted); background: var(--card); border: 1.5px solid var(--line); border-radius: 99px; padding: 4px 10px; }
.tree-day.done { color: #fff; background: var(--wc); border-color: var(--wc); }
.tree-day.quiz.done { background: var(--gold); border-color: var(--gold); }
.td-n { opacity: .75; font-size: 11px; }

.fatal { text-align: center; padding: 60px 20px; font-weight: 800; }

/* ===== 大屏 ===== */
@media (min-width: 720px) {
  .kid-list { gap: 16px; }
  .kid-emoji { width: 72px; height: 72px; font-size: 40px; }
  .cta-big { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
