/* ============================================================
   styles.css — Daily Science Grade 1, vintage storybook look.
   Warm cream paper, brown ink outlines, tactile buttons, big targets.
   Target >= 900px (tablet landscape + PC); fills the viewport.
   ============================================================ */
:root {
  --paper:   #F4E9D8;
  --paper2:  #FCF6EA;   /* card paper */
  --ink:     #4A3B2A;   /* warm brown ink */
  --ink-soft:#7C6A53;
  --accent:  #3E8E7E;   /* unit color (set by JS) */
  --mustard: #E0A458;
  --coral:   #D96C4A;
  --good:    #3E8E7E;
  --bad:     #C9583E;
  --line:    3px solid var(--ink);
  --r-lg: 26px;
  --r-md: 18px;
  --shadow: 0 6px 0 rgba(74,59,42,.18), 0 12px 24px rgba(74,59,42,.16);
  --font-display: "Georgia", "Iowan Old Style", "Palatino Linotype", "Palatino", serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  /* paper grain: faint dot grid + soft vignette */
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(rgba(74,59,42,.05) 1px, transparent 1.4px),
    radial-gradient(rgba(74,59,42,.04) 1px, transparent 1.4px);
  background-size: 100% 100%, 14px 14px, 14px 14px;
  background-position: 0 0, 0 0, 7px 7px;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.icon { width: 100%; height: 100%; display: block; }

#app { height: 100%; display: flex; flex-direction: column; }

/* ---------- VoVo brand (shared identity with Grade K) ---------- */
.brand-mark {
  flex: 0 0 auto; user-select: none; line-height: 0;
  text-decoration: none; border-radius: 8px;
  transition: opacity .15s, transform .15s;
}
.brand-mark:hover { opacity: .75; transform: scale(.96); }
.brand-mini-img { height: 40px; width: auto; display: block; object-fit: contain; }
.home-vovo-logo {
  display: block; height: 90px; width: auto; margin: 0 auto 10px;
  filter: drop-shadow(0 4px 12px rgba(74,59,42,.15));
}

/* ---------- top bar ---------- */
.topbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; background: var(--paper2);
  border-bottom: var(--line);
  box-shadow: 0 4px 0 rgba(74,59,42,.10);
  z-index: 5;
}
.bar-title {
  flex: 1; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px, 2.6vw, 30px); color: var(--ink);
}
.icon-btn {
  width: 56px; height: 56px; flex: 0 0 auto; padding: 9px;
  background: var(--paper); border: var(--line); border-radius: 50%;
  box-shadow: 0 4px 0 rgba(74,59,42,.18); transition: transform .08s, box-shadow .08s;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(74,59,42,.18); }
.icon-btn.muted { opacity: .45; }
.star-count {
  display: flex; align-items: center; gap: 6px; padding: 6px 16px 6px 10px;
  background: var(--paper); border: var(--line); border-radius: 30px;
  box-shadow: 0 4px 0 rgba(74,59,42,.14);
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
}
.star-count .icon { width: 30px; height: 30px; }

/* ---------- screen ---------- */
.screen {
  flex: 1 1 auto; overflow: auto; position: relative;
  padding: 26px clamp(20px, 5vw, 70px); display: flex; flex-direction: column;
}
body.sound-start-visible .screen {
  padding-bottom: 104px;
}

/* ---------- big tactile button ---------- */
.big-btn {
  display: inline-flex; align-items: center; gap: 12px; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px); color: #fff;
  background: var(--accent); padding: 16px 34px; border-radius: 40px;
  border: var(--line);
  box-shadow: 0 7px 0 rgba(74,59,42,.55), 0 12px 22px rgba(74,59,42,.25);
  transition: transform .08s, box-shadow .08s;
}
.big-btn .icon { width: 34px; height: 34px; }
.big-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(74,59,42,.55); }
.big-btn.ghost { background: var(--paper2); color: var(--ink); }
.big-btn.pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---------- first sound gesture ---------- */
.sound-start {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  transform: translateX(-50%);
  min-width: min(320px, calc(100vw - 36px));
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: var(--line);
  border-radius: 999px;
  box-shadow: 0 7px 0 rgba(74,59,42,.55), 0 14px 28px rgba(74,59,42,.25);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, opacity .18s;
}
.sound-start[hidden] { display: none; }
.sound-start:active { transform: translateX(-50%) translateY(5px); box-shadow: 0 2px 0 rgba(74,59,42,.55), 0 8px 18px rgba(74,59,42,.20); }
.sound-start-icon { width: 34px; height: 34px; flex: 0 0 auto; }
.sound-start-icon .icon { width: 100%; height: 100%; }
.sound-start-text { line-height: 1; }

