:root {
  --paper: #f4f0e4;
  --paper-deep: #ebe4d2;
  --ink: #12243b;
  --ink-soft: #324963;
  --coral: #f05c43;
  --coral-deep: #d8422c;
  --blue: #2468f2;
  --blue-deep: #1649ae;
  --sky: #dcefff;
  --lime: #c9f45d;
  --yellow: #f6c946;
  --white: #fffdf7;
  --line: rgba(18, 36, 59, .2);
  --shadow: 8px 8px 0 var(--ink);
  --radius: 24px;
  --display: "Arial Rounded MT Bold", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --body: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(18,36,59,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,36,59,.045) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: hidden;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.paper-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .2; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}
.topbar {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 48px; height: 48px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg);
}
.brand-mark svg { width: 31px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand b { display: block; font: 900 21px/1.1 var(--display); letter-spacing: .02em; }
.brand small { display: block; margin-top: 5px; font: 800 8px/1 var(--display); letter-spacing: .2em; color: var(--ink-soft); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.live-dot {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1.5px solid var(--ink);
  border-radius: 99px; background: rgba(255,253,247,.78); font-size: 12px; font-weight: 800;
}
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #36b36a; box-shadow: 0 0 0 5px rgba(54,179,106,.14); animation: pulse 2s infinite; }
.icon-btn {
  width: 40px; height: 40px; border: 1.5px solid var(--ink); border-radius: 50%;
  background: var(--white); display: grid; place-items: center; cursor: pointer; transition: .2s ease;
}
.icon-btn:hover { transform: rotate(-8deg) scale(1.05); background: var(--lime); }
.icon-btn svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-muted { opacity: .45; }

main { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }
.intro {
  position: relative;
  min-height: 275px; padding: 54px 0 48px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 48px;
}
.intro::after {
  content: "＋"; position: absolute; right: 32%; top: 28px; color: var(--coral); font: 900 42px/1 var(--display);
  transform: rotate(12deg); opacity: .8;
}
.eyebrow {
  display: flex; align-items: center; gap: 9px; margin: 0 0 13px;
  color: var(--ink-soft); font: 900 11px/1 var(--display); letter-spacing: .18em;
}
.eyebrow span { width: 28px; height: 4px; border-radius: 9px; background: var(--coral); }
.intro h1 {
  margin: 0; font: 900 clamp(46px, 6vw, 82px)/.98 var(--display); letter-spacing: -.055em;
}
.intro h1 em {
  position: relative; color: var(--blue); font-style: normal; white-space: nowrap; z-index: 1;
}
.intro h1 em::after {
  content: ""; position: absolute; left: -2%; right: -3%; bottom: 4px; height: 17px;
  background: var(--lime); z-index: -1; transform: rotate(-1.5deg); border-radius: 20px 3px 20px 5px;
}
.grade-wrap { width: min(440px, 100%); flex: 0 0 auto; }
.grade-label { margin: 0 0 9px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ink-soft); }
.grade-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px;
  border: 2px solid var(--ink); border-radius: 21px; background: rgba(255,253,247,.72); box-shadow: 5px 5px 0 rgba(18,36,59,.18);
}
.grade-tab {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 77px; padding: 12px 14px;
  border: 0; border-radius: 15px; background: transparent; text-align: left; cursor: pointer; transition: .25s ease;
}
.grade-tab:hover { background: rgba(36,104,242,.08); }
.grade-tab.is-active { color: var(--white); background: var(--ink); box-shadow: inset 0 -5px 0 rgba(0,0,0,.2); }
.grade-num { font: 900 23px/1 var(--display); color: var(--coral); }
.grade-tab.is-active .grade-num { color: var(--lime); }
.grade-tab b { display: block; font: 900 16px/1.1 var(--display); white-space: nowrap; }
.grade-tab small { display: block; margin-top: 5px; font-size: 10px; font-weight: 700; opacity: .6; }
.grade-tab > i { position: absolute; right: 10px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.grade-tab.is-active > i { background: var(--lime); box-shadow: 0 0 0 4px rgba(201,244,93,.18); }

.quest-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(290px, .72fr); gap: 20px; align-items: stretch; }
.quest-card, .energy-card, .week-section, .archive-section, .daily-reminder {
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white);
}
.quest-card { position: relative; padding: 22px; box-shadow: var(--shadow); overflow: hidden; }
.quest-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .33;
  background-image: radial-gradient(var(--ink) .8px, transparent .8px); background-size: 13px 13px;
  mask-image: linear-gradient(to left, black, transparent 35%);
}
.quest-ruler {
  position: absolute; left: 0; top: 112px; bottom: 110px; width: 9px;
  background: repeating-linear-gradient(to bottom, transparent 0 9px, var(--ink) 9px 10px, transparent 10px 20px, var(--coral) 20px 22px);
  opacity: .22;
}
.quest-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-left: 5px; }
.quest-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.mission-tag {
  display: inline-flex; align-items: center; padding: 7px 10px; color: var(--ink); background: var(--yellow);
  border: 1.5px solid var(--ink); border-radius: 7px; font: 900 9px/1 var(--display); letter-spacing: .14em;
  transform: rotate(-2deg);
}
.day-doodle { position: relative; min-width: 90px; text-align: right; transform: rotate(2deg); }
.day-doodle span { display: block; font: 900 9px/1 var(--display); letter-spacing: .2em; margin-bottom: 2px; }
.day-doodle b { font: 900 48px/.95 var(--display); color: var(--blue); letter-spacing: -.05em; }
.day-doodle::after { content: ""; position: absolute; right: 0; bottom: -5px; width: 57px; height: 5px; background: var(--coral); transform: rotate(-3deg); border-radius: 5px; }
.quest-title-row { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 25px 0 18px 5px; }
.mini-label { margin: 0 0 6px; color: var(--ink-soft); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.quest-title-row h2 { margin: 0; font: 900 clamp(25px, 3vw, 35px)/1.1 var(--display); letter-spacing: -.03em; }
.source-link {
  display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--ink); background: transparent;
  border-radius: 99px; padding: 8px 11px; cursor: pointer; font-size: 11px; font-weight: 800; flex: 0 0 auto;
  transition: .2s ease;
}
.source-link:hover { color: var(--white); background: var(--blue); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px,-1px); }
.source-link svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.question-frame {
  position: relative; margin: 0 0 17px; padding: 12px; min-height: 345px;
  display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 17px;
  background: #fff; box-shadow: inset 0 0 0 6px var(--sky), 5px 5px 0 rgba(18,36,59,.15); overflow: hidden;
}
.question-frame img { display: block; width: 100%; height: auto; max-height: 590px; object-fit: contain; border-radius: 9px; }
.image-loader { display: flex; flex-direction: column; align-items: center; gap: 11px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.image-loader i { width: 38px; height: 38px; border: 3px solid var(--sky); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.zoom-btn {
  position: absolute; right: 20px; bottom: 20px; width: 38px; height: 38px; border: 2px solid var(--ink);
  border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: 3px 3px 0 var(--ink); cursor: zoom-in;
}
.zoom-btn svg { width: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.quest-actions { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.complete-btn, .answer-btn {
  border: 2px solid var(--ink); border-radius: 15px; min-height: 66px; cursor: pointer; transition: .18s ease;
}
.complete-btn {
  display: flex; align-items: center; gap: 13px; padding: 9px 15px; color: var(--white); background: var(--coral);
  box-shadow: 4px 4px 0 var(--ink); text-align: left;
}
.complete-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); background: var(--coral-deep); }
.complete-btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.complete-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border: 2px solid var(--white); border-radius: 50%; }
.complete-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.complete-copy small { display: block; opacity: .75; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.complete-copy b { display: block; margin-top: 2px; font: 900 18px/1.2 var(--display); }
.complete-plus { margin-left: auto; align-self: flex-start; color: var(--lime); font: 900 15px/1 var(--display); }
.complete-btn.is-done { color: var(--ink); background: var(--lime); }
.complete-btn.is-done .complete-icon { border-color: var(--ink); background: var(--white); }
.complete-btn.is-done .complete-copy small { opacity: .65; }
.complete-btn.is-done .complete-plus { color: var(--ink); }
.answer-btn {
  display: flex; align-items: center; gap: 10px; padding: 0 17px; background: var(--white); font: 900 14px/1 var(--display);
}
.answer-btn svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
.answer-btn:hover:not(:disabled) { background: var(--sky); }
.answer-btn:disabled { opacity: .38; cursor: not-allowed; }
.answer-btn.is-open svg { transform: rotate(180deg); }
.answer-panel {
  position: relative; margin-top: 12px; padding: 17px; border: 2px dashed var(--ink); border-radius: 15px;
  background: #eef7ff; display: grid; grid-template-columns: minmax(120px, .5fr) 1.5fr; gap: 14px; align-items: center;
  animation: dropIn .28s ease both;
}
.answer-copy h3 { margin: 0 0 4px; font: 900 22px/1.1 var(--display); }
.answer-copy p { margin: 0; font-size: 11px; line-height: 1.7; color: var(--ink-soft); }
.answer-chip { margin-top: 10px; display: flex; gap: 7px; }
.answer-chip b, .answer-chip span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 43px; height: 38px;
  padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--white); font: 900 19px/1 var(--display);
}
.answer-chip span { min-width: auto; font-size: 10px; background: var(--lime); }
.answer-panel > img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; }

