/* CHIM Skill Ladder games (v93): shared layout + each game's pieces. */
.sg { max-width: 620px; margin: 0 auto; --sg-ink: #263238; }
.sg .hidden { display: none !important; }
.sg-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sg-mode { font-weight: 800; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; color: #fff; }
.sg-mode-normal { background: #43A047; } .sg-mode-average { background: #FB8C00; } .sg-mode-speedy { background: #E53935; }
.sg-chip { font-weight: 700; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); }
.sg-count { margin-left: auto; }
.sg-streak { background: #FFF3E0; color: #E65100; border-color: #FFB74D; }

.sg-ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 8px; }
.sg-step { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 10px; background: var(--card); border: 1.5px solid var(--rule); opacity: 0.6; transition: all 0.25s; }
.sg-step.past { opacity: 0.9; }
.sg-step.now { opacity: 1; border-color: #FFB300; background: #FFF8E1; color: #5D4037; box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.25); transform: translateY(-2px); }
.sg-step-ic { font-size: 1.05rem; line-height: 1; }
.sg-step-l { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.01em; }
.sg-step-dots { display: flex; gap: 3px; }
.sg-step-dots i { width: 8px; height: 8px; border-radius: 50%; background: #CFD8DC; }
.sg-step-dots i.ok { background: #43A047; } .sg-step-dots i.no { background: #E53935; }

.sg-scene { border-radius: 12px; overflow: hidden; margin-bottom: 8px; line-height: 0; }
.sg-scene svg { display: block; width: 100%; height: auto; }
.sg-timer { position: relative; height: 12px; border-radius: 8px; background: var(--rule); overflow: hidden; margin-bottom: 8px; }
.sg-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #66BB6A, #43A047); transition: width 0.1s linear; }
.sg-timer-fill.low { background: linear-gradient(90deg, #FF7043, #E53935); }
.sg-timer-n { position: absolute; right: 6px; top: -1px; font-size: 0.65rem; font-weight: 800; color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, 0.6); line-height: 14px; }

.sg-card { background: #fff; color: var(--sg-ink); border: 2px solid #FFE082; border-radius: 14px; padding: 12px 14px; box-shadow: 0 4px 0 #FFE082; margin-bottom: 10px; }
.sg-stage-tag { font-size: 0.72rem; font-weight: 800; color: #8D6E63; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.sg-prompt { font-size: 1.08rem; line-height: 1.45; }
.sg-prompt b { color: #D84315; }
.sg-eq { font-family: 'Lora', serif; font-size: 1.55rem; font-weight: 700; text-align: center; margin: 6px 0 2px; color: #1A237E; }
.sg-sub { font-size: 0.8rem; text-align: center; color: #607D8B; }
.sg-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; margin: 0 2px; font-weight: 700; }
.sg-frac span:first-child { border-bottom: 2px solid currentColor; padding: 0 3px; }

/* keypad */
.sg-kp-show { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 52px; border-radius: 12px; background: #263238; color: #FFF8E1; font-family: 'Lora', serif; font-size: 1.7rem; font-weight: 700; margin-bottom: 8px; padding: 4px 12px; }
.sg-kp-pre, .sg-kp-suf { color: #FFD54F; font-size: 1.2rem; }
.sg-kp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sg-kp button { font: inherit; font-size: 1.25rem; font-weight: 800; padding: 10px 0; border-radius: 12px; border: none; background: #fff; color: #263238; box-shadow: 0 3px 0 #B0BEC5, inset 0 0 0 1.5px #CFD8DC; cursor: pointer; touch-action: manipulation; }
.sg-kp button:active { transform: translateY(2px); box-shadow: 0 1px 0 #B0BEC5, inset 0 0 0 1.5px #CFD8DC; }
.sg-kp button.sg-kp-op { background: #ECEFF1; }
.sg-kp button:disabled { opacity: 0.35; cursor: default; }
.sg-kp .sg-kp-ok { grid-column: 3 / 5; }
.sg-kp-ok { font: inherit; font-weight: 800; font-size: 1.05rem; padding: 12px 16px; border-radius: 12px; border: none; background: #43A047 !important; color: #fff !important; box-shadow: 0 3px 0 #2E7D32 !important; cursor: pointer; }
.sg-kp-ok:disabled { opacity: 0.45; cursor: default; }
.sg-text { display: flex; gap: 8px; } .sg-text input { flex: 1; font-size: 1.1rem; margin: 0; }

/* feedback */
.sg-fb { min-height: 1.4em; margin-top: 10px; padding: 0; border-radius: 12px; font-size: 0.95rem; }
.sg-fb.ok, .sg-fb.no, .sg-fb.near { padding: 10px 12px; }
.sg-fb.ok { background: #E8F5E9; color: #1B5E20; border: 1.5px solid #81C784; }
.sg-fb.no { background: #FFEBEE; color: #B71C1C; border: 1.5px solid #E57373; }
.sg-fb.near { background: #FFF8E1; color: #E65100; border: 1.5px solid #FFB74D; }
.sg-ans { font-weight: 800; }
.sg-explain { margin-top: 6px; font-size: 0.88rem; color: #37474F; background: rgba(255, 255, 255, 0.65); border-radius: 8px; padding: 6px 8px; }
.sg-hint-box { background: #FFFDE7; color: #5D4037; border: 1.5px dashed #FFCA28; border-radius: 12px; padding: 8px 10px; font-size: 0.9rem; }
.sg-actions { display: flex; justify-content: center; margin-top: 10px; gap: 8px; }
.sg-hint, .sg-next { font: inherit; font-weight: 800; padding: 8px 16px; border-radius: 999px; border: 2px solid #FFCA28; background: #FFF8E1; color: #6D4C41; cursor: pointer; }
.sg-next { border-color: #42A5F5; background: #E3F2FD; color: #0D47A1; font-size: 1rem; }
.sg-hint:disabled { opacity: 0.5; }

/* summary */
.sg-summary { text-align: center; }
.sg-sum-head { font-size: 1.6rem; } .sg-sum-head span { font-size: 1.1rem; font-weight: 800; vertical-align: middle; }
.sg-sum-score { font-family: 'Lora', serif; font-size: 2.6rem; font-weight: 800; color: var(--olive-deep); line-height: 1.1; margin: 4px 0 10px; }
.sg-sum-score small { display: block; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.sg-sum-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 8px; }
.sg-sum-st { display: flex; flex-direction: column; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 6px 2px; font-size: 0.7rem; }
.sg-sum-st span { font-size: 1.1rem; } .sg-sum-st em { font-style: normal; font-size: 0.85rem; }
.sg-sum-cleared { margin: 6px 0 10px; }
.sg-sum-btns { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px 0; }
.sg-sum-btns .btn-primary { max-width: 300px; }
.sg-review { text-align: left; margin-top: 8px; }
.sg-review summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
.sg-rev { font-size: 0.85rem; padding: 7px 9px; border-radius: 8px; margin: 5px 0; border-left: 4px solid #E53935; background: var(--card); }
.sg-rev.ok { border-left-color: #43A047; } .sg-rev.near { border-left-color: #FFB300; }

/* shared rows */
.gc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.gc-row .sg-kp-ok { flex: 1; }

/* 🚌 Jeepney */
.jr-jeep { transition: transform 0.7s cubic-bezier(.5, 1.6, .5, 1); }
.jr-bump > g { animation: jr-b 0.4s; }
@keyframes jr-b { 30% { transform: translate(0, 66px); } }

/* 🛗 Elevator */
.er-bldg { position: relative; max-width: 300px; margin: 0 auto; background: linear-gradient(180deg, #FFAB91, #FF8A65); border-radius: 12px 12px 0 0; padding: 6px 8px 0; box-shadow: inset 0 0 0 3px #E64A19; }
.er-roof { text-align: center; font-size: 1.2rem; line-height: 1.2; }
.er-floor { display: grid; grid-template-columns: 44px 36px 1fr 30px; align-items: center; width: 100%; height: 27px; margin: 0 0 3px; border: none; border-radius: 6px; background: #FFF3E0; color: #4E342E; font: inherit; font-weight: 800; cursor: pointer; padding: 0 6px; box-shadow: inset 0 -2px 0 #FFCC80; }
.er-floor.g { background: #FFF9C4; box-shadow: inset 0 -3px 0 #FBC02D; }
.er-floor.b { background: #D7CCC8; color: #3E2723; box-shadow: inset 0 -2px 0 #A1887F; }
.er-floor:hover { outline: 2px solid #FF7043; }
.er-floor.pick { background: #FFE082; outline: 3px solid #E65100; }
.er-num { text-align: left; font-size: 1rem; } .er-lab { font-size: 0.7rem; opacity: 0.7; }
.er-win { height: 14px; border-radius: 3px; background: repeating-linear-gradient(90deg, #81D4FA 0 14px, transparent 14px 20px); opacity: 0.6; }
.er-car { font-size: 1.1rem; text-align: right; }
.er-ground { height: 10px; background: #8D6E63; margin: 0 -8px; }
.er-floor.b:first-of-type { margin-top: 0; }
.er-tip { text-align: center; font-size: 0.82rem; color: var(--ink-soft); margin-top: 6px; }

/* 🥧 Bibingka */
.bs-cuts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; margin-bottom: 6px; font-weight: 700; font-size: 0.85rem; }
.bs-cut { min-width: 36px; padding: 6px 8px; border-radius: 10px; border: 2px solid #FFB74D; background: #FFF8E1; font: inherit; font-weight: 800; cursor: pointer; color: #6D4C41; }
.bs-cut.on { background: #FB8C00; color: #fff; border-color: #E65100; }
.bs-wrap { display: flex; justify-content: center; }
.bs-cake { width: min(240px, 70vw); height: auto; }
.bs-slice { fill: #F4C26B; stroke: #8D5524; stroke-width: 2.4; cursor: pointer; transition: fill 0.15s, transform 0.15s; transform-origin: 100px 100px; }
.bs-slice:hover { fill: #F9D48C; }
.bs-slice.on { fill: #E07A1F; transform: scale(1.04); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
.bs-count { text-align: center; font-size: 0.95rem; margin: 4px 0; }
.bs-serve { display: block; width: 100%; margin-top: 6px; }

/* 🛒 Grocery */
.gc-tray { min-height: 56px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 8px; border-radius: 12px; background: #ECEFF1; border: 2px dashed #90A4AE; }
.gc-empty { font-size: 0.85rem; color: #607D8B; }
.gc-tot { text-align: center; font-size: 0.9rem; margin: 4px 0; }
.gc-bank { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.gc-m { font: inherit; font-weight: 800; cursor: pointer; border: none; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
.gc-m.bill { border-radius: 6px; padding: 8px 4px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 2px 0 rgba(0, 0, 0, 0.25); }
.gc-m.coin { border-radius: 50%; aspect-ratio: 1; padding: 0; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45), 0 2px 0 rgba(0, 0, 0, 0.25); font-size: 0.8rem; max-width: 62px; justify-self: center; width: 100%; }
.gc-tray .gc-m.bill { padding: 5px 7px; font-size: 0.75rem; } .gc-tray .gc-m.coin { width: 38px; font-size: 0.65rem; }
.gc-m.d500 { background: #8E7CC3; } .gc-m.d100 { background: #9575CD; } .gc-m.d50 { background: #E57373; } .gc-m.d20 { background: #FF8A65; }
.gc-m.coin.d20 { background: #D4A017; } .gc-m.d10 { background: #BDBDBD; color: #333; text-shadow: none; } .gc-m.d5 { background: #C9A227; } .gc-m.d1 { background: #B0BEC5; color: #333; text-shadow: none; } .gc-m.d0_25 { background: #CD9B4A; }

/* 🏷️ Sale Hunter */
.sh-tags { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-tag { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 14px 14px 14px 4px; border: 2.5px solid #F48FB1; background: #FFF0F5; color: #4A148C; font: inherit; cursor: pointer; }
.sh-tag::before { content: ''; position: absolute; top: 7px; left: 50%; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #F48FB1; }
.sh-tag.on { background: #F8BBD0; border-color: #C2185B; box-shadow: 0 0 0 3px rgba(194, 24, 91, 0.25); }
.sh-store { font-weight: 800; font-size: 0.8rem; margin-top: 6px; } .sh-item { font-size: 1.7rem; }
.sh-orig { font-size: 0.8rem; color: #6A1B9A; } .sh-deal { font-weight: 900; font-size: 1.15rem; color: #C2185B; }
.sh-step { text-align: center; font-size: 0.9rem; margin: 8px 0; }

/* 🥥 Coconut Drop */
.cd-line { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: manipulation; }
.cd-nut { animation: cd-fall 0.45s cubic-bezier(.5, 0, .7, 1.4); }
@keyframes cd-fall { from { transform: translateY(-50px); } }
.cd-pick { text-align: center; font-size: 0.9rem; margin: 6px 0; }
.cd-opts { display: grid; gap: 5px; margin-top: 6px; }
.cd-opts > div { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: center; margin-top: 6px; font-size: 0.82rem; font-weight: 700; }
.cd-opts button { font: inherit; font-weight: 800; padding: 6px 10px; border-radius: 999px; border: 2px solid #FFAB91; background: #FBE9E7; color: #BF360C; cursor: pointer; }
.cd-opts button.on { background: #FF7043; color: #fff; border-color: #D84315; }
.cd-go { display: block; width: 100%; }

/* 🧱 Algebra Tiles */
.at-mat { min-height: 92px; display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; padding: 10px; border-radius: 12px; background: #2E7D32 repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 6px, transparent 6px 12px); box-shadow: inset 0 0 0 4px #1B5E20; }
.at-empty { color: #C8E6C9; font-size: 0.85rem; }
.at-tile { font: inherit; font-weight: 900; border: none; border-radius: 6px; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 2px 0 rgba(0, 0, 0, .25); }
.at-tile.x2 { width: 52px; height: 52px; background: #42A5F5; }
.at-tile.x { width: 22px; height: 52px; background: #66BB6A; writing-mode: vertical-rl; font-size: 0.85rem; }
.at-tile.one { width: 22px; height: 22px; background: #FFCA28; color: #5D4037; font-size: 0.7rem; }
.at-tile.neg { background: #EF5350 !important; color: #fff !important; }
.at-mat .at-tile { animation: at-pop 0.2s; }
@keyframes at-pop { from { transform: scale(0.4); } }
.at-expr { text-align: center; margin: 8px 0 4px; font-size: 1rem; }
.at-bank { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.at-pair { display: flex; gap: 5px; align-items: flex-end; }
.at-bank .at-tile.x { writing-mode: horizontal-tb; width: 34px; }
.at-bank .at-tile.one { width: 38px; height: 34px; font-size: 0.8rem; }

/* 🌱 Root Escape */
.re-stage { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 10px 6px; border-radius: 12px; background: linear-gradient(180deg, #E8F5E9, #C5E1A5); }
.re-out { display: flex; align-items: center; gap: 3px; min-width: 56px; justify-content: flex-end; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.6); }
.re-x { font-weight: 800; color: #33691E; }
.re-house { position: relative; display: flex; align-items: stretch; }
.re-house.shake { animation: fx-shake 0.4s; }
.re-idx { position: absolute; left: 2px; top: 8px; font-size: 0.75rem; font-weight: 800; color: #5D4037; }
.re-sign { width: 30px; height: auto; min-height: 64px; flex: 0 0 30px; }
.re-in { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 8px 6px; border-top: 4px solid #5D4037; margin-left: -2px; background: #FFF8E1; border-radius: 0 8px 8px 0; max-width: 260px; min-height: 56px; align-items: center; }
.re-c { position: relative; width: 42px; height: 42px; border-radius: 50% 50% 46% 46%; border: none; background: var(--c); color: #263238; font: inherit; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15), 0 2px 0 rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.re-c b { position: absolute; left: 0; right: 0; bottom: 6px; font-size: 1rem; font-weight: 900; }
.re-eyes { position: absolute; left: 0; right: 0; top: 4px; font-size: 0.9rem; letter-spacing: 2px; font-weight: 900; }
.re-c.on { transform: translateY(-5px) scale(1.08); box-shadow: 0 0 0 3px #FFD600, 0 4px 0 rgba(0, 0, 0, 0.2); }
.re-c.given { opacity: 0.85; }
.re-out .re-c { animation: re-hop 0.4s; }
@keyframes re-hop { 40% { transform: translateY(-12px); } }
.re-empty { font-size: 0.75rem; color: #7CB342; }
.re-tip { text-align: center; font-size: 0.85rem; margin-top: 6px; }

/* 🔤 Sentence Builder */
.sb-words { font-size: 1.15rem; font-weight: 700; font-style: italic; color: #0D47A1; text-align: center; }
.sb-line { min-height: 54px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: center; padding: 8px; border-radius: 12px; background: #263238; }
.sb-empty { color: #90A4AE; font-size: 0.85rem; }
.sb-bank { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.sb-t { font-family: 'Lora', serif; font-size: 1.2rem; font-weight: 800; min-width: 42px; padding: 7px 10px; border-radius: 10px; border: none; background: #fff; color: #1565C0; box-shadow: 0 3px 0 #90CAF9, inset 0 0 0 2px #BBDEFB; cursor: pointer; }
.sb-t.in { background: #FFF59D; color: #263238; box-shadow: 0 2px 0 #FBC02D; }
.sb-t:disabled { opacity: 0.25; cursor: default; }

/* 🪨 Stepping Stones */
.ss-frog { transition: transform 0.6s cubic-bezier(.4, 1.6, .5, 1); }
.ss-splash { animation: ss-sink 0.8s forwards; }
@keyframes ss-sink { 60% { opacity: 1; } 100% { opacity: 0.2; transform: translate(150px, 60px) scale(0.6); } }

/* 🏠 Floor Plan */
.fp-grid { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.fp-info { text-align: center; font-size: 0.88rem; margin: 6px 0 2px; }
.fp-figbox { display: flex; justify-content: center; }
.fp-fig { width: min(260px, 80vw); height: auto; }

/* game cards in the Arcade grid */
.ai-skill { display: block; font-size: 0.66rem; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.arcade-cat { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-weight: 800; letter-spacing: 0.06em; color: var(--olive-deep); }
.arcade-cat::after { content: ''; flex: 1; height: 2px; background: var(--rule); border-radius: 2px; }
.arcade-cat .n { font-weight: 600; letter-spacing: 0; color: var(--ink-soft); font-size: 0.8rem; }
.arcade-cat:first-child { margin-top: 0; }

/* mode picker + mode leaderboards on the intro screen */
.sg-modes-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 16px; }
@media (max-width: 520px) { .sg-modes-pick { grid-template-columns: 1fr; } }
.sg-mode-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border-radius: 14px; border: 2.5px solid; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.sg-mode-card b { font-size: 1.05rem; } .sg-mode-card .ic { font-size: 1.8rem; line-height: 1; } .sg-mode-card small { font-size: 0.75rem; color: var(--ink-soft); }
.sg-mode-card.normal { border-color: #66BB6A; } .sg-mode-card.average { border-color: #FFA726; } .sg-mode-card.speedy { border-color: #EF5350; }
.sg-mode-card:hover { transform: translateY(-2px); }
.lb-modes { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; flex-wrap: wrap; }
.lb-modes .chip.active { color: #fff; }
.mode-pill { display: inline-block; font-size: 0.75rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; color: #fff; white-space: nowrap; }
.mode-pill.normal { background: #43A047; } .mode-pill.average { background: #FB8C00; } .mode-pill.speedy { background: #E53935; } .mode-pill.none { background: #90A4AE; }
.arcade-attempts-all { max-height: 360px; overflow: auto; }

/* ---------- v95 GEOMETRY ---------- */
.sg-sum-headline { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }

/* 🔦 Laser Line */
.ll-wrap { display: flex; justify-content: center; }
.ll-grid { width: 100%; max-width: 420px; height: auto; display: block; touch-action: manipulation; }
.ll-m { cursor: pointer; }
.ll-m:hover rect { fill: rgba(255, 255, 255, 0.08); }
.ll-beam { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: ll-shoot 0.6s linear forwards; filter: drop-shadow(0 0 4px #FF1744); }
@keyframes ll-shoot { to { stroke-dashoffset: 0; } }
.ll-target.hit circle:first-child { animation: ll-glow 0.8s ease-in-out infinite alternate; }
@keyframes ll-glow { to { fill: #FFCDD2; } }
.ll-status { text-align: center; font-size: 0.9rem; margin: 6px 0; font-weight: 600; }
.ll-q { background: #EDE7F6; color: #311B92; border-radius: 12px; padding: 10px 12px; margin: 6px 0 8px; font-size: 1rem; line-height: 1.4; }
.ll-keys { font-size: 0.72rem; color: var(--ink-soft); }
@media (hover: none) { .ll-keys { display: none; } }

/* 📍 Term Drop */
.td-field { position: relative; height: 320px; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #81D4FA 0%, #B3E5FC 60%, #E1F5FE 100%); margin-bottom: 8px; }
.td-cloud { position: absolute; width: 90px; height: 30px; background: #fff; border-radius: 30px; opacity: 0.85; }
.td-cloud::before { content: ''; position: absolute; width: 44px; height: 44px; border-radius: 50%; background: #fff; left: 18px; top: -20px; }
.td-cloud.c1 { left: 8%; top: 18px; } .td-cloud.c2 { right: 6%; top: 60px; transform: scale(0.8); }
.td-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, #7CB342 0 14px, #689F38 14px 28px); border-top: 3px solid #558B2F; }
.td-card { position: absolute; left: 50%; top: 6px; transform: translate(-50%, 0); max-width: 82%; display: flex; align-items: center; gap: 8px; background: #fff; color: #263238; border: 3px solid #0288D1; border-radius: 14px; padding: 8px 12px; font-weight: 800; font-size: 1rem; box-shadow: 0 6px 0 rgba(2, 136, 209, 0.25); will-change: transform; }
.td-card.ok { border-color: #43A047; background: #E8F5E9; }
.td-card.no { border-color: #E53935; background: #FFEBEE; }
.td-emoji { font-size: 1.7rem; line-height: 1; }
.td-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; background: rgba(255, 255, 255, 0.82); color: #263238; }
.td-start p { margin: 0; max-width: 340px; }
.td-start .btn-primary { max-width: 220px; }
.td-why { min-height: 2.4em; text-align: center; font-size: 0.92rem; margin-bottom: 6px; }
.td-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.td-b { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; border-radius: 12px; border: 2px solid; background: var(--card); color: var(--ink); font: inherit; font-size: 0.78rem; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); touch-action: manipulation; min-height: 64px; }
.td-b svg { width: 40px; height: 24px; }
.td-b:active { transform: translateY(2px); box-shadow: none; }
.td-b kbd { position: absolute; top: 3px; right: 5px; font-size: 0.62rem; opacity: 0.55; font-family: inherit; }
@media (hover: none) { .td-b kbd { display: none; } }
.td-point { border-color: #E53935; color: #C62828; } .td-line { border-color: #1E88E5; color: #1565C0; } .td-segment { border-color: #43A047; color: #2E7D32; } .td-ray { border-color: #FB8C00; color: #E65100; } .td-plane { border-color: #8E24AA; color: #6A1B9A; }
.td-b b { color: var(--ink); }
.td-n { font-size: 0.62rem; font-weight: 800; color: var(--ink-soft); }
.td-field.hidden, .td-btns.hidden { display: none; }

/* 📐 Missing Angle */
.ma-doors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.ma-door { display: flex; flex-direction: column; align-items: center; gap: 3px; opacity: 0.7; }
.ma-door small { font-size: 0.6rem; font-weight: 800; text-align: center; }
.ma-dpanel { position: relative; width: 100%; max-width: 58px; aspect-ratio: 3 / 4; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #A1887F, #795548); border: 3px solid #4E342E; display: flex; align-items: center; justify-content: center; transition: transform 0.4s; }
.ma-knob { position: absolute; right: 6px; top: 52%; width: 6px; height: 6px; border-radius: 50%; background: #FFD54F; }
.ma-lock { font-size: 1.1rem; }
.ma-door.now { opacity: 1; } .ma-door.now .ma-dpanel { box-shadow: 0 0 0 3px #FFB300; }
.ma-door.open { opacity: 1; } .ma-door.open .ma-dpanel { background: linear-gradient(180deg, #C8E6C9, #81C784); border-color: #2E7D32; }
.ma-door.fail .ma-dpanel { background: linear-gradient(180deg, #CFD8DC, #90A4AE); border-color: #546E7A; }
.ma-figbox { display: flex; justify-content: center; margin: 4px 0 8px; }
.ma-fig { width: 100%; max-width: 380px; height: auto; display: block; border-radius: 12px; border: 1.5px solid #E0D6BC; }

/* 🔐 The Vault (v96) */
.vv-lock { font-size: 0.85rem; line-height: 1; }
.vv-door { position: relative; max-width: 380px; margin: 0 auto 10px; padding: 14px 12px 16px; border-radius: 18px; text-align: center; color: #ECEFF1; background: radial-gradient(circle at 50% 30%, #607D8B, #37474F 70%); border: 4px solid #263238; box-shadow: inset 0 0 0 4px #78909C, 0 6px 0 #1C262B; }
.vv-door::before, .vv-door::after { content: ''; position: absolute; left: -10px; width: 10px; height: 26px; border-radius: 4px 0 0 4px; background: #263238; }
.vv-door::before { top: 26px; } .vv-door::after { bottom: 26px; }
.vv-wheel { font-size: 2.2rem; line-height: 1; display: inline-block; transition: transform 0.8s; }
.vv-door.open .vv-wheel { transform: rotate(360deg); }
.vv-door.open { background: radial-gradient(circle at 50% 30%, #81C784, #2E7D32 70%); box-shadow: inset 0 0 0 4px #A5D6A7, 0 6px 0 #1B5E20; }
.vv-title { font-weight: 800; font-size: 0.95rem; margin: 4px 0 8px; }
.vv-slots { display: flex; justify-content: center; gap: 8px; }
.vv-slot { width: 44px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #102027; color: #546E7A; font-family: 'Lora', serif; font-size: 1.8rem; font-weight: 800; box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6); }
.vv-slot.on { color: #FFD54F; text-shadow: 0 0 8px rgba(255, 213, 79, 0.7); }
.vv-room { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-bottom: 10px; }
.vv-clue { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; border: 2.5px dashed #A1887F; background: #FFF8E1; color: #4E342E; font: inherit; cursor: pointer; box-shadow: 0 3px 0 #D7CCC8; min-height: 84px; }
.vv-clue .vv-ic { font-size: 1.8rem; line-height: 1.1; }
.vv-clue b { font-size: 0.9rem; } .vv-clue small { font-size: 0.72rem; color: #8D6E63; }
.vv-clue.open { border-style: solid; border-color: #FB8C00; background: #FFE0B2; transform: translateY(-2px); }
.vv-clue.done { border-style: solid; border-color: #66BB6A; background: #E8F5E9; color: #2E7D32; cursor: default; box-shadow: none; }
.vv-clue.done small { color: #2E7D32; font-weight: 700; }
.vv-clue kbd { position: absolute; top: 4px; right: 7px; font-size: 0.65rem; opacity: 0.5; font-family: inherit; }
@media (hover: none) { .vv-clue kbd { display: none; } }
.vv-q { background: #fff; color: #263238; border: 2px solid #FFE082; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 4px 0 #FFE082; }
.vv-q > span { font-size: 0.82rem; color: #6D4C41; } .vv-q em { font-size: 0.75rem; }
.vv-qt { font-family: 'Lora', serif; font-size: 1.35rem; font-weight: 700; color: #1A237E; margin-top: 4px; text-align: center; line-height: 1.35; }
.vv-tip { text-align: center; font-size: 0.88rem; color: var(--ink-soft); padding: 6px; }
.sg-vault .hidden { display: none !important; }

/* 🔗 Power Link (v97) */
.pl-target { text-align: center; font-size: 1rem; margin-bottom: 8px; }
.pl-target b { font-family: 'Lora', serif; font-size: 1.4rem; color: #00695C; }
.pl-target span { font-size: 0.82rem; color: var(--ink-soft); }
.pl-grid { display: grid; gap: 8px; max-width: 420px; margin: 0 auto; padding: 10px; border-radius: 16px; background: #006064; box-shadow: inset 0 0 0 4px #00838F; }
.pl-tile { position: relative; aspect-ratio: 1; border: none; border-radius: 12px; background: #E0F7FA; color: #004D40; font-family: 'Lora', serif; font-size: 1.3rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #4DD0E1; touch-action: manipulation; display: flex; align-items: center; justify-content: center; padding: 2px; }
.pl-tile sup { font-size: 0.65em; }
.pl-tile.sel { background: #FFF59D; box-shadow: 0 0 0 3px #F9A825, 0 4px 0 #F9A825; transform: translateY(-2px); }
.pl-tile.cur { outline: 3px dashed #FFD600; outline-offset: 2px; }
.pl-tile.done { color: #37474F; box-shadow: none; opacity: 0.85; cursor: default; animation: at-pop 0.25s; }
.pl-tile i { position: absolute; top: 3px; left: 6px; font-style: normal; font-size: 0.65rem; font-family: 'IBM Plex Sans', sans-serif; color: #E65100; }
.pl-expr { text-align: center; min-height: 2em; margin: 10px 0 2px; font-family: 'Lora', serif; font-size: 1.1rem; }
.pl-expr .pl-hit { color: #2E7D32; background: #C8E6C9; padding: 0 6px; border-radius: 6px; }
.pl-keys { text-align: center; font-size: 0.72rem; color: var(--ink-soft); margin-top: 4px; }
@media (hover: none) { .pl-keys { display: none; } }

/* ---------- v98 🟦 Rectangle Rescue ---------- */
.rr-svg { width: 100%; height: auto; display: block; }
.rr-ctrls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.rr-ctrl { background: #E3F2FD; border: 2px solid #90CAF9; border-radius: 12px; padding: 8px; text-align: center; }
.rr-ctrl.locked { background: #ECEFF1; border-color: #B0BEC5; }
.rr-ctrl-h { font-size: 0.82rem; color: #0D47A1; margin-bottom: 6px; }
.rr-ctrl-h b { font-family: 'Lora', serif; font-size: 1.05rem; }
.rr-btns { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rr-grp { display: inline-flex; align-items: center; gap: 6px; }
.rr-b { width: 38px; height: 38px; border-radius: 10px; border: none; background: #1565C0; color: #fff; font-size: 1.25rem; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #0D47A1; touch-action: manipulation; }
.rr-b:active { transform: translateY(2px); box-shadow: 0 1px 0 #0D47A1; }
.rr-chip { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; border-radius: 4px; font-size: 0.85rem; }
.rr-chip.x { width: 16px; height: 34px; background: #66BB6A; border: 2px solid #2E7D32; color: #fff; }
.rr-chip.u { width: 18px; height: 18px; background: #FFCA28; border: 2px solid #F57F17; }
.rr-stage { display: flex; justify-content: center; align-items: center; min-height: 120px; padding: 10px; background: repeating-linear-gradient(45deg, #FAFAF5, #FAFAF5 8px, #F1EEE2 8px, #F1EEE2 16px); border-radius: 14px; overflow-x: auto; }
.rr-empty { color: var(--ink-soft); font-size: 0.9rem; }
.rr-rect { display: grid; gap: 2px; padding: 4px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 3px #90A4AE; transition: box-shadow .2s; }
.rr-rect.fit { box-shadow: 0 0 0 4px #43A047, 0 0 18px rgba(67, 160, 71, .55); animation: rrPop .35s ease; }
@keyframes rrPop { 50% { transform: scale(1.04); } }
.rr-corner { display: flex; align-items: center; justify-content: center; color: #90A4AE; font-weight: 800; font-size: 0.8rem; }
.rr-side { border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; color: #fff; border: 2px dashed #2E7D32; background: #A5D6A7; }
.rr-side.u { background: #FFE082; border-color: #F57F17; }
.rr-side.neg { background: #EF9A9A; border-color: #B71C1C; }
.rr-side.lock { border-style: solid; }
.rr-cell { border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; color: #fff; }
.rr-cell.x2 { background: #42A5F5; border: 2px solid #1565C0; }
.rr-cell.x1 { background: #66BB6A; border: 2px solid #2E7D32; }
.rr-cell.one { background: #FFCA28; border: 1.5px solid #F57F17; }
.rr-cell.neg { background: #EF5350; border-color: #B71C1C; }
.rr-read { text-align: center; margin: 10px 0 4px; font-size: 0.95rem; }
.rr-read b { font-family: 'Lora', serif; font-size: 1.1rem; }
.rr-read.fit > div:first-child b { color: #2E7D32; }
.rr-goal { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.rr-tip { font-size: 0.75rem; color: #B71C1C; margin-top: 4px; }

/* ---------- v99 Geometry: Can Factory, Zipline Builder, Shadow Twins, Angle City ---------- */
.cf-svg, .zl-svg, .tw-svg, .ac-svg { width: 100%; height: auto; display: block; }
.zl-rider { transition: x .8s ease, y .8s ease; }
.gx-fig { display: flex; justify-content: center; margin: 2px 0 8px; }
.gx-svg { width: 100%; max-width: 230px; height: auto; display: block; }
.gx-svg.gx-wide { max-width: 360px; }
.gx-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.gx-riddle { font-family: 'Lora', serif; font-style: italic; font-size: 1.12rem; text-align: center; margin: 8px 0 2px; color: #4527A0; }
.gx-opts { display: grid; gap: 8px; }
.gx-opt { position: relative; min-height: 48px; padding: 10px 8px 10px 24px; border: none; border-radius: 12px; background: #fff; color: #263238; font-weight: 800; font-size: 0.95rem; cursor: pointer; box-shadow: 0 0 0 2px #CFD8DC, 0 4px 0 #B0BEC5; touch-action: manipulation; }
.gx-opt i { position: absolute; left: 7px; top: 5px; font-style: normal; font-size: 0.62rem; color: #90A4AE; }
.gx-opt:active { transform: translateY(2px); box-shadow: 0 0 0 2px #CFD8DC, 0 2px 0 #B0BEC5; }
.gx-opt.picked { background: #FFF59D; box-shadow: 0 0 0 3px #F9A825, 0 2px 0 #F9A825; }
.gx-opt:disabled { cursor: default; }
@media (hover: none) { .gx-opt i { display: none; } .gx-opt { padding-left: 8px; } }
.gx-tap .gx-ang { cursor: pointer; }
.gx-tap .gx-ang:hover circle { fill: #FFEE58; }
.gx-tap .gx-ang.picked circle { fill: #FFB300; stroke: #E65100; }
.zl-board { touch-action: manipulation; }
.zl-dot { cursor: pointer; }
.zl-read { text-align: center; font-size: 0.9rem; margin: 6px 0; color: #37474F; }
.zl-read b { color: #6A1B9A; }
.zl-go:disabled { opacity: .5; }

/* ---------- v100 Statistics: Barangay Survey, Hoop Stats ---------- */
.sv-svg, .hs-svg { width: 100%; height: auto; display: block; }
/* v214 🏀 Hoop Stats arena (v592: the painted court — only the trees and #2 move) */
.hs-arena { transition: filter .25s; border-radius: 10px; }
.hs-arena .hs-tree { transform-box: view-box; animation: hsTree 4.6s ease-in-out infinite alternate; }
.hs-arena .hs-tree-l { transform-origin: 0 300px; }
.hs-arena .hs-tree-r { transform-origin: 1672px 182px; animation-duration: 3.9s; animation-delay: -1.7s; animation-direction: alternate-reverse; }
@keyframes hsTree { from { transform: rotate(-.9deg) skewX(-.6deg); } to { transform: rotate(.7deg) skewX(.5deg); } }
.hs-arena.hs-flash { filter: brightness(1.12) saturate(1.1); }
.hs-arena.hs-dim { filter: brightness(.78); transition: filter .2s; }
.hs-arena .hs-board.blink .hs-led-pts { animation: hsBlink .18s steps(2) 5; }
@keyframes hsBlink { 50% { fill: #FFF59D; } }
.hs-arena .hs-net.swish { animation: hsNet .5s ease-out; transform-box: fill-box; transform-origin: top center; }
@keyframes hsNet { 35% { transform: scaleY(1.18) scaleX(.9); } 70% { transform: scaleY(.96); } 100% { transform: none; } }
.hs-arena .hs-shout.pop { animation: hsPop .5s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes hsPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hs-arena .hs-tree { animation: none; } }
.st-table { margin: 6px auto 8px; border-collapse: collapse; font-size: 0.92rem; min-width: 200px; }
.st-table th { background: #00796B; color: #fff; padding: 4px 12px; }
.st-table td { border-bottom: 1px solid #B2DFDB; padding: 4px 12px; text-align: center; }
.st-table tr:nth-child(even) td { background: #E0F2F1; }
.st-raw { font-family: 'Lora', serif; font-size: 1.05rem; text-align: center; margin: 6px 0; color: #1A237E; word-spacing: 2px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.st-chip { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #B2DFDB; background: #fff; font-size: 1.3rem; cursor: pointer; touch-action: manipulation; position: relative; }
.st-chip.done { opacity: .35; }
.st-chip.done::after { content: '\2715'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #C62828; font-weight: 900; font-size: 1.3rem; }
.st-note { text-align: center; font-size: 0.75rem; color: var(--ink-soft); margin: 4px 0 8px; }
.st-tally { display: flex; flex-direction: column; gap: 6px; }
.st-trow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; background: #E0F2F1; border-radius: 10px; padding: 4px 8px; }
.st-tname { font-weight: 800; font-size: 0.9rem; }
.st-tmarks { min-width: 70px; }
.st-tbtns { display: inline-flex; align-items: center; gap: 6px; }
.st-tbtns b { min-width: 20px; text-align: center; }
.st-bbtns { display: grid; gap: 4px; padding-left: 34px; margin-top: 2px; }
.st-bbtns span { display: flex; justify-content: center; gap: 4px; }
.st-bbtns .rr-b { width: 34px; height: 34px; font-size: 0.9rem; }
.st-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.st-val { position: relative; min-width: 44px; height: 50px; border-radius: 12px; border: none; background: #fff; font-family: 'Lora', serif; font-size: 1.2rem; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 2px #FFCCBC, 0 4px 0 #FFAB91; touch-action: manipulation; }
.st-val small { position: absolute; bottom: 2px; left: 0; right: 0; font-size: 0.55rem; color: #A1887F; font-family: 'IBM Plex Sans', sans-serif; }
.st-val.picked { background: #FFE0B2; box-shadow: 0 0 0 3px #FB8C00; }

/* ---------- v101 Review: Fiesta Quiz Board, Math Clinic ---------- */
.qb-hero { position: relative; text-align: center; padding: 22px 12px 16px; border-radius: 18px; background: radial-gradient(circle at 50% 0, #7E57C2, #311B92); color: #fff; overflow: hidden; margin-bottom: 14px; }
.qb-hero h2 { margin: 6px 0 4px; font-family: 'Lora', serif; font-size: 1.7rem; color: #FFD54F; text-shadow: 0 2px 0 #4A148C; }
.qb-hero p { margin: 0; font-size: 0.82rem; opacity: .9; }
.qb-lights { display: flex; justify-content: space-between; padding: 0 6px; }
.qb-lights i { width: 10px; height: 10px; border-radius: 50%; background: #FFEB3B; box-shadow: 0 0 8px #FFEB3B; animation: qbBlink 1.2s infinite alternate; }
.qb-lights i:nth-child(even) { animation-delay: .6s; background: #FF4081; box-shadow: 0 0 8px #FF4081; }
@keyframes qbBlink { from { opacity: .35; } to { opacity: 1; } }
.qb-q { font-weight: 800; text-align: center; margin: 4px 0 8px; }
.qb-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qb-pickbtn { display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; border: none; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #D1C4E9, 0 4px 0 #B39DDB; cursor: pointer; text-align: left; touch-action: manipulation; }
.qb-pickbtn:first-child { grid-column: 1 / -1; background: #FFF8E1; box-shadow: 0 0 0 2px #FFE082, 0 4px 0 #FFCA28; }
.qb-pickbtn b { font-size: 1.02rem; } .qb-pickbtn small { font-size: 0.72rem; color: var(--ink-soft); }
.qb-tip { font-size: 0.8rem; color: var(--ink-soft); text-align: center; margin: 10px 0; }
.qb-scores { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.qb-team { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 4px 10px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 2px var(--tc); font-size: 0.78rem; font-weight: 700; color: #1B2A12; }
.qb-team b { font-family: 'Lora', serif; font-size: 1.15rem; color: var(--tc); }
.qb-team.turn { background: var(--tc); color: #fff; transform: scale(1.06); } .qb-team.turn b { color: #fff; }
.qb-turn, .qb-answering { text-align: center; font-size: 0.95rem; margin-bottom: 8px; color: var(--tc); }
.qb-answering:empty { display: none; }
.qb-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; border-radius: 16px; background: #1A237E; }
.qb-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: var(--cc); color: #fff; font-size: 1.1rem; }
.qb-head span { font-size: 0.6rem; font-weight: 900; letter-spacing: .04em; }
.qb-tile { aspect-ratio: 1.35; border: none; border-radius: 10px; background: linear-gradient(180deg, #3949AB, #283593); color: #FFD54F; font-family: 'Lora', serif; font-size: 1.25rem; font-weight: 800; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 0 0 2px var(--cc); touch-action: manipulation; text-shadow: 0 2px 0 #000; }
.qb-tile:hover:not(.used) { filter: brightness(1.2); }
.qb-tile.used { background: #303F9F; opacity: .45; cursor: default; font-size: 1.1rem; text-shadow: none; }
.qb-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 0.72rem; color: var(--ink-soft); }
.qb-card { box-shadow: 0 0 0 3px var(--cc) !important; }
.qb-special { text-align: center; padding: 18px 12px; border-radius: 18px; background: #FFF3E0; color: #1B2A12; }
.qb-special h3, .qb-special p, .qb-special b { color: #1B2A12; } /* dark green-black: readable in light AND dark mode (the card stays light) */
.qb-special.bagyo { background: linear-gradient(180deg, #CFD8DC, #90A4AE); }
.qb-special.final { background: linear-gradient(180deg, #FFF8E1, #FFE082); }
.qb-special h3 { margin: 4px 0; font-family: 'Lora', serif; font-size: 1.4rem; }
.qb-special p { font-size: 0.9rem; margin: 6px 0 12px; }
.qb-big { font-size: 3.2rem; animation: rrPop .6s ease; }
.qb-special.bagyo .qb-big { animation: qbSpin 1.4s linear infinite; display: inline-block; }
@keyframes qbSpin { to { transform: rotate(-360deg); } }
.qb-bet { display: inline-flex; align-items: center; gap: 10px; }
.qb-bet b { min-width: 60px; font-family: 'Lora', serif; font-size: 1.5rem; }
.qb-betq { display: flex; gap: 6px; justify-content: center; margin: 10px 0 14px; }
.qb-bets { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.qb-betrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: #fff; color: #1B2A12; box-shadow: 0 0 0 2px var(--tc); font-weight: 700; flex-wrap: wrap; }
.qb-betrow .qb-bet b { font-size: 1.1rem; min-width: 44px; }
.qb-buzz { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qb-buzzbtn { padding: 12px 14px; border: none; border-radius: 14px; background: var(--tc); color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.25); touch-action: manipulation; }
.qb-mark { padding: 8px 12px; border-radius: 10px; border: 2px solid #43A047; background: #fff; color: #2E7D32; font-weight: 800; cursor: pointer; margin-left: 4px; }
.qb-mark.no { border-color: #E53935; color: #C62828; }
.qb-mark.on { background: #43A047; color: #fff; } .qb-mark.no.on { background: #E53935; color: #fff; }
.qb-apply:disabled { opacity: .5; }
.qb-podium { display: flex; flex-direction: column; gap: 6px; margin: 10px auto; max-width: 360px; }
.qb-pod { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; padding: 8px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 2px var(--tc); }
.qb-pod em { font-style: normal; font-family: 'Lora', serif; font-weight: 800; font-size: 1.3rem; color: var(--tc); }
@media (min-width: 900px) { .qb-tile { font-size: 2rem; aspect-ratio: 2.4; } .qb-head { font-size: 1.6rem; } .qb-head span { font-size: 0.85rem; } .sg-quizboard { max-width: 900px; } .sg-quizboard .sg-prompt { font-size: 1.4rem; } }

.mc-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #E0F2F1, #B2DFDB); margin-bottom: 12px; }
.mc-hero h2 { margin: 0; font-family: 'Lora', serif; color: #00695C; }
.mc-hero p { margin: 2px 0 0; font-size: 0.82rem; color: #00796B; }
.mc-cross { width: 52px; height: 52px; flex: none; border-radius: 14px; background: #fff; color: #E53935; font-size: 2.2rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 #80CBC4; }
.mc-h { margin: 14px 0 4px; font-size: 1rem; }
.mc-chart { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 6px 0 12px; }
@media (min-width: 640px) { .mc-chart { grid-template-columns: 1fr 1fr; } }
.mc-cat { background: #fff; border-radius: 12px; padding: 6px 8px; box-shadow: 0 0 0 1.5px #E0E0E0; }
.mc-cat-h { font-size: 0.72rem; font-weight: 900; color: var(--cc); margin-bottom: 4px; }
.mc-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr auto; align-items: center; gap: 6px; font-size: 0.8rem; padding: 2px 0; }
.mc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-bar { display: block; height: 9px; border-radius: 5px; background: #ECEFF1; overflow: hidden; }
.mc-bar i { display: block; height: 100%; border-radius: 5px; background: #B0BEC5; transition: width .6s ease; }
.green .mc-bar i { background: #43A047; } .yellow .mc-bar i { background: #FDD835; } .red .mc-bar i { background: #E53935; }
.mc-v { font-size: 0.72rem; font-weight: 800; min-width: 52px; text-align: right; color: #546E7A; }
.mc-row.none .mc-v { font-weight: 400; color: #90A4AE; }
.mc-v em { font-style: normal; } .mc-v em.up { color: #2E7D32; } .mc-v em.down { color: #C62828; }
.mc-treat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 8px; }
.mc-tm { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1.5px #E0E0E0; }
.mc-tm span:first-child { font-size: 1.2rem; }
.mc-tm .mc-bar { width: 90%; height: 7px; }
.mc-tm small { font-size: 0.55rem; text-align: center; line-height: 1.1; color: #546E7A; }
.mc-tm.hit { animation: rrPop .5s ease; box-shadow: 0 0 0 2.5px #26A69A; }
.mc-back { font-size: 0.8rem; color: #00796B; margin-top: 4px; font-weight: 700; }
.mc-rx { background: #FFFDE7; border: 2px dashed #FBC02D; border-radius: 14px; padding: 10px 12px; margin: 8px 0; font-size: 0.9rem; }
.mc-rx > b { display: block; margin-bottom: 4px; }
.mc-all summary, .mc-stu summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.mc-class { background: #E3F2FD; border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.mc-class h3 { margin: 0 0 6px; }
.mc-sub { font-size: 0.8rem; font-weight: 800; color: #1565C0; }
.mc-top { margin: 6px 0; padding-left: 20px; }
.mc-top li { margin: 3px 0; font-size: 0.88rem; }
.mc-top li span { font-weight: 700; } .mc-top li b { margin: 0 6px; } .mc-top b.red { color: #C62828; } .mc-top b.yellow { color: #F9A825; } .mc-top b.green { color: #2E7D32; }
.mc-top small { color: var(--ink-soft); }
.mc-table { width: 100%; font-size: 0.78rem; } .mc-table td { text-align: left; }
.mc-start { margin-top: 6px; }

/* ===== v225 🔺 TRIGONOMETRY games (sg-trig.js) ===== */
.tg-svg { width: 100%; height: auto; display: block; }
.lr-ladder { transition: x2 .8s ease, y2 .8s ease; }
.cc-boat { transition: x .8s ease; }
.ib-plank { transition: opacity .5s ease; }
.tg-tap { touch-action: manipulation; }
.tg-side, .tg-pt { cursor: pointer; }
.tg-side:hover path:last-child, .tg-side:focus-visible path:last-child { stroke-width: 9; }
.tg-side.picked path:last-child { stroke: #6A1B9A; stroke-width: 10; }
.tg-pt:hover circle:last-child, .tg-pt:focus-visible circle:last-child { r: 10; }
.tg-pt.picked circle:last-child { fill: #E53935; r: 11; }

/* ===== v225 ⏱️ class-period games + 🔳 score QR ===== */
.pq-box { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed #F57C00; background: #FFF8E1; font-size: .92rem; line-height: 1.45; }
.pq-box.on { border-style: solid; }
.pq-box .btn-small { margin-top: 8px; }
.pq-left { font-size: 1.15rem; color: #E65100; }
.pq-chip { font-weight: 800; margin-left: 8px; }
.pq-chip.low { background: #FFEBEE; color: #C62828; border-color: #EF9A9A; }
.pq-card { max-width: 420px; margin: 0 auto; text-align: center; background: #fff; color: #14210F; border: 2px solid var(--olive-deep, #4B5E2A); border-radius: 18px; padding: 16px 14px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.pq-head { font-size: 1.25rem; font-weight: 800; }
.pq-sub { font-size: .9rem; color: #5D4037; margin-bottom: 8px; }
.pq-game { font-size: 1.05rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pq-game .ai-svg { width: 28px; height: 28px; }
.pq-name { font-weight: 700; margin: 4px 0 8px; }
.pq-qr { width: min(76vw, 300px); height: auto; image-rendering: pixelated; border: 6px solid #fff; outline: 1px solid #ddd; border-radius: 8px; background: #fff; }
.pq-noqr { padding: 18px; border: 1px dashed #bbb; border-radius: 10px; font-size: .9rem; }
.pq-score b { display: block; font-size: 2.2rem; line-height: 1.1; margin-top: 6px; }
.pq-score small { color: #555; }
.pq-meta { font-size: .85rem; color: #444; margin-top: 6px; line-height: 1.5; }
.pq-mins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pq-min { padding: 10px 4px; }
.pq-min.on { border-color: var(--olive-deep, #4B5E2A); box-shadow: 0 0 0 2px var(--olive-deep, #4B5E2A) inset; }
.arc-period { font-size: .74rem; color: #E65100; margin: 2px 0 0; text-align: center; }
.arc-period .link-btn { font-size: .74rem; padding: 0; }
.qs-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.55); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 12px; }
.qs-card { width: min(560px, 100%); background: var(--paper, #fff); color: var(--ink, #222); border-radius: 16px; padding: 12px 14px 16px; }
.qs-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 1.05rem; }
.qs-cam { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.qs-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qs-frame { position: absolute; inset: 14% 22%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }
.qs-status { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--paper-2, #f4f1e8); font-size: .92rem; min-height: 1.4em; }
.qs-status.ok { background: #E8F5E9; color: #1B5E20; }
.qs-status.no { background: #FFEBEE; color: #B71C1C; }
.qs-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 6px; }
.qs-list { display: flex; flex-direction: column; gap: 6px; }
.qs-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border: 1px solid var(--rule, #ddd); border-radius: 10px; font-size: .88rem; }
.qs-row.waiting { border-color: #FFB74D; background: #FFF8E1; }
.qs-row.saved { border-color: #A5D6A7; }
.qs-row.error { border-color: #EF9A9A; background: #FFEBEE; }
.qs-score { font-size: 1.4rem; font-weight: 800; align-self: center; }
.qs-st { grid-column: 1 / -1; font-size: .78rem; color: var(--ink-soft, #666); }
.pq-float { position: fixed; top: 10px; right: 10px; z-index: 10050; padding: 6px 12px; border-radius: 999px; background: #FFF8E1; color: #E65100; border: 2px solid #FFB74D; font-weight: 800; font-size: .95rem; box-shadow: 0 2px 8px rgba(0,0,0,.15); pointer-events: none; }
.pq-float.low { background: #FFEBEE; color: #C62828; border-color: #EF9A9A; }
.pq-mins { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ===== v226 🪑 Seat Plan ===== */
.sp-secs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.sp-setup { border: 1px solid var(--rule, #ddd); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; background: var(--card, #fff); }
.sp-setup summary { font-weight: 800; cursor: pointer; }
.sp-dims { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 10px 0 4px; }
.sp-dims label { font-size: .82rem; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-dims input, .sp-dims select { width: 130px; margin: 0; }
.sp-table-wrap { overflow-x: auto; max-height: 52vh; overflow-y: auto; }
.sp-table td, .sp-table th { font-size: .82rem; text-align: center; white-space: nowrap; }
.sp-table td:first-child { text-align: left; }
.sp-table input[type=checkbox] { width: auto; margin: 0; }
.sp-table select { width: auto; margin: 0; padding: 2px 4px; font-size: .8rem; }
.sp-lo { color: #E65100; font-weight: 800; } .sp-hi { color: #2E7D32; font-weight: 800; }
.sp-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; }
.sp-tools { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 6px; }
.sp-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-lab { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; margin: 0; }
.sp-lab input { width: auto; margin: 0; }
.sp-legend { font-size: .78rem; color: var(--ink-soft, #666); margin: 4px 0 6px; }
.sp-board { overflow-x: auto; border: 1px solid var(--rule, #ddd); border-radius: 12px; background: #fff; padding: 4px; }
.sp-svg { display: block; max-width: none; margin: 0 auto; }
.sp-board.fit { overflow: hidden; }
.sp-zoom { display: inline-flex; align-items: center; gap: 4px; }
.sp-zoom .btn-small { padding: 4px 9px; min-width: 0; }
.sp-zoom-n { font-size: .78rem; min-width: 64px; text-align: center; color: var(--ink-soft, #666); }
.sp-seat { cursor: pointer; }
.sp-seat:hover rect:first-child { stroke-width: 3; }

/* ===== v229 🧹 Cleaners Today ===== */
.cln-card { border: 1px solid var(--rule, #ddd); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; background: var(--card, #fff); }
.cln-shared { background: #FFF8E1; color: #4E342E; }
.cln-shared .btn-small { margin-top: 8px; }
.cln-days { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.cln-day { display: inline-flex; gap: 4px; align-items: center; font-size: .88rem; margin: 0; }
.cln-day input { width: auto; margin: 0; }
.cln-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.cln-req { margin-top: 10px; font-size: .88rem; }
.cln-req-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.cln-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 0 0 14px; }
.cln-group { border: 1px solid var(--rule, #ddd); border-radius: 12px; padding: 8px 10px; font-size: .84rem; background: var(--card, #fff); line-height: 1.5; }
.cln-group.today { border: 2px solid var(--olive-deep, #4B5E2A); }
.cln-g-head { font-weight: 800; margin-bottom: 4px; display: flex; justify-content: space-between; }
.cln-g-head span { color: var(--ink-soft, #666); font-weight: 600; }
.cln-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.cln-date { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; margin: 0; }
.cln-date input { width: auto; margin: 0; }
.cln-table td, .cln-table th { text-align: center; font-size: .84rem; }
.cln-table td:first-child { text-align: left; white-space: nowrap; }
.cln-table th small { font-weight: 600; font-size: .68rem; }
.cln-table input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
.cln-absent td { opacity: .55; }
.cln-ab { display: inline-block; font-size: .7rem; font-weight: 800; color: #B71C1C; background: #FFEBEE; border-radius: 6px; padding: 0 5px; }
.cln-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.cln-tools { margin: 14px 0 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.cln-me { padding: 10px 12px; border-radius: 12px; background: var(--card, #fff); border: 1px solid var(--rule, #ddd); }
.cln-me.on { background: #FFF8E1; border-color: #FFB74D; }
.cln-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; font-size: .9rem; }
.cln-list .me { font-weight: 800; }
.cln-all { margin-top: 14px; font-size: .86rem; line-height: 1.6; }
.cln-all summary { font-weight: 700; cursor: pointer; }
/* v230 👀 cleaning monitor per group */
.cln-mrow { display: flex; gap: 6px; align-items: flex-start; margin: 0; padding: 2px 4px; border-radius: 8px; font-size: .84rem; font-weight: 400; cursor: default; }
label.cln-mrow { cursor: pointer; }
.cln-mrow input { width: 16px; height: 16px; margin: 3px 0 0; flex: none; }
.cln-mrow.on { background: #FFF3CD; font-weight: 700; }
.cln-mon-tag { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .03em; color: #5D4037; background: #FFE082; border-radius: 6px; padding: 0 5px; vertical-align: 1px; white-space: nowrap; }
.cln-monline { margin: 0 0 8px; font-size: .9rem; }
.cln-mon-box { border: 2px solid #FFB74D; background: #FFFDF5; border-radius: 14px; padding: 10px 12px; }
.cln-mon-h { font-weight: 800; margin: 6px 0 6px; }
.cln-chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 8px; }
.cln-chk-list { display: grid; gap: 6px; }
.cln-chk { display: flex; gap: 8px; align-items: center; margin: 0; padding: 8px 10px; border: 1px solid var(--rule, #ddd); border-radius: 10px; background: var(--card, #fff); font-size: .92rem; font-weight: 500; cursor: pointer; }
.cln-chk input { width: 22px; height: 22px; margin: 0; flex: none; }
.cln-chk:has(input:checked) { background: #E8F5E9; border-color: #81C784; }
.cln-chk-all { font-weight: 700; }
.cln-chk.cln-absent { opacity: .55; cursor: default; }
/* v231 multimodal = exempt from cleaning that day */
.cln-mm { display: inline-block; font-size: .7rem; font-weight: 800; color: #1A4E8A; background: #E3F0FF; border-radius: 6px; padding: 0 5px; white-space: nowrap; }
.cln-list .cln-absent { opacity: .55; }
/* v232 🧑‍💻 multimodal learners */
.stu-mm-cell { text-align: center; white-space: nowrap; }
.stu-mm-cell input { width: 20px; height: 20px; margin: 0; vertical-align: middle; }
tr.stu-mm td:first-child { background: #FFF8D6; }
.stu-mm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; font-size: .86rem; color: var(--ink-soft, #555); }
.stu-mm-bar.on { position: sticky; bottom: 8px; background: #FFFDF2; border: 2px solid #FFD54F; border-radius: 12px; padding: 8px 10px; color: inherit; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.mm-tag { display: inline-block; font-size: .68rem; font-weight: 800; color: #5D4600; background: #FFF3B0; border-radius: 6px; padding: 0 5px; vertical-align: 1px; white-space: nowrap; }
td.smon-name.smon-mm { background: #FFF3B0 !important; }
td.smon-name.smon-mm .smon-prof { color: #5D4600; }
.smon-mm-key { background: #FFF3B0; color: #5D4600; font-weight: 700; padding: 0 5px; border-radius: 5px; }
/* v233 🪜 Step Guides (notebook) */
.nbp-steps { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0; padding: 9px 12px; border: 2px solid #8FB86B; border-radius: 12px; background: #F3F9EC; color: #2F3B1C; text-align: left; font: inherit; font-size: .92em; cursor: pointer; box-shadow: 0 2px 0 #C9DDB5; }
.nbp-steps:active { transform: translateY(1px); box-shadow: none; }
.nbp-steps.done { border-color: #66BB6A; background: #E8F5E9; }
.nbp-steps-ic { font-size: 1.5em; flex: none; }
.nbp-steps-tx { flex: 1; line-height: 1.3; }
.nbp-steps-tx small { display: block; color: #5B6B45; font-size: .82em; margin-top: 2px; }
.nbp-steps i { font-style: normal; font-size: 1.4em; color: #6B8E4E; }
.stg-card { max-width: 560px !important; max-height: 88vh !important; padding: 14px 14px 10px !important; }
.stg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; font-size: 1.02rem; color: #2F3B1C; margin: 0 0 6px; }
.stg-x { border: none; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--ink-soft, #666); padding: 2px 6px; }
.stg-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #3E5A22; background: #E3F0D3; border-radius: 6px; padding: 2px 7px; margin: 0 0 8px; }
.stg-prob { background: #FFFDF2; border: 1px solid #F0E3B5; border-radius: 10px; padding: 9px 11px; margin: 0 0 10px; line-height: 1.5; font-size: .95rem; }
.stg-steps { display: grid; gap: 8px; }
.stg-step { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--rule, #ddd); border-radius: 10px; padding: 8px 10px; background: var(--card, #fff); }
.stg-step.hint { border-color: #FFB74D; background: #FFF8E9; }
.stg-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #4B5E2A; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.stg-body { flex: 1; min-width: 0; }
.stg-name { font-weight: 800; font-size: .88rem; color: #2F3B1C; }
.stg-hint-tag { font-size: .65rem; font-weight: 800; color: #8A4B00; background: #FFE0B2; border-radius: 5px; padding: 0 5px; vertical-align: 1px; }
.stg-math { margin: 3px 0; font-size: .98rem; line-height: 1.6; overflow-x: auto; }
.stg-why { font-size: .84rem; color: var(--ink, #222); }
.stg-tl { font-size: .8rem; color: #5B6B45; font-style: italic; margin-top: 1px; }
.stg-ans { margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; background: #E8F5E9; border: 1px solid #A5D6A7; }
.stg-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 4px; }
.stg-btns .btn-primary { width: auto; flex: 1; min-width: 160px; }
.stg-form { display: grid; gap: 8px; margin: 12px 0 0; }
.stg-in { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; margin: 0; }
.stg-in input { flex: 1; max-width: 200px; margin: 0; font-size: 1rem; }
.stg-picks { display: grid; gap: 6px; }
.stg-pick { text-align: left; padding: 9px 11px; border: 2px solid var(--rule, #ddd); border-radius: 10px; background: var(--card, #fff); font: inherit; font-size: .9rem; cursor: pointer; }
.stg-pick.on { border-color: #4B5E2A; background: #EEF5E4; font-weight: 700; }
.stg-fb { min-height: 1.2em; margin-top: 8px; font-size: .9rem; font-weight: 600; }
.nb-steps-ta { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }

/* v633 Term 3 games: cards dropped into slots (timeline, ranking), the critical-value curve, the t-table */
.t3-place { display: grid; gap: 8px; }
.t3-slots { display: grid; gap: 6px; }
.t3-timeline .t3-slots { grid-template-columns: repeat(6, 1fr); position: relative; padding-bottom: 4px; }
.t3-timeline .t3-slots::after { content: ''; position: absolute; left: 4%; right: 4%; bottom: 25px; height: 3px; background: #33691E; border-radius: 2px; z-index: 0; }
.t3-rank .t3-slots { grid-template-columns: 1fr; }
.t3-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; z-index: 1; }
.t3-rank .t3-slot { flex-direction: row-reverse; justify-content: flex-end; }
.t3-slot-in { min-height: 44px; width: 100%; display: flex; align-items: center; justify-content: center; border: 2px dashed #B0BEC5; border-radius: 12px; background: #fff; }
.t3-slot.full .t3-slot-in { border-style: solid; border-color: #7CB342; background: #F1F8E9; }
.t3-slot.over .t3-slot-in { border-color: #F9A825; background: #FFFDE7; }
.t3-rank .t3-slot-in { flex: 1; }
.t3-slot-l { font-size: 0.78rem; font-weight: 800; color: #455A64; white-space: nowrap; background: #fff; padding: 0 2px; }
.t3-rank .t3-slot-l { width: 3em; text-align: right; font-size: 0.9rem; }
.t3-drop { color: #B0BEC5; font-size: 1.2rem; font-weight: 800; }
.t3-tray { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 44px; }
.t3-card { font: inherit; font-weight: 800; font-size: 0.86rem; padding: 8px 10px; border: none; border-radius: 10px; background: #fff; color: #263238; box-shadow: 0 0 0 2px #90A4AE, 0 3px 0 #78909C; cursor: grab; touch-action: manipulation; }
.t3-timeline .t3-slot .t3-card { font-size: 0.68rem; padding: 6px 3px; box-shadow: 0 0 0 2px #7CB342; }
.t3-card.held { background: #FFF59D; box-shadow: 0 0 0 3px #F9A825, 0 3px 0 #F9A825; }
.t3-done { color: #2E7D32; font-weight: 800; align-self: center; }
.t3-curve svg { display: block; }
.t3-ttab table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.t3-ttab th, .t3-ttab td { border: 1px solid #B2DFDB; padding: 2px; text-align: center; }
.t3-ttab th { background: #E0F2F1; color: #004D40; font-weight: 800; }
.t3-tc { font: inherit; font-family: ui-monospace, monospace; width: 100%; min-height: 36px; border: none; border-radius: 6px; background: #fff; cursor: pointer; }
.t3-tc.picked { background: #FFF59D; box-shadow: 0 0 0 2px #F9A825; font-weight: 800; }

/* v634 Blueprint Detective: the draggable ruler */
.t1-rul .t1-map { touch-action: none; }
.t1-nudge { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.t1-nudge button { font: inherit; font-weight: 800; min-width: 48px; min-height: 40px; border: none; border-radius: 10px; background: #fff; box-shadow: 0 0 0 2px #90CAF9, 0 3px 0 #64B5F6; cursor: pointer; }
/* v647 Root Escape: the critters on the left, the radical form of the board on the right */
.re-row { display: grid; grid-template-columns: minmax(0, auto) minmax(33%, 1fr); gap: 8px; align-items: stretch; }
.re-row .re-stage { min-width: 0; }
.re-form { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 2px solid #C5E1A5; color: #263238; text-align: center; min-width: 0; }
.re-form small { font-size: 0.7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #689F38; }
.re-form b { margin-top: 4px; font-family: 'Cambria Math', 'STIX Two Math', 'Times New Roman', serif; font-size: 2rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.re-rad { white-space: nowrap; } .re-ov { border-top: 2px solid currentColor; padding: 0 .08em; margin-left: .02em; }
html[data-theme="dark"] .re-form { background: #1e2530; color: #e8eef5; border-color: #4a6b35; }
/* v648 🛗 Elevator Ride: a real-looking building — the shaft on the left, windows on every floor, basements underground */
.er-bldg2 { position: relative; max-width: 360px; margin: 0 auto; display: flex; flex-direction: column; }
.er-roof2 { position: relative; height: 30px; margin: 0 14px; background: linear-gradient(#78909C, #546E7A); border-radius: 6px 6px 0 0; display: flex; align-items: center; justify-content: center; }
.er-tank { position: absolute; right: 14px; top: -14px; width: 26px; height: 16px; border-radius: 4px 4px 0 0; background: #90A4AE; border: 2px solid #546E7A; }
.er-sign { font-size: .7rem; font-weight: 900; letter-spacing: .12em; color: #FFF8E1; }
.er-body { position: relative; display: grid; grid-template-columns: 46px 1fr; background: #ECEFF1; border: 4px solid #607D8B; border-top: 0; }
.er-shaft { position: relative; background: linear-gradient(90deg, #455A64, #37474F 50%, #455A64); border-right: 3px solid #263238; }
.er-cable { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #B0BEC5; opacity: .5; }
.er-car2 { position: absolute; left: 4px; right: 4px; top: 0; height: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: linear-gradient(#FFD54F, #FFB300); border: 2px solid #E65100; border-radius: 4px; box-shadow: 0 2px 6px #0006; transition: top .7s cubic-bezier(.5, 0, .3, 1), opacity .2s; opacity: 0; z-index: 2; }
.er-floors { display: flex; flex-direction: column; }
.er-fl { position: relative; display: grid; grid-template-columns: 8px 54px 1fr; align-items: center; gap: 6px; width: 100%; height: 30px; min-height: 0; margin: 0; padding: 0 8px 0 0; border: 0; border-bottom: 3px solid #B0BEC5; background: linear-gradient(#FBE9E7, #F8D7CF); color: #3E2723; font: inherit; cursor: pointer; text-align: left; }
.er-fl .er-door { height: 70%; align-self: end; background: #90A4AE; border-radius: 2px 2px 0 0; }
.er-fl .er-lab { display: flex; align-items: baseline; gap: 4px; } .er-fl .er-lab b { font-size: .95rem; } .er-fl .er-lab small { font-size: .7rem; opacity: .7; }
.er-wins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 64%; }
.er-wins i { border-radius: 2px; background: linear-gradient(135deg, #B3E5FC, #81D4FA 60%, #4FC3F7); border: 2px solid #8D6E63; box-shadow: inset 0 -2px 0 #0002; }
.er-wins i.on { background: linear-gradient(135deg, #FFF9C4, #FFE082); }
.er-wins i.v { height: 40%; align-self: center; border: 0; border-radius: 99px; background: repeating-linear-gradient(90deg, #5D4037 0 4px, #8D6E63 4px 8px); }
.er-fl.g { background: linear-gradient(#FFF8E1, #FFECB3); }
.er-fl.g .er-wins i { background: linear-gradient(135deg, #E1F5FE, #B3E5FC); }
.er-fl.b { background: linear-gradient(#A1887F, #8D6E63); color: #FFF3E0; border-bottom-color: #6D4C41; }
.er-fl.b .er-door { background: #5D4037; }
.er-fl:hover { box-shadow: inset 0 0 0 3px #FF7043; }
.er-fl.pick { box-shadow: inset 0 0 0 4px #E65100; background: #FFE082; color: #3E2723; }
.er-street { display: flex; align-items: flex-end; justify-content: space-around; height: 16px; background: linear-gradient(#9CCC65 0 30%, #795548 30% 45%, #8D6E63 45%); font-size: .8rem; line-height: 1; margin: 0 -18px; padding: 0 10px; }
.er-street span { transform: translateY(-6px); }
.er-floors .er-street { margin: 0; }
html[data-theme="dark"] .er-fl { background: #3a2f2c; color: #f3e6e0; } html[data-theme="dark"] .er-body { background: #263238; }
/* v648 Teach Screen: Elevator Ride splits the middle — the question (top half) and its banner (bottom half) on the left, the building on the right */
.sg-ts.sg-integers .sg-mid-in { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr auto; column-gap: 18px; row-gap: 10px; }
.sg-ts.sg-integers .sg-mid-in > .sg-card { grid-column: 1; grid-row: 1; margin: 0; display: flex; flex-direction: column; justify-content: center; }
.sg-ts.sg-integers .sg-mid-in > .sg-card .sg-prompt { font-size: 2rem; }
.sg-ts.sg-integers .sg-mid-in > .sg-scene { grid-column: 1; grid-row: 2; margin: 0; display: flex; align-items: center; }
.sg-ts.sg-integers .sg-mid-in > .sg-scene svg { width: 100%; height: auto; max-height: 100%; }
.sg-ts.sg-integers .sg-mid-in > .sg-actions { grid-column: 1; grid-row: 3; }
.sg-ts.sg-integers .sg-mid-in > .sg-input { grid-column: 2; grid-row: 1 / span 3; min-height: 0; display: flex; flex-direction: column; }
.sg-ts.sg-integers .er-bldg2 { max-width: none; width: 100%; flex: 1; min-height: 0; }
.sg-ts.sg-integers .er-body { flex: 1; min-height: 0; }
.sg-ts.sg-integers .er-floors { min-height: 0; }
.sg-ts.sg-integers .er-fl { flex: 1 1 0; height: auto; }
.sg-ts.sg-integers .er-fl .er-lab b { font-size: 1.2rem; }
/* v648 Elevator Ride, more real: a concrete facade with window frames, glass that shows the sky, rooms lit or dark
   (curtains, blinds), a steel-and-glass shaft, and a glass car with three passengers */
.er-body { border-color: #546E7A; background: #CFD8DC; }
.er-shaft { background: linear-gradient(90deg, #263238 0 3px, #9FC3D3 3px, #B8D9E6 40%, #8DB4C6 60%, #9FC3D3 calc(100% - 3px), #263238 calc(100% - 3px)); }
.er-shaft::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0000 22%, #546E7A 22% calc(22% + 2px), #0000 calc(22% + 2px) calc(78% - 2px), #546E7A calc(78% - 2px) 78%, #0000 78%); opacity: .6; pointer-events: none; }
.er-cable { width: 1px; background: #37474F; opacity: .7; }
.er-car2 { left: 3px; right: 3px; align-items: flex-end; padding: 0 2px; background: linear-gradient(115deg, #E1F5FEcc, #B3E5FC99 45%, #FFFFFFbb 52%, #81D4FA99 58%, #B3E5FCaa); border: 2px solid #B0BEC5; border-top: 4px solid #78909C; border-bottom: 4px solid #78909C; border-radius: 3px; box-shadow: 0 2px 8px #0005, inset 0 0 0 1px #fff8; }
.er-car2::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #90A4AE; }
.er-car2 .er-glass { width: 100%; height: 92%; display: block; }
.er-fl { background: linear-gradient(#EFE6DA, #E4D8C8); border-bottom: 4px solid #A1958A; color: #3E2723; }
.er-fl::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #fff6; pointer-events: none; }
.er-fl .er-door { background: linear-gradient(90deg, #6D4C41, #8D6E63 50%, #6D4C41); }
.er-wins { gap: 7px; height: 68%; }
.er-wins i { position: relative; border: 3px solid #F5F5F5; border-bottom-width: 4px; border-radius: 1px; box-shadow: 0 2px 0 #9E9E9E, inset 0 0 0 1px #607D8B;
  background: linear-gradient(120deg, #0000 0 38%, #ffffff66 40% 47%, #0000 49% 56%, #ffffff33 57% 60%, #0000 62%), linear-gradient(90deg, #0000 calc(50% - 1px), #ECEFF1 calc(50% - 1px) calc(50% + 1px), #0000 calc(50% + 1px)), linear-gradient(#7FB3D5, #A9CCE3 55%, #D6EAF8); }
.er-wins i.on { background: linear-gradient(120deg, #0000 0 40%, #ffffff55 42% 48%, #0000 50%), linear-gradient(90deg, #0000 calc(50% - 1px), #ECEFF1 calc(50% - 1px) calc(50% + 1px), #0000 calc(50% + 1px)), radial-gradient(circle at 50% 20%, #FFFDE7, #FFE082 55%, #FFB74D); }
.er-wins i.on.cur { background: linear-gradient(90deg, #8E3B2F, #C0614B 6%, #8E3B2F 12%, #0000 13% 87%, #8E3B2F 88%, #C0614B 94%, #8E3B2F), linear-gradient(90deg, #0000 calc(50% - 1px), #ECEFF1 calc(50% - 1px) calc(50% + 1px), #0000 calc(50% + 1px)), radial-gradient(circle at 50% 20%, #FFFDE7, #FFE082 55%, #FFB74D); }
.er-wins i.off.bl { background: linear-gradient(120deg, #0000 0 40%, #ffffff44 42% 47%, #0000 49%), repeating-linear-gradient(#ECEFF1 0 3px, #B0BEC5 3px 4px); }
.er-wins i.v { border: 0; box-shadow: none; }
.er-fl.g { background: linear-gradient(#F5EEDC, #E9DCC0); }
.er-fl.g .er-wins i { border-color: #455A64; background: linear-gradient(120deg, #0000 0 38%, #ffffff77 40% 46%, #0000 48%), linear-gradient(#B3E5FC, #E1F5FE); }
.er-fl.b { background: linear-gradient(#8D6E63, #795548); border-bottom-color: #5D4037; color: #FFF3E0; }
.er-fl.pick { background: #FFE082; }
html[data-theme="dark"] .er-fl:not(.b) { background: linear-gradient(#4a423a, #3d362f); }
/* v648 🩺 Math Clinic chart: every row has the same columns, so the bars and the ▲/▼ line up in both cards */
.mc-row { grid-template-columns: minmax(0, 1fr) minmax(48px, 34%) 7.6em; }
.mc-v { display: grid; grid-template-columns: 1fr 2.6em; align-items: baseline; min-width: 0; }
.mc-v b { font-weight: inherit; text-align: right; white-space: nowrap; }
.mc-v em { text-align: right; white-space: nowrap; }
/* v651 📊 build-a-bar-graph: the ▲ ▼ buttons line up under their bars (same width as the graph, placed in %) */
.st-bwrap { position: relative; max-width: 360px; margin: 0 auto; padding-bottom: 40px; }
.st-bwrap .st-build { display: block; width: 100%; max-width: none; margin: 0; }
.st-bwrap .st-bbtns { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; padding: 0; margin: 0; }
.st-bwrap .st-bbtns span { position: absolute; top: 0; transform: translateX(-50%); display: flex; gap: 3px; }
.st-bwrap .st-bbtns .rr-b { width: 30px; height: 32px; font-size: .85rem; padding: 0; }
.sg-ts .st-bwrap { max-width: 520px; }
