/* Run The Roost: the kid-facing World (Phase 8). Two voices: Lilita One shouts
   (always a hard drop shadow, never a soft blur), Fredoka chats. Barnwood planks
   with bolts, cream trays, gold worth chasing, a sky behind everything.
   The Roost (css/roost.css) is plain on purpose and is not themed. */

:root {
  --practice: #f4ead2; --practice-edge: #b8996a; --practice-ink: #4a3220;
  --ink: #3a2415; --barn: #c4452c; --gold: #ffc93c; --gold2: #ffe27a;
  --cream: #f9edd2; --cream2: #f2e0bb; --wood: #b07a42; --wood2: #cf9a5c; --wood3: #8a5a2b; --wood4: #6b3f1c;
  --green: #6fb643; --green2: #4c8a28; --green3: #35641a; --sky: #bfe6ff; --red: #d93b2b;
  --plankshadow: #4a2a10; --cream-text: #fdf3df; --cream-soft: #f6dfb2;
  --hop: .47s; --beat: .65s; --beat-miss: 2.4s; --cdbeat: .56s;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--sky); color: var(--ink); font-family: Fredoka, system-ui, sans-serif; font-size: 18px; user-select: none; -webkit-user-select: none; }
input, textarea { user-select: text; -webkit-user-select: text; }
button { font-family: inherit; cursor: pointer; }
h1, h2, .prompt, .racebtn, .disp { font-family: 'Lilita One', Fredoka, sans-serif; font-weight: 400; letter-spacing: .01em; }
h1 { font-size: clamp(30px, 4.6vw, 44px); margin: 0 0 .3em; color: var(--cream-text); text-shadow: 0 2px 0 var(--barn); line-height: 1.05; }
h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 .3em; color: var(--cream-text); text-shadow: 0 2px 0 var(--barn); }
p { margin: .4em 0; }
#app { position: fixed; inset: 0; overflow: hidden; }