.energy-card {
  padding: 24px; background: var(--ink); color: var(--white); box-shadow: 8px 8px 0 var(--coral);
  position: relative; overflow: hidden;
}
.energy-card::before {
  content: ""; position: absolute; width: 130px; height: 130px; border: 2px solid rgba(255,255,255,.12);
  border-radius: 50%; right: -45px; top: -45px; box-shadow: 0 0 0 24px rgba(255,255,255,.03), 0 0 0 48px rgba(255,255,255,.025);
}
.energy-orbit { position: relative; display: grid; place-items: center; height: 240px; margin: -5px 0 5px; }
.orbit-ring { position: absolute; border: 1px dashed rgba(255,255,255,.28); border-radius: 50%; }
.ring-one { width: 210px; height: 120px; transform: rotate(-20deg); animation: spin 22s linear infinite; }
.ring-two { width: 152px; height: 220px; transform: rotate(38deg); animation: spinReverse 30s linear infinite; }
.orbit-dot { position: absolute; display: grid; place-items: center; width: 33px; height: 33px; border: 1.5px solid var(--white); border-radius: 50%; font: 900 18px/1 var(--display); }
.dot-one { left: 14%; top: 30%; background: var(--blue); transform: rotate(-8deg); }
.dot-two { right: 9%; bottom: 21%; background: var(--coral); transform: rotate(8deg); }
.energy-core {
  position: relative; z-index: 2; width: 150px; height: 150px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--yellow); color: var(--ink);
  border: 3px solid var(--white); box-shadow: 0 0 0 8px rgba(246,201,70,.1), 8px 8px 0 rgba(0,0,0,.35);
  transform: rotate(-2deg);
}
.energy-core svg { position: absolute; width: 76px; height: 76px; fill: none; stroke: rgba(18,36,59,.1); stroke-width: 2; }
.energy-core b { position: relative; font: 900 49px/.92 var(--display); letter-spacing: -.06em; }
.energy-core small { position: relative; margin-top: 7px; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.level-row { display: flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 800; color: rgba(255,255,255,.66); }
.level-row > span:first-child { color: var(--lime); font: 900 11px/1 var(--display); letter-spacing: .05em; }
.level-track { flex: 1; height: 7px; border-radius: 9px; background: rgba(255,255,255,.13); overflow: hidden; }
.level-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width .45s ease; }
.streak-block {
  margin: 21px 0 18px; padding: 16px; display: flex; align-items: center; gap: 13px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 17px; background: rgba(255,255,255,.06);
}
.flame { position: relative; width: 40px; height: 46px; flex: 0 0 40px; }
.flame::before {
  content: ""; position: absolute; inset: 0; border-radius: 52% 48% 58% 42% / 65% 60% 40% 35%;
  background: var(--coral); transform: rotate(-8deg); box-shadow: inset 0 -8px 0 rgba(0,0,0,.08);
}
.flame i { position: absolute; left: 13px; bottom: 3px; width: 16px; height: 24px; border-radius: 50% 50% 45% 45%; background: var(--yellow); }
.streak-block b { float: left; margin-right: 3px; color: var(--lime); font: 900 30px/.9 var(--display); }
.streak-block span { font-size: 11px; font-weight: 800; }
.streak-block p { clear: both; margin: 5px 0 0; padding-top: 5px; color: rgba(255,255,255,.55); font-size: 9px; line-height: 1.5; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 17px; }
.stat-strip div { padding: 0 9px; border-right: 1px solid rgba(255,255,255,.13); }
.stat-strip div:first-child { padding-left: 0; }
.stat-strip div:last-child { padding-right: 0; border: 0; }
.stat-strip b { display: block; font: 900 21px/1 var(--display); color: var(--white); }
.stat-strip span { display: block; margin-top: 5px; color: rgba(255,255,255,.5); font-size: 9px; font-weight: 700; }