/* ---------- HOME (unit picker) ---------- */
.screen-home { align-items: center; }
.home { text-align: center; max-width: 1000px; width: 100%; margin: auto; }
.home-badge {
  display: inline-block; background: var(--mustard); color: var(--ink); font-weight: 700;
  padding: 6px 18px; border-radius: 20px; border: var(--line); transform: rotate(-2deg); font-size: 16px;
}
.home-mascot { width: 96px; height: 96px; margin: 8px auto 0; }
.home-title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); margin: 6px 0 22px; }
.home-grid { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.unit-card {
  width: 220px; background: var(--paper2); border: var(--line); border-radius: var(--r-lg);
  padding: 18px 14px 20px; box-shadow: var(--shadow); position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .1s, box-shadow .1s; border-top: 8px solid var(--accent);
}
.unit-card:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(74,59,42,.18); }
.unit-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  padding: 3px 14px; border-radius: 14px; border: 2.5px solid var(--ink); white-space: nowrap;
}
.unit-art { width: 92px; height: 92px; margin-top: 6px; }
.unit-q { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.15; }

/* ---------- TRUEFALSE (yes / no) ---------- */
.tf-card { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.tf-arts { display: flex; gap: 24px; align-items: center; }
.tf-art { width: clamp(96px, 13vw, 150px); height: clamp(96px, 13vw, 150px); }
.tf-art .hero { width: 100%; height: 100%; }
.tf-sentence {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 36px);
  color: var(--ink); background: var(--paper2); border: var(--line); border-radius: var(--r-md);
  padding: 12px 28px; box-shadow: 0 5px 0 rgba(74,59,42,.14); max-width: 760px; text-align: center;
}
.tf-btns { display: flex; gap: 28px; justify-content: center; padding: 16px 0 8px; }
.tf-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 24px; color: #fff;
  width: 150px; padding: 14px; border-radius: 22px; border: var(--line);
  box-shadow: 0 7px 0 rgba(74,59,42,.5); transition: transform .08s, box-shadow .08s;
}
.tf-btn .icon { width: 46px; height: 46px; }
.tf-btn.yes { background: var(--good); }
.tf-btn.no  { background: var(--coral); }
.tf-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(74,59,42,.5); }
.tf-btn.good { animation: starpop .4s ease; }
.tf-btn.bad  { opacity: .6; }

/* ---------- COVER ---------- */
.screen-cover { align-items: center; justify-content: center; }
.cover {
  text-align: center; max-width: 760px;
  background: var(--paper2); border: var(--line); border-radius: var(--r-lg);
  padding: 30px 50px 40px; box-shadow: var(--shadow);
}
.cover-badge {
  display: inline-block; background: var(--mustard); color: var(--ink);
  font-weight: 700; padding: 6px 18px; border-radius: 20px; border: var(--line);
  font-size: 17px; letter-spacing: .3px; transform: rotate(-2deg);
}
.cover-vovo-logo { display: block; height: 50px; width: auto; margin: 0 auto 14px; opacity: .85; }
.cover-mascot { width: 150px; height: 150px; margin: 12px auto 4px; }
.cover-q {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 54px);
  margin: 6px 0 6px; color: var(--ink); line-height: 1.05;
}
.cover-sub { font-size: 20px; color: var(--ink-soft); margin: 0 0 26px; }

