/* JomMain KP2027 - shared styles. Built for projectors: big type, high contrast. */
:root {
  --bg: #fdf8ef;
  --surface: #ffffff;
  --surface-2: #f4ede0;
  --ink: #1f2430;
  --ink-soft: #5b6270;
  --line: #e4dccd;
  --brand: #e2552d;
  --brand-ink: #ffffff;
  --accent: #1e7a6d;
  --ok: #138a4b;
  --ok-bg: #dcf5e6;
  --no: #c2341f;
  --no-bg: #fde3dd;
  --gold: #e8b33b;
  --shadow: 0 6px 0 rgba(31, 36, 48, .12);
  --radius: 18px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171a21; --surface: #222631; --surface-2: #2b3040; --ink: #f3f1ec; --ink-soft: #b4b9c6;
    --line: #3a4052; --ok-bg: #173d29; --no-bg: #4a1f19; --shadow: 0 6px 0 rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #171a21; --surface: #222631; --surface-2: #2b3040; --ink: #f3f1ec; --ink-soft: #b4b9c6;
  --line: #3a4052; --ok-bg: #173d29; --no-bg: #4a1f19; --shadow: 0 6px 0 rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 18px; line-height: 1.45; min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 2px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 22px; box-shadow: var(--shadow); }
.topbar .spacer { flex: 1; }
.icon-btn { border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 12px; font-weight: 800; min-height: 44px; }
.icon-btn:hover { border-color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn { border: 0; border-radius: 14px; padding: 14px 22px; font-weight: 900; font-size: 20px; background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); transition: transform .08s; min-height: 52px; }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(31,36,48,.12); }
.btn.secondary { background: var(--surface-2); color: var(--ink); }
.btn.green { background: var(--ok); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Home ---------- */
.hero { padding: 36px 0 18px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; margin: 0 0 10px; }
.hero p { color: var(--ink-soft); max-width: 760px; margin: 0; font-size: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 800; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding-bottom: 40px; }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .12s; }
a.card:hover { transform: translateY(-3px); }
.card .emoji { font-size: 54px; line-height: 1; }
.card h3 { margin: 0; font-size: 22px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.tag.sp { background: #fff1d6; color: #8a5a00; }
.card.soon { opacity: .6; box-shadow: none; }
.section-title { font-size: 24px; margin: 28px 0 12px; }
.note { background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink-soft); font-size: 16px; }
footer { color: var(--ink-soft); font-size: 14px; padding: 24px 0 40px; border-top: 2px solid var(--line); margin-top: 20px; }

/* ---------- Game layout ---------- */
.game-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 2px solid var(--line); }
.game-head h1 { font-size: 22px; margin: 0; }
.scoreboard { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.team-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 3px solid transparent; background: var(--surface-2); font-weight: 900; font-size: 18px; }
.team-pill.active { border-color: var(--team, var(--brand)); background: var(--surface); transform: scale(1.06); }
.team-pill .pts { font-variant-numeric: tabular-nums; }
.stage { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }
.turn-banner { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px; color: #fff; font-weight: 900; font-size: 22px; margin-bottom: 14px; }
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.prompt { font-size: clamp(26px, 4vw, 40px); font-weight: 900; line-height: 1.2; margin: 6px 0 20px; }
.prompt small { display: block; font-size: 20px; color: var(--ink-soft); font-weight: 700; margin-top: 6px; }
.play-area { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; width: 100%; }
.choice { border: 3px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px; font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; box-shadow: var(--shadow); min-height: 96px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.choice:hover { border-color: var(--ink-soft); }
.choice .k { font-size: 16px; color: var(--ink-soft); border: 2px solid var(--line); border-radius: 8px; padding: 0 7px; }
.choice.right { background: var(--ok-bg); border-color: var(--ok); }
.choice.wrong { background: var(--no-bg); border-color: var(--no); }
.big-emoji { font-size: clamp(90px, 14vw, 150px); line-height: 1; }

/* ---------- Setup ---------- */
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.opt { border: 3px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 16px; font-weight: 800; min-height: 52px; text-align: left; }
.opt[aria-pressed="true"] { border-color: var(--brand); background: #fff1ea; color: #1f2430; }
.opt small { display: block; font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.opt[aria-pressed="true"] small { color: #5b6270; }
.teams-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.team-box { border: 3px solid var(--team); border-radius: 14px; padding: 10px 12px; }
.team-box b { display: block; margin-bottom: 4px; }
.team-box span { font-size: 14px; color: var(--ink-soft); }
select, input[type=text], textarea { font: inherit; font-size: 18px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); min-height: 48px; }
textarea { width: 100%; min-height: 180px; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 700; }

/* ---------- Feedback overlay ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 18, 25, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.feedback { background: var(--surface); border-radius: 26px; padding: 30px 34px; text-align: center; max-width: 640px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .25s ease-out; }
.feedback .big { font-size: 64px; }
.feedback h2 { font-size: 40px; margin: 6px 0; }
.feedback p { font-size: 22px; color: var(--ink-soft); margin: 6px 0 20px; }
.feedback.ok h2 { color: var(--ok); }
.feedback.no h2 { color: var(--no); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- End screen ---------- */
.results { width: 100%; border-collapse: collapse; font-size: 18px; }
.results th, .results td { padding: 10px 8px; border-bottom: 2px solid var(--line); text-align: left; vertical-align: top; }
.results th { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.adab { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.winner { font-size: clamp(34px, 5vw, 54px); font-weight: 900; margin: 0 0 6px; }
.tp-badge { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--surface-2); font-weight: 900; }

/* ---------- Money ---------- */
.money-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; min-height: 100px; }
.note-m { width: 170px; height: 86px; border-radius: 10px; color: #fff; font-weight: 900; font-size: 30px; display: flex; align-items: center; justify-content: flex-end; padding-right: 18px; position: relative; box-shadow: var(--shadow); border: 3px solid rgba(255,255,255,.5); }
.note-m::before { content: ""; position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.55); }
.note-m.rm1 { background: linear-gradient(135deg, #2a5db0, #1b3f80); }
.note-m.rm5 { background: linear-gradient(135deg, #2f8f4e, #1d6534); }
.note-m.rm10 { background: linear-gradient(135deg, #c8352b, #8f1f18); }
.coin-m { width: 86px; height: 86px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; text-align: center; line-height: 1; box-shadow: var(--shadow), inset 0 0 0 5px rgba(255,255,255,.35); color: #2b2b2b; }
.coin-m.silver { background: radial-gradient(circle at 35% 30%, #f5f6f7, #a9adb3); }
.coin-m.gold { background: radial-gradient(circle at 35% 30%, #fbe7a2, #c9962a); }
.coin-m.c5 { width: 70px; height: 70px; font-size: 17px; }
.money-btn { border: 0; background: none; padding: 0; }
.money-btn:active { transform: scale(.94); }
.group { border: 3px dashed var(--line); border-radius: 18px; padding: 14px; min-width: 260px; }
.group h3 { margin: 0 0 8px; text-align: center; font-size: 24px; }
.tray { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 96px; width: 100%; background: var(--surface-2); border-radius: 18px; padding: 10px; }
.paybar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; }
.price-tag { display: inline-flex; align-items: center; gap: 12px; background: var(--surface); border: 3px solid var(--gold); border-radius: 18px; padding: 10px 22px; font-size: 34px; font-weight: 900; }

/* ---------- Ten frame ---------- */
.tenframe { display: grid; grid-template-columns: repeat(5, 64px); gap: 6px; padding: 8px; background: var(--surface-2); border-radius: 14px; }
.tenframe i { width: 64px; height: 64px; border-radius: 10px; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; }
.tenframe i.on::after { content: ""; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); }
.tenframe i.on.b::after { background: var(--accent); }
.frames { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.equation { font-size: clamp(44px, 7vw, 76px); font-weight: 900; letter-spacing: .02em; }
.equation .blank { display: inline-block; min-width: 1.4em; border-bottom: 6px solid var(--brand); text-align: center; color: var(--brand); }

/* ---------- Syllable train ---------- */
.train { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 130px; }
.engine { font-size: 92px; line-height: 1; }
.wagon { min-width: 120px; height: 96px; border-radius: 14px 14px 8px 8px; background: var(--accent); color: #fff; font-size: 40px; font-weight: 900; display: grid; place-items: center; position: relative; padding: 0 14px; }
.wagon::before, .wagon::after { content: ""; position: absolute; bottom: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 4px solid var(--surface); }
.wagon::before { left: 14px; } .wagon::after { right: 14px; }
.wagon.empty { background: transparent; border: 4px dashed var(--line); color: var(--ink-soft); }
.syl-pool { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.syl { border: 3px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px 26px; font-size: 40px; font-weight: 900; box-shadow: var(--shadow); min-width: 110px; }
.syl:disabled { opacity: .3; }
.word-gap { font-size: clamp(48px, 8vw, 84px); font-weight: 900; letter-spacing: .04em; }
.word-gap .blank { color: var(--brand); border-bottom: 6px solid var(--brand); padding: 0 8px; }

/* ---------- Scenario ---------- */
.scenario { background: var(--surface); border: 3px solid var(--line); border-radius: 26px; padding: 26px; text-align: center; max-width: 820px; width: 100%; box-shadow: var(--shadow); }
.scenario .big-emoji { margin-bottom: 8px; }
.scenario p { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin: 0; }
.choice.safe { border-color: #7ccf9d; }
.choice.unsafe { border-color: #f0a090; }

/* ---------- Tingkatan 1 ---------- */
.num-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.num-chip { min-width: 110px; padding: 10px 22px; border-radius: 20px; background: var(--surface-2); border: 3px solid var(--line); font-size: clamp(44px, 7vw, 72px); font-weight: 900; text-align: center; }
.equation.alg { font-family: "Cambria Math", "Times New Roman", serif; font-style: normal; }
.balance { display: flex; align-items: flex-end; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pan { min-width: 180px; min-height: 84px; display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; justify-content: center; padding: 8px 10px; border-bottom: 8px solid var(--ink); border-radius: 0 0 40px 40px; background: var(--surface-2); }
.fulcrum { font-size: 56px; line-height: 1; }
.xbox { width: 52px; height: 52px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font: italic 900 30px "Cambria Math", "Times New Roman", serif; }
.wt { min-width: 52px; height: 52px; padding: 0 10px; border-radius: 26px 26px 10px 10px; background: var(--gold); color: #3a2a00; display: grid; place-items: center; font-size: 26px; font-weight: 900; }
.notation { display: inline-flex; color: var(--ink); }
.notation svg { max-width: 100%; height: auto; }
.choices.notes .choice { color: var(--ink); }
.choices.wide { grid-template-columns: 1fr; }
.choices.long { grid-template-columns: 1fr; }
.choices.long .choice { font-size: clamp(20px, 2.6vw, 28px); justify-content: flex-start; text-align: left; min-height: 72px; }
.play-status { font-weight: 800; color: var(--ink-soft); }
.sentence { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; line-height: 1.35; max-width: 900px; text-align: center; }
.sentence mark { background: #ffe08a; color: #2b1d00; border-radius: 8px; padding: 0 8px; }
.news, .post { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 22px; max-width: 920px; width: 100%; text-align: left; box-shadow: 0 4px 0 var(--line); }
.news h3 { margin: 4px 0 8px; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.2; }
.news p, .post p { margin: 0; font-size: clamp(17px, 2vw, 24px); line-height: 1.5; }
.news-src, .post-from { font-size: 15px; font-weight: 800; color: var(--ink-soft); }
.post { border-left: 8px solid var(--brand); }
.post-from { margin-bottom: 6px; }
.news-row { display: grid; gap: 18px; width: 100%; max-width: 1240px; align-items: center; }
.news-row .choices.long .choice { min-height: 60px; }
@media (min-width: 900px) {
  .news-row { grid-template-columns: 1.25fr 1fr; }
  .news-row .choices { grid-template-columns: 1fr; gap: 10px; }
  .news-row .choice, .news-row .choices.long .choice { min-height: 58px; font-size: clamp(19px, 1.6vw, 26px); padding: 10px 16px; }
  .news-row .news h3 { font-size: clamp(20px, 1.8vw, 30px); }
  .news-row .news p, .news-row .post p { font-size: clamp(17px, 1.5vw, 24px); line-height: 1.45; }
}

/* ---------- Report ---------- */
.tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); border: 2px solid var(--line); }
.table-wrap table { min-width: 640px; }
.empty { text-align: center; color: var(--ink-soft); padding: 30px; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; top: -20px; width: 12px; height: 18px; z-index: 60; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } * { animation-duration: .01ms !important; transition: none !important; } }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .choices { grid-template-columns: 1fr 1fr; }
  .choice { min-height: 80px; padding: 12px; }
  .pan { min-width: 120px; } .xbox, .wt { height: 40px; min-width: 40px; font-size: 22px; } .xbox { width: 40px; }
  .choices.long, .choices.wide { grid-template-columns: 1fr; }
  .tenframe { grid-template-columns: repeat(5, 46px); } .tenframe i { width: 46px; height: 46px; } .tenframe i.on::after { width: 30px; height: 30px; }
  .note-m { width: 130px; height: 66px; font-size: 24px; }
  .group { min-width: 0; width: 100%; }
  .news, .post { padding: 12px 14px; }
}

/* ---------- Papan Kejutan (board) ---------- */
.board { display: grid; gap: 12px; margin-top: 16px; }
.tile { border: 0; border-radius: 18px; min-height: 96px; font-size: clamp(34px, 5vw, 56px); font-weight: 900; color: #fff;
  background: linear-gradient(160deg, #3b82f6, #1d4ed8); box-shadow: var(--shadow); transition: transform .12s; }
.tile:nth-child(odd) { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.tile:hover:not(:disabled) { transform: translateY(-3px) scale(1.02); }
.tile.done { background: var(--surface-2); color: var(--ink-soft); box-shadow: none; }
.tile.done.right { color: var(--ok); }
.tile.done.wrong { color: var(--no); }
.surprise-card { border: 6px solid var(--gold); }

/* ---------- Lumba Masa (timer) ---------- */
.clock-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.clock { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; background: var(--surface); border: 3px solid var(--line); border-radius: 18px; padding: 4px 18px; }
.clock.low { color: var(--no); border-color: var(--no); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.flash { position: fixed; top: 22%; left: 50%; transform: translateX(-50%); font-size: 56px; font-weight: 900; padding: 14px 30px; border-radius: 22px; z-index: 70; pointer-events: none; animation: pop .2s ease-out; }
.flash.ok { background: var(--ok); color: #fff; }
.flash.no { background: var(--no); color: #fff; }

/* ---------- Big display mode for projectors ---------- */
html.big .stage { zoom: 1.25; }
html.big .game-head { font-size: 20px; }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Bot Penyelamat Banjir (2D) ---------- */
.bot-wrap { width: 100%; max-width: 1100px; display: grid; gap: 10px; justify-items: center; }
.bot-canvas { display: block; border-radius: 18px; box-shadow: var(--shadow); touch-action: none; cursor: pointer; max-width: 100%; }
.bot-pad { display: flex; gap: 10px; justify-content: center; }
.bot-pad .btn { min-width: 64px; }
.bot-status { font-weight: 800; color: var(--ink-soft); text-align: center; min-height: 1.4em; }
/* ---------- Kampung Sejahtera ---------- */
.kampung { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; background: linear-gradient(#cfe8ff, #e9f6d8); color: #1f2430; border-radius: 18px; padding: 8px 14px; width: 100%; max-width: 980px; }
.kampung .sky { font-size: 30px; }
.kampung .plots { display: flex; gap: 2px; font-size: clamp(20px, 2.4vw, 30px); line-height: 1; }
.kampung .meters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.meter { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 15px; }
.meter i { width: 46px; height: 9px; border-radius: 6px; background: rgba(0,0,0,.12); position: relative; overflow: hidden; }
.meter i::after { content: ''; position: absolute; inset: 0; width: calc(var(--v) * 100%); background: #1f9d55; border-radius: 6px; transition: width .4s; }
.k-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px 18px; max-width: 980px; width: 100%; text-align: left; }
.k-emoji { font-size: clamp(36px, 4vw, 52px); line-height: 1; }
.k-card p { margin: 0; font-size: clamp(18px, 1.9vw, 25px); font-weight: 700; line-height: 1.35; }
.k-explain { display: grid; gap: 10px; justify-items: center; }
.fx-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.fx { border-radius: 999px; padding: 4px 12px; font-weight: 900; font-size: 16px; }
.fx.up { background: #d8f3e3; color: #12643a; } .fx.down { background: #fde2e2; color: #9b1c1c; }
.k-explain .kampung { padding: 6px 10px; }
@media (min-width: 900px) { .choices.long.k-opts { grid-template-columns: 1fr 1fr; max-width: 1100px; } .choices.long.k-opts .choice { min-height: 64px; font-size: clamp(18px, 1.6vw, 24px); } }
/* ---------- Tutorial ---------- */
.quick-guide summary { font-weight: 900; font-size: 20px; cursor: pointer; }
.guide-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.guide-steps li { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; color: var(--ink-soft); line-height: 1.4; }
.guide-steps span { font-size: 34px; }
.guide-steps b { color: var(--ink); font-size: 19px; }
.tut-open { width: 100%; justify-content: center; font-size: 22px; padding: 16px; margin-bottom: 16px; }
.tut-back { align-items: start; overflow-y: auto; }
.tut { background: var(--surface); color: var(--ink); border-radius: 26px; padding: 22px 26px; max-width: 980px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .25s ease-out; margin: auto; }
.tut-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.tut-head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 30px); }
.tut-tabs { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.tut-tabs .chip[aria-selected="true"] { background: var(--ink); color: var(--surface); }
.tut-step { display: flex; gap: 20px; align-items: center; background: var(--surface-2); border-radius: 20px; padding: 18px 22px; }
.tut-emoji { font-size: clamp(54px, 7vw, 84px); line-height: 1; }
.tut-step small { font-weight: 800; color: var(--ink-soft); }
.tut-step h3 { margin: 2px 0 6px; font-size: clamp(22px, 2.6vw, 32px); }
.tut-step p { margin: 0; font-size: clamp(17px, 1.8vw, 23px); line-height: 1.45; }
.tut-practice { margin-top: 16px; display: grid; gap: 14px; justify-items: center; }
.tut-practice .prompt { font-size: clamp(22px, 2.6vw, 32px); }
.tut-practice .play-area { width: 100%; }
.tut-practice .choice { min-height: 64px; font-size: clamp(18px, 2vw, 24px); }
.tut-fb { font-size: 19px; text-align: center; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.tut-fb:empty { display: none; }
.tut-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.tut-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tut-dot { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--line); padding: 0; cursor: pointer; }
.tut-dot.on { background: var(--brand); transform: scale(1.25); }
@media (max-width: 640px) {
  .tut { padding: 16px; border-radius: 18px; }
  .tut-step { flex-direction: column; text-align: center; gap: 8px; padding: 14px; }
  .tut-foot { flex-wrap: wrap; }
  .tut-dots { order: -1; width: 100%; }
  .tut-foot .btn { padding: 10px 14px; font-size: 16px; flex: 1; }
}

/* ---------- Teacher notes ---------- */
details.notes summary { font-weight: 900; font-size: 20px; cursor: pointer; }
details.notes ul { margin: 10px 0; padding-left: 22px; }
details.notes p { margin: 6px 0 0; color: var(--ink-soft); }

/* ---------- Set builder ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.form-grid label:first-child { grid-column: 1 / -1; }
.q-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.q-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: start; border: 2px solid var(--line); border-radius: 14px; padding: 10px; }
.q-row textarea { min-height: 60px; }
.q-fields { display: grid; gap: 8px; }
.q-emoji { width: 72px; text-align: center; font-size: 28px; }
.card.make { border-style: dashed; }
@media (max-width: 640px) {
  .board { gap: 8px; } .tile { min-height: 70px; }
  .q-row { grid-template-columns: 56px 1fr; } .q-row > .icon-btn { grid-column: 2; justify-self: end; } .q-emoji { width: 56px; }
}