.week-section, .archive-section { margin-top: 20px; padding: 25px; box-shadow: 5px 5px 0 rgba(18,36,59,.15); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font: 900 clamp(25px, 3vw, 34px)/1 var(--display); letter-spacing: -.035em; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-note { max-width: 270px; margin: 0; text-align: right; font-size: 11px; line-height: 1.6; color: var(--ink-soft); }
.week-track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.week-day {
  position: relative; min-height: 120px; padding: 13px; border: 1.5px solid var(--ink); border-radius: 13px;
  background: var(--paper); cursor: pointer; transition: .2s ease; text-align: left;
}
.week-day:hover { transform: translateY(-3px); box-shadow: 3px 3px 0 var(--ink); }
.week-day.is-today { background: var(--sky); }
.week-day.is-done { background: var(--lime); }
.week-day.is-selected { outline: 3px solid var(--blue); outline-offset: 2px; }
.week-day small { display: block; font-size: 9px; font-weight: 900; color: var(--ink-soft); }
.week-day b { display: block; margin-top: 6px; font: 900 25px/1 var(--display); }
.week-day .week-status { position: absolute; left: 12px; bottom: 11px; display: flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 800; }
.week-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); border: 1px solid var(--ink); }
.week-day.is-done .week-status i { background: var(--ink); }
.week-day .stamp {
  position: absolute; right: 9px; top: 12px; width: 28px; height: 28px; border: 1.5px solid var(--ink);
  border-radius: 50%; display: none; place-items: center; font: 900 9px/1 var(--display); transform: rotate(12deg);
}
.week-day.is-done .stamp { display: grid; background: var(--white); }