/* ---------- READING ---------- */
.read-title {
  font-family: var(--font-display); text-align: center;
  font-size: clamp(30px, 4vw, 46px); margin: 4px 0 18px;
}
.book {
  flex: 1 1 auto; max-width: 880px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.book-line {
  display: flex; align-items: center; gap: 20px;
  background: var(--paper2); border: var(--line); border-radius: var(--r-md);
  padding: 12px 20px; box-shadow: 0 4px 0 rgba(74,59,42,.12);
}
.book-line:nth-child(even) { transform: rotate(.5deg); }
.book-line:nth-child(odd)  { transform: rotate(-.5deg); }
.line-art {
  width: 70px; height: 70px; flex: 0 0 auto; padding: 6px;
  background: var(--paper); border: var(--line); border-radius: 16px;
}
.line-text {
  margin: 0; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.35; font-weight: 600;
}
.word { padding: 1px 2px; border-radius: 7px; transition: background .12s, color .12s; }
.word:hover { background: rgba(224,164,88,.3); }
.word.hi { background: var(--mustard); color: var(--ink); box-shadow: 0 0 0 2px var(--mustard); }

.read-controls {
  flex: 0 0 auto; display: flex; gap: 18px; justify-content: center;
  padding: 22px 0 8px; flex-wrap: wrap;
}
.read-aloud { background: var(--mustard); color: var(--ink); }
.read-aloud.reading-now { animation: pulse 1s ease-in-out infinite; }
.play-btn { background: var(--coral); }

/* ---------- GAME screen ---------- */
.game-screen { flex: 1 1 auto; display: flex; flex-direction: column; }
.game-progress { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.game-progress .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--paper2); border: 2.5px solid var(--ink);
}
.game-progress .dot.on  { background: var(--accent); }
.game-progress .dot.cur { background: var(--mustard); transform: scale(1.3); }
.stage { flex: 1 1 auto; display: flex; flex-direction: column; }

.game-head { text-align: center; margin-bottom: 14px; }
.game-title { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 38px); margin: 0; }
.game-prompt {
  font-size: clamp(18px, 2.2vw, 24px); color: var(--ink-soft); margin: 4px 0 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.mini-replay {
  width: 40px; height: 40px; padding: 6px; background: var(--paper2);
  border: 2.5px solid var(--ink); border-radius: 50%;
  box-shadow: 0 3px 0 rgba(74,59,42,.16);
}
.mini-replay:active { transform: translateY(2px); }

/* ---------- TILE (shared) ---------- */
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--paper2); border: var(--line); border-radius: var(--r-md);
  padding: 12px; box-shadow: 0 5px 0 rgba(74,59,42,.16);
  transition: transform .1s, box-shadow .1s; position: relative;
}
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(74,59,42,.16); }
.tile-art { width: clamp(70px, 9vw, 104px); height: clamp(70px, 9vw, 104px); }
.tile-art .icon { width: 100%; height: 100%; }
.tile-cap { font-weight: 700; font-size: 19px; color: var(--ink); }
.tile.picked { transform: translateY(-4px) scale(1.04); box-shadow: 0 9px 0 var(--accent); }
.tile.placed, .tile.locked { opacity: .4; pointer-events: none; }
.tile .badge {
  position: absolute; top: -10px; right: -10px; width: 34px; height: 34px;
  background: var(--paper2); border: 2.5px solid var(--ink); border-radius: 50%; padding: 4px;
}
.tile.good { box-shadow: 0 5px 0 var(--good); }
.tile.bad  { box-shadow: 0 5px 0 var(--bad); opacity: .55; pointer-events: none; }

/* ---------- SORT ---------- */
.sort-bins { display: flex; gap: 26px; justify-content: center; margin-bottom: 18px; }
.basket {
  flex: 1 1 0; max-width: 320px; min-height: 180px;
  background: color-mix(in srgb, var(--accent) 14%, var(--paper2));
  border: var(--line); border-radius: var(--r-lg);
  padding: 14px; text-align: center; box-shadow: var(--shadow);
  transition: transform .1s;
}
.basket:active { transform: scale(.98); }
.basket-art { width: 64px; height: 64px; margin: 0 auto; }
.basket-label { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 2px; }
.basket-catch { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.basket-catch .caught { width: 44px; height: 44px; animation: pop .35s ease; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.25); } to { transform: scale(1); } }
.tray {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  padding: 18px; background: rgba(74,59,42,.05); border-radius: var(--r-lg); border: 2.5px dashed var(--ink-soft);
}