/* ---------- screens and backdrops ---------- */
.screen { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
/* the scaled piece (dom.js fitTo): natural size, shrunk as one when the screen is smaller, never scrolled */
.fit { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1100px; transform-origin: center center; flex: 0 0 auto; }
.cardhost .fit { width: auto; max-width: none; }
.screen, .skyscreen { background: linear-gradient(#5cb1e6 0%, #a5d9f5 58%, #d8effb 100%); }
.screen::before { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(#8cc558, #609a35); border-top: 6px solid #9ed36a; pointer-events: none; z-index: 0; }
.screen.race::before, .barnscreen::before { display: none; }
.screen > * { position: relative; z-index: 1; }
.barnscreen { background: radial-gradient(120% 90% at 50% 30%, #4a3018 0%, #33200e 55%, #201308 100%); }
.barnscreen::after { content: ''; position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 110px, #00000014 110px 116px); z-index: 0; }
.barnscreen .floor { position: fixed; left: 0; right: 0; bottom: 0; height: 14%; background: linear-gradient(#4e6f2a, #35511a); border-top: 5px solid #5d8332; z-index: 0; }

/* ---------- planks, trays, buttons ---------- */
.plank { position: relative; background: linear-gradient(var(--wood2), var(--wood) 60%, var(--wood3)); border: 5px solid var(--wood4); border-radius: 22px; box-shadow: 0 8px 0 var(--plankshadow), 0 14px 24px rgba(0,0,0,.3), inset 0 3px 0 #ffffff3d; padding: 24px 30px; max-width: 680px; width: 100%; text-align: center; color: var(--cream-text); }
.plank::after { content: ''; position: absolute; inset: 6px; border-radius: 14px; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 68px, #00000010 68px 72px); }
.plank > * { position: relative; z-index: 1; }
.plank.wide { max-width: 1000px; }
.plank p { color: var(--cream-text); }
.plank .fine, .plank .plankline.fine { color: var(--cream-soft); }
.bolt { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(#e8e2d4, #8f8878 70%); box-shadow: inset 0 -2px 3px #00000059; z-index: 2; }
.bolt.b1 { top: 10px; left: 12px; } .bolt.b2 { top: 10px; right: 12px; } .bolt.b3 { bottom: 10px; left: 12px; } .bolt.b4 { bottom: 10px; right: 12px; }
.tray { background: linear-gradient(var(--cream), var(--cream2)); border-radius: 16px; border: 3px solid #d9b98a; box-shadow: inset 0 4px 8px #7a4a2226; padding: 14px; color: var(--ink); }
.tray p, .tray .fine { color: #7a4a22; }
.plankline { font-family: 'Lilita One', Fredoka, sans-serif; color: var(--cream-soft); text-shadow: 0 1px 0 var(--wood4); font-size: 20px; margin: 6px 0; }
.plankline.big { font-size: 24px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--cream-soft); margin: 0 0 4px; font-weight: 700; }
.tagline { font-family: 'Lilita One', Fredoka, sans-serif; color: var(--cream-text); text-shadow: 0 2px 0 var(--wood4); font-size: clamp(20px, 2.6vw, 28px); margin-top: 10px; }
.row { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.row.small { margin-top: 8px; gap: 10px; }

.wbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: 'Lilita One', Fredoka, sans-serif; font-weight: 400; font-size: 22px; padding: 12px 24px; min-height: 52px; color: #fff6e4; text-shadow: 0 2px 0 var(--wood4); background: linear-gradient(var(--wood2), var(--wood) 55%, var(--wood3)); border: 4px solid var(--wood4); border-radius: 18px; box-shadow: 0 6px 0 var(--plankshadow), 0 10px 16px rgba(0,0,0,.25), inset 0 2px 0 #ffffff4d; transition: transform .06s, box-shadow .06s; letter-spacing: .01em; }
.wbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--plankshadow), 0 4px 8px rgba(0,0,0,.25); }
.wbtn.big { font-size: clamp(26px, 3.2vw, 34px); padding: 16px 40px; border-radius: 22px; }
.wbtn.small { font-size: 17px; min-height: 40px; padding: 6px 14px; border-width: 3px; border-radius: 12px; box-shadow: 0 4px 0 var(--plankshadow), 0 6px 10px rgba(0,0,0,.2); }
.wbtn.green { background: linear-gradient(#8ed05c, var(--green) 55%, var(--green2)); border-color: var(--green3); box-shadow: 0 6px 0 #2b5313, 0 10px 16px rgba(0,0,0,.25), inset 0 2px 0 #ffffff59; text-shadow: 0 2px 0 #3a6c1e; }
.wbtn.green:active { box-shadow: 0 2px 0 #2b5313; }
.wbtn.cream { background: linear-gradient(#fdf4de, #efdcb4); border-color: #c79a5e; color: #7a4a22; text-shadow: none; box-shadow: 0 6px 0 #a3763e, 0 10px 16px rgba(0,0,0,.2); }
.wbtn[disabled] { filter: grayscale(.6); opacity: .6; pointer-events: none; }
.wbtn img { height: 1.3em; filter: drop-shadow(0 2px 0 #00000040); }
.racebtn { font-size: clamp(28px, 3.6vw, 40px); margin: 10px 0; width: 100%; max-width: 560px; }
.wbadge { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(var(--wood2), var(--wood) 60%, var(--wood3)); border: 4px solid var(--wood4); border-radius: 16px; box-shadow: 0 5px 0 var(--plankshadow), 0 8px 14px rgba(0,0,0,.3), inset 0 2px 0 #ffffff45; padding: 6px 14px; font-family: 'Lilita One', Fredoka, sans-serif; color: #fff6e4; font-size: 22px; text-shadow: 0 2px 0 var(--wood4); }
.wbadge img { height: 28px; filter: drop-shadow(0 2px 0 #00000040); }
.chip { display: inline-block; background: linear-gradient(var(--gold2), var(--gold)); color: #5b3a00; border-radius: 999px; padding: 3px 14px; font-size: 1rem; font-weight: 700; box-shadow: 0 2px 0 #a95f10; }
input.nick, input.email, input.code, input.pin { font: inherit; font-size: 1.4rem; padding: 10px 14px; border: 3px solid var(--wood4); border-radius: 12px; width: 100%; max-width: 360px; text-align: center; background: #fff; color: var(--ink); margin: 6px 0; }
input.code, input.pin { letter-spacing: .3em; }
.err { color: #ffb4a6; min-height: 1.4em; margin-top: 6px; font-weight: 700; text-shadow: 0 1px 0 #00000059; }
.fine { font-size: .85rem; }
.fine a, a.finelink, .plank a { color: var(--gold2); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: #2a1a0bd9; color: #f3e2bd; font-weight: 600; padding: 10px 22px; border-radius: 30px; max-width: 90vw; z-index: 50; font-size: 16px; }
.verstamp { position: fixed; right: 10px; bottom: 6px; z-index: 3; font-size: 11px; font-weight: 700; color: #ffffff99; letter-spacing: .04em; pointer-events: none; }
.barnscreen .verstamp { color: #ffffff66; }
.homelink { position: fixed; right: 10px; bottom: 24px; font-size: 13px; color: #fff; font-weight: 700; text-shadow: 0 1px 0 #00000059; z-index: 3; }
.backbtn { position: fixed; top: 14px; left: 14px; z-index: 9; font-size: 18px; padding: 8px 18px; min-height: 44px; }

/* the Roost sign: a small board on two chains, the same everywhere */
.roostsign { background: none; border: none; padding: 0; display: inline-flex; flex-direction: column; align-items: center; color: #fff6e4; }
.roostsign .rs-chain { display: block; width: 60px; height: 14px; border-left: 3px solid #7a5a3a; border-right: 3px solid #7a5a3a; }
.roostsign .rs-board { display: inline-block; font-family: 'Lilita One', Fredoka, sans-serif; font-size: 16px; padding: 6px 14px; background: linear-gradient(#9c6230, #7a4a22); border: 3px solid #56300f; border-radius: 10px; box-shadow: inset 0 2px 4px #00000047, 0 3px 0 #3d2008; text-shadow: 0 1px 0 #56300f; white-space: nowrap; }
.roostsign:active .rs-board { transform: translateY(2px); }
.roostsign.corner { position: fixed; top: 0; right: 16px; z-index: 9; }
.roostsign .rs-lock { font-size: 13px; }

/* ---------- the logo ---------- */
.logo { text-align: center; position: relative; z-index: 2; margin-bottom: 24px; }
.logo .plankback { display: inline-block; background: linear-gradient(var(--wood2), var(--wood) 55%, var(--wood3)); border: 5px solid var(--wood4); border-radius: 20px; box-shadow: 0 8px 0 var(--plankshadow), 0 16px 30px rgba(0,0,0,.5); padding: 16px 38px 20px; transform: rotate(-1.2deg); }
.logo .l1 { font-family: 'Lilita One', sans-serif; font-size: clamp(34px, 6vw, 60px); line-height: .95; color: #f6ecd8; text-shadow: 0 2px 0 var(--barn); letter-spacing: .04em; }
.logo .l2 { font-family: 'Lilita One', sans-serif; font-size: clamp(50px, 9vw, 92px); line-height: 1; color: var(--gold); text-shadow: 0 3px 0 #a95f10; letter-spacing: .06em; }
.logo.small { margin-bottom: 10px; } .logo.small .plankback { padding: 8px 20px 10px; } .logo.small .l1 { font-size: 20px; } .logo.small .l2 { font-size: 34px; }

/* ---------- first run and the child picker ---------- */
.picker { display: flex; gap: clamp(12px, 2vw, 30px); flex-wrap: wrap; justify-content: center; position: relative; z-index: 2; }
.doorcard { width: clamp(150px, 20.5vw, 230px); text-align: center; padding: clamp(14px, 2vw, 24px) 12px 14px; border-radius: 20px; cursor: pointer; }
.doorcard img.face { height: clamp(96px, 12vw, 132px); object-fit: contain; filter: drop-shadow(0 6px 0 #00000040); }
.doorcard .nameplate { margin-top: 12px; font-size: clamp(18px, 2.2vw, 26px); background: linear-gradient(#9c6230, #7a4a22); border: 3px solid #56300f; border-radius: 12px; box-shadow: inset 0 3px 6px #00000059, 0 3px 0 #3d2008; padding: 8px 10px; font-family: 'Lilita One', sans-serif; color: var(--cream-text); text-shadow: 0 2px 0 #56300f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doorcard.adddoor .face { font-size: clamp(56px, 7vw, 76px); line-height: clamp(96px, 12vw, 132px); display: block; filter: drop-shadow(0 4px 0 #00000040); }
.picker.many { gap: clamp(8px, 1.4vw, 20px); }
.picker.many .doorcard { width: clamp(112px, 15vw, 180px); padding: clamp(10px, 1.4vw, 18px) 8px 10px; }
.picker.many .doorcard img.face { height: clamp(72px, 9.5vw, 112px); }
.picker.many .doorcard.adddoor .face { font-size: clamp(44px, 5.6vw, 64px); line-height: clamp(72px, 9.5vw, 112px); }
.picker.many .doorcard .nameplate { font-size: clamp(15px, 1.8vw, 22px); padding: 6px 8px; margin-top: 8px; }
.firstrun .plank { max-width: 720px; }
.firstrun .welcomechick { height: 150px; filter: drop-shadow(0 6px 0 #00000033); margin: 4px 0; }

/* ---------- the start screen (Chicken Run's shape) ---------- */
.screen.start { justify-content: center; padding: 70px 20px 34px; }
.startcol { display: flex; flex-direction: column; align-items: center; width: min(1020px, 96vw); }
.headsign { position: relative; z-index: 3; text-align: center; background: linear-gradient(var(--wood2), var(--wood) 55%, var(--wood3)); border: 5px solid var(--wood4); border-radius: 18px; box-shadow: 0 7px 0 var(--plankshadow), 0 12px 22px rgba(0,0,0,.35); padding: 12px 42px 10px; margin-bottom: -22px; }
.headsign h1 { font-size: clamp(30px, 4.6vw, 48px); color: var(--gold); text-shadow: 0 2px 0 #a95f10; margin: 0; }
.headsign .subline { font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); }
.startwrap { width: 100%; max-width: none; padding: 34px 22px 14px; text-align: left; }
.lineup { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; overflow: hidden; padding: 6px 2px 8px; }
.chick { min-width: 0; width: auto; text-align: center; padding: 10px 6px 8px; border-radius: 16px; border: 4px solid #e2c791; background: linear-gradient(#fdf4de, #f3e2ba); box-shadow: 0 4px 0 #c79a5e40; position: relative; cursor: pointer; font-family: inherit; }
.chick img { height: 90px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 4px 0 #00000026); }
.chick .cn { font-family: 'Lilita One', sans-serif; font-size: 16px; color: #7a4a22; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chick.sel { border-color: var(--gold); box-shadow: 0 0 0 3px #ffc93c66, 0 4px 0 #c79a5e40; }
.chick.egg img { height: 78px; margin-top: 6px; }
.chick.egg.more { display: flex; flex-direction: column; justify-content: center; cursor: default; }
.chick.egg.more .eggcount { font-family: 'Lilita One', sans-serif; font-size: 34px; color: #b48a4a; line-height: 84px; }
.lockbadge { position: absolute; left: 50%; transform: translateX(-50%); bottom: 30px; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(#9c6230, var(--wood4)); border: 3px solid #56300f; box-shadow: 0 3px 0 #3d2008; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.rewardrow { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; margin-top: 6px; }
.hammerpanel { display: flex; gap: 12px; align-items: center; background: linear-gradient(#9c6230, #7a4a22); border: 4px solid #56300f; border-radius: 16px; box-shadow: inset 0 3px 6px #00000047; padding: 10px 16px; min-width: 250px; flex: 0 0 auto; }
.hammerpanel img { height: 58px; filter: drop-shadow(0 3px 0 #00000047); }
.hammerpanel .hcount { font-family: 'Lilita One', sans-serif; font-size: 28px; color: var(--cream-text); text-shadow: 0 2px 0 #56300f; }
.hammerpanel .hsub { font-weight: 700; font-size: 14px; color: #f0d9ac; line-height: 1.25; max-width: 190px; }
.starrail { flex: 1; min-width: 280px; display: flex; align-items: center; padding: 26px 26px 10px; position: relative; }
.railtrack { position: relative; flex: 1; height: 18px; border-radius: 12px; background: #fffdf6; border: 2px solid #dcc496; box-shadow: inset 0 2px 5px #7a4a2230; }
.railfill { position: absolute; inset: 0 auto 0 0; border-radius: 10px; background: linear-gradient(var(--gold2), var(--gold)); box-shadow: inset 0 -3px 0 #d99a17; transition: width .5s; }
.railstop { position: absolute; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.railstop .rstar { font-size: 26px; filter: grayscale(1) opacity(.55); }
.railstop.hit .rstar { filter: none; }
.railstop .rlabel { position: absolute; top: -28px; left: 50%; transform: translateX(-50%); font-family: 'Lilita One', sans-serif; font-size: 15px; color: #7a4a22; }
.railhead { position: absolute; top: 50%; transform: translate(-50%, -50%); height: 40px; filter: drop-shadow(0 3px 2px #00000047); transition: left .5s; }
.railhead img { height: 100%; }
.todayrow { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.stepchip { font-size: 1rem; }
.nests { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--cream-text); text-shadow: 0 1px 0 #00000059; }
.nests .nest { font-style: normal; display: inline-block; width: 1.4em; text-align: center; opacity: .5; font-size: 1.2rem; }
.nests .nest.full { opacity: 1; }
.nesttext { margin-left: 6px; }
.switches { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 #00000059; cursor: pointer; font-size: .95rem; }
.switch input { width: 20px; height: 20px; accent-color: var(--green2); }
.startbtns { display: flex; gap: 16px; justify-content: center; margin-top: 16px; position: relative; z-index: 2; flex-wrap: wrap; align-items: center; }
.startbtns .racebtn { width: auto; margin: 0; }
.startfoot { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.lessonnote { font-weight: 700; color: #fff; text-shadow: 0 1px 0 #00000059; margin: 8px 0 0; text-align: center; }
.capmsg { background: linear-gradient(var(--gold2), var(--gold)); color: #5b3a00; border-radius: 12px; padding: 8px 14px; font-size: .95rem; font-weight: 700; margin: 8px 0 0; }
.capmsg a { color: var(--barn); }
.saved { font-size: .95rem; color: #fff; text-shadow: 0 1px 0 #00000059; margin: 0; }
.saved a { color: var(--gold2); font-weight: 700; }

/* ---------- the microphone screens ---------- */
.promptmock { background: #f2f2f7; color: #111; border-radius: 14px; padding: 14px; margin: 14px auto; max-width: 320px; font-family: -apple-system, system-ui, sans-serif; box-shadow: 0 2px 10px rgba(0,0,0,.2); text-align: center; }
.promptmock .pm-title { font-weight: 600; font-size: .95rem; margin-bottom: 10px; color: #111; }
.pm-row { display: flex; gap: 10px; justify-content: center; }
.pm-btn { color: #0a7aff; padding: 4px 10px; }
.pm-allow { font-weight: 700; border: 2px solid #0a7aff; border-radius: 8px; }
.chickwait { height: 30vh; max-height: 260px; margin: 6px auto; display: block; animation: jogbob .5s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(0,0,0,.3)); }
.wakesub { font-family: 'Lilita One', sans-serif; font-size: 22px; color: var(--cream-soft); text-shadow: 0 1px 0 var(--wood4); min-height: 30px; }
.micexplain .micpic { height: 120px; margin: 6px auto; display: block; filter: drop-shadow(0 6px 0 #00000033); }

/* ---------- the lesson ---------- */
.screen.lesson { justify-content: center; padding: 70px 20px 24px; }
.screen.lesson > .ltop { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 9; }
.ltop { width: min(960px, 96vw); display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.lplank { max-width: 960px; }
.ltitle { font-size: clamp(22px, 3vw, 30px); }
.chickline { position: relative; min-height: 2.8em; font-size: 1.2rem; background: #fff; color: var(--ink); border: 3px solid #d9b98a; border-radius: 18px; padding: 10px 18px 10px 68px; margin: 6px auto 12px; max-width: 760px; text-align: left; display: flex; align-items: center; }
.chickline.quiet { opacity: 0; }
.chickline .speaker { position: absolute; left: 8px; bottom: -6px; height: 64px; filter: drop-shadow(0 3px 0 #00000026); }
.lbody { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ldots { display: flex; gap: 6px; justify-content: center; }
.ldots i { width: 11px; height: 11px; border-radius: 50%; background: #fff8e659; border: 2px solid var(--wood4); display: inline-block; }
.ldots i.on { background: var(--gold); }
.ldots.small i { width: 8px; height: 8px; }
.skip { position: fixed; right: 14px; top: 14px; z-index: 9; }
.hundred { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; width: min(100%, 460px); }
.hcell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: linear-gradient(#fdf4de, #f3e2ba); border: 2px solid #d9b98a; font-size: .9rem; color: #7a4a22; font-weight: 600; }
.hcell.lit { background: linear-gradient(var(--gold2), var(--gold)); border-color: #d99a17; color: #5b3a00; font-weight: 800; transform: scale(1.06); transition: transform .2s; }
.notice { font-size: 1.15rem; font-weight: 700; background: linear-gradient(var(--gold2), var(--gold)); color: #5b3a00; border-radius: 12px; padding: 8px 16px; box-shadow: 0 3px 0 #a95f10; }
.stone { font-family: 'Lilita One', sans-serif; font-size: 1.5rem; color: var(--gold); text-shadow: 0 2px 0 #a95f10; margin: 0; }
.astage { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 240px; background: linear-gradient(var(--cream), var(--cream2)); border-radius: 16px; border: 3px solid #d9b98a; padding: 12px 18px; color: var(--ink); width: min(100%, 760px); }
.aprompt { font-family: 'Lilita One', sans-serif; font-size: 2.2rem; color: var(--ink); }
.aprompt.big { font-size: clamp(40px, 6vw, 60px); color: var(--gold); -webkit-text-stroke: 1.5px #7a4a22; text-shadow: 0 2px 0 #a95f10; }
.aanswer { font-size: 1.6rem; font-weight: 800; color: var(--green3); }
.saycard, .wrapcard { background: linear-gradient(var(--cream), var(--cream2)); border: 4px solid #d9b98a; border-radius: 18px; padding: 14px 24px; min-width: 320px; text-align: center; color: var(--ink); box-shadow: inset 0 4px 8px #7a4a2226; }
.saycard.noeggs .eggsgone { font-size: 2.6rem; opacity: .4; }
.saysub { font-family: 'Lilita One', sans-serif; min-height: 1.6em; font-size: 1.15rem; color: var(--cream-soft); text-shadow: 0 1px 0 var(--wood4); margin-top: 6px; }
.saycard .saysub, .wrapcard .saysub { color: #7a4a22; text-shadow: none; }
.saysub.hearing { color: #d7ffb0; }
.saycard .saysub.hearing, .wrapcard .saysub.hearing { color: var(--green3); }
.heardline { min-height: 1.4em; color: var(--red); font-weight: 700; }
.ansbig { font-size: 1.15em; color: var(--barn); }
.blankans { margin-left: 4px; }

/* ---------- the map ---------- */
.map { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; width: min(100%, 440px); margin: 0 auto; }
.map.compact { width: min(100%, 300px); gap: 1px; }
.mcell { aspect-ratio: 1; border-radius: 3px; background: #fffaf0; border: 1px solid #d9b98a; font-size: .7rem; display: flex; align-items: center; justify-content: center; color: #7a4a22; }
.map.compact .mcell { font-size: .55rem; border-radius: 2px; }
.mcell.head, .mcell.corner { background: transparent; border-color: transparent; font-weight: 800; color: var(--ink); }
.plank .mcell.head, .plank .mcell.corner { color: var(--cream-text); }
.mcell.st-chick { background: var(--gold2); }
.mcell.st-roosted, .mcell.lit { background: var(--gold); border-color: #d9a400; }
.mcell.hl { outline: 2px solid var(--barn); outline-offset: -1px; }
.mcell.mk-known.filled, .mcell.mk-known { background: var(--gold); border-color: #d9a400; }
.part-map .mcell.mk-known.hl { background: var(--cream2); border-color: var(--barn); }
.part-map .mcell.mk-known.hl.filled { background: var(--gold); border-color: #d9a400; transition: background .3s; }
.mcell.mk-new { background: #fff; border-color: var(--barn); }
.mcell.mk-new.glow { background: var(--sky); box-shadow: 0 0 0 2px var(--barn), 0 0 10px var(--barn); animation: glow 1s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 2px var(--barn), 0 0 18px var(--gold); } }
.mcell.celebrate { animation: celebrate .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes celebrate { 0% { transform: scale(.3); background: #fff; } 60% { transform: scale(1.4); background: var(--gold2); } 100% { transform: scale(1); background: var(--gold); } }
.mcell.trouble { box-shadow: inset 0 0 0 2px var(--red); }
.mapbig { grid-column: 1 / -1; display: flex; gap: 2px; flex-wrap: wrap; margin-top: 4px; }
.mapbig .mcell { aspect-ratio: auto; padding: 1px 4px; font-size: .6rem; }
.maphost { display: flex; justify-content: center; }
.startmap { margin: 6px auto 4px; display: flex; justify-content: center; }

/* ---------- the array: dot eggs in two colours, a gold bracket ---------- */
.array { display: inline-flex; align-items: stretch; gap: 10px; margin: 8px auto; text-align: left; color: var(--ink); }
.arraygrid { display: flex; flex-direction: column; gap: 4px; }
.ablock { display: flex; flex-direction: column; gap: 3px; position: relative; padding-right: 8px; }
.arow { display: flex; gap: 3px; align-items: center; }
.frame { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 4px; border: 2px solid var(--wood3); border-radius: 6px; background: #fff; width: max-content; }
.dot { display: inline-block; width: 18px; height: 20px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #e8705a, var(--barn) 60%, #8f2e1c); box-shadow: inset 0 -2px 0 #00000026, 0 1px 0 #00000020; }
.array.compact .dot { width: 12px; height: 14px; }
.ablock.c1 .dot, .dot.c1 { background: radial-gradient(circle at 35% 30%, #e8705a, var(--barn) 60%, #8f2e1c); }
.ablock.c2 .dot, .dot.c2 { background: radial-gradient(circle at 35% 30%, #8ed05c, var(--green2) 60%, var(--green3)); }
.ablock.faded { opacity: .35; }
.ablock.crossed .arow { position: relative; }
.ablock.crossed .arow::after { content: ''; position: absolute; left: -2px; right: 6px; top: 50%; border-top: 3px solid var(--ink); transform: rotate(-4deg); }
.dot.crossed { background: radial-gradient(circle at 35% 30%, #ffb4a6, var(--red) 60%, #8a1f12); position: relative; }
.dot.crossed::after { content: '\00d7'; color: #fff; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.dot.covered { background: var(--wood2); opacity: .6; }
.alabel { font-size: .85rem; font-weight: 700; color: var(--ink); margin-top: 2px; white-space: nowrap; }
.ablock .alabel { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 6px; }
.ablock.c2 .alabel { color: var(--green3); }
.array .ablock { margin-right: 110px; }
.abracket { display: flex; align-items: center; gap: 6px; }
.array.form-half .abracket { align-self: flex-start; height: calc(50% - 6px); }
.bracketline { width: 10px; align-self: stretch; border: 4px solid var(--gold); border-left: none; border-radius: 0 8px 8px 0; box-shadow: 1px 2px 0 #a95f10; }
.brackettotal { font-family: 'Lilita One', Fredoka, sans-serif; font-size: 1.8rem; color: var(--gold); text-shadow: 0 1px 0 #a95f10; }
.array.compact .brackettotal { font-size: 1.3rem; }
.hidden { visibility: hidden; }

/* ---------- the race ---------- */
.screen.race { overflow: hidden; padding: 0; display: block; background: #7ec2e8; }
.layer { position: absolute; left: 0; right: 0; background-repeat: repeat-x; }
.sky { top: 0; height: 100%; background-size: auto 100%; }
.far { bottom: 24%; height: 46%; background-size: auto 100%; background-position: bottom; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48%); mask-image: linear-gradient(to bottom, transparent 0, #000 48%); }
.mid { bottom: 21%; height: 24%; background-size: auto 100%; background-position: bottom; }
.trackg { bottom: 0; height: 26%; background-size: auto 100%; }
.finishline { position: absolute; inset: 0; pointer-events: none; z-index: 4; transform: translateX(46%); opacity: 0; transition: opacity .6s; }
.finishline.in { opacity: 1; }
.coop { position: absolute; bottom: 17%; height: 34%; right: 2%; filter: drop-shadow(0 8px 8px rgba(0,0,0,.3)); }
.finflag { position: absolute; bottom: 24%; right: 20%; z-index: 3; width: 74px; }
.finflag .cloth { width: 64px; height: 44px; border: 2px solid #222; border-radius: 3px; background: repeating-conic-gradient(#1d1d1d 0% 25%, #f5f2ea 0% 50%) 0 0 / 16px 16px; transform: skewY(-6deg); box-shadow: 0 3px 6px #00000047; animation: flagwave 1.6s ease-in-out infinite; }
@keyframes flagwave { 0%,100% { transform: skewY(-6deg) } 50% { transform: skewY(-2deg) scaleX(.96) } }
.finflag .pole { width: 5px; height: 96px; background: linear-gradient(#efe6d2, #b9a888); border-radius: 3px; box-shadow: 2px 2px 3px #00000038; }

.runner { position: absolute; height: 25%; transition: left .45s cubic-bezier(.3,1.4,.5,1); will-change: left, transform; }
.runner img { height: 100%; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0,0,0,.3)); }
.runner.kid { bottom: 11.5%; z-index: 6; }
.runner.champ { bottom: 22%; z-index: 5; height: 19.5%; opacity: .97; }
.jog { animation: jogbob .32s ease-in-out infinite; }
.jog2 { animation: jogbob .36s ease-in-out infinite; animation-delay: .12s; }
@keyframes jogbob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7%) rotate(1.5deg); } }
.runner.hopArc { animation: hopArc var(--hop) ease-out; }
.runner.bigArc { animation: bigArc .62s ease-out; }
.runner.stumbleAnim { animation: stum .7s ease-out; }
@keyframes hopArc { 0% { transform: translateY(0) } 40% { transform: translateY(-46%) scaleY(1.05) } 75% { transform: translateY(6%) scaleY(.92) } 100% { transform: translateY(0) } }
@keyframes bigArc { 0% { transform: translateY(0) } 45% { transform: translateY(-90%) } 80% { transform: translateY(5%) scaleY(.9) } 100% { transform: translateY(0) } }
@keyframes stum { 0% { transform: rotate(0) } 25% { transform: rotate(-14deg) translateY(4%) } 55% { transform: rotate(8deg) } 100% { transform: rotate(0) } }

/* the question sign */
.qsign { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); min-width: 380px; max-width: 92vw; width: auto; text-align: center; padding: 18px 44px 14px; z-index: 8; border-radius: 26px; }
.qsign .prompt { font-family: 'Lilita One', sans-serif; font-size: clamp(52px, 9vw, 88px); line-height: 1.02; color: var(--gold); text-shadow: 0 3px 0 #a95f10; -webkit-text-stroke: 1.5px #7a4a22; min-height: 1.05em; white-space: nowrap; }
.qsign .prompt.blankq { font-size: clamp(40px, 6.6vw, 66px); letter-spacing: .01em; }
.qsign.miss .prompt { color: #fff; -webkit-text-stroke: 2px #a03920; text-shadow: 0 3px 0 var(--barn); font-size: clamp(40px, 6.6vw, 68px); }
.qsign.miss .prompt .ansbig { color: #fff; font-size: 1.25em; }
.qsign.miss .prompt .blankans { font-size: .8em; margin-left: .5em; color: #fff; }
.qsign.miss { background: linear-gradient(#e0553d, var(--barn) 60%, #8f2e1c); border-color: #6b1f10; }
.qsign.practice { background: linear-gradient(#fffaf0, var(--practice) 60%, #e6d8b8); border-color: var(--practice-edge); }
.qsign.practice .prompt { color: var(--practice-ink); -webkit-text-stroke: 0; text-shadow: none; font-size: clamp(40px, 6.6vw, 68px); }
.qsign.practice .prompt .ansbig { color: var(--practice-ink); font-size: 1.25em; }
.qsign.practice .prompt .blankans { font-size: .8em; margin-left: .5em; color: var(--practice-ink); }
.qsign.practice .sub.answerplank { background: linear-gradient(#8a6a3e, #6e5230); border-color: #4e3a20; color: #fff6e0; }
.qsign.miss::after { background: repeating-linear-gradient(90deg, transparent 0 68px, #00000014 68px 72px); }
.qsign.countdown .prompt { color: #fff; }
.race.carded .qsign, .race.carded .qcorner, .race.carded .micwrap { opacity: 0; transition: opacity .3s; }
.qsign .sub { display: inline-block; min-height: 30px; margin-top: 4px; font-family: 'Lilita One', sans-serif; font-size: 20px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); }
.qsign .sub.answerplank { background: linear-gradient(#9c6230, #7a4a22); border: 3px solid #56300f; border-radius: 12px; box-shadow: inset 0 2px 4px #00000047, 0 3px 0 #3d2008; padding: 4px 20px; color: var(--gold2); }
.qsign.miss .sub.answerplank { background: linear-gradient(#6b1f10, #4a1409); border-color: #2d0c05; }
.fuse { height: 15px; border-radius: 8px; background: #00000042; border: 2px solid var(--wood4); margin: 8px auto 2px; overflow: hidden; max-width: 360px; opacity: 0; transition: opacity .2s; }
.fuse.on { opacity: 1; }
.fusefill { height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(#a9dd6d, var(--green)); }
.fusefill.hot { background: linear-gradient(#f77e5a, #d24a2a); animation: hotpulse .5s linear infinite; }
@keyframes hotpulse { 50% { filter: brightness(1.35); opacity: .6; } }
.race.funrun .fuse { display: none; }

/* the corner: label, stars, the strip */
.qcorner { position: absolute; top: 4%; left: 3%; z-index: 8; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.qcorner .racelabel { white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
.striptext { font-size: 0; height: 0; overflow: hidden; }
.progline { position: relative; width: min(340px, 30vw); height: 14px; margin-top: 30px; margin-right: 26px; border-radius: 9px; background: #00000048; border: 2px solid var(--wood4); box-shadow: inset 0 2px 4px #00000038; }
.progline .pfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 7px; background: linear-gradient(#a9dd6d, var(--green)); opacity: .8; transition: width .45s cubic-bezier(.3,1.4,.5,1); }
.progline .pmark { position: absolute; transform: translateX(-50%); pointer-events: none; transition: left .45s cubic-bezier(.3,1.4,.5,1); }
.progline .pmark img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 2px 2px #0006); }
.progline .kidm { height: 38px; top: -28px; z-index: 2; }
.progline .champm { height: 29px; top: -34px; z-index: 1; opacity: .95; }
.progline .pbarn { position: absolute; right: -14px; top: -30px; height: 42px; filter: drop-shadow(0 2px 2px #0006); }
.pausebtn { position: absolute; left: 3%; bottom: 6%; z-index: 9; font-size: 20px; padding: 6px 14px; min-height: 44px; opacity: .85; border-radius: 12px; }

/* the mic */
.micwrap { position: absolute; top: 4%; right: 3%; z-index: 9; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.micframe { width: 74px; height: 74px; border-radius: 18px; background: linear-gradient(var(--wood2), var(--wood) 60%, var(--wood3)); border: 4px solid var(--wood4); box-shadow: 0 5px 0 var(--plankshadow), 0 8px 14px rgba(0,0,0,.3), inset 0 2px 0 #ffffff45; display: flex; align-items: center; justify-content: center; }
.micframe img { height: 52px; transition: transform .15s; }
.micwrap.live .micframe img { transform: scale(1.14); }
.heardchip { min-width: 64px; text-align: center; font-family: 'Lilita One', sans-serif; font-size: 30px; color: #4a2f14; background: linear-gradient(#fbf1da, #eeddba); border: 3px solid #b28a52; border-radius: 14px; padding: 4px 12px; box-shadow: 0 4px 0 #8a663a, 0 6px 8px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s; }
.heardchip.show { opacity: 1; }
.heardchip.bad { color: #a33; }

/* the number row */
.rowmount { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; pointer-events: none; }
.rowmount > * { pointer-events: auto; }
.numrow { position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%); display: flex; gap: clamp(4px, .7vw, 8px); opacity: .55; transition: opacity .25s; max-width: 90vw; flex-wrap: nowrap; }
.numrow.live { opacity: 1; }
.numrow .numkey { font-size: clamp(24px, 3vw, 34px); min-width: clamp(46px, 5.6vw, 72px); padding: 10px 0; background: linear-gradient(#fdf4de, #efdcb4); border-color: #c79a5e; color: #7a4a22; text-shadow: none; box-shadow: 0 5px 0 #a3763e, 0 8px 12px rgba(0,0,0,.2); position: relative; }
.numrow .numaux { font-size: clamp(18px, 2.2vw, 26px); min-width: clamp(42px, 5vw, 64px); padding: 10px 8px; position: relative; }
.numrow .numaux.dontknow { font-size: clamp(14px, 1.6vw, 18px); white-space: nowrap; }
.numrow:not(.live) .wbtn { pointer-events: none; }
.keyhint { position: absolute; right: 4px; top: 2px; font-size: .55rem; opacity: .6; font-family: Fredoka, sans-serif; font-weight: 700; }
.typechip { position: absolute; bottom: 17%; left: 50%; transform: translateX(-50%); font-family: 'Lilita One', sans-serif; font-size: 54px; color: #fff; -webkit-text-stroke: 2px #7a4a22; text-shadow: 0 3px 0 #a95f10; z-index: 9; opacity: 0; transition: opacity .12s; pointer-events: none; }
.typechip.show { opacity: 1; }

/* pops and particles */
.fxhost { position: absolute; inset: 0; pointer-events: none; z-index: 16; }
.pop.fastpop { position: absolute; font-family: 'Lilita One', sans-serif; font-size: clamp(40px, 6.5vw, 64px); color: var(--gold); -webkit-text-stroke: 1.5px #7a2a12; text-shadow: 0 3px 0 var(--barn); transform: translateX(-50%) rotate(-6deg); animation: fastpop 1.6s cubic-bezier(.2,.9,.3,1) forwards; white-space: nowrap; }
@keyframes fastpop { 0% { opacity: 0; transform: translateX(-50%) rotate(-6deg) scale(.2); } 14% { opacity: 1; transform: translateX(-50%) rotate(-6deg) scale(1.25); } 24% { transform: translateX(-50%) rotate(-6deg) scale(1); } 60% { opacity: 1; transform: translateX(-50%) rotate(-6deg) scale(1) translateY(-40%); } 100% { opacity: 0; transform: translateX(-50%) rotate(-6deg) scale(.95) translateY(-130%); } }
.pop.rescuepop { font-size: clamp(26px, 3.4vw, 40px); color: #d7ffb0; -webkit-text-stroke: 1.5px var(--green3); text-shadow: 0 2px 0 #2b5313; animation-duration: 1.9s; }
.ackpop { position: absolute; height: clamp(90px, 14vw, 150px); transform: translateX(-50%); animation: ackpop 1.5s cubic-bezier(.2,.9,.3,1) forwards; filter: drop-shadow(0 4px 0 #00000038); }
@keyframes ackpop { 0% { opacity: 0; transform: translateX(-50%) scale(.2) rotate(-10deg); } 12% { opacity: 1; transform: translateX(-50%) scale(1.2) rotate(4deg); } 22% { transform: translateX(-50%) scale(1) rotate(-2deg); } 65% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0) translateY(-18%); } 100% { opacity: 0; transform: translateX(-50%) scale(.95) translateY(-80%); } }
.pfx { position: absolute; z-index: 15; }
.puff { height: 34px; animation: puff .7s ease-out forwards; }
@keyframes puff { 0% { opacity: .9; transform: scale(.5) } 100% { opacity: 0; transform: scale(1.4) translateY(-14px) } }
.featherfall { height: 26px; animation: ff 1.7s ease-in forwards; }
@keyframes ff { 0% { opacity: 1; transform: translateY(0) rotate(0) } 100% { opacity: 0; transform: translateY(90px) rotate(80deg) } }
.sparkle { height: 30px; animation: spk .9s ease-out forwards; }
@keyframes spk { 0% { opacity: 1; transform: scale(.4) } 60% { opacity: 1; transform: scale(1.15) } 100% { opacity: 0; transform: scale(.9) translateY(-30px) } }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -5%; width: 12px; height: 18px; border-radius: 3px; animation: confall linear forwards; }
.confetti img { position: absolute; top: -8%; height: 36px; animation: confall linear forwards; filter: drop-shadow(0 2px 2px #0004); }
@keyframes confall { to { transform: translateY(118vh) rotate(760deg); } }
.starfly { position: absolute; height: 46px; z-index: 40; transition: all .9s cubic-bezier(.5,-.2,.4,1); pointer-events: none; }

/* cards over the race */
.cardhost { position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 3vmin; overflow: hidden; }
.cardhost.open { display: flex; pointer-events: none; }
.cardhost.open > * { pointer-events: auto; }
.cardhost.blocking { background: #2e1c0a73; pointer-events: auto; }
.cardhost:not(.blocking) { align-items: flex-end; padding-bottom: 20%; }
.card { max-width: 560px; width: min(560px, 92vw); padding: clamp(14px, 2.6vmin, 22px) clamp(16px, 3vmin, 24px); }
.card h1 { font-size: clamp(26px, 4.6vmin, 40px); }
.card h2 { font-size: clamp(20px, 3.6vmin, 30px); }
.card .wbtn.big { font-size: clamp(20px, 3.4vmin, 30px); padding: clamp(8px, 1.6vmin, 14px) clamp(18px, 3.4vmin, 34px); }
.card .wbtn { font-size: clamp(16px, 2.6vmin, 22px); min-height: 44px; padding: 8px 18px; }
.card .row { margin-top: clamp(8px, 1.6vmin, 14px); }
.card .plankline { font-size: clamp(15px, 2.4vmin, 20px); }
.card.confirm { max-width: 520px; }
.confirmchick { height: 90px; filter: drop-shadow(0 4px 0 #00000030); }
.finishcard { width: min(560px, 92vw); }
.finishcard h1 { margin-bottom: 2px; }
.posebig { display: block; height: clamp(70px, 14vmin, 130px); object-fit: contain; margin: 4px auto; filter: drop-shadow(0 6px 0 #00000033); }
.hilite { display: inline-flex; align-items: center; gap: 8px; font-family: 'Lilita One', sans-serif; font-size: 20px; background: linear-gradient(#fdf4de, #efdcb4); color: #7a4a22; border: 3px solid #c79a5e; border-radius: 12px; padding: 6px 16px; margin: 6px 4px; box-shadow: 0 4px 0 #a3763e; }
.hilite img { height: 32px; }
.starladder { display: flex; flex-direction: column; gap: 5px; margin: 8px auto 4px; max-width: 440px; }
.starladder .rung { display: flex; justify-content: space-between; gap: 14px; align-items: center; background: #00000030; border-radius: 10px; padding: 5px 14px; font-family: 'Lilita One', sans-serif; font-size: 17px; color: #f6dfb2aa; text-shadow: none; }
.starladder .rung .st { letter-spacing: 2px; }
.starladder .rung.hit { background: linear-gradient(#8ed05c33, #4c8a2833); color: #ffe9c2; }
.starladder .rung.top { background: linear-gradient(var(--gold2), var(--gold)); color: #5b3a00; text-shadow: none; box-shadow: 0 3px 0 #a95f10; animation: rungGlow .7s ease-in-out infinite alternate; }
@keyframes rungGlow { to { filter: brightness(1.12); } }
.startotal { margin: 4px 0 2px; }
.stars { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.stars img { height: 28px; filter: drop-shadow(0 2px 0 #00000030); transition: filter .3s; }
.stars img.dim { filter: grayscale(1) opacity(.45); }
.actions { margin-top: 6px; }
.eggbtn { font-size: 20px; }
.eggbtn.ready { animation: wiggle .5s ease-in-out 2; }
@keyframes wiggle { 25% { transform: rotate(-3deg) } 75% { transform: rotate(3deg) } }
.pathnote { margin: 4px 0; }
.mastery h2 { margin-top: 6px; }
.celebratemap .map.compact { width: min(100%, 260px); }
.parentcorner { margin-top: 10px; text-align: right; }
.parentcorner a.wrong { font-size: .8rem; color: var(--cream-soft); font-weight: 600; }
.parentcorner textarea.fbtext { width: 100%; font: inherit; font-size: 1rem; padding: 8px 10px; border: 3px solid var(--wood4); border-radius: 12px; background: #fff; color: var(--ink); text-align: left; margin-top: 6px; }
.parentcorner .fbstatus { min-height: 1.2em; }
.roostmoment { text-align: center; color: #fff; }
.roostmoment .crown { font-size: clamp(64px, 12vw, 120px); animation: crowndrop .9s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 6px 0 #00000040); }
@keyframes crowndrop { 0% { transform: translateY(-120px) scale(.4); opacity: 0 } 100% { transform: none; opacity: 1 } }
.roostmoment h1 { font-size: clamp(44px, 8vw, 84px); color: var(--gold); text-shadow: 0 3px 0 #a95f10; }
.roostmoment .posebig { height: clamp(160px, 30vh, 280px); }
.roostmoment .plankline { color: #fff; text-shadow: 0 2px 0 var(--wood4); }

/* the review slideshow and the blank cards */

.revkicker { font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--cream-soft); text-shadow: 0 1px 0 var(--wood4); margin-bottom: 8px; text-transform: none; letter-spacing: 0; }
.reveq { font-family: 'Lilita One', sans-serif; font-size: clamp(44px, 8vw, 80px); line-height: 1.05; color: #fff; -webkit-text-stroke: 2px #a03920; text-shadow: 0 3px 0 var(--barn); margin: 4px 0 8px; display: block; white-space: nowrap; }
.reveq .ansbig { color: #fff; font-size: 1.2em; }
.blankcard .reveq { color: #d7ffb0; -webkit-text-stroke: 2px var(--green3); text-shadow: 0 3px 0 #2b5313; }
.reveq .blankans { display: block; margin-left: 0; margin-top: 2px; font-size: .7em; }
.revbody { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.revbody .array, .blankcard .array, .saycard .array, .astage .array { display: inline-flex; justify-content: center; background: linear-gradient(var(--cream), var(--cream2)); border-radius: 14px; padding: 8px 14px; border: 3px solid #d9b98a; }
.saycard .array, .astage .array { background: #fff; border-color: #e8d4b0; }
.revbody .arraygrid, .blankcard .arraygrid, .saycard .arraygrid, .astage .arraygrid { align-items: flex-start; }
.revchick { height: 110px; object-fit: contain; filter: drop-shadow(0 5px 0 #00000030); }
.revdots { margin-top: 10px; }
.prompt-next h2 { margin-top: 6px; }

/* ---------- the egg page ---------- */
.eggwrap { width: min(960px, 95vw); max-width: none; }
.clutch { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 14px 0; }
.eggcard { width: 128px; padding: 10px 8px 8px; border-radius: 16px; background: linear-gradient(#fdf4de, #f3e2ba); border: 4px solid #e2c791; box-shadow: 0 4px 0 #c79a5e40; cursor: pointer; font-family: inherit; }
.eggcard img { height: 92px; object-fit: contain; filter: drop-shadow(0 5px 0 #00000026); }
.eggcard .hint { font-size: 12px; color: #8a6335; font-weight: 700; line-height: 1.2; margin-top: 5px; }
.eggcard.sel { border-color: var(--gold); box-shadow: 0 0 0 3px #ffc93c66, 0 4px 0 #c79a5e40; }
.smashstage { position: relative; height: 300px; display: flex; align-items: center; justify-content: center; }
.smashstage img.theegg { height: 230px; transition: transform .1s; filter: drop-shadow(0 8px 0 #00000030); }
.smashstage img.hammer { position: absolute; height: 160px; right: 10%; top: 2%; transform-origin: 85% 85%; transform: rotate(20deg); filter: drop-shadow(0 6px 0 #00000030); }
.swing { animation: swing .3s ease-in; }
@keyframes swing { 0% { transform: rotate(20deg) } 55% { transform: rotate(-72deg) } 100% { transform: rotate(20deg) } }
.shake1 { animation: shk .25s; } .shake2 { animation: shk .32s; }
@keyframes shk { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-7px) rotate(-2deg) } 65% { transform: translateX(7px) rotate(2deg) } }
.crackline { position: absolute; color: #4a2f14; font-weight: 800; font-size: 60px; opacity: .8; pointer-events: none; }
.revealchick { height: 240px; animation: popin .5s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 8px 0 #00000030); }
@keyframes popin { 0% { transform: scale(.2); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.tapzone { cursor: pointer; }

/* ---------- My stuff ---------- */
.trophywrap { width: min(1000px, 95vw); max-width: none; text-align: left; }
.trophywrap h1 { text-align: center; }
.tsec { margin: 12px 0; }
.tsec h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.bigstars { font-family: 'Lilita One', sans-serif; font-size: 48px; color: var(--gold); text-shadow: 0 2px 0 #a95f10; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bigstars img { height: 54px; filter: drop-shadow(0 3px 0 #00000040); }
.bigstars .next { font-size: 18px; color: var(--cream-soft); text-shadow: 0 1px 0 var(--wood4); }
.factbars .frow { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.factbars .nm { flex: 0 0 150px; font-family: 'Lilita One', sans-serif; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bar { flex: 1; height: 22px; background: #00000040; border-radius: 12px; overflow: hidden; border: 2px solid var(--wood4); display: flex; }
.bar i { display: block; height: 100%; }
.bar i.full { background: linear-gradient(var(--gold2), var(--gold)); border-radius: 10px 0 0 10px; box-shadow: inset 0 -3px 0 #d99a17; }
.bar i.half { background: linear-gradient(#ffedb3, #f5d77a); opacity: .75; border-radius: 0 10px 10px 0; box-shadow: inset 0 -3px 0 #d9b45a; }
.factbars .pct { flex: 0 0 56px; text-align: right; color: var(--gold); font-family: 'Lilita One', sans-serif; font-size: 20px; text-shadow: 0 1px 0 #a95f10; }
.factbars .pct img { height: 30px; filter: drop-shadow(0 2px 0 #00000040); }
.newchip { display: inline-block; background: var(--gold); color: #5b3a00; font-family: 'Lilita One', sans-serif; font-size: 12px; padding: 2px 9px; border-radius: 12px; box-shadow: 0 2px 0 #a95f10; }
.bragline { color: var(--cream-soft); font-size: 19px; margin: 2px 0 10px; font-family: 'Lilita One', sans-serif; text-shadow: 0 1px 0 var(--wood4); }
.crownrow { display: flex; gap: 10px; flex-wrap: wrap; }
.crownchip { font-family: 'Lilita One', sans-serif; font-size: 18px; background: linear-gradient(var(--gold2), var(--gold)); color: #5b3a00; padding: 6px 14px; border-radius: 12px; box-shadow: 0 3px 0 #a95f10; }
.trophymap { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.trophymap .map { width: min(100%, 320px); margin: 0; }
.trophymap .factbars { flex: 1 1 360px; }

/* ---------- practice ---------- */
.practicewrap { width: min(980px, 94vw); max-width: none; }
.psub { font-weight: 700; color: var(--cream-soft); font-size: 18px; margin: 2px 0 12px; }
.pgroup { text-align: left; margin: 10px 0; }
.pgroup h2 { font-size: 22px; }
.ptables, .tablegrid { display: flex; flex-wrap: wrap; gap: 12px; }
.tablecard, .ptable { width: clamp(108px, 12vw, 136px); padding: 10px 8px 12px; border-radius: 16px; cursor: pointer; background: linear-gradient(#fdf4de, #f3e2ba); border: 4px solid #e2c791; box-shadow: 0 5px 0 #b48a4a; font-family: Fredoka, sans-serif; color: #7a4a22; text-align: center; transition: transform .06s, box-shadow .06s; display: flex; flex-direction: column; align-items: stretch; gap: 4px; position: relative; }
.tablecard:active, .ptable:active { transform: translateY(3px); box-shadow: 0 2px 0 #b48a4a; }
.tablecard.gold { border-color: var(--gold); background: linear-gradient(#fff6d6, #ffe7a3); }
.tablecard .tname, .plabel { font-family: 'Lilita One', sans-serif; font-size: 34px; line-height: 1; color: #5c3a1a; }
.tablecard.named .tname { font-size: 20px; padding: 7px 0; }
.tablecard .tsub, .pprog { font-size: 13px; font-weight: 700; opacity: .9; }
.tablecard .bar { height: 14px; }
.empty { color: var(--cream-soft); font-weight: 700; }

/* ---------- setup and placement (grown-up screens in the game's look) ---------- */
.tracks { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.trackbtn { display: flex; flex-direction: column; min-width: 260px; padding: 16px 20px; }
.trackname { font-size: 1.25rem; }
.trackline { font-family: Fredoka, sans-serif; font-size: .9rem; font-weight: 600; opacity: .9; text-shadow: none; }
.startgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; text-align: left; }
@media (max-width: 760px) { .startgrid { grid-template-columns: 1fr; } }
.perches { display: flex; flex-direction: column; gap: 4px; }
.perch { font: inherit; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; border: 2px solid #d9b98a; background: linear-gradient(#fdf4de, #f3e2ba); color: #7a4a22; cursor: pointer; text-align: left; }
.perch.mk-know { background: linear-gradient(var(--gold2), var(--gold)); border-color: #d9a400; color: #5b3a00; }
.perch.start { border-color: var(--barn); background: #fff; box-shadow: 0 0 0 2px var(--barn) inset; }
.perch.mk-learning { background: var(--gold2); }
.perchname { font-weight: 800; }
.perchmark { font-size: .85rem; }
.finetune { background: linear-gradient(var(--cream), var(--cream2)); border-radius: 12px; padding: 6px 10px; color: var(--ink); }
.finerow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #d9b98a; }
.finename { font-weight: 800; }
.seg { display: inline-flex; border: 2px solid var(--wood3); border-radius: 10px; overflow: hidden; }
.segbtn { font: inherit; font-size: .85rem; padding: 4px 8px; background: #fff; border: none; cursor: pointer; color: var(--ink); }
.segbtn.on { background: var(--gold); font-weight: 800; }
.notsure { color: var(--cream-soft); font-weight: 700; }
.racesaday { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.racesbtn { min-width: 64px; font-size: 26px; }
.goalnote { margin-top: 4px; }
.roostdoor .plank { max-width: 520px; }
.pinline { font-weight: 600; }

/* ---------- sign-in ---------- */
.signin.busy { opacity: .6; pointer-events: none; }
.signin .sub { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; font-size: .95rem; font-weight: 600; }
.signin .sub input { width: 20px; height: 20px; accent-color: var(--green2); }
.googlebtn { width: 100%; max-width: 380px; background: #fff; color: #3a2415; text-shadow: none; border-color: #c79a5e; box-shadow: 0 6px 0 #a3763e, 0 10px 16px rgba(0,0,0,.2); font-family: Fredoka, sans-serif; font-weight: 700; font-size: 20px; }
.gmark { display: inline-block; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; background: var(--barn); color: #fff; font-family: 'Lilita One', Fredoka, sans-serif; font-size: 1.15rem; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; max-width: 380px; margin: 10px auto; color: var(--cream-soft); font-size: .9rem; font-weight: 700; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 2px solid #ffffff40; }
.homescreen { background: linear-gradient(var(--gold2), var(--gold)); color: #5b3a00; border: 3px solid var(--wood4); border-radius: 14px; padding: 12px 16px; margin: 14px 0; text-align: center; }
.homescreen h2 { font-size: 1.3rem; color: #5b3a00; text-shadow: none; }
.homescreen p { color: #5b3a00; }
.homescreen.overlay { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(92vw, 520px); box-shadow: 0 6px 0 var(--wood4); z-index: 40; }
.signin .welcomechick, .grownup .welcomechick { height: 110px; filter: drop-shadow(0 5px 0 #00000030); }

/* ---------- the empty state ---------- */
.emptystate .posebig { height: 140px; }

@media (max-width: 700px) {
  .qsign { min-width: 260px; padding: 14px 22px 12px; }
  .numrow { gap: 4px; }
  .numrow .numkey { font-size: 24px; min-width: 40px; }
  .numrow .numaux { font-size: 18px; min-width: 40px; }
  .plank { padding: 18px 16px; }
  .micframe { width: 56px; height: 56px; } .micframe img { height: 38px; }
  .heardchip { font-size: 24px; }
  .progline { width: 36vw; }
  .wbtn.big { font-size: 24px; padding: 12px 22px; }
}
@media (max-height: 560px) {
  .qsign .prompt { font-size: clamp(36px, 7vh, 60px); }
  .posebig { height: 90px; }
}

/* the finish card's parts, compact (they sit inside .card's screen-based sizes) */
.card .hilite { font-size: clamp(14px, 2.3vmin, 19px); padding: 4px 12px; margin: 4px 3px; }
.card .hilite img { height: 1.4em; }
.card .starladder { max-width: 380px; gap: 4px; margin: 6px auto 2px; }
.card .starladder .rung { font-size: clamp(13px, 2.1vmin, 16px); padding: 3px 12px; }
.card .stars img { height: clamp(18px, 3vmin, 26px); }
.card .startotal { margin: 2px 0; }
.card .reveq { font-size: clamp(36px, 7vmin, 68px); }
.card .revchick { height: clamp(60px, 11vmin, 100px); }
.card .revkicker { font-size: clamp(14px, 2.3vmin, 18px); }
.card .eggbtn { font-size: clamp(15px, 2.4vmin, 19px); }
.card .celebratemap .map.compact { width: min(100%, 200px); }
.card .confirmchick { height: clamp(56px, 10vmin, 86px); }
.roostmoment .posebig { height: clamp(120px, 26vmin, 240px); }
@media (max-width: 900px) { .numrow { left: calc(50% + 26px); } }

/* My stuff: the hatched chickens wrap onto as many rows as they need; the eggs are counted */
.trophywrap .lineup { display: flex; flex-wrap: wrap; }
.trophywrap .lineup .chick { width: 104px; flex: 0 0 auto; }
.trophywrap .lineup .chick img { height: 74px; }

/* the new-fact cards: Chicken Run's green banner, on the race screen before the countdown */
.introcard { width: auto; min-width: min(420px, 90vw); background: linear-gradient(#8ed05c, var(--green) 60%, var(--green2)); border: 5px solid var(--green3); border-radius: 22px; box-shadow: 0 8px 0 #2b5313, 0 14px 24px rgba(0,0,0,.3); color: #fff; text-align: center; max-width: 560px; }
.introkick { font-family: 'Lilita One', sans-serif; font-size: clamp(20px, 3.4vmin, 28px); color: #fff; text-shadow: 0 2px 0 #3a6c1e; }
.introstone { font-family: 'Lilita One', sans-serif; font-size: clamp(15px, 2.4vmin, 19px); color: #ffe9c2; text-shadow: 0 1px 0 #3a6c1e; margin-top: 2px; }
.introeq { font-family: 'Lilita One', sans-serif; font-size: clamp(42px, 8vmin, 72px); line-height: 1.05; margin: 8px 0 6px; padding: 6px 18px; background: #fffefaf0; color: var(--ink); border-radius: 16px; display: inline-block; box-shadow: 0 4px 0 #00000026; white-space: nowrap; }
.introeq .ansbig { color: var(--barn); -webkit-text-stroke: 0; text-shadow: none; font-size: 1.1em; }
.introbody { display: flex; align-items: center; justify-content: center; gap: 16px; }
.introbody .array { background: #fffefaf0; border-radius: 14px; padding: 8px 14px; }
.introchick { height: clamp(60px, 11vmin, 100px); filter: drop-shadow(0 4px 0 #00000030); }
.introcard .saysub { color: #fff; text-shadow: 0 1px 0 #3a6c1e; }
.introcard .saysub.hearing { color: #ffe27a; }

/* the missed facts on the finish card: one row per fact with a box to tick; the doors open when every box is ticked */
.missed { margin: 8px auto 2px; max-width: 460px; }
.missedhead { font-family: 'Lilita One', sans-serif; font-size: clamp(15px, 2.4vmin, 19px); color: var(--cream-soft); text-shadow: 0 1px 0 var(--wood4); margin-bottom: 6px; }
.missedhead.done { color: #d7ffb0; }
.missedlist { display: grid; grid-template-columns: 1fr; gap: 6px; }
.missedlist.two { grid-template-columns: 1fr 1fr; }
.missrow { display: flex; align-items: center; gap: 12px; width: 100%; font: inherit; cursor: pointer; text-align: left; padding: 6px 14px; border-radius: 12px; border: 3px solid var(--practice-edge); background: linear-gradient(#fffaf0, var(--practice) 60%, #e6d8b8); box-shadow: 0 3px 0 #8a6a3e; transition: background .2s, border-color .2s; }
.missrow.on { background: linear-gradient(#8ed05c, var(--green) 60%, var(--green2)); border-color: var(--green3); box-shadow: 0 3px 0 #2b5313; }
.misseq { font-family: 'Lilita One', sans-serif; font-size: clamp(22px, 3.8vmin, 32px); color: var(--practice-ink); text-shadow: none; white-space: nowrap; }
.missrow.on .misseq { color: #fff; text-shadow: none; }
.misseq .ansbig { color: inherit; -webkit-text-stroke: 0; text-shadow: inherit; font-size: 1.1em; }
.misseq .blankans { font-size: .8em; margin-left: .3em; }
.misscheck { flex: 0 0 auto; width: clamp(26px, 4.2vmin, 34px); height: clamp(26px, 4.2vmin, 34px); border-radius: 8px; background: #fffdf6; border: 3px solid #56300f; box-shadow: inset 0 2px 3px #00000030; display: inline-flex; align-items: center; justify-content: center; }
.misscheck.on::after { content: '✓'; font-family: 'Lilita One', sans-serif; font-size: 1.3em; color: var(--green3); line-height: 1; }

/* the finish card with misses (stage 4f): wide, the race on the left, the facts to practice on the right in large type */
.card.finishcard.withmissed { width: min(1000px, 94vw); max-width: none; }
.finbody { display: flex; align-items: stretch; gap: clamp(14px, 2.6vmin, 28px); margin-top: 4px; }
.finleft { flex: 0 0 auto; width: min(380px, 40%); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.withmissed .missed { flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; display: flex; flex-direction: column; justify-content: center; background: #00000024; border-radius: 18px; padding: clamp(10px, 2vmin, 18px); }
.missedtitle { font-family: 'Lilita One', sans-serif; font-size: clamp(22px, 3.8vmin, 32px); color: #fff; text-shadow: 0 2px 0 var(--wood4); }
.withmissed .missedlist { gap: clamp(8px, 1.4vmin, 12px); }
.missedlist.three { grid-template-columns: 1fr 1fr 1fr; }
.withmissed .missrow { min-width: 0; padding: clamp(8px, 1.6vmin, 14px) clamp(12px, 2vmin, 18px); justify-content: flex-start; }
.withmissed .misseq { font-size: clamp(32px, 6.4vmin, 56px); }
.withmissed .missedlist.two .misseq { font-size: clamp(28px, 5vmin, 44px); }
.withmissed .missedlist.three .misseq { font-size: clamp(22px, 3.8vmin, 34px); }
.withmissed .misscheck { width: clamp(32px, 5.4vmin, 46px); height: clamp(32px, 5.4vmin, 46px); }
.withmissed .missedlist.three .misscheck { width: clamp(24px, 3.8vmin, 32px); height: clamp(24px, 3.8vmin, 32px); }
@media (max-aspect-ratio: 4/5) { .finbody { flex-direction: column; } .finleft { width: 100%; } }

/* missing numbers (stage 4h): the blank is a box, empty as a question, the answer inside once shown */
.ansbox { display: inline-flex; align-items: center; justify-content: center; min-width: 1.15em; height: 1.05em; margin: 0 .12em; padding: 0 .12em; border: .07em solid currentColor; border-radius: .16em; vertical-align: -.08em; line-height: 1; }
.ansbox.empty { background: #ffffff38; border-style: dashed; }
.ansbox .ansbig { font-size: .9em; }
.qsign .prompt .ansbox { border-color: #a95f10; background: #fff6d9; color: var(--ink); text-shadow: none; -webkit-text-stroke: 0; }
.qsign .prompt .ansbox.empty { border-color: #a95f10; background: #fff6d955; }
.qsign.miss .prompt .ansbox { background: #fff; color: var(--barn); border-color: #fff; }
.qsign.practice .prompt .ansbox { background: #fff; border-color: var(--practice-edge); }
.blankeq .ansbox { border-color: var(--green3); }
.blankeq .ansbox.empty { background: #e9f7dc; }
.blankeq .ansbox.filled { background: var(--gold2); border-style: solid; animation: popin .4s cubic-bezier(.3,1.6,.5,1); }
.blankwords { font-family: 'Lilita One', sans-serif; font-size: clamp(18px, 3vmin, 26px); color: #fff; text-shadow: 0 1px 0 #3a6c1e; margin: 2px 0 4px; }
.misseq .ansbox, .reveq .ansbox { border-color: currentColor; }

/* the start screen's hammer (stage 4i): the hammer, its ten star slots filling, the total */
.startwrap .hammerpanel { margin-top: 10px; width: 100%; box-sizing: border-box; justify-content: center; min-width: 0; }
.hammerpanel .hammerimg { height: 52px; }
.hammerpanel.ready .hammerimg { animation: wiggle .5s ease-in-out 3; }
.hslots { display: flex; gap: 4px; flex-wrap: nowrap; }
.hslots img { height: 30px; filter: drop-shadow(0 2px 0 #00000040); }
.hslots img.dim { filter: grayscale(1) opacity(.4); }
.hammerpanel .hcount { font-size: 24px; margin-left: 6px; white-space: nowrap; }
.earnedline { font-size: clamp(16px, 2.6vmin, 22px); }
.earnedline.fast { background: linear-gradient(#fff3b0, var(--gold)); }
.sub .sayagain { margin-left: 8px; vertical-align: middle; }
.taphint { margin: -4px 0 8px; }
/* the new-fact cards, stage 4j: no eggs; the rule card; Learn this */
.introcard .learnrow { margin-top: 10px; }
.introcard .learnbtn { background: linear-gradient(#fffaf0, #f1e4c6); color: var(--ink); border-color: #b8996a; }
.rulebig { font-family: 'Lilita One', sans-serif; color: #fff; text-shadow: 0 1px 0 #3a6c1e; font-size: clamp(22px, 3.8vmin, 32px); line-height: 1.2; max-width: 520px; margin: 6px auto 4px; }
.learncard { max-width: 520px; }
/* My stuff, stage 4l: the grid is the picture; table chips under it; the star total beside the title; tap a chicken to race as her */
.trophywrap h1 .titlestars { display: inline-flex; align-items: center; gap: 4px; margin-left: 14px; font-size: .7em; color: var(--gold); text-shadow: 0 2px 0 #a95f10; vertical-align: middle; }
.trophywrap h1 .titlestars img { height: 1.1em; }
.trophywrap .trophymap { justify-content: center; }
.trophywrap .trophymap .map { width: min(100%, 440px); }
.plank .tray .mcell.head, .plank .tray .mcell.corner { color: var(--ink); font-size: 1.05em; }
.tablechips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.tchip { font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--ink); background: linear-gradient(#fffaf0, #f1e4c6); border: 3px solid #b8996a; border-radius: 14px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 6px; }
.tchip.now { border-color: var(--green3); box-shadow: 0 0 0 3px #6fb64355; }
.tchip.gold { background: linear-gradient(#fff3b0, var(--gold)); border-color: #a95f10; }
.tchip .medal { font-size: 1.15em; }
.trophywrap .lineup button.chick { cursor: pointer; font: inherit; }
.introcard .because { font-family: 'Lilita One', sans-serif; font-size: clamp(18px, 3vmin, 26px); color: #fff; text-shadow: 0 1px 0 #3a6c1e; margin: 0 0 4px; }
.starbadge .hudhammer { height: 26px; margin-right: 2px; }

/* the egg page (stage 4e): it scrolls, so the eggs stay big enough to see; the heading stays put at the top */
.screen.scrolls { overflow-y: auto; justify-content: flex-start; padding-top: 0; -webkit-overflow-scrolling: touch; }
.screen.scrolls::before { position: fixed; }
.egghead { position: sticky; top: 0; z-index: 3; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 10px; background: linear-gradient(#5cb1e6 70%, #5cb1e600); }
.egghead h1 { margin: 0; }
.egghead .wbtn { margin-top: 4px; }
.eggs .eggwrap { width: 100%; max-width: 1180px; box-sizing: border-box; margin-bottom: 40px; }
.eggs .clutch { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 6px 0; }
.eggs .eggcard { position: relative; width: auto; padding: 14px 10px 12px; border-width: 4px; transition: transform .12s; }
.eggs .eggcard:hover { transform: translateY(-3px); }
.eggs .eggcard img { height: 150px; width: 100%; object-fit: contain; }
.eggs .eggcard .hint { font-size: 14px; line-height: 1.25; margin-top: 8px; }
.eggcard.fav { border-color: var(--gold); }
.favstar { position: absolute; top: 6px; right: 8px; font-size: 26px; color: var(--gold); text-shadow: 0 1px 0 #a8741f; z-index: 2; }
.eggpop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: #1b2b3c99; }
.eggdetail { display: flex; align-items: center; gap: 32px; max-width: 820px; width: auto; padding: 28px 34px; animation: popin .3s cubic-bezier(.3,1.6,.5,1); }
.eggbig { display: flex; flex-direction: column; align-items: center; background: linear-gradient(#fdf4de, #f3e2ba); border: 4px solid #e2c791; border-radius: 20px; padding: 18px 24px; }
.eggbig img { height: 300px; object-fit: contain; filter: drop-shadow(0 8px 0 #00000030); }
.eggbig .hint { font-size: 18px; color: #8a6335; font-weight: 700; margin-top: 10px; max-width: 280px; }
.eggchoices { display: flex; flex-direction: column; gap: 14px; min-width: 240px; }
.eggchoices .wbtn { width: 100%; }
.favbtn.on { background: linear-gradient(#ffe08a, #ffc93c); color: #6b4511; }
@media (max-width: 640px) { .eggdetail { flex-direction: column; gap: 16px; } .eggbig img { height: 200px; } }
.screen.scrolls > .backbtn { position: fixed; z-index: 4; }

/* My chart (stage 4m): NumberViz's "My chart" in the Roost's wood and cream. Roosted gold, learning green, not yet an outlined
   cream, the mirror half striped; the summary bar and counts on top; Learning now and Practice these beside the grid. */
.trophywrap { width: min(1180px, 96vw); }
.chartsum { display: flex; align-items: center; gap: 24px; padding: 12px 20px; margin-bottom: 12px; }
.sumleft { flex: 1 1 auto; min-width: 0; }
.sumline { font-family: 'Lilita One', sans-serif; font-size: 22px; color: var(--ink); }
.sumline b { color: #c07a12; }
.sumbar { height: 14px; border-radius: 8px; background: #e6d6b4; margin-top: 8px; overflow: hidden; box-shadow: inset 0 2px 3px #0000002a; }
.sumfill { height: 100%; border-radius: 8px; background: linear-gradient(#ffe27a, var(--gold)); }
.sumcounts { display: flex; gap: 22px; }
.scount { display: flex; flex-direction: column; align-items: center; font-family: 'Lilita One', sans-serif; }
.scount b { font-size: 34px; line-height: 1; }
.scount span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8a6335; }
.scount.roosted b { color: #c07a12; } .scount.learning b { color: var(--green2); } .scount.notyet b { color: #b8996a; }
.chartbody { display: flex; gap: 16px; align-items: stretch; }
.chartside { flex: 0 0 250px; display: flex; flex-direction: column; gap: 12px; }
.listbox { background: #00000022; border-radius: 16px; padding: 10px 12px; }
.listbox h3 { margin: 0 0 8px; font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); }
.listbox .empty { margin: 0; color: var(--cream-soft); font-size: 14px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { font-family: 'Lilita One', sans-serif; font-size: 17px; padding: 3px 10px; border-radius: 10px; color: var(--ink); white-space: nowrap; }
.fchip.learning { background: #d9f2c4; border: 2px solid var(--green2); }
.fchip.practice { background: var(--practice); border: 2px solid var(--practice-edge); }
.fchip.trouble { border-color: #c4452c; }
.fchip.more { background: transparent; color: var(--cream-soft); }
.legend { display: flex; flex-direction: column; gap: 6px; color: var(--cream-text); font-size: 13.5px; font-weight: 700; margin-top: auto; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 22px; height: 16px; border-radius: 5px; display: inline-block; flex: 0 0 auto; }
.chartmain { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; padding: 14px; min-width: 0; }
.fchart { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 5px; width: min(100%, 620px); }
.fc { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-family: 'Lilita One', sans-serif; font-size: clamp(13px, 2.2vw, 19px); }
.fc.corner { color: var(--ink); font-size: 20px; }
.fc.head { border-radius: 50%; background: linear-gradient(var(--wood2), var(--wood)); color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); box-shadow: 0 2px 0 var(--wood4); }
.fc.roosted, .sw.roosted { background: linear-gradient(#ffe27a, var(--gold)); color: #5b3a00; box-shadow: 0 2px 0 #a95f10; }
.fc.learning, .sw.learning { background: #d9f2c4; color: var(--green3); border: 2px solid var(--green2); }
.fc.notyet, .sw.notyet { background: #fffaf0; color: #b8996a; border: 2px solid #d9c49c; }
.fc.mirror, .sw.mirror { background: repeating-linear-gradient(135deg, #b8996a33 0 3px, transparent 3px 8px) !important; border: 2px dashed #c9b083 !important; box-shadow: none !important; color: #b8996a !important; font-size: .82em; transform: scale(.86); }
.fc.roosted.mirror { background: repeating-linear-gradient(135deg, #ffc93c66 0 3px, transparent 3px 8px) !important; border-color: #e0a92e !important; color: #b07a12 !important; }
.fc.learning.mirror { background: repeating-linear-gradient(135deg, #6fb64340 0 3px, transparent 3px 8px) !important; border-color: #8cc56a !important; color: #4c8a28 !important; }
.sw.mirror { transform: none; }
.fc:not(.mirror):not(.head):not(.corner) { box-shadow: 0 3px 0 #00000026; }
.fc.notyet:not(.mirror) { border-width: 2.5px; }
.charttitle { font-family: 'Lilita One', sans-serif; font-size: 18px; color: #8a6335; margin-bottom: 8px; }
.bigrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.biglabel { font-family: 'Lilita One', sans-serif; font-size: 15px; color: #8a6335; margin-right: 6px; }
.fbig { font-family: 'Lilita One', sans-serif; font-size: 14px; padding: 4px 8px; border-radius: 9px; }
.fbig.roosted { background: linear-gradient(#ffe27a, var(--gold)); color: #5b3a00; box-shadow: 0 2px 0 #a95f10; }
.fbig.learning { background: #d9f2c4; color: var(--green3); border: 2px solid var(--green2); }
.fbig.notyet { background: #fffaf0; color: #b8996a; border: 2px solid #d9c49c; }
.chartnote { margin: 10px 0 0; font-size: 13px; color: #8a6335; font-weight: 700; text-align: center; }
.charts { display: flex; flex-direction: column; gap: 18px; }
.screen.trophy.scrolls { padding-top: 70px; }
.screen.trophy.scrolls .trophywrap { margin-bottom: 40px; }
@media (max-width: 760px) { .chartbody { flex-direction: column; } .chartside { flex: 0 0 auto; } }
@media (max-width: 560px) { .chartsum { flex-wrap: wrap; gap: 10px; } .chartsum .sumleft { flex: 1 1 100%; } .sumcounts { flex: 1 1 100%; justify-content: space-around; } }

/* stage 4p: the gate on the name screen; the first-ever egg as the one big button */
.trackpick { display: flex; gap: 12px; justify-content: center; margin: 12px 0 4px; flex-wrap: wrap; }
.trackopt { font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 210px; padding: 12px 16px; border-radius: 16px; border: 4px solid #e2c791; background: linear-gradient(#fdf4de, #f3e2ba); color: var(--ink); box-shadow: 0 4px 0 #c79a5e40; }
.trackopt .trackname { font-family: 'Lilita One', sans-serif; font-size: 20px; }
.trackopt .trackline { font-size: 13px; font-weight: 700; color: #8a6335; }
.trackopt.on { border-color: var(--green3); background: linear-gradient(#e6f6d6, #c9eaa9); box-shadow: 0 0 0 3px #6fb64366, 0 4px 0 #2b531340; }
.finishcard .eggbtn.firstegg { font-size: clamp(20px, 3.4vmin, 28px); padding: 12px 26px; }

/* "Learn this" lessons (stage 4q): the 5s first */
.lessoncard { max-width: 640px; width: min(640px, 94vw); }
.lessoncard h1 { margin: 2px 0 6px; }
.lkick { font-family: 'Lilita One', sans-serif; font-size: 15px; color: var(--cream-soft); letter-spacing: .03em; }
.lline { font-family: 'Lilita One', sans-serif; font-size: clamp(17px, 2.8vmin, 22px); color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); margin: 4px 0 10px; }
.lline.good { color: #d7ffb0; }
.leggs { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 30px; margin: 6px 0; }
.leggrow { display: flex; gap: 4px; background: #fdf4dedd; border-radius: 10px; padding: 4px 8px; }
.leggrow.pop { animation: popin .35s cubic-bezier(.3,1.6,.5,1); }
.lcount { font-family: 'Lilita One', sans-serif; font-size: 22px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); }
.lcount .ansbig { color: var(--gold); }
.lskip { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.lskip span { font-family: 'Lilita One', sans-serif; background: var(--gold2); color: #5b3a00; border-radius: 10px; padding: 2px 10px; }
.ltrick { background: #fffefaf0; color: var(--ink); border-radius: 16px; padding: 12px 18px; margin: 8px auto; max-width: 440px; }
.ltrick .tline { font-family: 'Lilita One', sans-serif; font-size: clamp(20px, 3.4vmin, 28px); margin: 4px 0; }
.ltrick .tline.big { font-size: clamp(28px, 5vmin, 42px); }
.ltrick .tline b { color: #c07a12; }
.lbar { display: flex; height: 26px; border-radius: 10px; overflow: hidden; border: 2px solid #b8996a; margin: 6px 0; }
.lbar .half { flex: 1; display: flex; align-items: center; justify-content: center; font-family: 'Lilita One', sans-serif; font-size: 15px; background: #f1e4c6; color: #8a6335; }
.lbar .half.on { background: linear-gradient(#ffe27a, var(--gold)); color: #5b3a00; border-right: 2px dashed #a95f10; }
.lpattern { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.lcol { background: #fffefaf0; border-radius: 14px; padding: 8px 14px; font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--ink); text-align: left; }
.lrow { display: flex; gap: 8px; } .lrow.hidden { visibility: hidden; }
.lrow .lq { width: 64px; color: #8a6335; }
.last.five { color: #c07a12; background: #ffe27a; border-radius: 4px; padding: 0 2px; } .last.zero { color: var(--green3); background: #d9f2c4; border-radius: 4px; padding: 0 2px; }
.lask { min-width: 220px; }
.lchoice { min-width: 70px; } .lchoice.nope { opacity: .45; }
.lhint { font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--gold2); margin: 4px 0; }
.lblank.filled { color: var(--barn); animation: popin .35s cubic-bezier(.3,1.6,.5,1); }
.lexit { display: inline-block; margin-top: 10px; color: var(--cream-soft); font-size: 14px; }

/* the 5s lesson, screen 3: the skip-count track, then the last digits lit */
.ltrack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 460px; margin: 6px auto 10px; }
.lslot { height: 54px; border-radius: 14px; border: 3px dashed #e2c791; background: #fdf4de55; display: flex; align-items: center; justify-content: center; }
.lslot.on { border-style: solid; background: #fffefa; animation: popin .3s cubic-bezier(.3,1.6,.5,1); }
.lslot .lnum { font-family: 'Lilita One', sans-serif; font-size: 26px; color: var(--ink); }
.ltrack.mark-last.lit .last { color: #fff; background: var(--barn); border-radius: 6px; padding: 0 4px; margin-left: 1px; }
.ltrack.mark-last.lit .lslot:nth-child(even) .last { background: var(--green2); }
.ltrack.mark-evenmatch.lit .lslot.match .last { color: #fff; background: var(--green2); border-radius: 6px; padding: 0 4px; margin-left: 1px; }
.ltrack.mark-evenmatch.lit .lslot.match { border-color: var(--green2); }
.ltrack.mark-whole.lit .lslot, .ltrack.mark-digitsum.lit .lslot, .ltrack.mark-gaps.lit .lslot { border-color: var(--gold); }

/* stage 4r: the other tables */
.lslot { flex-direction: column; height: 62px; }
.lsub { font-family: 'Lilita One', sans-serif; font-size: 12px; color: #8a6335; line-height: 1; min-height: 12px; }
.lsub:empty { display: none; }
.lsquare { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.lsquare .leggrow { padding: 2px 6px; }
.lsquare.small .dot { width: 12px; height: 14px; }
.ltrick .zero { color: #fff; background: var(--green2); border-radius: 6px; padding: 0 4px; }

/* stage 4s: the table in focus on the card that opens a new step */
.focusbox .fchart.focus, .overviewcard .fchart.focus { width: min(100%, 380px); gap: 3px; margin: 8px auto 6px; background: #fffefaf0; border-radius: 14px; padding: 8px; box-sizing: border-box; }
.fchart.focus .fc { font-size: clamp(10px, 1.6vmin, 15px); border-radius: 6px; }
.fchart.focus .fc.head { box-shadow: none; font-size: 12px; }
.fchart.focus .fc.head.hl { background: linear-gradient(#8ed05c, var(--green2)); }
.fchart.focus .fc.off { background: #e8dcc0; opacity: .35; border: none; }
.fchart.focus .fc.now:not(.mirror) { animation: nowpulse 1.4s ease-in-out infinite; }
@keyframes nowpulse { 50% { box-shadow: 0 0 0 3px #6fb64399; } }
.focuslegend { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-family: 'Lilita One', sans-serif; font-size: 15px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); margin: 2px 0 6px; }
.focuslegend span { display: inline-flex; align-items: center; gap: 6px; }
.focuslegend .sw { width: 18px; height: 14px; border-radius: 4px; display: inline-block; }

/* stage 4t: the lesson's opening list of the ten facts */
.lfacts { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 6px 12px; max-width: 560px; margin: 6px auto 10px; }
.lfact { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 12px; font-family: 'Lilita One', sans-serif; text-align: left; }
.lfact.known { background: linear-gradient(#ffe27a, var(--gold)); color: #5b3a00; box-shadow: 0 2px 0 #a95f10; }
.lfact.left { background: #fffaf0; color: var(--ink); border: 2px dashed #b8996a; }
.lfact .lcheck { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--green3); font-size: 18px; border: 2px solid #a95f10; }
.lfact.left .lcheck { border-color: #d9c49c; }
.lfact .leq { flex: 1; font-size: clamp(17px, 2.6vmin, 21px); }
.lfact .ltag { font-size: 12px; opacity: .85; white-space: nowrap; }
.lfact.left .ltag { color: #8a6335; }

/* stage 4u: the groups screen builds the table, the running count on the right */
.leggs.withcount { align-items: stretch; width: max-content; margin: 6px auto; }
.lgroup { display: flex; align-items: center; gap: 12px; }
.lgroup.pop { animation: popin .35s cubic-bezier(.3,1.6,.5,1); }
.lgcount { min-width: 54px; display: inline-flex; flex-direction: column; align-items: center; background: #fffefa; border-radius: 10px; padding: 1px 8px; font-family: 'Lilita One', sans-serif; font-size: 20px; color: var(--ink); box-shadow: 0 2px 0 #00000026; }
.lgcount .lsub { display: block; font-size: 11px; color: #8a6335; }
.leggs.lit.mark-last .lgcount .last { color: #fff; background: var(--barn); border-radius: 5px; padding: 0 3px; }
.leggs.lit.mark-last .lgroup:nth-child(even) .lgcount .last { background: var(--green2); }
.leggs.lit.mark-evenmatch .lgcount.match .last { color: #fff; background: var(--green2); border-radius: 5px; padding: 0 3px; }
.leggs.lit.mark-whole .lgcount, .leggs.lit.mark-digitsum .lgcount { box-shadow: 0 0 0 3px var(--gold); }
.lsqcount { font-family: 'Lilita One', sans-serif; font-size: 22px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); margin-top: 6px; }
.lsqcount b { color: var(--gold); }
.leggs .leggrow { padding: 3px 8px; }

/* stage 4v: each group numbered (3 × 6 = 18); the pattern pops out on the right */
.lbuild { display: flex; align-items: center; justify-content: center; gap: 18px; }
.lbuild .leggs.withcount { margin: 6px 0; }
.lgeq { font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--cream-text); text-shadow: 0 1px 0 var(--wood4); white-space: nowrap; min-width: 66px; text-align: right; }
.lpop { position: relative; max-width: 230px; background: #fffefa; color: var(--ink); border: 3px solid var(--gold); border-radius: 16px; padding: 12px 14px; font-family: 'Lilita One', sans-serif; font-size: 17px; line-height: 1.3; text-align: left; box-shadow: 0 6px 0 #00000026; animation: popin .4s cubic-bezier(.3,1.6,.5,1); }
.lpop::before { content: ''; position: absolute; left: -13px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-right-color: var(--gold); border-left: 0; }
.lpophead { color: #c07a12; font-size: 15px; margin-bottom: 4px; }

/* stage 4w: the Lessons page; Practice beside the way back in every lesson */
.lessonswrap { width: min(900px, 94vw); max-width: none; }
.lessonpicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.lessonpick { font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 16px; border: 4px solid #e2c791; background: linear-gradient(#fdf4de, #f3e2ba); color: var(--ink); box-shadow: 0 4px 0 #c79a5e40; }
.lessonpick .lpbig { font-family: 'Lilita One', sans-serif; font-size: 34px; color: #c07a12; line-height: 1.1; }
.lessonpick .lpname { font-family: 'Lilita One', sans-serif; font-size: 17px; }
.lessonpick .lpnow { font-size: 12px; font-weight: 800; color: var(--green3); }
.lessonpick.now { border-color: var(--green3); background: linear-gradient(#e6f6d6, #c9eaa9); box-shadow: 0 0 0 3px #6fb64366, 0 4px 0 #2b531340; }
.lessonhost { display: flex; justify-content: center; }
.lexits { display: flex; justify-content: center; gap: 22px; margin-top: 10px; }
.lexits .lexit { margin-top: 0; }
/* stage 4y: lesson lettering in dark ink, so headers read crisply on the light wood */
.lessoncard .lkick, .lessonswrap .lkick { color: #8a3a14; font-size: 16px; letter-spacing: .02em; }
.lessoncard h1, .lessonswrap h1 { color: #3d2008; text-shadow: none; }
.lessoncard .lline, .lessonswrap .plankline { color: #4a2a10; text-shadow: none; }
.lessoncard .lgeq, .lessoncard .lsqcount, .lessoncard .lcount { color: #3d2008; text-shadow: none; }
.lessoncard .lsqcount b, .lessoncard .lcount .ansbig { color: var(--barn); }
.lessoncard .lhint { color: #8a3a14; }
.plank .lessoncard a.lexit, .lessoncard a.lexit { color: #4a2a10; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lessoncard a.lexit.lpractice { color: #8a3a14; }
/* left-to-learn facts: a solid, clear edge instead of a pale dashed one */
.lfact.left { border: 2px solid #8a5a2b; box-shadow: 0 2px 0 #b8996a; }
.lfact.left .lcheck { border-color: #b8996a; }
.lessoncard .saysub { color: #4a2a10; text-shadow: none; }
/* stage 4z: lessons sit on a paper face inside a wood frame, so every word and highlight stands out */
.plank.lessoncard, .plank.lessonswrap { background: #fffaf0; border: 5px solid var(--wood4); box-shadow: inset 0 0 0 9px var(--wood), inset 0 0 0 11px var(--wood3), 0 8px 0 var(--plankshadow), 0 14px 24px rgba(0,0,0,.3); padding: 30px 34px; }
.plank.lessoncard::after, .plank.lessonswrap::after { display: none; }
.lessoncard .lkick, .lessonswrap .lkick { color: #b0391f; }
.lessoncard h1, .lessonswrap h1 { color: #2b1608; }
.lessoncard p, .lessonswrap p, .lessoncard .lline, .lessonswrap .plankline, .lessoncard .saysub { color: #3d2a1a; }
.lessoncard .lline.good { color: var(--green3); }
.lessoncard .lgeq, .lessoncard .lsqcount, .lessoncard .lcount { color: #2b1608; }
.lessoncard .leggrow { background: #f3e4c4; border: 2px solid #d8bf8e; }
.lessoncard .lgcount { background: #fff; border: 2px solid #c9a46a; box-shadow: none; }
.lessoncard .ltrick, .lessoncard .lcol { background: #fff; border: 2px solid #d8bf8e; }
.lessoncard .ltrick .tline b, .lessoncard .lpophead, .lessonpick .lpbig { color: #b0391f; }
.lessoncard .lpop { border-color: #d08a10; }
.lessoncard .lpop::before { border-right-color: #d08a10; }
.lessoncard .lslot { border-color: #c9a46a; background: #fff; }
.lessoncard .introeq { background: #fff; border: 2px solid #d8bf8e; }
.lessoncard .lfact.left { background: #fff; }
.lessoncard .lhint { color: #b0391f; }
.lessonpick { border-color: #c9a46a; }
.plank.lessoncard a.lexit, .plank.lessonswrap a.lexit { color: #3d2a1a; }
.plank.lessoncard a.lexit.lpractice { color: #b0391f; }
/* stage 5a: the square is a real square (equal cells, equal gaps across and down) */
.lsquare { --cell: 24px; display: grid !important; grid-auto-rows: var(--cell); gap: 5px; padding: 10px; background: #f3e4c4; border: 2px solid #d8bf8e; border-radius: 12px; width: max-content; margin: 4px auto; justify-items: center; align-items: center; }
.lsquare .dot, .lsquare.small .dot { width: calc(var(--cell) * .82); height: var(--cell); }
.lsquare.small { --cell: 14px; gap: 3px; padding: 6px; }
/* stage 5a: the trick as numbered steps */
.lessoncard .ltrick { text-align: left; max-width: 480px; padding: 12px 18px 14px; }
.ltrick .tq { font-family: 'Lilita One', sans-serif; font-size: clamp(22px, 3.6vmin, 30px); color: #2b1608; text-align: center; margin-bottom: 6px; }
.ltrick .tqlabel { color: #8a6335; }
.tstep { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 2px solid #efe2c6; }
.tnum { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--green2); color: #fff; font-family: 'Lilita One', sans-serif; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.tbody { flex: 1; }
.tlabel { font-family: 'Lilita One', sans-serif; font-size: clamp(16px, 2.6vmin, 20px); color: #8a6335; }
.teq { font-family: 'Lilita One', sans-serif; font-size: clamp(22px, 3.8vmin, 30px); color: #2b1608; }
.teq b { color: #b0391f; }
.tbody .lbar { margin-top: 6px; }
.tanswer { font-family: 'Lilita One', sans-serif; font-size: clamp(26px, 4.6vmin, 38px); color: #2b1608; text-align: center; padding-top: 8px; border-top: 3px solid #d8bf8e; }
.tanswer .ansbig { color: #b0391f; }
.lessoncard .ltrick .zero { color: #fff; background: var(--green2); border-radius: 6px; padding: 0 4px; margin-left: 1px; }
/* stage 5d: addition lessons. Eggs in cartons of ten: red for the first number, gold for the second, empty spots showing */
.lcartons { display: flex; gap: 6px; align-items: center; }
.lcarton { display: grid; grid-template-columns: repeat(5, 15px); grid-auto-rows: 15px; gap: 2px; padding: 4px; background: #f3e4c4; border: 2px solid #d8bf8e; border-radius: 8px; }
.lcarton .dot, .lcarton .spot { width: 13px; height: 15px; margin: 0 1px; }
.lcarton .spot { display: inline-block; border-radius: 50%; background: #e4d5b3; box-shadow: inset 0 1px 2px #00000018; }
.dot.alt { background: radial-gradient(circle at 35% 30%, #ffe9a3, #f2b733 60%, #b67a0c); }
.lgroup.noeggs { justify-content: flex-end; }
.lgroup.noeggs .lgeq { min-width: 120px; }
.tbody .lcartons { margin-top: 6px; }
.lfacts.few { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; max-width: 300px; }
.lessonswrap .lsetlink { display: block; margin-top: 12px; font-family: 'Lilita One', sans-serif; font-size: 16px; color: #b0391f; text-decoration-thickness: 2px; text-underline-offset: 3px; }