.archive-head { margin-bottom: 24px; }
.archive-tools { display: flex; align-items: center; gap: 22px; }
.legend { display: flex; align-items: center; gap: 12px; font-size: 9px; font-weight: 800; color: var(--ink-soft); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border: 1px solid var(--ink); border-radius: 50%; background: var(--white); }
.legend i.done-dot { background: var(--lime); }
.legend i.pending-dot { border-style: dashed; background: rgba(246,201,70,.5); }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav button { width: 29px; height: 29px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--white); cursor: pointer; font-weight: 900; }
.month-nav button:hover { background: var(--yellow); }
.month-nav b { min-width: 75px; text-align: center; font: 900 13px/1 var(--display); }
.coverage-banner {
  display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 10px 13px;
  border: 1.5px dashed var(--ink); border-radius: 12px; background: rgba(246,201,70,.22);
  font-size: 10px; font-weight: 800; line-height: 1.55;
}
.coverage-banner p { flex: 1; margin: 0; color: var(--ink-soft); }
.coverage-pulse {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 5px rgba(240,92,67,.12);
}
.coverage-badge {
  flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--ink); border-radius: 99px;
  background: var(--yellow); font-size: 8px; font-weight: 900; letter-spacing: .04em;
}
.coverage-banner.is-complete { background: rgba(201,244,93,.25); border-style: solid; }
.coverage-banner.is-complete .coverage-pulse { background: #36b36a; box-shadow: 0 0 0 5px rgba(54,179,106,.14); }
.coverage-banner.is-complete .coverage-badge { background: var(--lime); }
.archive-layout { display: grid; grid-template-columns: 1fr 210px; gap: 20px; }
.calendar-wrap { border: 1.5px solid var(--ink); border-radius: 17px; padding: 12px; background: var(--paper); }
.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); padding: 3px 0 9px; }
.weekday-row span { text-align: center; font-size: 9px; font-weight: 900; color: var(--ink-soft); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day {
  position: relative; min-height: 64px; padding: 8px; border: 1px solid rgba(18,36,59,.16); border-radius: 9px;
  background: rgba(255,253,247,.68); text-align: left; cursor: pointer; transition: .15s ease;
}
.cal-day:hover { border-color: var(--ink); background: var(--white); transform: translateY(-1px); }
.cal-day.is-empty { border: 0; background: transparent; cursor: default; }
.cal-day.is-available { border-color: var(--ink); }
.cal-day.is-done { background: var(--lime); border-color: var(--ink); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-day.is-selected { background: var(--ink); color: var(--white); border-color: var(--ink); }
.cal-day b { font: 900 15px/1 var(--display); }
.cal-day small { display: block; margin-top: 7px; font-size: 8px; font-weight: 800; opacity: .65; }
.cal-day .cal-check {
  position: absolute; right: 7px; top: 7px; width: 15px; height: 15px; border: 1px solid var(--ink);
  border-radius: 50%; background: var(--white); display: none; place-items: center; color: var(--ink); font-size: 9px; font-weight: 900;
}
.cal-day.is-done .cal-check { display: grid; }
.cal-day.is-selected .cal-check { background: var(--lime); }
.archive-side { display: flex; flex-direction: column; gap: 11px; }
.archive-stat { padding: 14px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--sky); }
.archive-stat p { margin: 0 0 4px; font-size: 9px; font-weight: 800; color: var(--ink-soft); }
.archive-stat b { display: block; font: 900 25px/1 var(--display); }
.archive-stat span { display: block; margin-top: 7px; font-size: 8px; font-weight: 700; color: var(--ink-soft); }
.progress-dial {
  position: relative; width: 123px; height: 123px; margin: 3px auto; border-radius: 50%;
  display: grid; place-items: center; background: conic-gradient(var(--coral) 0deg, var(--paper-deep) 0deg);
  transition: background .4s ease; border: 1.5px solid var(--ink);
}
.progress-dial::after { content: ""; position: absolute; inset: 10px; background: var(--white); border-radius: 50%; border: 1px solid var(--line); }
.progress-dial > div { position: relative; z-index: 1; text-align: center; }
.progress-dial b { display: block; font: 900 26px/1 var(--display); }
.progress-dial span { font-size: 8px; font-weight: 800; color: var(--ink-soft); }
.random-btn {
  margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 12px;
  border: 1.5px solid var(--ink); border-radius: 13px; background: var(--yellow); cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); text-align: left; transition: .18s ease;
}
.random-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.random-btn b { display: block; font: 900 12px/1.2 var(--display); }
.random-btn small { display: block; margin-top: 3px; font-size: 8px; opacity: .6; font-weight: 700; }
.random-btn i { font-style: normal; font-size: 21px; font-weight: 900; }