/* ---------- MATCH ---------- */
.match-board { display: flex; gap: clamp(30px, 12vw, 150px); justify-content: center; flex: 1 1 auto; align-items: center; }
.match-col { display: flex; flex-direction: column; gap: 16px; }
.match-tile { min-width: 150px; }

/* ---------- NEEDS ---------- */
.needs-hero { width: 150px; height: 150px; margin: 0 auto 8px; }
.needs-hero .hero { width: 100%; height: 100%; }
.needs-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 10px; }

/* ---------- READWORD ---------- */
.read-card { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.read-art { width: clamp(130px, 18vw, 200px); height: clamp(130px, 18vw, 200px); }
.read-art .hero { width: 100%; height: 100%; }
.read-opts { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.word-btn {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3vw, 34px);
  color: var(--ink); background: var(--paper2); border: var(--line);
  border-radius: 18px; padding: 14px 30px; box-shadow: 0 6px 0 rgba(74,59,42,.18);
  transition: transform .1s, box-shadow .1s;
}
.word-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(74,59,42,.18); }
.word-btn.good { background: var(--good); color: #fff; }
.word-btn.bad  { background: var(--bad); color: #fff; opacity: .6; }
.read-count { font-size: 18px; color: var(--ink-soft); font-weight: 700; }

/* ---------- CLOZE (fill the blank) ---------- */
.cloze-card { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.cloze-art { width: clamp(110px, 15vw, 160px); height: clamp(110px, 15vw, 160px); }
.cloze-art .hero { width: 100%; height: 100%; }
.cloze-sentence {
  font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 38px); font-weight: 700;
  color: var(--ink); text-align: center; line-height: 1.5; max-width: 880px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px;
}
.cloze-slot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 130px; padding: 2px 14px; margin: 0 6px;
  border-bottom: 5px dashed var(--mustard); color: var(--mustard);
}
.cloze-slot.filled {
  border-bottom: 5px solid var(--ink); background: var(--good); color: #fff;
  border-radius: 12px; padding: 4px 18px; animation: pop .35s ease;
}
.cloze-bank { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding: 18px 0 8px; }
.bank-word {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.8vw, 32px);
  color: var(--ink); background: var(--paper2); border: var(--line); border-radius: 18px;
  padding: 12px 28px; box-shadow: 0 6px 0 rgba(74,59,42,.18); transition: transform .1s, box-shadow .1s;
}
.bank-word:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(74,59,42,.18); }
.bank-word.used { background: var(--good); color: #fff; opacity: .5; box-shadow: 0 2px 0 rgba(74,59,42,.18); }
.bank-word.drag-src { opacity: .35; }
.drag-ghost {
  position: fixed; z-index: 100; pointer-events: none; margin: 0;
  transform: translate(-50%, -50%) rotate(-3deg) scale(1.08);
  box-shadow: 0 10px 22px rgba(74,59,42,.4) !important;
}
.cloze-slot.drop-hover {
  background: var(--mustard); color: var(--ink);
  border-radius: 12px; border-bottom-style: solid; transform: scale(1.08);
}

/* ---------- sparks + star burst ---------- */
.spark { position: fixed; width: 30px; height: 30px; pointer-events: none; z-index: 50;
  animation: fly .9s ease-out forwards; }
@keyframes fly {
  from { transform: translate(0,0) scale(.4) rotate(0); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) scale(1) rotate(140deg); opacity: 0; }
}
.star-burst {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 18px;
  background: rgba(244,233,216,.82); z-index: 40;
}
.star-burst .icon { width: clamp(70px, 11vw, 120px); height: clamp(70px, 11vw, 120px); animation: starpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.star-burst .lost { opacity: .25; filter: grayscale(1); }
@keyframes starpop { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }

/* ---------- REWARD ---------- */
.screen-reward { align-items: center; justify-content: center; }
.reward {
  text-align: center; background: var(--paper2); border: var(--line); border-radius: var(--r-lg);
  padding: 26px 50px 38px; box-shadow: var(--shadow); max-width: 760px;
}
.reward-mascot { width: 130px; height: 130px; margin: 0 auto; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.reward h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 50px); margin: 4px 0 14px; }
.reward-stars { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.reward-stars .icon { width: 46px; height: 46px; animation: starpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.reward-stars .lost { opacity: .22; filter: grayscale(1); }
.reward-score { font-size: 22px; font-weight: 700; color: var(--ink-soft); margin: 4px 0 22px; }
.reward-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- shake (wrong answer) ---------- */
.shake { animation: shake .4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); }
}

