/* The game's one stylesheet (whole-app review 2026-11-20, U1): Part 1 is the old app.css, word for word and in the same
   order, so every rule wins or loses exactly as when the two files loaded one after the other; Part 2, the design
   system (duo.css), comes after it and wins. Rules in Part 1 that Part 2 always overrides can be removed later, one
   group at a time, each with before-and-after screenshots. Edit Part 2 for anything new. */

/* ======================================================================================================================
   Part 1: the older styles (was css/app.css until Version 2026.18)
   ====================================================================================================================== */
/* =========================================================================
   KAIROS MATH ADVENTURES — styles
   Palette: meadow leaf, forest ink, sky, sunshine, bark, petal.
   Touch-first for iPad: 60px+ targets, no zoom, safe areas respected.
   ========================================================================= */
:root {
  --leaf: #5DBB46; --leaf-d: #2F7D3A; --leaf-l: #DDF3D2;
  --ink: #1F3B2A; --ink-2: #4A6152; --muted: #6B7F70;
  --sky: #8ED1F2; --sky-d: #2F7DB8; --sky-l: #E3F5FF;
  --sun: #FFD23F; --sun-d: #D9A400; --sun-l: #FFF4C7;
  --bark: #9A6334; --bark-d: #6E4422; --bark-l: #F3E2CC;
  --petal: #FF8FA3; --petal-d: #C2415E;
  --card: #FFFFFF; --line: #E3EEDF;
  --r-lg: 26px; --r-md: 18px; --r-sm: 12px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top: calc(64px + env(safe-area-inset-top, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--ink); font-size: 19px; line-height: 1.45;
  background: linear-gradient(180deg, #D7F0FF 0%, #EAF8FF 38%, #F1FAE8 100%) fixed;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation; overscroll-behavior: none;
  padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
input, select, textarea { -webkit-user-select: text; user-select: text; font: inherit; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid var(--sky-d); outline-offset: 3px; }
svg.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.15rem; max-width: 34em; margin: .4em auto; text-align: center; }
.msg { min-height: 1.5em; color: var(--petal-d); font-weight: 700; text-align: center; margin: .4em 0; }
.h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: .2em 0; font-weight: 900; letter-spacing: -.01em; line-height: 1.15; }
.h3 { font-size: 1.35rem; font-weight: 800; margin: .3em 0 .6em; display: block; }

/* ---------- top bar ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; min-height: var(--top);
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--leaf-l);
}
.brand { display: flex; align-items: center; gap: 6px; min-width: 0; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; background: var(--leaf-l); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 13px; min-height: 44px; border-radius: 999px; font-weight: 800; font-size: .92rem; color: var(--leaf-d); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(47, 125, 58, .25); }
.seg.big button { padding: 12px 20px; min-height: 56px; font-size: 1.05rem; }
.icon-btn { border: 0; background: #fff; width: 52px; height: 52px; border-radius: 16px; display: inline-grid; place-items: center; color: var(--ink); box-shadow: 0 3px 0 var(--line), 0 0 0 2px var(--line) inset; flex: none; }
.icon-btn svg.ico { width: 26px; height: 26px; }
.icon-btn.off { color: #B5C2B9; }
.icon-btn.on { background: var(--sun-l); box-shadow: 0 3px 0 var(--sun-d), 0 0 0 2px var(--sun) inset; }
.icon-btn:active { transform: translateY(2px); }

/* ---------- buttons ---------- */
.btn {
  --b: #fff; --s: var(--line); --c: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 12px 26px; border: 0; border-radius: var(--r-md);
  background: var(--b); color: var(--c); font-weight: 900; font-size: 1.1rem;
  box-shadow: 0 6px 0 var(--s); transition: transform .08s ease, box-shadow .08s ease;
  position: relative; margin-bottom: 6px;
}
.btn:active:not([disabled]) { transform: translateY(5px); box-shadow: 0 1px 0 var(--s); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.leaf { --b: var(--leaf); --s: var(--leaf-d); --c: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.btn.wood { --b: linear-gradient(180deg, #C08A55, #A56E3D); --s: var(--bark-d); --c: #FFF7EA; background: var(--b); }
.btn.ghost { --b: transparent; --s: transparent; box-shadow: none; color: var(--leaf-d); padding: 10px 14px; }
.btn.danger { --b: #E0475F; --s: #9E2338; --c: #fff; }
.btn.big { min-height: 72px; font-size: 1.3rem; padding: 14px 36px; border-radius: 22px; }
.btn.small { min-height: 50px; padding: 8px 16px; font-size: .98rem; }
.btn .budgie { margin: -10px 0; }
.btn svg.ico { width: 1.3em; height: 1.3em; }
@media (hover: hover) { .btn:hover:not([disabled]) { filter: brightness(1.04); } }

/* ---------- generic layouts ---------- */
.screen-wrap { flex: 1; display: flex; flex-direction: column; }
.page { width: min(1100px, 100%); margin: 0 auto; padding: 18px 20px 40px; }
.page.narrow { width: min(760px, 100%); }
.page-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-head .h2 { text-align: center; }
.center-col { width: min(720px, 100%); margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.trio { display: flex; align-items: flex-end; justify-content: center; gap: 4px; flex-wrap: wrap; }
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: 0 6px 0 var(--line); }
.card.pad { padding: 24px; margin: 30px auto; max-width: 560px; }

/* ---------- start screen ---------- */
.start { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 20px 20px 16px; text-align: center; }

.title { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: .9; }
.title .t1 {
  font-size: clamp(64px, 13vw, 132px); font-weight: 900; letter-spacing: .06em; color: var(--leaf);
  -webkit-text-stroke: 4px var(--leaf-d); paint-order: stroke fill;
  text-shadow: 0 7px 0 var(--leaf-d), 0 12px 22px rgba(47, 125, 58, .25);
}
.title .t2 {
  margin-top: 16px; font-size: clamp(20px, 3.6vw, 34px); font-weight: 900; letter-spacing: .14em; color: #FFF7EA;
  background: linear-gradient(180deg, #C08A55, #9A6334); padding: 10px 26px 12px; border-radius: 14px;
  box-shadow: 0 6px 0 var(--bark-d), inset 0 2px 0 rgba(255, 255, 255, .25); transform: rotate(-1.5deg);
}
.tagline { color: var(--ink-2); font-size: 1.15rem; margin: .4em 0 0; }

/* the children right on the start page (Phase 1, step 6c): one tap on your own picture to play */
.start-players { width: min(100%, 860px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sp-title { margin: 0; }

.sp-avatar { width: 96px; height: 96px; border-radius: 50%; background: color-mix(in srgb, var(--c) 28%, #fff); display: grid; place-items: center; overflow: hidden; }
.sp-avatar .budgie { margin-top: 20px; } .sp-avatar .kid-face { width: 100%; height: 100%; }

@media (max-width: 520px) {   .sp-avatar { width: 80px; height: 80px; } .sp-avatar .budgie { margin-top: 16px; }  }

.lang-big { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: .95rem; }
.credit { margin-top: auto; color: var(--muted); font-size: .92rem; padding-top: 10px; }

/* ---------- profiles / wizard ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.profile-card { border: 0; background: #fff; border-radius: var(--r-lg); padding: 18px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 6px 0 var(--line), inset 0 0 0 4px color-mix(in srgb, var(--c, #5DBB46) 40%, transparent); min-height: 200px; }
.profile-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line), inset 0 0 0 4px var(--c, #5DBB46); }
.profile-card b { font-size: 1.25rem; }
.profile-card small { color: var(--muted); font-weight: 700; }
.pc-avatar, .pc-big { width: 110px; height: 110px; border-radius: 50%; background: color-mix(in srgb, var(--c) 28%, #fff); display: grid; place-items: center; overflow: hidden; }
.pc-avatar .budgie { margin-top: 22px; } .pc-avatar .kid-face { width: 100%; height: 100%; }
.pc-big { width: 130px; height: 130px; } .pc-big .budgie { margin-top: 30px; } .pc-big .kid-face { width: 100%; height: 100%; }
.profile-card.new { border: 4px dashed var(--leaf); box-shadow: none; background: rgba(255, 255, 255, .6); justify-content: center; }
.pc-plus { font-size: 3.4rem; font-weight: 900; color: var(--leaf); line-height: 1; }
.wiz-dots { display: flex; gap: 8px; justify-content: flex-end; }
.wiz-dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.wiz-dots span.on { background: var(--leaf); }
.wiz { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: var(--r-lg); padding: 24px; box-shadow: 0 6px 0 var(--line); }
.wiz-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.big-input { width: min(440px, 100%); font-size: 2rem; font-weight: 800; padding: 14px 18px; border-radius: var(--r-md); border: 4px solid var(--leaf-l); text-align: center; color: var(--ink); background: #FBFFF8; }
.big-input:focus { border-color: var(--leaf); outline: none; }
.choice-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.choice-card { border: 0; background: #F7FBF5; border-radius: var(--r-lg); padding: 16px 18px; min-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 5px 0 var(--line), inset 0 0 0 3px var(--line); }
.choice-card.on { background: var(--leaf-l); box-shadow: 0 5px 0 var(--leaf-d), inset 0 0 0 4px var(--leaf); }
.choice-card small { color: var(--muted); max-width: 13em; }
.big-num { font-size: 3.6rem; font-weight: 900; color: var(--leaf-d); line-height: 1; }
.budgie-card { min-width: 190px; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.swatch { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.swatch.on { outline: 5px solid var(--ink); outline-offset: 4px; }
.avatar-preview { display: flex; flex-direction: column; align-items: center; background: color-mix(in srgb, var(--c) 25%, #fff); border-radius: var(--r-lg); padding: 10px 26px 12px; }

/* ---------- keypads & PIN ---------- */
.kp { width: 100%; max-width: 380px; margin: 0 auto; }
.kp-display { height: 76px; border-radius: var(--r-md); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 900; letter-spacing: .03em; box-shadow: inset 0 0 0 4px var(--sky); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.kp-caret { width: 4px; height: 44px; background: var(--sky-d); border-radius: 2px; margin-left: 4px; animation: blink 1s steps(2) infinite; }
.kp:not(.empty) .kp-caret { display: none; }
.kp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kp-key { min-height: 66px; border: 0; border-radius: var(--r-md); background: #fff; font-size: 1.9rem; font-weight: 900; box-shadow: 0 5px 0 #CFDCCF; display: grid; place-items: center; }
.kp-key:active { transform: translateY(4px); box-shadow: 0 1px 0 #CFDCCF; background: var(--sky-l); }
.kp-back { color: var(--petal-d); } .kp-back svg.ico { width: 34px; height: 34px; }
.kp-ok { background: var(--leaf); color: #fff; box-shadow: 0 5px 0 var(--leaf-d); font-size: 1.15rem; display: flex; gap: 6px; }
.kp-ok svg.ico { width: 28px; height: 28px; }
.kp-ok:active { background: var(--leaf-d); box-shadow: 0 1px 0 var(--leaf-d); }
.pin { display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(340px, 100%); }
.pin-host { width: min(340px, 100%); }
.pin-dots { display: flex; gap: 14px; }
.pin-dots span { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--leaf); }
.pin-dots span.on { background: var(--leaf); }
.pin-grid { width: 100%; }
.pin.shake { animation: shake .4s; }

/* ---------- budgies & speech ---------- */
.buddy { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bubble { position: relative; background: #fff; border-radius: 22px; padding: 12px 18px; font-weight: 700; max-width: 22em; box-shadow: 0 4px 0 var(--line); animation: pop .3s ease; text-align: center; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
/* sprite budgies: frames stacked, mood = animation */
.budgie { position: relative; display: inline-block; flex: none; vertical-align: bottom; }
.bd-stage { position: absolute; inset: 0; transform-origin: 50% 100%; }
.bd-f { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
.flip .bd-f { transform: translateX(-50%) scaleX(-1); }
.bd-f img { width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 4px 3px rgba(31, 59, 42, .16)); }
.bd-acc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pose-idle .bd-stage { animation: bdBreathe 3.4s ease-in-out infinite; }
.pose-happy .bd-stage { animation: bdHop 1.1s ease-in-out infinite; }
.pose-think .bd-stage { animation: bdThink 2.8s ease-in-out infinite; }
.pose-eat .bd-stage { animation: bdPeck 1.3s ease-in-out infinite; }
.pose-encourage .bd-stage { animation: bdBob 2.4s ease-in-out infinite; }
.pose-encourage .f-fly, .pose-celebrate .f-glide, .pose-map .f-fly { opacity: 0; }
.pose-encourage .f-fly { animation: frWave 2.4s steps(1) infinite; } .pose-encourage .f-sit { animation: frWaveOff 2.4s steps(1) infinite; }
.pose-celebrate .bd-stage { animation: bdJump .72s ease-in-out infinite; }
.pose-celebrate .f-fly { animation: frA .36s steps(1) infinite; } .pose-celebrate .f-glide { animation: frB .36s steps(1) infinite; }
 
.bd-think { position: absolute; right: -6%; top: -4%; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2px; }
.bd-think i { display: block; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #B9C7D3; animation: fadein .6s ease both; }
.bd-think i:nth-child(1) { width: 7px; height: 7px; } .bd-think i:nth-child(2) { width: 10px; height: 10px; margin-left: 6px; animation-delay: .2s; } .bd-think i:nth-child(3) { width: 14px; height: 14px; margin-left: 12px; animation-delay: .4s; }
@keyframes bdBreathe { 0%, 100% { transform: scale(1, 1) rotate(0); } 30% { transform: scale(1.015, .985); } 62% { transform: scale(1, 1) rotate(0); } 72%, 84% { transform: rotate(-4deg); } }
@keyframes bdHop { 0%, 100% { transform: translateY(0) scale(1, 1); } 22% { transform: translateY(0) scale(1.05, .94); } 45% { transform: translateY(-14%) scale(.97, 1.04); } 70% { transform: translateY(0) scale(1.04, .96); } }
@keyframes bdThink { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(-9deg) translateY(-2%); } }
@keyframes bdPeck { 0%, 40%, 100% { transform: rotate(0); } 55% { transform: rotate(8deg) translateY(3%); } 70% { transform: rotate(0); } }
@keyframes bdBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes bdJump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16%) rotate(-3deg); } }
@keyframes frA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes frB { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes frWave { 0% { opacity: 0; } 70% { opacity: 1; } 90% { opacity: 0; } }
@keyframes frWaveOff { 0% { opacity: 1; } 70% { opacity: 0; } 90% { opacity: 1; } }
.kid-face { border-radius: 50%; object-fit: cover; display: block; background: #fff; }

.prop { display: block; height: auto; filter: drop-shadow(0 6px 6px rgba(31, 59, 42, .15)); }
/* ---------- verse ---------- */
.verse-card { background: #fff; border-radius: 30px; padding: 22px 26px 26px; box-shadow: 0 8px 0 var(--line); text-align: center; }
.verse-kicker { margin: 0 0 10px; font-weight: 900; color: var(--bark); font-size: 1.05rem; }
.verse-art { border-radius: 20px; overflow: hidden; max-width: 520px; margin: 0 auto; }
.verse-text { font-size: clamp(1.3rem, 2.8vw, 1.7rem); font-weight: 800; line-height: 1.4; margin: 18px auto 8px; max-width: 30em; color: var(--ink); quotes: "“" "”"; }
.verse-text::before { content: open-quote; color: var(--leaf); } .verse-text::after { content: close-quote; color: var(--leaf); }
.verse-ref { font-weight: 900; color: var(--leaf-d); margin: 0; }
.verse-ref span { display: block; font-weight: 600; color: var(--muted); font-size: .85rem; }
.verse-why { background: var(--sun-l); border-radius: var(--r-md); padding: 12px 16px; font-weight: 700; margin: 16px auto 18px; max-width: 32em; }
.verse-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- world map ---------- */
.map { flex: 1; display: flex; flex-direction: column; min-height: calc(100dvh - var(--top)); }

.who { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, #fff); display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 3px var(--c); }
.avatar .budgie { margin-top: 14px; } .avatar .kid-face { width: 100%; height: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; box-shadow: 0 3px 0 var(--line); min-height: 44px; }
.chip svg.ico { width: 24px; height: 24px; color: var(--sun-d); }
.chip.goal { padding: 3px 14px 3px 4px; }
.chip.goal small { display: block; font-size: .7rem; color: var(--muted); line-height: 1; }
.chip.goal b { font-size: .95rem; line-height: 1.1; }
.hud-actions { display: flex; gap: 8px; align-items: center; }
.hud-actions .btn { margin-bottom: 0; }

.wtab { flex: none; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 16px 8px 8px; background: rgba(255, 255, 255, .75); font-weight: 800; min-height: 50px; box-shadow: 0 3px 0 var(--line); }
.wtab-n { width: 34px; height: 34px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-weight: 900; }
.wtab.on { background: #fff; box-shadow: 0 3px 0 var(--leaf-d), inset 0 0 0 3px var(--leaf); }
.wtab.soon, .wtab.locked { color: var(--muted); } .wtab.soon .wtab-n, .wtab.locked .wtab-n { background: #B9C7BD; }
.wtab svg.ico { color: var(--muted); }

.layer { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }

.node { position: absolute; width: 88px; margin-left: -44px; margin-top: -44px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; z-index: 2; }

.lc-stars i, .big-stars i { color: #D4DDD6; font-style: normal; }
.lc-stars i.on, .big-stars i.on { color: var(--sun-d); }

.sprite { position: absolute; margin-left: -31px; margin-top: -132px; z-index: 3; pointer-events: none; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .18)); }

/* ---------- modal ---------- */
#modal-root { position: relative; z-index: 60; }
.modal-back { position: fixed; inset: 0; background: rgba(31, 59, 42, .45); animation: fadein .2s; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 30px)); max-height: calc(100dvh - 40px); overflow: auto; background: #fff; border-radius: 30px; padding: 26px 24px 22px; box-shadow: 0 10px 0 rgba(0, 0, 0, .12); animation: popin .25s ease; }
.modal-x { position: absolute; right: 12px; top: 12px; }
.level-card { text-align: center; }
.lc-birds { display: flex; justify-content: center; align-items: flex-end; }
.lc-kicker { margin: 4px 0 0; color: var(--muted); font-weight: 800; }
.lc-stars { display: flex; justify-content: center; gap: 4px; margin: 8px 0; } .lc-stars svg.ico { width: 40px; height: 40px; }
.lc-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.lc-actions.left { justify-content: flex-start; }
.strategy-chip { display: inline-flex; gap: 8px; align-items: center; background: var(--sun-l); color: var(--bark-d); font-weight: 900; border-radius: 999px; padding: 8px 16px; margin: 6px 0; }
.strategy-chip.big { font-size: 1.2rem; padding: 10px 20px; }
.settings .set-row, .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 2px solid var(--line); flex-wrap: wrap; font-weight: 700; }
.set-row.dim { color: var(--muted); }

.toggle { width: 74px; height: 44px; border-radius: 999px; border: 0; background: #C8D3CB; position: relative; flex: none; }
.toggle i { position: absolute; left: 4px; top: 4px; width: 36px; height: 36px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.toggle.on { background: var(--leaf); } .toggle.on i { left: 34px; }
.about { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; text-align: center; color: var(--ink-2); }
.about small { color: var(--muted); }
.break .stretch-list { text-align: left; font-weight: 700; font-size: 1.1rem; }

/* ---------- practice ---------- */
.practice, .lesson { flex: 1; display: flex; flex-direction: column; padding: 10px 16px 18px; gap: 12px; max-width: 1280px; width: 100%; margin: 0 auto; }
.pr-top { display: flex; align-items: center; gap: 12px; }
.pr-top .btn { margin-bottom: 0; }
.pr-title { font-weight: 900; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34%; }
.progress { flex: 1; height: 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 3px var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), #9BE07F); border-radius: 999px; transition: width .4s ease; }
.pr-count { font-weight: 900; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pr-main { flex: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
@media (orientation: portrait), (max-width: 860px) { .pr-main { grid-template-columns: 1fr; } }
.qcard { background: #fff; border-radius: 28px; padding: 22px 24px; box-shadow: 0 7px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 14px; position: relative; min-height: 240px; justify-content: center; }
.qcard.inset { box-shadow: inset 0 0 0 3px var(--line); padding: 16px; min-height: 0; }
.qcard.solved { box-shadow: 0 7px 0 var(--leaf-d), inset 0 0 0 4px var(--leaf); }
.qcard.pop { animation: popin .35s ease; }
.q-text { display: flex; gap: 10px; align-items: flex-start; width: 100%; justify-content: center; }
.q-text p { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.55rem); font-weight: 800; line-height: 1.4; text-align: center; max-width: 30em; }
.q-text .read { width: 46px; height: 46px; }
/* Bible practice tag (Version 2026.15): a warm parchment chip above the question, the passage beside it; words, not colour, say what it is */
.q-faith { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 6px; margin: 0 auto 8px; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--bark-l); color: var(--bark-d); border: 2px solid #E2C9A6; font-size: .95rem; font-weight: 800; line-height: 1.3; flex-wrap: wrap; justify-content: center; }
.q-faith svg { width: 20px; height: 20px; flex: none; }
.q-faith-ref { font-weight: 700; color: var(--ink-2); }
.q-faith-ref::before { content: "·"; margin-right: 6px; color: var(--bark-d); }
.q-expr { font-size: clamp(2.3rem, 5.6vw, 3.6rem); font-weight: 900; letter-spacing: .02em; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ul { text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 8px; text-decoration-color: var(--petal); }
.qbox { display: inline-block; min-width: 1.15em; padding: 0 .12em; border-radius: .2em; border: 4px dashed var(--sky-d); color: var(--sky-d); text-align: center; line-height: 1.05; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1; margin: 0 .08em; }
.frac .fn { padding: 0 .14em .06em; border-bottom: .09em solid currentColor; }
.frac .fd { padding-top: .06em; }
.frac .qbox { font-size: .8em; }
.visual { width: 100%; display: flex; justify-content: center; overflow: visible; padding-bottom: 8px; }
.visual svg.vis { height: auto; }
.tag.review { position: absolute; top: 12px; left: 14px; background: var(--sky-l); color: var(--sky-d); font-weight: 900; border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.hint-box { display: flex; gap: 10px; align-items: center; background: var(--sun-l); border-radius: var(--r-md); padding: 12px 16px; font-weight: 800; animation: popin .3s ease; max-width: 36em; }
.hint-box svg.ico { width: 32px; height: 32px; }
.acol { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pr-tools { display: flex; justify-content: center; gap: 10px; min-height: 0; }
.buddy-host { display: flex; justify-content: center; }
.mc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mc.long { grid-template-columns: 1fr; }
.mc-btn { min-height: 92px; border: 0; border-radius: 22px; background: #fff; font-size: 1.7rem; font-weight: 900; box-shadow: 0 6px 0 #CFDCCF, inset 0 0 0 3px var(--line); padding: 10px; }
.mc.long .mc-btn { font-size: 1.2rem; min-height: 72px; }
.mc-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #CFDCCF; }
.mc-btn.wrong, .cmp-btn.wrong { animation: shake .4s; background: #FFE6EA; }
.mc-btn.right, .cmp-btn.right { background: var(--leaf-l); box-shadow: 0 6px 0 var(--leaf-d), inset 0 0 0 4px var(--leaf); }
.cmp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cmp-btn { min-height: 120px; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 6px 0 #CFDCCF, inset 0 0 0 3px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.cmp-btn b { font-size: 3.4rem; line-height: 1; }
.cmp-btn small { font-weight: 700; color: var(--muted); font-size: .85rem; }
.cmp-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #CFDCCF; }
.nl-wrap { background: #fff; border-radius: 22px; padding: 10px 12px 14px; box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nl-interactive { touch-action: none; cursor: grab; }
.nl-help { margin: 0; color: var(--muted); font-weight: 700; font-size: .95rem; text-align: center; }
.feedback { background: #fff; border-radius: 26px; padding: 18px; text-align: center; box-shadow: 0 6px 0 var(--line); animation: popin .3s ease; }
.fb-badge { width: 70px; height: 70px; margin: 0 auto; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; box-shadow: 0 5px 0 var(--leaf-d); }
.fb-badge svg.ico { width: 42px; height: 42px; }
.fb-badge.big { width: 96px; height: 96px; } .fb-badge.big svg.ico { width: 58px; height: 58px; }
.fb-title { font-size: 1.6rem; font-weight: 900; margin: 8px 0 12px; color: var(--leaf-d); }
/* kit-4 story scene on the word problem: a painted banner across the top of the card, the fact under it */
.qcard.has-scene { padding-top: 0; overflow: hidden; }
.story-scene { width: calc(100% + 48px); margin: 0 -24px 2px; }
.story-scene img { display: block; width: 100%; height: 150px; object-fit: cover; object-position: 50% 60%; }
.story-scene figcaption { font-size: .86rem; font-weight: 700; color: #4F5E3B; text-align: center; padding: 8px 16px 0; line-height: 1.3; }
@media (max-width: 740px) { .story-scene img { height: 104px; } .story-scene figcaption { font-size: .78rem; } }
.practice.is-boss .qcard { box-shadow: 0 7px 0 var(--bark-d), inset 0 0 0 4px var(--sun); }

/* ---------- tutor overlay ---------- */
.tutor-back { position: fixed; inset: 0; background: rgba(31, 59, 42, .5); z-index: 50; animation: fadein .2s; }
.tutor { position: fixed; z-index: 51; left: 50%; top: calc(var(--top) + 10px); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(900px, calc(100vw - 24px)); background: #FBFFF8; border-radius: 30px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 0 rgba(0, 0, 0, .15); animation: slideup .35s ease; }
.tu-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 10px; background: linear-gradient(180deg, var(--leaf-l), #FBFFF8); }
.tu-headtext { flex: 1; }
.tu-kicker { margin: 0; font-weight: 800; color: var(--leaf-d); }
.tu-head h3 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.tu-body { flex: 1; overflow-y: auto; padding: 8px 22px 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.tu-body.center { align-items: center; justify-content: center; text-align: center; }
.tu-body.your { align-items: center; }
.tu-problem { background: #fff; border-radius: 20px; padding: 12px; box-shadow: inset 0 0 0 3px var(--line); }
.tu-problem .q-text p { font-size: 1.15rem; } .tu-problem .q-expr { font-size: 2.2rem; }
.tu-intro { margin: 0; font-weight: 800; color: var(--ink-2); text-align: center; }
.tu-sol { margin: 0; padding: 10px 14px; border-radius: var(--r-md); background: #FFF8D6; font-weight: 700; color: var(--ink); } .tu-sol .who { display: block; font-size: .8rem; color: #8A6D00; }
.tu-steps { margin: 0; padding-left: 28px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); font-weight: 700; }
.tu-steps li.done { opacity: .7; }
.tu-current { background: #fff; border-radius: 22px; padding: 16px 18px; box-shadow: 0 5px 0 var(--line), inset 0 0 0 3px var(--sky); display: flex; flex-direction: column; gap: 12px; animation: popin .3s ease; }
.tu-stepno { font-weight: 900; color: var(--sky-d); font-size: .9rem; }
.tu-text { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.45; }
.ans-chip { display: inline-block; background: var(--leaf-l); color: var(--leaf-d); border-radius: 10px; padding: 0 10px; margin-left: 4px; }
.tu-ask { background: var(--sun-l); border-radius: 20px; padding: 12px; }
.tu-yourstep { margin: 0 0 8px; font-weight: 900; color: var(--bark-d); text-align: center; }
.tu-ask .kp { max-width: 340px; } .tu-ask .kp-key { min-height: 58px; }
.tu-actions { padding: 12px 18px 16px; display: flex; justify-content: flex-end; border-top: 2px solid var(--line); background: #fff; }
.tu-actions .btn { margin-bottom: 0; }
.tutor .answer-host { width: min(420px, 100%); }

/* ---------- lessons ---------- */
.lesson-stage { flex: 1; background: #fff; border-radius: 30px; padding: 22px; box-shadow: 0 7px 0 var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: slidein .35s ease; }
.lesson-intro, .lesson-ex, .lesson-ready { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.lesson-ex .tu-steps { font-size: 1.25rem; color: var(--ink); align-self: stretch; max-width: 38em; margin: 0 auto; }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; }
.lesson-nav .btn { margin-bottom: 0; }

/* ---------- results ---------- */
.big-stars { display: flex; gap: 6px; justify-content: center; }
.big-stars i { animation: starpop .5s ease both; } .big-stars svg.ico { width: 70px; height: 70px; }
.seeds-earned { font-weight: 900; font-size: 1.3rem; color: var(--bark); }
.badge-earned { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 900; color: var(--bark-d); animation: popin .5s ease .4s both; }
.saved { display: inline-flex; gap: 8px; align-items: center; background: var(--leaf-l); color: var(--leaf-d); font-weight: 900; padding: 10px 18px; border-radius: 999px; }
.stat-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.stat { background: #fff; border-radius: 20px; padding: 12px 22px; box-shadow: 0 5px 0 var(--line); display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.stat b { font-size: 2.2rem; line-height: 1.1; color: var(--leaf-d); } .stat span { color: var(--muted); font-weight: 700; }

/* ---------- visual models ---------- */
.cols { display: grid; grid-template-columns: repeat(var(--n), 58px); justify-content: center; font-size: 2.3rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.25; }
.cols > div { text-align: center; }
.c-h { font-size: .85rem; color: var(--muted); font-weight: 900; }
.c-carry { font-size: 1.15rem; color: var(--petal-d); min-height: 1.4rem; }
.c-d.struck { text-decoration: line-through; text-decoration-color: var(--petal-d); text-decoration-thickness: 4px; color: #9AA89F; }
.c-rule { grid-column: 1 / -1; border-top: 5px solid var(--ink); margin: 4px 0; }
.c-res.blank { margin: 4px 6px; border: 3px dashed #B7C8BC; border-radius: 10px; min-height: 2.4rem; }
.c-op { color: var(--sky-d); }
.seq { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 2px; padding: 4px 0 10px; }
.stone { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F1E3CF, #D8BC97); display: grid; place-items: center; font-size: 1.35rem; font-weight: 900; box-shadow: 0 5px 0 #B48F62; margin-bottom: 5px; }
.stone.blank { background: #fff; color: var(--sky-d); box-shadow: 0 5px 0 var(--sky-d), inset 0 0 0 4px var(--sky); }
.seq-arrow { color: var(--leaf); font-size: 1.5rem; font-weight: 900; width: 16px; text-align: center; }
.pvwrap { overflow-x: auto; max-width: 100%; padding-bottom: 6px; }
.pvchart { border-collapse: separate; border-spacing: 4px; margin: 0 auto; }
.pvchart th { font-size: .78rem; font-weight: 900; color: var(--ink-2); background: var(--leaf-l); border-radius: 10px; padding: 6px 6px; max-width: 92px; line-height: 1.15; }
.pvchart td { font-size: 2.1rem; font-weight: 900; text-align: center; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 3px var(--line); min-width: 62px; height: 62px; }
.pvchart .hl { background: var(--sun-l); box-shadow: inset 0 0 0 4px var(--sun); }
.pvchart .hl2 { background: var(--sky-l); box-shadow: inset 0 0 0 4px var(--sky); }

/* ---------- celebration & trail ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.cf { position: absolute; top: -30px; width: 16px; height: 24px; animation: fall 3s linear forwards; }
.cf.leaf { background: var(--leaf); border-radius: 0 100% 0 100%; }
.cf.feather { background: linear-gradient(90deg, #BFE8FF, #4FA8EC); border-radius: 50% 50% 40% 40% / 90% 90% 10% 10%; width: 10px; height: 30px; }
.cf.petal { background: var(--petal); border-radius: 60% 40% 60% 40%; }
.cf.seed { background: #B9773A; border-radius: 50%; width: 10px; height: 14px; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }
.trail { position: fixed; z-index: 95; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, var(--sun) 31% 60%, transparent 62%); pointer-events: none; animation: sparkle .85s ease-out forwards; }
.trail.feather { width: 8px; height: 18px; border-radius: 50% 50% 40% 40% / 90% 90% 10% 10%; background: linear-gradient(#fff, var(--sky)); }
.trail.burst { animation-duration: .7s; }
@keyframes sparkle { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx), -34px) scale(.4) rotate(70deg); } }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 18px; font-weight: 800; z-index: 99; transition: transform .3s ease, opacity .3s ease, visibility .3s; max-width: calc(100vw - 40px); text-align: center; opacity: 0; visibility: hidden; }
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- scratch pad ---------- */
/* bottom sheet in every orientation: the problem stays visible above it */
.scratch { --sp-h: 44dvh; position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; height: var(--sp-h); background: #FFFEF6; border-top: 4px solid var(--bark-l); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 0 rgba(31, 59, 42, .12); transform: translateY(105%); transition: transform .3s ease; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px); background-image: linear-gradient(#E8EEF7 1.5px, transparent 1.5px); background-size: 100% 40px; }
.scratch.open { transform: translateY(0); }
.scratch:not(.open) { visibility: hidden; pointer-events: none; transition: transform .3s ease, visibility 0s linear .3s; }
.scratch.tall { --sp-h: 60dvh; }
@media (orientation: portrait) { .scratch { --sp-h: 48dvh; } .scratch.tall { --sp-h: 62dvh; } }
body.scratch-open .practice, body.scratch-open .lesson { padding-bottom: calc(44dvh + 16px); }
body.scratch-open .tutor { bottom: calc(44dvh + 10px); }
@media (orientation: portrait) { body.scratch-open .practice, body.scratch-open .lesson { padding-bottom: calc(48dvh + 16px); } body.scratch-open .tutor { bottom: calc(48dvh + 10px); } }
.sp-grip { width: 64px; height: 6px; border-radius: 3px; background: #D5C4AE; margin: 8px auto -2px; }
.sp-tools { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: rgba(255, 255, 255, .95); border-bottom: 2px solid var(--line); flex-wrap: wrap; border-radius: 22px 22px 0 0; }
.sp-color { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 4px #fff, 0 0 0 2px var(--line); }
.sp-color.on, .sp-btn.on { box-shadow: inset 0 0 0 4px #fff, 0 0 0 4px var(--ink); }
.sp-btn { min-width: 52px; height: 52px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--line); display: grid; place-items: center; }
.sp-btn svg.ico { width: 28px; height: 28px; }
.sp-btn.wide { padding: 0 16px; font-weight: 800; }
.sp-flex { flex: 1; }
.sp-canvas { flex: 1; width: 100%; touch-action: none; cursor: crosshair; }

/* ---------- professor dashboard ---------- */
.dash { width: min(1180px, 100%); margin: 0 auto; padding: 14px 18px 40px; -webkit-user-select: text; user-select: text; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dtabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 12px; }
.dtab { flex: none; display: flex; gap: 6px; align-items: center; border: 0; border-radius: 999px; padding: 8px 18px; min-height: 50px; background: rgba(255, 255, 255, .7); font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.dtab.on { background: #fff; box-shadow: 0 3px 0 var(--leaf-d), inset 0 0 0 3px var(--c, var(--leaf)); }
.dcard { background: #fff; border-radius: 24px; padding: 16px 20px 18px; box-shadow: 0 5px 0 var(--line); margin-bottom: 16px; }
.dcard h3 { margin: 0 0 12px; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dcard h3 small { color: var(--muted); font-weight: 700; font-size: .9rem; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.dgrid .dcard { margin-bottom: 0; }
.dgrid + .dcard { margin-top: 16px; }
.ocards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.ocard { background: #F6FBF3; border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; }
.ocard span { font-size: .8rem; color: var(--muted); font-weight: 800; }
.ocard b { font-size: 1.35rem; line-height: 1.25; }
.ocard small { color: var(--ink-2); font-size: .8rem; }
.insights { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.insights li { padding: 10px 14px; border-radius: 14px; font-weight: 700; background: #F3F7F4; border-left: 6px solid #B9C7BD; }
.insights .ins-struggle { background: #FFF0EC; border-color: #FF9A6B; }
.insights .ins-slow { background: var(--sun-l); border-color: var(--sun); }
.insights .ins-good { background: var(--leaf-l); border-color: var(--leaf); }
.insights .ins-review { background: var(--sky-l); border-color: var(--sky); }
.chart { display: block; }
.legend, .legend-row { font-size: .85rem; color: var(--muted); margin: 6px 0 0; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.legend-row { margin: 0 0 10px; } .legend-row i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; }
.lg.goal { display: inline-block; width: 22px; border-top: 3px dashed var(--sun); margin-right: 6px; }
.sbar { display: grid; grid-template-columns: minmax(170px, 1.1fr) 2fr auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sbar-l b { display: block; font-size: .98rem; } .sbar-l small { color: var(--muted); }
.sbar-track { height: 16px; border-radius: 999px; background: #EEF3EF; overflow: hidden; }
.sbar-track i { display: block; height: 100%; border-radius: 999px; }
.status { font-size: .8rem; font-weight: 900; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.st-none { background: #EEF3EF; color: var(--muted); } .st-placed { background: var(--sky-l); color: var(--sky-d); } .st-learning { background: #FFE3D6; color: #B4502A; } .st-practicing { background: var(--sun-l); color: #8A6A00; } .st-mastered { background: var(--leaf-l); color: var(--leaf-d); }
.dtable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.dtable th { text-align: left; color: var(--muted); font-size: .8rem; padding: 6px 8px; border-bottom: 2px solid var(--line); }
.dtable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable .qcell { max-width: 380px; }
.tscroll { overflow-x: auto; max-height: 520px; overflow-y: auto; }
.flag { background: var(--sun-l); color: #8A6A00; font-weight: 800; padding: 3px 8px; border-radius: 8px; font-size: .8rem; }
.yes { color: var(--leaf-d); font-weight: 900; } .no { color: var(--muted); font-weight: 700; }
.filter { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 10px; font-weight: 700; }
select { min-height: 48px; border-radius: 12px; border: 2px solid var(--line); padding: 4px 10px; background: #fff; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pick { display: inline-flex; gap: 8px; align-items: center; background: #F6FBF3; border-radius: 12px; padding: 8px 12px; font-weight: 700; min-height: 48px; }
.pick input { width: 24px; height: 24px; accent-color: var(--leaf); }
.pick.dim { opacity: .55; }
.file-btn { cursor: pointer; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.manage .set-row.danger span { color: var(--petal-d); }
.report h1 { margin: 0; font-size: 1.6rem; color: var(--leaf-d); } .rep-sub { margin: 0 0 10px; color: var(--muted); }
.rep-student { break-inside: avoid; margin-bottom: 18px; } .rep-student h2 { margin: 8px 0; } .rep-foot { color: var(--muted); font-size: .85rem; }

/* ---------- animations ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes pop { from { transform: scale(.85); } to { transform: scale(1); } }
@keyframes popin { 0% { transform: scale(.96); } 70% { transform: scale(1.01); } 100% { transform: scale(1); } }
.modal { animation-name: popmodal; } @keyframes popmodal { from { transform: translate(-50%, -46%) scale(.94); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes slideup { from { transform: translate(-50%, 24px); } to { transform: translate(-50%, 0); } }
@keyframes slidein { from { transform: translateX(18px); } }
@keyframes starpop { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1); } }
.btn:active, .kp-key:active, .mc-btn:active, .cmp-btn:active { animation: none; }

/* ---------- reduced motion ---------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- print (reports) ---------- */
@media print {
  body { background: #fff; padding: 0; font-size: 12pt; }
  .topbar, .dtabs, .dash-head, .dash-body > .dcard:not(.print-area), #toast, .scratch, .trail, .confetti { display: none !important; }
  .print-area { box-shadow: none !important; padding: 0 !important; }
  .dash { padding: 0; width: 100%; }
  .ocard { border: 1px solid #ddd; }
}

/* ---------- animated home button (My Results) ---------- */

.results .res-hero { display: flex; align-items: center; gap: 16px; background: color-mix(in srgb, var(--c) 18%, #fff); border-radius: 28px; padding: 14px 22px; box-shadow: 0 6px 0 var(--line); }
.results .res-hero .lead { text-align: left; margin: 0; }
.rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.rcard { background: #fff; border-radius: 22px; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 5px 0 var(--line); animation: popin .4s ease both; }
.rcard:nth-child(2) { animation-delay: .06s; } .rcard:nth-child(3) { animation-delay: .12s; } .rcard:nth-child(4) { animation-delay: .18s; } .rcard:nth-child(5) { animation-delay: .24s; } .rcard:nth-child(6) { animation-delay: .3s; }
.rcard b { font-size: 1.7rem; line-height: 1.2; } .rcard span:last-child { color: var(--muted); font-weight: 700; font-size: .9rem; }
.rc-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.rc-ico svg.ico { width: 28px; height: 28px; }
.rcard.sun .rc-ico { background: var(--sun-l); color: var(--sun-d); } .rcard.bark .rc-ico { background: var(--bark-l); } .rcard.leaf .rc-ico { background: var(--leaf-l); color: var(--leaf-d); } .rcard.petal .rc-ico { background: #FFE6EA; } .rcard.sky .rc-ico { background: var(--sky-l); color: var(--sky-d); }
.rsec { background: #fff; border-radius: 24px; padding: 14px 20px 16px; box-shadow: 0 5px 0 var(--line); margin-bottom: 14px; }
.rsec h3 { margin: 0 0 8px; font-size: 1.2rem; }
.res-spot { font-weight: 800; margin: 0 0 10px; }
.res-worlds { display: grid; gap: 10px; } .rw { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr auto; gap: 12px; align-items: center; font-weight: 700; } .rw small { color: var(--muted); }
.res-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rs { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; background: #F6FBF3; border-radius: 14px; padding: 8px 12px; }
.rs small { grid-column: 2; color: var(--muted); font-weight: 700; }
.leaves { grid-row: span 2; display: flex; gap: 2px; }
.leaves i { width: 14px; height: 20px; border-radius: 0 100% 0 100%; background: #DCE6DF; display: block; }
.leaves i.on { background: var(--leaf); }
.res-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.res-sessions li { display: flex; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Korean: never break inside a word (standard Korean typography) */
html:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- Phase 2: decimal key, clock control, rewards ---------- */
.kp-dot { font-size: 2.4rem; color: var(--sky-d); }
.kp-ok.wide { grid-column: 1 / -1; min-height: 60px; }
.clk-wrap { background: #fff; border-radius: 24px; padding: 14px; box-shadow: 0 6px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.clk-face svg { width: 200px; height: 200px; }
.clk-read { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--sky-d); }
.clk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.clk-lab { font-weight: 800; min-width: 4.5em; text-align: right; }
.clk-btn { min-width: 70px; min-height: 60px; border: 0; border-radius: 18px; background: var(--sky-l); font-size: 1.4rem; font-weight: 900; color: var(--sky-d); box-shadow: 0 5px 0 #9CC9E6; }
.clk-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #9CC9E6; }
.clk-check { margin-top: 4px; }
.hud-actions .btn.small { min-height: 48px; }

.iotable { border-collapse: separate; border-spacing: 6px; margin: 0 auto; }
.iotable th { background: var(--leaf-l); border-radius: 10px; padding: 8px 12px; }
.iotable td { background: #fff; box-shadow: inset 0 0 0 3px var(--line); border-radius: 12px; min-width: 60px; height: 56px; text-align: center; font-size: 1.6rem; font-weight: 900; }
.iotable td.blank { color: var(--sky-d); box-shadow: inset 0 0 0 3px var(--sky); }
.nest-page .page-head .btn, .shop-page .page-head .chip { margin-bottom: 0; }
.nest-scene { position: relative; max-width: 640px; margin: 0 auto 14px; }
.nest-bg { display: block; border-radius: 30px; box-shadow: 0 8px 0 var(--bark-d); }
/* the budgie's feet on the treehouse perch (kit 12: perch at 139 of 400 = 34.75%, bird 13% of the scene wide) */
.nest-bird { position: absolute; left: 51.5%; bottom: 65.25%; width: 13%; transform: translateX(-50%); pointer-events: none; }
.nest-bird img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 3px rgba(67, 41, 24, .25)); }
.nest-bird.caring { bottom: 6%; width: 24%; }
.nest-bird .care-bird { width: 100%; height: auto; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge-cell { background: #fff; border-radius: 20px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 5px 0 var(--line); opacity: .75; }
.badge-cell.on { opacity: 1; box-shadow: 0 5px 0 var(--sun-d), inset 0 0 0 3px var(--sun); }
.badge-cell b { font-size: .9rem; margin-top: 4px; } .badge-cell small { color: var(--muted); font-weight: 700; }
.shop-top { display: flex; align-items: center; gap: 14px; justify-content: center; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.shop-card { background: #fff; border-radius: 22px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: 0 5px 0 var(--line); }
.shop-card.on { box-shadow: 0 5px 0 var(--leaf-d), inset 0 0 0 4px var(--leaf); }
.shop-prev { height: 120px; display: grid; place-items: center; overflow: visible; }
.owned { color: var(--leaf-d); font-weight: 800; display: inline-flex; gap: 4px; align-items: center; }
.btn[aria-disabled="true"] { opacity: .55; }
.res-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rb { display: flex; flex-direction: column; align-items: center; opacity: .6; } .rb.on { opacity: 1; } .rb small { color: var(--muted); font-weight: 700; }
.badge-earned .btn { margin-top: 6px; }

/* tutor & lesson panels scroll instead of squeezing cards (so pictures never cover the keypad) */
.tu-body > *, .lesson-stage > *, .acol > * { flex-shrink: 0; }
.qcard .visual svg.vis { max-height: 46vh; }

/* instant key feedback */
.kp-key.hit { animation: keyHit .16s ease-out; }
@keyframes keyHit { 0% { transform: translateY(4px) scale(.96); background: var(--sky-l); box-shadow: 0 1px 0 #CFDCCF; } 100% { transform: none; } }
.kp-ok.hit { animation-name: keyHitOk; } @keyframes keyHitOk { 0% { transform: translateY(4px) scale(.97); background: var(--leaf-d); box-shadow: 0 1px 0 var(--leaf-d); } 100% { transform: none; } }
.kp-key { -webkit-user-select: none; user-select: none; touch-action: manipulation; }

/* ---------- 3D map: glossy level buttons with ground shadows ---------- */

.node::before { content: ""; position: absolute; left: 50%; top: 86px; width: 92px; height: 22px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(31, 59, 42, .35), rgba(31, 59, 42, 0) 70%); z-index: -1; }
.node.boss::before { top: 96px; width: 120px; }

.sprite { filter: none; }

/* ---------- opening animation ---------- */
#intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 38%, #E9F8FF 0%, #9FDAF6 38%, #4FA8EC 78%, #2F7DB8 100%); }
#intro.out { animation: inOut .55s ease forwards; }
.in-rays { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .22) 0 6deg, transparent 6deg 18deg); animation: inSpin 14s linear infinite; }
.in-zoom { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; transform-origin: 50% 13%; animation: inZoom 3.8s cubic-bezier(.16, .84, .24, 1) both; }
.in-title { margin: 0; display: flex; font-size: clamp(72px, 15vw, 160px); font-weight: 900; letter-spacing: .05em; line-height: 1; color: var(--leaf); -webkit-text-stroke: 5px var(--leaf-d); paint-order: stroke fill; text-shadow: 0 9px 0 var(--leaf-d), 0 18px 30px rgba(0, 0, 0, .25); }
.in-l { display: inline-block; opacity: 0; animation: inLand .58s cubic-bezier(.2, 1.55, .4, 1) both; animation-delay: calc(.45s + var(--i) * .23s); }

.in-skip { position: absolute; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 999px; padding: 12px 22px; min-height: 52px; font-weight: 900; color: #fff; background: rgba(31, 59, 42, .35); }
@keyframes inZoom { 0% { transform: scale(3.4); } 100% { transform: scale(1); } }
@keyframes inLand { 0% { opacity: 0; transform: scale(4.5) translateY(-70px) rotate(-14deg); filter: blur(12px); } 55% { opacity: 1; transform: scale(.86) translateY(8px); filter: blur(0); } 78% { transform: scale(1.06) translateY(-3px); } 100% { opacity: 1; transform: none; } }
@keyframes inSpin { to { transform: rotate(360deg); } }
@keyframes inOut { to { opacity: 0; transform: scale(1.06); } }

/* ---------- Continue my adventure: big, bouncing, impossible to miss ---------- */
.btn-adventure { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; max-width: 720px; margin: 16px auto; border: 0; border-radius: 30px; padding: 12px 22px 12px 14px; min-height: 96px; text-align: left; color: #fff;
  background: linear-gradient(180deg, #7FD65F, var(--leaf) 55%, #46A532); box-shadow: 0 8px 0 var(--leaf-d), 0 16px 28px rgba(47, 125, 58, .35); animation: advGlow 2.2s ease-in-out infinite; }
.btn-adventure:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--leaf-d); animation: none; }
.ba-bird { flex: none; width: 84px; display: grid; place-items: center; }
.ba-text { flex: 1; display: flex; flex-direction: column; text-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.ba-text b { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 900; line-height: 1.15; }
.ba-text small { font-size: 1rem; font-weight: 700; opacity: .95; }
.ba-arrow { flex: none; width: 62px; height: 62px; border-radius: 50%; background: #fff; color: var(--leaf-d); display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); animation: advArrow 1.1s ease-in-out infinite; }
.ba-arrow svg { width: 36px; height: 36px; }
.adventure-dock { display: none; position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; padding: 0 4px; }
.adventure-dock .btn-adventure { margin: 10px auto 4px; }
@keyframes advGlow { 0%, 100% { box-shadow: 0 8px 0 var(--leaf-d), 0 16px 28px rgba(47, 125, 58, .35); } 50% { box-shadow: 0 8px 0 var(--leaf-d), 0 16px 40px rgba(93, 187, 70, .7), 0 0 0 6px rgba(255, 225, 90, .55); } }
@keyframes advArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* ---------- start screen resume card, log out, avatars, break scene, settings ---------- */
.resume-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(560px, 100%); }
.resume-card { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; border-radius: 26px; padding: 12px 18px; background: #fff; text-align: left; box-shadow: 0 7px 0 var(--sun-d), 0 0 0 4px var(--sun) inset, 0 14px 26px rgba(0, 0, 0, .12); animation: advGlow 2.2s ease-in-out infinite, popin .5s ease; }
.resume-card .rc-txt { flex: 1; display: flex; flex-direction: column; } .resume-card b { font-size: 1.35rem; } .resume-card small { color: var(--muted); font-weight: 700; }
.resume-card .rc-go { width: 54px; height: 54px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; transform: scaleX(-1); animation: advArrow 1.1s ease-in-out infinite; }
.resume-card .rc-go svg.ico { width: 30px; height: 30px; }
.logout-btn { margin-bottom: 0; min-height: 50px; } .logout-btn svg.ico { width: 1.25em; height: 1.25em; }
@media (max-width: 1180px) {   .hud-actions .btn.small { padding: 8px 12px; } }
@media (max-width: 860px) { .logout-btn span { display: none; } .logout-btn { padding: 8px 12px; } }

.avatar-row .av-pick { min-width: 120px; } .avatar-row .kid-face { width: 84px; height: 84px; }
.break-scene { display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.set-row select { min-height: 48px; max-width: 260px; } .set-tip { margin: 2px 0 8px; font-size: .85rem; color: var(--muted); }

.adventure-dock.show { display: block; animation: slidein .3s ease; }

/* ======================= Phase 3 ======================= */
.art { display: block; height: auto; flex: none; filter: drop-shadow(0 6px 6px rgba(31, 59, 42, .14)); -webkit-user-drag: none; }

/* weather budgie */

.wx { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wx-bird { position: relative; z-index: 2; animation: wxFloat 4s ease-in-out infinite; }
.wx-say { position: relative; z-index: 2; background: #fff; border-radius: 16px; padding: 6px 12px; box-shadow: 0 4px 0 var(--line); text-align: center; display: flex; flex-direction: column; line-height: 1.2; }
.wx-say b { font-size: .95rem; } .wx-say span { font-size: .82rem; color: var(--ink-2); font-weight: 700; }
.wx-fx { position: absolute; inset: -10% -14% 30%; overflow: hidden; pointer-events: none; z-index: 1; border-radius: 50%; }
.wx-fx i { position: absolute; display: block; }
.wx-fx .drop { top: -10%; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(#BFE8FF, #4FA8EC); animation: wxRain .9s linear infinite; }
.wx-fx .flake { top: -10%; color: #fff; font-size: 14px; text-shadow: 0 0 3px #8ED1F2; animation: wxSnow 4s linear infinite; }
.wx-fx .leaf { left: -10%; width: 14px; height: 9px; border-radius: 0 100% 0 100%; background: #FF9A3D; animation: wxWind 3s linear infinite; }
.wx-fx .twinkle { width: 6px; height: 6px; border-radius: 50%; background: #FFE77A; box-shadow: 0 0 6px #FFE77A; animation: wxTwinkle 2s ease-in-out infinite; }
.wx-fx .flash { inset: 0; background: rgba(255, 255, 255, .9); opacity: 0; animation: wxFlash 6s infinite; }
.wx-fx .mist { left: -30%; width: 160%; height: 30%; border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(6px); animation: wxMist 7s ease-in-out infinite alternate; } .wx-fx .m1 { top: 30%; } .wx-fx .m2 { top: 60%; animation-delay: -3s; }
.wx-fx .rays { left: 10%; top: 0; width: 60%; aspect-ratio: 1; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 225, 90, .35) 0 10deg, transparent 10deg 30deg); animation: inSpin 16s linear infinite; }
.wx-fx .drift { left: 0; top: 10%; width: 40%; height: 20%; border-radius: 50%; background: rgba(255, 255, 255, .7); filter: blur(4px); animation: wxDrift 9s ease-in-out infinite alternate; }
.wx-moon .wx-bird { animation-duration: 6s; } .wx-storm .wx-bird { animation: wxShiver 3s ease-in-out infinite; }
@keyframes wxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px) rotate(-1deg); } }
@keyframes wxRain { to { transform: translateY(260px); } }
@keyframes wxSnow { 0% { transform: translateY(0) translateX(0) rotate(0); } 100% { transform: translateY(240px) translateX(20px) rotate(240deg); } }
@keyframes wxWind { 0% { transform: translateX(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(320px) translateY(30px) rotate(540deg); opacity: 0; } }
@keyframes wxTwinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes wxFlash { 0%, 92%, 100% { opacity: 0; } 93% { opacity: .85; } 95% { opacity: 0; } 96% { opacity: .6; } }
@keyframes wxMist { to { transform: translateX(18%); } }
@keyframes wxDrift { to { transform: translateX(140%); } }
@keyframes wxShiver { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-2px) translateY(-3px); } }

/* art in context */
.vk-art { display: inline-block; vertical-align: middle; margin-right: 8px; }
.resume-card .rc-sleep { margin: -16px 0 -10px -6px; }
.ys-art { display: inline-block; vertical-align: middle; margin-right: 4px; }
.sp-art { width: 40px; height: auto; margin-right: 2px; }
.done-star { margin-bottom: -10px; animation: popin .5s ease .2s both; }
.rc-art { width: 52px; } .rcard .rc-ico:has(.rc-art) { width: 64px; height: 64px; background: transparent; }

.btn-art { width: 36px; height: 36px; margin: -8px 0; object-fit: contain; }
.chip-art { width: 26px; height: 26px; margin: -4px 0; object-fit: contain; }

.set-h { margin: 14px 0 2px; font-size: 1.05rem; color: var(--leaf-d); }
/* Speed Garden */
.g-hero { display: flex; align-items: center; gap: 16px; justify-content: center; background: #fff; border-radius: 28px; padding: 12px 20px; box-shadow: 0 6px 0 var(--line); }
.g-hero .lead { text-align: left; margin: 0; }
.g-timer { display: flex; width: fit-content; margin: 16px auto; }
.g-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.g-mode { border: 0; border-radius: 26px; background: #fff; padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 7px 0 #F2B6C2, inset 0 0 0 4px #FFD6DE; min-height: 170px; }
.g-mode:active { transform: translateY(5px); box-shadow: 0 2px 0 #F2B6C2, inset 0 0 0 4px #FFD6DE; }
.g-op { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; font-weight: 900; color: #fff; background: radial-gradient(circle at 32% 28%, #FFC2CE, #FF8FA3 60%, #E0607A); box-shadow: 0 5px 0 #C2415E; }
.g-mode b { font-size: 1.2rem; } .g-mode small { color: var(--muted); font-weight: 700; }
.garden-play { flex: 1; display: flex; flex-direction: column; padding: 10px 16px 18px; gap: 12px; max-width: 1280px; width: 100%; margin: 0 auto; position: relative; }
.g-main { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
@media (orientation: portrait), (max-width: 860px) { .g-main { grid-template-columns: 1fr; } }
.g-clock i { background: linear-gradient(90deg, #FF8FA3, #FFE15A); transition: width .2s linear; }
.g-fact { min-height: 300px; }
.g-correction { text-align: center; color: var(--petal-d); font-weight: 800; animation: popin .3s ease; } .g-correction .q-expr { color: var(--ink); }
.g-bed { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 60px; width: 100%; padding: 8px; border-radius: 18px; background: linear-gradient(180deg, transparent 55%, #CDEBBE 55%, #A8D98E); }
.g-bed.big { max-width: 640px; }
.g-flower { width: 40px; height: 46px; animation: grow .45s cubic-bezier(.2, 1.5, .4, 1) both; transform-origin: 50% 100%; }
@keyframes grow { from { transform: scale(0); } to { transform: scale(1); } }
.g-count { margin: 0; font-weight: 900; color: var(--leaf-d); }
.g-mascot { align-self: center; animation: wxFloat 3s ease-in-out infinite; }
.g-pausebox { position: absolute; inset: 70px 16px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(234, 248, 255, .94); border-radius: 30px; font-size: 1.5rem; z-index: 5; }
/* reports */
.rep-head { display: flex; align-items: center; gap: 14px; } 
.rep-student h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .rep-student h2 .budgie, .rep-student h2 .kid-face { width: 44px !important; }
.rep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .rep-cols ul { margin: 0; padding-left: 20px; font-weight: 700; }
.dl { font-size: .8rem; font-weight: 900; } .dl.up { color: var(--leaf-d); } .dl.down { color: var(--petal-d); } .dl.eq { color: var(--muted); }
@media print { .rep-cols { grid-template-columns: 1fr 1fr; } .rep-student { page-break-inside: avoid; } }
/* accessibility modes */
body { font-size: 1.19rem; }
html.text-l { font-size: 112.5%; } html.text-xl { font-size: 125%; }
html.text-l .q-expr, html.text-xl .q-expr { font-size: clamp(2.6rem, 6.2vw, 4rem); }
html.contrast { --ink: #000; --ink-2: #111; --muted: #2B3A30; --line: #6B7F70; }
html.contrast body { background: #fff; }
html.contrast .qcard, html.contrast .mc-btn, html.contrast .cmp-btn, html.contrast .kp-key, html.contrast .card, html.contrast .dcard, html.contrast .bubble, html.contrast .rcard, html.contrast .rsec { box-shadow: 0 0 0 3px #000 !important; }
html.contrast .btn.leaf { --b: #1E6B2A; } html.contrast .muted, html.contrast small { color: #222 !important; }
html.dyslexia body { letter-spacing: .05em; word-spacing: .16em; line-height: 1.7; }
html.dyslexia .q-text p, html.dyslexia .tu-text, html.dyslexia .verse-text { line-height: 1.8; }

/* big, finger-friendly sliders */
.slider { display: flex; align-items: center; gap: 10px; }
.slider output { min-width: 3.2em; text-align: right; font-weight: 900; color: var(--leaf-d); font-variant-numeric: tabular-nums; }
.set-row input[type=range] { -webkit-appearance: none; appearance: none; width: min(240px, 46vw); height: 44px; background: transparent; margin: 0; touch-action: pan-y; cursor: pointer; }
.set-row input[type=range]::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--leaf), var(--sky)); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .12); }
.set-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -12px; border-radius: 50%; background: #fff; border: 4px solid var(--leaf-d); box-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.set-row input[type=range]::-moz-range-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--leaf), var(--sky)); }
.set-row input[type=range]::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 4px solid var(--leaf-d); }
.icon-btn.snd.off { background: #FFE6EA; color: var(--petal-d); box-shadow: 0 4px 0 #F2B6C2; }
.modal { overscroll-behavior: contain; }

/* the top bar (mute, My Results, language, Log out) stays tappable even when a pop-up or the tutor is open */
.modal-back, .tutor-back { top: calc(var(--top) + 8px); }
.modal { top: calc(50% + var(--top) / 2); max-height: calc(100dvh - var(--top) - 28px); }

/* ---------- official logo ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand-logo { height: 48px; width: auto; display: block; filter: drop-shadow(0 2px 2px rgba(31, 59, 42, .12)); }
.hero-logo { margin: 0; flex: 1 1 520px; max-width: 680px; }
.kairos-logo { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 14px rgba(31, 59, 42, .16)); -webkit-user-drag: none; }
.kairos-logo.bob { animation: logoBob 5s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes logoBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-.6deg); } }
.about-logo { width: 190px; height: auto; margin: 0 auto 4px; display: block; }
.rep-logo { width: 150px; height: auto; } .rep-head .rep-sub { font-size: 1.1rem; font-weight: 800; margin: 0; }
/* intro: letters land in the logo's own colors, then the logo takes over */
.in-title { font-family: "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif; letter-spacing: .02em; -webkit-text-stroke: 0; paint-order: stroke fill; text-shadow: none; }
.in-l.b { color: #3FC8F0; -webkit-text-stroke: 7px #123B7A; text-shadow: 0 8px 0 #123B7A, 0 0 0 transparent; }
.in-l.y { color: #FFD43B; -webkit-text-stroke: 7px #123B7A; text-shadow: 0 8px 0 #123B7A; }
.in-zoom { animation: inZoom 2.2s cubic-bezier(.16, .84, .24, 1) both, inGone .45s ease 2.05s forwards; }
@keyframes inGone { to { opacity: 0; transform: scale(1.35); filter: blur(6px); } }
.in-logo { position: absolute; width: min(760px, 88vw); opacity: 0; animation: inLogo .9s cubic-bezier(.2, 1.35, .4, 1) 2.15s both; }
.in-logo .kairos-logo { filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .28)); }
@keyframes inLogo { 0% { opacity: 0; transform: scale(2.6); filter: blur(10px); } 60% { opacity: 1; transform: scale(.94); filter: blur(0); } 100% { opacity: 1; transform: scale(1); } }
.in-spark { position: absolute; width: 26px; height: 26px; opacity: 0; background: radial-gradient(circle, #fff 0 18%, #FFE15A 20% 45%, transparent 48%); animation: inSpark 1.1s ease-out both; }
.in-spark::before, .in-spark::after { content: ""; position: absolute; left: 50%; top: -60%; width: 3px; height: 220%; margin-left: -1.5px; background: linear-gradient(transparent, #fff, transparent); }
.in-spark::after { transform: rotate(90deg); }
.s1 { left: 6%; top: 52%; animation-delay: 2.8s; } .s2 { right: 6%; top: 50%; animation-delay: 2.95s; } .s3 { left: 46%; top: 6%; animation-delay: 3.1s; } .s4 { right: 22%; bottom: 4%; animation-delay: 3.25s; }
@keyframes inSpark { 0% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1.4) rotate(45deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg); } }
@media (orientation: portrait) { .hero-logo { flex-basis: 100%; } }

/* ---------- top bar: logo | home button (centered) | settings ---------- */
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.topbar .brand { justify-self: start; }
.topbar .top-actions { justify-self: end; }
.seg .ls { display: none; }
@media (max-width: 1240px) { .top-lang .lf { display: none; } .top-lang .ls { display: inline; } .top-lang button { min-width: 44px; padding: 8px 10px; } }

/* ---------- interactive adventure map ---------- */

/* =========== kit-3 lands (Phase 4): path, landmarks, castle and the budgies on the map =========== */

/* =========== medallions set INTO the painted platforms (v3.1.1) ===========
   The button is exactly the stone top's ellipse, so everything inside follows the platform's perspective. */

/* ---------- PIN screens on short landscape iPads: greeting left, keypad right (whole keypad on screen) ---------- */
@media (orientation: landscape) and (max-height: 860px) {
  body[data-screen="pin"] .center-col, body[data-screen="profSetup"] .center-col, body[data-screen="profLogin"] .center-col {
    width: min(1000px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); column-gap: 48px; row-gap: 8px;
    align-items: center; justify-items: center; align-content: center; padding: 12px 24px; min-height: calc(100dvh - var(--top) - 8px); grid-auto-flow: dense; }
  body[data-screen="pin"] .center-col > *, body[data-screen="profSetup"] .center-col > *, body[data-screen="profLogin"] .center-col > * { grid-column: 1; }
  body[data-screen="pin"] .center-col > .pin-host, body[data-screen="profSetup"] .center-col > .pin-host, body[data-screen="profLogin"] .center-col > .pin-host { grid-column: 2; grid-row: 1 / span 8; align-self: center; width: 100%; }
  body[data-screen="pin"] .pin-host .pin, body[data-screen="profSetup"] .pin-host .pin, body[data-screen="profLogin"] .pin-host .pin { width: 100%; }
}

/* ---------- main forward buttons always on screen (they stay pinned to the bottom edge while content scrolls) ---------- */
.verse-actions, .level-done .lc-actions, .wiz-body > [data-next], .lesson-nav {
  position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 15; }
.verse-actions, .level-done .lc-actions {
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 28px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(31, 59, 42, .16); width: fit-content; margin-left: auto; margin-right: auto; }
.wiz-body > [data-next] { box-shadow: 0 6px 0 var(--leaf-d), 0 10px 24px rgba(31, 59, 42, .22); }
.lesson-nav { background: linear-gradient(180deg, rgba(234, 248, 255, 0), rgba(234, 248, 255, .92) 35%); padding-top: 18px; }

/* Parent v2 (Phase 5, 5g): NYS standards by grade and the dinner table */
.nys-grade h4 { margin: 14px 0 6px; font-size: 1.05rem; }
.nys-meter { display: block; height: 10px; border-radius: 99px; background: #E3EEDF; overflow: hidden; margin-bottom: 8px; }
.nys-meter > i { display: block; height: 100%; background: var(--leaf); border-radius: 99px; }
.nys-dom h5 { margin: 10px 0 4px; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.nys-dom ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nys-dom li { display: grid; grid-template-columns: 8.5em 1fr auto; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 12px; background: #F6FAF4; }
.nys-dom li.nys-mastered { background: #E8F6E1; } .nys-dom li.nys-learning { background: #FFF6DC; }
.nys-code { font-variant-numeric: tabular-nums; font-size: .85rem; }
.nys-skills { font-size: .9rem; min-width: 0; }
.nys-state { font-style: normal; font-weight: 800; font-size: .82rem; white-space: nowrap; }
@media (max-width: 560px) { .nys-dom li { grid-template-columns: 1fr auto; } .nys-skills { grid-column: 1 / -1; grid-row: 2; } }
.dinner { margin: 6px 0 0; padding-left: 1.4em; display: grid; gap: 10px; }
.dinner p { margin: 2px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dinner .d-lbl { font-weight: 800; color: var(--muted); }
@media print { .no-print { display: none !important; } .nys-dom li { page-break-inside: avoid; } }

/* a weak level's end: Blue's training path (Phase 5, 5c) */
.boost-offer { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); margin: 6px auto 4px; padding: 10px 14px; border-radius: 22px; background: #EAF5FF; border: 2px solid #9FCDF2; text-align: left; }
.boost-offer .bo-art { width: 64px; height: 72px; object-fit: contain; flex: none; }
.boost-offer .bo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.boost-offer .bo-text b { font-size: 1.05rem; font-weight: 900; color: #1D4F86; }
.boost-offer .bo-text span { font-size: .92rem; color: #2B4A63; }
.boost-offer .btn { flex: none; min-height: 48px; }
@media (max-width: 520px) { .boost-offer { flex-wrap: wrap; } .boost-offer .btn { width: 100%; } }

/* messages never block taps, and appear under the top bar instead of on top of the main buttons */
#toast { pointer-events: none; top: calc(var(--top) + 12px); bottom: auto; transform: translate(-50%, -30px); box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }
#toast.show { transform: translate(-50%, 0); }

/* ---------- "Your Turn": question left, answer right, so the answer controls are always in view ---------- */
.tu-your-grid { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.tu-answer { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 0; }
.tu-answer .answer-host { width: 100%; }
.tutor .tu-your-grid .visual svg.vis { max-height: 40vh; }
.tutor .tu-answer .kp-key { min-height: 54px; }
.tutor .tu-answer .kp-val { min-height: 56px; font-size: 1.8rem; }
@media (max-width: 700px) { .tu-your-grid { grid-template-columns: 1fr; } }
/* compact clock control on short screens and inside the tutor */
@media (max-height: 820px) { .clk-face svg { width: 150px; height: 150px; } .clk-wrap { gap: 6px; padding: 10px; } .clk-btn { min-height: 50px; min-width: 62px; } .clk-read { font-size: 1.6rem; } .clk-check { min-height: 54px; } }
.tutor .clk-face svg { width: 140px; height: 140px; }
.tutor .clk-wrap { gap: 6px; padding: 10px; } .tutor .clk-btn { min-height: 48px; min-width: 58px; } .tutor .clk-read { font-size: 1.5rem; }
/* portrait iPads are wide enough for question + answer side by side: keeps the keypad on screen */
@media (orientation: portrait) and (min-width: 740px) { .pr-main { grid-template-columns: minmax(0, 1.15fr) minmax(290px, 1fr); } .pr-main .qcard .visual svg.vis { max-height: 44vh; } }
/* answer buttons share the column evenly and wrap long words instead of pushing off screen */
.mc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mc.long { grid-template-columns: minmax(0, 1fr); }
.mc-btn { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

/* ---------- logo = home button ---------- */
.brand-home { flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; padding: 2px 8px 2px 4px; margin-left: -4px; border-radius: 14px; cursor: pointer; color: var(--leaf-d); -webkit-tap-highlight-color: transparent; }
.brand-home:hover, .brand-home:focus-visible { background: var(--leaf-l); }
.brand-home:focus-visible { outline: 3px solid var(--leaf-d); outline-offset: 2px; }
.brand-home:active { transform: translateY(2px); }
.brand-home-label { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; line-height: 1; padding-left: 4px; }
.brand-home-label svg { width: 13px; height: 13px; flex: none; }
.brand-home.here .brand-home-label { color: var(--ink); }

.credit-link { display: inline-block; margin-top: 8px; padding: 10px 14px; min-height: 44px; font-weight: 800; color: var(--leaf-d); text-decoration: underline; }
.credit small { display: inline-block; max-width: 62ch; line-height: 1.5; }

/* ---------- map HUD on phones: show every chip and button instead of hiding some off-screen ---------- */
.hud-actions { flex-wrap: wrap; }
@media (max-width: 700px) {

  .hud-actions { flex: 1 1 100%; justify-content: flex-start; }
  .hud-actions .btn.small[data-finish] { margin-left: auto; white-space: nowrap; }
}

/* ---------- very small phones: keep logo, language tabs, sound and logout on one row without touching ---------- */
@media (max-width: 420px) {
  .topbar { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .brand-logo { height: 38px; }
  .brand-home { padding: 2px 4px 2px 2px; margin-left: -2px; }
  .brand-home-label { font-size: .66rem; padding-left: 2px; }
  .top-actions { gap: 6px; }
  .top-lang { padding: 3px; }
  .top-lang button { min-width: 38px; padding: 6px 4px; }
  .topbar .icon-btn { width: 44px; height: 44px; border-radius: 14px; }
  .topbar .top-actions .btn.small { padding: 8px 10px; min-height: 44px; }
}

/* ---------- profile picture picker: all choices in an even, wrapping grid ---------- */
.avatar-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px; justify-items: stretch; }
.avatar-row .av-pick { min-width: 0; padding: 12px 8px; align-items: center; justify-content: center; min-height: 112px; cursor: pointer; }
.avatar-row .av-pick .kid-face { width: 84px; height: 84px; }
.choice-card:focus-visible { outline: 4px solid var(--leaf-d); outline-offset: 3px; }
/* new illustrated portraits: show the whole head and shoulders (hair is never cropped) */
.kid-face.kid-art { object-fit: contain; padding: 9%; box-sizing: border-box; }
@media (max-width: 420px) { .avatar-row { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; } .avatar-row .av-pick .kid-face { width: 72px; height: 72px; } }
@media (prefers-reduced-motion: no-preference) { .avatar-row .av-pick { transition: transform .12s ease; } .avatar-row .av-pick:hover { transform: translateY(-2px); } }
.avatar-row { width: 100%; max-width: 640px; }
/* centered rows of equal-sized cards */
.avatar-row { display: flex; flex-wrap: wrap; justify-content: center; }
.avatar-row .av-pick { flex: 0 0 112px; width: 112px; }
@media (max-width: 420px) { .avatar-row .av-pick { flex-basis: 96px; width: 96px; min-height: 100px; } }

/* ---------- Professor Kairos (js/kairos.js) ---------- */
/* every pose is a cut-out figure on the blue panel (.k-fig); the old 2×2 sheet left in 2026.19 (post-cleanup audit X-3) */
.kairos-sprite { display: inline-block; flex-shrink: 0; background: #2C5C93; border-radius: 18px; box-shadow: 0 4px 0 var(--line); }
/* kit 9: cut-out figures on the same blue panel as the sheet poses */
.kairos-sprite.k-fig { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 28%, #4B86C4 0%, #2C5C93 62%, #234B7A 100%); }
.kairos-sprite.k-fig img { position: absolute; left: 50%; bottom: 0; height: 94%; width: auto; transform: translateX(-50%); pointer-events: none; -webkit-user-drag: none; }
.kc-frame .kairos-clip.kc-film { border-radius: 18px; overflow: hidden; box-shadow: 0 4px 0 var(--line); }
/* David's Professor films in the coach's 5:4 frame (the same box as his poses), and the held last frame */
.kairos-clip.kc-film { background: #2C5C93; border-radius: 18px; }
.kairos-clip.k-held img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kairos-clip.idea-film { flex: none; border-radius: 18px; background: #E9E4DC; }
.verse-why { display: flex; gap: 12px; align-items: center; text-align: left; } 

/* Build 2.24.10: the Professor acts (David: "can you animate also professor kairos too?"). The panel only fades up;
   the figure does the acting. .k-body breathes slowly from the feet for as long as he is on screen; the figure plays
   one short acting beat for its pose, with anticipation, squash and stretch and a soft overshoot, using the individual
   translate / rotate / scale properties so the centring transform stays. Reduce Motion stops all of it (rules above). */
.kairos-sprite.k-fig { animation: kPanel .4s ease-out both; }
.kairos-sprite .k-body { position: absolute; inset: 0; transform-origin: 50% 100%; animation: kBreathe 3.8s cubic-bezier(.45,0,.55,1) .9s infinite; }
.kairos-sprite.k-fig img { transform-origin: 50% 100%; animation: kPresent 1.1s cubic-bezier(.3,0,.3,1) .12s both; }
.kairos-sprite.k-point img { animation-name: kPoint; }
.kairos-sprite.k-wow img, .kairos-sprite.k-celebrate img { animation: kJump .78s linear .15s 2 both; }
.kairos-sprite.k-think img { animation: kPonder 2.4s cubic-bezier(.45,0,.55,1) .12s both; }
.kairos-sprite.k-listen img { animation: kLean 1.6s cubic-bezier(.45,0,.55,1) .12s both; }
.kairos-sprite.k-open img { animation: kHeart 1.6s cubic-bezier(.45,0,.55,1) .12s both; }
.kairos-sprite.k-chalk img { animation: kChalk 1.8s cubic-bezier(.45,0,.55,1) .12s both; }
.kairos-sprite.k-bible img { animation: kRead 2s cubic-bezier(.45,0,.55,1) .12s both; }
.kairos-sprite.k-bye img { animation: kWave 1.8s cubic-bezier(.45,0,.55,1) .12s both; }
@keyframes kPanel { from { transform: translateY(6px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kBreathe { 0%, 100% { transform: none; } 45% { transform: scale(1.012, 1.018); } }
/* opening his arms to present: a small step back, then a warm lean in, then settle */
@keyframes kPresent { 0% { translate: 0 6%; scale: .96 1.03; } 22% { translate: 0 0; rotate: -2deg; scale: 1.02 .98; } 55% { rotate: 2.2deg; scale: .99 1.015; } 78% { rotate: -.6deg; } 100% { rotate: 0deg; scale: 1; translate: 0 0; } }
@keyframes kPoint { 0% { translate: 0 5%; } 25% { rotate: -3deg; scale: 1.02 .98; } 48% { rotate: 3.5deg; translate: 2% 0; scale: .99 1.02; } 75% { rotate: 2.5deg; translate: 1.5% 0; } 100% { rotate: 0deg; translate: 0 0; scale: 1; } }
/* a joyful jump: crouch, stretch up, hang, stretch down, squash on landing, settle */
@keyframes kJump {
  0% { translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(.3,0,.6,1); }
  18% { scale: 1.06 .92; animation-timing-function: cubic-bezier(.2,.6,.4,1); }
  34% { translate: 0 -3.5%; scale: .96 1.05; }
  50% { translate: 0 -5%; rotate: 1.5deg; scale: 1; animation-timing-function: cubic-bezier(.5,0,.9,.5); }
  70% { translate: 0 -1%; scale: .97 1.04; }
  78% { translate: 0 0; scale: 1.07 .92; animation-timing-function: cubic-bezier(.2,.7,.4,1); }
  90% { scale: .99 1.02; rotate: 0deg; }
  100% { translate: 0 0; scale: 1; } }
@keyframes kPonder { 0% { rotate: 0deg; } 30% { rotate: 2.6deg; translate: 1% 0; } 75% { rotate: 2.2deg; translate: .8% 0; } 100% { rotate: 0deg; translate: 0 0; } }
@keyframes kLean { 0% { rotate: 0deg; } 35% { rotate: -3deg; translate: 0 1.5%; } 55% { rotate: -2deg; translate: 0 .5%; } 72% { rotate: -2.6deg; translate: 0 1.2%; } 100% { rotate: 0deg; translate: 0 0; } }
@keyframes kHeart { 0% { scale: 1; } 30% { rotate: -2.2deg; scale: 1.02 1.01; } 60% { rotate: -1.4deg; scale: 1.015; } 100% { rotate: 0deg; scale: 1; } }
@keyframes kChalk { 0%, 100% { rotate: 0deg; translate: 0 0; } 20% { rotate: 1.4deg; } 40% { rotate: -.8deg; translate: 0 .8%; } 60% { rotate: 1.2deg; } 80% { rotate: -.4deg; translate: 0 .4%; } }
@keyframes kRead { 0% { rotate: 0deg; } 35% { rotate: 1.8deg; translate: 0 1.5%; } 70% { rotate: 1.2deg; translate: 0 1%; } 100% { rotate: 0deg; translate: 0 0; } }
@keyframes kWave { 0%, 100% { rotate: 0deg; } 20% { rotate: -2.5deg; } 45% { rotate: 2.5deg; } 70% { rotate: -1.5deg; } 88% { rotate: .8deg; } }
.kairos-coach { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kairos-coach .kc-talk { display: contents; }
.kairos-coach .bubble { order: -1; }
.kairos-coach .kc-line { order: 2; }
/* wide practice screen: the coach sits under the question, talking to the right */
@media (orientation: landscape) and (min-width: 861px) {
  .pr-main > .qcard { grid-column: 1; grid-row: 1; }
  .pr-main > .acol { grid-column: 2; grid-row: 1 / span 2; }
  .pr-main > .buddy-host { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .pr-main > .buddy-host .kairos-coach { flex-direction: row; align-items: center; gap: 30px; }
  .pr-main > .buddy-host .kc-talk { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .pr-main > .buddy-host .kc-line { text-align: left; }
  .pr-main > .buddy-host .bubble { text-align: left; }
  .pr-main > .buddy-host .bubble::after { left: -12px; top: 50%; bottom: auto; border: 12px solid transparent; border-right-color: #fff; border-left: 0; transform: translateY(-50%); }
}
.kairos-coach .kc-frame { position: relative; display: inline-block; }
.kairos-coach .kc-bird { position: absolute; right: -26px; bottom: -14px; }
.kairos-coach .kc-line { margin: 4px 0 0; max-width: 20em; text-align: center; font-size: .92em; color: var(--muted); }
.kairos-coach .kc-line b { display: block; font-size: .8em; letter-spacing: .04em; text-transform: uppercase; color: #2C5C93; }

.lesson-kairos { display: flex; align-items: center; justify-content: center; gap: 14px; }
.lesson-kairos .tu-kicker { margin: 0; }
@media (max-width: 560px) { .kairos-coach .kc-bird { right: -10px; } }
.mt-host { width: 100%; max-width: 680px; margin: 0 auto; }
.kairos-clip { display: inline-block; overflow: hidden; border-radius: 20px; background: #EFE6D6 center / cover; box-shadow: 0 5px 0 var(--line); }
.kairos-clip video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 420px) { .kairos-clip.done-film { width: 260px !important; height: 146px !important; } }

/* ---------- Phase 3: the tutor level (tutor/runner.js) and Blue's sharing blocks (manipulatives/share.js) ---------- */
.run-stage { display: block; font-size: .78rem; font-weight: 800; color: var(--sky-d); }
.run-ask { margin: 0 0 10px; font-weight: 900; font-size: 1.15rem; color: var(--ink); text-align: center; }
.cast .bubble { text-align: left; }
.cast .who { display: block; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--sky-d); }
.cast-sol .who { color: var(--sun-d); } .cast-coco .who { color: var(--petal-d); }
.bubble .read { width: 44px; height: 44px; margin-left: 6px; vertical-align: middle; }
.blocks-host { margin-top: 12px; align-self: stretch; }
.share { display: flex; flex-direction: column; gap: 10px; }
.sh-pool { background: var(--bark-l); border-radius: var(--r-md); padding: 8px 12px; }
.sh-lab { font-weight: 900; font-size: .85rem; color: var(--bark-d); }
.sh-blocks { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; min-height: 52px; }
.sh-rod { display: inline-block; width: 12px; height: 50px; border-radius: 3px; background: repeating-linear-gradient(180deg, var(--sky-d) 0 4px, #5FA7DD 4px 5px); box-shadow: inset 0 0 0 1.5px #1D5E8F; }
.sh-cube { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--sun); box-shadow: inset 0 0 0 1.5px var(--sun-d); }
.sh-flat { display: inline-block; width: 50px; height: 50px; border-radius: 4px; background: repeating-linear-gradient(90deg, transparent 0 4px, #5FA7DD 4px 5px), repeating-linear-gradient(180deg, var(--leaf) 0 4px, #8FD07A 4px 5px); box-shadow: inset 0 0 0 1.5px var(--leaf-d); }
.sh-nest .sh-flat { width: 34px; height: 34px; }
.sh-btn .sh-flat { width: 26px; height: 26px; }
.sh-empty { font-weight: 800; color: var(--leaf-d); align-self: center; }
.sh-nests { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sh-nests.many { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.sh-nest { position: relative; background: #FBF4E8; border: 3px solid var(--bark); border-radius: 18px 18px 40px 40px; padding: 8px 6px 18px; }
.sh-nest .sh-blocks { justify-content: center; min-height: 40px; }
.sh-n { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); font-size: .75rem; font-weight: 900; color: var(--bark-d); }
.manip { display: flex; flex-direction: column; gap: 10px; }
.manip > .m-body { display: contents; } /* the tool's drawing; the spoken line beside it stays put (review A1) */
.m-msg { margin: 0; min-height: 2.6em; font-weight: 800; color: var(--ink); }
.m-tools { display: flex; gap: 8px; align-items: center; }
.sh-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sh-btn { min-height: 60px; padding: 8px 14px; font-size: .95rem; gap: 6px; }
.sh-btn[aria-disabled="true"] { opacity: .55; }
.sh-btn .sh-rod { height: 30px; width: 9px; } .sh-btn .sh-cube { width: 10px; height: 10px; }
/* budgies sit on a branch instead of floating (tutor/runner.js perch); Professor Kairos teaches at his board */
.perch { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.perch-bird { display: block; width: auto; position: relative; z-index: 1; margin-bottom: -14%; transform-origin: 50% 100%; }
.perch-branch { display: block; width: 100%; height: auto; }
.anim .perch-bird, .cast .perch-bird { animation: perch-nod 3.6s ease-in-out infinite; }
@keyframes perch-nod { 0%, 82%, 100% { transform: rotate(0); } 88% { transform: rotate(-5deg); } 94% { transform: rotate(3deg); } }
body.reduce-motion .perch-bird { animation: none; }
.tu-head.k-lead { align-items: flex-end; }
.tu-head.k-lead .perch { margin-left: -22px; }
.k-idea { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; max-width: 46em; }
.k-board { flex: 1; background: #2F4A3A; color: #F7F3E6; border: 8px solid #8A5A2B; border-radius: 16px; padding: 14px 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, .12); }
.k-board .k-name { margin: 0 0 4px; font-size: .8rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: #FFD23F; }
.k-board .k-say { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.4; }
.k-pic { width: 100%; max-width: 46em; display: flex; flex-direction: column; gap: 10px; }
.lesson-idea { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.btn .k-mini { flex: none; }
@media (max-width: 739px) {
  .k-idea { flex-direction: column; gap: 6px; }
  .lesson-intro.with-prof > .trio > .budgie:last-child { display: none; }
  .k-idea .kairos-sprite { width: 120px !important; height: 96px !important; }
  .k-idea .kairos-clip.idea-film { width: 220px !important; height: 124px !important; }
  .k-board .k-say { font-size: 1.1rem; }
  .tu-head.k-lead .kairos-sprite { width: 84px !important; height: 67px !important; }
  .tu-head.k-lead .perch { display: none; }
  .tu-head.k-lead .tu-kicker { font-size: .85rem; }
  .tu-head.k-lead h3 { font-size: 1.2rem; }
}
/* kit 5 in the nest and shop; the films in the mini-lesson */
.nest-care { display: flex; justify-content: center; gap: 10px; margin: -4px 0 12px; }
.nest-care .btn img { width: 28px; height: 28px; }
.care-bird { display: block; width: 150px; height: 150px; }
.shop-prev img { max-width: 110px; max-height: 110px; }
.lesson-film { max-width: 100%; }
.kairos-clip.lesson-film { aspect-ratio: 16 / 9; height: auto !important; }
@media (max-width: 420px) { .kairos-clip.lesson-film { width: 260px !important; } }
kairos-budgie.perch-bird { display: block; position: relative; z-index: 1; margin-bottom: -18%; }
/* the child's outfit on an animated budgie (KM.Budgie.animAcc, 2026-11-30): it sits in the player's slot over the
   sprite (inset 8% like the sprite), and only the drawing for the pose on screen shows; other poses show none */
kairos-budgie > .kb-acc { position: absolute; inset: 8%; pointer-events: none; }
kairos-budgie > .kb-acc > .bd-acc { display: none; }
kairos-budgie:not([data-frame]) > .kb-acc > [data-c~="0"],
kairos-budgie[data-frame="0"] > .kb-acc > [data-c~="0"],
kairos-budgie[data-frame="1"] > .kb-acc > [data-c~="1"],
kairos-budgie[data-frame="2"] > .kb-acc > [data-c~="2"],
kairos-budgie[data-frame="3"] > .kb-acc > [data-c~="3"],
kairos-budgie[data-frame="4"] > .kb-acc > [data-c~="4"],
kairos-budgie[data-frame="5"] > .kb-acc > [data-c~="5"],
kairos-budgie[data-frame="6"] > .kb-acc > [data-c~="6"],
kairos-budgie[data-frame="7"] > .kb-acc > [data-c~="7"] { display: block; }
kairos-budgie:not(:defined) > .kb-acc { display: none; }
/* the animated budgies breathe, blink and tilt on their own (budgie-player v2); no extra metronome nod on top */
.anim kairos-budgie.perch-bird, .cast kairos-budgie.perch-bird { animation: none; }
/* Phase 4 tools (manipulatives/*.js): shared buttons, then one block per tool. Every target ≥ 60 px tall; every
   shaded or chosen thing also shows a number or a mark, so colour is never the only signal. */
.m-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.m-btn { min-height: 60px; padding: 8px 14px; font-size: .95rem; gap: 6px; }
.m-btn[aria-disabled="true"] { opacity: .55; }
.m-btn.small { min-height: 48px; padding: 6px 10px; font-size: .82rem; }
.m-count { margin: 0; font-size: 1.6rem; font-weight: 900; color: var(--leaf-d); text-align: center; }
/* array */
.ar-grid { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--sky-l); border-radius: var(--r-md); padding: 10px 12px; overflow-x: auto; }
.ar-row { display: flex; gap: 6px; align-items: center; }
.ar-lab { width: 22px; font-size: .75rem; font-weight: 900; color: var(--sky-d); text-align: right; }
.ar-dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px dashed #9CC3DE; box-sizing: border-box; }
.ar-dot.on { background: var(--sky-d); border: 2px solid #1D5E8F; }
.ar-left { margin-top: 6px; } .ar-left .ar-dot.on { background: var(--sun); border-color: var(--sun-d); } .ar-left .ar-lab { color: var(--sun-d); }
.ar-grid.wide .ar-dot { width: 16px; height: 16px; }
.ar-cut { width: 100%; border-top: 3px dashed var(--berry, #C2415E); margin: 2px 0; }
.m-btn .ar-dot { width: 16px; height: 16px; }
/* area model */
.ae-grid { display: flex; flex-direction: column; gap: 4px; min-height: 220px; }
.ae-row { display: flex; gap: 4px; }
.ae-row.ae-head { flex: 0 0 auto; }
.ae-corner, .ae-lab.side { flex: 0 0 56px; }
.ae-corner { text-align: center; font-weight: 900; color: var(--bark-d); }
.ae-lab { text-align: center; font-weight: 900; color: var(--leaf-d); display: flex; align-items: center; justify-content: center; }
.ae-cell { min-height: 60px; min-width: 60px; border: 3px solid var(--leaf-d); border-radius: 10px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; color: var(--ink); cursor: pointer; }
.ae-cell span { font-size: .8rem; font-weight: 700; }
.ae-cell b { font-size: 1.25rem; font-weight: 900; }
.ae-cell b.q { color: var(--leaf-d); }
.ae-cell.on { background: var(--leaf-l); }
/* number line */
.nl2 { display: block; max-width: 640px; margin: 0 auto; }
.nl-t { font: 800 22px var(--font, system-ui); fill: var(--ink, #2B2B2B); }
.nl-t.mid { fill: var(--sky-d); }
/* Blue's clock */
.mc-clock { display: flex; flex-direction: column; align-items: center; gap: 4px; } .mc-clock svg { width: 180px; height: 180px; } .mc-gone { font-size: 1rem; color: var(--sky-d); font-weight: 800; }
@media (max-height: 820px) { .mc-clock svg { width: 140px; height: 140px; } }
/* reading a clock (Grade 2): the question's clock, small, beside Blue's */
.mc-pair { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.mc-goal svg { width: 130px; height: 130px; } .mc-cap { margin: 0; font-weight: 800; color: var(--ink-2, #4A5A50); font-size: .95rem; }
@media (max-height: 820px) { .mc-goal svg { width: 112px; height: 112px; } }
.nl-t.n { fill: var(--leaf-d); font-size: 24px; }
/* fraction strips */
.st-rows { display: flex; flex-direction: column; gap: 10px; }
.st-row { display: flex; gap: 10px; align-items: center; }
.st-lab { flex: 0 0 48px; text-align: center; font-weight: 900; font-size: 1.1rem; color: var(--bark-d); }
.st-bar { flex: 1; display: flex; border: 3px solid var(--bark); border-radius: 10px; overflow: hidden; }
.st-part { flex: 1; min-height: 60px; min-width: 0; border: 0; border-left: 2px solid var(--bark); background: #fff; font: inherit; color: var(--bark-d); padding: 0; cursor: pointer; }
.st-part:first-child { border-left: 0; }
.st-part.on { background: repeating-linear-gradient(135deg, var(--sun) 0 8px, #FFE27A 8px 12px); }
.st-part small { font-size: .7rem; font-weight: 800; }
.st-row.fixed .st-part { cursor: default; }
.st-row.fixed .st-part.on { background: repeating-linear-gradient(135deg, var(--sky) 0 8px, #B5E1F7 8px 12px); }
/* place-value chart */
.pv-chart { display: flex; gap: 6px; overflow-x: auto; }
.pv-col { flex: 1 0 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--sun-l); border-radius: var(--r-md); padding: 8px 4px; border: 3px solid transparent; }
.pv-col.over { border-color: var(--sun-d); }
.pv-head { font-size: .75rem; font-weight: 900; color: var(--bark-d); text-align: center; line-height: 1.1; min-height: 2.2em; }
.pv-disks { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 64px; align-content: flex-start; }
.pv-disk { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 3px; border-radius: 13px; font-style: normal; font-size: .58rem; font-weight: 900; color: #fff; background: var(--sky-d); }
.pv-disk.p1 { background: var(--leaf-d); } .pv-disk.p2 { background: #C2415E; } .pv-disk.p3 { background: #7A4FB8; }  .pv-disk.p5 { background: #3E5A45; }
.pv-k { font-weight: 900; font-size: 1.2rem; color: var(--ink); }
.pv-k small { font-size: .8rem; color: #C2415E; }
.pv-acts { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.pv-acts .m-btn { width: 100%; justify-content: center; }
/* tape diagram */
.tp { display: flex; flex-direction: column; gap: 6px; }
.tp-whole, .tp-part { min-height: 60px; border: 3px solid var(--leaf-d); border-radius: 10px; background: #fff; font: inherit; font-weight: 900; font-size: 1.2rem; color: var(--ink); cursor: pointer; }
.tp-whole { width: 100%; border-style: solid solid dashed; }
.tp-bar { display: flex; gap: 4px; }
.tp-part { min-width: 44px; padding: 0 4px; }
.tp-whole.on, .tp-part.on { background: var(--leaf-l); }
.tp-whole.ask, .tp-part.ask { background: var(--sun-l); border-style: dashed; color: var(--sun-d); }
.share.anim .sh-nest .sh-blocks > :last-child { animation: pop .3s ease; }
body.reduce-motion .share .sh-nest .sh-blocks > :last-child { animation: none; }
.mc.words .mc-btn { font-size: 1.1rem; line-height: 1.25; padding: 12px 14px; min-height: 64px; }
/* phones: the blocks and the number pad must both be in reach. Portrait: the pad sticks to the bottom of the screen
   while the blocks scroll above it; landscape: blocks left, pad right. Keys stay ≥ 48 px. */
@media (max-width: 739px), (orientation: landscape) and (max-height: 560px) {
  .tutor-run.has-blocks .kp-display { height: 50px; font-size: 1.8rem; margin-bottom: 8px; }
  .tutor-run.has-blocks .kp-caret { height: 30px; }
  .tutor-run.has-blocks .kp-grid { gap: 7px; }
  .tutor-run.has-blocks .kp-key { min-height: 50px; font-size: 1.5rem; }
  .sh-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sh-btn { flex-direction: column; font-size: .78rem; line-height: 1.15; padding: 6px 4px; min-height: 64px; gap: 3px; text-align: center; }
  .sh-nests, .sh-nests.many { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
  .sh-rod { height: 40px; width: 10px; } .sh-cube { width: 10px; height: 10px; }
  .sh-blocks { min-height: 42px; gap: 3px; }
  .m-msg { min-height: 0; font-size: .95rem; }
  .m-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .m-btn { flex-direction: column; font-size: .78rem; line-height: 1.15; padding: 6px 4px; min-height: 64px; gap: 3px; text-align: center; }
  .m-btn.small { min-height: 48px; }
  .ar-dot { width: 16px; height: 16px; } .ar-grid.wide .ar-dot { width: 12px; height: 12px; } .ar-row, .ar-grid { gap: 4px; }
  .ae-corner, .ae-lab.side { flex-basis: 40px; } .ae-cell span { font-size: .68rem; } .ae-cell b { font-size: 1.05rem; }
  .pv-col { flex-basis: 64px; } .pv-disk { min-width: 20px; height: 20px; font-size: .5rem; }
  .st-lab { flex-basis: 36px; font-size: .95rem; }
}
.pad-toggle { display: none; }
@media (max-width: 739px) and (orientation: portrait) {
  .tutor-run.has-blocks:not(.pad-open) .acol .kp-grid, .tutor-run.has-blocks:not(.pad-open) .acol .clk-wrap { display: none; }
  .tutor-run.has-blocks:not(.pad-open) .pad-toggle { display: flex; width: 100%; margin-bottom: 8px; }
  .tutor-run.has-blocks .pr-main > .acol { position: sticky; bottom: 0; z-index: 5; background: rgba(255, 255, 255, .97); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 16px rgba(31, 59, 42, .12); padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); margin: 0 -8px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .tutor-run.has-blocks .pr-main { grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); }
  .tutor-run.has-blocks .pr-main > .qcard { grid-column: 1; grid-row: 1 / span 2; }
  .tutor-run.has-blocks .pr-main > .acol { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--top) + 8px); }
  .tutor-run.has-blocks .pr-main > .buddy-host { grid-column: 2; grid-row: 2; }
}

/* =========== map v3 (David 2026-10-21: "very pixar like map"): camera, depth, particles, painted worlds ===========
   Particles drift in front of the scene (.adv-fx). Painted worlds (.painted) have the path, stops, arch and castle in the
   picture, so the plates and the castle picture are not drawn. (The pointer parallax, the camera's breathing and 30
   unused animations left in 2026.19, post-cleanup audit X-4.) */

/* particles in front of the scene */
.adv-fx { position: absolute; inset: -4%; pointer-events: none; overflow: hidden; z-index: 4; }
.adv-fx i { position: absolute; left: var(--x); top: var(--y); animation-delay: calc(var(--d) * -1); }
.fx-petals i { width: calc(12px * var(--s)); height: calc(8px * var(--s)); border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #FFD1E3, #FF9DC0); box-shadow: 0 1px 2px rgba(120, 30, 60, .25); animation: fxFall 11s linear infinite; }
.fx-petals i:nth-child(3n) { background: linear-gradient(135deg, #FFF7C2, #FFD84D); }
.fx-leaves i { width: calc(16px * var(--s)); height: calc(10px * var(--s)); border-radius: 90% 0 90% 0; background: linear-gradient(135deg, #8BE36A, #2E9E4A); box-shadow: 0 1px 2px rgba(10, 60, 20, .3); animation: fxFall 13s linear infinite; }
@keyframes fxFall { 0% { transform: translate(0, -40vh) rotate(0); opacity: 0; } 10% { opacity: .95; } 50% { transform: translate(6vw, 0) rotate(200deg); } 90% { opacity: .95; } 100% { transform: translate(-2vw, 40vh) rotate(420deg); opacity: 0; } }
.fx-motes i, .fx-fireflies i { width: calc(7px * var(--s)); height: calc(7px * var(--s)); border-radius: 50%; background: #FFF6B0; box-shadow: 0 0 10px 3px rgba(255, 236, 120, .75); animation: fxGlow 7s ease-in-out infinite; }
.fx-fireflies i { background: #E9FFB8; box-shadow: 0 0 12px 4px rgba(190, 255, 140, .8); }
@keyframes fxGlow { 0%, 100% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 50% { transform: translate(3vw, -4vh); opacity: .4; } 70% { opacity: 1; } 100% { transform: translate(-1vw, -8vh); opacity: 0; } }
.fx-bubbles i { width: calc(14px * var(--s)); height: calc(14px * var(--s)); border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .8) 0 15%, rgba(190, 240, 255, .15) 40%); top: auto; bottom: -6%; animation: fxRise 9s ease-in infinite; }
@keyframes fxRise { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(2vw, -55vh); opacity: 0; } }
.fx-dust i { width: calc(5px * var(--s)); height: calc(5px * var(--s)); border-radius: 50%; background: rgba(255, 236, 190, .9); box-shadow: 0 0 6px rgba(255, 210, 120, .7); animation: fxDust 8s linear infinite; }
@keyframes fxDust { 0% { transform: translate(-6vw, 0); opacity: 0; } 20%, 80% { opacity: .9; } 100% { transform: translate(14vw, -3vh); opacity: 0; } }
.fx-mist i, .fx-wisps i { width: 46%; height: 22%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); filter: blur(6px); top: calc(var(--y) * .6 + 30%); animation: fxMist 30s ease-in-out infinite alternate; }
.fx-wisps i { top: calc(var(--y) * .9); height: 16%; background: radial-gradient(ellipse, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 70%); }
@keyframes fxMist { 0% { transform: translateX(-12%); opacity: .5; } 100% { transform: translateX(16%); opacity: .9; } }

/* painted worlds: the stone is in the picture, so only the state shows on it */

@media (prefers-reduced-motion: reduce) { .adv-fx i { animation: none !important; } .adv-fx { display: none; } }
body.reduce-motion .adv-fx i { animation: none !important; }
body.reduce-motion .adv-fx { display: none; }
/* a stone low on the canvas carries its label above the coin, so it is never cut off at the bottom edge
   (margin % is of the stone's width: the coin is 56 % / 64 % of it and stands 82 % above the centre) */

/* v3 keeps the scene clean: only the level to play next carries its name card; the others show their stars under the
   coin (the name is in the level card and in the button's spoken label) */

/* array unit mode (300 × 4): each disk carries its value, so it is a pill wide enough for "1,000" */
.ar-dot.disk { width: auto; min-width: 30px; height: 24px; padding: 0 5px; border-radius: 12px; display: inline-grid; place-items: center; font-size: .66rem; font-weight: 900; color: transparent; }
.ar-dot.disk.on { color: #fff; }
.ar-grid.wide .ar-dot.disk, .m-btn .ar-dot.disk { width: auto; height: 20px; }
@media (max-width: 560px) { .ar-dot.disk { min-width: 26px; height: 20px; font-size: .58rem; } }

/* ======================= the living world map (kit 13, 2026-10-22) =======================
   One layout on every screen: the bar on one line (two on a narrow phone), the sky filling the rest of the screen with no
   page scroll. Islands are placed in px by map.js (layout()), so nothing here depends on the device. */
body[data-screen="map"] #app { height: calc(100dvh - env(safe-area-inset-bottom, 0px)); min-height: 0; }
body[data-screen="map"] .s-map { min-height: 0; overflow: hidden; }
.map.lm { flex: 1; min-height: 0; height: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; }
/* the bar */
.lm-bar { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.lm-me { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.lm-bar .who { font-size: 1.05rem; flex: none; } .lm-bar .who b { white-space: nowrap; }
.lm-bar .avatar { width: 44px; height: 44px; }
.lm-bar .chips { flex: 0 1 auto; flex-wrap: nowrap; gap: 6px; min-width: 0; overflow: visible; }
.lm-bar .chip { white-space: nowrap; padding: 4px 12px; min-height: 44px; font-size: .95rem; }
.lm-bar .chip.goal { padding: 2px 12px 2px 3px; } .lm-bar .chip.goal .ring { width: 36px; height: 36px; }
.lm-bar .chip.streak .n { display: none; }
.lm-bar .hud-actions { flex: none; flex-wrap: nowrap; gap: 6px; margin-left: auto; }
.lm-bar .hud-actions .btn.small { min-height: 48px; padding: 6px 12px; gap: 6px; margin-bottom: 4px; font-size: .92rem; white-space: nowrap; }
.lm-bar .icon-btn { width: 48px; height: 48px; margin-bottom: 4px; }
.lm-bar .hud-finish svg.ico { width: 22px; height: 22px; }
@media (max-width: 1279px) { .lm-bar .hud-actions .lbl { display: none; } .lm-bar .hud-actions .btn.small { min-width: 48px; padding: 6px 10px; } }
@media (max-width: 1023px) { .lm-bar .chip.streak .w { display: none; } .lm-bar .chip.streak .n { display: inline; } .lm-bar .chip.goal small { display: none; } }
@media (max-width: 859px) { .lm-bar .who b { display: none; } .lm-bar .chip.goal b i { display: none; } .lm-bar .chip { padding: 4px 10px; } }
@media (max-width: 619px) {
  .lm-bar { flex-wrap: wrap; row-gap: 6px; }
  .lm-me { flex: 1 1 100%; } .lm-bar .chips { flex: 1; justify-content: flex-end; }
  .lm-bar .hud-actions { flex: 1 1 100%; justify-content: space-between; margin-left: 0; }
  .map.lm { padding: 6px 8px 8px; gap: 6px; }
}
@media (max-width: 359px) { .lm-bar .chip.streak { display: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { padding-top: calc(4px + env(safe-area-inset-top, 0px)); padding-bottom: 4px; min-height: 0; }
  .topbar .brand-logo { height: 34px; } .topbar .brand-home-label { display: none; }
  .topbar .icon-btn { width: 44px; height: 44px; } .topbar .top-actions .btn.small { min-height: 44px; padding: 6px 10px; }
  .map.lm { padding: 4px 10px 6px; gap: 4px; }
  .lm-bar .who b, .lm-bar .chip.goal small, .lm-bar .chip.streak .w { display: none; } .lm-bar .chip.streak .n { display: inline; }
}

/* the stage: the sky, a header, the islands */
.lm-stage { position: relative; isolation: isolate; flex: 1; min-height: 220px; display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: #22345E; color: #fff; box-shadow: 0 10px 30px rgba(8, 20, 50, .28), inset 0 0 0 1px rgba(255, 255, 255, .22); }
.lm-sky, .lm-shade { position: absolute; inset: 0; pointer-events: none; }
.lm-sky { z-index: -3; background-size: cover; background-repeat: no-repeat; transition: background-position .2s linear; }
.lm-shade { z-index: -2; background: linear-gradient(180deg, rgba(8, 21, 47, .62) 0, rgba(8, 21, 47, .18) 110px, rgba(8, 21, 47, 0) 45%, rgba(8, 21, 47, .3) 100%); }
.sky-moon .lm-shade { background: linear-gradient(180deg, rgba(8, 21, 47, .55) 0, rgba(8, 21, 47, 0) 40%, rgba(9, 23, 51, .55) 100%); }
.th-mountains .lm-sky { filter: saturate(.9) hue-rotate(-12deg); } .th-desert .lm-sky { filter: sepia(.28) saturate(1.25) hue-rotate(-10deg); }
.th-sunflower .lm-sky { filter: saturate(1.3) hue-rotate(-8deg); } .th-sky .lm-sky { filter: saturate(1.1) brightness(1.04); }
.th-river .lm-sky { filter: hue-rotate(-18deg) brightness(1.08); } .th-starlight .lm-sky { filter: hue-rotate(14deg) saturate(1.15); }
.th-rainforest .lm-sky { filter: hue-rotate(28deg) saturate(1.15); }
.lm-stage.night:not(.sky-moon) .lm-sky { filter: brightness(.62) saturate(.85) hue-rotate(10deg); }
/* header: the world switcher on the left, weather, progress and the two tools on the right */
.lm-head { position: relative; z-index: 6; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px 0; flex: none; }
.lm-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lm-arrow, .lm-tool { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(16, 37, 64, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lm-arrow svg.ico, .lm-tool svg.ico { width: 24px; height: 24px; }
.lm-arrow:disabled, .lm-tool:disabled { opacity: .35; cursor: default; }
.lm-arrow:focus-visible, .lm-tool:focus-visible, .lm-title:focus-visible, .lm-node:focus-visible, .lm-friend:focus-visible { outline: 3px solid #FFE59B; outline-offset: 4px; }
.lm-title { min-width: 0; border: 0; background: none; color: #fff; text-align: left; padding: 2px 6px; border-radius: 14px; display: flex; flex-direction: column; text-shadow: 0 2px 10px rgba(10, 24, 50, .7); }
.lm-title small { font-size: .7rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: #B7F7EF; }
.lm-title b { font-size: clamp(1.25rem, 2.6vw, 2.1rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-caret { font-style: normal; font-size: .55em; margin-left: 6px; opacity: .8; vertical-align: .2em; }
.lm-topic { font-size: .9rem; font-weight: 700; color: #E1EDFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-side { display: flex; align-items: center; gap: 10px; flex: none; }
.lm-side .wx { flex-direction: row; gap: 6px; } .lm-side .wx-fx { inset: -10% 40% 0 -20%; }
.lm-side .wx-say { background: rgba(255, 255, 255, .92); color: var(--ink); text-shadow: none; }
.lm-prog { min-width: 92px; text-align: right; text-shadow: 0 2px 8px rgba(10, 24, 50, .6); line-height: 1.1; }
.lm-prog strong { font-size: 1.7rem; font-weight: 900; } .lm-prog strong span { font-size: 1rem; color: #C6DCF4; }
.lm-meter { display: block; height: 6px; border-radius: 6px; background: rgba(8, 24, 50, .5); margin: 5px 0 4px; overflow: hidden; }
.lm-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FFE59B, #FFC861); }
.lm-prog small { font-size: .85rem; font-weight: 800; color: #FFE2A1; }
.lm-tools { display: flex; gap: 6px; }
@media (max-width: 1023px) { .lm-side .wx-say { display: none; } }
@media (max-width: 619px) { .lm-title b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 1.2rem; } .lm-head { padding: 10px 10px 0; } .lm-side .wx { display: none; } .lm-prog { min-width: 64px; } .lm-prog strong { font-size: 1.35rem; } .lm-tools { flex-direction: column; } .lm-arrow, .lm-tool { width: 44px; height: 44px; } }
@media (max-height: 560px) { .lm-head { padding-top: 6px; } .lm-topic, .lm-side .wx { display: none; } .lm-title b { font-size: 1.25rem; } .lm-prog strong { font-size: 1.25rem; } .lm-prog small { display: none; } }
/* the list of worlds (the title opens it) */
.lm-worlds { position: absolute; z-index: 9; left: 12px; top: 84px; width: min(420px, calc(100% - 24px)); max-height: calc(100% - 96px); overflow: auto; padding: 12px; border-radius: 22px; background: rgba(16, 37, 64, .9); border: 1px solid rgba(200, 229, 255, .3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 40px rgba(2, 12, 39, .45); animation: popin .2s ease; }
.lm-worlds[hidden] { display: none; }
.lm-worlds-h { margin: 0 4px 8px; font-size: .75rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: #9CE3D6; }
.lm-worlds-list { display: flex; flex-direction: column; gap: 6px; }
.lm-worlds .wtab { width: 100%; background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; min-height: 50px; }
.lm-worlds .wtab.on { background: rgba(255, 229, 155, .22); box-shadow: inset 0 0 0 2px #FFE59B; }
.lm-worlds .wtab-name { flex: 1; text-align: left; }
.lm-worlds .wtab svg.ico { color: #C6DCF4; }
.lm-worlds .wtab.soon, .lm-worlds .wtab.locked { color: #B9C7DA; }
/* the islands' sky (scrolls sideways when the islands don't fit) */
.lm-view { position: relative; z-index: 3; flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; outline: none; }
.lm-view::-webkit-scrollbar { display: none; }
.lm-scene { position: relative; height: 100%; min-width: 100%; opacity: 0; }
.lm-stage.ready .lm-scene { opacity: 1; }
.lm-routes { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.lm-routes path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 4 12; }
.lm-routes .reached { stroke: #FFE19A; filter: drop-shadow(0 0 6px #FFD867); animation: lmTrail 14s linear infinite; }
.lm-routes .unreached { stroke: rgba(240, 234, 255, .55); }
.lm-isle { position: absolute; width: var(--size); height: var(--size); margin: calc(var(--size) * -.33) 0 0 calc(var(--size) * -.5); z-index: 2; pointer-events: none; }
.lm-bob { position: absolute; inset: 0; animation: lmFloat 6s ease-in-out infinite; animation-delay: calc(var(--i) * -.9s); }
.lm-land { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 18px 14px rgba(6, 25, 58, .35)); }
.lm-isle.st-locked .lm-land { filter: saturate(.6) brightness(.82) drop-shadow(0 18px 14px rgba(6, 25, 58, .35)); }
.lm-node { --n: clamp(48px, calc(var(--size) * .28), 66px); position: absolute; left: 50%; top: 33%; width: var(--n); height: var(--n); transform: translate(-50%, -50%); border-radius: 50%; pointer-events: auto; padding: 0; display: grid; place-items: center; font-size: calc(var(--n) * .42); font-weight: 900; color: #563C16; background: linear-gradient(#FDF1B8, #E4A83B); border: 3px solid #FFF4CF; box-shadow: 0 5px 0 #91632C, 0 0 26px rgba(255, 209, 102, .5); transition: scale .2s; }
.lm-node::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
.lm-node svg.ico { width: 46%; height: 46%; }
.lm-node.st-done { background: linear-gradient(#B8FFE2, #47BD9B); border-color: #D8FFEF; color: #14534C; box-shadow: 0 5px 0 #257565, 0 0 20px rgba(120, 255, 210, .35); }
.lm-node.st-locked { background: linear-gradient(#C3D1E9, #627697); border-color: #D4DFF4; color: #fff; box-shadow: 0 5px 0 #4C5C79; }
.lm-isle.boss .lm-node { --n: clamp(54px, calc(var(--size) * .32), 74px); }
.lm-isle.boss.st-open .lm-node { background: linear-gradient(#FFD9F0, #E46FA8); border-color: #FFE6F4; color: #fff; box-shadow: 0 5px 0 #9C3A6E, 0 0 26px rgba(255, 140, 200, .5); }
@media (hover: hover) { .lm-node:hover { scale: 1.1; } }
.lm-node.press { animation: lmPress .26s ease; }
.lm-ring { position: absolute; inset: -14px; border: 3px solid #FFE29E; border-radius: 50%; animation: lmPulse 2.4s infinite; pointer-events: none; }
.lm-isle.nope .lm-bob { animation: lmNope .45s ease; }
.lm-label { position: absolute; left: 50%; top: 86%; transform: translateX(-50%); width: min(200px, calc(var(--size) * .96)); text-align: center; padding: 6px 8px 7px; border-radius: 14px; background: rgba(18, 34, 61, .84); border: 1px solid rgba(186, 219, 255, .25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; line-height: 1.15; text-shadow: 0 1px 3px rgba(7, 20, 47, .8); }
.lm-label small { display: block; font-size: .64rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #9CE3D6; }
.lm-label b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .82rem; font-weight: 800; margin-top: 2px; }
.lm-label em { display: block; font-style: normal; font-size: .68rem; font-weight: 800; color: #C6D4EA; margin-top: 3px; }
.lm-label em.go { color: #FFE2A3; } .lm-label em svg.ico { width: 1em; height: 1em; }

.lm-stars { display: inline-flex; gap: 2px; margin-top: 3px; } .lm-stars i { color: rgba(255, 255, 255, .3); } .lm-stars i.on { color: #FFD23F; } .lm-stars svg.ico { width: 15px; height: 15px; }
.lm-isle.current .lm-label { border-color: #FFE29E; box-shadow: 0 0 18px rgba(255, 226, 158, .35); }
.lm-isle.celebrate .lm-node { animation: lmCheer 1.8s ease; }
.lm-isle.celebrate .lm-bob::after { content: ""; position: absolute; left: 50%; top: 33%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; box-shadow: 0 -60px 0 2px #FFE59B, 42px -42px 0 1px #fff, 60px 0 0 2px #B8FFE2, 42px 42px 0 1px #FFE59B, 0 60px 0 2px #fff, -42px 42px 0 1px #B8FFE2, -60px 0 0 2px #FFE59B, -42px -42px 0 1px #fff; animation: lmBurst 1.2s ease-out both; pointer-events: none; }
/* the budgies */
.lm-bird { position: absolute; z-index: 8; width: clamp(64px, calc(var(--size) * .5), 124px); aspect-ratio: 1; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 12px 10px rgba(9, 43, 93, .4)); }
.lm-bird img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.lm-bird .fly { animation: lmHover 2s ease-in-out infinite; }
.lm-bird .glide { opacity: 0; transform: scale(1.12); }
/* David's budgie motion kit (Calculation Canyon, 2026-10-26): wings flap in flight (fly and glide poses take turns), a little
   bounce on landing, a hop for a won level, and the perched friends breathe */
.lm-bird.flying .fly { animation: lmFlapA .48s steps(1, end) infinite; } .lm-bird.flying .glide { animation: lmFlapB .48s steps(1, end) infinite; }
.lm-bird.land img { transform-origin: 50% 85%; animation: lmLand .36s ease-out; }
.lm-bird.cheer .fly { transform-origin: 50% 85%; animation: lmHop 1.1s ease-in-out; }
.lm-bird.shake .fly { transform-origin: 50% 85%; animation: lmShake .65s ease-in-out; }
.lm-bird.dodge .fly { transform-origin: 50% 85%; animation: lmDodge 1.1s ease-in-out; }
.lm-bird.dodge::after { content: ''; position: absolute; left: 20%; top: 0; width: 12px; height: 17px; border-radius: 80% 15% 80% 35%; background: linear-gradient(135deg, #fff5f7, #efa8bf); opacity: 0; pointer-events: none; animation: lmPetal 1.1s ease-in-out forwards; }
/* Cube Harbor: after landing the budgie leans over the edge of the island for a curious look at the water */
.lm-bird.peek .fly { transform-origin: 50% 85%; animation: lmPeek 1s ease-in-out; }
.lm-friend img { transform-origin: 50% 85%; animation: lmBreathe 3.4s ease-in-out infinite; }
.lm-friend + .lm-friend img { animation-delay: -1.7s; }
.lm-bird.hello .fly { animation: lmHello .8s ease; }
.lm-friend { position: absolute; z-index: 7; width: clamp(48px, calc(var(--size) * .3), 84px); aspect-ratio: 1; transform: translate(-50%, -100%); border: 0; background: none; padding: 0; border-radius: 50%; }
.lm-friend img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(9, 43, 93, .35)); pointer-events: none; }
.lm-friend.boing img { animation: lmBoing .5s ease; }
.lm-bubble { position: absolute; z-index: 9; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100% - 28px)); display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 22px; background: #fff; color: var(--ink); font-size: 1rem; font-weight: 800; line-height: 1.3; box-shadow: 0 10px 24px rgba(8, 20, 50, .35), 0 0 0 3px rgba(255, 255, 255, .55); pointer-events: none; }
.lm-bubble[hidden] { display: none; }
.lm-bubble img { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 16px; background: var(--sky-l); }
.lm-bubble p { margin: 0; }
.lm-bubble.pop { animation: lmBubbleUp .3s ease; }
@keyframes lmBubbleUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 619px) { .lm-bubble { bottom: 10px; font-size: .92rem; padding-right: 14px; } .lm-bubble img { width: 44px; height: 44px; } }
/* in front: particles, two slow clouds, the swipe hint, the banner of a closed world */
.lm-stage .adv-fx { inset: 0; z-index: 4; translate: none; }
.lm-cloud { position: absolute; z-index: 4; width: 600px; height: 110px; pointer-events: none; background: radial-gradient(ellipse, rgba(210, 237, 255, .22), transparent 67%); filter: blur(16px); animation: lmDrift 24s ease-in-out infinite; }
.lm-cloud.c1 { bottom: 18%; left: -120px; } .lm-cloud.c2 { bottom: 42%; right: -220px; animation-delay: -12s; }
.lm-hint { position: absolute; z-index: 5; left: 50%; bottom: 6px; transform: translateX(-50%); margin: 0; padding: 3px 12px; border-radius: 999px; background: rgba(16, 37, 64, .5); font-size: .75rem; font-weight: 800; letter-spacing: .04em; color: #DCEAFA; white-space: nowrap; pointer-events: none; }
@media (max-height: 560px) { .lm-hint { display: none; } }
.lm-banner { position: absolute; z-index: 7; left: 50%; top: 55%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 22px; background: rgba(16, 37, 64, .88); border: 1px solid rgba(200, 229, 255, .3); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 800; box-shadow: 0 18px 40px rgba(2, 12, 39, .4); }
.lm-banner svg.ico { width: 30px; height: 30px; flex: none; color: #FFE59B; }
/* missions on the map (Phase 5, 5b + 5f): the Daily Flight and a waiting Boost as glowing cards under the world's title,
   in the flow, so the sky below (and every island in it) only gets a little shorter while one is offered */
.lm-missions { position: relative; z-index: 6; flex: none; display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 8px 14px 0; }
.lm-daily { position: relative; flex: none; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 4px 18px 4px 8px; border: 2px solid rgba(255, 229, 155, .85); border-radius: 20px; background: rgba(16, 37, 64, .82); color: #fff; font: inherit; text-align: left; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 22px rgba(2, 12, 39, .34), 0 0 0 4px rgba(255, 229, 155, .18); animation: lm-daily-glow 2.6s ease-in-out infinite; }
.lm-daily img { width: 50px; height: 42px; object-fit: contain; flex: none; }
.lm-daily b { display: block; font-size: 1.02rem; font-weight: 900; color: #FFE59B; }
.lm-daily small { display: block; font-size: .8rem; font-weight: 700; color: #DCEAFA; }
.lm-daily:focus-visible { outline: 3px solid #FFE59B; outline-offset: 3px; }
@keyframes lm-daily-glow { 50% { box-shadow: 0 8px 22px rgba(2, 12, 39, .34), 0 0 0 8px rgba(255, 229, 155, .08); } }
.still .lm-daily { animation: none; }
.lm-daily.lm-boost { border-color: rgba(159, 205, 242, .9); box-shadow: 0 8px 22px rgba(2, 12, 39, .34), 0 0 0 4px rgba(159, 205, 242, .2); animation: none; }
.lm-daily.lm-boost b { color: #BFE3FF; }
.lm-daily.lm-boost small { max-width: 13em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 560px) { .lm-missions { margin-top: 4px; } .lm-daily { min-height: 44px; padding: 2px 14px 2px 6px; } .lm-daily img { width: 38px; height: 32px; } .lm-daily small { display: none; } }
/* a world opening: the islands rise in one after another */
.lm-stage.intro .lm-isle { animation: lmRise .9s cubic-bezier(.2, 1.25, .4, 1) both; animation-delay: calc(var(--i) * 90ms); }
.lm-stage.intro .lm-bird, .lm-stage.intro .lm-friend { animation: popin .5s ease .6s both; }
@keyframes lmFloat { 50% { translate: 0 -9px; } }
@keyframes lmHover { 50% { translate: 0 -7px; rotate: 3deg; } }
@keyframes lmTrail { to { stroke-dashoffset: -160; } }
@keyframes lmPulse { 0%, 100% { opacity: .25; scale: .94; } 50% { opacity: 1; scale: 1.08; } }
@keyframes lmPress { 40% { scale: .86 1.06; } 70% { scale: 1.08 .94; } }
@keyframes lmNope { 20%, 60% { translate: -8px 0; } 40%, 80% { translate: 8px 0; } }
@keyframes lmCheer { 15% { scale: 1.25; } 30% { scale: .95; } 45% { scale: 1.1; } 60% { scale: 1; } }
@keyframes lmBurst { 0% { opacity: 0; scale: .2; } 30% { opacity: 1; } 100% { opacity: 0; scale: 1.3; } }
@keyframes lmHello { 30% { translate: 0 -18px; rotate: -8deg; } 60% { translate: 0 -4px; rotate: 6deg; } }
@keyframes lmBoing { 30% { scale: 1.12 .88; } 60% { scale: .94 1.08; } }
@keyframes lmFlapA { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes lmFlapB { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes lmLand { 0% { translate: 0 -10px; scale: .96 1.05; } 55% { translate: 0 2px; scale: 1.05 .95; } }
@keyframes lmHop { 30% { translate: 0 -30px; rotate: -10deg; } 60% { translate: 0 -20px; rotate: 10deg; } }
@keyframes lmShake { 20% { rotate: -9deg; scale: 1.03; } 40% { rotate: 9deg; } 60% { rotate: -6deg; } 80% { rotate: 4deg; } }
@keyframes lmPeek { 25% { translate: 6px 4px; rotate: 16deg; } 55% { translate: 8px 6px; rotate: 22deg; } 80% { rotate: -4deg; } }
@keyframes lmDodge { 30% { translate: -12px 10px; rotate: -12deg; scale: .95; } 65% { translate: 18px -18px; rotate: 10deg; } }
@keyframes lmPetal { 0% { opacity: 0; transform: translate(-20px, -20px) rotate(-30deg); } 20%, 80% { opacity: 1; } 100% { opacity: 0; transform: translate(110px, 70px) rotate(160deg); } }
@keyframes lmBreathe { 50% { translate: 0 -2px; rotate: 1deg; } }
@keyframes lmDrift { 50% { translate: 160px 15px; } }
@keyframes lmRise { from { opacity: 0; translate: 0 60px; scale: .85; } }
/* paused (the button, or Reduce Motion): everything holds still; flights are skipped in map.js */
.lm-stage.still *, .lm-stage.still *::before, .lm-stage.still *::after { animation-play-state: paused !important; }
.lm-stage.still .lm-bird .fly, .lm-stage.still .lm-bob, .lm-stage.still .lm-cloud, .lm-stage.still .lm-friend img, .lm-stage.still .lm-bird.land img { animation: none; }
@media (prefers-reduced-motion: reduce) { .lm-bird img, .lm-friend img { animation: none !important; } }
.lm-stage.still .adv-fx { display: none; }
@media (prefers-reduced-motion: reduce) { .lm-stage *, .lm-stage *::before, .lm-stage *::after { animation: none !important; } .lm-stage .adv-fx { display: none; } .lm-sky { transition: none; } }
body.reduce-motion .lm-stage *, body.reduce-motion .lm-stage *::before, body.reduce-motion .lm-stage *::after { animation: none !important; }
body.reduce-motion .lm-stage .adv-fx { display: none; }
.screen-wrap { overflow-x: clip; }   /* a weather budgie's sky effect must not widen the page */

/* start page, compact top (2026-10 refresh): a smaller logo with the weather budgie beside it, so
   "Who is learning today?", the children, New student and Parents show without scrolling on a phone */

.start-wx { flex: none; }
.start-wx .wx { flex-direction: row; gap: 6px; }
.start-wx .wx-fx { inset: -10% 40% 0 -20%; }
.start-wx .wx-say { text-align: left; }

.credit-brand { color: var(--ink-2); font-size: .95rem; }

/* ==== storybook refresh (kit 14, 2026-10-22): warm ivory learning surfaces, honey rewards, teal focus.
   Scoped to existing components; no global reset. The seven 3D illustrations always sit next to a word. ==== */
:root { --sb-paper: #FFFDF5; --sb-ink: #213E48; --sb-teal: #157F81; --sb-gold: #FFCF69; --sb-gold-d: #C69B42; --sb-line: #E6DFC9; }
.sb-art { display: block; flex: none; object-fit: contain; }
img.sb-art { width: auto; }
.sb-dest { gap: 8px; }
.sb-dest .sb-art { width: 36px; height: 36px; margin: -6px 0; }

/* practice: a quiet learning desk — ivory card, dark text, big numerals; motion only after a confirmed right answer */
.qcard { background: var(--sb-paper); box-shadow: 0 7px 0 var(--sb-line), 0 18px 34px rgba(37, 76, 90, .07); }
.qcard .q-text p, .qcard .q-expr { color: var(--sb-ink); }
.q-expr { font-size: clamp(2.5rem, 6vw, 3.9rem); }
/* a phone: long numbers (6-digit sums, the Flight Check's later skills) shrink to fit instead of running off the card */
@media (max-width: 520px) {
  .pr-main { grid-template-columns: minmax(0, 1fr); }
  .qcard .q-expr { font-size: clamp(1.7rem, 7.4vw, 2.5rem); overflow-wrap: anywhere; }
  html.text-l .qcard .q-expr, html.text-xl .qcard .q-expr { font-size: clamp(1.9rem, 8vw, 2.7rem); }
  .cols { grid-template-columns: repeat(var(--n), min(58px, calc((100vw - 72px) / var(--n)))); font-size: min(2.3rem, calc((100vw - 72px) / var(--n) * .6)); }
}
.tutor, .tu-body { background: var(--sb-paper); }
.tu-head { background: linear-gradient(180deg, #F3F0DE, var(--sb-paper)); }
.tu-problem { background: #fff; box-shadow: inset 0 0 0 3px var(--sb-line); }
.mc-btn { box-shadow: 0 6px 0 #D9D2BB, inset 0 0 0 3px var(--sb-line); color: var(--sb-ink); transition: transform .14s, box-shadow .14s; }
.mc-btn:active { transform: translateY(3px); }
/* a wrong pick is calm: no shaking, no red; the hint text says what to do next */
.mc-btn.wrong, .cmp-btn.wrong { animation: none; background: #FFF4D6; box-shadow: 0 6px 0 #E4CB86, inset 0 0 0 3px #E8C873; color: #5C4718; text-decoration: line-through; text-decoration-thickness: 3px; }
.qcard.pop { animation: sb-pop .44s ease-out 1; }
@keyframes sb-pop { 0% { transform: scale(.97); } 65% { transform: scale(1.02); } 100% { transform: scale(1); } }
.qcard:focus-within, .mc-btn:focus-visible, .shop-card button:focus-visible { outline: 3px solid var(--sb-teal); outline-offset: 4px; }

/* Badge Nest and Seed Shop */
.sb-stat { display: flex; flex-direction: column; align-items: center; }
.sb-stat .sb-art { width: 48px; height: 48px; margin: -8px 0 -2px; }
.sb-balance { gap: 6px; } .sb-balance .sb-art { width: 30px; height: 30px; margin: -4px 0; }
.shop-top { background: var(--sb-paper); border-radius: 26px; padding: 12px 18px; box-shadow: 0 6px 0 var(--sb-line); }
.shop-top .shop-art { width: 96px; height: 96px; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 14px; }
.shop-card { position: relative; padding: 16px 14px 14px; gap: 8px; border-radius: 24px; background: var(--sb-paper); box-shadow: 0 6px 0 var(--sb-line); }
.shop-prev { height: 132px; width: 100%; border-radius: 18px; background: radial-gradient(ellipse at 50% 88%, #EADFC2 0 30%, transparent 31%), linear-gradient(180deg, #F2FAF7, #FBF7EA); }
.shop-card.own { box-shadow: 0 6px 0 #BFD9D6, inset 0 0 0 3px #CBE5E1; }
.shop-card.on { box-shadow: 0 6px 0 var(--sb-teal), inset 0 0 0 4px var(--sb-teal); }
.shop-tag { position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 6px; border-radius: 999px; background: #fff; color: #1F5F60; font-size: .78rem; font-weight: 900; box-shadow: inset 0 0 0 2px #BFD9D6; }
.shop-tag.wearing { background: var(--sb-teal); color: #fff; box-shadow: none; }
.shop-tag svg.ico { width: 16px; height: 16px; }
.shop-card .btn.small { min-height: 48px; }
@media (max-width: 520px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .shop-top .shop-art { width: 64px; height: 64px; } .shop-top > :last-child { display: none; } .shop-top .lead { font-size: 1rem; } }

/* My Results: one encouraging highlight and Continue first; the numbers follow */
.res-highlight { display: flex; align-items: center; gap: 16px; margin: 16px 0 10px; padding: 14px 20px; border-radius: 26px; background: var(--sb-paper); box-shadow: 0 6px 0 var(--sb-line); }
.res-highlight .sb-art { width: 96px; height: 96px; }
.res-highlight p { margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 900; color: var(--sb-ink); line-height: 1.25; }
.res-more { margin: 22px 0 0; font-size: 1.05rem; color: var(--ink-2); }
.rcard .rc-art.sb-art { width: 44px; height: 44px; }
@media (max-width: 520px) { .res-highlight .sb-art { width: 72px; height: 72px; } }

@media (prefers-reduced-motion: reduce) { .qcard.pop { animation: none; } .mc-btn { transition: none; } }
.sb-h { display: flex; align-items: center; gap: 10px; } .sb-h .sb-art { width: 44px; height: 44px; margin: -6px 0; }
.lc-actions .sb-art.btn-art { width: 40px; height: 40px; margin: -6px 0; }
/* "Almost! Try once more." during practice is a warm nudge, not a red alarm (PIN messages keep their colour) */
.tutor .msg, .practice .msg, .lesson .msg { color: #7A5A12; }

/* character theater (kit 15): the named-speaker card. Its own styles live in its shadow root; here only the frame. */
kairos-dialogue.kd { display: block; width: 100%; max-width: 720px; margin: 0 auto; text-align: left; }
kairos-dialogue .kd-fallback { margin: 0; padding: 14px 18px; border-radius: 20px; background: var(--sb-paper); font-weight: 700; }

.res-highlight.theater { display: block; padding: 6px 10px; }
.verse-page kairos-dialogue.verse-coco { margin: 6px 0 4px; }
/* a named speaker inside the practice coach's bubble */
.kairos-coach .bubble .who { color: var(--sb-teal); margin-right: 2px; }

/* ==== forest buttons (kit 16, 2026-10-22): one enchanted-forest family of surfaces. Labels are real text; the
   textures only paint the background, so translations and zoomed text never get clipped. ==== */

/* gold = the main action (Play, Let's learn, Next, Check), wood = going somewhere, ivory = secondary.
   Textured only on regular and big buttons (wide enough for the 2.5:1–5:1 art); small and icon buttons keep a matching bevel. */
.btn.leaf:not(.small), .btn.wood:not(.small), .btn.ghost:not(.small) { background: transparent; box-shadow: none; border-radius: 0; text-shadow: none; isolation: isolate; padding-left: 34px; padding-right: 34px; }
.btn.leaf:not(.small)::before, .btn.wood:not(.small)::before, .btn.ghost:not(.small)::before { content: ''; position: absolute; inset: 0; z-index: -1; background: center / 100% 100% no-repeat; pointer-events: none; }
.btn.leaf:not(.small) { color: #443218; }
.btn.wood:not(.small) { color: #3F321F; }
.btn.ghost:not(.small) { color: var(--sb-ink); }
.btn.leaf:not(.small):active:not([disabled]), .btn.wood:not(.small):active:not([disabled]), .btn.ghost:not(.small):active:not([disabled]) { transform: translateY(3px); box-shadow: none; }
@media (hover: hover) { .btn.leaf:not(.small):hover:not([disabled]), .btn.wood:not(.small):hover:not([disabled]) { filter: brightness(1.04); transform: translateY(-2px); } }
.btn.leaf:not(.small):focus-visible, .btn.wood:not(.small):focus-visible, .btn.ghost:not(.small):focus-visible { outline: 4px solid var(--sb-teal); outline-offset: 4px; }
.btn.leaf.small { --b: linear-gradient(#FFE9A6, #FFD273); --s: #C69B42; --c: #443218; text-shadow: none; background: var(--b); }
.btn.wood.small { --b: linear-gradient(#F3D3A4, #DDAE72); --s: #A87A45; --c: #3F321F; background: var(--b); }
@media (prefers-reduced-motion: reduce) { .btn { animation: none !important; transition: none !important; } }

/* phones: the top bar already shows the logo, so the start page lets the Student entrance take its place and the
   children stay near the top */

/* Start page polish (2026-10-22): the words sit ON the signs in the art instead of under blank signs.
   Student: "Student / Let's explore" on the stone-and-wood plate (26-75% across, 62-79% down in the 1024x683 art).
   Parents: "Parents / See their progress" on the parchment, right of the book and under the Professor.
   Sizes follow the picture's width (cqw), with a floor so phones stay readable. */

/* ==== spacing and navigation pass (2026-10-23) ==== */
/* page heads (Badge Nest, Seed Shop, new student…): one row on wide screens; on phones the two buttons share the
   top row at the same height and the title gets its own line, so it never squeezes into two lines */
.page-head .btn { margin-bottom: 0; min-height: 52px; }
@media (max-width: 560px) {
  .page-head { grid-template-columns: 1fr auto; grid-template-areas: 'back act' 'title title'; row-gap: 6px; }
  .page-head > :first-child { grid-area: back; justify-self: start; }
  .page-head > .h2 { grid-area: title; }
  .page-head > :last-child:not(.h2) { grid-area: act; justify-self: end; }
  .page-head .btn { font-size: .95rem; padding-top: 6px; padding-bottom: 6px; }
}
/* stat cards: an even grid with equal heights (was 2 + 1 + 1 of different sizes on phones) */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 12px auto; }
.stat { min-width: 0; justify-content: center; text-align: center; padding: 12px 10px; }
.sb-stat .sb-art { width: 36px; height: 36px; margin: -6px 0 -4px; }
@media (max-width: 560px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat b { font-size: 1.9rem; } }
/* section headings inside pages line up with the content below them */
.nest-page > .h3, .results .rsec > h3 { margin: 18px 4px 10px; }

/* ==== friendlier look (2026-10-23): one card style everywhere a child reads — warm ivory paper, soft forest edge,
   the same corner radius and shadow — and calmer, darker headings. Parents' dashboard keeps its plain white. ==== */
:root { --sb-card: #FFFDF6; --sb-edge: #E7E0C8; --sb-r: 22px; }
.stat, .rcard, .rsec, .badge-cell, .res-highlight, .verse-card { background: var(--sb-card); border-radius: var(--sb-r); box-shadow: 0 5px 0 var(--sb-edge), 0 12px 24px rgba(60, 70, 40, .06); }

.level-card { background: transparent; box-shadow: none; }

.h2, .h3, .rsec > h3, .sp-title { color: var(--sb-ink); }
.chip { background: var(--sb-card); box-shadow: 0 3px 0 var(--sb-edge); color: var(--sb-ink); }
.badge-cell { opacity: .85; } .badge-cell.on { opacity: 1; box-shadow: 0 5px 0 #E2C46A, inset 0 0 0 3px #F1D98A; }
.stat b { color: var(--sb-ink); } .stat span, .rcard span { color: #4F6159; }
/* bigger, clearer names on the children's cards */

.chip:focus-visible, .badge-cell:focus-visible { outline: 3px solid var(--sb-teal); outline-offset: 4px; }

/* ==============================================================
   Build 2.1: the kids' revamp (docs/KIDS-REVAMP-2.1.md). Each rule says what it is for.
   ===================================================================== */

/* the Flight Path: one feather per problem in place of the percent bar (goal gradient, countable progress) */
.flight-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.f-warm { font-size: .8rem; font-weight: 900; color: #7A4B00; background: #FFF1C9; border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.flight { list-style: none; margin: 0; padding: 6px 4px; display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; position: relative; }
.flight::before { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; border-top: 3px dashed #C4D6C1; z-index: 0; }
.f-node { position: relative; z-index: 1; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #D5E2D2; display: grid; place-items: center; color: #9AAE97; }
.f-node svg.ico { width: 18px; height: 18px; }
.f-node.done.k-alone { background: linear-gradient(180deg, #FFE68A, #FFC93C); box-shadow: inset 0 0 0 2px #D99B00, 0 2px 0 #E3B23C; color: #7A4B00; }
.f-node.done:not(.k-alone) { background: #DDF3D2; box-shadow: inset 0 0 0 2px var(--leaf); color: var(--leaf-d); }
.f-node.word { border-radius: 10px; }
.f-node.now { width: 42px; height: 42px; background: #fff; box-shadow: 0 0 0 3px var(--sky), 0 4px 10px rgba(30, 80, 140, .22); overflow: visible; }
.f-bird { width: 50px; height: auto; margin-top: -12px; pointer-events: none; animation: f-bob 1.8s ease-in-out infinite; }
.f-node.land { animation: f-land .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes f-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes f-land { 0% { transform: scale(.3); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.flight.long .f-node { width: 24px; height: 24px; } .flight.long .f-node svg.ico { width: 14px; height: 14px; }
.flight.long .f-node.now { width: 36px; height: 36px; } .flight.long .f-bird { width: 42px; }
@media (max-width: 760px) {
  .pr-top { flex-wrap: wrap; row-gap: 4px; }
  .pr-top .flight-wrap { order: 5; flex-basis: 100%; }
  .pr-top .pr-title { max-width: none; flex: 1; }
  .f-node { width: 22px; height: 22px; } .f-node svg.ico { width: 13px; height: 13px; }
  .f-node.now { width: 34px; height: 34px; } .f-bird { width: 40px; }
  .flight.long .f-node { width: 18px; height: 18px; } .flight.long .f-node svg.ico { width: 11px; height: 11px; }
  .flight.long .f-node.now { width: 30px; height: 30px; } .flight.long .f-bird { width: 34px; }
}

/* Spot Blue's mistake: Blue's answer on a card, two big neutral choices (erroneous examples + teaching Blue) */
.spot-card { display: flex; align-items: center; gap: 14px; background: #EAF5FF; border: 3px solid #A9D2F3; border-radius: 22px; padding: 10px 18px; margin: 0 0 12px; }
.spot-art { width: 66px; height: auto; flex: 0 0 auto; }
.spot-card small { display: block; font-weight: 900; color: var(--sky-d); text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.spot-v { display: block; font-size: clamp(1.6rem, 4.8vw, 2.5rem); font-weight: 900; color: #1F3B5A; line-height: 1.15; }
.spot-v.struck { text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: #E08A5A; color: #687B8C; }
.spot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spot-actions .btn { min-height: 84px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; white-space: normal; line-height: 1.15; padding: 10px 22px; text-align: left; }
.spot-actions .btn svg.ico { width: 28px; height: 28px; }
.spot-sol { margin: 0 0 12px; }

/* process praise: "3 in a row on your own" and "better than your last try" (self-referenced, not ranked) */
.row-chip, .better-chip { display: inline-flex; align-items: center; gap: 6px; margin: 2px auto 8px; padding: 6px 14px; border-radius: 999px; background: #FFF0D9; color: #9A4A00; font-weight: 900; }
.row-chip svg.ico, .better-chip svg.ico { width: 20px; height: 20px; color: #F08A24; }
.level-done .almost { color: #7A4B00; font-weight: 700; }
.recap { display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(100%, 560px); }
.recap-row { width: 100%; justify-content: center; gap: 6px; }
.recap-row::before { display: none; }
.recap-row .f-node { width: 36px; height: 36px; animation: f-land .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--k) * 90ms); }
.recap-row .f-node svg.ico { width: 20px; height: 20px; }
@media (max-width: 560px) { .recap-row { flex-wrap: nowrap; gap: 3px; padding: 6px 0; } .recap-row .f-node { flex: 0 1 28px; width: auto; aspect-ratio: 1; height: auto; min-width: 18px; } .recap-row .f-node svg.ico { width: 60%; height: 60%; } }

/* tap the character who is talking: it says its line again and hops (agency, audio support for early readers) */
.buddy-host { cursor: pointer; }
.buddy-host.hop > * { animation: b-hop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes b-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
/* a bigger "read it to me" button on every question (a 6-year-old is still learning to read) */
.q-text .read { width: 56px; height: 56px; }
.q-text .read svg.ico { width: 28px; height: 28px; }

/* start page: the Student picture is a real button; the name cards wiggle when it is tapped */

.credit-more { margin-top: 6px; font-size: .85rem; }
.credit-more summary { cursor: pointer; color: var(--muted); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }

/* map on a phone: the top bar's door already says "Done for today", so the HUD drops its moon (one way out) */
@media (max-width: 560px) { .lm-bar .hud-finish { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .f-bird, .f-node.land, .recap-row .f-node, .buddy-host.hop > * { animation: none !important; }
}
/* the tutor panel's header on a phone: the Professor's picture says who is talking, so his words get the width */
@media (max-width: 480px) {
  .tu-head { gap: 8px; padding: 10px 12px 8px; }
  .tu-head .tu-kicker { font-size: .78rem; line-height: 1.2; }
  .tu-head .icon-btn { width: 44px; height: 44px; flex: 0 0 auto; }
}
/* Blue's two choices: plain ivory cards like the answer buttons (the wood picture can't stretch to longer words) */
.spot-actions .btn.spot-btn { background: #FFFDF6; color: var(--ink); border: 3px solid #E4D8BF; box-shadow: 0 5px 0 #E4D8BF; border-radius: 20px; font-weight: 900; font-size: 1.1rem; }
.spot-actions .btn.spot-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #E4D8BF; }
.spot-actions .spot-yes svg.ico { color: var(--leaf-d); } .spot-actions .spot-no svg.ico { color: #C25B2E; }
/* App Store app (Phase 6): the parental gate; printing is not available inside the app */
.gate-q { font-size: 1.25rem; line-height: 1.4; text-align: center; margin: .4em auto; max-width: 26em; text-wrap: balance; }
.gate-in { display: block; margin: 0 auto; width: min(220px, 70vw); min-height: 56px; font-size: 1.6rem; text-align: center; border: 3px solid var(--leaf-d); border-radius: 16px; }
.native-app [data-print] { display: none; }

/* ==== forest theme (Phase 5b, 2026-10-24): Pixar-style storybook forest. Forest day is the default; Forest dusk (golden hour)
   is a Settings choice (html[data-theme="dusk"]). Design system: direction.md, tokens moss/fern/canopy-deep/dapple. ==== */
:root {
  --moss: #7DB35A; --fern: #3E9B4F; --canopy-deep: #15422B; --dapple: #FFF3B0; --cream: #FFF7EA;
  --on-accent: #1F3B2A; --danger: #C93A52; --danger-d: #8F2236;
  --glow-aqua: #5FF0E0; --glow-lime: #B6FF6A; --glow-gold: #FFD86B;
  --muted: #5A6E5F; /* was #6B7F70 (4.3:1 on white); now 5.5:1 on white, 5.1:1 on the sky ground */
}
/* small buttons: match the textured big ones (gold = main, wood = going somewhere) with a glossy Pixar bevel and dark labels (white on green was 2.4:1) */
.btn.small.leaf, .btn.small.wood, .btn.danger { isolation: isolate; }
.btn.small.leaf { --b: linear-gradient(180deg, #FFE27A, #F2B92E); --s: #A9780F; --c: var(--on-accent); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn.small.wood { --b: linear-gradient(180deg, #E2BB86, #C9955B); --s: var(--bark-d); --c: #3F321F; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.btn.danger { --b: var(--danger); --s: var(--danger-d); background: linear-gradient(180deg, #DB5469, var(--danger)); }
.btn.small.leaf::before, .btn.small.wood::before, .btn.danger::before { content: ''; position: absolute; left: 12%; right: 12%; top: 5px; height: 34%; z-index: -1; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none; }
/* tabs / segmented control: the selected pill is lifted with a ring and a dot, so it never relies on colour alone */
.seg { background: linear-gradient(180deg, #CFEBC2, var(--leaf-l)); box-shadow: inset 0 3px 6px rgba(47, 125, 58, .22), inset 0 -2px 0 rgba(255, 255, 255, .85); }
.seg button { color: var(--ink); gap: 8px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 3px 0 var(--leaf-d), inset 0 0 0 2px var(--leaf-d); transform: translateY(-1px); }
.seg button.on::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--leaf-d); vertical-align: middle; }
.seg button:focus-visible { outline: 4px solid var(--sky-d); outline-offset: 3px; }
/* toggles: darker "on" green so the knob reads (white on leaf was 2.4:1) */
.toggle.on { background: var(--leaf-d); }
.toggle:focus-visible { outline: 4px solid var(--sky-d); outline-offset: 3px; }
/* icon buttons: ivory bevel like the cards */
.icon-btn { background: var(--sb-card); box-shadow: 0 3px 0 var(--sb-edge), inset 0 0 0 2px var(--sb-edge), inset 0 2px 0 rgba(255, 255, 255, .8); }
.icon-btn.on { background: var(--sun-l); box-shadow: 0 3px 0 var(--sun-d), inset 0 0 0 2px var(--sun), inset 0 2px 0 rgba(255, 255, 255, .8); }
/* chips: a soft rim light on the ivory pill */
.chip { box-shadow: 0 3px 0 var(--sb-edge), inset 0 2px 0 rgba(255, 255, 255, .85); }
/* Forest dusk = golden hour: a warm sun glow, peach-to-rose-to-sage ground, creamier paper. Text on the ground stays 5:1+ (ink on #FFE2B8 9.5:1). */
html[data-theme="dusk"] {
  --sb-paper: #FFF6E6; --sb-card: #FFF8EC; --sb-edge: #E8D6B4; --sb-line: #EBDDBF; --line: #EBDDBF; --leaf-l: #E6F0C8; --sky-l: #FFF1D6;
  --ink-2: #3B5242; --muted: #46594B;
}
html[data-theme="dusk"] body { background: radial-gradient(70% 45% at 12% -5%, rgba(255, 208, 110, .85), rgba(255, 208, 110, 0) 70%), linear-gradient(180deg, #FFE2B8 0%, #F6D8C6 42%, #CFE6D2 100%) fixed; }
html[data-theme="dusk"] .topbar { background: rgba(255, 246, 230, .86); border-bottom-color: #F3D49A; }
html[data-theme="dusk"] .seg { background: linear-gradient(180deg, #F2E3BC, var(--leaf-l)); }
html[data-theme="dusk"] .progress i { background: linear-gradient(90deg, #F2B92E, #FFE27A); }
html[data-theme="dusk"] .card, html[data-theme="dusk"] .qcard { box-shadow: 0 6px 0 var(--sb-edge), 0 14px 26px rgba(160, 100, 40, .12); }
html[data-theme="dusk"] .qcard.solved { box-shadow: 0 7px 0 var(--leaf-d), inset 0 0 0 4px var(--leaf), 0 0 22px rgba(255, 216, 107, .6); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
.reduce-motion .btn { transition: none; }
/* keypad: the Check key matches the gold main-action buttons (white on leaf was 2.4:1); keys get the ivory bevel */
.kp-key { background: var(--sb-card); box-shadow: 0 5px 0 var(--sb-edge), inset 0 2px 0 rgba(255, 255, 255, .85); }
.kp-key:active { box-shadow: 0 1px 0 var(--sb-edge); }
.kp-ok, .kp-ok.hit { background: linear-gradient(180deg, #FFE27A, #F2B92E); color: var(--on-accent); box-shadow: 0 5px 0 #A9780F, inset 0 2px 0 rgba(255, 255, 255, .6); }
.kp-ok:active { background: linear-gradient(180deg, #F2B92E, #E5A81C); box-shadow: 0 1px 0 #A9780F; }

/* ==== forest home (Phase 5b, step 3a, 2026-10-24): the start page, the "who is playing" pages and the create-account steps
   sit in the Pixar-style rainforest clearing (kit 7 backdrop, kit 16 entrances). Text over the scene always sits on an ivory plaque. ==== */
body[data-screen="start"]::before, body[data-screen="pick"]::before, body[data-screen="newStudent"]::before, body[data-screen="pin"]::before, body[data-screen="profSetup"]::before, body[data-screen="profLogin"]::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 243, 176, .28), rgba(255, 243, 176, 0) 38%), url('../img/k17/forest-home-900.webp') center top / cover no-repeat, #8FD06A;
}
@media (min-width: 900px) { body[data-screen="start"]::before, body[data-screen="pick"]::before, body[data-screen="newStudent"]::before, body[data-screen="pin"]::before, body[data-screen="profSetup"]::before, body[data-screen="profLogin"]::before { background-image: linear-gradient(180deg, rgba(255, 243, 176, .28), rgba(255, 243, 176, 0) 38%), url('../img/k17/forest-home.webp'); } }
html[data-theme="dusk"] body[data-screen]::before { filter: sepia(.4) saturate(1.15) hue-rotate(-14deg) brightness(.93); }
body[data-screen="start"], body[data-screen="pick"], body[data-screen="newStudent"], body[data-screen="pin"], body[data-screen="profSetup"], body[data-screen="profLogin"] { background: #8FD06A; }
html[data-theme="dusk"] body[data-screen="start"], html[data-theme="dusk"] body[data-screen="pick"], html[data-theme="dusk"] body[data-screen="newStudent"], html[data-theme="dusk"] body[data-screen="pin"] { background: #B9A66B; }
/* ivory plaques so words never sit straight on the leaves */
.s-start .tagline, .s-start .sp-title, .s-start .start-players > .muted, .s-start .credit, .s-pick .page-head, .s-newStudent .page-head, .s-pick > .page > .muted {
  background: rgba(255, 249, 236, .92); border-radius: 22px; padding: 8px 18px; box-shadow: 0 4px 0 var(--sb-edge); margin-left: auto; margin-right: auto; width: fit-content; max-width: 100%;
}
.s-start .credit { padding: 12px 20px; }
.s-pick .page-head, .s-newStudent .page-head { width: 100%; padding: 10px 14px; margin-bottom: 18px; }
.s-pin .center-col, .s-profSetup .center-col, .s-profLogin .center-col { background: rgba(255, 249, 236, .94); border-radius: 30px; box-shadow: 0 7px 0 var(--sb-edge), 0 18px 30px rgba(20, 60, 30, .25); margin-top: 28px; margin-bottom: 28px; padding: 28px 22px 30px; }

/* create-account steps: ivory sheet, seed-and-sprout progress */
.s-newStudent .wiz { background: rgba(255, 249, 236, .95); border-radius: 30px; box-shadow: 0 7px 0 var(--sb-edge), 0 18px 30px rgba(20, 60, 30, .25); }
.wiz-dots { gap: 10px; align-items: center; }
.wiz-dots span { width: 16px; height: 16px; background: #D9CBA8; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .18); transition: transform .2s; }
.wiz-dots span.on { background: radial-gradient(120% 90% at 30% 20%, #FFF0A8, #F2B92E 70%); box-shadow: 0 0 10px rgba(255, 216, 107, .9), inset 0 1px 0 rgba(255, 255, 255, .7); transform: scale(1.12); }
.s-newStudent .choice-card { background: var(--sb-card); box-shadow: 0 5px 0 var(--sb-edge), inset 0 2px 0 rgba(255, 255, 255, .85); }
.s-newStudent .choice-card.on { background: #FFF1C4; box-shadow: 0 5px 0 #A9780F, inset 0 0 0 4px #F2B92E, 0 0 18px rgba(255, 216, 107, .6); }
.s-newStudent .big-input { background: #fff; border-color: var(--moss); }
.s-newStudent .big-input:focus { border-color: var(--leaf-d); box-shadow: 0 0 0 4px rgba(93, 187, 70, .3); }
@media (max-width: 560px) {
  .s-newStudent .wiz { flex-direction: column; align-items: center; padding: 18px 12px 84px; }
  .s-newStudent .choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
  .s-newStudent .choice-card { min-width: 0; padding: 12px 8px; }
}
@media (min-width: 561px) { .s-newStudent .page.narrow { margin-top: 3vh; } }

/* ==== candy buttons (Phase 5b, 2026-10-24): puffy, glossy "balloon" buttons that match the logo lettering: sky-cyan and sunny-yellow
   candy, a deep-navy outline, a bright inner rim, a soft gloss and a fat bottom edge. Labels stay real text in navy (8:1+ on every fill).
   Yellow = the main action, cyan = going somewhere, white = secondary, coral = grown-up/destructive. ==== */
:root { --navy: #0F3D7C; --navy-ink: #0B2F5E; }
.btn.btn {
  --bt-top: #FFFFFF; --bt-bot: #DDEEFF; --bt-edge: rgba(60, 120, 190, .28); --bt-rim: #FFFFFF; --bt-ink: var(--navy-ink); --r: 22px;
  position: relative; isolation: isolate; border: 0; border-radius: var(--r); margin: 6px 6px 16px;
  background: linear-gradient(180deg, var(--bt-top) 0%, var(--bt-bot) 100%); color: var(--bt-ink);
  font-weight: 900; letter-spacing: .01em; text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  box-shadow: 0 0 0 4px var(--navy), 0 8px 0 4px var(--navy), 0 14px 16px 2px rgba(15, 61, 124, .30),
              inset 0 0 0 3px var(--bt-rim), inset 0 -7px 0 0 var(--bt-edge);
  transition: transform .12s cubic-bezier(.34, 1.56, .64, 1), box-shadow .12s;
}
.btn.btn::before { content: ''; position: absolute; left: 9%; right: 9%; top: 6px; height: 36%; z-index: -1; border-radius: 999px; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)) center / 100% 100% no-repeat; }
.btn.btn.leaf, .btn.btn.leaf:not(.small) { --bt-top: #FFE766; --bt-bot: #FFC419; --bt-edge: rgba(214, 130, 0, .5); --bt-rim: #FFF6B0; background: linear-gradient(180deg, var(--bt-top) 0%, var(--bt-bot) 100%); color: var(--bt-ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.btn.btn.wood, .btn.btn.wood:not(.small) { --bt-top: #7DE3FF; --bt-bot: #2FB4F2; --bt-edge: rgba(10, 80, 160, .42); --bt-rim: #CDF5FF; background: linear-gradient(180deg, var(--bt-top) 0%, var(--bt-bot) 100%); color: var(--bt-ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn.btn.ghost, .btn.btn.ghost:not(.small) { background: linear-gradient(180deg, var(--bt-top) 0%, var(--bt-bot) 100%); color: var(--bt-ink); box-shadow: 0 0 0 4px var(--navy), 0 8px 0 4px var(--navy), 0 14px 16px 2px rgba(15, 61, 124, .30), inset 0 0 0 3px var(--bt-rim), inset 0 -7px 0 0 var(--bt-edge); padding: 12px 26px; }
.btn.btn.danger { --bt-top: #FF9AA4; --bt-bot: #F0506A; --bt-edge: rgba(150, 20, 50, .45); --bt-rim: #FFD3D8; --bt-ink: #2B0A18; background: linear-gradient(180deg, var(--bt-top) 0%, var(--bt-bot) 100%); color: var(--bt-ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.btn.btn.leaf::before, .btn.btn.wood::before, .btn.btn.ghost::before, .btn.btn.leaf:not(.small)::before, .btn.btn.wood:not(.small)::before, .btn.btn.ghost:not(.small)::before, .btn.btn.small.leaf::before, .btn.btn.small.wood::before, .btn.btn.danger::before {
  content: ''; position: absolute; inset: auto; left: 9%; right: 9%; top: 6px; height: 36%; z-index: -1; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)) center / 100% 100% no-repeat;
}
.btn.btn.big { --r: 28px; }
.btn.btn.small { --r: 18px; min-height: 50px; box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), 0 11px 12px 1px rgba(15, 61, 124, .28), inset 0 0 0 2px var(--bt-rim), inset 0 -5px 0 0 var(--bt-edge); margin-bottom: 12px; }
.btn.btn:active:not([disabled]) { transform: translateY(6px) scale(.985, .96); box-shadow: 0 0 0 4px var(--navy), 0 2px 0 4px var(--navy), 0 4px 6px 1px rgba(15, 61, 124, .25), inset 0 0 0 3px var(--bt-rim), inset 0 -3px 0 0 var(--bt-edge); }
.btn.btn.small:active:not([disabled]) { box-shadow: 0 0 0 3px var(--navy), 0 2px 0 3px var(--navy), inset 0 0 0 2px var(--bt-rim), inset 0 -3px 0 0 var(--bt-edge); }
@media (hover: hover) { .btn.btn:hover:not([disabled]) { filter: brightness(1.05) saturate(1.08); transform: translateY(-2px); } .btn.btn:active:not([disabled]) { transform: translateY(6px) scale(.985, .96); } }
.btn.btn[disabled] { opacity: 1; filter: grayscale(.85) brightness(1.04); box-shadow: 0 0 0 4px #8C9DB5, 0 8px 0 4px #8C9DB5, inset 0 0 0 3px #fff; color: #4A5A70; }
.btn.btn:focus-visible { outline: 5px solid #D9480F; outline-offset: 8px; transform: scale(1.03); }
.btn.btn svg.ico, .btn.btn img { filter: none; }
.reduce-motion .btn.btn, .reduce-motion .btn.btn:active { transition: none; }
/* the keypad: yellow candy Check, white puffy keys */
.kp-ok, .kp-ok.hit { --bt-edge: rgba(214, 130, 0, .5); background: linear-gradient(180deg, #FFE766, #FFC419); color: var(--navy-ink); box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), inset 0 0 0 3px #FFF6B0, inset 0 -6px 0 0 var(--bt-edge); }
.kp-ok:active { background: linear-gradient(180deg, #FFC419, #F0AE00); box-shadow: 0 0 0 3px var(--navy), 0 1px 0 3px var(--navy), inset 0 -3px 0 0 var(--bt-edge); }
.kp-key { background: linear-gradient(180deg, #FFFFFF, #E4F3FF); box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), inset 0 0 0 3px #fff, inset 0 -5px 0 0 rgba(60, 120, 190, .22); color: var(--navy-ink); margin-bottom: 4px; }
.kp-key:active { box-shadow: 0 0 0 3px var(--navy), 0 1px 0 3px var(--navy), inset 0 -3px 0 0 rgba(60, 120, 190, .22); background: linear-gradient(180deg, #E4F3FF, #CFE6FB); }
.kp-grid { gap: 14px 12px; padding: 4px 6px 8px; }
.icon-btn { box-shadow: 0 0 0 3px var(--navy), 0 5px 0 3px var(--navy), inset 0 0 0 2px #fff, inset 0 2px 0 rgba(255, 255, 255, .9); background: linear-gradient(180deg, #FFFFFF, #E4F3FF); }
.icon-btn.on { background: linear-gradient(180deg, #FFE766, #FFC419); box-shadow: 0 0 0 3px var(--navy), 0 5px 0 3px var(--navy), inset 0 0 0 2px #FFF6B0; }
/* the forest-art rules above (kit 16) also set radius 0 and no shadow on regular and big buttons: win them back with a higher selector */
.btn.btn.leaf, .btn.btn.wood, .btn.btn.ghost, .btn.btn.leaf:not(.small), .btn.btn.wood:not(.small), .btn.btn.ghost:not(.small) {
  border-radius: var(--r); padding: 12px 30px;
  box-shadow: 0 0 0 4px var(--navy), 0 8px 0 4px var(--navy), 0 14px 16px 2px rgba(15, 61, 124, .30), inset 0 0 0 3px var(--bt-rim), inset 0 -7px 0 0 var(--bt-edge);
}
.btn.btn.small.leaf, .btn.btn.small.wood, .btn.btn.small.ghost, .btn.btn.small.danger, .btn.btn.small {
  --r: 18px; padding: 8px 18px; box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), 0 11px 12px 1px rgba(15, 61, 124, .28), inset 0 0 0 2px var(--bt-rim), inset 0 -5px 0 0 var(--bt-edge);
}
.btn.btn.btn.leaf:active:not([disabled]), .btn.btn.btn.wood:active:not([disabled]), .btn.btn.btn.ghost:active:not([disabled]), .btn.btn.btn:active:not([disabled]) { transform: translateY(6px) scale(.985, .96); box-shadow: 0 0 0 4px var(--navy), 0 2px 0 4px var(--navy), 0 4px 6px 1px rgba(15, 61, 124, .25), inset 0 0 0 3px var(--bt-rim), inset 0 -3px 0 0 var(--bt-edge); }
.btn.btn.btn.small:active:not([disabled]) { box-shadow: 0 0 0 3px var(--navy), 0 2px 0 3px var(--navy), inset 0 0 0 2px var(--bt-rim), inset 0 -3px 0 0 var(--bt-edge); }
.btn.btn.btn[disabled], .btn.btn.btn.leaf[disabled], .btn.btn.btn.wood[disabled] { opacity: 1; filter: grayscale(.85) brightness(1.04); box-shadow: 0 0 0 4px #8C9DB5, 0 8px 0 4px #8C9DB5, inset 0 0 0 3px #fff; color: #4A5A70; }
.kp-key.kp-ok, .kp-key.kp-ok.hit { background: linear-gradient(180deg, #FFE766, #FFC419); box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), inset 0 0 0 3px #FFF6B0, inset 0 -6px 0 0 rgba(214, 130, 0, .5); }
.kp-key.kp-ok:active { background: linear-gradient(180deg, #FFC419, #F0AE00); box-shadow: 0 0 0 3px var(--navy), 0 1px 0 3px var(--navy), inset 0 -3px 0 0 rgba(214, 130, 0, .5); }

/* ==== top bar (Phase 5b, 2026-10-24): a bigger logo that hangs over the bar like a badge, big candy language buttons with the full
   language name, and candy sound / log-out buttons. Kids see English, Español and 한국어 at a glance, the chosen one glows yellow with a check. ==== */
.topbar { min-height: 84px; padding: calc(6px + env(safe-area-inset-top, 0px)) 18px 10px; background: linear-gradient(180deg, #FFFFFF, #EAF6FF); border-bottom: 4px solid var(--navy); box-shadow: 0 6px 0 rgba(15, 61, 124, .15), 0 10px 18px rgba(15, 61, 124, .12); backdrop-filter: none; -webkit-backdrop-filter: none; align-items: center; }
html[data-theme="dusk"] .topbar { background: linear-gradient(180deg, #FFFDF4, #FFEFD0); border-bottom-color: var(--navy); }
.topbar .brand-logo { height: 74px; filter: drop-shadow(0 4px 3px rgba(15, 61, 124, .28)); transition: transform .18s cubic-bezier(.34, 1.56, .64, 1); }
.brand-home { padding: 0 10px 0 4px; margin-left: -4px; gap: 0; }
.brand-home:hover .brand-logo, .brand-home:focus-visible .brand-logo { transform: translateY(-3px) rotate(-2deg) scale(1.04); }
.brand-home:active .brand-logo { transform: translateY(2px) scale(.96, .93); }
.brand-home:hover, .brand-home:focus-visible { background: transparent; }
.brand-home-label { margin-top: -6px; padding: 3px 12px 3px 8px; border-radius: 999px; font-size: .74rem; letter-spacing: .06em; background: linear-gradient(180deg, #FFE766, #FFC419); color: var(--navy-ink); box-shadow: 0 0 0 2px var(--navy), 0 3px 0 2px var(--navy); }
.brand-home.here .brand-home-label { background: linear-gradient(180deg, #fff, #DDEEFF); color: var(--navy-ink); }
.top-actions { gap: 14px; }
.seg.top-lang { background: none; box-shadow: none; padding: 0; gap: 10px; align-items: center; }
.top-lang .lang-globe { width: 30px; height: 30px; color: var(--navy); flex: none; }
.top-lang button { position: relative; min-height: 52px; min-width: 52px; padding: 8px 18px; border-radius: 18px; font-size: 1.02rem; font-weight: 900; color: var(--navy-ink); background: linear-gradient(180deg, #FFFFFF, #DDEEFF); transform: none;
  box-shadow: 0 0 0 3px var(--navy), 0 5px 0 3px var(--navy), inset 0 0 0 2px #fff, inset 0 -4px 0 rgba(60, 120, 190, .25); transition: transform .12s cubic-bezier(.34, 1.56, .64, 1); margin-bottom: 6px; }
.top-lang button::before { display: none; }
.top-lang button .lf { display: inline; } .top-lang button .ls { display: none; }
.top-lang button:hover { transform: translateY(-2px); }
.top-lang button:active { transform: translateY(4px) scale(.97, .94); box-shadow: 0 0 0 3px var(--navy), 0 1px 0 3px var(--navy), inset 0 0 0 2px #fff; }
.top-lang button.on { background: linear-gradient(180deg, #FFE766, #FFC419); box-shadow: 0 0 0 3px var(--navy), 0 5px 0 3px var(--navy), inset 0 0 0 2px #FFF6B0, inset 0 -4px 0 rgba(214, 130, 0, .5); animation: lang-pop .4s cubic-bezier(.34, 1.56, .64, 1); }
.top-lang button.on::after { content: '✓'; margin-left: 6px; font-weight: 900; }
.top-lang button:focus-visible { outline: 5px solid #D9480F; outline-offset: 6px; }
@keyframes lang-pop { 0% { transform: scale(.88); } 100% { transform: scale(1); } }
.topbar .icon-btn { width: 56px; height: 56px; margin-bottom: 6px; border-radius: 18px; transition: transform .12s cubic-bezier(.34, 1.56, .64, 1); }
.topbar .icon-btn:hover { transform: translateY(-2px); } .topbar .icon-btn:active { transform: translateY(4px) scale(.96); }
.topbar .icon-btn svg.ico { width: 30px; height: 30px; }
.topbar .logout-btn { margin: 0 4px 10px 0; }
@media (max-width: 1000px) { .top-lang .lang-globe { display: none; } .top-lang button { padding: 8px 12px; font-size: .95rem; } .top-actions { gap: 10px; } }
@media (max-width: 760px) {
  .topbar { min-height: 72px; padding-left: 10px; padding-right: 10px; gap: 6px; }
  .topbar .brand-logo { height: 58px; }
  .top-lang button { min-width: 46px; padding: 6px 4px; }
  .top-lang button .lf { display: none; } .top-lang button .ls { display: inline; font-size: 1.05rem; }
  .top-lang button.on::after { content: none; }
  .topbar .icon-btn { width: 46px; height: 46px; }
  .topbar .logout-btn span { display: none; } .topbar .logout-btn { min-width: 48px; padding: 6px 10px; }
  .top-actions { gap: 8px; }
  .brand-home-label { font-size: .62rem; padding: 2px 8px 2px 5px; }
}
@media (prefers-reduced-motion: reduce) { .top-lang button.on { animation: none; } }
.reduce-motion .top-lang button.on { animation: none; }
@media (max-height: 520px) and (orientation: landscape) { .topbar { min-height: 0; padding-top: calc(4px + env(safe-area-inset-top, 0px)); padding-bottom: 6px; } .topbar .brand-logo { height: 46px; } .topbar .brand-home-label { display: none; } .top-lang button { min-height: 44px; } .topbar .icon-btn { width: 46px; height: 46px; } }
@media (max-width: 430px) {
  .topbar { padding-left: 8px; padding-right: 8px; }
  .topbar .brand-logo { height: 52px; }
  .seg.top-lang { gap: 5px; }
  .top-lang button { min-width: 40px; min-height: 46px; padding: 4px 2px; border-radius: 15px; }
  .top-lang button .ls { font-size: .95rem; }
  .topbar .icon-btn { width: 42px; height: 46px; border-radius: 15px; }
  .topbar .icon-btn svg.ico { width: 24px; height: 24px; }
  .topbar .logout-btn { min-width: 44px; padding: 6px 8px; margin-right: 3px; }
  .top-actions { gap: 5px; }
}

/* ==== bottom dock (Phase 5b, 2026-10-24): the child's main places live in thumb reach, big art plus a word, the current place lit yellow ==== */
.dock { position: sticky; bottom: 0; z-index: 25; display: flex; justify-content: center; align-items: flex-end; gap: 10px; flex: none;
  padding: 16px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, #FFFFFF, #E3F2FF); border-top: 4px solid var(--navy);
  box-shadow: 0 -6px 0 rgba(15, 61, 124, .12), 0 -12px 20px rgba(15, 61, 124, .16); }
html[data-theme="dusk"] .dock { background: linear-gradient(180deg, #FFFDF4, #FFEFD0); }
.dk { position: relative; flex: 1 1 0; max-width: 168px; min-width: 0; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px 8px;
  border: 0; border-radius: 22px; background: transparent; color: var(--navy-ink); font-weight: 900; transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), background .12s; -webkit-tap-highlight-color: transparent; }
.dk .dk-art { width: 46px; height: 46px; object-fit: contain; display: block; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); filter: drop-shadow(0 3px 2px rgba(15, 61, 124, .25)); }
.dk-label { max-width: 100%; font-size: .92rem; line-height: 1.1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk:hover .dk-art { transform: translateY(-3px) scale(1.12) rotate(-4deg); }
.dk:active { transform: translateY(3px) scale(.96, .93); }
.dk.on { background: linear-gradient(180deg, #FFE766, #FFC419); transform: translateY(-10px); min-height: 86px;
  box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), 0 14px 14px 2px rgba(15, 61, 124, .28), inset 0 0 0 2px #FFF6B0, inset 0 -5px 0 rgba(214, 130, 0, .5); }
.dk.on .dk-art { transform: scale(1.14); }
.dk:focus-visible { outline: 5px solid #D9480F; outline-offset: 3px; }
@media (max-width: 560px) { .dock { gap: 4px; padding-left: 6px; padding-right: 6px; } .dk { min-height: 70px; padding: 4px 2px 6px; border-radius: 18px; } .dk .dk-art { width: 38px; height: 38px; } .dk-label { font-size: .72rem; } .dk.on { min-height: 78px; } }
@media (max-height: 520px) and (orientation: landscape) { .dock { padding-top: 8px; padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); } .dk { min-height: 56px; flex-direction: row; gap: 8px; } .dk .dk-art { width: 34px; height: 34px; } .dk.on { transform: translateY(-4px); min-height: 60px; } }
@media (prefers-reduced-motion: reduce) { .dk, .dk .dk-art { transition: none; } .dk:hover .dk-art { transform: none; } }
.reduce-motion .dk, .reduce-motion .dk .dk-art { transition: none; }
@media print { .dock { display: none !important; } }
@media (max-width: 560px) {
  .dk-label { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .7rem; line-height: 1.05; }
  .lm-bar { flex-wrap: nowrap; }
  .lm-me { flex: 1 1 auto; min-width: 0; }
  .lm-bar .chips { flex: 1 1 auto; justify-content: flex-end; min-width: 0; gap: 4px; }
  .lm-bar .chip { padding: 4px 8px; }
  .lm-bar .chip.streak { display: none; }
  .lm-bar .hud-actions { flex: none; flex-wrap: nowrap; margin-left: 0; gap: 6px; }
  .lm-bar .icon-btn, .lm-bar .hud-actions .btn.small { width: 44px; min-width: 44px; height: 48px; padding: 0; }
  .lm-bar .avatar { width: 40px; height: 40px; }
}

/* ==== top bar, second pass (Phase 5b, 2026-10-24): the first pass clipped the logo and the buttons because the bar was shorter than its contents,
   and three heavy outlined buttons made it noisy. Now: a bar tall enough for everything, ONE outlined language pill with the chosen
   language lit yellow inside, quieter sound and log-out buttons, everything on one centre line. ==== */
.topbar { min-height: 104px; padding: calc(10px + env(safe-area-inset-top, 0px)) 22px 16px; align-items: center; overflow: visible; }
.topbar .brand-home { align-items: center; gap: 3px; padding: 0 8px 0 2px; margin: 0; }
.topbar .brand-logo { height: 66px; }
.topbar .brand-home-label { margin-top: 0; font-size: .7rem; padding: 2px 10px 2px 6px; box-shadow: 0 0 0 2px var(--navy); }
.topbar .top-actions { align-items: center; gap: 16px; padding-bottom: 8px; }
.topbar .seg.top-lang { display: inline-flex; align-items: center; gap: 4px; padding: 5px; margin: 0; border-radius: 999px; background: linear-gradient(180deg, #E3F1FF, #F6FBFF);
  box-shadow: 0 0 0 3px var(--navy), 0 5px 0 3px var(--navy), inset 0 3px 6px rgba(15, 61, 124, .15); }
.topbar .seg.top-lang .lang-globe { width: 26px; height: 26px; margin: 0 4px 0 10px; }
.topbar .seg.top-lang button { min-height: 46px; min-width: 46px; margin: 0; padding: 6px 18px; border-radius: 999px; background: transparent; box-shadow: none; color: var(--navy-ink); font-size: 1rem; animation: none; transform: none; }
.topbar .seg.top-lang button:hover { background: rgba(255, 255, 255, .85); transform: none; }
.topbar .seg.top-lang button:active { transform: scale(.96); box-shadow: none; }
.topbar .seg.top-lang button.on { background: linear-gradient(180deg, #FFE766, #FFC419); box-shadow: 0 3px 0 #C98A00, inset 0 2px 0 #FFF6B0; }
.topbar .seg.top-lang button.on::after { content: '✓'; margin-left: 6px; }
.topbar .seg.top-lang button:focus-visible { outline: 4px solid #D9480F; outline-offset: 3px; }
.topbar .icon-btn { width: 52px; height: 52px; margin: 0; }
.topbar .logout-btn { margin: 0; min-height: 48px; }
@media (max-width: 1000px) { .topbar .seg.top-lang .lang-globe { display: none; } .topbar .seg.top-lang button { padding: 6px 12px; } .topbar .top-actions { gap: 12px; } }
@media (max-width: 760px) {
  .topbar { min-height: 88px; padding-left: 10px; padding-right: 10px; padding-bottom: 14px; }
  .topbar .brand-logo { height: 54px; }
  .topbar .seg.top-lang button { min-width: 42px; min-height: 44px; padding: 4px 8px; }
  .topbar .seg.top-lang button.on::after { content: none; }
  .topbar .icon-btn { width: 46px; height: 46px; } .topbar .logout-btn { min-width: 46px; padding: 6px 10px; }
}
@media (max-width: 430px) {
  .topbar { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .topbar .brand-logo { height: 48px; }
  .topbar .seg.top-lang { padding: 3px; gap: 2px; }
  .topbar .seg.top-lang button { min-width: 38px; min-height: 42px; padding: 4px 6px; }
  .topbar .icon-btn { width: 42px; height: 44px; } .topbar .logout-btn { min-width: 42px; padding: 6px 8px; }
  .topbar .top-actions { gap: 8px; }
}
@media (max-height: 520px) and (orientation: landscape) { .topbar { min-height: 0; padding-top: calc(4px + env(safe-area-inset-top, 0px)); padding-bottom: 12px; } .topbar .brand-logo { height: 44px; } .topbar .brand-home-label { display: none; } .topbar .seg.top-lang button { min-height: 40px; } .topbar .icon-btn { width: 44px; height: 44px; } }

/* ==== epic sign-in (Phase 5b, 2026-10-24): the logo hangs on its own clean plaque so it never fights the jungle; Student and Parents are two equal
   ivory panels with the kit 16 doors; budgies from kit 1 glide across and fireflies glow. Phones keep the compact layout. ==== */

.start-wx .wx-say { background: #F1F8FF; box-shadow: 0 0 0 2px var(--navy); }

/* ==== create-account steps match the rest of the app (Phase 5b, 2026-10-24): a hanging candy plaque with five icon stations (pencil, star, nest,
   seed, lock; done = green check, now = glowing yellow), a big guide budgie, candy input, cards and PIN seeds ==== */
.s-newStudent .page.narrow { width: min(900px, 100%); padding-top: 26px; }
.s-newStudent .page-head { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; margin: 6px 0 30px; padding: 12px 20px; border-radius: 34px;
  background: linear-gradient(180deg, #FFFFFF, #EEF7FF); box-shadow: 0 0 0 4px var(--navy), 0 9px 0 4px var(--navy), 0 20px 32px rgba(15, 61, 124, .30), inset 0 0 0 3px #fff; }
.s-newStudent .page-head::before, .s-newStudent .page-head::after { content: ''; position: absolute; top: -30px; width: 8px; height: 34px; border-radius: 4px; background: repeating-linear-gradient(180deg, #C79A5B 0 7px, #8A5E2E 7px 11px); box-shadow: 0 0 0 2px var(--navy); z-index: -1; }
.s-newStudent .page-head::before { left: 16%; } .s-newStudent .page-head::after { right: 16%; }
.s-newStudent .page-head .h2 { text-align: center; color: var(--navy-ink); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }
.wiz-dots { display: flex; align-items: center; gap: 0; justify-content: flex-end; }
.wiz-dots span.st { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; margin-right: 14px; background: linear-gradient(180deg, #FFFFFF, #E3F1FF); color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy), 0 4px 0 3px var(--navy); transform: none; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.wiz-dots span.st:last-child { margin-right: 0; }
.wiz-dots span.st::after { content: ''; position: absolute; left: calc(100% + 3px); top: 50%; width: 8px; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--navy); }
.wiz-dots span.st:last-child::after { display: none; }
.wiz-dots span.st svg { width: 24px; height: 24px; }
.wiz-dots span.st.done { background: linear-gradient(180deg, #4FB04A, var(--leaf-d)); color: #fff; }
.wiz-dots span.st.now { background: radial-gradient(120% 90% at 30% 15%, #FFF0A8, #F2B92E 72%); transform: scale(1.18); box-shadow: 0 0 0 3px var(--navy), 0 4px 0 3px var(--navy), 0 0 18px 4px rgba(255, 216, 107, .9); }
.s-newStudent .wiz { align-items: center; gap: 22px; padding: 30px 28px 34px; border-radius: 36px; }
.s-newStudent .wiz .buddy { flex: none; width: 150px; display: grid; place-items: center; filter: drop-shadow(0 10px 8px rgba(20, 60, 30, .28)); }
.s-newStudent .wiz-body .h3 { font-size: 1.6rem; color: var(--navy-ink); margin: 0; }
.s-newStudent .big-input { border: 0; border-radius: 24px; background: #fff; font-size: 2.2rem; padding: 14px 20px; color: var(--navy-ink); margin: 6px 0 12px;
  box-shadow: 0 0 0 4px var(--navy), 0 7px 0 4px var(--navy), inset 0 4px 8px rgba(15, 61, 124, .12); }
.s-newStudent .big-input:focus { outline: none; border: 0; box-shadow: 0 0 0 4px var(--navy), 0 7px 0 4px var(--navy), 0 0 0 11px rgba(255, 216, 107, .85), inset 0 4px 8px rgba(15, 61, 124, .12); }
.s-newStudent .choice-card { position: relative; background: linear-gradient(180deg, #FFFFFF, #EEF7FF); margin-bottom: 10px; color: var(--navy-ink);
  box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), inset 0 0 0 2px #fff; transition: transform .16s cubic-bezier(.34, 1.56, .64, 1); }
.s-newStudent .choice-card:hover { transform: translateY(-3px); } .s-newStudent .choice-card:active { transform: translateY(4px); box-shadow: 0 0 0 3px var(--navy), 0 2px 0 3px var(--navy), inset 0 0 0 2px #fff; }
.s-newStudent .choice-card.on { background: linear-gradient(180deg, #FFF1A8, #FFD84A); box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy), inset 0 0 0 2px #FFF6B0, 0 0 22px 2px rgba(255, 216, 107, .75); transform: translateY(-3px) scale(1.03); }
.s-newStudent .choice-card.on::after { content: '✓'; position: absolute; top: 8px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 900; font-size: 1rem; }
.s-newStudent .choice-card b, .s-newStudent .choice-card .big-num { color: var(--navy-ink); } .s-newStudent .choice-card small { color: var(--ink-2); }
.s-newStudent .swatch { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--navy); transition: transform .16s cubic-bezier(.34, 1.56, .64, 1); }
.s-newStudent .swatch.on { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--navy), 0 0 16px 6px rgba(255, 216, 107, .9); }
.s-newStudent .avatar-preview { background: linear-gradient(180deg, #fff, #EEF7FF); border-radius: 26px; box-shadow: 0 0 0 3px var(--navy), 0 6px 0 3px var(--navy); }
.s-newStudent .avatar-preview b { color: var(--navy-ink); }
/* PIN seeds (create account, sign in, Parents setup) */
.pin-dots { gap: 16px; }
.pin-dots span { width: 30px; height: 30px; background: #fff; box-shadow: inset 0 0 0 3px var(--navy), inset 0 4px 6px rgba(15, 61, 124, .15); transition: transform .16s cubic-bezier(.34, 1.56, .64, 1); }
.pin-dots span.on { background: radial-gradient(120% 90% at 30% 15%, #FFF0A8, #F2B92E 72%); box-shadow: inset 0 0 0 3px var(--navy), 0 0 14px 3px rgba(255, 216, 107, .9); transform: scale(1.12); }
@media (max-width: 700px) {
  .s-newStudent .page-head { grid-template-columns: auto 1fr; row-gap: 10px; padding: 10px 14px; margin-bottom: 26px; }
  .s-newStudent .page-head .wiz-dots { grid-column: 1 / -1; justify-content: center; }
  .s-newStudent .wiz { flex-direction: column; padding: 20px 14px 88px; } .s-newStudent .wiz .buddy { width: 120px; }
  .s-newStudent .big-input { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) { .wiz-dots span.st, .s-newStudent .choice-card, .s-newStudent .swatch, .pin-dots span { transition: none; } }
.s-newStudent .wiz.step-budgie .buddy, .s-newStudent .wiz.step-color .buddy { display: none; }
.s-newStudent .wiz.step-budgie .choice-row, .s-newStudent .wiz.step-grade .choice-row { flex-wrap: nowrap; gap: 16px; justify-content: center; }
.s-newStudent .wiz.step-budgie .choice-card { min-width: 0; flex: 1 1 0; max-width: 200px; }
@media (max-width: 700px) { .s-newStudent .wiz.step-budgie .choice-row { flex-wrap: wrap; } .s-newStudent .wiz.step-budgie .choice-card { flex: 1 1 40%; } }
@media (max-width: 700px) {
  .s-newStudent .page-head { grid-template-columns: auto 1fr; grid-template-areas: "back title" "dots dots"; }
  .s-newStudent .page-head > .btn { grid-area: back; margin: 0 0 6px; } .s-newStudent .page-head > .h2 { grid-area: title; font-size: 1.25rem; } .s-newStudent .page-head > .wiz-dots { grid-area: dots; grid-column: auto; justify-content: center; }
}
@media (max-width: 700px) { .s-newStudent .page-head > .btn { min-width: 52px; padding: 8px 14px; } .s-newStudent .page-head > .btn span { display: none; } .s-newStudent .page-head > .h2 { text-align: left; } }
@media (max-width: 700px) { .s-newStudent .page-head { grid-template-columns: 64px minmax(0, 1fr); } .s-newStudent .page-head > .h2 { overflow-wrap: anywhere; } }
@media (max-width: 700px) { .s-newStudent .page-head > .wiz-dots { grid-area: auto; grid-column: 1 / -1; grid-row: 2; justify-content: center; } .s-newStudent .page-head > .btn { grid-column: 1; grid-row: 1; } .s-newStudent .page-head > .h2 { grid-column: 2; grid-row: 1; } }
@media (max-width: 700px) { .s-newStudent .page-head > .h2 { padding-left: 14px; } }

/* ==== the Pixar-style forest backdrops (Phase 5b, 2026-10-24): the day and dusk clearings and the foliage frame, rendered in Canva (kit 15) ==== */

html[data-theme="dusk"] body[data-screen]::before { filter: none; }

body[data-screen="start"], body[data-screen="pick"], body[data-screen="newStudent"], body[data-screen="pin"], body[data-screen="profSetup"], body[data-screen="profLogin"] { background: #5D8F3A; }
html[data-theme="dusk"] body[data-screen="start"], html[data-theme="dusk"] body[data-screen="pick"], html[data-theme="dusk"] body[data-screen="newStudent"], html[data-theme="dusk"] body[data-screen="pin"] { background: #1D2A44; }
/* leaves framing the screen edges (under everything, over the backdrop); not on phones, where a 4:3 frame would squash */

@media (max-width: 700px) { body[data-screen]::after { display: none; } }

/* the lessons' backdrop layer (duo.css paints it; the old clearing art is gone, review 2026-11-20 U1) */
body[data-screen="lesson"]::before, body[data-screen="practice"]::before, body[data-screen="diag"]::before, body[data-screen="flight"]::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body[data-screen="lesson"], body[data-screen="practice"], body[data-screen="diag"], body[data-screen="flight"] { background: #DCEFD3; }
html[data-theme="dusk"] body[data-screen="lesson"]::before, html[data-theme="dusk"] body[data-screen="practice"]::before, html[data-theme="dusk"] body[data-screen="diag"]::before, html[data-theme="dusk"] body[data-screen="flight"]::before { filter: sepia(.35) hue-rotate(-12deg) saturate(1.1); }

body[data-screen="lesson"] .pr-top, body[data-screen="practice"] .pr-top, body[data-screen="diag"] .pr-top, body[data-screen="flight"] .pr-top { background: rgba(255, 249, 236, .95); border-radius: 26px; padding: 8px 14px; box-shadow: 0 5px 0 var(--sb-edge); }
body[data-screen="lesson"] .lesson-stage { background: rgba(255, 253, 246, .94); }
/* ==========================================================================
   The kids' revamp, round 2 (map, Badge Nest, Seed Shop; docs/KIDS-REVAMP-2.1.md). The front-end pass owns
   every other screen.
   ========================================================================== */
/* "Play next": the one big, warm button on the map; the Daily Flight and a Boost sit beside it, quieter */
.lm-next { position: relative; flex: none; min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 6px 22px 6px 8px; border: 3px solid #FFF4CF; border-radius: 22px; background: linear-gradient(#FFE89A, #FFC447); color: #4A2F0E; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 5px 0 #B9801C, 0 10px 24px rgba(2, 12, 39, .35); animation: lm-next-glow 2.4s ease-in-out infinite; }
.lm-next img { width: 58px; height: 48px; object-fit: contain; flex: none; }
.lm-next b { display: flex; align-items: center; gap: 6px; font-size: 1.3rem; font-weight: 900; line-height: 1.1; }
.lm-next b svg.ico { width: 22px; height: 22px; }
.lm-next small { display: block; max-width: 19em; font-size: .88rem; font-weight: 800; color: #6B4A1A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-next:active { transform: translateY(3px); box-shadow: 0 2px 0 #B9801C, 0 6px 14px rgba(2, 12, 39, .3); }
.lm-next:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lm-next.home { background: linear-gradient(#E6F4FF, #A9D6FA); border-color: #F2FAFF; color: #12355E; box-shadow: 0 5px 0 #4F86B8, 0 10px 24px rgba(2, 12, 39, .35); animation: none; }
.lm-next.home small { color: #2C527E; }
.lm-next:disabled { cursor: default; }
@keyframes lm-next-glow { 0%, 100% { box-shadow: 0 5px 0 #B9801C, 0 10px 24px rgba(2, 12, 39, .35), 0 0 0 0 rgba(255, 214, 102, .0); } 50% { box-shadow: 0 5px 0 #B9801C, 0 10px 24px rgba(2, 12, 39, .35), 0 0 0 8px rgba(255, 214, 102, .35); } }
.still .lm-next { animation: none; }
@media (max-width: 619px) {
  .lm-missions { gap: 8px; margin: 8px 10px 0; }
  .lm-next { flex: 1.5 1 0; min-width: 0; min-height: 60px; padding: 4px 12px 4px 4px; gap: 6px; }
  .lm-next img { width: 44px; height: 38px; }
  .lm-next b { font-size: 1.12rem; } .lm-next b svg.ico { width: 18px; height: 18px; }
  .lm-next small { font-size: .78rem; }
  .lm-daily { flex: 1 1 0; min-width: 0; min-height: 60px; padding: 4px 10px 4px 4px; gap: 6px; }
  .lm-daily img { width: 38px; height: 32px; }
  .lm-daily b { font-size: .92rem; line-height: 1.15; }
  .lm-daily small { display: none; }
}
@media (max-height: 560px) { .lm-next { min-height: 48px; padding: 2px 16px 2px 6px; } .lm-next img { width: 40px; height: 34px; } .lm-next b { font-size: 1.1rem; } .lm-next small { display: none; } }
/* island labels big enough for a 6-year-old to read (they were 10 to 13 px) */
.lm-label { width: min(224px, calc(var(--size) * 1.04)); padding: 7px 9px 8px; }
.lm-label small { font-size: .78rem; letter-spacing: .08em; }
.lm-label b { font-size: 1rem; line-height: 1.15; }
.lm-label em { font-size: .84rem; }

.lm-hint { font-size: .85rem; }
/* a sky that scrolls fades out at its edges, so a half-shown island reads as "more this way", not as cut off */
.lm-stage.scrolls .lm-view { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 34px, #000 calc(100% - 34px), transparent 100%); }

/* Badge Nest: tap a badge or the budgie; three badges a row on a phone, with just the world's name */
.badge-cell { font: inherit; color: inherit; border: 0; cursor: pointer; min-height: 44px; }
.badge-cell b { font-size: 1rem; line-height: 1.2; }
.badge-cell small { font-size: .82rem; }
.badge-cell.on small { color: #8A6411; }
.badge-cell:focus-visible { outline: 3px solid #4FA8EC; outline-offset: 3px; }
.badge-cell.pop svg { animation: badge-pop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes badge-pop { 0% { transform: scale(1) rotate(0); } 40% { transform: scale(1.22) rotate(-8deg); } 70% { transform: scale(.96) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }
@media (max-width: 619px) { .badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .badge-cell { padding: 10px 4px; } .badge-cell svg { width: 72px; height: 72px; } .badge-cell b { font-size: .88rem; } .badge-cell small { font-size: .74rem; } }
.nest-bird { pointer-events: auto; padding: 0; border: 0; background: none; cursor: pointer; min-width: 44px; }
.nest-bird.caring { pointer-events: none; }
.nest-bird.hop img { animation: nest-hop .6s ease; }
@keyframes nest-hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-18%) rotate(-6deg); } 65% { transform: translateY(0) rotate(4deg); } }
.nest-bird:focus-visible { outline: 3px solid #FFE59B; outline-offset: 3px; border-radius: 12px; }

/* Seed Shop: a new thing gets its own moment */
.bought-card { text-align: center; }
.bought-art { position: relative; display: grid; place-items: center; width: 200px; height: 200px; margin: 0 auto 4px; }
.bought-art > :not(.bought-rays) { position: relative; max-width: 180px; max-height: 180px; animation: bought-in .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.bought-rays { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 214, 102, .55) 0 12deg, rgba(255, 214, 102, 0) 12deg 30deg); -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%); mask-image: radial-gradient(circle, #000 30%, transparent 70%); animation: bought-spin 12s linear infinite; }
@keyframes bought-in { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes bought-spin { to { transform: rotate(360deg); } }
.bought-art svg { width: 180px; height: auto; }
.bought-card .lead { margin: 4px auto 14px; max-width: 22em; }

@media (prefers-reduced-motion: reduce) { .lm-next, .badge-cell.pop svg, .nest-bird.hop img, .bought-art > *, .bought-rays { animation: none !important; } }
body.reduce-motion .lm-next, body.reduce-motion .badge-cell.pop svg, body.reduce-motion .nest-bird.hop img, body.reduce-motion .bought-art > *, body.reduce-motion .bought-rays { animation: none !important; }
/* =====================================================================
   Front-end pass (2026-10-24, docs/FRONTEND-PASS.md): bigger words for 6–10 year olds, 44 pt targets
   everywhere, a calmer tutor sheet on phones, a celebration-sized level result. Map, Badge Nest and
   Seed Shop are styled by the kids' revamp blocks above; this block does not touch .lm-*, .nest or .shop.
   ===================================================================== */
/* top bar: every language button and the Home tag reach 44 pt and readable size on phones */
.topbar .brand-home-label { font-size: .8rem; }
@media (max-width: 760px) {
  .topbar .seg.top-lang button { min-width: 44px; min-height: 44px; }
  .topbar .icon-btn { min-width: 44px; min-height: 44px; }
}
/* bottom dock: labels a 6-year-old can read */
.dock .dk-label { font-size: .82rem; }
@media (max-width: 420px) { .dock .dk-label { font-size: .74rem; line-height: 1.1; } }

/* tutor sheet (Coco / Professor steps, your turn, Blue's path): the words a child must read are lesson-sized */
.tutor .tu-intro { font-size: 1.15rem; line-height: 1.4; }
.tutor .tu-stepno { font-size: .95rem; font-weight: 900; }
.tutor .tu-text { font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.4; }
.tutor .tu-sol { font-size: 1.1rem; }
.tutor .tu-body.center .lead { font-size: 1.15rem; }
.tutor .ans-chip { font-size: 1.3rem; padding: 2px 12px; }
/* phones: one tidy head row (small Professor, one-line kicker, title in at most two lines) so the problem stays on screen */
@media (max-width: 560px) {
  .tu-head, .tu-head.k-lead { align-items: center; gap: 8px; padding: 8px 10px; }
  .tu-head.k-lead .kairos-sprite { width: 64px !important; height: 52px !important; flex: 0 0 auto; }
  .tu-head .perch, .tu-head .budgie { flex: 0 0 auto; }
  .tu-headtext { min-width: 0; }
  .tu-head .tu-kicker, .tu-head.k-lead .tu-kicker { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tu-head h3, .tu-head.k-lead h3 { font-size: 1.12rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tutor .tu-text { font-size: 1.2rem; }
  .tutor .tu-intro { font-size: 1.05rem; }
}

/* Flight Path on phones: the circles share the row instead of running under the pencil button */
@media (max-width: 560px) {
  .pr-top .flight { gap: 2px; padding: 6px 0; }
  .pr-top .flight .f-node:not(.now) { flex: 0 1 22px; width: auto; height: auto; aspect-ratio: 1; min-width: 12px; }
  .pr-top .flight .f-node:not(.now) svg.ico { width: 62%; height: 62%; }
  .pr-top .flight-wrap { overflow: hidden; }
}
.pr-top .run-stage, .pr-top .f-warm { font-size: .86rem; }

/* Blue's blocks: the tool buttons are read by the child, so they get real words and a clear "not now" look */
.sh-btn { font-size: 1.02rem; font-weight: 800; color: var(--sb-ink, #1F2A44); }
.sh-btn[aria-disabled="true"] { opacity: 1; filter: grayscale(.85); color: #5B6475; box-shadow: inset 0 0 0 2px #D5DACB; }
@media (max-width: 560px) { .sh-btn { font-size: .86rem; min-height: 68px; } }

/* "What does the question ask?" choices look and press like the candy buttons */
.mc.words .mc-btn { font-size: 1.15rem; min-height: 64px; border-radius: 20px; background: linear-gradient(180deg, #FFFFFF, #F4F8FF); box-shadow: 0 5px 0 #1F3A68, inset 0 0 0 3px #1F3A68; color: #1F2A44; }
.mc.words .mc-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1F3A68, inset 0 0 0 3px #1F3A68; }
.mc.words .mc-btn.right { background: linear-gradient(180deg, #EAFBE3, #D3F3C6); box-shadow: 0 5px 0 #2F7D32, inset 0 0 0 4px #2F7D32; }
.mc.words .mc-btn.wrong { background: #FFE6EA; }

/* level result: a celebration-sized card in the clearing, not a small note in empty space */
.level-done { background: rgba(255, 252, 242, .96); border-radius: 34px; padding: 26px 22px 30px; box-shadow: 0 6px 0 var(--sb-edge, #E3D6B4), 0 18px 40px rgba(40, 60, 30, .12); width: min(640px, calc(100% - 24px)); margin: 18px auto 28px; }
.level-done .trio { min-height: 130px; align-items: flex-end; }
.level-done .trio .budgie:last-child { transform-origin: 50% 100%; }
.level-done .h2 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); margin: 6px 0 10px; }
.level-done .lead { font-size: 1.2rem; }
.level-done .seeds-earned { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 900; color: #6B4A12; background: #FFF3CC; border-radius: 999px; padding: 6px 18px; box-shadow: inset 0 0 0 2px #E9C766; }
.level-done .seeds-earned svg.ico { width: 26px; height: 26px; }
.level-done .muted { font-size: 1.05rem; color: #4F5B4A; }
.level-done .recap-row .f-node { width: 40px; height: 40px; }
.level-done .lc-actions .btn { min-height: 64px; font-size: 1.2rem; padding-inline: 26px; }
@media (max-width: 560px) { .level-done { padding: 18px 14px 22px; margin-top: 10px; } .level-done .trio { min-height: 110px; } }

/* My Results: the Professor is a full-size character, not a tiny figure */
.res-highlight.theater { padding: 10px 14px; }

/* Speed Garden: on phones Sol sits beside a full-width sentence and the timer choice stays on one line each */
@media (max-width: 560px) {
  .g-hero { flex-direction: column; text-align: center; gap: 6px; padding: 12px 16px; }
  .g-hero .sb-art, .g-hero img { width: 110px !important; height: auto; }
  .g-hero .lead { text-align: center; font-size: 1.1rem; }
  .seg.g-timer { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .seg.g-timer button { font-size: .95rem; padding-inline: 8px; line-height: 1.2; }
}
.g-mode b { font-size: 1.15rem; } .g-mode small { font-size: .9rem; }

/* start page on a landscape iPad: a slimmer sign so the children's faces show without scrolling, and the
   Student door gets more room than the Parents door (kids come first) */

/* ---- link back to the website (2026-10-25, David): start page, Settings and Parents. In the app the parental gate
   catches it and Safari opens www.kairoszone.com. ---- */
.credit-link.site-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: center; margin: 10px auto 0; padding: 10px 18px; min-height: 44px; border-radius: 999px; background: #fffdf3; border: 2px solid var(--leaf-d); text-decoration: none; }
.credit-link.site-link:hover { text-decoration: underline; }
.credit-link.site-link:focus-visible { outline: 3px solid var(--leaf-d); outline-offset: 3px; }

/* =========================================================================
   One look on every screen (Build 2.2.4, David 2026-10-26: "unify the same version in all platforms").
   iPads (768–1279 px wide, portrait and landscape) keep the desktop layout: the forest behind the start page,
   Student and Parents side by side, the names on the map bar, the Log out and Finish words, the weather budgie's
   words. Only phones (under 620 px, or a short landscape phone) switch to the compact layout.
   ========================================================================= */

@media (min-width: 620px) and (min-height: 521px) {
  .logout-btn span, .topbar .logout-btn span { display: inline; }
  .topbar .logout-btn { min-width: 0; padding: 6px 14px; }
  .lm-bar .who b, .lm-bar .chip.goal b i, .lm-bar .chip.streak .w { display: inline; } .lm-bar .chip.goal small { display: block; }
  .lm-bar .chip.streak .n { display: none; }
  .lm-bar .hud-actions .lbl { display: inline; }
  .lm-bar .hud-actions .btn.small { min-width: 0; padding: 6px 14px; }
  .lm-side .wx-say { display: flex; }
}

/* Blue's decimal chart (manipulatives/dgrid.js, Phase 8 wave 8b): one column per place, the point between ones and tenths */
.dg-chart { display: flex; gap: 4px; overflow-x: auto; justify-content: center; padding: 2px; }
.dg-col { flex: 0 1 72px; min-width: 52px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--sun-l); border-radius: var(--r-md); padding: 8px 2px; border: 3px solid transparent; }
.dg-col.here { border-color: var(--sun-d); }
.dg-head { font-size: .68rem; font-weight: 900; color: var(--bark-d); text-align: center; line-height: 1.1; min-height: 2.2em; }
.dg-d { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 1.5rem; font-weight: 900; color: var(--bark-d); border-radius: 12px; font-style: normal; }
.dg-d.ghost { color: var(--bark-d); opacity: .35; }
.dg-d.on { background: var(--leaf-d); color: #fff; }
button.dg-d.glow { border: 3px solid var(--sun-d); background: #fff; cursor: pointer; box-shadow: 0 0 0 4px rgba(255, 196, 0, .3); }
.dg-val { font-size: .8rem; font-weight: 900; color: var(--leaf-d); }
.dg-pt { flex: 0 0 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: calc(2.2em + 14px); }
.dg-pt span { display: none; }
.dg-pt i { font-style: normal; font-size: 2rem; font-weight: 900; line-height: 44px; color: var(--bark-d); }
@media (max-width: 520px) { .dg-col { min-width: 40px; } .dg-head { font-size: .55rem; } .dg-d { font-size: 1.25rem; } }
.dg-k { display: block; min-height: 1.1em; line-height: 1.1em; font-size: .75rem; font-weight: 900; color: var(--berry-d, #b03a2e); }
.dg-sum .dg-pt span.dg-k { display: block; visibility: hidden; }
.dg-sum .dg-col > .dg-d:last-child { border-top: 3px solid var(--bark-d); border-radius: 0 0 12px 12px; }
.dg-d.dg-blank { opacity: .5; }
.dg-col.dg-op { flex: 0 0 auto; min-width: 34px; background: transparent; }
.dg-col.dg-op > .dg-d:last-child { border-top: 0; }
/* Blue's "groups that fit" divider (manipulatives/quot.js) */
.qt { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.qt-pool, .qt-got { background: var(--sun-l); border-radius: var(--r-md); padding: 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 140px; }
.qt-lab { font-size: .75rem; font-weight: 900; color: var(--bark-d); text-transform: uppercase; letter-spacing: .04em; }
.qt-left, .qt-sum { font-size: 1.8rem; font-weight: 900; color: var(--bark-d); }
.qt-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 260px; min-height: 1.6em; }
.qt-chip { background: #fff; border-radius: 10px; padding: 2px 8px; font-weight: 800; font-size: .85rem; color: var(--bark-d); }
.qt-btn { flex-direction: column; min-height: 56px; min-width: 88px; }
.qt-btn small { font-size: .75rem; opacity: .85; }
/* Blue's "cut the pieces smaller" strips (manipulatives/fcut.js) */
.fc-row { flex-wrap: wrap; }
.fc-bar .fc-part { min-height: 52px; border-left-width: 1px; }
.fc-cuts { flex: 1 0 100%; display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.fc-btn { min-height: 44px; min-width: 64px; font-weight: 900; }
/* Blue's sharing table (manipulatives/fshare.js) */
.fs { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fs-pile, .fs-plate { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; background: var(--sun-l); border-radius: var(--r-md); padding: 8px 10px; min-height: 52px; }
.fs-pile { min-width: 160px; max-width: 360px; }
.fs-plates { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fs-plate { border-radius: 50%; width: 76px; height: 76px; padding: 6px; border: 3px solid var(--bark); background: #fff; }
.fs-whole { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: 2px solid var(--bark-d); }
.fs-piece { width: 14px; height: 14px; border-radius: 4px 4px 14px 4px; background: #FFE27A; border: 2px solid var(--bark-d); }
@media (max-width: 520px) { .fs-plate { width: 62px; height: 62px; } .fs-whole { width: 24px; height: 24px; } }
/* Blue's fraction grid (manipulatives/fgrid.js): whole squares with thick edges, cuts drawn thin; the shaded band
   across and the band down overlap where the answer is (dark), colour plus a pattern so colour is never the only signal */
.fg { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fg-grid { display: grid; width: min(340px, 80vw); max-height: 300px; border: 3px solid var(--bark-d); border-radius: 6px; background: #fff; overflow: hidden; }
.fg-c { border: 0 solid transparent; min-width: 0; min-height: 0; }
.fg-c.vc { border-right: 1px dashed var(--bark); } .fg-c.vw { border-right: 3px solid var(--bark-d); }
.fg-c.hc { border-bottom: 1px dashed var(--bark); } .fg-c.hw { border-bottom: 3px solid var(--bark-d); }
.fg-c.half { background: #FFF1B8; }
.fg-c.on { background: repeating-linear-gradient(45deg, #F2A33A 0 6px, #E8902A 6px 9px); }
.fg-bars { gap: 6px; width: min(340px, 80vw); }
.fg-bar { display: flex; width: 100%; height: 26px; border: 3px solid var(--bark-d); border-radius: 6px; background: #fff; overflow: hidden; }
.fg-p { flex: 1; }
.fg-p.cut + .fg-p.cut { border-left: 2px dashed var(--bark); }
.fg-p.on { background: repeating-linear-gradient(45deg, #F2A33A 0 6px, #E8902A 6px 9px); }
/* Blue's volume cubes (manipulatives/cubes.js) and the World 5 pictures (ui/visuals5.js): boxes drawn in SVG, box A
   green and box B blue with A and B written on them, so colour is never the only signal */
.cb { display: flex; justify-content: center; }
.cb-pic { width: min(360px, 84vw); display: flex; justify-content: center; }
.cb-pic svg, .v-prism svg, .v-prisms svg { max-height: 280px; }
.v-lineplot svg { max-height: 260px; }
/* Blue's coordinate grid (manipulatives/cgrid.js) and shape checker (manipulatives/qtree.js), with the World 6
   pictures (ui/visuals6.js): the walked path is drawn thick in gold, each shape check gets a ✓ or ✗ as well as its
   colour, so colour is never the only signal */
.cg { display: flex; justify-content: center; }
.cg-pic { width: min(360px, 84vw); display: flex; justify-content: center; }
.cg-pic svg, .v-coord svg { max-height: 300px; }
.v-quad svg { max-height: 200px; }
.qt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.qt-pic { width: min(240px, 70vw); }
.qt-pic svg { max-height: 180px; width: 100%; }
.qt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: min(240px, 84vw); }
.qt-row { padding: 6px 10px; border-radius: 10px; border: 2px solid var(--bark); background: #fff; font-weight: 600; }
.qt-row b { display: inline-block; width: 1.3em; }
.qt-row.yes { background: #E3F4E6; border-color: #3E8E52; }
.qt-row.no { background: #FBE7E2; border-color: #B5523C; }

/* ===== Grades 1–2: bigger targets for younger hands (at least 60 pt) and bigger question text; body.young is set by ui.js ===== */
body.young .btn, body.young .btn.small, body.young .mc-btn, body.young .m-btn, body.young .kp-key, body.young .seg button, body.young .chip { min-height: 60px; }
body.young .m-btn, body.young .mc-btn { min-width: 60px; }
body.young .icon-btn { width: 60px; height: 60px; }
body.young .mc-btn { font-size: 1.3rem; }
body.young .q-text p { font-size: 1.2em; line-height: 1.45; }
/* Blue's base-ten blocks (Grade 2): the picture keeps its height while it is still empty, so the buttons do not jump */
.b10-pic { min-height: 72px; display: flex; align-items: center; justify-content: center; }
/* Blue's coins (Grade 2): the row of coins and bills keeps its size; counted ones fade with a tick (ui/visuals8.js) */
.coins-pic { min-height: 80px; display: flex; align-items: center; justify-content: center; }
.coins-pic svg { width: 100%; max-width: 640px; height: auto; }
/* Grade 2 World 6 (Shape Garden): Blue's side counter puts a round button on every side or corner of the shape
   (manipulatives/sides.js); the cutter shows its whole beside the question's picture; the graph you build keeps its size */
.sd-pic { position: relative; width: 100%; max-width: 420px; margin: 0 auto; }
.sd-pic svg { display: block; width: 100%; max-width: none !important; height: auto; }
.sd-tap { position: absolute; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--leaf-d, #2F7D3A); background: #fff; color: var(--leaf-d, #2F7D3A); font-weight: 900; font-size: 1.2rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.sd-tap.on { background: var(--sun, #FFC93C); border-color: #B98B12; color: #3a2a00; }
body.young .sd-tap { width: 60px; height: 60px; font-size: 1.4rem; }
.ct-mine svg { width: 220px; height: auto; } .ct-goal svg { width: 130px; height: auto; }
@media (max-height: 820px) { .ct-mine svg { width: 180px; } .ct-goal svg { width: 112px; } }
.gb-pic { display: flex; justify-content: center; } .gb-pic svg { width: 100%; max-width: 480px !important; height: auto; }
.gb-acts { flex-wrap: wrap; }
.v-g2shape svg, .v-g2parts svg { max-width: 300px !important; } .v-g2plot svg, .v-g2bars svg { max-width: 480px !important; }

/* Build 2.24.14: David's painted budgie portraits on the "pick your buddy" cards (new student and Try a lesson) */
.bud-portrait { display: block; width: 100%; max-width: 180px; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #DCEBF7; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); margin-bottom: 6px; }
.choice-card.budgie-card .bud-portrait img, .bud-portrait img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .25s ease; }
.choice-card.on .bud-portrait img { transform: scale(1.05); }
.trial .budgie-card { min-width: 150px; }
@media (max-width: 700px) { .bud-portrait { max-width: 140px; } }
@media (prefers-reduced-motion: reduce) { .bud-portrait img { transition: none; } .choice-card.on .bud-portrait img { transform: none; } }

/* Coco's island film between a lesson and its practice (ui/coco-island.js, kit 23). The whole film shows on every
   screen (contain, never cropped): portrait iPads and phones get the film's own warm sky above and below it. */
.coco-isle { position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; background: linear-gradient(180deg, #f6dfb2 0%, #fbeed2 45%, #f4e2bd 100%); opacity: 1; transition: opacity .45s ease; }
.coco-isle.out { opacity: 0; pointer-events: none; }
.coco-isle .ci-film { width: 100%; height: 100%; object-fit: contain; display: block; background: transparent; }
.coco-isle .ci-line { position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translate(-50%, 8px); margin: 0; max-width: min(92vw, 640px); padding: 12px 22px; border-radius: 22px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 800; text-align: center; box-shadow: 0 6px 24px rgba(31, 59, 42, .18); opacity: 0; transition: opacity .3s ease, transform .3s ease; }
.coco-isle .ci-line b { color: #8a6a3a; margin-right: 4px; }
.coco-isle .ci-line.on { opacity: 1; transform: translate(-50%, 0); }
.coco-isle .btn.btn.btn.ci-skip { position: absolute; top: max(18px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right)); min-height: 60px; min-width: 120px; margin: 0; font-size: 1.15rem; }
@media (prefers-reduced-motion: reduce) { .coco-isle, .coco-isle .ci-line { transition: none; } }
body.reduce-motion .coco-isle, body.reduce-motion .coco-isle .ci-line { transition: none; }
.coco-isle::before { content: ''; position: absolute; inset: -40px; background: url('../img/films/coco-island-poster.webp') center / cover no-repeat; filter: blur(28px) saturate(1.1); opacity: .55; pointer-events: none; }
.coco-isle .ci-film { position: relative; }

/* ======================================================================================================================
   Part 2: the design system (docs/DESIGN-SYSTEM.md); it wins over Part 1
   ====================================================================================================================== */
/* KAIROS MATH ADVENTURES: the simple, playful look (David, 2026-10-30, "full revamp", "consistency").
   One design system for the website (website/public/duo.css) and the game (this file), loaded after app.css:
   - full kit (tokens, shapes, components, rules): docs/DESIGN-SYSTEM.md; visual sheet: docs/design-kit.html
   - ground: soft tint #F4F9FF, soft sky wash for "info" cards; picture scenes (map islands, nest) stay inside their frames
   - type: Nunito (self-hosted, SIL OFL), heavy weights; Korean falls back to the system's rounded Korean font
   - buttons: flat colour with a thick darker ledge that presses down; primary yellow, secondary blue, ghost white
   - cards: white, 2px grey border, 5px bottom ledge, big radius; no navy outlines, no gradients, no glass
   The layout of the start page follows David's Claude Design "Kairos Play Redesign" (title card with the logo and the
   weather greeting, Student and Parents doors, a Parent area button, the Professor's card, a footer row). */
@font-face { font-family: 'Nunito Kairos'; src: url('../fonts/nunito.woff2') format('woff2'); font-weight: 200 1000; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --d-font: 'Nunito Kairos', ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --d-ink: #26405F; --d-text: #3C4A5C; --d-soft: #5B6A7C;
  --d-line: #E5E9EF; --d-line-2: #D3DAE3; --d-wash: #F2F8FF; --d-wash-line: #D5E9FB;
  --d-blue: #1A72CC; --d-blue-2: #1666B8;
  --d-yellow: #FFCF3F; --d-yellow-2: #E0A800; --d-on-yellow: #4A3A00;
  --d-green: #58B51F; --d-green-2: #367A10; --d-green-l: #EEF9E4;
  --d-red: #D93036; --d-red-2: #A8262C;
  --d-ground: #F4F9FF; --d-stage: #F4F9FF; --d-gentle: #FFF4D6; --d-gentle-line: #F0CF62;
  --d-check: #378200; --d-check-2: #285E00; --d-on-check: #FFFFFF;
  /* the companions: a solid accent for borders and names, a pastel fill for their speech bubbles (ink text on top) */
  --d-professor: #F97316; --d-professor-ink: #C2410C; --d-professor-gold: #F59E0B; --d-professor-bg: #FFF7ED;
  --d-sol: #10B981; --d-sol-ink: #047857; --d-sol-sun: #FACC15; --d-sol-bg: #ECFDF5;
  --d-sky: #0EA5E9; --d-sky-ink: #0369A1; --d-blue-bg: #F0F9FF;
  --d-coco: #8B5CF6; --d-coco-ink: #6D28D9; --d-coco-bg: #F5F3FF;
  --font: var(--d-font);
  --navy: #26405F; --navy-ink: #26405F;
}
body { font-family: var(--d-font); color: var(--d-text); background: var(--d-ground); }
body::before { background: var(--d-ground) !important; filter: none !important; }
.h2, .h3, h1, h2, h3 { color: var(--d-ink); font-weight: 900; }
.muted { color: var(--d-soft); }

/* header: white bar, one grey rule, the language tabs as a grey track with the chosen language in blue */
.topbar { background: #FFFFFF !important; border-bottom: 2px solid var(--d-line) !important; box-shadow: none !important; min-height: 72px; }
.topbar .brand-logo { height: 58px; filter: none; }
.brand-home-label { background: #FFFFFF; color: var(--d-blue); border: 2px solid var(--d-line-2) !important; box-shadow: none !important; font-weight: 900; }
.seg, .seg.top-lang { background: #F1F4F8 !important; border: 2px solid var(--d-line) !important; box-shadow: none !important; border-radius: 999px; padding: 3px !important; gap: 2px !important; }
.seg button, .seg.top-lang button { background: transparent !important; box-shadow: none !important; border: 0 !important; color: var(--d-soft) !important; font-weight: 900; transform: none !important; }
.seg button.on, .seg.top-lang button.on { background: var(--d-blue) !important; color: #FFFFFF !important; box-shadow: 0 3px 0 var(--d-blue-2) !important; }
.seg button.on::before, .seg button.on::after, .seg.top-lang button.on::before, .seg.top-lang button.on::after { display: none !important; }
.icon-btn { background: #FFFFFF !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; box-shadow: none !important; color: var(--d-blue) !important; border-radius: 16px !important; }
.icon-btn:active { transform: translateY(2px); border-bottom-width: 2px !important; }

/* buttons */
.btn.btn.btn, .btn.btn.btn:not(.small) { --bt-ink: var(--d-on-yellow); position: relative; min-height: 60px; height: auto; padding-inline: 1.25rem; background-image: none !important; touch-action: manipulation; -webkit-tap-highlight-color: transparent; border: 0 !important; border-radius: 16px; background: #FFFFFF; color: var(--d-blue); box-shadow: inset 0 0 0 2px var(--d-line-2), 0 4px 0 var(--d-line-2) !important; font-family: var(--d-font); font-weight: 900; letter-spacing: .02em; text-shadow: none !important; filter: none; }
.btn.btn.btn::before, .btn.btn.btn::after { display: none !important; }
.btn.btn.btn.leaf, .btn.btn.btn.leaf:not(.small), .btn.btn.btn.big { background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; box-shadow: 0 5px 0 var(--d-yellow-2) !important; }
.btn.btn.btn.wood, .btn.btn.btn.wood:not(.small) { background: var(--d-blue) !important; color: #FFFFFF !important; box-shadow: 0 5px 0 var(--d-blue-2) !important; }
.btn.btn.btn.ghost, .btn.btn.btn.ghost:not(.small) { background: #FFFFFF !important; color: var(--d-blue-2) !important; box-shadow: inset 0 0 0 2px var(--d-line-2), 0 4px 0 var(--d-line-2) !important; }
.btn.btn.btn.danger { background: var(--d-red) !important; color: #FFFFFF !important; box-shadow: 0 5px 0 var(--d-red-2) !important; }
.btn.btn.btn.small { min-height: 48px; border-radius: 14px; margin-bottom: 4px; }
.btn.btn.btn:active:not([disabled]) { transform: translateY(4px) !important; box-shadow: none !important; }
.btn.btn.btn.ghost:active:not([disabled]) { box-shadow: inset 0 0 0 2px var(--d-line-2) !important; }
.btn.btn.btn[disabled] { background: #E9EDF2 !important; color: #8D99A8 !important; box-shadow: 0 4px 0 #D3DAE3 !important; filter: none; }
.btn.btn.btn:focus-visible { outline: 4px solid var(--d-blue); outline-offset: 4px; transform: none; }

/* cards and surfaces */
.card, .sb-card, .chip, .sp-card, .modal { box-shadow: none !important; }
.card { background: #FFFFFF; background-image: none; text-shadow: none; border: 2px solid var(--d-line); border-bottom-width: 5px; border-radius: 24px; }
.chip { background: #FFFFFF !important; border: 2px solid var(--d-line); border-radius: 14px; color: var(--d-ink) !important; font-weight: 900; }
.modal { border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px; }
.modal-back { background: rgba(38, 64, 95, .45); }
.sp-card { background: #FFFFFF !important; border: 2px solid var(--d-line) !important; border-bottom-width: 6px !important; border-radius: 22px !important; }
.sp-card:active { transform: translateY(4px); border-bottom-width: 2px !important; }

/* PIN pads */
.pin-dots span { box-shadow: inset 0 0 0 3px var(--d-line-2) !important; background: #FFFFFF; }
.pin-dots span.on { background: var(--d-blue) !important; box-shadow: none !important; }

/* ==== the start page: a two-column stage (full revamp, 2026-10-30). Characters are never boxed: transparent cutouts
   with a soft ground shadow, standing on a cloud; on a phone they peek over the top edge of the card. ==== */
.start.start-split { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); grid-template-areas: "stage card" "foot foot"; align-items: center; justify-items: stretch; gap: 20px 32px; width: min(1120px, 100%); margin: 0 auto; padding: 20px 24px 12px; min-height: calc(100dvh - var(--top) - 8px); text-align: left; }
.ss-stage { grid-area: stage; position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.ss-stage .hero-logo { flex: none; width: min(340px, 90%); max-width: none; margin: 0; }
.ss-cast { position: relative; width: min(420px, 100%); height: 250px; }
.ss-cast img { position: absolute; bottom: 34px; filter: drop-shadow(0 8px 14px rgba(38, 64, 95, .14)); user-select: none; }
.ss-prof { left: 50%; translate: -50% 0; height: 220px; width: auto; z-index: 2; }
.ss-bird { height: 92px; width: auto; z-index: 3; }
.ss-bird.sol { left: 4%; bottom: 40px; } .ss-bird.blue { right: 6%; bottom: 46px; } .ss-bird.coco { right: 24%; bottom: 26px; height: 78px; z-index: 4; }
.ss-cloud { position: absolute; left: 6%; right: 6%; bottom: 8px; height: 58px; border-radius: 999px; background: radial-gradient(60% 90% at 30% 40%, #FFFFFF 60%, rgba(255, 255, 255, 0) 61%), radial-gradient(55% 100% at 70% 45%, #FFFFFF 60%, rgba(255, 255, 255, 0) 61%), #FFFFFF; box-shadow: 0 10px 0 #DCEBFA, 0 16px 26px rgba(38, 64, 95, .12); z-index: 1; }
.ss-say { position: relative; max-width: 26em; margin: 0; padding: 12px 16px; font-size: 1.08rem; line-height: 1.45; font-weight: 700; text-align: left; }
.ss-say::after { content: ''; position: absolute; left: 50%; top: -11px; width: 18px; height: 18px; translate: -50% 0; rotate: 45deg; background: var(--d-professor-bg); border-left: 3px solid var(--d-professor); border-top: 3px solid var(--d-professor); }
.ss-say .who { display: block; color: var(--d-professor-ink) !important; font-weight: 900; }
.ss-stage .hero-side { flex-direction: row; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.ss-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #FFFFFF; border: 2px solid var(--d-line); border-bottom-width: 4px; color: var(--d-green-2); font-weight: 900; }
.ss-badge svg.ico { width: 18px; height: 18px; color: var(--d-yellow-2); }
.ss-card { grid-area: card; display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 24px; background: #FFFFFF; border: 3px solid var(--d-line); border-bottom-width: 6px; border-radius: 24px; }
.ss-card .start-players { width: 100%; align-items: stretch; gap: 12px; }
.ss-card .sp-head { padding: 0; border: 0; background: none; align-items: flex-start; text-align: left; }
.ss-card .sp-title { font-size: 1.7rem; margin: 0; color: var(--d-ink); }
.sp-list { display: flex; flex-direction: column; gap: 10px; max-height: min(46dvh, 420px); overflow: auto; padding: 2px 2px 6px; }
.sp-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 8px 16px 8px 10px; background: #FFFFFF; border: 2px solid var(--d-line-2); border-bottom-width: 5px; border-radius: 20px; font: inherit; color: var(--d-ink); text-align: left; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sp-row:active { transform: translateY(3px); border-bottom-width: 2px; }
.sp-row:focus-visible { outline: 4px solid var(--d-blue); outline-offset: 3px; }
@media (hover: hover) { .sp-row:hover { border-color: var(--d-blue); } }
.sp-row .sp-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c) 22%, #FFFFFF); display: grid; place-items: center; }
.sp-row .sp-avatar > * { max-width: 100%; max-height: 100%; }
.sp-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.sp-who b { font-size: 1.25rem; font-weight: 900; overflow-wrap: anywhere; }
.sp-grade { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--d-wash); color: var(--d-blue-2); font-weight: 800; font-size: .85rem; }
.sp-streak { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--d-gentle); color: #A35A00; font-weight: 900; }
.sp-streak svg.ico { width: 18px; height: 18px; color: #F08A00; }
.sp-go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--d-yellow); color: var(--d-on-yellow); box-shadow: 0 3px 0 var(--d-yellow-2); }
.sp-go svg.ico { width: 22px; height: 22px; rotate: 180deg; }
.ss-card .btn.sp-new, .ss-card .btn.parent-area { width: 100%; justify-content: center; gap: 10px; font-size: 1.15rem; }
.ss-card .btn.sp-new .pc-plus { font-size: 1.6rem; line-height: 1; }
.ss-card .btn.parent-area svg { width: 22px; height: 22px; }
/* Continue is the main yellow button */
.ss-card .resume-wrap { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ss-card .resume-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 8px 18px 8px 10px; border: 0 !important; border-radius: 20px !important; background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; box-shadow: 0 6px 0 var(--d-yellow-2) !important; font: inherit; text-align: left; }
.ss-card .resume-card:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d-yellow-2) !important; }
.ss-card .resume-card .rc-sleep { display: none; }
.ss-card .resume-card .rc-txt b { font-size: 1.2rem; font-weight: 900; color: var(--d-on-yellow); }
.ss-card .resume-card .rc-txt small { color: var(--d-on-yellow); opacity: .85; font-weight: 700; }
.ss-card .resume-card .rc-go { margin-left: auto; rotate: 180deg; }
.ss-card .resume-wrap .btn.small { align-self: flex-end; min-height: 44px; }
.start-split .credit { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px; padding: 12px 24px; background: none !important; border-top: 2px solid var(--d-line); border-radius: 0; box-shadow: none !important; color: var(--d-soft); font-weight: 700; text-align: center; }
.start-split .credit .credit-brand { color: var(--d-soft); font-weight: 700; }
.start-split .credit .credit-link { margin: 0; padding: 10px 4px; color: var(--d-blue); text-decoration: none; background: none !important; border: 0; box-shadow: none; }
.start-split .credit .credit-link > span[aria-hidden] { display: none; }
.start-split .credit-more { margin: 0; }
.start-split .credit-more summary { color: var(--d-blue); font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.start-split .credit-more[open] { flex-basis: 100%; text-align: center; }
@media (prefers-reduced-motion: no-preference) { body:not(.reduce-motion) .ss-bird.blue { animation: ssHop 3.2s ease-in-out infinite; } body:not(.reduce-motion) .ss-bird.sol { animation: ssHop 3.8s ease-in-out .6s infinite; } }
@keyframes ssHop { 0%, 80%, 100% { translate: 0 0; } 88% { translate: 0 -10px; } }
/* phones and narrow portrait: one column; the cast (about 140px) peeks over the top edge of the card */
@media (max-width: 760px) {
  .start.start-split { grid-template-columns: 1fr; grid-template-areas: "stage" "card" "foot"; gap: 0; padding: 8px 14px 12px; min-height: 0; }
  .ss-stage { gap: 6px; }
  .ss-stage .hero-logo { width: min(210px, 62%); }
  .ss-cast { width: min(300px, 92%); height: 140px; margin-bottom: -24px; z-index: 2; }
  .ss-cast img { bottom: 20px; }
  .ss-prof { height: 128px; } .ss-bird { height: 58px; } .ss-bird.coco { height: 50px; } .ss-bird.sol { bottom: 24px; } .ss-bird.blue { bottom: 28px; }
  .ss-cloud { height: 34px; bottom: 6px; box-shadow: 0 6px 0 #DCEBFA; }
  .ss-say, .ss-stage .hero-side { display: none; }
  .ss-card { padding: 34px 14px 16px; gap: 12px; }
  .ss-card .sp-title { font-size: 1.4rem; }
  .sp-list { max-height: none; }
  .start-split .credit { flex-direction: column; margin-top: 12px; }
}

/* ==== wave A (2026-10-30, David: "one design from landing page to credits"): no forest or clearing behind any screen ==== */
/* David, 2026-10-30: a soft sky ground so the white cards and the Pixar art pop; the entry screens get a sky-to-cloud wash */
html { background: var(--d-ground) !important; }
body, body[data-screen] { background: transparent !important; } /* the ::before layer paints the ground; a body colour would hide it */
body[data-screen]::before { background: var(--d-ground) !important; filter: none !important; }
body[data-screen="start"]::before, body[data-screen="pick"]::before, body[data-screen="newStudent"]::before, body[data-screen="pin"]::before, body[data-screen="profSetup"]::before, body[data-screen="profLogin"]::before { background: linear-gradient(180deg, #CFE8FF 0%, #E6F3FF 34%, #F4F9FF 62%, #FFFFFF 100%) !important; }
button, a, [role="button"], .kp-key, .mc-btn, .cmp-btn, .sp-card, .lm-node { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body[data-screen]::after { display: none !important; }
body[data-screen="lesson"]::before, body[data-screen="practice"]::before, body[data-screen="diag"]::before, body[data-screen="flight"]::before { background: var(--d-stage) !important; }

/* keypads (PIN and answers): white keys with a grey ledge, the number in the brand ink */
.kp-key { background: #FFFFFF !important; color: var(--d-ink) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 5px !important; border-radius: 16px !important; box-shadow: none !important; font-family: var(--d-font); font-weight: 900; text-shadow: none !important; background-image: none !important; }
.kp-key::before, .kp-key::after { display: none !important; }
.kp-key:active { transform: translateY(3px); border-bottom-width: 2px !important; }
.kp-key.kp-back, .kp-key.kp-clear { color: var(--d-soft) !important; background: #F1F4F8 !important; }
.kp-key.kp-ok, .kp-key.kp-go { background: var(--d-check) !important; color: var(--d-on-check) !important; border-color: var(--d-check-2) !important; }
.pin-dots span { width: 22px; height: 22px; }

/* inputs */
.big-input, input[type="text"], input[type="email"], input[type="number"], input:not([type]), select, textarea { background: #FFFFFF; color: var(--d-ink); border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; border-radius: 16px !important; box-shadow: none !important; font-family: var(--d-font); font-weight: 800; }
.big-input:focus, input:focus, select:focus, textarea:focus { outline: none; border-color: var(--d-blue) !important; }

/* page heads, wizard steps */
.page-head { background: #FFFFFF !important; border: 2px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 24px !important; box-shadow: none !important; }
.wiz-dots .st, .wiz-dots span { background: #FFFFFF !important; border: 2px solid var(--d-line-2) !important; box-shadow: none !important; color: var(--d-soft); }
.wiz-dots .st.now, .wiz-dots .st.done, .wiz-dots span.on { background: var(--d-blue) !important; border-color: var(--d-blue) !important; color: #FFFFFF !important; }
.wiz, .wiz-body { background: #FFFFFF !important; box-shadow: none !important; }
.wiz { border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px; }
.s-pin .center-col, .s-profLogin .center-col { background: #FFFFFF; border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px; padding: 24px 28px; }
.pc-big { box-shadow: none !important; border: 4px solid var(--d-line) !important; }
.msg { color: var(--d-red-2); font-weight: 800; }

/* plaques and ivory panels from the forest look become plain white cards */
.sb-card, .plaque, .ivory, .sb-plaque { background: #FFFFFF !important; background-image: none !important; border: 2px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 22px !important; box-shadow: none !important; color: var(--d-text); }
.sb-card::before, .sb-card::after, .plaque::before, .plaque::after { display: none !important; }

/* the old palette's names now point at the new colours, so every older rule speaks the same language (day and dusk alike) */
:root, html[data-theme="dusk"] {
  --leaf: #58B51F; --leaf-d: #367A10; --leaf-l: #EEF9E4;
  --ink: #26405F; --ink-2: #3C4A5C; --muted: #5F6E80;
  --sky: #8CC8F5; --sky-d: #1A72CC; --sky-l: #F2F8FF;
  --sun: #FFCF3F; --sun-d: #E0A800; --sun-l: #FFF4D6;
  --card: #FFFFFF; --line: #E5E9EF; --cream: #FFFFFF; --dapple: #FFF4D6;
  --on-accent: #4A3A00; --danger: #E5484D; --danger-d: #B8343A;
  --sb-paper: #FFFFFF; --sb-card: #FFFFFF; --sb-edge: #E5E9EF; --sb-line: #E5E9EF; --sb-ink: #26405F; --sb-gold: #FFCF3F; --sb-gold-d: #E0A800;
}
html.contrast { --ink: #000; --ink-2: #111; --muted: #2B3A30; --line: #6B7F70; }
html[data-theme="dusk"] .topbar, html[data-theme="dusk"] .dock, html[data-theme="dusk"] .start-compact .hero { background: #FFFFFF !important; }
html[data-theme="dusk"] .seg { background: #F1F4F8 !important; }
html[data-theme="dusk"] body[data-screen]::before { filter: none !important; }

/* every leftover ivory/cream panel becomes white or the soft sky wash */
.s-start .tagline, .s-start .sp-title, .s-start .start-players > .muted, .s-pick .page-head, .s-pin .center-col, .s-profSetup .center-col, .s-profLogin .center-col, .s-newStudent .wiz, .level-done, .spot-actions .btn.spot-btn, .credit-link.site-link, .scratch, .big-input { background: #FFFFFF !important; }
.level-done { border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px; box-shadow: none !important; }
body[data-screen="lesson"] .pr-top, body[data-screen="practice"] .pr-top, body[data-screen="diag"] .pr-top, body[data-screen="flight"] .pr-top { background: #FFFFFF !important; border: 2px solid var(--d-line); box-shadow: none !important; }
body[data-screen="lesson"] .lesson-stage { background: #FFFFFF !important; border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px; box-shadow: none; }
.level-done .seeds-earned, .row-chip, .better-chip, .f-warm { background: var(--d-gentle) !important; color: var(--d-on-yellow); box-shadow: none !important; }
.sp-card.new .pc-plus, .wiz-dots span.on, .wiz-dots span.st.now, .pin-dots span.on { background: var(--d-blue) !important; }
.s-newStudent .choice-card { background: #FFFFFF !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 5px !important; box-shadow: none !important; border-radius: 20px !important; }
.s-newStudent .choice-card.on { background: var(--d-wash) !important; border-color: var(--d-blue) !important; }
.sh-nest, .shop-prev { background: var(--d-wash) !important; }
.nys-dom li.nys-learning { background: var(--d-gentle); }

/* the tutor sheet: white card, a wash header, the companions' own accent on their line */
.tutor-back, .modal-back { background: rgba(38, 64, 95, .64) !important; }
.tutor { background: #FFFFFF !important; border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px !important; box-shadow: 0 18px 40px rgba(38, 64, 95, .18) !important; }
.tu-head { background: var(--d-wash) !important; border-bottom: 2px solid var(--d-wash-line); }
.tu-sol { background: var(--d-sol-bg) !important; border: 3px solid var(--d-sol) !important; color: var(--d-ink) !important; box-shadow: none !important; }
.tu-head .tu-who, .tu-who { color: var(--d-professor-ink); }
.tu-current, .tu-problem { border-color: var(--d-line-2) !important; }

/* choice and compare buttons in questions: big white tiles; a wrong try is soft yellow, never red; right is green with a tick */
.mc-btn, .cmp-btn { background: #FFFFFF !important; color: var(--d-ink) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 5px !important; border-radius: 18px !important; box-shadow: none !important; font-family: var(--d-font); font-weight: 900; }
.mc-btn:active, .cmp-btn:active { transform: translateY(3px); border-bottom-width: 2px !important; }
.mc-btn.picked, .mc-btn.on, .cmp-btn.on { border-color: var(--d-blue) !important; background: var(--d-wash) !important; }
.mc-btn.wrong, .cmp-btn.wrong { background: var(--d-gentle) !important; border-color: var(--d-gentle-line) !important; color: var(--d-on-yellow) !important; }
.mc-btn.right, .mc-btn.correct, .cmp-btn.right, .cmp-btn.correct { background: var(--d-green-l) !important; border-color: var(--d-green) !important; color: #24520A !important; }
.qcard { background: #FFFFFF !important; border: 2px solid var(--d-line) !important; border-bottom-width: 6px !important; border-radius: 28px !important; box-shadow: none !important; }
.qcard.solved { border-color: var(--d-green) !important; box-shadow: none !important; }
.progress { background: #E9EDF2 !important; box-shadow: none !important; border-radius: 999px; }
.progress i { background: var(--d-green) !important; border-radius: 999px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08) !important; }

/* ==== wave B: the map. The islands and the sky stay (the Pixar art); everything you tap or read on top of them
   becomes the same white cards and tactile buttons as the rest of the game ==== */
.lm-stage { border-radius: 28px; border: 2px solid var(--d-line); border-bottom-width: 6px; }
.lm-arrow, .lm-tool { background: #FFFFFF !important; color: var(--d-blue) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none !important; }
.lm-arrow:active, .lm-tool:active { transform: translateY(2px); border-bottom-width: 2px !important; }
.lm-title { background: #FFFFFF !important; color: var(--d-ink) !important; text-shadow: none !important; padding: 6px 14px 8px !important; border: 2px solid var(--d-line) !important; border-bottom-width: 4px !important; border-radius: 18px !important; }
.lm-title small { color: var(--d-blue) !important; }
.lm-title > *:not(small):not(b) { color: var(--d-soft); }
.lm-prog { background: #FFFFFF; color: var(--d-ink); text-shadow: none !important; padding: 6px 12px 8px; border: 2px solid var(--d-line); border-bottom-width: 4px; border-radius: 18px; }
.lm-prog strong span { color: var(--d-soft) !important; }
.lm-prog small { color: var(--d-on-yellow) !important; }
.lm-meter { background: #E9EDF2 !important; height: 8px; }
.lm-meter i { background: var(--d-green) !important; }
.lm-next { background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; border: 0 !important; border-radius: 20px !important; box-shadow: 0 6px 0 var(--d-yellow-2) !important; animation: none; }
.lm-next small { color: var(--d-on-yellow) !important; opacity: .85; }
.lm-next:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d-yellow-2) !important; }
.lm-daily, .lm-daily.lm-boost { background: var(--d-blue) !important; color: #FFFFFF !important; border: 0 !important; border-radius: 20px !important; box-shadow: 0 6px 0 var(--d-blue-2) !important; animation: none !important; }
.lm-daily b, .lm-daily.lm-boost b { color: #FFFFFF !important; }
.lm-daily small { color: #E3F0FD !important; }
.lm-daily:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--d-blue-2) !important; }
.lm-worlds { background: #FFFFFF !important; border: 2px solid var(--d-line) !important; border-bottom-width: 6px !important; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 18px 40px rgba(38, 64, 95, .25) !important; }
.lm-worlds-h { color: var(--d-blue) !important; }
.lm-worlds .wtab { background: #FFFFFF !important; color: var(--d-ink) !important; border: 2px solid var(--d-line) !important; border-bottom-width: 4px !important; box-shadow: none !important; }
.lm-worlds .wtab.on { background: var(--d-wash) !important; border-color: var(--d-blue) !important; }
.lm-worlds .wtab.soon, .lm-worlds .wtab.locked { color: var(--d-soft) !important; background: #F6F8FA !important; }
.lm-worlds .wtab svg.ico { color: var(--d-soft) !important; }
.wtab-n { background: var(--d-green); }
.wtab.locked .wtab-n, .wtab.soon .wtab-n { background: #C3CBD5 !important; }

/* the flight path: a white cloud casing under a dashed trail, gold up to the islands the child can play, slate after */
.lm-routes path { fill: none; stroke-linecap: round; filter: none; animation: none; }
.lm-routes path.case { stroke: #FFFFFF; stroke-width: 16; opacity: .85; stroke-dasharray: none; }
.lm-routes path.trail { stroke-width: 8; stroke-dasharray: 14 14; }
.lm-routes path.trail.reached { stroke: var(--d-yellow); }
.lm-routes path.trail.unreached { stroke: #CBD5E1; }

/* level stops, four states, each with its own colour AND icon (never colour alone):
   done = gold with a tick and stars, next = sky blue with a pulsing ring, the budgie and a Play pill,
   locked = stone grey with a padlock (shakes, never presses), Boss Nest = bigger with the Professor's indigo and gold rim */
.lm-node { --n: clamp(56px, calc(var(--size) * .36), 68px); border: 4px solid #FFFFFF !important; background: var(--d-blue) !important; color: #FFFFFF !important; box-shadow: 0 6px 0 var(--d-blue-2), 0 10px 18px rgba(38, 64, 95, .3) !important; transition: transform .12s ease; }
.lm-node:active:not(.st-locked) { transform: translate(-50%, calc(-50% + 4px)); box-shadow: 0 2px 0 var(--d-blue-2), 0 6px 12px rgba(38, 64, 95, .3) !important; }
.lm-node.st-done { background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; box-shadow: 0 6px 0 var(--d-yellow-2), 0 10px 18px rgba(38, 64, 95, .3) !important; }
.lm-node.st-done:active { box-shadow: 0 2px 0 var(--d-yellow-2), 0 6px 12px rgba(38, 64, 95, .3) !important; }
.lm-node.st-locked { background: #E2E8F0 !important; color: #526175 !important; box-shadow: 0 5px 0 #CBD5E1, 0 10px 18px rgba(38, 64, 95, .22) !important; }
.lm-node.st-locked:hover { scale: 1; }
.lm-node.press { animation: none; }
.lm-isle.boss .lm-node { --n: clamp(64px, calc(var(--size) * .42), 80px); border-color: var(--d-professor-gold) !important; }
.lm-isle.boss .lm-node, .lm-isle.boss.st-open .lm-node { box-shadow: 0 0 0 4px var(--d-professor), 0 7px 0 4px #3730A3, 0 12px 20px rgba(38, 64, 95, .3) !important; }
.lm-isle.boss.st-open .lm-node { background: var(--d-blue) !important; color: #FFFFFF !important; }
.lm-isle.boss.st-done .lm-node { background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; }
.lm-isle.boss.st-locked .lm-node { background: #E2E8F0 !important; color: #526175 !important; box-shadow: 0 0 0 4px #A5B4FC, 0 7px 0 4px #8B93C9, 0 12px 20px rgba(38, 64, 95, .22) !important; border-color: #F8D27A !important; }
.lm-ring { inset: -12px; border: 4px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 3px rgba(30, 127, 224, .45); animation: duoRing 1.8s ease-out infinite; }
@keyframes duoRing { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.28); opacity: 0; } }
.lm-isle.current .lm-node { animation: none; }
.lm-isle.st-locked .lm-land { filter: saturate(.45) brightness(.96) drop-shadow(0 18px 14px rgba(6, 25, 58, .3)); }
.lm-isle.current .lm-land { filter: drop-shadow(0 14px 16px rgba(120, 72, 0, .32)); }
.lm-bird { filter: drop-shadow(0 6px 10px rgba(38, 64, 95, .16)) drop-shadow(0 12px 10px rgba(9, 43, 93, .25)); }

/* the Play pill floats over the next stop */
.lm-start { position: absolute; left: calc(50% - 22px); top: calc(33% - var(--size) * .2 - 46px); z-index: 9; display: inline-flex; align-items: center; gap: 4px; padding: 5px 14px 6px; border-radius: 999px; background: #FFFFFF; color: var(--d-blue); border: 3px solid var(--d-blue); box-shadow: 0 4px 0 var(--d-blue-2); font: 900 .95rem/1 var(--d-font); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; pointer-events: none; animation: duoHop 1.4s ease-in-out infinite; }
.lm-start svg { width: 14px; height: 14px; }
.lm-start::after { content: ""; position: absolute; left: 15px; bottom: -10px; border: 7px solid transparent; border-top-color: var(--d-blue); border-bottom: 0; }
@keyframes duoHop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* the names under the stops: crisp white tags, legible in all four languages */
.lm-label { background: #FFFFFF !important; color: var(--d-ink) !important; border: 2px solid #E2E8F0 !important; border-bottom-width: 4px !important; border-radius: 18px !important; font-weight: 800; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 6px 14px rgba(38, 64, 95, .18) !important; text-shadow: none !important; }
.lm-label small { color: var(--d-blue) !important; }
.lm-label b { color: var(--d-ink) !important; }
.lm-label em { color: var(--d-soft) !important; }
.lm-label em.go { color: var(--d-blue) !important; }
.lm-isle.current .lm-label { border-color: var(--d-blue) !important; }
.lm-isle.st-done .lm-label .lm-stars i.on, .lm-stars i.on { color: var(--d-yellow-2) !important; }
.lm-label .play-tag, .play-tag { background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; box-shadow: 0 3px 0 var(--d-yellow-2) !important; }
.lm-isle.boss .lm-label small { color: var(--d-professor-ink) !important; }

/* motion off: Reduce Motion, the map's own pause button, or the game's setting */
@media (prefers-reduced-motion: reduce) { .lm-ring, .lm-start, .lm-node { animation: none !important; transition: none !important; } }
body.reduce-motion .lm-ring, body.reduce-motion .lm-start, .lm-stage.still .lm-ring, .lm-stage.still .lm-start { animation: none !important; }

/* a phone held upright: the islands climb, so the map scrolls up and down, never sideways */
.lm-stage.tall .lm-view { overflow-x: hidden; overflow-y: auto; overscroll-behavior-x: auto; overscroll-behavior-y: contain; }
.lm-stage.tall.scrolls .lm-view { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }

/* the map's header on a phone: the world's name gets the whole first row, progress and pause share the second */
@media (max-width: 619px) {
  .lm-head { flex-wrap: wrap; gap: 8px; }
  .lm-nav { flex: 1 1 100%; min-width: 0; }
  .lm-nav .lm-title { flex: 1 1 auto; min-width: 0; padding: 4px 12px 6px !important; }
  .lm-title b { -webkit-line-clamp: 1 !important; font-size: 1.15rem !important; }
  .lm-topic { display: none !important; }
  .lm-side { flex: 1 1 100%; justify-content: flex-end; }
  .lm-tools { flex-direction: row; }
  .lm-prog { display: flex !important; align-items: center; gap: 10px; min-width: 0; padding: 4px 12px 6px; }
  .lm-prog strong { font-size: 1.1rem !important; }
  .lm-prog .lm-meter { width: 72px; margin: 0; }
  .lm-prog small { display: inline !important; }
  .lm-side { position: absolute; right: 10px; top: 76px; flex: none; }
  .lm-missions { margin-top: 64px !important; }
}
.lm-hint { background: rgba(255, 255, 255, .92) !important; color: var(--d-ink) !important; }
.lm-bubble { border: 2px solid var(--d-line) !important; border-bottom-width: 4px !important; box-shadow: 0 8px 18px rgba(0, 0, 0, .18) !important; color: var(--d-ink); }
.wx-say { border-radius: 16px; }

/* ==== David's five tweaks (2026-10-30) ==== */
/* Check is green with white words, everywhere a child checks an answer */
.btn.btn.btn.clk-check, .btn.btn.btn.nl-check, .btn.btn.btn.check { background: var(--d-check) !important; color: var(--d-on-check) !important; box-shadow: 0 5px 0 var(--d-check-2) !important; }
.kp-key.kp-ok { background: var(--d-check) !important; color: var(--d-on-check) !important; border-color: var(--d-check-2) !important; }
/* cards and buttons: no old candy textures or glows bleed through */
.card, .btn, .sp-card, .chip, .qcard, .modal { text-shadow: none !important; }
.btn.btn.btn > span { white-space: normal; }
/* companion speech bubbles: 3px accent border, pastel inside, ink words; each companion keeps its own colour */
.bubble { background: #FFFFFF !important; color: var(--d-ink) !important; border: 3px solid var(--d-line-2) !important; border-radius: 20px !important; box-shadow: none !important; }
.bubble::after, .bubble::before { border-top-color: var(--d-line-2) !important; }
.cast-sol .bubble { background: var(--d-sol-bg) !important; border-color: var(--d-sol) !important; }
.cast-blue .bubble { background: var(--d-blue-bg) !important; border-color: var(--d-sky) !important; }
.cast-coco .bubble { background: var(--d-coco-bg) !important; border-color: var(--d-coco) !important; }
.cast-kairos .bubble, .lesson-intro.with-prof .bubble { background: var(--d-professor-bg) !important; border-color: var(--d-professor) !important; }
.bubble .who { color: var(--d-ink); }
.cast-sol .bubble .who { color: #047857; } .cast-blue .bubble .who { color: #0369A1; } .cast-coco .bubble .who { color: #6D28D9; }
.tu-head.k-lead { background: var(--d-professor-bg) !important; border-bottom: 3px solid var(--d-professor) !important; }
.tu-kicker { color: var(--d-professor-ink) !important; }
.wx-say, .lm-bubble { background: var(--d-blue-bg) !important; border: 3px solid var(--d-sky) !important; color: var(--d-ink) !important; }

/* the start doors sit straight on the sky, no box behind them; no hanging-sign posts above the wizard */
.fh-col.fh-student, .fh-col.fh-parent { background: none !important; }
.page-head::before, .page-head::after, .wiz::before, .wiz::after { display: none !important; }
.kf-entry { background: none !important; box-shadow: none !important; }

/* ==== PIN screens (child and Parents): one centred card, the child's picture (or the Professor's badge) perched on its top edge,
   20px dots that fill blue, 64px white keys; a wrong PIN shakes the dots and tints them soft yellow, never red ==== */
.s-pin .center-col, .s-profLogin .center-col, .s-profSetup .center-col { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; gap: 10px !important; width: min(440px, calc(100% - 28px)) !important; max-width: none !important; margin: 64px auto 28px !important; padding: 0 24px 22px !important; background: #FFFFFF !important; border: 3px solid var(--d-line) !important; border-bottom-width: 6px !important; border-radius: 24px !important; box-shadow: none !important; text-align: center; }
.s-pin .center-col > *, .s-profLogin .center-col > *, .s-profSetup .center-col > * { grid-column: auto !important; grid-row: auto !important; }
.s-pin .pc-big { width: 112px !important; height: 112px !important; margin-top: -58px !important; border: 4px solid #FFFFFF !important; box-shadow: 0 0 0 3px var(--d-line), 0 8px 14px rgba(38, 64, 95, .14) !important; background: color-mix(in srgb, var(--c) 22%, #FFFFFF) !important; overflow: hidden; }
.s-pin .pc-big img { width: 100%; height: 100%; object-fit: cover; }
.s-profLogin .center-col > .buddy, .s-profSetup .center-col > .buddy { display: none !important; }
.s-profLogin .center-col::before, .s-profSetup .center-col::before { content: ''; display: block; flex: none; width: 108px; height: 108px; margin-top: -56px; border-radius: 50%; background: var(--d-professor-bg) url('../img/kairos/poses/listen.webp') 50% 30% / 92% auto no-repeat; border: 3px solid var(--d-professor); box-shadow: 0 0 0 4px #FFFFFF, 0 0 0 7px var(--d-professor-gold), 0 8px 14px rgba(38, 64, 95, .14); }
.s-pin .h2, .s-profLogin .h2, .s-profSetup .h2 { margin: 4px 0 0; font-size: 1.8rem; }
.s-pin .muted, .s-profLogin .muted, .s-profSetup .muted { margin: 0; font-size: 1.1rem; }
.s-pin .pin-host, .s-profLogin .pin-host, .s-profSetup .pin-host { width: 100%; max-width: 236px; margin: 6px auto 0; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 4px 0 16px; }
.pin-dots span { width: 20px !important; height: 20px !important; border-radius: 50% !important; transition: background .12s; }
.pin.shake .pin-dots span { background: var(--d-gentle) !important; box-shadow: inset 0 0 0 3px var(--d-gentle-line) !important; }
.pin-grid { grid-template-columns: repeat(3, 64px) !important; justify-content: center; gap: 12px !important; padding: 0 0 6px !important; }
.pin-grid .kp-key { width: 64px; min-height: 64px !important; height: 64px; font-size: 1.7rem; margin: 0 !important; }
.s-pin .msg, .s-profLogin .msg, .s-profSetup .msg, .s-newStudent .msg { min-height: 0; margin: 0; color: var(--d-on-yellow); font-weight: 800; }
.s-pin .msg:not(:empty), .s-profLogin .msg:not(:empty), .s-profSetup .msg:not(:empty), .s-newStudent .msg:not(:empty) { padding: 6px 14px; border-radius: 14px; background: var(--d-gentle); border: 2px solid var(--d-gentle-line); }
.s-pin .center-col > .btn.ghost, .s-profLogin .center-col > .btn.ghost, .s-profSetup .center-col > .btn.ghost { min-width: 160px; }

/* ==== New student: one clean card, 60px+ grade tiles, budgie cards in their own pastel ==== */
.s-newStudent .page-head { gap: 12px; }
.s-newStudent .wiz { border: 3px solid var(--d-line) !important; border-bottom-width: 6px !important; border-radius: 24px !important; }
.s-newStudent .choice-row { gap: 12px; }
.s-newStudent .choice-card { min-height: 96px; color: var(--d-ink) !important; }
.s-newStudent .choice-card .big-num { color: var(--d-blue); font-weight: 900; }
.s-newStudent .choice-card:active { transform: translateY(3px); border-bottom-width: 2px !important; }
.s-newStudent .budgie-card[data-b="sol"] { background: var(--d-sol-bg) !important; border-color: #A7F3D0 !important; }
.s-newStudent .budgie-card[data-b="blue"] { background: var(--d-blue-bg) !important; border-color: #BAE6FD !important; }
.s-newStudent .budgie-card[data-b="coco"] { background: var(--d-coco-bg) !important; border-color: #DDD6FE !important; }
.s-newStudent .budgie-card[data-b="sol"].on { border-color: var(--d-sol) !important; box-shadow: 0 0 0 3px var(--d-sol) !important; }
.s-newStudent .budgie-card[data-b="blue"].on { border-color: var(--d-sky) !important; box-shadow: 0 0 0 3px var(--d-sky) !important; }
.s-newStudent .budgie-card[data-b="coco"].on { border-color: var(--d-coco) !important; box-shadow: 0 0 0 3px var(--d-coco) !important; }
.s-newStudent .wiz .buddy img, .s-newStudent .wiz .buddy .budgie { filter: drop-shadow(0 8px 14px rgba(38, 64, 95, .14)); }
.ss-card .sp-title, .ss-card .start-players > .muted, .ss-card .sp-head .muted { background: none !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important; }
@media (min-width: 761px) {
  .ss-stage .hero-logo { width: min(250px, 70%); }
  .ss-cast { height: 200px; margin-top: -6px; }
  .ss-prof { height: 176px; } .ss-bird { height: 76px; } .ss-bird.coco { height: 64px; }
  .ss-cast img { bottom: 30px; }
}
.s-newStudent .choice-row { display: flex; flex-wrap: wrap; justify-content: center; }
.s-newStudent .choice-row > .choice-card { flex: 1 1 96px; max-width: 150px; min-width: 0; }
.s-newStudent .wiz-body { min-width: 0; }
@media (max-width: 560px) {
  .s-newStudent .step-grade .choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-newStudent .step-grade .choice-row > .choice-card { max-width: none; flex-direction: row; gap: 10px; min-height: 72px; justify-content: center; }
  .s-newStudent .choice-card b { word-break: keep-all; overflow-wrap: normal; }
  .s-newStudent .wiz > .buddy { max-height: 130px; overflow: visible; }
  .s-newStudent .wiz > .buddy kairos-budgie { width: 120px !important; }
}
.ss-card .btn.sp-new .pc-plus { color: inherit !important; background: none !important; }
.ss-stage .start-wx .wx { flex-direction: row; align-items: center; gap: 6px; }
html[lang="ko"] body { word-break: keep-all; overflow-wrap: anywhere; }
.s-newStudent .choice-card.on { padding-right: 30px; }
@media (max-height: 820px) and (min-width: 761px) {
  .s-pin .center-col, .s-profLogin .center-col, .s-profSetup .center-col { margin-top: 56px !important; margin-bottom: 12px !important; gap: 6px !important; }
  .pin-dots { margin-bottom: 10px; }
  .pin-grid { gap: 10px !important; }
}

/* ==== Wave A polish (David, 2026-10-30 21:17) ==== */
/* 1. phones: the header already shows the logo, so the stage keeps only the cast (about 124px) and everything fits one screen */
@media (max-width: 760px) {
  .ss-stage .hero-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
  .ss-cast { height: 124px; margin-top: 2px; margin-bottom: -26px; }
  .ss-prof { height: 112px; } .ss-bird { height: 54px; } .ss-bird.coco { height: 46px; }
  .ss-card { padding: 30px 14px 14px; gap: 10px; }
  .sp-list { gap: 8px; }
  .sp-row { min-height: 64px; padding: 6px 12px 6px 8px; }
  .sp-row .sp-avatar { width: 48px; height: 48px; }
  .ss-card .btn.sp-new, .ss-card .btn.parent-area { min-height: 56px; }
}
/* 3. the Professor's greeting in his own colours; Blue's weather greeting without the old navy outline */
.bubble.cast-kairos, .ss-say { background: var(--d-professor-bg) !important; border: 3px solid var(--d-professor) !important; border-bottom-width: 5px !important; border-radius: 20px !important; }
.start-wx .wx-say, .ss-stage .wx-say { background: var(--d-blue-bg) !important; border: 3px solid var(--d-sky) !important; border-radius: 18px !important; box-shadow: none !important; outline: 0 !important; }
.start-wx .wx-say b { color: var(--d-ink); } .start-wx .wx-say span { color: var(--d-text); }
/* 2. the wizard's budgie sits in a round pastel badge in its own colour, never a square picture box */
.s-newStudent .wiz > .buddy { flex: none; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; background: var(--d-coco-bg); border: 3px solid var(--d-coco); box-shadow: 0 6px 0 #DDD6FE; align-self: center; }
.s-newStudent .wiz > .buddy:has([bird="sol"]) { background: var(--d-sol-bg); border-color: var(--d-sol); box-shadow: 0 6px 0 #A7F3D0; }
.s-newStudent .wiz > .buddy:has([bird="blue"]) { background: var(--d-blue-bg); border-color: var(--d-sky); box-shadow: 0 6px 0 #BAE6FD; }
.s-newStudent .wiz > .buddy kairos-budgie { width: 118px !important; margin-top: 18px; }
.s-newStudent .wiz > .buddy .budgie { background: none !important; }
@media (max-width: 560px) { .s-newStudent .wiz > .buddy { width: 104px; height: 104px; } .s-newStudent .wiz > .buddy kairos-budgie { width: 92px !important; margin-top: 14px; } }
/* 4. the wizard's yellow Next is a full primary button, as wide as the name box */
.s-newStudent .wiz-body > .btn[data-next], .s-newStudent .wiz-body .btn.big.leaf { width: 100%; max-width: 320px; min-width: min(240px, 100%); min-height: 56px; font-size: 1.15rem; align-self: center; }
.s-newStudent .big-input { width: 100%; max-width: 320px; }
/* 5. PIN cards: 400px wide, chunky 68 × 64 keys */
.s-pin .center-col, .s-profLogin .center-col, .s-profSetup .center-col { width: min(400px, calc(100% - 28px)) !important; margin-inline: auto !important; }
.s-pin .pin-host, .s-profLogin .pin-host, .s-profSetup .pin-host, .s-newStudent .pin-host { max-width: 240px; }
.pin-grid { grid-template-columns: repeat(3, 68px) !important; gap: 12px !important; }
.pin-grid .kp-key { width: 68px; height: 64px; min-height: 64px !important; font-size: 1.5rem; }

/* 6. Verse of the Day: Coco's card (pastel lavender, 3px border, 6px ledge), Read it to me in blue, Let's fly in yellow */
.verse-page .verse-card { background: var(--d-coco-bg) !important; border: 3px solid var(--d-coco) !important; border-bottom-width: 6px !important; border-radius: 26px !important; box-shadow: none !important; }
.verse-page .verse-kicker { color: #6D28D9 !important; display: flex; align-items: center; justify-content: center; gap: 8px; }
.verse-page .verse-text { color: var(--d-ink); font-weight: 800; }
.verse-page .verse-ref { color: var(--d-text); font-weight: 800; }
.verse-page .verse-ref span { color: var(--d-soft); }
.verse-page .verse-art { border-radius: 20px; overflow: hidden; aspect-ratio: 9 / 5; background: linear-gradient(180deg, #CFE9FF, #EAF6FF); box-shadow: inset 0 0 0 1px rgba(38, 64, 95, .08); }
/* the painted scene (2.24.7) fills the frame edge to edge, with no gap under it */
.verse-page .verse-art .scene { display: block; width: 100%; height: 100%; }
.verse-page .verse-actions .btn { min-width: 200px; }
/* the pinned forward-button tray: a clean white card with the same ledge, no blur or green shadow */
.verse-actions, .level-done .lc-actions { background: #FFFFFF !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border: 2px solid var(--d-line); border-bottom-width: 5px; box-shadow: 0 10px 24px rgba(38, 64, 95, .14) !important; }
.lesson-nav { background: linear-gradient(180deg, rgba(244, 249, 255, 0), rgba(244, 249, 255, .95) 35%) !important; }
/* the start page always fills the screen, so the footer line sits at the bottom in every language */
@media (min-width: 761px) { .start.start-split { grid-template-rows: 1fr auto; min-height: calc(100dvh - 116px - env(safe-area-inset-top, 0px)); align-content: stretch; } .start-split .credit { align-self: end; } }
/* name step on a phone: while typing, the budgie badge shrinks so the box and Next sit above the keyboard */
@media (max-width: 760px) { .s-newStudent .wiz.step-name:focus-within > .buddy { width: 64px; height: 64px; } .s-newStudent .wiz.step-name:focus-within > .buddy kairos-budgie { width: 58px !important; margin-top: 8px; } }
.s-newStudent .wiz-body > .btn[data-next] { scroll-margin-bottom: 24px; }
/* top bar: tactile Home pill and sound button (3px ledge); muted sound is grey with the crossed speaker */
.brand-home-label { border-bottom-width: 4px !important; }
.brand-home:active .brand-home-label { transform: translateY(2px); border-bottom-width: 2px !important; }
.icon-btn.snd.off { background: #F1F4F8 !important; color: var(--d-soft) !important; border-color: var(--d-line-2) !important; }
/* the streak flame sits beside the grade pill */
.sp-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-meta .sp-streak { padding: 2px 8px; font-size: .85rem; }
.sp-meta .sp-streak svg.ico { width: 15px; height: 15px; }
@media (min-width: 761px) and (max-height: 820px) {
  .start.start-split { padding-top: 12px; padding-bottom: 0; gap: 12px 32px; }
  .ss-card { padding: 18px 22px; gap: 12px; }
  .sp-row { min-height: 66px; padding-block: 6px; }
  .sp-row .sp-avatar { width: 50px; height: 50px; }
  .start-split .credit { padding: 6px 16px; }
  .start-split .credit .credit-link, .start-split .credit-more summary { min-height: 44px; padding-block: 0; display: inline-flex; align-items: center; }
}

/* ==== review fixes (Gemini via David, 2026-10-30) ==== */
/* companion colours work whether the class sits on the bubble itself or on its parent */
.bubble.cast-sol { background: var(--d-sol-bg) !important; border-color: var(--d-sol) !important; }
.bubble.cast-blue { background: var(--d-blue-bg) !important; border-color: var(--d-sky) !important; }
.bubble.cast-coco { background: var(--d-coco-bg) !important; border-color: var(--d-coco) !important; }
/* weather bubble: no old shadow, texture or pointer from app.css, on the start page and the map */
.wx-say, .lm-bubble { box-shadow: none !important; background-image: none !important; }
.wx-say::before, .wx-say::after { display: none !important; }
/* every key press goes down 3px and the ledge shrinks, on touch (.hit, removed when the animation ends) as well as mouse */
.kp-key.hit { animation: duoKeyHit .16s ease-out !important; }
.kp-key.kp-ok.hit { background: var(--d-check) !important; }
@keyframes duoKeyHit { 0% { transform: translateY(3px); border-bottom-width: 2px; } 100% { transform: none; } }
/* after the PIN: the verse and the placement intro sit on the same sky as the sign-in screens */
body[data-screen="verse"]::before, body[data-screen="placementIntro"]::before { background: linear-gradient(180deg, #CFE8FF 0%, #E6F3FF 34%, #F4F9FF 62%, #FFFFFF 100%) !important; }
.verse-page kairos-dialogue.verse-coco { display: block; background: #FFFFFF; border: 3px solid var(--d-coco); border-radius: 20px; padding: 4px; }
.placement-intro.center-col { background: #FFFFFF !important; border: 3px solid var(--d-line) !important; border-bottom-width: 6px !important; border-radius: 28px !important; box-shadow: none !important; padding: 24px !important; width: min(560px, calc(100% - 28px)); margin: 24px auto; }
.placement-intro .lead { color: var(--d-text); }
.placement-intro .btn.big.leaf { min-width: min(240px, 100%); }
/* a budgie's own bubble takes its colour from the bird drawn under it */
.buddy:has(> .budgie.b-coco, > kairos-budgie[bird="coco"], > svg.b-coco) > .bubble { background: var(--d-coco-bg) !important; border-color: var(--d-coco) !important; }
.buddy:has(> .budgie.b-sol, > kairos-budgie[bird="sol"], > svg.b-sol) > .bubble { background: var(--d-sol-bg) !important; border-color: var(--d-sol) !important; }
.buddy:has(> .budgie.b-blue, > kairos-budgie[bird="blue"], > svg.b-blue) > .bubble { background: var(--d-blue-bg) !important; border-color: var(--d-sky) !important; }

/* ==== wave B: the bottom dock, white tactile tabs; the place you are on is lit in the blue wash ==== */
.dock { background: #FFFFFF !important; border-top: 3px solid #E2E8F0 !important; box-shadow: none !important; gap: 8px; padding-top: 8px; }
.dk { background: #FFFFFF !important; color: var(--d-ink) !important; border: 2px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 18px !important; box-shadow: none !important; transform: none !important; min-height: 72px; font-weight: 900; }
.dk .dk-art { width: 40px; height: 40px; filter: none; }
.dk:active { transform: translateY(3px) !important; border-bottom-width: 2px !important; }
.dk.on { background: var(--d-wash) !important; border-color: var(--d-blue) !important; color: var(--d-blue-2) !important; min-height: 72px; }
.dk.on .dk-art { transform: none; }
.dk:focus-visible { outline: 3px solid var(--d-blue); outline-offset: 3px; }
@media (max-width: 560px) { .dock { gap: 4px; padding-top: 6px; } .dk { min-height: 62px; border-radius: 14px !important; } .dk.on { min-height: 62px; } .dk .dk-art { width: 32px; height: 32px; } }

/* a signed-in child on a phone: the sign-out door joins the top bar, so everything tightens a little to keep clear of the logo */
@media (max-width: 430px) {
  .topbar:has(.logout-btn) .top-actions { gap: 6px; }
  .topbar:has(.logout-btn) .seg.top-lang button { min-width: 42px; padding: 4px 4px; }
  .topbar:has(.logout-btn) .logout-btn { padding: 8px 10px !important; min-width: 44px; }
  .topbar:has(.logout-btn) .brand-logo { width: 72px; height: auto; }
  .topbar:has(.logout-btn) .brand { padding-right: 4px; }
}

/* ==== wave C: the problem stage. Generators, answer checking, the tutor ladder and the tools' own drawing are untouched;
   only how the stage looks changes ==== */
/* zone 1: a calm white session bar; the Flight Path becomes a chunky segmented bar, gold for each problem done */
body[data-screen="lesson"] .pr-top, body[data-screen="practice"] .pr-top, body[data-screen="diag"] .pr-top, body[data-screen="flight"] .pr-top { background: #FFFFFF !important; border: 2px solid #E2E8F0; border-bottom-width: 4px; border-radius: 20px !important; box-shadow: none !important; }
.pr-top [data-exit] { min-height: 48px; }
.pr-title { color: var(--d-ink) !important; }
.pr-title small, .run-stage { color: var(--d-soft) !important; }
.pr-top .flight { gap: 4px !important; padding: 18px 2px 6px !important; }
.pr-top .flight::before { display: none; }
/* the Flight Check screen is also class "flight" (div.practice.diag.flight): the Flight Path's dashed line (app.css .flight::before)
   must not cross it, where it showed through the keypad and caught taps on the middle of a row of keys (audit 2026-10-31, F-01) */
.practice.flight::before { display: none; }
/* an open card takes focus as a whole (ui.js openModal) so a keyboard user starts inside it; the card itself needs no ring */
.modal:focus { outline: none; }
.pr-top .flight .f-node, .pr-top .flight .f-node:not(.now), .pr-top .flight.long .f-node { flex: 1 1 0 !important; width: auto !important; min-width: 6px !important; height: 16px !important; aspect-ratio: auto !important; border-radius: 999px !important; background: #E2E8F0 !important; box-shadow: none !important; }
.pr-top .flight .f-node svg.ico { display: none; }
.pr-top .flight .f-node.done { background: var(--d-yellow) !important; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 var(--d-yellow-2) !important; }
.pr-top .flight .f-node.done:not(.k-alone) { background: #FFE18A !important; }
.pr-top .flight .f-node.now { background: var(--d-wash) !important; box-shadow: inset 0 0 0 3px var(--d-blue) !important; overflow: visible; }
.pr-top .flight .f-node.now .f-bird { position: absolute; left: 50%; bottom: 6px; width: 34px !important; transform: translateX(-50%); }
.f-warm { color: var(--d-soft) !important; }

/* zone 2: the question card and the companion bubble beside it */
.qcard .prompt, .qcard .q-text, .qcard .run-prompt { color: var(--d-ink); line-height: 1.5; }
.blocks-host .manip, .tutor-run .manip { background: #FFFFFF; border: 3px solid #D3DAE3; border-bottom-width: 5px; border-radius: 20px; padding: 12px; }
.m-btn, .sh-btn { background: #FFFFFF !important; color: var(--d-blue-2) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; box-shadow: none !important; touch-action: manipulation; }
.m-btn:active:not([aria-disabled="true"]), .sh-btn:active:not([aria-disabled="true"]) { transform: translateY(2px); border-bottom-width: 2px !important; }
.m-msg { color: var(--d-ink); font-weight: 800; }
.buddy-host .bubble { font-size: 1.05rem; line-height: 1.45; }

/* zone 3: answers. A wrong try turns the tile soft yellow and it stays that way; the hint is in the companion's bubble */
.mc-btn, .cmp-btn { min-height: 60px; }
.mc-btn.wrong, .mc-btn.tried, .cmp-btn.wrong, .cmp-btn.tried { animation: duoShake .4s ease; }
@keyframes duoShake { 0%, 100% { translate: 0 0; } 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.kp:has(.kp-val:empty) .kp-ok { background: #E2E8F0 !important; color: #8D99A8 !important; border-color: #CBD5E1 !important; box-shadow: 0 5px 0 #CBD5E1 !important; }
@media (prefers-reduced-motion: reduce) { .mc-btn.wrong, .mc-btn.tried, .cmp-btn.wrong, .cmp-btn.tried, .feedback.good { animation: none !important; } }
body.reduce-motion .mc-btn.wrong, body.reduce-motion .cmp-btn.wrong, body.reduce-motion .feedback.good { animation: none !important; }

/* a right answer: the green bar slides up from the bottom with the praise and a green Next */
.practice .feedback.good { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; text-align: left; border-radius: 0 !important; background: var(--d-sol-bg) !important; border: 0 !important; border-top: 4px solid var(--d-check) !important; box-shadow: 0 -8px 24px rgba(38, 64, 95, .12) !important; padding: 14px max(16px, calc((100vw - 960px) / 2)) calc(14px + env(safe-area-inset-bottom, 0px)); animation: duoUp .28s ease-out; }
@keyframes duoUp { from { transform: translateY(100%); } to { transform: none; } }
.practice .feedback.good .fb-badge { width: 52px; height: 52px; margin: 0; flex: none; background: var(--d-check) !important; color: #FFFFFF !important; box-shadow: 0 4px 0 var(--d-check-2) !important; }
.practice .feedback.good .fb-title { flex: 1 1 auto; margin: 0; color: #2F6B00 !important; font-size: 1.45rem; font-weight: 900; }
.practice .feedback.good .row-chip { margin: 0; }
.practice .feedback.good .btn.btn.btn { margin: 0 0 0 auto; min-width: 200px; min-height: 60px; background: var(--d-check) !important; color: var(--d-on-check) !important; box-shadow: 0 5px 0 var(--d-check-2) !important; }
.practice:has(.feedback.good) { padding-bottom: 120px; }
@media (max-width: 560px) { .practice .feedback.good .btn.btn.btn { flex: 1 1 100%; min-width: 0; } .practice .feedback.good .fb-title { font-size: 1.25rem; } }

/* a phone: the companion's bubble sits right under the question so the hint is in sight, with the answers below */
@media (max-width: 860px), (orientation: portrait) {
  .pr-main { display: flex !important; flex-direction: column; }
  .pr-main > .qcard { order: 0; }
  .pr-main > .buddy-host:has(.cast-sol, .cast-blue, .cast-coco) { order: 1; }
  .pr-main > .acol { order: 2; }
  .pr-main > .buddy-host { order: 3; }
  .pr-main > .buddy-host:has(.cast-sol, .cast-blue, .cast-coco) .perch { display: none; }
}

/* ==== wave D: celebrations, the Dream Nest and Seed Shop, settings, the Parents report card. Saves, seeds, stars,
   backups and the membership are untouched; only the look changes ==== */
/* the end of a level: one white card, the budgies on top, the stars popping in one by one, the results as pills */
.level-done { background: #FFFFFF !important; border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 28px; padding: 22px 20px 24px !important; max-width: 620px; margin: 12px auto; box-shadow: none !important; }
.level-done .h2 { color: var(--d-ink) !important; }
.level-done .big-stars i { color: #E2E8F0; }
.level-done .big-stars i.on { color: var(--d-yellow) !important; filter: drop-shadow(0 4px 0 var(--d-yellow-2)); animation: duoStar .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes duoStar { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .level-done .big-stars i.on { animation: duoFade .6s ease both !important; } }
body.reduce-motion .level-done .big-stars i.on { animation: duoFade .6s ease both !important; }
@keyframes duoFade { from { opacity: 0; } to { opacity: 1; } }
.ld-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.level-done .seeds-earned, .level-done .lead:not(.almost) { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 6px 16px; border-radius: 999px; background: #FFFFFF; color: var(--d-ink) !important; border: 2px solid var(--d-line); border-bottom-width: 4px; font-weight: 900; }
.level-done .seeds-earned svg.ico { color: var(--d-green-2); }
.level-done .ld-streak { background: #FFF4E5 !important; border-color: #F8C98A !important; }
.level-done .ld-streak svg.ico { color: #F97316; }
.level-done .lc-actions .btn.btn.btn.wood { background: var(--d-blue) !important; }

/* the Dream Nest: the room stays the hero; care actions and the numbers become tiles */
.nest-scene { border: 3px solid #FFFFFF; border-radius: 26px; box-shadow: 0 0 0 2px var(--d-line), 0 10px 0 var(--d-line) !important; }
.nest-care { gap: 12px; }
.nest-care .btn.btn.btn { background: #FFFFFF !important; color: var(--d-ink) !important; border: 3px solid var(--d-line-2) !important; border-bottom-width: 5px !important; box-shadow: none !important; }
.nest-care .btn.btn.btn:active { transform: translateY(3px); border-bottom-width: 2px !important; }
.stat-row .stat { background: #FFFFFF !important; border: 3px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 20px !important; box-shadow: none !important; color: var(--d-ink); }
.stat-row .stat b { color: var(--d-ink) !important; }
.stat-row .stat span { color: var(--d-soft) !important; }
.badge-cell { background: #FFFFFF !important; border: 3px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 18px !important; box-shadow: none !important; }

/* the Seed Shop: item tiles with a seed price, a green tick on the ones the child owns */
.shop-top { background: #FFFFFF !important; border: 2px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 22px !important; box-shadow: none !important; }
.shop-card { position: relative; background: #FFFFFF !important; border: 3px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 20px !important; box-shadow: none !important; color: var(--d-ink); }
.shop-card.on { border-color: var(--d-blue) !important; background: var(--d-wash) !important; }
.shop-card.own { border-color: #B9E5A0 !important; }
.shop-prev { background: var(--d-blue-bg) !important; border-radius: 14px; }
.shop-tag { background: var(--d-check-2) !important; color: #FFFFFF !important; border-radius: 999px !important; box-shadow: 0 3px 0 #285E00 !important; }
.shop-card .owned { color: var(--d-check-2) !important; font-weight: 900; }
.shop-card [data-buy][aria-disabled="true"] { background: #F1F5F9 !important; color: #8D99A8 !important; box-shadow: 0 4px 0 #CBD5E1 !important; }
.dtabs .dtab, .dtab { background: #FFFFFF !important; color: var(--d-ink) !important; border: 2px solid var(--d-line) !important; border-bottom-width: 4px !important; border-radius: 999px !important; box-shadow: none !important; font-weight: 900; }
.dtabs .dtab.on, .dtab.on { background: var(--d-wash) !important; border-color: var(--d-blue) !important; color: var(--d-blue-2) !important; }

/* settings: each setting a calm row, switches in the check green */
.modal .set-row, .settings .set-row { border-color: var(--d-line) !important; color: var(--d-ink); }
.modal h2, .modal .h2 { color: var(--d-ink) !important; }
.switch input:checked + i, .toggle.on, .tgl.on, input[type="checkbox"].sw:checked { background: var(--d-check) !important; }
input[type="range"] { accent-color: var(--d-blue); }

/* the Parents area: the Budgie Report Card. A Professor medallion by the title, four big numbers, mastery tracks,
   and the notes split into "shining" (Sol's green) and "a gentle boost" (soft yellow) */
.dash-head h2, .dash .page-head h2 { display: flex; align-items: center; gap: 12px; color: var(--d-ink) !important; }
.dash-head h2::before, .dash .page-head h2::before { content: ""; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--d-professor-bg) url(../img/kairos/poses/listen.webp) center 12% / 120% auto no-repeat; border: 3px solid var(--d-professor); box-shadow: 0 0 0 3px var(--d-professor-gold); }
.dcard { background: #FFFFFF !important; border: 2px solid var(--d-line) !important; border-bottom-width: 5px !important; border-radius: 22px !important; box-shadow: none !important; color: var(--d-ink); }
.dcard h3 { color: var(--d-ink) !important; }
.ocards { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ocard { background: var(--d-wash) !important; border: 2px solid var(--d-wash-line); border-radius: 18px !important; padding: 12px 14px !important; }
.ocard span { color: var(--d-blue-2) !important; text-transform: uppercase; letter-spacing: .04em; }
.ocard b { color: var(--d-ink) !important; font-size: 1.5rem !important; }
.sbar-track, .nys-meter { background: #E2E8F0 !important; border-radius: 999px !important; height: 14px; overflow: hidden; }
.insights { list-style: none; padding: 0; display: grid; gap: 10px; }
.insights li { margin: 0; padding: 12px 14px 12px 44px; position: relative; border-radius: 16px; border: 3px solid #F0CF62; background: var(--d-gentle); color: var(--d-ink); font-weight: 700; }
.insights li::before { content: "💛"; position: absolute; left: 14px; top: 11px; }
.insights li.ins-good { background: var(--d-sol-bg); border-color: var(--d-sol); }
.insights li.ins-good::before { content: "🌟"; }
.dtable th { color: var(--d-soft) !important; }
@media (max-width: 560px) { .ocards { grid-template-columns: 1fr 1fr; } .ocard b { font-size: 1.2rem !important; } }
.level-done .lead:not(.almost) { border-radius: 18px; }
@media (max-width: 430px) { .modal .seg.lang .lf { display: none; } .modal .seg.lang .ls { display: inline !important; } .modal .seg.lang button { white-space: nowrap; } }
.insights { display: flex !important; flex-direction: column; }
.insights li:not(.ins-good) { order: 1; background: var(--d-gentle) !important; border-color: #F0CF62 !important; }
.insights li.ins-good { order: 0; }

/* ==== Polish after the revamp (David, 2026-10-31): the language flag button, the child's bar in the top bar,
   the dimensional map (sculpted medallions, padlocks, a raised golden trail) and the results page's Continue ==== */
/* the language button: the flag of the language in use; it opens a small card with the four flags and names */
.lang-pick { position: relative; flex: none; }
.lp-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 6px 10px 6px 8px; border-radius: 16px; background: #FFFFFF; color: var(--d-ink); border: 2px solid var(--d-line-2); border-bottom-width: 4px; font: 900 .95rem/1 var(--d-font); touch-action: manipulation; cursor: pointer; }
.lp-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.lp-btn[aria-expanded="true"] { border-color: var(--d-blue); background: var(--d-wash); }
.lp-btn[aria-expanded="true"] .lp-caret { rotate: 180deg; }
.lp-caret { width: 16px; height: 16px; color: var(--d-soft); transition: rotate .15s ease; }
svg.flag { width: 34px; height: 23px; flex: none; border-radius: 5px; box-shadow: 0 0 0 1.5px rgba(38, 64, 95, .18); overflow: hidden; }
.lp-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: grid; gap: 6px; min-width: 210px; padding: 8px; background: #FFFFFF; border: 2px solid var(--d-line); border-bottom-width: 6px; border-radius: 20px; box-shadow: 0 18px 40px rgba(38, 64, 95, .22); animation: lpIn .16s ease-out; }
.lp-menu[hidden] { display: none; }
/* 2026-10-31: while the language card is open the top bar rises above a lesson or tutor sheet (.tutor z 51) and modals (60) */
.topbar.lp-open { z-index: 61; }
.lp-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 14px; border: 2px solid transparent; background: #FFFFFF; color: var(--d-ink); font: 800 1.02rem/1.1 var(--d-font); text-align: left; touch-action: manipulation; cursor: pointer; }
.lp-opt:hover, .lp-opt:focus-visible { background: #F6F9FC; }
.lp-opt.on { background: var(--d-wash); border-color: var(--d-blue); color: var(--d-blue-2); }
.lp-opt.on::after { content: "✓"; margin-left: auto; font-weight: 900; color: var(--d-blue); }
@keyframes lpIn { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }

/* the child's bar sits in the top bar on the map, Nest, Shop, garden and results, so the world below gets the room */
.topbar.has-hud { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; }
.top-hud { display: flex; align-items: center; gap: 8px; min-width: 0; justify-self: start; }
.top-hud .who { font-size: 1.05rem; font-weight: 900; color: var(--d-ink); flex: none; }
.top-hud .who b { white-space: nowrap; max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.top-hud .avatar { width: 40px; height: 40px; }
.top-hud .chip { min-height: 44px; padding: 4px 11px; gap: 5px; white-space: nowrap; border-bottom-width: 4px; font-size: .95rem; flex: none; }
.top-hud .chip svg.ico { width: 22px; height: 22px; }
.top-hud .chip.goal { padding: 2px 11px 2px 3px; } .top-hud .chip.goal .ring { width: 34px; height: 34px; }
.top-hud .chip.goal small { font-size: .66rem; color: var(--d-soft); }
.top-hud .chip.levels { gap: 8px; } .top-hud .lv-n { color: var(--d-soft); font-weight: 800; } .top-hud .lv-n b { color: var(--d-ink); font-size: 1.05rem; }
.top-hud .chip.levels .lm-meter { display: block; width: 46px; height: 8px; border-radius: 999px; overflow: hidden; }
.top-hud .chip.levels .lm-meter i { display: block; height: 100%; border-radius: 999px; }
.topbar .top-set, .topbar .snd { width: 48px; height: 48px; }
.top-set { color: var(--d-blue) !important; }
.hud-finish svg.ico { width: 20px; height: 20px; }
.topbar.has-hud .brand-logo { height: 50px; }
/* the map gets the whole screen under the bar */
body[data-screen="map"] .map.lm { padding-top: 10px; }
@media (max-width: 1180px) { .top-hud .who b, .top-hud .chip.goal small { display: none; } .top-hud .chip.goal b i { display: none; } }
@media (max-width: 1023px) { .topbar.has-hud .hud-finish span { display: none; } .topbar.has-hud .hud-finish { padding: 8px 12px !important; min-width: 48px; } .top-hud .chip.levels .lm-meter { display: none; } }
@media (max-width: 860px) { .topbar.has-hud .lp-code { display: none; } .topbar.has-hud .brand-home-label { display: none; } .topbar.has-hud .brand-logo { height: 40px; width: auto; } .top-hud { gap: 5px; } .top-hud .chip { padding: 4px 8px; } }
/* a phone: like Duolingo, the bar is the child's numbers and the buttons; the Map tab below is the way home,
   and the sound switch lives in Settings */
@media (max-width: 680px) {
  .topbar.has-hud { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 10px; column-gap: 6px; }
  .topbar.has-hud .brand { display: none; }
  .topbar.has-hud .snd { display: none; }
  .topbar.has-hud .top-actions { gap: 5px; }
  .top-hud { gap: 4px; }
  .top-hud .avatar { width: 34px; height: 34px; }
  .top-hud .chip { padding: 3px 7px; gap: 3px; font-size: .9rem; min-height: 42px; }
  .top-hud .chip svg.ico { width: 19px; height: 19px; }
  .top-hud .chip.goal { padding: 2px; } .top-hud .chip.goal > span { display: none; }
  .top-hud .chip.streak { display: none; }
  .topbar.has-hud .lp-btn { padding: 6px 6px; gap: 2px; min-height: 44px; } .topbar.has-hud .lp-caret { display: none; }
  .topbar.has-hud svg.flag { width: 30px; height: 20px; }
  .topbar.has-hud .top-set, .topbar.has-hud .hud-finish { width: 44px; height: 44px; min-width: 44px; padding: 0 !important; display: inline-grid; place-items: center; }
}
@media (max-width: 430px) { .top-hud:has(.chip.levels) .chip.stars { display: none; } }
@media (max-width: 350px) { .top-hud .chip.stars { display: none; } }
/* the map's own head on a phone: arrows, the world's name and the pause button share one row now the stars moved up */
@media (max-width: 619px) {
  .lm-head { flex-wrap: nowrap !important; align-items: flex-start; }
  .lm-nav { flex: 1 1 auto !important; }
  .lm-side { position: static !important; flex: none !important; }
  .lm-side .wx, .lm-side .wx-say { display: none; }
  .lm-missions { margin-top: 0 !important; }
}

/* the dimensional level stops: a sculpted medallion (turquoise next, emerald done, amethyst with a crown for every Boss
   Nest), the number or tick as live embossed text, a padlock over a muted medallion when locked */
.lm-node, .lm-node.st-done, .lm-node.st-locked, .lm-isle.boss .lm-node, .lm-isle.boss.st-open .lm-node, .lm-isle.boss.st-done .lm-node, .lm-isle.boss.st-locked .lm-node { background: none !important; border: 0 !important; box-shadow: none !important; color: #FFFBE4 !important; }
.lm-node { --n: clamp(62px, calc(var(--size) * .4), 84px); filter: drop-shadow(0 7px 4px rgba(20, 42, 66, .42)); transition: filter .2s ease, translate .12s ease; }
.lm-isle.boss .lm-node { --n: clamp(72px, calc(var(--size) * .48), 98px); }
.lm-node:active:not(.st-locked), .lm-node.st-done:active { transform: translate(-50%, -50%) !important; translate: 0 3px; filter: drop-shadow(0 3px 2px rgba(20, 42, 66, .42)); box-shadow: none !important; }
@media (hover: hover) { .lm-node:hover:not(.st-locked) { scale: 1.06; filter: drop-shadow(0 10px 7px rgba(20, 42, 66, .45)) brightness(1.06); } }
.lm-face { position: absolute; inset: 0; display: grid; place-items: center; }
.lm-medal { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.lm-num { position: relative; z-index: 1; font: 900 calc(var(--n) * .4)/1 var(--d-font); color: #FFFBE4; letter-spacing: -.02em; text-shadow: 0 2px 0 #B68B46, 0 3px 0 #6C501C, 0 5px 5px rgba(0, 0, 0, .45); }
.lm-num svg.ico { width: calc(var(--n) * .42); height: calc(var(--n) * .42); stroke-width: 3; filter: drop-shadow(0 2px 0 #2E6B3A) drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.lm-isle.boss .lm-num { margin-top: 15%; font-size: calc(var(--n) * .3); }
.lm-isle.boss .lm-num svg.ico { width: calc(var(--n) * .34); height: calc(var(--n) * .34); filter: drop-shadow(0 2px 0 #5B2A86) drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.lm-lock { position: absolute; z-index: 1; width: 60%; height: 60%; left: 20%; top: 17%; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(16, 37, 60, .4)); pointer-events: none; }
.lm-isle.boss .lm-lock { width: 50%; height: 50%; left: 25%; top: 30%; }
.lm-node.st-locked .lm-medal { filter: grayscale(.85) brightness(.9) contrast(.9); }
.lm-isle.st-locked .lm-land { filter: saturate(.7) brightness(.97) drop-shadow(0 18px 14px rgba(6, 25, 58, .3)); }
/* the next stop: a warm halo instead of the blue ring */
.lm-ring { inset: -10px; border: 4px solid rgba(255, 236, 160, .95); box-shadow: 0 0 18px 4px rgba(255, 215, 101, .55); }
.lm-isle.current .lm-node { animation: lmBreathe 3s ease-in-out infinite; }
@keyframes lmBreathe { 50% { filter: drop-shadow(0 5px 12px rgba(255, 215, 101, .85)); } }
.lm-start { border-color: #1A8F87; color: #146E68; box-shadow: 0 4px 0 #0F5F5A; top: calc(33% - var(--n, 70px) / 2 - 44px); }
.lm-start::after { border-top-color: #1A8F87; }
/* the names under the stops: cream parchment tags with a gold edge, dark readable words */
.lm-label { background: linear-gradient(#FFFBED, #F6EBCC) !important; border: 2px solid #C9B07A !important; border-bottom: 5px solid #A88B52 !important; }
.lm-label small { color: #1A7C76 !important; }
.lm-label b { color: #2B2A22 !important; }
.lm-label em { color: #6A6150 !important; }
.lm-label em.go { color: #146E68 !important; }
.lm-isle.current .lm-label { border-color: #E3B13D !important; border-bottom-color: #B98613 !important; }
.lm-isle.boss .lm-label small { color: #6D3BA8 !important; }

/* the raised golden trail, five layers per route; silver (and quieter) where the child hasn't flown yet */
.lm-routes .rt path { fill: none; stroke-linecap: round; stroke-dasharray: none; filter: none; animation: none; }
.lm-routes .r-shadow { stroke: #20313B; stroke-opacity: .28; stroke-width: calc(var(--rw) + 5px); transform: translateY(calc(var(--rd) * 2.2)); }
.lm-routes .r-side { stroke: #82531F; stroke-width: calc(var(--rw) + 1px); transform: translateY(var(--rd)); }
.lm-routes .r-face { stroke: var(--gold); stroke-width: var(--rw); }
.lm-routes .r-shine { stroke: #FFF7CD; stroke-width: 2.5px; transform: translateY(calc(var(--rw) * -.18)); }
.lm-routes .r-dots { stroke: #FFFBE5; stroke-width: calc(var(--rw) * .38); stroke-dasharray: 0.1 calc(var(--rw) * 2.2) !important; }
.lm-routes .rt.unreached { opacity: .62; }
.lm-routes .rt.unreached .r-side { stroke: #687D8B; }
.lm-routes .rt.unreached .r-face { stroke: #C3D0D6; }
.lm-routes .rt.unreached .r-shine { stroke: #EEF3F5; }
.lm-routes .rt.unreached .r-dots { stroke: #F4F7F8; }
/* a run of light flies along every reached route, island to island */
.lm-routes .r-run { stroke: #FFFFFF; stroke-width: calc(var(--rw) * .55); stroke-opacity: .9; stroke-dasharray: 9 91 !important; animation: lmRun 3.2s linear infinite !important; filter: drop-shadow(0 0 4px #FFE58A) !important; }
@keyframes lmRun { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .lm-routes .r-run { display: none; } .lm-isle.current .lm-node { animation: none !important; } }
body.reduce-motion .lm-routes .r-run, .lm-stage.still .lm-routes .r-run { display: none; }
body.reduce-motion .lm-isle.current .lm-node, .lm-stage.still .lm-isle.current .lm-node { animation: none !important; }

/* My results: "Continue my adventure" is the screen's main button (yellow with a ledge), and the floating copy rides
   above the bottom tabs instead of under them */
.btn-adventure { background: var(--d-yellow) !important; color: var(--d-on-yellow) !important; box-shadow: 0 7px 0 var(--d-yellow-2) !important; animation: none !important; border-radius: 26px !important; }
.btn-adventure:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--d-yellow-2) !important; }
.btn-adventure .ba-text { text-shadow: none !important; }
.btn-adventure .ba-text small { color: var(--d-on-yellow); opacity: .85; }
.btn-adventure .ba-arrow { color: var(--d-yellow-2) !important; box-shadow: 0 4px 0 rgba(74, 58, 0, .18) !important; }
.adventure-dock { bottom: calc(var(--dock-h, 100px) + 6px + env(safe-area-inset-bottom, 0px)); z-index: 26; }
.adventure-dock .btn-adventure { box-shadow: 0 7px 0 var(--d-yellow-2), 0 14px 28px rgba(38, 64, 95, .28) !important; }
@media (prefers-reduced-motion: reduce) { .btn-adventure .ba-arrow { animation: none !important; } }
body.reduce-motion .btn-adventure .ba-arrow { animation: none !important; }

/* ==== The UI/UX audit pass (2026-10-31): Parent area first visit, Forgot your PIN?, the starting island, How it works,
   what a child practiced today ==== */
.prof-intro .pi-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 10px; max-width: 520px; text-align: left; }
.prof-intro .pi-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: #FFFFFF; border: 2px solid var(--d-line); border-bottom-width: 4px; border-radius: 16px; color: var(--d-ink); font-weight: 700; line-height: 1.45; }
.prof-intro .pi-list svg { flex: none; width: 24px; height: 24px; color: var(--d-blue); }
.pin-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pin-forgot { color: var(--d-blue-2) !important; }
.pin-forgot svg.ico { width: 22px; height: 22px; }
.placement-intro .pi-ok { margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--d-sol-bg); border: 3px solid var(--d-sol); color: var(--d-ink); font-weight: 700; max-width: 560px; }
.top-help { font: 900 1.35rem/1 var(--d-font) !important; color: var(--d-blue) !important; width: 48px; height: 48px; }
.top-help.fresh { box-shadow: 0 0 0 3px var(--d-yellow), 0 3px 0 var(--d-yellow-2) !important; animation: helpGlow 2s ease-in-out 3; }
@keyframes helpGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 207, 63, .55), 0 3px 0 var(--d-yellow-2); } }
@media (prefers-reduced-motion: reduce) { .top-help.fresh { animation: none; } }
body.reduce-motion .top-help.fresh { animation: none; }
@media (max-width: 680px) { .topbar.has-hud .top-help { width: 44px; height: 44px; } }
@media (max-width: 480px) { .topbar.has-hud .top-help { display: none; } } /* phones: How it works is at the top of Settings */
.set-howto { justify-self: start; margin-bottom: 6px; }
.howto { display: grid; gap: 14px; }
.hw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hw-list li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--d-line); border-bottom-width: 4px; border-radius: 16px; color: var(--d-ink); font-weight: 700; line-height: 1.45; }
.hw-art { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.hw-art img { width: 44px; height: 44px; object-fit: contain; }
.hw-art svg.ico { width: 34px; height: 34px; }
.end-practiced { background: #FFFFFF; border: 2px solid var(--d-line); border-bottom-width: 5px; border-radius: 20px; padding: 12px 18px; color: var(--d-ink); max-width: 520px; width: 100%; }
.end-practiced ul { margin: 6px 0 0; padding-left: 1.2em; font-weight: 700; }
/* "Try a lesson": a guest's practice, never saved (David chose "practice only", 2026-10-31) */
.ss-card .btn.try-lesson { width: 100%; justify-content: center; gap: 10px; font-size: 1.1rem; color: var(--d-blue-2) !important; }
.ss-card .btn.try-lesson svg.ico { width: 22px; height: 22px; }
.trial .choice-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 640px; margin: 0 auto 6px; }
.trial .choice-row:has(.budgie-card) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trial .choice-card { min-width: 0; width: auto; padding: 10px 6px; }
.trial .choice-card .big-num { font-size: 2rem; }
.trial .budgie-card svg, .trial .budgie-card img { max-width: 100%; height: auto; }
@media (max-width: 480px) { .trial .choice-card b { font-size: .85rem; } .trial .budgie-card svg, .trial .budgie-card img { width: 64px; } }
.trial, .trial-end { text-align: center; }
.trial-note { display: flex; gap: 10px; align-items: flex-start; margin: 4px auto 8px; padding: 12px 16px; max-width: 560px; text-align: left; background: var(--d-blue-bg, #F0F9FF); border: 3px solid var(--d-blue); border-radius: 16px; color: var(--d-ink); font-weight: 700; line-height: 1.45; }
.trial-note svg { flex: none; width: 22px; height: 22px; color: var(--d-blue); }
.trial-badge { align-self: center; padding: 6px 12px; border-radius: 999px; background: var(--d-yellow); color: var(--d-ink); font: 800 .9rem/1.2 var(--d-font); white-space: nowrap; }
@media (max-width: 680px) { .trial-badge { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); z-index: 2; font-size: .8rem; padding: 4px 10px; } }

/* Results: a skill only placed out shows one check instead of three leaves (audit 2026-10-31, F-15) */
.leaves i.placed { width: 20px; height: 20px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; }
.leaves i.placed svg { width: 13px; height: 13px; }

/* Design review 2026-10-31 (Build 2.24.2): on iPad landscape (1024–1100px) the language button covered the daily-goal
   ring on the map. "Finish for today" keeps its words; the level meter and the language's short name give way instead
   (the flag still shows the language, and the levels chip keeps its number). */
@media (max-width: 1100px) { .top-hud .chip.levels .lm-meter { display: none; } .topbar.has-hud .lp-code { display: none; } .topbar.has-hud .lp-btn { gap: 4px; } }
/* contrast (WCAG AA 4.5:1): blue words on white use the darker blue (ghost buttons too, line 50); blue fills keep the bright blue */
body .credit-link, body .credit-more summary { color: var(--d-blue-2) !important; }
body .status.st-mastered, body .yes { color: #2F6B10 !important; }
.lm-daily small { color: #FFFFFF !important; }

/* ===== QA playtest 2026-11-03 (Build 2.24.13): fixes for what the Playwright playtest found at 1280×800, 768×1024 and
   390×844 in en/es/ko/pt (report: project files qa-playtest-2026-11-03/QA-REPORT.md) ===== */
/* B1 map labels: a long word ("Multiplication") never cuts mid-word on a small island; three lines before the "…" */
.lm-label { width: max(132px, min(224px, calc(var(--size) * 1.04))) !important; }
.lm-label b { -webkit-line-clamp: 3; overflow-wrap: anywhere; hyphens: auto; }
/* B2 iPad portrait: the child's numbers fit beside the language button (the goal ring keeps its ring, the words go) */
@media (max-width: 860px) {
  .top-hud .chip.goal { padding: 2px; } .top-hud .chip.goal > span { display: none; }
  .top-hud .chip.streak { display: none; }
}
@media (min-width: 681px) and (max-width: 860px) { .topbar.has-hud .brand { min-height: 44px; display: inline-flex; align-items: center; } }
/* B3 Blue's decimal chart (and every tool) stays inside a phone's screen; the chart scrolls inside its own box */
.qcard, .qcard > *, .tu-your-grid > *, .manip { min-width: 0; }
.manip, .dg-chart { max-width: 100%; }
@media (max-width: 420px) { .dg-col { min-width: 44px; } .dg-chart { gap: 3px; } }
/* B4 the tutor sheet's head on a phone: the kicker and the strategy may wrap instead of being cut */
@media (max-width: 560px) {
  .tu-head .icon-btn { width: 44px !important; height: 44px !important; min-width: 44px; }
  .tu-head .tu-kicker, .tu-head.k-lead .tu-kicker { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tu-head h3, .tu-head.k-lead h3 { -webkit-line-clamp: 3; }
}
/* B5 Coco's sheet (twin, Boost offer) wears Coco's colours; orange stays the Professor's alone */
.tu-head:not(.k-lead) { background: var(--d-coco-bg) !important; border-bottom: 3px solid var(--d-coco) !important; }
.tu-head:not(.k-lead) .tu-kicker { color: var(--d-coco-ink) !important; }
/* B6 the coach bubble: the speaker's name in their own ink, the bubble in their own colours */
.kairos-coach .bubble { border: 3px solid var(--sp-line, var(--d-line)) !important; background: var(--sp-bg, #FFFFFF) !important; color: var(--d-ink); }
.kairos-coach .bubble .who { color: var(--sp-ink, var(--d-ink)) !important; }
.kc-sp-kairos { --sp-ink: var(--d-professor-ink); --sp-line: var(--d-professor); --sp-bg: var(--d-professor-bg); }
.kc-sp-sol { --sp-ink: var(--d-sol-ink); --sp-line: var(--d-sol); --sp-bg: var(--d-sol-bg); }
.kc-sp-blue { --sp-ink: var(--d-sky-ink); --sp-line: var(--d-sky); --sp-bg: var(--d-blue-bg); }
.kc-sp-coco { --sp-ink: var(--d-coco-ink); --sp-line: var(--d-coco); --sp-bg: var(--d-coco-bg); }
/* B7 Level complete: on a short screen the film and the birds shrink so the score and the seeds show above the buttons */
@media (max-height: 920px) {
  .level-done .trio { min-height: 84px; }
  .level-done .trio svg, .level-done .trio img, .level-done .trio kairos-budgie { max-height: 84px; width: auto; }
  .kairos-clip.done-film { width: 200px !important; height: 112px !important; }
  .level-done .h2 { margin: 2px 0 6px; }
  .level-done .big-stars { margin: 2px 0; }
}
@media (max-width: 480px) { .level-done .lc-actions { flex-wrap: nowrap; gap: 10px; } .level-done .lc-actions .btn { padding-inline: 16px; font-size: 1.1rem; } }
/* B8 lesson and Flight Check titles: use the row's free room instead of a fixed third */
.pr-top .pr-title { max-width: none; flex: 0 1 auto; min-width: 0; }
.pr-top .flight-wrap { flex: 1 1 120px; min-width: 96px; }
.pr-title small { display: block; overflow: hidden; text-overflow: ellipsis; }
/* B10 a phone keeps two lines for the world's name ("Campina Ensolarada") */
@media (max-width: 619px) { .lm-title b { -webkit-line-clamp: 2 !important; } }
/* B11 My Results: the budgie's wing never covers the greeting */
.results .res-hero > svg, .results .res-hero > .budgie, .results .res-hero > img { flex: none; }
.results .res-hero > div { padding-left: 18px; min-width: 0; }
/* B12 small things: even keypad columns in every language; five result cards on one row, no orphan */
.kp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.results .stat-row { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
@media (max-width: 560px) { .results .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .results .stat-row .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* L1 a right answer fills the "?" box in green, so the whole equation reads true */
.qbox.filled { border-style: solid; border-color: var(--d-green); background: var(--d-green-l); color: var(--d-green-2); animation: duoFade .35s ease both; }
/* L3 iPad portrait (and phones): the problem, the tool and the answers use the whole width instead of shrinking to
   their content on the left half (the column kept the wide screen's align-items: start) */
@media (max-width: 860px), (orientation: portrait) {
  .pr-main { align-items: stretch !important; }
  .pr-main > .buddy-host { align-self: flex-start; max-width: 100%; }
  .pr-main > .acol { width: 100%; max-width: 620px; align-self: center; }
}
/* a save the browser refused (bug hunt 2026-10-31, M3): a grown-up card above everything but the opening film */
#save-warn { position: fixed; z-index: 150; left: 50%; top: calc(var(--top, 72px) + 12px); transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--d-gentle); border: 2px solid var(--d-gentle-line); border-radius: 18px; box-shadow: 0 5px 0 var(--d-gentle-line); color: var(--d-ink); font-weight: 800; }
#save-warn[hidden] { display: none; }
#save-warn p { margin: 0; flex: 1; line-height: 1.35; }
#save-warn .btn { flex: none; min-height: 44px; }

/* ===== Cloud classroom start page (David 2026-11-03, kit 21 "kairos-cloud-classroom"; art in app/public/img/k21/,
   originals in source-art/kits/kit-21-cloud-classroom/). One painted sky behind the whole screen; the headline and the
   Professor's picture on the left; one white card on the right. Two columns from 761px (iPad keeps the desktop look),
   one column on a phone. The picture floats 6px over 7 seconds (transform only), never with Reduce Motion. ===== */
body[data-screen="start"]::before { background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .25) 100%), url('../img/k21/sky-clouds.webp') 50% 100% / cover no-repeat #CFE8FF !important; }
@media (max-width: 760px) { body[data-screen="start"]::before { background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .3)), url('../img/k21/sky-clouds-sm.webp') 50% 100% / cover no-repeat #CFE8FF !important; } }
.start.start-sky { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: "stage card" "foot foot"; grid-template-rows: 1fr auto; align-items: center; gap: 8px clamp(20px, 3.4vw, 48px); width: min(1240px, 100%); margin: 0 auto; padding: clamp(10px, 3vh, 36px) clamp(16px, 2.6vw, 28px) 4px; min-height: calc(100dvh - 116px - env(safe-area-inset-top, 0px)); }
.sk-stage { grid-area: stage; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.sk-title { position: relative; margin: 0 auto 2px; padding: 0 44px; max-width: 15em; text-align: center; color: var(--d-ink); font-family: var(--d-font); font-weight: 900; font-size: clamp(1.9rem, 3.5vw, 3.3rem); line-height: 1.06; letter-spacing: -.015em; text-wrap: balance; }
/* the little yellow sparks either side of the headline (drawn, not a picture) */
.sk-title::before, .sk-title::after { content: ''; position: absolute; top: .1em; width: 30px; height: 34px; background: linear-gradient(var(--d-yellow), var(--d-yellow)) 100% 0 / 70% 5px no-repeat, linear-gradient(var(--d-yellow), var(--d-yellow)) 100% 50% / 100% 5px no-repeat, linear-gradient(var(--d-yellow), var(--d-yellow)) 100% 100% / 70% 5px no-repeat; border-radius: 3px; }
.sk-title::before { left: 0; transform: rotate(-12deg); }
.sk-title::after { right: 0; top: auto; bottom: .05em; transform: scaleX(-1) rotate(-12deg); }
.sk-scene { position: relative; width: min(540px, 100%); margin: 0 auto; }
.sk-hero { display: block; width: 100%; height: auto; max-height: max(260px, calc(100dvh - 360px)); object-fit: contain; margin: 0 auto; filter: drop-shadow(0 18px 16px rgba(38, 64, 95, .14)); user-select: none; -webkit-user-drag: none; }
.sk-say { position: relative; width: fit-content; max-width: min(26em, 92%); margin: -15% auto 0; padding: 12px 22px; background: #FFFFFF; border: 3px solid var(--d-professor); border-bottom-width: 5px; border-radius: 22px; color: var(--d-ink); font-weight: 900; font-size: 1.12rem; line-height: 1.3; text-align: center; box-shadow: 0 8px 18px rgba(38, 64, 95, .12); z-index: 2; }
.sk-say::after { content: ''; position: absolute; right: 30%; top: -12px; width: 18px; height: 18px; rotate: 45deg; background: #FFFFFF; border-left: 3px solid var(--d-professor); border-top: 3px solid var(--d-professor); border-radius: 4px 0 0 0; }
@media (prefers-reduced-motion: no-preference) { body:not(.reduce-motion) .sk-hero { animation: skFloat 7s ease-in-out infinite; } }
@keyframes skFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* the card */
.ss-card.sk-card { grid-area: card; gap: 16px; padding: clamp(22px, 3vw, 36px) clamp(18px, 2.6vw, 34px) 18px; background: #FFFFFF; border: 0; border-radius: 32px; box-shadow: 0 10px 0 rgba(174, 201, 223, .5), 0 24px 60px rgba(38, 64, 95, .16); text-align: center; }
.sk-card .sp-head { align-items: center !important; text-align: center !important; gap: 6px; }
.sk-card .sp-title { font-size: clamp(1.6rem, 2.5vw, 2.2rem) !important; font-weight: 900; letter-spacing: -.01em; line-height: 1.15; text-align: center; }
.sk-card .sk-begin { margin: 0; color: var(--d-soft); font-size: 1.12rem; font-weight: 700; }
.sk-card .sk-backpack { display: block; width: clamp(120px, 13vw, 170px); height: auto; margin: 6px auto 0; padding: 8px; border-radius: 50%; background: radial-gradient(closest-side, var(--d-wash) 0 78%, rgba(242, 248, 255, 0) 100%); }
.sk-card .btn.sp-new.big { min-height: 68px; font-size: 1.4rem; border-radius: 20px; }
.sk-card .btn.try-lesson { min-height: 60px; border-radius: 20px; color: var(--d-blue-2) !important; box-shadow: inset 0 0 0 3px var(--d-blue), 0 4px 0 var(--d-blue-2) !important; font-size: 1.2rem; }
.sk-card .btn.try-lesson svg.ico { width: 20px; height: 20px; }
.sk-parent { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 2px; }
.sk-parent::before, .sk-parent::after { content: ''; height: 2px; border-radius: 2px; background: var(--d-line-2); }
.sk-parent .parent-area { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 4px 12px; margin: 0; background: none; border: 0; border-radius: 12px; color: var(--d-blue-2); font: inherit; font-weight: 800; font-size: 1.12rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer; touch-action: manipulation; }
.sk-parent .parent-area svg { width: 20px; height: 20px; color: var(--d-ink); flex: none; }
.sk-parent .parent-area:hover { color: var(--d-ink); }
.sk-parent .parent-area:focus-visible { outline: 3px solid var(--d-blue); outline-offset: 3px; }
/* the footer sits on the clouds: each piece on a soft white chip so every word keeps its contrast */
.start-sky .sk-foot { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; padding: 6px 0 10px; background: none !important; border: 0; font-size: .98rem; }
.sk-grades, .sk-links { display: inline-flex; align-items: center; gap: 4px 6px; padding: 2px 14px; min-height: 44px; border-radius: 999px; background: rgba(255, 255, 255, .82); color: var(--d-ink); font-weight: 800; }
.sk-links { flex-wrap: wrap; justify-content: center; }
.start-sky .sk-foot .credit-link { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 6px; background: none !important; border: 0; box-shadow: none; color: var(--d-blue-2) !important; font-weight: 800; text-decoration: none; }
.start-sky .sk-foot .credit-link:hover, .start-sky .sk-foot .credit-more summary:hover { text-decoration: underline; }
.start-sky .sk-dot { color: var(--d-soft); }
.start-sky .credit-more { margin: 0; font-size: inherit; }
.start-sky .credit-more summary { min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; color: var(--d-blue-2) !important; font-weight: 800; list-style: none; }
.start-sky .credit-more summary::-webkit-details-marker { display: none; }
.start-sky .credit-more[open] { flex-basis: 100%; padding: 4px 4px 10px; text-align: center; color: var(--d-text); font-weight: 600; font-size: .88rem; }
.start-sky .credit-more p { margin: 4px 0; font-weight: 800; color: var(--d-ink); }
.start-sky .sk-links:has(.credit-more[open]) { border-radius: 22px; max-width: 640px; }
.start-sky .start-wx { flex: none; }
.start-sky .start-wx .wx { flex-direction: row; align-items: center; gap: 6px; }
.start-sky .start-wx .wx-say { padding: 4px 10px; font-size: .85rem; }
/* short landscape screens (iPad landscape with the bar, small laptops): the controls first, the picture gives way */
@media (min-width: 761px) and (max-height: 760px) {
  .start.start-sky { padding-top: 6px; }
  .sk-title { font-size: clamp(1.7rem, 3vw, 2.6rem); }
  .sk-hero { max-height: max(220px, calc(100dvh - 300px)); }
  .ss-card.sk-card { gap: 12px; padding-block: 18px 12px; }
  .sk-card .sk-backpack { width: 104px; margin-top: 0; }
}
/* iPad portrait and narrow windows: still two columns, a little tighter */
@media (min-width: 761px) and (max-width: 1023px) {
  .start.start-sky { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 20px; }
  .sk-title { padding: 0 30px; }
  .sk-title::before, .sk-title::after { width: 22px; height: 26px; }
  .sk-say { font-size: 1rem; padding: 10px 16px; }
  .start-sky .start-wx { display: none; }
}
/* a phone: the headline, a short scene, then the card (the children and New student stay near the top) */
@media (max-width: 760px) {
  .start.start-sky { grid-template-columns: 1fr; grid-template-areas: "stage" "card" "foot"; grid-template-rows: auto; gap: 10px; padding: 8px 14px 4px; min-height: 0; }
  .sk-title { font-size: clamp(1.45rem, 6.6vw, 1.9rem); padding: 0 30px; }
  .sk-title::before, .sk-title::after { width: 20px; height: 24px; }
  .sk-scene { width: min(300px, 78%); }
  .sk-hero { max-height: 230px; }
  .sk-say { font-size: .95rem; padding: 8px 14px; margin-top: -16%; max-width: 100%; }
  .sk-say::after { width: 14px; height: 14px; top: -10px; }
  .ss-card.sk-card { padding: 20px 16px 12px; gap: 12px; border-radius: 26px; }
  .sk-card .sk-backpack { width: 92px; padding: 4px; margin: 0 auto; }
  .sk-card .btn.sp-new.big { min-height: 60px; font-size: 1.25rem; }
  .start-sky .sk-foot { flex-direction: column; justify-content: center; padding-top: 8px; }
  .start-sky .start-wx { display: none; }
}
@media (max-width: 380px) { .sk-title::before, .sk-title::after { display: none; } .sk-title { padding: 0; } }
.start-sky .sk-foot { width: 100%; max-width: none; }
.sk-card .sp-head { width: 100%; }
.sk-card .sp-title { width: 100%; }
.sk-card .sp-list:not(:has(*)) { display: none; }
.start-sky .sk-foot { box-shadow: none !important; border-radius: 0; padding-inline: 0; }
@media (max-width: 760px) and (max-height: 700px) { .sk-hero { max-height: 150px; } .sk-card .sk-backpack { display: none; } .sk-say { margin-top: -12%; } }
/* the same painted sky behind the first screens a child or parent meets after the start page (David 2026-11-03,
   "can you use the cloud background too?"): pick, New student, PIN, Parent login and setup, Try a lesson and its end */
body[data-screen="pick"]::before, body[data-screen="newStudent"]::before, body[data-screen="pin"]::before, body[data-screen="profSetup"]::before, body[data-screen="profLogin"]::before, body[data-screen="trial"]::before, body[data-screen="trialEnd"]::before { background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .25) 100%), url('../img/k21/sky-clouds.webp') 50% 100% / cover no-repeat #CFE8FF !important; }
@media (max-width: 760px) { body[data-screen="pick"]::before, body[data-screen="newStudent"]::before, body[data-screen="pin"]::before, body[data-screen="profSetup"]::before, body[data-screen="profLogin"]::before, body[data-screen="trial"]::before, body[data-screen="trialEnd"]::before { background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .3)), url('../img/k21/sky-clouds-sm.webp') 50% 100% / cover no-repeat #CFE8FF !important; } }
body[data-screen="trial"]::before, body[data-screen="trialEnd"]::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* one seamless page (David 2026-11-03, "integrate the header too, like make it one page seamless"): on the start page the
   big logo sits centered at the top, the top bar turns see-through over the same sky and drops its small logo (the big one
   is right there), keeping the language and sound buttons. The other sky screens keep their small logo on a clear bar. */
body[data-screen="start"] .topbar, body[data-screen="pick"] .topbar, body[data-screen="newStudent"] .topbar, body[data-screen="pin"] .topbar, body[data-screen="profSetup"] .topbar, body[data-screen="profLogin"] .topbar, body[data-screen="trial"] .topbar, body[data-screen="trialEnd"] .topbar { background: transparent !important; border-bottom: 0 !important; backdrop-filter: none; -webkit-backdrop-filter: none; }
body[data-screen="start"] .topbar .brand { visibility: hidden; }
.start.start-sky { grid-template-areas: "logo logo" "stage card" "foot foot"; grid-template-rows: auto 1fr auto; }
.sk-logo { grid-area: logo; justify-self: center; display: flex; justify-content: center; width: clamp(240px, 26vw, 380px); margin: 0 auto -4px; pointer-events: none; }
.sk-logo .kairos-logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(38, 64, 95, .18)); }
@media (min-width: 761px) {
  /* the logo rises into the top bar's row, between nothing on the left and the language/sound buttons on the right */
  .start.start-sky { margin-top: calc(-1 * var(--top, 72px) + 6px); padding-top: 0; min-height: calc(100dvh - 44px - env(safe-area-inset-top, 0px)); }
  .sk-hero { max-height: max(240px, calc(100dvh - 470px)); }
}
@media (min-width: 761px) and (max-height: 820px) { .sk-logo { width: clamp(200px, 20vw, 290px); } .sk-hero { max-height: max(210px, calc(100dvh - 420px)); } }
@media (max-width: 760px) {
  .start.start-sky { grid-template-areas: "logo" "stage" "card" "foot"; grid-template-rows: auto; margin-top: calc(-1 * var(--top, 72px) + 4px); }
  .sk-logo { width: min(200px, 52vw); justify-self: start; margin: 0 0 4px; }
}
@media (max-width: 760px) and (max-height: 700px) { .sk-logo { width: 150px; } }
@media (min-width: 761px) { .sk-logo { width: clamp(210px, 21vw, 320px); } .sk-hero { max-height: max(220px, calc(100dvh - 500px)); } .start-sky .sk-foot { padding-bottom: 6px; } }
@media (min-width: 761px) and (max-height: 820px) { .sk-logo { width: clamp(180px, 17vw, 250px); } .sk-hero { max-height: max(200px, calc(100dvh - 430px)); } }
/* tall screens (iPad portrait): the logo, the scene and the card stay together in the middle instead of the logo at the
   top and a big gap under it; any spare room goes evenly above and below them */
@media (min-width: 761px) { .start.start-sky { grid-template-areas: "top top" "logo logo" "stage card" "bot bot" "foot foot"; grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr) auto; row-gap: 8px; } }
/* Kit 22 (2026-11-03): David's six full-body Professor pictures, still figures with a gentle entrance (Reduce Motion: none) */
.k-figure { display: block; width: auto; max-width: 100%; object-fit: contain; flex: none; filter: drop-shadow(0 8px 8px rgba(20, 40, 60, .18)); animation: kfIn .5s ease both; }
@keyframes kfIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.reduce-motion .k-figure { animation: none; }
@media (prefers-reduced-motion: reduce) { .k-figure { animation: none; } }
.center-col > .k-figure { margin: 0 auto 6px; }
.level-done .trio .ld-prof { align-self: flex-end; }
.badge-earned .be-prof { margin-right: 4px; }
.lesson-intro .lesson-figure { margin: 0 auto; }
.story-scene figcaption { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.story-scene figcaption img.sc-prof { width: auto; height: 72px; object-fit: contain; flex: none; margin-top: -30px; }
@media (max-width: 740px) { .story-scene figcaption img.sc-prof { height: 58px; margin-top: -22px; } }
@media (max-height: 920px) { .level-done .trio .ld-prof { max-height: 110px; } .badge-earned .be-prof { height: 110px !important; } }
/* 14 profile pictures (2026-11-03): every picture card the same size, so the last row never stretches; 7 to a row on wide screens */
.s-newStudent .avatar-row > .av-pick { flex: 0 0 82px; width: 82px; max-width: 82px; min-height: 104px; padding: 8px 4px; }
.s-newStudent .avatar-row > .av-pick .kid-face { width: 66px; height: 66px; }
.s-newStudent .avatar-row { gap: 10px; }
@media (max-width: 700px) { .s-newStudent .avatar-row { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); } .s-newStudent .avatar-row > .av-pick { width: auto; max-width: none; } }
@media (max-width: 360px) { .s-newStudent .avatar-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.s-newStudent .avatar-row > .av-pick small { font-size: .72rem; white-space: nowrap; line-height: 1.1; } .s-newStudent .avatar-row > .av-pick svg { max-width: 60px; max-height: 60px; }

/* Audit 2026-11-03: on the see-through sky screens, a scrolled page gets a frosted sky under the top bar so nothing
   (the avatar grid on phones, long Parent screens) runs under the logo, the language button or the sound button. */
body.scrolled[data-screen="start"] .topbar, body.scrolled[data-screen="pick"] .topbar, body.scrolled[data-screen="newStudent"] .topbar, body.scrolled[data-screen="pin"] .topbar, body.scrolled[data-screen="profSetup"] .topbar, body.scrolled[data-screen="profLogin"] .topbar, body.scrolled[data-screen="trial"] .topbar, body.scrolled[data-screen="trialEnd"] .topbar { background: rgba(214, 236, 255, .86) !important; backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; box-shadow: 0 6px 16px rgba(38, 64, 95, .12) !important; }
body.scrolled[data-screen="start"] .topbar .brand { visibility: visible; }
@media (prefers-reduced-transparency: reduce) { body.scrolled[data-screen] .topbar { background: #D6ECFF !important; } }
/* Audit 2026-11-03: on phones the budgie flying over the last stop of the Flight Path (the Boss Nest's word problem)
   hung 17 px past the row and was cut off; the row keeps room for half a bird at each end. */
@media (max-width: 560px) { .pr-top .flight { padding-left: 16px !important; padding-right: 24px !important; } }
/* Audit 2026-11-03: an iPad keeps :hover on the last thing tapped, so a lifted button, card or dock icon stayed up after
   the tap. On touch screens the hover lift is off; the press (:active) look stays. */
@media (hover: none) {
  .btn.btn:hover:not(:active), .btn.leaf:hover:not(:active), .btn.wood:hover:not(:active), .top-lang button:hover:not(:active), .topbar .icon-btn:hover:not(:active), .s-newStudent .choice-card:hover:not(:active), .avatar-row .av-pick:hover:not(:active) { transform: none; filter: none; }
  .brand-home:hover .brand-logo, .dk:hover .dk-art { transform: none; }
}

/* ==== UI/UX review 2026-11-04 (Build 2.24.21): fixes found by playing whole levels at 375, 390, 820, 1180 and 1440 px ==== */
/* 1. Phones: the question card kept a 240 px minimum, so a one-line question pushed the hint, the answers and Check
   below the fold. The card is now as tall as its question (a picture still makes it grow). */
@media (max-width: 560px), (max-height: 700px) {
  .pr-main > .qcard, .tutor-run .pr-main > .qcard { min-height: clamp(104px, 16vh, 240px); padding: 16px 18px; gap: 10px; }
  .pr-main { gap: 12px !important; }
}
/* 2. Phones: the level header took three rows (Map / title / pencil + Flight Path). The Map button keeps its name for
   screen readers but shows only the house, so the title and the pencil share the first row. */
@media (max-width: 560px) {
  .pr-top [data-exit] { min-width: 48px; padding: 0 !important; justify-content: center; flex: none; }
  .pr-top [data-exit] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .pr-top { flex-wrap: wrap; row-gap: 6px; }
  .pr-top .pr-title { flex: 1 1 0; min-width: 0; font-size: .98rem; line-height: 1.25; }
  .pr-top .flight-wrap { order: 5; flex: 1 1 100%; }
}
/* 3. Small phones in Spanish and Portuguese: "✓ Revisar" / "✓ Conferir" ran out of the Check key. Under 420 px the key
   shows the word alone (the green key and its place stay the same). */
.kp-key.kp-ok { min-width: 0; }
@media (max-width: 420px) {
  .kp-key.kp-ok:not(.wide) svg.ico { display: none; }
  .kp-key.kp-ok span { font-size: clamp(.9rem, 4.2vw, 1.1rem); overflow-wrap: anywhere; line-height: 1.1; }
}
/* 4. In a lesson or a level the brightest thing on screen was the blue Log out in the corner. It is now a quiet
   white button there (same place, same action); "Finish for today" on the map keeps its blue. */
body[data-screen="lesson"] .topbar .btn.logout-btn.logout-btn, body[data-screen="practice"] .topbar .btn.logout-btn.logout-btn, body[data-screen="flight"] .topbar .btn.logout-btn.logout-btn, body[data-screen="diag"] .topbar .btn.logout-btn.logout-btn {
  background: #FFFFFF !important; color: var(--d-blue-2) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; box-shadow: none !important;
}
/* 5. The lesson sheet scrolls to the step being taught, and the problem itself (7 + 1 = ?) slid away under the
   Professor's header. On screens with room the problem stays pinned at the top of the sheet. */
@media (min-height: 700px) {
  .tutor .tu-body { scroll-padding-top: 120px; }
  .tutor .tu-body > .tu-problem { position: sticky; top: 0; z-index: 3; background: #FFFFFF; box-shadow: inset 0 0 0 3px var(--d-line-2), 0 8px 12px -10px rgba(38, 64, 95, .35); }
}
/* 6. The Speed Garden's mode cards were pink with a glossy pink disc; a white "×" on a pink-red circle reads as
   "wrong" or "close". They are now design-kit tiles: white, a ledge, the sign on a flat blue disc. */
.g-mode { background: #FFFFFF !important; border: 3px solid var(--d-line) !important; border-bottom-width: 6px !important; box-shadow: none !important; color: var(--d-ink); touch-action: manipulation; }
.g-mode:active { transform: translateY(4px); border-bottom-width: 2px !important; box-shadow: none !important; }
.g-mode .g-op { background: var(--d-blue) !important; color: #FFFFFF; box-shadow: 0 5px 0 var(--d-blue-2) !important; }
.g-mode small { color: var(--d-soft) !important; }
/* 7. A guided lesson step showed two buttons at once: Check on the keypad and a grey "Next step" under it, so a child
   could tap the grey one and nothing happened. "Next step" now appears only once the step is solved. */
.tutor .tu-actions:has([data-tnext][disabled]) { display: none; }

/* ===== Version 2026.1: the 2026-11-10 audit (project files website-audit-2026-11-10) ===== */
/* #1 Lessons: when it is the child's turn, the step's question and the Check key stay on screen.
   The disabled "Next step" bar is hidden while the child answers (it comes back once the step is solved),
   the "You do this step!" line is one short row, and on wide screens the keypad sits beside the step. */
.tutor.asking .tu-actions { display: none; }
.tutor .tu-current .tu-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tutor .tu-current.asking .tu-ask { padding: 10px 12px; }
.tutor .tu-current.asking .tu-yourstep { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 8px; }
.tutor .tu-current.asking .tu-yourstep .ys-art { width: 40px !important; height: 40px !important; }
.tutor .tu-current.asking .tu-ask .msg:empty { display: none; }
.tutor .tu-ask .kp-display { height: 60px; font-size: 2.1rem; margin-bottom: 8px; }
.tutor .tu-ask .kp-grid { gap: 8px; }
@media (min-width: 900px) and (orientation: landscape) {
  .tutor .tu-current.asking { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; gap: 16px; }
  .tutor .tu-current.asking > .tu-ask { grid-column: 2; grid-row: 1 / span 3; }
}
@media (max-height: 760px) {
  .tutor .tu-ask .kp-key { min-height: 50px; font-size: 1.6rem; }
  body.young .tutor .tu-ask .kp-key { min-height: 60px; }
  .tutor .tu-ask .kp-display { height: 50px; font-size: 1.8rem; }
  .tutor .tu-problem .q-expr { font-size: 1.8rem; }
}
/* #2 The place value chart fits a phone: the columns share the width instead of spilling past the edge. */
.pvwrap { max-width: 100%; overflow-x: auto; }
.pvchart td.blank { background: #F4F8FC; box-shadow: inset 0 0 0 3px var(--d-line-2); }
@media (max-width: 460px) {
  .pvchart { width: 100%; table-layout: fixed; border-spacing: 3px; }
  .pvchart th { font-size: .66rem; padding: 4px 2px; max-width: none; overflow-wrap: anywhere; hyphens: auto; }
  .pvchart td { min-width: 0; height: 54px; font-size: 1.75rem; }
}
/* #1 (phones) the lesson keypad uses four columns, three rows: 7 8 9 ⌫ / 4 5 6 0 / 1 2 3 Check */
@media (max-width: 460px), (max-height: 760px) {
  .tutor .tu-ask .kp:not(:has(.kp-dot)) .kp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tutor .tu-ask .kp:not(:has(.kp-dot)) .kp-back { grid-column: 4; grid-row: 1; }
  .tutor .tu-ask .kp:not(:has(.kp-dot)) .kp-key[data-k="0"] { grid-column: 4; grid-row: 2; }
  .tutor .tu-ask .kp:not(:has(.kp-dot)) .kp-ok { grid-column: 4; grid-row: 3; }
  .tutor .tu-ask .kp:not(:has(.kp-dot)) .kp-ok span { font-size: .8rem; }
  .tutor .tu-ask .kp { max-width: 380px; }
}
@media (max-height: 700px) { .tutor .pvchart td { height: 46px; font-size: 1.5rem; } .tutor .tu-current { padding: 12px 14px; gap: 8px; } }
/* #1 / #9 phones: every number pad without a decimal key is 4 columns × 3 rows (7 8 9 ⌫ / 4 5 6 0 / 1 2 3 Check),
   so the pad is a row shorter and stops covering the problem or Blue's tool. */
@media (max-width: 460px) {
  .kp:not(:has(.kp-dot)):not(.pin) .kp-grid:not(.pin-grid) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-back { grid-column: 4; grid-row: 1; }
  .kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-key[data-k="0"] { grid-column: 4; grid-row: 2; }
  .kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-ok { grid-column: 4; grid-row: 3; }
  .kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-ok span { font-size: .8rem; }
  /* #9: once the pad is open it sits under Blue's tool instead of on top of it */
  .tutor-run.has-blocks.pad-open .pr-main > .acol { position: static; box-shadow: none; margin: 0; padding: 8px 0 0; background: transparent; }
}
/* #3 the child's last try, softly crossed out beside the clue */
.last-try { margin: 0 0 6px; text-align: center; font-weight: 800; color: var(--d-ink-2, #4A6075); font-size: 1.05rem; }
.last-try s { text-decoration-thickness: 3px; text-decoration-color: rgba(185, 139, 18, .8); color: var(--d-ink, #26405F); font-size: 1.3rem; margin-left: 4px; }
/* #5 one quiet Help button; Check stays the strongest button on screen */
.pr-tools .help-btn { min-height: 48px; }
/* #10 iPad landscape and desktop: the clue sits right under the problem, as large as the question's words */
@media (orientation: landscape) and (min-width: 861px) {
  .pr-main > .buddy-host:has(.cast-sol, .cast-blue, .cast-coco) { width: 100%; }
  .pr-main > .buddy-host:has(.cast-sol, .cast-blue, .cast-coco) .bubble { font-size: 1.3rem; line-height: 1.45; max-width: none; flex: 1; }
  .pr-main > .buddy-host .cast { width: 100%; }
}
/* #8 Log out is a quiet white button on every screen except the map (the Level complete screen showed it solid blue),
   and on Level complete "Next level" is the one main button: Map is the plain white one beside it. */
body:is([data-screen="levelDone"], [data-screen="missionDone"], [data-screen="nest"], [data-screen="shop"], [data-screen="garden"], [data-screen="results"], [data-screen="sessionEnd"]) .topbar .btn.logout-btn.logout-btn {
  background: #FFFFFF !important; color: var(--d-blue-2) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; box-shadow: none !important;
}
body[data-screen="levelDone"] .btn.wood[data-map] { background: #FFFFFF !important; color: var(--d-blue-2) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 5px !important; box-shadow: none !important; }
body[data-screen="levelDone"] [data-next-level] { flex: 1.4; }
/* #12 phones: the level name wraps onto a second line instead of ending in "…" */
@media (max-width: 600px) {
  .pr-top .pr-title { white-space: normal; text-overflow: clip; overflow: visible; font-size: .92rem; line-height: 1.2; }
  .pr-top .pr-title small { white-space: nowrap; }
}
/* #4 the fraction pad: two boxes, top and bottom, with the fraction bar between them */
.kp-fracpad .kf-display { height: auto; flex-direction: column; gap: 4px; padding: 8px 0; box-shadow: none; background: transparent; }
.kp-fracpad .kf-box { width: 128px; height: 56px; border-radius: 14px; background: #FFFFFF; border: 3px solid var(--d-line-2); font: inherit; font-size: 2rem; font-weight: 900; color: var(--d-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.kp-fracpad .kf-box.on { border-color: var(--d-blue, #1B6FD8); box-shadow: 0 0 0 4px rgba(27, 111, 216, .18); }
.kp-fracpad .kf-box:not(.on) .kp-caret { display: none; }
.kp-fracpad .kf-bar { display: block; width: 150px; height: 5px; border-radius: 3px; background: var(--d-ink); }
.kp-fracpad:not(.ready) .kp-ok { background: #E2E8F0 !important; color: #8D99A8 !important; border-color: #CBD5E1 !important; box-shadow: 0 5px 0 #CBD5E1 !important; }
/* #7 the map's one main button: with a Daily Flight due, the Daily Flight is yellow and first, "Play next" white */
.lm-missions.daily-first .lm-daily.lm-daily:not(.lm-boost) { background: var(--d-yellow) !important; box-shadow: 0 6px 0 var(--d-yellow-2) !important; }
.lm-missions.daily-first .lm-daily:not(.lm-boost) b, .lm-missions.daily-first .lm-daily:not(.lm-boost) small { color: var(--d-on-yellow) !important; }
.lm-missions.daily-first .lm-next { background: #FFFFFF !important; color: var(--d-blue-2) !important; box-shadow: 0 5px 0 var(--d-line-2) !important; border: 2px solid var(--d-line-2) !important; }
.lm-missions.daily-first .lm-next small { color: var(--d-soft) !important; }
.lm-missions.daily-first .lm-next b { font-size: .95rem; }
.lm-bubble { cursor: pointer; }
/* #18 "Why does this work?": the lessons' big ideas as three plain choices in the green bar, never scored */
.feedback.good:has(.why-box) { flex-wrap: wrap; }
.why-box { flex-basis: 100%; order: 5; background: #FFFFFF; border-radius: 18px; padding: 12px; margin: 4px 0 8px; box-shadow: inset 0 0 0 2px var(--d-line-2); }
.why-q { margin: 0 0 8px; font-weight: 900; color: var(--d-ink); font-size: 1.05rem; }
.why-choices { display: grid; gap: 8px; }
.why-btn { text-align: left; font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.35; color: var(--d-ink); background: #F7FAFD; border: 2px solid var(--d-line-2); border-bottom-width: 4px; border-radius: 14px; padding: 10px 12px; min-height: 48px; cursor: pointer; }
.why-btn:active { transform: translateY(2px); }
.why-box.done .why-idea { margin: 0; font-weight: 700; color: var(--d-ink); }
.feedback.good:has(.why-box) [data-next] { order: 6; }

/* ===================== UI review 2026.3 (2026-11-10; report: Claude Doc "Kairos game UI review, 10 Nov 2026") ===================== */
/* #6 one number pad everywhere (phone, iPad, desktop, lessons): 7 8 9 ⌫ / 4 5 6 0 / 1 2 3 Check, so a child who plays on an
   iPad at home and a phone in the car finds 0 and Check in the same place. Decimal pads and the PIN pad keep their own. */
.kp:not(:has(.kp-dot)):not(.pin) .kp-grid:not(.pin-grid) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-back { grid-column: 4; grid-row: 1; }
.kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-key[data-k="0"] { grid-column: 4; grid-row: 2; }
.kp:not(:has(.kp-dot)) .kp-grid:not(.pin-grid) .kp-ok { grid-column: 4; grid-row: 3; }
/* #4 Check: a tick above the word, never split inside a word ("Confe/rir"), and a readable grey while it waits for an answer
   (#526175 on #E2E8F0 = 5.1:1, the locked-stop grey; was #8D99A8 = 2.35:1) */
.kp-key.kp-ok { flex-direction: column !important; gap: 2px !important; padding-inline: 2px !important; }
.kp-key.kp-ok svg.ico { width: 22px; height: 22px; display: block !important; }
.kp-key.kp-ok span { white-space: nowrap !important; overflow-wrap: normal !important; word-break: keep-all !important; hyphens: none !important; font-size: clamp(.72rem, 3.1vw, .95rem) !important; line-height: 1.1; letter-spacing: -.01em; }
.kp:has(.kp-val:empty) .kp-ok, .kp-fracpad:not(.ready) .kp-ok { color: #526175 !important; }
/* #1 / #2 phones: the answer box and the number pad sit at the bottom of the screen, so Check is always in reach and the
   problem stays in sight after a wrong try (before: Check was 200–650 px below the fold on an iPhone SE and tapping it
   scrolled the problem away). runner.js fitPad() keeps room for the pad under the clue (--ans-h). */
@media (max-width: 559px) and (orientation: portrait) {
  body[data-screen="practice"] .topbar, body[data-screen="lesson"] .topbar { min-height: 56px !important; padding-top: calc(4px + env(safe-area-inset-top, 0px)) !important; padding-bottom: 4px !important; }
  body[data-screen="practice"] .topbar .brand-logo, body[data-screen="lesson"] .topbar .brand-logo { height: 40px !important; width: auto !important; }
  .tutor-run:not(.has-blocks) .acol > .answer-host:not(.hidden):has(.kp) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; background: #FFFFFF; border-top: 2px solid var(--d-line); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 18px rgba(38, 64, 95, .10); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp { max-width: 440px; margin: 0 auto; }
  .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-display { height: 52px; margin-bottom: 8px; }
  .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-grid { gap: 7px; }
  .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-key { min-height: 52px; }
  body.young .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-key { min-height: 60px; }
  .tutor-run:not(.has-blocks) { padding-bottom: calc(var(--ans-h, 0px) + 12px); }
  .tutor-run:not(.has-blocks) .feedback.good { z-index: 40; }
}
@media (max-width: 559px) and (orientation: portrait) and (max-height: 700px) {
  .tutor-run .qcard { padding: 10px 14px !important; gap: 6px !important; min-height: 0 !important; }
  .tutor-run .pr-top { padding-block: 6px !important; }
}
@media (max-width: 559px) and (orientation: portrait) {
  /* the speaking budgie's clue sits right above the pad: problem at the top, clue and answer together at the bottom */
  .tutor-run:not(.has-blocks):is(:has(.acol > .answer-host:not(.hidden) .kp), :has(.acol > .spot-actions)) .pr-main > .buddy-host:has(.cast .bubble) { position: fixed; left: 8px; right: 8px; bottom: calc(var(--ans-h, 0px) + 6px); z-index: 29; max-height: 32vh; overflow: auto; margin: 0; }
  .tutor-run:not(.has-blocks):has(.acol > .answer-host:not(.hidden) .kp) .pr-main > .buddy-host .cast .bubble { margin: 0; box-shadow: 0 4px 14px rgba(38, 64, 95, .12); padding: 10px 14px; font-size: 1.02rem; line-height: 1.4; }
  .tutor-run:not(.has-blocks):has(.acol > .answer-host:not(.hidden) .kp) .pr-main > .buddy-host .cast .bubble::after { display: none; }
  .tutor-run:not(.has-blocks) { padding-bottom: calc(var(--ans-h, 0px) + var(--clue-h, 0px) + 12px); }
}
@media (max-width: 559px) and (orientation: portrait) and (max-height: 760px) {
  body:not(.young) .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-key { min-height: 48px; font-size: 1.45rem; }
  .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-display { height: 48px; }
  /* "Solve." and its speaker share one line */
  .tutor-run .qcard .q-text { flex-direction: row; align-items: center; justify-content: center; gap: 8px; }
}
@media (max-width: 559px) and (orientation: portrait) and (max-height: 760px) {
  /* a slimmer level header on short phones: the level's name on one line, the feathers closer */
  body[data-screen="practice"] .pr-top { gap: 4px 8px !important; padding: 6px 10px !important; margin-bottom: 8px !important; }
  body[data-screen="practice"] .pr-top .pr-title { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; font-size: .86rem !important; line-height: 1.2; }
  body[data-screen="practice"] .pr-top .pr-title small { display: block; }
  body[data-screen="practice"] .pr-top .btn.ghost.small, body[data-screen="practice"] .pr-top .scratch-btn { min-height: 44px; min-width: 44px; padding: 0 10px; }
  body[data-screen="practice"] .pr-top .flight-wrap { margin-top: 0 !important; }
  .tutor-run .qcard .q-text .read { width: 44px; height: 44px; min-height: 44px; }
  .tutor-run:not(.has-blocks):has(.acol > .answer-host:not(.hidden) .kp) .pr-main > .buddy-host:has(.cast .bubble) { max-height: 24vh; }
  .tutor-run:not(.has-blocks):has(.acol > .answer-host:not(.hidden) .kp) .pr-main > .buddy-host .cast .bubble { font-size: .98rem; padding: 8px 12px; }
}
/* #2 "Check Blue's work" on phones: the two answers wait at the bottom of the screen, in reach */
@media (max-width: 559px) and (orientation: portrait) {
  .tutor-run .acol > .spot-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #FFFFFF; border-top: 2px solid var(--d-line); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 18px rgba(38, 64, 95, .10); padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 559px) and (orientation: portrait) and (max-height: 760px) {
  body[data-screen="practice"] .pr-top .flight { padding-top: 12px !important; padding-bottom: 2px !important; }
  body[data-screen="practice"] .topbar { min-height: 52px !important; height: auto !important; padding-top: calc(3px + env(safe-area-inset-top, 0px)) !important; padding-bottom: 3px !important; }
  body[data-screen="practice"] .topbar .icon-btn, body[data-screen="practice"] .topbar .lp-btn { min-height: 44px; height: 44px; }
  .tutor-run .qcard .q-text { margin: 0 !important; }
}
/* #7 "Check Blue's work": two plain answer tiles in Blue's colours (they are answers, not the screen's main button), a tick
   and Blue's magnifying glass; never a red ✗ next to a child's choice */
.spot-actions .btn.btn.btn.spot-btn { background: #FFFFFF !important; color: var(--d-ink) !important; border: 3px solid var(--d-line-2) !important; border-bottom-width: 6px !important; box-shadow: none !important; border-radius: 18px !important; min-height: 72px; }
.spot-actions .btn.btn.btn.spot-btn:active { transform: translateY(3px); border-bottom-width: 3px !important; }
.spot-actions .btn.spot-btn svg.ico { color: var(--d-sky-ink, #0369A1) !important; }
.spot-actions .spot-yes svg.ico { color: var(--d-green-2, #367A10) !important; }
@media (hover: hover) { .spot-actions .btn.btn.btn.spot-btn:hover { border-color: var(--d-sky, #0EA5E9) !important; background: var(--d-blue-bg, #F0F9FF) !important; } }
/* #5 Blue's jumping line: big jump buttons a 7-year-old can read, forward and back told apart by an arrow and a colour */
.jline-acts { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)) !important; gap: 8px !important; }
.jline-acts:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.jline-acts:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.jline-acts .m-btn { min-height: 60px !important; font-size: 1.3rem !important; font-weight: 900 !important; flex-direction: row !important; gap: 6px !important; color: var(--d-ink) !important; }
.jline-acts .m-btn[data-v^="-"] { background: #F2F5F9 !important; }
.jline-acts .m-btn:not([data-v^="-"]) { background: var(--d-green-l, #EEF9E4) !important; border-color: #BFE3A3 !important; }
.jline-acts .m-btn { white-space: nowrap !important; padding-inline: 6px !important; }
.jline-acts .jl-arr { font-size: 1.05rem; opacity: .75; }
.jline-pic svg { min-height: 120px; }
/* the "Type the answer" strip under a tool on a phone is one button until it is opened, so it never covers the tool */
@media (max-width: 739px) and (orientation: portrait) {
  .tutor-run.has-blocks:not(.pad-open) .acol .kp-display { display: none; }
  .tutor-run.has-blocks:not(.pad-open) .pr-main > .acol { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .tutor-run.has-blocks:not(.pad-open) .pad-toggle { margin-bottom: 0 !important; }
}
/* #9 the child's top bar is the same on every screen: "Finish for today" is one quiet white button (it is never the main
   action), the stars stay (the map's levels chip steps aside on a phone instead), and on iPad the sound switch lives in
   Settings, as on phones, so the bar is not a row of nine buttons */
.topbar .btn.btn.btn.hud-finish { background: #FFFFFF !important; color: var(--d-blue-2) !important; border: 2px solid var(--d-line-2) !important; border-bottom-width: 4px !important; box-shadow: none !important; }
.topbar .btn.btn.btn.hud-finish svg.ico { color: var(--d-blue-2) !important; }
@media (max-width: 430px) { .top-hud:has(.chip.levels) .chip.stars { display: inline-flex !important; } .top-hud .chip.levels { display: none !important; } }
@media (max-width: 350px) { .top-hud .chip.stars { display: none !important; } }
@media (max-width: 1199px) { .topbar.has-hud .snd { display: none !important; } }
/* #10 Level complete: the confetti falls behind the white card (never over "Level complete!"), "Next level" stays on one line
   on phones (the calculator picture steps aside), and the seed pill clears the card's sticky buttons */
body[data-screen="levelDone"] .confetti { z-index: 1; }
body[data-screen="levelDone"] .level-done { position: relative; z-index: 2; }
@media (max-width: 559px) {
  body[data-screen="levelDone"] [data-next-level] .btn-art { display: none; }
  body[data-screen="levelDone"] .lc-actions .btn { white-space: nowrap; padding-inline: 14px !important; }
  body[data-screen="levelDone"] .lc-actions [data-next-level] span { white-space: nowrap; }
}
body[data-screen="levelDone"] .ld-pills { margin-bottom: 14px; }
/* #12 Nest and Shop: the title alone in the header (the dock takes the child between them); prices are quiet white buttons
   with a seed (blue when the child has enough seeds, grey when not), so the screen has no row of yellow "main" buttons;
   the shelf tabs show they scroll */
.shop-page .page-head, .nest-page .page-head { display: flex !important; justify-content: center !important; text-align: center; position: relative; }
.shop-page .page-head .h2, .nest-page .page-head .h2 { margin-inline: auto; }
.shop-page .page-head .sb-balance { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.shop-card .btn.price.can { color: var(--d-blue-2) !important; }
.shop-card .btn.price.cant { color: #526175 !important; background: #F2F5F9 !important; }
.shop-card .btn.price svg.ico { color: #8A5A12; }
@media (max-width: 739px) {
  .shop-page .dtabs { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent 100%); padding-right: 30px; }
}
/* #11 My Results: "Continue my adventure" right under the title, the Professor's note as a compact card */
.page.results .res-highlight.theater { max-width: 680px; margin-inline: auto; }
/* #13 the lesson sheet on a phone: full width (no grey margins), the Professor's line on one line and the lesson's name
   on at most two, so the step gets the room (Portuguese "Centenas, dezenas, unidades" used three) */
@media (max-width: 559px) {
  .tutor { width: 100vw !important; left: 0 !important; transform: none !important; bottom: 0 !important; border-radius: 24px 24px 0 0 !important; border-bottom-width: 0 !important; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .tu-head .tu-kicker, .tu-head.k-lead .tu-kicker { display: block !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
  .tu-head h3, .tu-head.k-lead h3 { -webkit-line-clamp: 2 !important; font-size: 1.05rem !important; line-height: 1.2 !important; }
  .tu-head { padding-block: 8px !important; }
  .tu-body { scroll-padding-top: 12px; }
}
/* #16 desktop and iPad: the lesson sheet is as tall as its lesson (no big empty band above "Next step") */
@media (min-width: 900px) and (min-height: 700px) {
  .tutor { bottom: auto !important; max-height: calc(100dvh - var(--top) - 28px); }
  .tutor .tu-body { flex: 0 1 auto; }
}
/* #14 one name label for every speaker: small, uppercase, in the speaker's ink (the design system's bubble recipe) */
.bubble .who, .tu-sol .who, .kc-talk .who, .ss-say .who { display: block; text-transform: uppercase; font-size: .78rem !important; font-weight: 900 !important; letter-spacing: .06em; line-height: 1.3; margin-bottom: 2px; }
.tu-sol .who, .cast-sol .who { color: var(--d-sol-ink, #047857) !important; }
/* #15 the Professor's films sit in a framed window in his own orange (like his medallion in the Parent area), not a bare
   beige photo box */
.kc-frame .kairos-clip.kc-film { border-radius: 22px !important; border: 3px solid var(--d-professor, #F97316); background: var(--d-professor-bg, #FFF7ED); box-shadow: 0 4px 0 #FCD9B6 !important; }
/* #17 dock labels at 13 px at least (were 11.8), two short lines when a language needs them, never split inside a word */
nav.dock .dk-label { font-size: max(13px, .82rem) !important; line-height: 1.1 !important; white-space: normal; overflow-wrap: normal; word-break: keep-all; hyphens: none; text-align: center; }
/* #20 one language picker: Settings and the Parent area show the same flags and names as the top bar's language card */
.seg.lang:not(.top-lang) { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; border-radius: 18px !important; padding: 6px !important; }
.seg.lang:not(.top-lang) > button { display: flex !important; align-items: center; gap: 8px; justify-content: flex-start; min-height: 48px; border-radius: 12px !important; padding: 6px 10px !important; }
.seg.lang:not(.top-lang) > button .flag { width: 28px; height: 19px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.seg.lang:not(.top-lang) > button .lf { display: inline !important; white-space: nowrap; }
.seg.lang:not(.top-lang) > button .ls { display: none !important; }
.settings .set-row:has(.seg.lang) { flex-wrap: wrap; gap: 8px; }
.settings .set-row:has(.seg.lang) .seg.lang { flex: 1 1 100%; }
/* #22 "How Kairos works" not opened yet: a small yellow "new" dot on the ? button, not a ring that looks like keyboard focus */
.top-help.fresh { box-shadow: none !important; animation: none !important; position: relative; }
.top-help.fresh::after { content: ""; position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--d-yellow); box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3px var(--d-yellow-2); display: block !important; }
/* #21 the level's stage line ("Práctica con las herramientas de Blue") wraps on a phone instead of ending in "…" */
@media (max-width: 600px) { .pr-top .pr-title small, body[data-screen="practice"] .pr-top .pr-title small { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; } }
@media (max-width: 559px) {
  .page.results .btn-adventure.top .ba-bird { display: none; }
  .page.results .btn-adventure.top { padding: 14px 16px !important; gap: 10px; }
  .page.results .btn-adventure.top .ba-text b { font-size: 1.2rem; line-height: 1.2; }
  .shop-page .page-head .sb-balance { position: static; transform: none; margin-left: 8px; }
}
/* #17 follow-up: long Portuguese and Spanish dock names ("Ninho das Medalhas") get the full button width and up to three short lines instead of an ellipsis */
@media (max-width: 559px) {
  nav.dock .dk { padding-left: 0 !important; padding-right: 0 !important; }
  nav.dock .dk-label { -webkit-line-clamp: 3 !important; letter-spacing: -.01em; padding-inline: 1px; }
}
@media (max-width: 400px) { nav.dock .dk-label { margin-inline: -4px; max-width: calc(100% + 8px) !important; letter-spacing: -.02em; } }

/* Flight Check, easier to begin (2026-11-11): the big button sits right under the title with Read to me beside it, and on
   phones the picture shrinks so the button is in sight without scrolling */
.placement-intro .pi-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin: 4px 0 2px; }
.placement-intro .pi-actions .btn { min-height: 52px; }
@media (max-width: 600px), (max-height: 700px) {
  .placement-intro.center-col { padding: 16px !important; margin: 12px auto; gap: 10px; }
  .placement-intro .trio { flex-wrap: nowrap; align-items: flex-end; }
  .placement-intro .trio img, .placement-intro .trio svg { max-height: 110px; width: auto; }
  .placement-intro .h2 { font-size: 1.4rem; margin: 0; }
  .placement-intro .lead { margin: 0; font-size: 1rem; }
  .placement-intro .pi-ok { font-size: .92rem; padding: 10px 12px; }
}
.fc-card .fc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 4px; }
.fc-card h3 small, .fc-row small { display: block; font-weight: 700; }
.fc-row .btn { min-height: 44px; }
/* Version 2026.9 (David's iPad, 2026-11-11): the child's top bar ends in a clear Log out button, a door and the word, never a
   lone moon that reads as a dark-mode switch. The word shows on iPad and desktop; on a phone the door alone stays (the
   bar has no room), with its spoken label. High contrast lives in Settings. */
@media (min-width: 681px) {
  .topbar.has-hud .hud-finish span { display: inline !important; }
  .topbar.has-hud .btn.hud-finish { width: auto; min-width: 0; padding: 6px 14px !important; gap: 6px; white-space: nowrap; }
}
/* the start page: "Change or delete a profile" under the children, a quiet link like "Parent area" (it asks the parent PIN) */
.sp-edit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; min-height: 48px; padding: 4px 12px; margin: 2px auto 0; background: none; border: 0; border-radius: 12px; color: var(--d-blue-2); font: inherit; font-weight: 800; font-size: 1rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer; touch-action: manipulation; }
.sp-edit svg { flex: none; color: var(--d-ink); }
.sp-edit:focus-visible { outline: 4px solid #D9480F; outline-offset: 3px; }

/* ==== Audit 2026-11-12: phones (fixed number pad) ====
   The Help button sits in the bottom stack, above Sol's clue and the pad, instead of under them; the page keeps room for it
   (--tools-h, set by runner.js fitPad), and fitPad scrolls the question into sight above the stack. */
@media (max-width: 559px) and (orientation: portrait) {
  .tutor-run.pad-fixed:not(.has-blocks) .acol > .pr-tools { position: fixed; right: 10px; bottom: calc(var(--ans-h, 0px) + var(--clue-h, 0px) + 6px); z-index: 31; margin: 0; }
  .tutor-run.pad-fixed:not(.has-blocks) .acol > .pr-tools .help-btn { box-shadow: 0 4px 12px rgba(38, 64, 95, .16); background: #FFFFFF; }
  .tutor-run.pad-fixed:not(.has-blocks) { padding-bottom: calc(var(--ans-h, 0px) + var(--clue-h, 0px) + var(--tools-h, 0px) + 12px); }
}

/* Version 2026.12 (David, 2026-11-16): a way out of the Flight Check. The intro's "Skip for now" sits under the reassurance,
   quieter than Start; in the check, Map (leave, no placement) sits before "Done for now" (place with what is known) */
.placement-intro .pi-skip { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; padding-top: 12px; border-top: 2px dashed var(--d-line); width: 100%; }
.placement-intro .pi-skip .btn { min-height: 48px; }
.placement-intro .pi-skip p { margin: 0; text-align: center; }
.practice.flight .pr-top [data-leave] { flex: 0 0 auto; }
@media (max-width: 559px) {
  .practice.flight .pr-top [data-leave] span, .practice.flight .pr-top [data-stop] span { font-size: .85rem; }
}

/* ==== Version 2026.13 (David's iPad, 2026-11-16: "art is not perfectly center … I want problems and windows to be in the
   center"). Everything a child looks at sits on the screen's middle line:
   1. the lesson's opening: the Professor's words and film are the middle column; the child's budgie stands beside them
      in its own side column instead of pushing them 43 px to the left */
.lesson-intro > .trio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr); align-items: end; column-gap: 12px; width: 100%; }
.lesson-intro > .trio > .buddy { grid-column: 2; }
.lesson-intro > .trio > .budgie { grid-column: 3; justify-self: start; }
/*  2. a question's line and its speaker: the words sit on the middle line, the speaker beside them (a long word problem
      still uses the whole width: the empty side column shrinks to nothing) */
.qcard .q-text:has(> .read) { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(56px, 1fr); gap: 8px; align-items: center; }
.qcard .q-text:has(> .read) > p { grid-column: 2; min-width: 0; }
.qcard .q-text:has(> .read) > .read { grid-column: 3; justify-self: start; }
/*  3. iPad portrait: the budgie's clue sits in the middle under the question, not against the left edge */
@media (max-width: 860px), (orientation: portrait) {
  .pr-main > .buddy-host { align-self: center; }
}
/*     the Professor (a Boss Nest, a story) in portrait: his film and words are the middle column, his speaker beside them
       (on a narrow phone the empty left column shrinks to nothing) */
@media (max-width: 860px), (orientation: portrait) {
  .pr-main > .buddy-host:has(> .kairos-coach) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(max-content, 1fr); column-gap: 8px; align-items: start; align-self: stretch; width: 100%; }
  .pr-main > .buddy-host:has(> .kairos-coach) > .kairos-coach { grid-column: 2; min-width: 0; }
  .pr-main > .buddy-host:has(> .kairos-coach) > .read { grid-column: 3; justify-self: start; margin: 0; }
}
/*  4. iPad and desktop: the question, the answers and the clue sit in the middle of the room under the top bar, not
      stuck to the top with an empty half screen below */
@media (min-width: 560px) and (min-height: 700px) {
  .practice.tutor-run > .pr-main { justify-content: safe center; align-content: safe center; }
}
/*  5. the help sheet (Coco's steps, the Professor's example, Blue's tool) is as tall as its lesson on an iPad in portrait
      too, and the window sits in the middle of the screen like every pop-up */
@media (min-width: 560px) and (min-height: 700px) {
  body:not(.scratch-open) .tutor { top: calc(50% + var(--top) / 2) !important; bottom: auto !important; max-height: calc(100dvh - var(--top) - 28px); transform: translate(-50%, -50%); animation-name: slideupMid; }
  body:not(.scratch-open) .tutor .tu-body { flex: 0 1 auto; }
}
@keyframes slideupMid { from { transform: translate(-50%, calc(-50% + 22px)); } to { transform: translate(-50%, -50%); } }

/* Whole-app review 2026-11-20 (D1/D2): the start page's quiet backup note for grown-ups, inside the white card */
/* "Are you a grown-up?" on the start page (2026-11-28) */
.sk-grown { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--d-blue-bg); color: var(--d-ink); font-size: 16px; line-height: 1.4; text-align: left; }
.sk-grown p { margin: 0 0 8px; }
.sk-grown.on p { margin: 0; font-size: 15px; }
.sk-grown .lc-actions { justify-content: flex-start; margin: 0; }
.sk-grown .btn { min-width: 88px; }
.mem-form { width: min(420px, 100%); display: grid; gap: 12px; justify-items: start; margin-top: 8px; }
.mem-form label { display: grid; gap: 6px; width: 100%; text-align: left; font-weight: 700; }
.mem-form input { width: 100%; min-height: 48px; padding: 10px 14px; font-size: 18px; }
.mem-form .mem-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* the code field and "Use another email" wait hidden (the display rules above would show them anyway; 2026-11-30) */
.mem-form [hidden] { display: none !important; }
.grown-up .mem-form { justify-items: center; margin-top: 0; }
.grown-up .mem-form .mem-actions { justify-content: center; }
.grown-done { max-width: 440px; }
.sk-backup { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--d-blue-bg); color: var(--d-ink); font-size: 15px; line-height: 1.4; text-align: left; }
.sk-backup p { margin: 0 0 8px; }
.sk-backup .lc-actions { justify-content: flex-start; margin: 0; }

/* ---------- Version 2026.20, improvements 2026-11-22 #8: the lesson's worked example fits a landscape iPad ----------
   On a wide, short screen the example's picture (the ten frame, the number line…) sat under the sticky Back / Next bar.
   The page now puts the Professor, the problem and the steps on the left and the picture on the right, so everything
   shows without scrolling. Narrow or tall screens keep the one-column page. */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 900px) {
  .lesson-ex:has(> .mt-host) { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "prof vis" "card vis" "steps vis"; align-items: center; column-gap: 28px; row-gap: 12px; }
  .lesson-ex:has(> .mt-host) > .lesson-kairos, .lesson-ex:has(> .mt-host) > .tu-kicker { grid-area: prof; }
  .lesson-ex:has(> .mt-host) > .qcard { grid-area: card; justify-self: center; }
  .lesson-ex:has(> .mt-host) > .tu-steps { grid-area: steps; margin: 0; font-size: 1.15rem; }
  .lesson-ex:has(> .mt-host) > .mt-host { grid-area: vis; align-self: center; justify-self: center; max-width: 100%; }
  .lesson-stage { padding: 16px 22px; }
}

/* ---------- Version 2026.20, improvements 2026-11-22 #9: the Professor's line joins the bottom stack on a phone ----------
   In a Boss Nest the Professor speaks through .kairos-coach, which the clue rule above (.cast .bubble) did not catch, so
   his words stayed in the page and the fixed Help button floated over them. Now his line sits right above the pad like
   Sol's clue (his big picture is left out there), and fitPad lifts the Help button above it. */
@media (max-width: 559px) and (orientation: portrait) {
  .tutor-run:not(.has-blocks):is(:has(.acol > .answer-host:not(.hidden) .kp), :has(.acol > .spot-actions)) .pr-main > .buddy-host:has(.kairos-coach .bubble) { position: fixed; left: 8px; right: 8px; bottom: calc(var(--ans-h, 0px) + 6px); z-index: 29; max-height: 32vh; overflow: auto; margin: 0; display: flex; align-items: center; gap: 6px; }
  .tutor-run:not(.has-blocks) .pr-main > .buddy-host:has(.kairos-coach .bubble) .kc-frame { display: none; }
  .tutor-run:not(.has-blocks) .pr-main > .buddy-host:has(.kairos-coach .bubble) .kairos-coach { flex: 1; }
  .tutor-run:not(.has-blocks) .pr-main > .buddy-host:has(.kairos-coach .bubble) .bubble { margin: 0; box-shadow: 0 4px 14px rgba(38, 64, 95, .12); padding: 10px 14px; font-size: 1.02rem; line-height: 1.4; }
  .tutor-run:not(.has-blocks) .pr-main > .buddy-host:has(.kairos-coach .bubble) .bubble::after { display: none; }
}
@media (max-width: 559px) and (orientation: portrait) {
  /* the Help button beside the clue (right) instead of on top of the stack, so the stack stays low and covers nothing:
     a narrow button (the bulb over the word) and no separate speaker (tapping the words reads them again) */
  .tutor-run.pad-fixed.clue-fixed:not(.has-blocks) .acol > .pr-tools { bottom: calc(var(--ans-h, 0px) + 6px); right: 8px; }
  .tutor-run.pad-fixed.clue-fixed:not(.has-blocks) .acol > .pr-tools .help-btn { flex-direction: column; gap: 2px; width: 64px; min-width: 0; min-height: 64px; padding: 6px 4px !important; font-size: .9rem; }
  .tutor-run.pad-fixed.clue-fixed:not(.has-blocks) .pr-main > .buddy-host { right: 78px !important; width: auto !important; max-width: none !important; }
  .tutor-run.pad-fixed.clue-fixed:not(.has-blocks) .pr-main > .buddy-host > * { min-width: 0; }
  .tutor-run.pad-fixed.clue-fixed:not(.has-blocks) .pr-main > .buddy-host > .read { display: none; }
}

/* Version 2026.20 (#11): the heading a new screen focuses for VoiceOver shows no ring (it is not a control) */
#screen[data-a11y-focus]:focus, #screen [data-a11y-focus]:focus { outline: none; }
/* Version 2026.20 (#12): the week card in the Parent area */
.week-card .wk-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 1.05rem; }

/* device sync card (improvement #6): no empty gap before the buttons */
.sync-card .msg:empty { display: none; }

/* dressed single-frame budgie (Dream Nest, Living Map, Practice perch) */
.bd-dress { position: relative; display: block; flex: none; pointer-events: none; }
.bd-dress > img { position: static !important; width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.nest-bird .bd-dress > img { filter: drop-shadow(0 3px 3px rgba(67, 41, 24, .25)); }
.nest-bird.hop img { animation: none; }
.nest-bird.hop .bd-dress, .nest-bird.hop > img { animation: nest-hop .6s ease; }
.lm-bird .lm-sprite { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.lm-bird.land .lm-sprite { transform-origin: 50% 85%; animation: lmLand .36s ease-out; }
/* the old landing bounce on the img would run a second time inside the sprite (and leave the hat behind) */
.lm-bird.land .lm-sprite img { animation: none; }
.lm-stage.still .lm-bird.land .lm-sprite { animation: none; }

/* manipulative "Next step" spotlight (uses def.next(s) from manipulatives/*.js) */
[data-m-guide][aria-pressed="true"] { border-color: var(--d-sky) !important; background: var(--d-blue-bg) !important; color: var(--d-sky-ink) !important; }
[data-manip] .m-next { border-color: var(--d-sky) !important; background: var(--d-blue-bg) !important; box-shadow: 0 0 0 4px rgba(14, 165, 233, .35) !important; animation: mNextPulse 1.5s ease-in-out infinite; }
@keyframes mNextPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(14, 165, 233, .38); } 50% { box-shadow: 0 0 0 7px rgba(14, 165, 233, .16); } }

/* Speed Garden correction pause without tearing down keypad */
.garden-play .answer-host.is-busy { opacity: .45; pointer-events: none; }

@media (prefers-reduced-motion: reduce) { .nest-bird.hop .bd-dress, .nest-bird.hop > img, .lm-bird .lm-sprite { animation: none !important; } [data-manip] .m-next { animation: none !important; box-shadow: 0 0 0 4px rgba(14, 165, 233, .42) !important; } }
body.reduce-motion .nest-bird.hop .bd-dress, body.reduce-motion .nest-bird.hop > img, body.reduce-motion .lm-bird .lm-sprite { animation: none !important; }
body.reduce-motion [data-manip] .m-next { animation: none !important; box-shadow: 0 0 0 4px rgba(14, 165, 233, .42) !important; }
/* Gemini UI review (2026-11-29) */
/* the fraction pad: the box being typed in is unmistakable (blue wash + blue border), and its caret shows even after the
   other box has a number (.kp:not(.empty) used to hide it, so the bottom box looked dead after typing the top) */
.kp-fracpad .kf-box.on { background: var(--d-wash); border-color: var(--d-blue); box-shadow: 0 0 0 4px rgba(26, 114, 204, .2); }
.kp-fracpad .kf-box.on .kp-caret { display: block; height: 36px; background: var(--d-blue); }
/* "Read to me" next to the question: a soft sky button that stands out from the white card, never under 48 pt */
.q-text .icon-btn.read { background: var(--d-wash) !important; border-color: var(--d-wash-line) !important; min-width: 48px; min-height: 48px; }
@media (max-width: 559px) and (orientation: portrait) and (max-height: 760px) { .tutor-run .qcard .q-text .read { width: 48px; height: 48px; min-height: 48px; } }
/* a short line under the stars that says what they were for (effort, accuracy, on your own), fading in after them */
.level-done .star-why { margin: 4px auto 0; color: var(--d-text); font-weight: 800; font-size: 1.05rem; text-align: center; max-width: 30ch; animation: duoFade .6s ease .8s both; }
/* the map: a tap on the middle of the island picture counts as a tap on its medallion */
.lm-hit { position: absolute; left: 15%; top: 8%; width: 70%; height: 62%; border-radius: 45%; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* the backup note is grown-up housekeeping: quiet white buttons, smaller words, side by side where they fit */
.sk-backup { font-size: 14px; }
.sk-backup .lc-actions { gap: 8px; }
.sk-backup .lc-actions .btn { min-height: 44px; padding-inline: 12px; font-size: .95rem; }
/* a phone keeps the pad at the bottom with a one-line answer box (52px); the fraction pad needs both of its boxes, so its
   display grows to fit them (the bottom box used to slide under the keys, Gemini UI review 2026-11-29) */
@media (max-width: 559px) and (orientation: portrait) {
  .tutor-run:not(.has-blocks) .acol > .answer-host:has(.kp) .kp-fracpad .kf-display { height: auto; gap: 2px; padding: 4px 0; margin-bottom: 8px; }
  .tutor-run .kp-fracpad .kf-box { height: 48px; font-size: 1.7rem; }
  .tutor-run .kp-fracpad .kf-box.on .kp-caret { height: 30px; }
}

/* Faith anchors, Bible Discovery Scroll, Heart Discovery, and dinner table reflection */
.faith-anchor { margin: 12px auto 0; max-width: 560px; padding: 12px 16px; border-radius: 18px; background: #FFFBF0; border: 2px solid #E5C87B; border-bottom-width: 4px; text-align: left; color: var(--d-ink); }
.faith-anchor .fa-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: .82rem; font-weight: 800; color: #8A5D0B; }
.faith-anchor .fa-kicker svg.ico { width: 17px; height: 17px; flex: none; }
.faith-anchor .fa-ref { color: #6E582C; font-weight: 700; }
.faith-anchor b { display: block; font-size: 1.02rem; margin-bottom: 3px; color: #3D2B06; }
.faith-anchor p { margin: 0; font-size: .95rem; line-height: 1.45; }

.faith-struggle { margin: 8px 0; padding: 9px 13px; border-radius: 14px; background: #FFF9E6; border: 2px solid #EAD18A; color: #4A3712; font-size: .88rem; line-height: 1.4; font-weight: 700; }
.faith-struggle .fs-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: #F5DA8A; color: #523903; font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.faith-struggle small { color: #7C5C1A; font-weight: 800; white-space: nowrap; }

.verse-collect-card, .heart-discovery { width: 100%; max-width: 540px; margin: 12px auto 0; padding: 14px 16px; border-radius: 20px; background: #FFFDF7; border: 2px solid #DFC581; border-bottom-width: 5px; text-align: left; color: var(--d-ink); }
.verse-collect-card.saved { background: #F3FBF2; border-color: #93CE88; }
.vc-kicker, .hd-kicker { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: .85rem; font-weight: 900; color: #8A5D0B; }
.vc-kicker svg.ico, .hd-kicker svg.ico { width: 18px; height: 18px; }
.vc-quote { margin: 0 0 10px; font-size: .98rem; line-height: 1.45; font-weight: 700; color: #342B16; }
.vc-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: .84rem; font-weight: 800; color: #7B6328; }
.vc-quote.big { font-size: 1.15rem; }

.heart-discovery { background: #F7FBFF; border-color: #A7CBE8; }
.heart-discovery .hd-kicker { color: #1F5B8E; }
.hd-sub { margin: 0 0 4px; font-size: .86rem; color: var(--d-soft); font-weight: 700; }
.hd-q { margin: 0 0 10px; font-size: 1rem; font-weight: 800; color: var(--d-ink); }
.hd-choices { display: grid; gap: 7px; }
.hd-btn { width: 100%; text-align: left; padding: 10px 13px; border-radius: 13px; border: 2px solid var(--d-line); border-bottom-width: 4px; background: #FFFFFF; color: var(--d-ink); font: 700 .94rem/1.35 var(--d-font); cursor: pointer; }
.hd-btn.on { background: #E9F6EC; border-color: var(--leaf); color: #19532A; }
.hd-reply { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #EBF5EC; color: #1B542C; font-weight: 800; font-size: .93rem; line-height: 1.4; }

.scroll-shelf { margin-top: 22px; padding: 16px; border-radius: 22px; background: #FFFDF7; border: 2px solid #E5CFA0; border-bottom-width: 5px; }
.scroll-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.scroll-head .h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.scroll-head .h3 svg.ico { width: 22px; height: 22px; color: #8A5D0B; }
.scroll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 10px; }
.scroll-card, .scroll-verse { display: grid; gap: 5px; align-content: start; padding: 10px; border-radius: 16px; border: 2px solid #E5D4AA; border-bottom-width: 4px; background: #FFFFFF; text-align: left; color: var(--d-ink); cursor: pointer; font-family: var(--d-font); }
.scroll-card .sc-img { width: 100%; height: 96px; object-fit: cover; border-radius: 10px; }
.scroll-card .sc-test { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: #8A5D0B; }
.scroll-card b { font-size: .9rem; line-height: 1.3; }
.scroll-verse { background: #FFFBF0; }
.scroll-verse b { font-size: .85rem; color: #7A540E; }
.scroll-verse span { font-size: .88rem; line-height: 1.35; font-weight: 700; }
.scroll-empty { margin: 4px 0; }
.scroll-modal { display: grid; gap: 10px; text-align: left; }
.scroll-modal .sm-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; }
.scroll-modal .sm-reply { margin: 0; padding: 10px 12px; border-radius: 14px; background: #F1F8EE; color: #1F572B; font-weight: 800; line-height: 1.45; }

.faith-dinner { padding: 12px 14px; border-radius: 16px; background: #FFFBF0; border: 2px solid #E7D29B; display: grid; gap: 6px; }
.faith-dinner p { margin: 0; line-height: 1.45; }
.faith-dinner .fd-story { font-size: .92rem; color: #4A3814; font-weight: 700; }
.faith-dinner .fd-verse { margin: 2px 0; padding: 8px 12px; border-left: 4px solid #D9B14C; background: #FFFDF7; border-radius: 8px; font-weight: 700; }
.faith-dinner .fd-verse cite { font-style: normal; font-size: .85rem; color: #7C5D18; }
.faith-dinner .fd-talk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.tu-ack { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }

/* Real Tutor & SDA Faith upgrades (Version 2026.28) */
.q-faith-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 2px solid #DFC581; background: #FFFBF0; border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; color: var(--d-ink); }
.q-faith-btn:hover { background: #FFF5D6; border-color: #C9A652; }
.q-faith-more { font-weight: 900; color: #8A5D0B; font-size: .88rem; }
.bible-takeaway { flex: 1 1 100%; display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 0; padding: 8px 12px; border-radius: 14px; background: #FFFDF7; border: 2px solid #DFC581; color: #3D2B06; font-size: .92rem; line-height: 1.4; }
.bible-takeaway svg.ico { flex: none; width: 18px; height: 18px; color: #8A5D0B; margin-top: 2px; }
.tu-habit-note { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: #FFF3D1; color: #5D4200; font-size: .88rem; font-weight: 800; }
.tu-blue-bridge { margin: 2px 0 6px; padding: 8px 10px; border-radius: 14px; background: #F5FAFF; border: 2px solid #B6D7F5; pointer-events: none; }
.tu-blue-bridge > small { display: block; margin-bottom: 4px; font-weight: 900; color: #245B8E; font-size: .8rem; }
.tu-blue-bridge .manip { padding: 6px 8px; gap: 6px; border-width: 2px; border-radius: 12px; background: #FFFFFF; }
.tu-blue-bridge .m-msg, .tu-blue-bridge .sh-acts, .tu-blue-bridge .m-tools { display: none; }
.tu-blue-bridge .st-part { min-height: 28px; font-size: .78rem; }
.tu-blue-bridge .st-part small { font-size: .62rem; }
.tu-blue-bridge svg { max-height: 108px; width: auto; }
.icon-btn.small.read { min-width: 44px; min-height: 44px; }
.lesson-stage:has([data-idea-pick].right, [data-idea-pick].wrong) { animation: none !important; }
body[data-screen="lesson"] .lesson-stage { margin-bottom: 10px; }
body[data-screen="lesson"] .lesson { padding-bottom: 24px; }
.tutor-run.has-blocks .pr-main > .acol { background: #FFFFFF !important; }
@media (max-width: 559px) {
  .qcard .q-text:has(> .read) { display: grid !important; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 6px; width: 100%; }
  .qcard .q-text:has(> .read) > p { grid-column: 2; min-width: 0; text-align: center; }
  .qcard .q-text:has(> .read) > .read { grid-column: 3; justify-self: end; margin: 0; }
  .blocks-host .st-bar:has(.st-part:nth-child(8)) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .blocks-host .st-bar:has(.st-part:nth-child(8)) .st-part { min-height: 46px; }
  .blocks-host .st-bar:has(.st-part:nth-child(8)) .st-part:nth-child(5n+1) { border-left: 0; }
  .blocks-host .st-bar:has(.st-part:nth-child(8)) .st-part:nth-child(n+6) { border-top: 2px solid var(--bark); }
  .garden-pick .page-head { grid-template-columns: auto 1fr auto; grid-template-areas: 'back title act'; }
  .garden-pick .page-head > .h2 { margin: 0; font-size: 1.35rem; }
}
@media (max-width: 720px) {
  .dash .dtabs { flex-wrap: wrap; overflow-x: visible; }
  .dash select { max-width: 100%; min-width: 0; }
  .dash label.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
}
@media (max-width: 430px) {
  .dock { gap: 4px; padding-inline: 6px; }
  .dock button { padding: 6px 2px; font-size: .72rem; line-height: 1.15; }
}
.nys-fold { margin: 12px 0 4px; border: 2px solid var(--d-line); border-radius: 14px; padding: 8px 12px; background: #F8FAFC; }
.nys-fold summary { cursor: pointer; font-weight: 800; color: var(--d-blue-2); list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.nys-fold summary::after { content: "▾"; font-size: 1rem; }
.nys-fold[open] summary { margin-bottom: 8px; }
.nys-fold[open] summary::after { content: "▴"; }
.hb-ex .qbox { font-size: .85em; padding: 1px 4px; border-width: 1.5px; vertical-align: baseline; }
.idea-vis { margin: 6px auto; padding: 10px; border-radius: 18px; background: #FFFFFF; border: 2px solid var(--d-line); max-width: 440px; display: grid; place-items: center; }
.idea-svg { width: 100%; max-width: 320px; height: auto; }
.idea-check { margin: 6px auto 0; padding: 12px 14px; border-radius: 18px; background: #FFFDF7; border: 2px solid #DFC581; max-width: 520px; text-align: left; display: grid; gap: 8px; }
.idea-check .ic-q { margin: 0; font-weight: 900; font-size: 1rem; color: var(--d-ink); }
.idea-check .ic-choices { display: grid; gap: 6px; }
.idea-check .ic-btn { text-align: left; justify-content: flex-start; min-height: 44px; padding-block: 6px; }
.idea-check .ic-btn.ok-mark { border-color: var(--d-check); background: #E9F6EC; color: #19532A; }
.idea-check .ic-btn.wrong { border-color: #E05A47; background: #FFF0EE; color: #8D2B1F; }
.idea-check .ic-fb { margin: 0; font-weight: 800; font-size: .92rem; }
.idea-check .ic-fb.good { color: #2F6B00; }
.idea-check .ic-fb.hint { color: #7C5C1A; }
.scroll-subhead { margin: 18px 0 10px; }
.scroll-subhead h4 { margin: 0 0 2px; font-weight: 900; color: #6E4A06; }
.scroll-subhead p { margin: 0; font-size: .88rem; }
.scroll-verse.treasure { background: #F5FAFF; border-color: #B4D3EC; }
.scroll-verse.mem { border-color: var(--d-check); }
.mem-badge { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px; border-radius: 999px; background: #E9F6EC; color: #1B542C; font-weight: 900; font-size: .88rem; justify-self: start; }
.mem-badge svg.ico { width: 16px; height: 16px; }
.mem-slots { min-height: 54px; padding: 12px; border-radius: 16px; background: #FFFDF7; border: 2px dashed #DFC581; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mem-built-chip { padding: 5px 10px; border-radius: 10px; background: #E9F6EC; border: 2px solid #8CD19D; color: #19532A; font-weight: 800; font-size: .94rem; }
.mem-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.mem-tile { padding: 8px 12px; border-radius: 12px; background: #FFFFFF; border: 2px solid var(--d-line); border-bottom-width: 4px; font: 800 .94rem/1.3 var(--d-font); color: var(--d-ink); cursor: pointer; text-align: left; }
.mem-tile.used { opacity: .4; cursor: default; }
.mem-win { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 14px; background: #E9F6EC; color: #1B542C; font-weight: 900; }
.sabbath-pill { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 10px; padding: 6px 14px; border-radius: 999px; background: #EEF7FF; border: 2px solid #9EC8EA; color: #1E5485; font-weight: 900; font-size: .9rem; }
.sabbath-pill svg.ico { width: 18px; height: 18px; color: #2D74B5; }

/* Version 2026.30: 10x10 Hundredths Grid, Habit-Targeted Daily Flight, Printable Certificate */
.hg-wrap { display: grid; gap: 8px; justify-items: center; width: 100%; }
.hg-grid { display: grid; grid-template-rows: repeat(10, 1fr); grid-auto-flow: column; gap: 2px; width: min(280px, 100%); aspect-ratio: 1 / 1; padding: 6px; border-radius: 14px; background: #E9F0E5; border: 2px solid var(--bark); }
.hg-c { border: 0; border-radius: 3px; background: #FFFFFF; cursor: pointer; padding: 0; min-width: 0; min-height: 0; transition: background-color .12s ease; }
.hg-c.on { background: #5DBB46; }
.hg-c.base { background: #2D74B5; cursor: default; }
.hg-c:hover:not(.base) { outline: 2px solid #23422B; z-index: 1; }
.hg-goal { color: var(--muted); font-weight: 700; }
.row-chip.habit-win { background: #E9F6EC; color: #1B542C; border-color: #8CD19D; }
.rcard.gold { background: #FFFBF0; border-color: #DFC581; }
.end-milestones { justify-content: center; margin: 2px 0 8px; }
.rep-faith-meta, .rep-habits-watch { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #F4F9F2; color: #1F4E2B; font-weight: 800; font-size: .92rem; }
.cert-wrap { display: grid; gap: 14px; }
.cert-sheet { padding: 24px 20px; border-radius: 22px; background: linear-gradient(180deg, #FFFDF7 0%, #FFF7E0 100%); border: 6px double #C99D3B; text-align: center; display: grid; gap: 10px; box-shadow: 0 8px 24px rgba(102, 72, 14, .12); }
.cert-top { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cert-kicker { margin: 0; font-size: .78rem; font-weight: 900; letter-spacing: .12em; color: #8A5D0B; }
.cert-title { margin: 0; font-size: 1.45rem; font-weight: 900; color: #23422B; }
.cert-sub { margin: 0; font-weight: 700; color: #6B5322; }
.cert-who { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0; }
.cert-name { display: block; font-size: 1.5rem; font-weight: 900; color: #1C3522; }
.cert-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cert-stats span { padding: 8px 6px; border-radius: 12px; background: #FFFFFF; border: 2px solid #E7D29B; display: grid; gap: 2px; }
.cert-stats b { font-size: 1.25rem; color: #2F7D3A; }
.cert-stats small { font-size: .75rem; font-weight: 700; color: #5D4200; }
.cert-note { margin: 2px 0 0; font-weight: 700; color: #23422B; }
.cert-verse { margin: 4px 0; padding: 10px 14px; border-radius: 14px; background: #FFFFFF; border: 2px solid #DFC581; font-weight: 700; color: #4A3814; font-size: .92rem; }
.cert-verse cite { font-style: normal; color: #8A5D0B; font-size: .85rem; }
.cert-foot { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }
@media (max-width: 480px) { .cert-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  body:has(.cert-sheet) .shell, body:has(.cert-sheet) .dock, body:has(.cert-sheet) .modal-back, body:has(.cert-sheet) .modal-x, body:has(.cert-sheet) .no-print { display: none !important; }
  body:has(.cert-sheet) #modal-root, body:has(.cert-sheet) #modal-root .modal { position: static !important; inset: auto !important; padding: 0 !important; box-shadow: none !important; background: none !important; max-width: none !important; width: 100% !important; }
  .cert-sheet { box-shadow: none !important; margin: 0 auto !important; page-break-inside: avoid; }
  .ws-key-page { page-break-before: always; break-before: page; }
}

/* Version 2026.31: Protractor, Order Step Picker, Worksheet, & Scroll Tiers */
.pr-wrap, .or-wrap { display: grid; gap: 8px; justify-items: center; width: 100%; }
.pr-svg { width: min(280px, 100%); height: auto; }
.or-expr { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: 16px; background: #FFFDF7; border: 2px solid #DFC581; width: 100%; }
.or-tk { font-size: 1.15rem; font-weight: 900; color: var(--d-ink); }
.or-tk.br { color: #8A5D0B; }
.or-tk.eq { color: var(--muted); margin-left: 2px; }
.or-op { min-width: 44px; min-height: 44px; font-size: 1.15rem; }
.or-hist { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.scroll-subrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.scroll-tier { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 900; background: #FFF7DA; color: #6E4A06; border: 2px solid #DFC581; }
.scroll-tier.tier-3 { background: #E9F6EC; color: #19532A; border-color: #8CD19D; }
.scroll-tier svg.ico { width: 15px; height: 15px; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin: 12px 0; }
.ws-item { border: 2px solid var(--d-line); border-radius: 14px; padding: 12px; background: #FFFFFF; display: grid; gap: 6px; break-inside: avoid; }
.ws-meta { display: flex; align-items: center; justify-content: space-between; color: var(--d-blue-2); }
.ws-q { margin: 0; font-weight: 700; }
.ws-expr { margin: 0; font-size: 1.15rem; font-weight: 900; }
.ws-vis svg { max-height: 110px; width: auto; }
.ws-work { min-height: 62px; border: 1.5px dashed #C7D4C0; border-radius: 10px; background: #FAFDF8; }
.ws-verse { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #FFFBF0; border: 2px solid #E7D29B; font-weight: 700; }
.ws-key-page { margin-top: 16px; padding: 14px; border-radius: 16px; background: #F8FAFC; border: 2px solid var(--d-line); }
.ws-key-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.garden-verse { margin: 10px auto 0; max-width: 520px; padding: 12px 16px; border-radius: 18px; background: #FFFDF7; border: 2px solid #DFC581; text-align: left; }
.garden-verse .vb-ref { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #7C5C1A; }
.garden-verse .vb-ref svg.ico { width: 16px; height: 16px; }
.garden-verse .vb-text { margin: 0; font-weight: 700; color: #342B16; line-height: 1.45; }
.habit-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.habit-list li { padding: 10px 12px; border-radius: 14px; background: #FFFBF0; border: 2px solid #EAD18A; display: grid; gap: 4px; }
.habit-list .hb-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
.habit-list p { margin: 0; font-size: .93rem; line-height: 1.4; }
.habit-list .hb-ex { color: var(--d-soft); font-weight: 700; }

/* Version 2026.33: Reasonable Estimate Check, Capstone Chip, Fluency Watch */
.run-applied-tag { display: inline-flex; align-items: center; gap: 5px; margin: 0 auto 6px; padding: 3px 10px; border-radius: 999px; background: #FFF7DA; border: 2px solid #DFC581; color: #6E4A06; font-size: .78rem; font-weight: 900; }
.run-applied-tag svg.ico { width: 14px; height: 14px; color: #C98A00; }
.est-card { margin: 0 0 8px; padding: 8px 12px; border-radius: 16px; background: #F5FAFF; border: 2px solid #BFD9F2; display: grid; gap: 6px; }
.est-q { margin: 0; font-size: .88rem; font-weight: 900; color: #1D4B82; }
.est-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.est-btn { min-height: 36px; padding: 4px 12px; font-weight: 900; background: #FFFFFF; border: 2px solid #A8CBEB; color: #1D4B82; border-radius: 999px; }
.est-btn.right, .est-btn.ok-mark { background: #E9F6EC; border-color: #4C9F38; color: #19532A; }
.est-btn.wrong { background: #FFF0EE; border-color: #E05A47; color: #8D2B1F; }
.est-fb { margin: 0; font-size: .82rem; font-weight: 800; }
.est-fb.good { color: #2F6B00; }
.est-fb.hint { color: #7C5C1A; }
.rep-fluency-watch { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #EFF6FF; border: 1.5px solid #BFD9F2; color: #1D4B82; font-weight: 800; font-size: .92rem; }