.daily-reminder {
  margin-top: 20px; padding: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  background: var(--yellow); box-shadow: 6px 6px 0 var(--ink);
}
.reminder-mark {
  width: 58px; height: 58px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--white); font: 900 33px/1 var(--display); transform: rotate(-7deg); box-shadow: 3px 3px 0 var(--ink);
}
.daily-reminder h2 { margin: 0 0 5px; font: 900 clamp(22px, 3vw, 30px)/1.1 var(--display); }
.daily-reminder p:not(.eyebrow) { max-width: 680px; margin: 0; font-size: 11px; font-weight: 700; line-height: 1.6; }
.reminder-stamp {
  padding: 10px 16px; border: 2px solid var(--ink); border-radius: 50%; text-align: center; background: var(--coral);
  color: var(--white); font-size: 10px; font-weight: 900; line-height: 1.45; transform: rotate(5deg); box-shadow: 3px 3px 0 var(--ink);
}
.reminder-stamp b { font: 900 17px/1 var(--display); }

footer {
  width: min(1220px, calc(100% - 40px)); margin: 44px auto 0; padding: 27px 0 38px;
  border-top: 2px solid var(--ink); display: flex; justify-content: space-between; gap: 30px; position: relative;
}
.footer-brand b { display: block; font: 900 17px/1 var(--display); }
.footer-brand span { display: block; margin-top: 6px; font-size: 10px; color: var(--ink-soft); }
.footer-meta { text-align: right; }
.footer-meta p { margin: 0 0 5px; max-width: 570px; font-size: 9px; line-height: 1.6; color: var(--ink-soft); }
.footer-plus { position: absolute; right: 0; bottom: 9px; opacity: .13; font: 900 46px/1 var(--display); letter-spacing: .15em; }