/* ---------- BIG IDEA picker ---------- */
.bi-head { display: flex; align-items: center; gap: 14px; justify-content: center; margin-bottom: 2px; }
.unit-card.bi-card .unit-q { font-size: 18px; }
.unit-card.soon { opacity: .5; filter: grayscale(.35); }

/* ---------- SORT: allow a third bin to fit ---------- */
.sort-bins { flex-wrap: wrap; }
.basket { max-width: 300px; }

/* ---------- SEQUENCE (put pictures in order) ---------- */
.seq-track {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px; margin: 6px 0 18px;
}
.seq-slot {
  width: clamp(80px, 12vw, 122px); min-height: clamp(92px, 13vw, 132px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(74,59,42,.05); border: 2.5px dashed var(--ink-soft); border-radius: var(--r-md);
}
.seq-slot.filled { background: var(--paper2); border: var(--line); box-shadow: 0 4px 0 var(--good); animation: pop .35s ease; }
.seq-slot .icon { width: clamp(48px, 7vw, 72px); height: clamp(48px, 7vw, 72px); }
.seq-num { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink-soft); }
.seq-cap { font-weight: 700; font-size: 15px; }
.seq-arrow { font-size: 26px; color: var(--ink-soft); font-weight: 700; }
.seq-tray {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  padding: 18px; background: rgba(74,59,42,.05); border-radius: var(--r-lg); border: 2.5px dashed var(--ink-soft);
}

