/* ============================================================
   Bloom — site styles · Phase 1 branded shell
   Sketchbook look, straight from the wireframes:
   paper background · white boxes with thin ink outlines ·
   handwritten lettering (Caveat headings, Patrick Hand body) ·
   muted green for ticks & dots · no shadows, no gradients
   ============================================================ */

/* ---------- Self-hosted fonts (no CDN — school filters) ---------- */
@font-face {
  font-family: 'Patrick Hand';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/patrick-hand-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/caveat-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/caveat-latin-700-normal.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f0eee9;
  --ink:   #2b2b2b;
  --ink-soft: #8a877f;
  --green: #7aa86b;
  --green-soft: rgba(122, 168, 107, 0.16);
  --beige: #efe9db;
  --card:  #ffffff;
  --line:  2px solid var(--ink);
  --radius: 8px;
  --hand: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
  --body: 'Patrick Hand', 'Segoe Print', 'Comic Sans MS', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.45;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }

/* ---------- Top navigation ---------- */
.nav {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 22px;
  background: var(--paper);
  border-bottom: var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav .brand {
  font-family: var(--hand);
  font-weight: 700; font-size: 34px; line-height: 1;
  margin-right: 22px; color: var(--ink);
}
.nav .tab {
  padding: 6px 14px;
  font-size: 19px; color: var(--ink-soft);
  border-bottom: 3px solid transparent;
}
.nav .tab:hover { color: var(--ink); }
.nav .tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.nav .spacer { margin-left: auto; }

.flower-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--beige);
  border: var(--line);
  border-radius: 999px; padding: 3px 15px;
  font-size: 18px;
}

/* ---------- Page scaffold ---------- */
.page { max-width: 1000px; margin: 0 auto; padding: 30px 20px 60px; }
.page-title {
  font-family: var(--hand);
  font-size: 44px; font-weight: 700; line-height: 1.05; margin-bottom: 4px;
}
.page-sub { color: var(--ink-soft); font-size: 18px; margin-bottom: 26px; }

.card {
  background: var(--card);
  border: var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.kicker {
  font-size: 14px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 6px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--beige);
  border: var(--line);
  border-radius: 999px;
  padding: 8px 22px; font-size: 18px;
  transition: transform 0.1s;
}
.btn:hover { background: #e6ddc8; }
.btn:active { transform: scale(0.97); }

.note { color: var(--ink-soft); font-size: 16px; }

/* ---------- Home ---------- */
.home-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1.6fr 1fr;
  align-items: start;
}
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } }

.hero-card { padding: 26px 28px; }
.hero-card .week-title {
  font-family: var(--hand);
  font-size: 52px; font-weight: 700; line-height: 1; margin: 4px 0 8px;
}
.watched-tag { color: var(--green); font-size: 19px; }
.watch-cta { font-size: 22px; padding: 12px 30px; margin-top: 14px; }

.tick-btn {
  width: 100%; margin-top: 14px;
  font-size: 24px; padding: 12px;
  background: var(--card);
  border: var(--line); border-radius: var(--radius);
}
.tick-btn:hover { background: var(--beige); }
.tick-btn.done { background: var(--green-soft); color: var(--green); }