.modal {
  position: fixed; inset: 0; z-index: 100; padding: 24px; display: grid; place-items: center;
  background: rgba(18,36,59,.86); backdrop-filter: blur(8px);
}
.modal img { max-width: min(1200px, 96vw); max-height: 89vh; object-fit: contain; border: 3px solid var(--white); border-radius: 14px; background: white; }
.modal button {
  position: fixed; right: 25px; top: 20px; width: 43px; height: 43px; border: 2px solid var(--white); border-radius: 50%;
  color: var(--white); background: transparent; font-size: 26px; cursor: pointer;
}
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; padding: 12px 18px; border: 2px solid var(--ink);
  border-radius: 99px; background: var(--lime); box-shadow: 4px 4px 0 var(--ink); font-size: 12px; font-weight: 900;
  transform: translate(-50%, 80px); opacity: 0; transition: .25s ease; pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.confetti-layer { position: fixed; inset: 0; z-index: 110; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; width: 9px; height: 15px; border: 1px solid var(--ink); animation: confettiFall 1.5s cubic-bezier(.2,.7,.3,1) forwards; }

.reveal { animation: revealUp .68s cubic-bezier(.2,.7,.2,1) both; }
.quest-grid .energy-card { animation-delay: .08s; }
.week-section { animation-delay: .13s; }
.archive-section { animation-delay: .18s; }
.daily-reminder { animation-delay: .22s; }