/* ---------- THERMOMETER ---------- */
.therm-wrap { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: clamp(20px,5vw,60px); flex-wrap: wrap; }
.therm-task { text-align: center; max-width: 260px; }
.therm-prompt { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px,3vw,30px); margin-bottom: 8px; }
.therm-col { display: flex; flex-direction: column; align-items: center; }
.therm-tube {
  position: relative; width: 46px; height: clamp(220px, 40vh, 330px);
  background: var(--paper2); border: var(--line); border-radius: 30px; overflow: hidden;
  cursor: ns-resize; touch-action: none;
}
.therm-fill { position: absolute; bottom: 0; left: 0; right: 0; background: var(--coral); transition: height .08s; }
.therm-line { position: absolute; left: 0; right: 0; height: 0; border-top: 3px dashed #5AA5B8; }
.therm-line .icon { position: absolute; right: 1px; top: -14px; width: 26px; height: 26px; }
.therm-bulb { width: 64px; height: 64px; border-radius: 50%; background: var(--coral); border: var(--line); margin-top: -14px; }
.therm-read { text-align: center; }
.therm-read .hero { width: clamp(80px,12vw,120px); height: clamp(80px,12vw,120px); }
.therm-state { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.therm-read.is-frozen .therm-state { color: #5AA5B8; }

/* ---------- COMPARE (which force goes farther) ---------- */
.cmp-arena { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.cmp-lane { background: var(--paper2); border: var(--line); border-radius: var(--r-md); padding: 10px 16px; box-shadow: 0 4px 0 rgba(74,59,42,.12); cursor: pointer; transition: box-shadow .1s; }
.cmp-label { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.cmp-track { position: relative; height: clamp(58px,9vw,82px); background: rgba(74,59,42,.05); border-radius: 14px; overflow: hidden; }
.cmp-obj { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); transition: transform 1.1s cubic-bezier(.18,.7,.3,1); }
.cmp-obj .hero { width: clamp(48px,7vw,68px); height: clamp(48px,7vw,68px); display: block; }
.cmp-lane.pick { box-shadow: 0 6px 0 var(--good); }
.cmp-go { align-self: center; margin-top: 4px; }

/* ---------- PATHDRAW (steer the car) ---------- */
.pg-board { flex: 0 0 auto; display: grid; gap: 6px; max-width: 540px; margin: 0 auto 16px; width: 100%; }
.pg-cell { aspect-ratio: 1 / 1; background: var(--paper2); border: 2.5px solid var(--ink-soft); border-radius: 12px; position: relative; display: flex; align-items: center; justify-content: center; }
.pg-cell .icon { width: 66%; height: 66%; }
.pg-cell.obst { background: color-mix(in srgb, var(--bad) 16%, var(--paper2)); }
.pg-cell.goal { background: color-mix(in srgb, var(--good) 16%, var(--paper2)); }
.pg-car { position: absolute; inset: 7%; }
.pg-car .hero { width: 100%; height: 100%; }
.pg-pad { display: grid; grid-template-columns: repeat(3, 62px); grid-template-rows: repeat(2, 62px); gap: 8px; justify-content: center; }
.pg-btn { font-size: 30px; font-weight: 700; background: var(--paper2); border: var(--line); border-radius: 16px; box-shadow: 0 4px 0 rgba(74,59,42,.2); color: var(--ink); }
.pg-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(74,59,42,.2); }
.pg-up { grid-column: 2; grid-row: 1; }
.pg-left { grid-column: 1; grid-row: 2; }
.pg-down { grid-column: 2; grid-row: 2; }
.pg-right { grid-column: 3; grid-row: 2; }

/* ---------- GRAVITYPATH (where will it land) ---------- */
.gp-scene { position: relative; flex: 1 1 auto; min-height: clamp(200px, 38vh, 340px); border-bottom: var(--line); }
.gp-obj { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); transition: transform 1s cubic-bezier(.4,.1,.7,1); z-index: 2; }
.gp-obj .hero { width: clamp(50px,7vw,72px); height: clamp(50px,7vw,72px); display: block; }
.gp-path { position: absolute; inset: 0; opacity: .55; pointer-events: none; }
.gp-path .icon { position: absolute; }
.gp-path.gp-slide .icon { left: 28%; top: 16%; width: 52%; height: 66%; }
.gp-path.gp-swing .icon { left: 30%; top: 4%; width: 40%; height: 74%; }
.gp-spots { display: flex; justify-content: space-around; padding: 14px 10px; gap: 10px; }
.gp-spot { width: clamp(62px,10vw,90px); height: clamp(62px,10vw,90px); background: var(--paper2); border: var(--line); border-radius: 50%; box-shadow: 0 4px 0 rgba(74,59,42,.16); padding: 10px; }
.gp-spot:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(74,59,42,.16); }
.gp-spot.landed { box-shadow: 0 4px 0 var(--good); background: color-mix(in srgb, var(--good) 18%, var(--paper2)); }
.gp-spot.wrong { box-shadow: 0 4px 0 var(--bad); opacity: .6; }

/* ---------- HANDSON (try it at home) ---------- */
.handson { flex: 1 1 auto; max-width: 780px; margin: 0 auto; text-align: center; background: var(--paper2); border: var(--line); border-radius: var(--r-lg); padding: 20px 30px 28px; box-shadow: var(--shadow); }
.handson-art { width: clamp(86px,13vw,124px); height: clamp(86px,13vw,124px); margin: 0 auto; }
.handson-title { font-family: var(--font-display); font-size: clamp(26px,3.4vw,36px); margin: 4px 0 8px; }
.handson-sub { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); margin: 14px 0 8px; }
.handson-mats { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.handson-mat { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; width: 88px; }
.handson-mat-art { width: 54px; height: 54px; }
.handson-steps { text-align: left; max-width: 560px; margin: 4px auto 18px; font-size: clamp(17px,2.2vw,21px); line-height: 1.5; }
.handson-steps li { margin: 6px 0; }

@media (max-width: 760px) {
  .sort-bins { flex-direction: column; align-items: center; }
  .match-board { gap: 40px; }
  .therm-wrap { gap: 18px; }
}