.dots { display: flex; gap: 10px; margin-top: 18px; }
.dot  { flex: 1; text-align: center; }
.dot .bubble {
  width: 36px; height: 36px; margin: 0 auto 4px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: transparent; background: var(--card);
}
.dot.on .bubble { background: var(--green); border-color: var(--green); color: #fff; }
.dot .lbl { font-size: 14px; color: var(--ink-soft); }

.pot-card { text-align: center; padding: 26px 22px; }
.pot-card .pot-flower { font-size: 44px; line-height: 1; }
.pot-card .pot-num {
  font-family: var(--hand);
  font-size: 58px; font-weight: 700; line-height: 1.1;
}

/* ---------- Adventures ---------- */
.adv-list { display: flex; flex-direction: column; gap: 12px; }
.adv-row {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 20px;
  position: relative;
}
.adv-row .wk {
  flex: 0 0 56px; height: 56px; border-radius: var(--radius);
  background: var(--beige); border: var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1;
}
.adv-row .wk small { font-size: 11px; letter-spacing: 1px; }
.adv-row .wk big   { font-size: 24px; }
.adv-row .adv-name { font-family: var(--hand); font-size: 30px; font-weight: 600; line-height: 1.1; }
.adv-row .adv-meta { display: flex; gap: 6px; margin-top: 5px; }
.adv-row .mini-dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--card);
}
.adv-row .mini-dot.on { background: var(--green); border-color: var(--green); }
.adv-row .adv-tick { margin-left: auto; }
.adv-tick .tick-circle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 20px;
}
.adv-row.watched .tick-circle { background: var(--green); border-color: var(--green); color: #fff; }
.here-tag {
  font-family: var(--hand);
  position: absolute; right: 74px; top: 50%; transform: translateY(-50%);
  color: var(--ink); font-size: 24px; font-weight: 600;
  white-space: nowrap;
}
.adv-row.future { opacity: 0.5; }
@media (max-width: 640px) { .here-tag { display: none; } }

/* ---------- Lesson ---------- */
.back-link { display: inline-block; font-size: 18px; color: var(--ink-soft); margin-bottom: 12px; }
.back-link:hover { color: var(--ink); }
.video-frame {
  background: var(--card); border: var(--line); border-radius: var(--radius);
  aspect-ratio: 16 / 9; width: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 22px;
  overflow: hidden;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.lesson-note { color: var(--ink-soft); font-size: 16px; margin-top: 10px; }

/* ---------- SOS ---------- */
.sos-group { margin-bottom: 36px; }
.sos-group h2 {
  font-family: var(--hand);
  font-size: 36px; font-weight: 700; margin-bottom: 14px;
}
.tile-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.game-tile {
  border: var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden;
  display: block;
}
.game-tile:hover { background: var(--beige); }
.game-tile .art {
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  border-bottom: var(--line);
}
.game-tile .art svg { width: 42%; height: auto; }
.game-tile .name { padding: 10px 14px; font-size: 20px; text-align: center; }
.game-tile.soon { opacity: 0.5; pointer-events: none; }
.game-tile.soon .name::after { content: " · soon"; color: var(--ink-soft); font-size: 15px; }

/* ---------- Pupil mode ---------- */
body.pupil .teacher-only { display: none !important; }
.kit-btn {
  display: none;
  align-items: center; gap: 8px;
  background: var(--beige); border: var(--line);
  border-radius: 999px; padding: 5px 16px;
  font-size: 17px;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
body.pupil .kit-btn { display: inline-flex; }
.hold-ring { font-size: 13px; color: var(--ink-soft); }

/* ---------- Help ---------- */
.help-list { display: flex; flex-direction: column; gap: 10px; max-width: 700px; }
.help-item { padding: 0; overflow: hidden; }
.help-item summary {
  list-style: none; cursor: pointer;
  padding: 14px 20px; font-size: 21px;
  display: flex; align-items: center;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "▸"; margin-left: auto; color: var(--ink-soft); transition: transform 0.15s; }
.help-item[open] summary::after { transform: rotate(90deg); }
.help-item .answer { padding: 0 20px 16px; color: var(--ink-soft); font-size: 18px; }

/* ---------- Term plan (print) ---------- */
.plan-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.plan-table th, .plan-table td {
  text-align: left; padding: 9px 12px;
  border-bottom: 1px solid rgba(43, 43, 43, 0.25); font-size: 18px;
}
.plan-table th { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); }
@media print {
  .nav, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border-color: #999; }
}

/* ---------- Footer ---------- */
.footer {
  font-family: var(--hand);
  text-align: center; color: var(--ink-soft);
  font-size: 22px; padding: 30px 0 40px;
}