@keyframes revealUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .45; box-shadow: 0 0 0 8px rgba(54,179,106,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes confettiFall { to { transform: translate(var(--drift), 110vh) rotate(var(--rot)); opacity: .1; } }

@media (max-width: 980px) {
  .intro { align-items: flex-start; flex-direction: column; gap: 30px; padding-top: 38px; }
  .intro::after { right: 8%; }
  .grade-wrap { width: 100%; }
  .grade-switch { max-width: 520px; }
  .quest-grid { grid-template-columns: 1fr; }
  .energy-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .energy-orbit { grid-row: span 3; height: 235px; }
  .level-row { align-self: end; margin-top: 20px; }
  .streak-block { margin: 10px 0; }
  .stat-strip { align-self: start; }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-side { display: grid; grid-template-columns: 1fr 123px 1fr; align-items: center; }
  .random-btn { margin: 0; }
}

@media (max-width: 700px) {
  .topbar, main, footer { width: min(100% - 24px, 1220px); }
  .topbar { padding-top: 14px; }
  .live-dot { display: none; }
  .brand b { font-size: 18px; }
  .intro { min-height: 0; padding: 34px 0 30px; gap: 25px; }
  .intro::after { font-size: 25px; top: 18px; }
  .intro h1 { font-size: clamp(40px, 11.5vw, 62px); }
  .grade-switch { width: 100%; }
  .grade-tab { padding: 10px; min-height: 69px; gap: 7px; }
  .grade-num { font-size: 18px; }
  .grade-tab b { font-size: 14px; }
  .grade-tab small { font-size: 8px; }
  .quest-card, .week-section, .archive-section { padding: 15px; border-radius: 20px; }
  .quest-card { box-shadow: 5px 5px 0 var(--ink); }
  .quest-ruler { display: none; }
  .quest-head, .quest-title-row { margin-left: 0; }
  .day-doodle b { font-size: 39px; }
  .day-doodle { min-width: 70px; }
  .quest-title-row { align-items: center; margin-top: 22px; }
  .source-link span { display: none; }
  .source-link { width: 34px; height: 34px; padding: 0; justify-content: center; }
  .question-frame { min-height: 220px; padding: 7px; box-shadow: inset 0 0 0 4px var(--sky); }
  .quest-actions { grid-template-columns: 1fr; }
  .complete-btn { min-height: 61px; }
  .answer-btn { min-height: 46px; justify-content: center; }
  .answer-panel { grid-template-columns: 1fr; }
  .energy-card { display: block; padding: 19px; box-shadow: 5px 5px 0 var(--coral); }
  .energy-orbit { height: 210px; }
  .level-row { margin-top: 0; }
  .streak-block { margin: 18px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-note { text-align: left; }
  .week-track { gap: 5px; }
  .week-day { min-height: 97px; padding: 8px; }
  .week-day b { font-size: 19px; }
  .week-day .week-status span { display: none; }
  .week-day .week-status { left: 8px; bottom: 8px; }
  .week-day .stamp { width: 22px; height: 22px; right: 5px; top: 6px; }
  .archive-head { gap: 18px; }
  .archive-tools { width: 100%; justify-content: space-between; }
  .legend { gap: 7px; }
  .coverage-banner { align-items: flex-start; flex-wrap: wrap; margin: 10px 0; }
  .coverage-banner p { flex-basis: calc(100% - 22px); }
  .coverage-badge { margin-left: 19px; }
  .archive-layout { gap: 14px; }
  .calendar-wrap { padding: 7px; border-radius: 13px; }
  .calendar-grid { gap: 3px; }
  .cal-day { min-height: 54px; padding: 6px; }
  .cal-day b { font-size: 12px; }
  .cal-day small { margin-top: 5px; font-size: 7px; }
  .cal-day .cal-check { width: 12px; height: 12px; right: 4px; top: 4px; font-size: 7px; }
  .archive-side { grid-template-columns: 1fr 100px; }
  .progress-dial { width: 94px; height: 94px; margin: 0; }
  .progress-dial::after { inset: 8px; }
  .progress-dial b { font-size: 20px; }
  .random-btn { grid-column: span 2; margin-top: 2px; }
  .daily-reminder { grid-template-columns: auto 1fr; padding: 18px; box-shadow: 4px 4px 0 var(--ink); }
  .reminder-mark { width: 44px; height: 44px; font-size: 27px; }
  .reminder-stamp { display: none; }
  footer { flex-direction: column; gap: 15px; margin-top: 32px; }
  .footer-meta { text-align: left; }
  .footer-plus { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

/* Runtime/loading states */
.week-day:disabled { cursor: default; opacity: .52; transform: none; box-shadow: none; }
.week-day:disabled:hover { transform: none; box-shadow: none; }
.cal-day.is-missing { color: rgba(18,36,59,.35); cursor: default; border-style: dashed; }
.cal-day.is-pending { color: var(--ink-soft); border-color: rgba(18,36,59,.26); background: rgba(246,201,70,.13); }
.cal-day.is-pending small { color: var(--coral-deep); opacity: 1; }
.week-day.is-pending { border-style: dashed; background: rgba(246,201,70,.2); }
.cal-day.is-missing:hover { transform: none; background: rgba(255,253,247,.68); border-color: rgba(18,36,59,.16); }
.month-nav button:disabled { opacity: .35; cursor: not-allowed; }
.month-nav button:disabled:hover { background: var(--white); }
.answer-chip.is-pending b { background: var(--yellow); }
.complete-btn:disabled { opacity: .5; cursor: not-allowed; }
.image-loader b { font: 900 17px/1.2 var(--display); color: var(--ink); }
.image-loader span { max-width: 250px; text-align: center; line-height: 1.6; }
