﻿@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/bvp-400-vi.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/bvp-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/bvp-700-vi.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/bvp-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Linh English, Design A (Modern Learning Hub): nền #F0F4FA, thẻ trắng, viền #D9DEE8, navy #243B6B, xanh #3978D5, teal #42B7A5, vàng #FFC857, thẻ bo 18px, nút bo 12px viền 2px, font Be Vietnam Pro */
:root {
  --bg: #F0F4FA; --card: #FFFFFF; --line: #D9DEE8; --muted: #5B6475; --text: #1F2937;
  --navy: #243B6B; --blue: #3978D5; --teal: #42B7A5; --yellow: #FFC857;
  --ok: #15803D; --ok-bg: #DCFCE7; --bad: #B91C1C; --bad-bg: #FEE2E2;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  --font: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  --gutter: clamp(16px, 3vw, 48px);
}
.lv-preA1 { --tint: #E0F2FE; --ink: #075985; --stripe: #38BDF8; }
.lv-a1 { --tint: #DCFCE7; --ink: #166534; --stripe: #22C55E; }
.lv-a2 { --tint: #FEF3C7; --ink: #92400E; --stripe: #FACC15; }
.lv-b1 { --tint: #EDE9FE; --ink: #5B21B6; --stripe: #A78BFA; }
.lv-b2 { --tint: #FCE7F3; --ink: #9D174D; --stripe: #F472B6; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.5; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
b, strong, h1, h2, h3 { font-weight: 700; }
.ico { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: #fff; border: 2px solid var(--navy); padding: 8px 12px; border-radius: 12px; z-index: 20; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
main:focus { outline: none; }
.hide { display: none !important; }

.wrap { width: min(1680px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.page { padding: 24px 0 64px; }
.narrow { max-width: 880px; }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.strong { font-weight: 700; }
.ok-t { color: var(--ok); }
.bad-t { color: var(--bad); font-weight: 700; }
.center-t { text-align: center; }
.mt { margin-top: 16px; }
.h1 { font-size: clamp(28px, 2.4vw, 40px); line-height: 1.2; color: var(--text); }
.h2 { font-size: clamp(24px, 1.7vw, 32px); line-height: 1.25; }
.h3 { font-size: 20px; line-height: 1.3; }
.lead { font-size: 20px; margin: 8px 0 16px; }

/* ---------- Nút ---------- */
.btn, .btn-text, .tbtn, .seg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 20px; border-radius: 12px; border: 2px solid var(--navy);
  font-weight: 700; font-size: 18px; text-decoration: none; background: #fff; color: var(--navy); line-height: 1.2;
}
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy-o { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-bad-o { background: #fff; border-color: var(--bad); color: var(--bad); }
.btn-lg { min-height: 56px; font-size: 20px; padding: 10px 28px; }
.btn-text { border-color: var(--navy); background: transparent; }
.row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.row.center { justify-content: center; align-items: center; }
.small-btns { margin-top: 0; }
[aria-disabled="true"].primary { background: #8FA0C9; border-color: #8FA0C9; color: #0B1B4A; cursor: not-allowed; }

/* ---------- Thanh trên ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); min-height: 88px; display: flex; align-items: center; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 16px; color: var(--navy); font-weight: 700; font-size: clamp(22px, 1.5vw, 28px); text-decoration: none; min-height: 48px; }
.toplink { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 700; font-size: clamp(16px, 1.05vw, 20px); text-decoration: none; min-height: 48px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 700; text-decoration: none; min-height: 48px; margin-bottom: 8px; }
.back.nomargin { margin: 0; }
.badge { display: inline-block; padding: 2px 16px; border-radius: 999px; font-weight: 700; font-size: 18px; background: var(--tint); color: var(--ink); line-height: 1.5; }

/* ---------- Trang chủ ---------- */
.hero { padding-top: 24px; }
.hero-h { font-size: clamp(30px, 3vw, 56px); line-height: 1.15; font-weight: 700; color: var(--text); }
.hero-sub { margin-top: 8px; font-size: clamp(18px, 1.35vw, 26px); color: var(--muted); }
.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 40px; }
.mode-card { display: flex; align-items: center; gap: 24px; min-height: 120px; padding: 16px 32px; text-align: left; border: 2px solid var(--navy); border-radius: 18px; background: #fff; color: var(--navy); }
.mode-card.sel { background: var(--navy); color: #fff; }
.mode-sep { align-self: stretch; width: 2px; background: currentColor; margin: 8px 0; flex: none; }
.mode-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mode-txt strong { font-size: clamp(24px, 1.6vw, 30px); line-height: 1.2; }
.mode-txt span { font-size: clamp(16px, 1vw, 18px); }
.mode-card:not(.sel) .mode-txt span { color: var(--muted); }
.sec { margin-top: 48px; }
.path { display: flex; align-items: stretch; margin-top: 24px; gap: 0; }
.path-item { flex: 1 1 0; min-width: 0; display: flex; }
.path-sep { flex: none; width: clamp(28px, 2.4vw, 48px); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.lv-card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--stripe); border-radius: 18px; padding: 16px 16px 20px; box-shadow: var(--shadow); min-width: 0; }
.lv-card:hover { border-color: var(--navy); border-top-color: var(--stripe); }
.lv-code { font-size: clamp(28px, 1.9vw, 36px); font-weight: 700; line-height: 1.2; margin-top: 4px; }
.lv-vi { font-size: clamp(18px, 1.15vw, 22px); color: var(--muted); }
.lv-desc { font-size: clamp(16px, 0.95vw, 18px); color: var(--muted); margin-bottom: 12px; }
.lv-foot { width: 100%; margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lv-foot strong { color: var(--navy); font-size: 18px; }
.bar-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.bar { flex: 1 1 auto; min-width: 60px; max-width: 160px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.bar-pct { font-weight: 700; color: var(--navy); min-width: 3.2ch; text-align: right; }

/* ---------- Chặng, chủ đề, tiến độ ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.vi-sub { font-size: 20px; }
.grid-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; margin-top: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; box-shadow: var(--shadow); }
.topic-card, .game-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.topic-card:hover, .game-card:hover { border-color: var(--navy); }
.tc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tc-title { font-size: 24px; font-weight: 700; color: var(--navy); }
.tc-vi { color: var(--text); }
.tc-meta { color: var(--muted); font-size: 16px; margin-bottom: 8px; }
.pill-ok { display: inline-flex; align-items: center; gap: 4px; background: var(--ok-bg); color: var(--ok); border: 2px solid var(--ok); font-weight: 700; font-size: 16px; padding: 0 12px; border-radius: 999px; }
.modebar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg-btn { background: #fff; }
.seg-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.tgroup { margin-top: 32px; }
.grid-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px; }
.gc-title { font-size: 22px; font-weight: 700; color: var(--navy); }
.gc-desc { color: var(--muted); font-size: 17px; }
.gc-best { margin-top: auto; font-weight: 700; color: var(--navy); }
.gc-best.ok { color: var(--ok); }
.gc-best.muted { font-weight: 400; color: var(--muted); }
.prog-level { margin-top: 24px; border-top: 6px solid var(--stripe); }
.prog-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.prog-head .bar-row { flex: 1 1 200px; max-width: 360px; }
.prog-topic { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.prog-tt { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-weight: 700; font-size: 20px; color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; font-size: 16px; color: var(--text); }
.chip.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 700; }
.reset-box { margin-top: 32px; }

/* ---------- Thiết lập đội ---------- */
.setup { display: flex; flex-direction: column; gap: 16px; }
.team-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; color: var(--text); }
.field.inline { flex-direction: row; align-items: center; gap: 12px; }
.input { min-height: 48px; padding: 8px 12px; border: 2px solid var(--navy); border-radius: 12px; background: #fff; font-size: 18px; width: 100%; }
.input-num { width: 96px; }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 16px 4px 4px; border: 2px solid var(--navy); border-radius: 999px; background: #fff; font-weight: 700; color: var(--navy); }
.sw-knob { width: 32px; height: 32px; border-radius: 50%; background: var(--line); border: 2px solid var(--navy); }
.switch[aria-checked="true"] { background: var(--navy); color: #fff; }
.switch[aria-checked="true"] .sw-knob { background: #fff; }

/* ---------- Khung chơi ---------- */
.play { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.play-top { display: grid; align-items: center; background: #fff; border-bottom: 1px solid var(--line); }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: var(--navy); border-radius: 12px; }
.pt-title { font-size: 20px; color: var(--text); }
.counter { font-weight: 700; color: var(--navy); font-size: 20px; white-space: nowrap; }
.clock-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 18px; }
.clock-pill.late { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); font-weight: 700; }
.stage { width: min(960px, calc(100% - 24px)); margin: 0 auto; padding: 16px 0 24px; flex: 1 0 auto; }
.primary-box { position: sticky; bottom: 0; z-index: 5; width: 100%; }
.primary-box:not(:empty) { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.primary-box .primary { width: min(960px, 100%); display: flex; margin: 0 auto; }

/* Tự luyện */
.mode-self { --q: clamp(24px, 6.4vw, 34px); --tile-fs: 20px; --tile-h: 56px; --pic: 132px; }
.mode-self .play-top { grid-template-columns: 48px 1fr auto; gap: 8px; min-height: 60px; padding: 0 16px 0 8px; }
.mode-self .pt-title { text-align: center; font-size: clamp(18px, 4.6vw, 22px); }
.pbar { height: 8px; background: var(--line); }
.pbar span { display: block; height: 100%; background: var(--navy); transition: width .3s; }
.subrow { display: flex; align-items: center; gap: 12px; width: min(960px, calc(100% - 24px)); margin: 12px auto 0; }
@media (min-width: 1000px) { .mode-self { --q: 36px; --tile-fs: 26px; --tile-h: 72px; --pic: 180px; } }

/* Chiếu lớp */
.mode-class { --q: clamp(26px, 6vw, 40px); --tile-fs: 22px; --tile-h: 64px; --pic: 150px; }
.mode-class .stage { width: min(1680px, calc(100% - 2 * var(--gutter))); }
.mode-class .play-top { grid-template-columns: 1fr auto 1fr; gap: 12px; min-height: 96px; padding: 8px var(--gutter); }
.pt-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.mode-class .pt-title { font-size: clamp(22px, 1.6vw, 30px); }
.mode-class .counter { font-size: clamp(22px, 1.6vw, 30px); text-align: center; }
.pt-right { display: flex; justify-content: flex-end; }
.teams { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 40px var(--gutter) 0; }
.team { position: relative; flex: 1 1 140px; max-width: 340px; min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.team.cur { border: 3px solid var(--navy); box-shadow: inset 0 -4px 0 var(--yellow); }
.team-label { position: absolute; left: 0; right: 0; top: -28px; text-align: center; font-weight: 700; font-size: 16px; color: var(--navy); }
.team-name { font-size: 24px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.2; }
.team-score { font-size: 36px; font-weight: 700; color: var(--navy); }
.teacher { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 12px var(--gutter); min-height: 88px; background: #fff; border-top: 1px solid var(--line); }
.t-msg { color: var(--muted); font-size: 18px; flex: 1 1 260px; }
.t-msg.ok-t { color: var(--ok); font-weight: 700; }
.t-msg.bad-t { color: var(--bad); font-weight: 700; }
.t-btns { display: flex; flex-wrap: wrap; gap: 16px; }
.tbtn { min-width: 180px; min-height: 60px; font-size: 22px; }
.t-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.t-bad { background: #fff; border-color: var(--bad); color: var(--bad); }
.t-next { background: var(--navy); color: #fff; }
.tbtn.locked { background: #E5E7EB; border-color: #9CA3AF; color: #374151; cursor: not-allowed; }
@media (min-width: 1000px) {
  .mode-class { --q: clamp(40px, 3.4vw, 64px); --tile-fs: clamp(26px, 2.5vw, 48px); --tile-h: clamp(68px, 10vh, 120px); --pic: clamp(130px, min(19vw, 27vh), 360px); }
}
@media (max-height: 820px) and (min-width: 1000px) {
  .mode-class .play-top { min-height: 72px; }
  .teams { padding-top: 32px; }
  .team { min-height: 64px; }
  .teacher { min-height: 76px; }
  .tbtn { min-height: 52px; }
}
@media (max-width: 700px) {
  .mode-class .play-top { grid-template-columns: 1fr auto; }
  .mode-class .counter { text-align: right; }
  .pt-right { grid-column: 1 / -1; justify-content: flex-start; }
  .pt-right:empty { display: none; }
  .tbtn { min-width: 0; flex: 1 1 0; min-height: 52px; font-size: 17px; padding: 6px; }
  .t-btns { width: 100%; gap: 8px; flex-wrap: nowrap; }
  .t-msg { font-size: 15px; flex-basis: 100%; }
  .teacher { padding-top: 8px; padding-bottom: 8px; min-height: 0; gap: 6px; }
  .teams { padding-top: 32px; gap: 8px 12px; }
  .team { min-height: 56px; padding: 4px 16px; }
  .team-score { font-size: 28px; }
}

/* ---------- Câu hỏi và đáp án ---------- */
.quiz { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.mode-class .quiz { gap: clamp(12px, 2vh, 28px); }
.q { font-size: var(--q); font-weight: 700; color: var(--navy); text-align: center; line-height: 1.25; }
.pic { width: var(--pic); height: var(--pic); display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); font-size: calc(var(--pic) * 0.6); line-height: 1; }
.def-card { width: min(100%, 880px); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; text-align: center; font-size: calc(var(--q) * 0.8); font-weight: 700; line-height: 1.3; }
.tiles { display: grid; gap: 16px; width: 100%; }
.mode-class .tiles { gap: clamp(12px, 2.2vh, 24px) 24px; }
.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
.tile { display: flex; align-items: center; gap: 16px; width: 100%; min-height: var(--tile-h); padding: 8px 16px; background: #fff; border: 2px solid var(--navy); border-radius: 12px; font-size: var(--tile-fs); font-weight: 700; text-align: left; color: var(--text); }
.tile-letter { flex: none; width: calc(var(--tile-h) * 0.5); height: calc(var(--tile-h) * 0.5); min-width: 32px; min-height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 0.65em; }
.tile-text { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.tile-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.5em; }
.tile.locked { pointer-events: none; }
.tile.ok { background: var(--ok-bg); border: 3px solid var(--ok); }
.tile.ok .tile-flag { color: var(--ok); }
.tile.bad { background: var(--bad-bg); border: 3px solid var(--bad); }
.tile.bad .tile-flag { color: var(--bad); }
.fb-box { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 8px; }
.fb { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: 12px; font-weight: 700; font-size: clamp(18px, 1.3vw, 26px); border: 2px solid; text-align: center; max-width: 100%; }
.fb-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.fb-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.fb-ans { background: #fff; color: var(--navy); border-color: var(--navy); }
.note { color: var(--muted); font-size: clamp(17px, 1.2vw, 24px); text-align: center; }
.sentence { max-width: 100%; }
.blank { display: inline-block; min-width: 3.5ch; padding: 0 8px; margin: 0 6px; border-bottom: 4px solid var(--navy); text-align: center; }
.blank.ok { color: var(--ok); border-color: var(--ok); }
.blank.bad { color: var(--bad); border-color: var(--bad); }
.live-line { min-height: 1.6em; text-align: center; font-weight: 700; font-size: clamp(18px, 1.3vw, 24px); color: var(--muted); }
.live-line.ok-t { color: var(--ok); }
.live-line.bad-t { color: var(--bad); }

/* Từ, câu */
.wtoks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.wtoks.q { color: var(--text); }
.wtok { min-height: 48px; padding: 8px 18px; border: 2px solid var(--navy); border-radius: 12px; background: #fff; color: var(--text); font-weight: 700; font-size: calc(var(--q) * 0.72); line-height: 1.2; }
.wtok.sel { background: var(--navy); color: #fff; }
.wtok.locked { pointer-events: none; }
.wtok.ok { background: var(--ok-bg); border: 3px solid var(--ok); color: var(--ok); }
.wtok.bad { background: var(--bad-bg); border: 3px solid var(--bad); color: var(--bad); }
.answer-area { width: 100%; min-height: calc(var(--q) * 2.4); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: #fff; border: 2px solid var(--line); border-radius: 18px; }
.answer-area.ok { border-color: var(--ok); background: var(--ok-bg); }
.answer-area.bad { border-color: var(--bad); background: var(--bad-bg); }
.ph { color: var(--muted); font-size: 18px; }

/* Xếp chữ */
.hint-card { width: min(100%, 560px); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 24px; text-align: center; box-shadow: var(--shadow); }
.hint-pic { font-size: calc(var(--pic) * 0.7); line-height: 1.1; }
.hint-txt { font-size: var(--q); font-weight: 700; color: var(--navy); line-height: 1.25; }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; }
.slot { width: max(32px, min(64px, calc((100% - (var(--n) - 1) * 6px) / var(--n)))); aspect-ratio: 3 / 4; padding: 0; border: 2px solid var(--navy); border-radius: 8px; background: #fff; color: var(--text); font-weight: 700; font-size: calc(var(--q) * 0.85); display: grid; place-items: center; }
.mode-class .slot { width: max(40px, min(96px, calc((100% - (var(--n) - 1) * 6px) / var(--n)))); }
.slot.locked { background: #E0F2FE; }
.slot.ok, .slot.show { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.slot.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.ltiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; min-height: 56px; }
.ltile { min-width: 52px; height: 60px; padding: 0 12px; border: 2px solid var(--navy); border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; font-size: calc(var(--q) * 0.9); }
.mode-class .ltile { min-width: calc(var(--q) * 1.6); height: calc(var(--q) * 1.9); }

/* Ghép cặp */
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: min(100%, 880px); }
.mode-class .mgrid { width: min(100%, 1100px); gap: 16px; }
@media (max-width: 600px) { .mgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mcard { position: relative; min-width: 0; overflow: hidden; min-height: 92px; padding: 8px; display: grid; place-items: center; border: 2px solid var(--navy); border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; font-size: clamp(16px, 2.2vw, 26px); text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.mode-class .mcard { min-height: clamp(92px, 15vh, 160px); font-size: clamp(20px, 2vw, 38px); }
.mcard.open { background: #fff; color: var(--text); }
.mcard.mpic { font-size: clamp(36px, 6vw, 56px); }
.mode-class .mcard.mpic { font-size: clamp(48px, 5vw, 80px); }
.mcard.done { background: var(--ok-bg); border: 3px solid var(--ok); color: var(--text); }
.mcard.bad { background: var(--bad-bg); border: 3px solid var(--bad); color: var(--text); }
.mflag { position: absolute; top: 2px; right: 8px; font-size: 20px; font-weight: 700; }
.mcard.done .mflag { color: var(--ok); }
.mcard.bad .mflag { color: var(--bad); }

/* Tìm từ */
.wsearch { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 24px; }
.ws-main { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.wgrid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; width: min(calc(100vw - 24px), calc(var(--n) * 58px), 72vh); padding: 2px; background: var(--line); border: 2px solid var(--navy); border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; container-type: inline-size; }
.mode-class .wgrid { width: min(calc(100vw - 2 * var(--gutter)), calc(var(--n) * 76px), 64vh); }
.wcell { aspect-ratio: 1; display: grid; place-items: center; background: #fff; font-weight: 700; font-size: calc(100cqw / var(--n) * 0.48); color: var(--text); }
.wcell.sel { background: #BAE6FD; }
.wcell.pend { background: #BAE6FD; box-shadow: inset 0 0 0 3px var(--navy); }
.wcell.wrong { background: var(--bad-bg); color: var(--bad); }
.wcell.found { background: var(--ok-bg); color: #14532D; box-shadow: inset 0 0 0 2px var(--ok); }
.ws-side { flex: 1 1 240px; max-width: 420px; min-width: 200px; }
.wlist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wli { min-width: 0; flex-wrap: wrap; overflow-wrap: anywhere; }
.wli { display: flex; align-items: baseline; gap: 10px; padding: 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: clamp(18px, 1.5vw, 28px); }
.wli-mark { width: 1.2em; font-weight: 700; color: var(--muted); }
.wli-w { font-weight: 700; letter-spacing: 0.06em; }
.wli-vi { color: var(--muted); font-size: 0.8em; margin-left: auto; }
.wli.done { background: var(--ok-bg); border-color: var(--ok); }
.wli.done .wli-mark, .wli.done .wli-w { color: var(--ok); }
@media (max-width: 700px) { .ws-side { max-width: none; width: 100%; } .wlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Vòng quay */
.wheel-wrap { gap: clamp(12px, 2vh, 24px); --wheel: clamp(220px, min(70vw, 44vh), 520px); }
.wheel-stage { position: relative; width: var(--wheel); height: var(--wheel); }
.pointer { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 28px solid var(--navy); z-index: 2; }
.wheel { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 4px solid var(--navy); box-shadow: var(--shadow); }
.wl { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding-top: calc(var(--wheel) * 0.08); transform: rotate(var(--a)); color: var(--text); font-size: calc(var(--wheel) * 0.085); }
.wl b { min-width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; line-height: 1; }
.wl.hit b { background: var(--navy); color: #fff; }
.spin-btn { min-width: 200px; }
.wheel-q { width: min(100%, 960px); min-height: 120px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.wq-no { font-weight: 700; color: var(--navy); font-size: 18px; }
.wq-t { color: var(--text); font-size: calc(var(--q) * 0.9); }

/* Speaking */
.speak { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.sp-prompt { display: flex; flex-direction: column; gap: 8px; }
.sp-kind { font-weight: 700; color: var(--navy); font-size: 16px; }
.sp-q { text-align: left; color: var(--text); font-size: calc(var(--q) * 0.58); }
.sp-vi { font-size: clamp(17px, 1.2vw, 22px); }
.sp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.sp-cols .card { display: flex; flex-direction: column; gap: 8px; }
.frames li { padding: 8px 12px; margin-bottom: 8px; background: var(--bg); border-radius: 12px; font-size: clamp(18px, 1.3vw, 26px); }
.kw .chip { font-size: clamp(17px, 1.2vw, 24px); font-weight: 700; color: var(--navy); border-color: var(--navy); }
.phase { text-align: center; color: var(--muted); font-weight: 700; }
.clock-big { text-align: center; font-size: clamp(48px, 5vw, 88px); font-weight: 700; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.chk { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 8px 4px; font-size: clamp(17px, 1.2vw, 24px); cursor: pointer; }
.chk input { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--navy); }

/* Kết quả */
.result { padding-top: 24px; }
.score-card { margin: 16px 0; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.big-pct { font-size: 72px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.wrong-list { margin: 16px 0; }
.wrong-list ul { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.wrong-list li { padding: 8px 12px; background: var(--bad-bg); border-radius: 12px; color: var(--text); }
.wrong-list li .muted { color: #4B5563; }
.board { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; counter-reset: x; }
.board-row { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 28px; font-weight: 700; }
.board-row.lead { border: 3px solid var(--navy); box-shadow: inset 0 -4px 0 var(--yellow); }
.rk { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 24px; flex: none; }
.bn { flex: 1; overflow-wrap: anywhere; }
.bs { color: var(--navy); }

@media (max-width: 899px) {
  .path { flex-direction: column; }
  .path-sep { width: 100%; height: 40px; transform: rotate(90deg); }
  .modes { grid-template-columns: minmax(0, 1fr); }
  .mode-card { padding: 16px 20px; gap: 16px; }
  .topbar { min-height: 72px; }
  .page { padding-top: 16px; }
}
@media (max-width: 420px) {
  .topbar-in { gap: 8px; }
  .brand span { font-size: 22px; }
  .toplink { font-size: 16px; gap: 8px; }
  .tile-flag { font-size: 0.65em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Chiếu lớp: ô đáp án đã có dấu Đúng/Sai, ẩn hộp phản hồi lặp để vừa một màn */
.mode-class .tiles + .fb-box { display: none; }
.wtok.ok::before { content: "✓ "; }
.wtok.bad::before { content: "✗ "; }





/* ===== Design A: Modern Learning Hub ===== */
.topbar { min-height: 76px; box-shadow: var(--shadow); border-bottom: 0; }
.topbar-in { flex-wrap: wrap; gap: 8px 24px; padding-block: 8px; }
.brand { font-size: 24px; gap: 10px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; color: var(--navy); font-weight: 700; text-decoration: none; font-size: 17px; }
.nav a.cur { background: #fff; box-shadow: var(--shadow); }
.nav a:hover { background: #fff; }
.toplink { font-size: 17px; }
.hero { text-align: center; padding-top: clamp(16px, 3vw, 48px); }
.hero-h { color: var(--navy); font-size: clamp(30px, 3.2vw, 60px); }
.hero-sub { font-size: clamp(18px, 1.5vw, 28px); }
.modes { margin-top: clamp(24px, 3vw, 48px); gap: 24px; }
.mode-card { min-height: 148px; box-shadow: var(--shadow); border-width: 2px; }
.mode-card.sel { background: var(--navy); }
.mode-card .ico { color: var(--blue); }
.mode-card.sel .ico { color: var(--yellow); }
.sec { margin-top: clamp(32px, 4vw, 64px); text-align: center; color: var(--navy); }
.path { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; margin-top: 24px; }
.path-sep { display: none; }
.lv-card { align-items: flex-start; text-align: left; gap: 6px; padding: 24px; border: 1px solid var(--line); border-top: 6px solid var(--stripe); height: 100%; }
.lv-card:hover { box-shadow: 0 6px 18px rgba(36, 59, 107, 0.14); }
.lv-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--tint); color: var(--ink); margin-bottom: 8px; }
.lv-code { font-size: clamp(22px, 1.5vw, 28px); color: var(--navy); }
.lv-vi { font-size: 17px; }
.lv-desc { font-size: 17px; margin-bottom: 12px; }
.lv-go { margin-top: 16px; display: inline-flex; align-items: center; gap: 4px; align-self: stretch; justify-content: center; min-height: 48px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; }
.lv-foot { margin-top: auto; }
.btn-navy, .t-next, .seg-btn[aria-pressed="true"], .switch[aria-checked="true"], .ltile, .tile-letter, .rk { background-color: var(--navy); }
.lv-tag { color: var(--muted); font-size: 18px; font-weight: 700; }
.hero-sub .ico { vertical-align: -4px; color: var(--navy); }



.menu-btn { display: none; min-height: 48px; padding: 0 16px; border: 2px solid var(--navy); border-radius: 12px; background: #fff; color: var(--navy); font-weight: 700; font-size: 17px; }
@media (max-width: 600px) {
  .topbar { min-height: 64px; position: relative; }
  .topbar-in { flex-wrap: nowrap; gap: 8px; padding-block: 8px; }
  .brand { margin-right: auto; font-size: 20px; }
  .menu-btn { display: inline-flex; align-items: center; }
  .tl-txt { display: none; }
  .toplink { min-width: 48px; justify-content: center; }
  .nav { display: none; position: absolute; left: 12px; right: 12px; top: 100%; z-index: 30; flex-direction: column; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(36, 59, 107, 0.2); padding: 8px; }
  .nav.open { display: flex; }
  .nav a { min-height: 52px; }
}
.mode-class .stage { padding-bottom: 24px; }
.mode-class .speak .card { padding: 12px 20px; }
.mode-class .speak .sp-cols { gap: 12px; }
.mode-class .frames li { padding: 2px 12px; margin-bottom: 4px; }
.mode-class .sp-q { font-size: calc(var(--q) * 0.45); }
.mode-class .speak { gap: 8px; }
.mode-class .clock-big { font-size: clamp(40px, 3.6vw, 64px); }
.mode-class .chk { min-height: 40px; padding: 4px; }
.mode-class .frames li { padding: 4px 12px; margin-bottom: 6px; }
.lv-desc { min-height: 3em; }



/* ===================================================================
   STITCH 1:1 (Design A, dựng lại từ stitch_A: trang chủ, chiếu lớp, điện thoại)
   =================================================================== */
:root { --primary: #035ab5; --primary-2: #3373d0; --on: #001944; --text: #001944; --muted: #424752; --line: #E2E8F0; --soft: #f2f3ff; --soft2: #e9edff; --soft3: #e1e8ff; --shadow: 0 2px 8px -2px rgba(36, 59, 107, 0.08); --shadow-md: 0 6px 24px -6px rgba(36, 59, 107, 0.10); }
body { color: var(--on); }
.h1 { color: var(--on); }
.muted { color: #424752; }
.wrap { width: min(1536px, calc(100% - 2 * var(--gutter))); }
.btn, .btn-text, .tbtn { border-radius: 12px; }
.btn-navy { background: var(--primary); color: #fff; border: 0; box-shadow: 0 3px 0 #00458f; }
.btn-navy-o { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-ok { background: #15803D; border: 0; }
.btn-bad { background: #B91C1C; border: 0; }
.seg-btn { border: 2px solid #c2c6d4; color: var(--on); border-radius: 999px; background: #fff; }
.seg-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.switch[aria-checked="true"] { background: var(--primary); }
.input { border: 1.5px solid #c2c6d4; border-radius: 18px; min-height: 54px; }
.input:focus { outline: none; border-color: #3978D5; box-shadow: 0 0 0 3px rgba(57, 120, 213, 0.15); }
.card { border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.topic-card:hover, .game-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -4px rgba(36, 59, 107, 0.12); border-color: var(--line); }
.tc-title, .gc-title { color: var(--on); }
.bar { background: var(--soft2); height: 8px; }
.bar span { background: #006b5e; }
.bar-pct { color: #006b5e; }
.badge { background: var(--soft3); color: var(--primary); font-size: 14px; }
.pill-ok { border: 0; background: rgba(134, 246, 226, 0.5); color: #006b5e; }
.rk { background: var(--primary); }
.board-row { border-radius: 18px; }
.board-row.lead { border: 2px solid #3978D5; box-shadow: 0 0 0 4px rgba(57, 120, 213, 0.15); }
.big-pct { color: var(--primary); }

/* ----- Thanh trên ----- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(250, 248, 255, 0.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04); border: 0; min-height: 80px; }
.topbar-in { flex-wrap: nowrap; justify-content: space-between; gap: 24px; }
.brand { gap: 12px; color: var(--primary); }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.brand-t { font-size: 20px; letter-spacing: -0.01em; }
.nav { background: var(--soft); border-radius: 999px; padding: 6px 4px; gap: 4px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.02); }
.nav a { padding: 8px 18px; min-height: 40px; font-size: 15px; color: #424752; }
.nav a:hover { background: var(--soft2); color: var(--on); }
.nav a.cur { background: var(--primary-2); color: #fefcff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.toplink { background: #fff; border-radius: 999px; padding: 6px 16px 6px 12px; box-shadow: var(--shadow); color: var(--primary); font-size: 15px; min-height: 44px; }

/* ----- Trang chủ ----- */
main.home { position: relative; background: #faf8ff; }
.home-glow { position: absolute; inset: 0 0 auto 0; height: 1100px; overflow: hidden; pointer-events: none; z-index: 0; }
.home-glow::before { content: ""; position: absolute; top: -60px; left: 50%; width: 980px; max-width: 100%; height: 360px; transform: translateX(-50%); background: rgba(215, 227, 255, 0.55); filter: blur(60px); border-radius: 50%; }
.home-glow::after { content: ""; position: absolute; top: 420px; right: -90px; width: 320px; height: 320px; background: rgba(134, 246, 226, 0.4); filter: blur(60px); border-radius: 50%; }
.home-in { position: relative; z-index: 1; }
.hero { padding: 48px 0 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow-badge { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 6px 16px; border-radius: 999px; background: #fff; box-shadow: 0 2px 12px rgba(3, 90, 181, 0.08); margin-bottom: 24px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #785600; }
.eyebrow-badge .eb-a { color: #785600; }
.eyebrow-badge .eb-b { color: #006b5e; }
.eb-dot { width: 6px; height: 6px; border-radius: 50%; background: #006b5e; display: inline-block; }
.hero-h { font-size: clamp(30px, 3vw, 48px); line-height: 1.18; letter-spacing: -0.02em; color: var(--on); max-width: 900px; text-wrap: balance; margin-bottom: 16px; }
.hero-sub { font-size: clamp(17px, 1.3vw, 22px); color: #424752; margin-bottom: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero-sub .ico { color: var(--primary); vertical-align: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 48px; }
.cta-p, .cta-s { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 12px; font-weight: 700; font-size: 15px; text-decoration: none; min-height: 52px; }
.cta-p { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -4px rgba(3, 90, 181, 0.35); }
.cta-p:hover { background: var(--primary-2); }
.cta-s { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(36, 59, 107, 0.06); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: min(100%, 860px); }
.stat { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; background: rgba(255, 255, 255, 0.82); border-radius: 18px; box-shadow: var(--shadow); font-weight: 700; font-size: 15px; text-align: left; }
.stat-i { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.s1 { background: rgba(255, 222, 164, 0.5); color: #785600; }
.s2 { background: rgba(134, 246, 226, 0.5); color: #006b5e; }
.s3 { background: var(--soft3); color: var(--primary); }
.blk { margin-bottom: 80px; }
.blk.last { margin-bottom: 56px; }
.blk-head { margin-bottom: 32px; }
.blk-head.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.blk-head.row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--primary); margin-bottom: 4px; }
.blk-h { font-size: clamp(24px, 2vw, 32px); line-height: 1.25; letter-spacing: -0.01em; color: var(--on); }
.blk-p { color: #424752; margin-top: 4px; font-size: 16px; }
.sec { text-align: left; }

.modes2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.mcard2 { display: flex; flex-direction: column; background: #fff; border-radius: 18px; padding: 24px; box-shadow: var(--shadow-md); transition: transform .2s, box-shadow .2s; }
.mcard2:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -8px rgba(3, 90, 181, 0.14); }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.mc-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #d7e3ff; color: #001b3f; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.is-self .mc-tag { background: #86f6e2; color: #00201b; }
.mc-pill { padding: 2px 10px; border-radius: 999px; background: var(--soft2); color: var(--primary); font-size: 12px; font-weight: 700; }
.mc-pill.cur { background: var(--primary); color: #fff; }
.mc-h { font-size: 24px; line-height: 1.3; color: var(--on); margin-bottom: 4px; }
.mc-sub { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.is-self .mc-sub { color: #006b5e; }
.mc-desc { color: #424752; margin-bottom: 24px; font-size: 16px; }
.pv { background: var(--soft); border-radius: 16px; padding: 16px; margin-bottom: 24px; box-shadow: inset 0 1px 3px rgba(0, 25, 68, 0.06); }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; flex-wrap: wrap; }
.pv-dots { display: inline-flex; gap: 8px; }
.pv-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; background: #ba1a1a; }
.pv-dots i:nth-child(2) { background: #f4be4e; }
.pv-dots i:nth-child(3) { background: #006b5e; }
.pv-title { font-size: 12px; font-weight: 700; color: #424752; margin-right: auto; margin-left: 4px; }
.pv-timer { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.pv-teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 8px; }
.pv-team { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 6px; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.08); }
.pv-team.lead { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(0, 25, 68, 0.12); }
.pv-top1 { position: absolute; top: -9px; display: inline-flex; align-items: center; gap: 2px; background: #785600; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.pv-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.pv-dot.t1 { background: #ffdad6; color: #ba1a1a; } .pv-dot.t2 { background: #d7e3ff; color: var(--primary); } .pv-dot.t3 { background: #ffdea4; color: #785600; }
.pv-tn { font-size: 12px; font-weight: 700; }
.pv-ts { font-size: 22px; font-weight: 700; line-height: 1.3; }
.pv-team:nth-child(1) .pv-ts { color: #ba1a1a; } .pv-team:nth-child(2) .pv-ts { color: var(--primary); } .pv-team:nth-child(3) .pv-ts { color: #785600; }
.pv-tsub { font-size: 11px; color: #5B6475; }
.pv-team.lead .pv-tsub { color: #006b5e; font-weight: 700; }
.pv-user { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pv-av { width: 32px; height: 32px; border-radius: 50%; background: #006b5e; color: #fff; display: grid; place-items: center; }
.pv-un { font-size: 12px; font-weight: 700; } .pv-us { font-size: 11px; color: #424752; }
.pv-chip { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: #ffdea4; color: #5d4200; font-size: 12px; font-weight: 700; }
.pv-mission { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.08); }
.pv-mico { flex: none; width: 40px; height: 40px; border-radius: 8px; background: rgba(134, 246, 226, 0.5); color: #006b5e; display: grid; place-items: center; }
.pv-mtxt { flex: 1; min-width: 0; }
.pv-mn { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.pv-mbar { width: min(100%, 144px); height: 8px; border-radius: 999px; background: var(--soft2); margin-top: 6px; overflow: hidden; }
.pv-mbar span { display: block; height: 100%; background: #006b5e; border-radius: 999px; }
.pv-mpct { font-size: 12px; font-weight: 700; color: #006b5e; }
.mc-cta { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 12px; border: 0; font-size: 15px; font-weight: 700; min-height: 52px; }
.mc-cta.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(3, 90, 181, 0.25); }
.mc-cta.second { background: #fff; color: var(--primary); box-shadow: 0 4px 12px rgba(36, 59, 107, 0.06); border: 1px solid var(--line); }

.miles { display: none; align-items: center; gap: 8px; background: #fff; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.miles-l { color: #424752; }
.miles-i { display: inline-flex; align-items: center; gap: 6px; color: var(--on); }
.md { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #006b5e; }
.md.m1 { background: var(--primary); } .md.m2 { background: #785600; }
.path-wrap { position: relative; }
.path-line { display: none; position: absolute; top: 52px; left: 48px; right: 48px; height: 4px; background: var(--soft3); border-radius: 4px; }
.path { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin: 0; position: relative; z-index: 1; }
.path-item { display: flex; min-width: 0; }
.lv-card { --ci-bg: rgba(134, 246, 226, 0.5); --ci-ink: #006b5e; flex: 1; display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 0; background: #fff; border: 0; border-radius: 18px; padding: 20px; box-shadow: 0 4px 16px -4px rgba(36, 59, 107, 0.08); transition: transform .2s, box-shadow .2s; height: auto; }
.lv-card:hover { transform: translateY(-8px); box-shadow: 0 12px 28px -6px rgba(3, 90, 181, 0.16); border: 0; }
.lv-card.lv-a1 { --ci-bg: #d7e3ff; --ci-ink: #035ab5; }
.lv-card.lv-a2 { --ci-bg: rgba(255, 222, 164, 0.6); --ci-ink: #785600; }
.lv-card.lv-b1 { --ci-bg: rgba(171, 199, 255, 0.4); --ci-ink: #2a62b8; }
.lv-card.now { box-shadow: 0 6px 20px -2px rgba(3, 90, 181, 0.16); }
.lv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.lv-ico { width: 48px; height: 48px; border-radius: 16px; background: var(--ci-bg); color: var(--ci-ink); display: grid; place-items: center; margin: 0; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.08); }
.lv-count { padding: 4px 10px; border-radius: 999px; background: var(--ci-bg); color: var(--ci-ink); font-size: 12px; font-weight: 700; }
.lv-eye { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--ci-ink); }
.lv-code { font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--on); }
.lv-tag { font-size: 16px; font-weight: 700; color: var(--ci-ink); margin-bottom: 4px; }
.lv-vi { font-size: 14px; color: #424752; font-weight: 700; }
.lv-desc { font-size: 14px; color: #424752; margin: 2px 0 12px; min-height: 0; }
.lv-check { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: #5B6475; margin-bottom: 12px; margin-top: auto; }
.lv-check .ico { flex: none; color: var(--ci-ink); margin-top: 1px; }
.lv-card .bar-row { margin-bottom: 12px; }
.lv-card .bar { max-width: none; }
.lv-go { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 12px; background: var(--soft); color: var(--primary); font-size: 13px; font-weight: 700; margin: 0; min-height: 44px; }
.lv-card:hover .lv-go, .lv-card.now .lv-go { background: var(--primary); color: #fff; }

.method { background: #fff; border-radius: 18px; padding: 32px; box-shadow: 0 8px 30px -6px rgba(36, 59, 107, 0.08); }
.method .blk-head { max-width: 760px; margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; background: var(--soft); border-radius: 18px; padding: 24px; transition: background .2s; }
.step:hover { background: var(--soft2); }
.step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.step-n.n1 { background: var(--primary); } .step-n.n2 { background: #006b5e; } .step-n.n3 { background: #785600; }
.step-h { font-size: 20px; margin-bottom: 8px; color: var(--on); }
.step-p { font-size: 14px; color: #424752; margin-bottom: 24px; }
.mini { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.08); font-size: 13px; font-weight: 700; color: var(--on); }
.mini .ico { color: var(--primary); }
.mini-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mini-chip { padding: 4px 8px; border-radius: 4px; background: rgba(134, 246, 226, 0.5); color: #006b5e; font-size: 12px; font-weight: 700; }

.hows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.how-card { display: flex; flex-direction: column; background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow-md); }
.how-pic { position: relative; height: 224px; border-radius: 12px; background: linear-gradient(135deg, #d7e3ff, #e9edff); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.how-card:last-child .how-pic { background: linear-gradient(135deg, rgba(134, 246, 226, 0.6), #e9edff); color: #006b5e; }
.how-chip { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(250, 248, 255, 0.92); color: var(--on); font-size: 12px; font-weight: 700; color: var(--on); box-shadow: var(--shadow); }
.how-t { font-size: 14px; color: #424752; }
.how-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.how-foot a { color: var(--primary); font-weight: 700; }
.how-blue { display: flex; flex-direction: column; justify-content: space-between; background: var(--primary); color: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 8px 24px -4px rgba(3, 90, 181, 0.35); }
.hb-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.15); font-size: 12px; font-weight: 700; margin-bottom: 16px; align-self: flex-start; }
.hb-pill i { width: 8px; height: 8px; border-radius: 50%; background: #86f6e2; display: block; }
.hb-h { font-size: 24px; line-height: 1.3; margin-bottom: 8px; }
.hb-p { font-size: 14px; color: rgba(255, 255, 255, 0.92); margin-bottom: 24px; }
.hb-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hb-a, .hb-b { padding: 12px 20px; border-radius: 12px; border: 0; font-weight: 700; font-size: 13px; min-height: 48px; }
.hb-a { background: #fff; color: var(--primary); }
.hb-b { background: var(--primary-2); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 48px; border-radius: 18px; background: linear-gradient(90deg, var(--soft3), var(--soft2), var(--soft)); box-shadow: 0 4px 16px rgba(36, 59, 107, 0.04); }
.ban-h { font-size: clamp(24px, 2vw, 32px); line-height: 1.25; color: var(--on); margin-bottom: 8px; max-width: 760px; }
.ban-p { color: #424752; }
.site-foot { background: var(--soft); padding: 32px 0; box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.02); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: #424752; }
.foot-s { font-size: 12px; color: #5B6475; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-nav a { color: #424752; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.foot-nav a:hover { color: var(--primary); }
@media (min-width: 1280px) { .miles { display: flex; } .path-line { display: block; } }
@media (max-width: 1279px) { .path { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .modes2, .hows { grid-template-columns: minmax(0, 1fr); } .steps { grid-template-columns: minmax(0, 1fr); } .banner { padding: 32px; } }
@media (max-width: 800px) { .path { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nav a { padding: 8px 12px; } }
@media (max-width: 639px) { .path { grid-template-columns: minmax(0, 1fr); } .stats { grid-template-columns: minmax(0, 1fr); } .hero { padding: 24px 0 40px; } .method { padding: 20px; } .blk { margin-bottom: 48px; } }
@media (max-width: 600px) { .topbar { min-height: 64px; } }

/* ----- Màn chơi: khung chung ----- */
.icon-link { width: 48px; height: 48px; border-radius: 12px; background: #F0F4FA; color: #243B6B; }
.play-top .badge { background: #E8F1FC; color: var(--primary); border: 1px solid #C9DCF8; font-size: 14px; padding: 2px 16px; }
.fb { border-radius: 12px; }

/* Chiếu lớp */
.mode-class { --ink: #243B6B; --q: clamp(26px, 6vw, 40px); }
.mode-class .play-top { background: #fff; border-bottom: 1px solid #D8E2EF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); padding: 16px 32px; grid-template-columns: 1fr auto 1fr; min-height: 0; }
.mode-class .pt-title { font-size: 24px; color: #243B6B; letter-spacing: -0.01em; }
.pt-mid { display: flex; justify-content: center; }
.mode-class .counter { padding: 8px 24px; background: #F0F4FA; border: 1px solid #D5E1F2; border-radius: 999px; box-shadow: inset 0 1px 3px rgba(0, 25, 68, 0.08); font-size: 20px; color: #243B6B; text-align: center; }
.clock-pill { background: #F8FAFC; border: 1px solid #DCE4EF; color: #475569; font-weight: 700; font-size: 16px; }
.clock-pill .ico { color: #64748B; }
.teams { display: flex; flex-wrap: nowrap; gap: 24px; padding: 20px 32px 0; width: min(1800px, 100%); margin: 0 auto; justify-content: stretch; }
.team { position: relative; flex: 1 1 0; min-width: 0; max-width: none; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; background: #fff; border: 2px solid transparent; border-radius: 18px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.08); overflow: hidden; }
.team.cur { border-color: #3978D5; box-shadow: 0 0 0 4px rgba(57, 120, 213, 0.15), 0 4px 10px rgba(0, 25, 68, 0.08); }
.team-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.team-no { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 700; font-size: 24px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.1); }
.tm0 .team-no { background: #FFE4E6; color: #BE123C; } .tm1 .team-no { background: #DBEAFE; color: #1D4ED8; } .tm2 .team-no { background: #FEF3C7; color: #B45309; } .tm3 .team-no { background: #CCFBF1; color: #0F766E; }
.team-tx { min-width: 0; }
.team-name { font-size: 20px; font-weight: 700; color: #243B6B; line-height: 1.3; }
.team-sub { font-size: 14px; color: #64748B; font-weight: 400; }
.team.cur .team-sub { color: var(--primary); font-weight: 700; }
.team-score { font-size: 36px; font-weight: 700; color: #243B6B; line-height: 1.1; }
.team.cur .team-score { font-size: 44px; color: var(--primary); padding-right: 4px; }
.team-label { position: absolute; top: 0; right: 0; left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 0 0 0 12px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-align: left; }
.team-label i { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: block; }
.mode-class .stage { width: min(1800px, calc(100% - 64px)); padding: 20px 0 24px; }
.mode-class .quiz { background: #fff; border: 1px solid #DCE4EF; border-radius: 18px; padding: 32px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.06); gap: 24px; }
.mode-class .q { color: #243B6B; }
.pic { background: #F8FAFC; border: 1px solid #E9EFF7; border-radius: 16px; box-shadow: inset 0 1px 3px rgba(0, 25, 68, 0.06); }
.def-card { border-radius: 18px; color: #243B6B; }
.tiles { max-width: 1200px; }
.tile { background: #fff; border: 2px solid #E2E8F0; border-radius: 18px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.06); color: #243B6B; gap: 20px; }
.tile-letter { background: #F1F5F9; color: #243B6B; font-weight: 700; }
.tile-flag { gap: 8px; font-size: 0.55em; padding: 8px 16px; border-radius: 12px; }
.tile.ok { background: #F0FDF4; border: 2px solid #22C55E; color: #166534; }
.tile.ok .tile-letter { background: #16A34A; color: #fff; }
.tile.ok .tile-flag { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }
.tile.bad { background: #FEF2F2; border: 2px solid #EF4444; color: #991B1B; }
.tile.bad .tile-letter { background: #DC2626; color: #fff; }
.tile.bad .tile-flag { background: #FEE2E2; color: #B91C1C; border: 1px solid #FECACA; }
.teacher { background: #fff; border-top: 1px solid #D8E2EF; box-shadow: 0 -4px 12px rgba(0, 25, 68, 0.05); padding: 16px 32px; min-height: 0; }
.t-left { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 0; }
.t-i { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #E0E7FF; color: #4338CA; display: grid; place-items: center; font-weight: 700; }
.t-msg { color: #475569; font-size: 16px; flex: 1; }
.t-btns { align-items: center; gap: 16px; }
.t-div { width: 1px; height: 32px; background: #CBD5E1; }
.tbtn { min-width: 0; min-height: 56px; padding: 14px 24px; font-size: 18px; border: 0; box-shadow: 0 2px 6px rgba(0, 25, 68, 0.15); }
.t-ok { background: #15803D; color: #fff; }
.t-bad { background: #DC2626; color: #fff; }
.t-next { background: #2F6FCB; color: #fff; }
.tbtn.locked { background: #E5E7EB; color: #374151; box-shadow: none; }

/* Tự luyện (điện thoại) */
.play.mode-self { background: #faf8ff; --ink: #001944; }
.mode-self .play-top { background: rgba(250, 248, 255, 0.9); box-shadow: 0 1px 8px rgba(0, 25, 68, 0.04); min-height: 64px; grid-template-columns: 44px 1fr 32px; padding: 0 16px 0 8px; border: 0; position: sticky; top: 0; z-index: 20; }
.mode-self .icon-link { width: 44px; height: 44px; background: transparent; color: var(--on); }
.mode-self .pt-title { color: var(--on); font-size: 20px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.pbar { height: 6px; border-radius: 999px; background: var(--soft2); width: min(960px, calc(100% - 32px)); margin: 8px auto 16px; overflow: hidden; }
.pbar span { background: var(--primary); border-radius: 999px; }
.subrow { justify-content: flex-start; gap: 8px; width: min(960px, calc(100% - 32px)); margin: 0 auto 16px; flex-wrap: wrap; }
.mode-self .badge { background: var(--soft3); color: var(--primary); font-size: 12px; padding: 4px 12px; border: 0; }
.pill-topic { padding: 4px 14px; border-radius: 999px; background: var(--soft); color: var(--on); font-size: 12px; font-weight: 700; }
.mode-self .counter { margin-left: auto; padding: 4px 12px; border-radius: 999px; background: var(--soft2); color: var(--on); font-size: 12px; box-shadow: 0 1px 2px rgba(0, 25, 68, 0.08); }
.mode-self .stage { width: min(960px, calc(100% - 32px)); padding: 0 0 24px; }
.mode-self .q, .mode-self .tile { color: var(--on); }
.hint-card { border: 0; border-radius: 18px; box-shadow: 0 4px 16px rgba(0, 25, 68, 0.06); padding: 20px; }
.mode-self .hint-txt { font-size: 18px; color: var(--on); }
.mode-class .hint-card { background: #fff; }
.slots { display: grid; grid-template-columns: repeat(var(--cols, 8), minmax(0, 1fr)); gap: 8px; width: 100%; justify-content: center; }
.mode-class .slots { max-width: calc(var(--cols, 8) * 96px); }
.slot, .mode-class .slot { width: auto; aspect-ratio: 1; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 2px 4px rgba(0, 25, 68, 0.06); color: var(--on); font-size: clamp(18px, 5vw, 24px); padding: 0; }
.mode-class .slot { font-size: calc(var(--q) * 0.8); }
.slot:empty::after { content: ""; display: block; width: 10px; height: 2px; border-radius: 2px; background: #c2c6d4; }
.slot.filled { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.slot.locked { background: var(--primary-2); }
.slot.ok, .slot.show { background: #15803D; color: #fff; border: 0; }
.slot.bad { background: #B91C1C; color: #fff; border: 0; }
.ltiles { gap: 12px; }
.ltile { width: 56px; height: 56px; min-width: 0; padding: 0; background: #fff; color: var(--on); border: 0; border-radius: 16px; box-shadow: 0 4px 0 #c2c6d4, 0 6px 12px rgba(0, 25, 68, 0.08); font-size: 24px; }
.ltile:active { transform: translateY(4px); box-shadow: 0 0 0 #c2c6d4; }
.mode-class .ltile { width: calc(var(--q) * 1.6); height: calc(var(--q) * 1.6); min-width: 0; font-size: calc(var(--q) * 0.8); }
.btn-text { background: var(--soft2); color: var(--on); border: 0; border-radius: 999px; padding: 10px 18px; font-size: 14px; min-height: 48px; }
.btn-text .ico { color: #424752; }
.small-btns .btn-text:nth-child(2) { background: #ffdea4; color: #261900; box-shadow: 0 1px 3px rgba(0, 25, 68, 0.1); }
.small-btns .btn-text:nth-child(2) .ico { color: #785600; }
.small-btns { gap: 24px; }
.primary-box:not(:empty) { background: linear-gradient(to top, #faf8ff 70%, rgba(250, 248, 255, 0)); border: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.mode-class .primary-box:not(:empty) { background: transparent; }
.primary-box .primary { width: min(960px, 100%); height: 56px; border-radius: 16px; font-size: 16px; border: 0; background: var(--primary); color: #fff; box-shadow: 0 4px 0 #00458f, 0 8px 16px rgba(3, 90, 181, 0.25); }
.primary-box .primary.btn-navy-o { background: #fff; color: var(--primary); border: 2px solid var(--primary); box-shadow: none; }
.primary-box .primary:active { transform: translateY(3px); box-shadow: none; }
.mcard { background: var(--primary); border-color: var(--primary); }
.mcard.open { background: #fff; border-color: #c2c6d4; }
.wtok { border: 2px solid #E2E8F0; border-radius: 14px; color: var(--on); box-shadow: 0 2px 0 #c2c6d4; }
.wtok.sel { background: var(--primary); border-color: var(--primary); color: #fff; }
.answer-area { border-radius: 18px; border-color: #E2E8F0; }

@media (max-width: 900px) {
  .teams { flex-wrap: wrap; padding: 12px 16px 0; gap: 12px; }
  .team { flex: 1 1 calc(50% - 6px); padding: 12px; }
  .team-no { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
  .team-l { gap: 10px; }
  .team-name { font-size: 16px; } .team-score { font-size: 28px; } .team.cur .team-score { font-size: 32px; }
  .team-sub { display: none; }
  .mode-class .quiz { padding: 16px; }
  .mode-class .stage { width: calc(100% - 24px); }
  .mode-class .play-top { padding: 12px 16px; }
  .teacher { padding: 12px 16px; }
  .t-div { display: none; }
}

.mode-class { --pic: clamp(130px, min(15vw, 26vh), 300px); }
@media (min-width: 1000px) { .mode-class { --pic: clamp(130px, min(15vw, 26vh), 300px); } }
.mode-self .pt-title { font-size: 18px; }
.mode-self .stage { flex: 0 0 auto; }
.mode-self .primary-box { position: static; background: transparent; }
.mode-self .primary-box:not(:empty) { background: transparent; padding: 8px 0 24px; width: min(960px, calc(100% - 32px)); margin: 0 auto; }
.mode-self .primary-box .primary { width: 100%; }
@media (max-width: 420px) { .ltiles { gap: 10px; } .ltile { width: 52px; height: 52px; } }

@media (min-width: 1000px) { .mode-class { --q: clamp(40px, 3.4vw, 64px); } }
@media (max-width: 600px) { .nav { display: none; } .nav.open { display: flex; } }

.brand, .brand-t, .menu-btn { white-space: nowrap; }
@media (max-width: 600px) { .brand { font-size: 18px; gap: 8px; } .brand-t { font-size: 18px; } .menu-btn { padding: 0 12px; } .toplink { padding: 6px; } }


@media (max-width: 400px) { .topbar-in { gap: 4px; } .brand { gap: 6px; } .brand-t { font-size: 16px; } .logo { width: 30px; height: 30px; } .menu-btn { padding: 0 8px; font-size: 15px; } .toplink { min-width: 44px; } }

