/* Atest — тоглоом маягийн, тод өнгөтэй загвар (12-р ангийн сурагчдад) */
:root {
  --bg: #f3f0ff; --card: #ffffff; --ink: #1e1442; --muted: #6b6290; --line: #e4defa;
  --accent: #6c3cf0; --accent-2: #8f5bff; --accent-ink: #fff; --accent-dark: #4b22c4;
  --ok: #0f9d6b; --ok-bg: #dcf7ec; --bad: #e0384a; --bad-bg: #ffe3e6; --warn: #a15c00; --warn-bg: #fff1d1;
  --gold: #ffb020; --shadow: 0 6px 0 rgba(30, 20, 66, .08), 0 12px 28px rgba(76, 44, 160, .10);
  /* ЭЕШ-ийн 5 сонголтын өнгө */
  --cA: #ff5a5f; --cA-d: #c93b40; --cB: #2d8cff; --cB-d: #1b63c2; --cC: #ffad1f; --cC-d: #c67f00;
  --cD: #12b886; --cD-d: #0b8562; --cE: #9b5cff; --cE-d: #6f35d6;
  --stage1: #2b1466; --stage2: #5a2fd0;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130d2b; --card: #1e1645; --ink: #f1edff; --muted: #a79fcd; --line: #33295f;
    --accent: #8f5bff; --accent-2: #a77dff; --accent-ink: #fff; --accent-dark: #6c3cf0;
    --ok: #3fdca5; --ok-bg: #123d33; --bad: #ff7685; --bad-bg: #431a26; --warn: #ffcb6b; --warn-bg: #3c2c10;
    --shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 12px 28px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }
a { color: var(--accent); }
h1 { font-size: 26px; font-weight: 900; margin: 0 0 14px; letter-spacing: -.3px; }
h2 { font-size: 19px; font-weight: 800; margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }

/* ---------- толгой, навигаци ---------- */
header { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--card); box-shadow: 0 2px 0 var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -.5px; }
.brand i { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--cE), var(--accent)); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 18px; box-shadow: 0 3px 0 var(--accent-dark); transform: rotate(-6deg); }
nav { display: flex; gap: 2px; margin-left: auto; align-items: center; flex-wrap: nowrap; }
nav .lbl-long { display: none; }
nav a, nav button { white-space: nowrap; color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 12px; background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; }
nav a:hover, nav button:hover { background: var(--bg); }
nav a.on { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
nav .ic { font-size: 18px; }
.coins { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; padding: 5px 12px 5px 6px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); }
.coins::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, var(--gold) 60%, #c67f00); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
@media (max-width: 720px) {
  header { padding: 8px 12px; }
  nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); box-shadow: 0 -2px 0 var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); margin: 0; flex-wrap: nowrap; z-index: 20; overflow-x: auto; }
  nav a, nav button { flex-direction: column; gap: 0; font-size: 11px; padding: 4px 6px; border-radius: 10px; }
  nav .lbl-long { display: none; }
  body { padding-bottom: 76px; }
  .hdr-coins { margin-left: auto; }
}
@media (min-width: 721px) { .hdr-coins { order: 3; } }
@media (min-width: 721px) and (max-width: 1100px) { nav a span:not(.ic) { display: none; } nav a { padding: 8px 11px; } nav .ic { font-size: 20px; } }

main { max-width: 980px; margin: 22px auto; padding: 0 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 70px; }

/* ---------- товчнууд (3D) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 5px 0 var(--accent-dark); transition: transform .08s, box-shadow .08s; text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-dark); }
.btn.ghost { background: var(--card); color: var(--accent); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.sm { padding: 6px 12px; font-size: 13.5px; border-radius: 10px; box-shadow: 0 3px 0 var(--accent-dark); }
.btn.ghost.sm { box-shadow: 0 3px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.danger { background: var(--bad); box-shadow: 0 4px 0 #a32232; color: #fff; }
.btn.gold { background: var(--gold); color: #3b2500; box-shadow: 0 5px 0 #c67f00; }
.btn.green { background: var(--cD); box-shadow: 0 5px 0 var(--cD-d); }
.btn.big { padding: 16px 28px; font-size: 19px; border-radius: 18px; }
button:disabled { opacity: .5; cursor: default; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--bg); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat b { display: block; font-size: 28px; font-weight: 900; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .spacer { flex: 1; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 8px; border-bottom: 2px solid var(--bg); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--cE)); border-radius: 99px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { padding: 8px 14px; border-radius: 12px; border: 0; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; box-shadow: 0 3px 0 var(--line); }
.tabs button.on { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
#toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; display: none; max-width: 90vw; z-index: 50; font-weight: 700; box-shadow: var(--shadow); }
.qr { max-width: 240px; border-radius: 12px; background: #fff; padding: 8px; }

/* ---------- нүүр ---------- */
.hero { background: linear-gradient(135deg, var(--stage1), var(--stage2)); color: #fff; border-radius: 24px; padding: 24px; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero h1 { color: #fff; font-size: 28px; margin-bottom: 4px; }
.hero .sub { opacity: .85; }
.hero .chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero .chip { background: rgba(255,255,255,.14); padding: 8px 14px; border-radius: 14px; font-weight: 800; }
.hero .chip b { font-size: 20px; display: block; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { border: 0; border-radius: 22px; padding: 20px; text-align: left; color: #fff; cursor: pointer; font: inherit; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; transition: transform .1s; text-decoration: none; }
.tile:hover { transform: translateY(-3px) rotate(-.5deg); }
.tile:active { transform: translateY(2px); }
.tile .emo { font-size: 34px; line-height: 1; }
.tile b { font-size: 20px; font-weight: 900; display: block; }
.tile span { opacity: .9; font-size: 14px; }
.tile.t1 { background: var(--cB); box-shadow: 0 6px 0 var(--cB-d); } .tile.t2 { background: var(--cA); box-shadow: 0 6px 0 var(--cA-d); }
.tile.t3 { background: var(--cE); box-shadow: 0 6px 0 var(--cE-d); } .tile.t4 { background: var(--cD); box-shadow: 0 6px 0 var(--cD-d); }
.tile.t5 { background: var(--cC); box-shadow: 0 6px 0 var(--cC-d); color: #3b2500; }
.invite { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--warn-bg); margin-bottom: 10px; animation: pop .4s; }
.invite .emo { font-size: 28px; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 2px solid var(--bg); font-weight: 700; }
.lb { list-style: none; margin: 0; padding: 0; }
.lb .rk { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); font-weight: 900; }
.lb li:nth-child(1) .rk { background: #ffd54a; } .lb li:nth-child(2) .rk { background: #d9dde8; } .lb li:nth-child(3) .rk { background: #f0b27a; }

/* ---------- тест бөглөх ---------- */
.passage { background: var(--bg); border-left: 5px solid var(--accent); padding: 12px 16px; border-radius: 12px; margin-bottom: 12px; white-space: pre-wrap; max-height: 45vh; overflow: auto; }
.stem { font-size: 18px; font-weight: 700; margin-bottom: 14px; white-space: pre-wrap; }
.qimg { display: block; max-width: 100%; height: auto; margin: 0 0 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; }
.choice { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 10px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); transition: transform .08s; }
.choice:hover:not(:disabled) { transform: translateY(-2px); }
.choice .l { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 18px; }
.choice.c0 .l { background: var(--cA); } .choice.c1 .l { background: var(--cB); } .choice.c2 .l { background: var(--cC); }
.choice.c3 .l { background: var(--cD); } .choice.c4 .l { background: var(--cE); }
.choice.sel { box-shadow: 0 4px 0 var(--accent-dark), inset 0 0 0 3px var(--accent); }
.choice.right { background: var(--ok-bg); box-shadow: 0 4px 0 var(--ok), inset 0 0 0 3px var(--ok); }
.choice.wrong { background: var(--bad-bg); box-shadow: 0 4px 0 var(--bad), inset 0 0 0 3px var(--bad); }
.expl { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--bg); white-space: pre-wrap; }
.qnav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.qnav button { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.qnav button.cur { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
.qnav button.done { background: var(--line); } .qnav button.r { background: var(--ok-bg); color: var(--ok); } .qnav button.w { background: var(--bad-bg); color: var(--bad); }
.timer { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 18px; padding: 6px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }

/* ---------- тулааны тайз ---------- */
.stage { background: radial-gradient(1200px 500px at 20% -10%, rgba(255,255,255,.12), transparent), linear-gradient(160deg, var(--stage1), var(--stage2)); color: #fff; border-radius: 26px; padding: 22px; min-height: 70vh; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.stage h1, .stage h2 { color: #fff; }
.stage .muted { color: rgba(255,255,255,.75); }
.stage .card { color: var(--ink); }
.stage .card h1, .stage .card h2 { color: var(--ink); }
.stage .card .muted, .stage details .muted { color: var(--muted); }
.pin { font-size: clamp(40px, 10vw, 76px); font-weight: 900; letter-spacing: 6px; background: #fff; color: var(--stage1); border-radius: 20px; padding: 6px 24px; display: inline-block; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.players { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.player { background: rgba(255,255,255,.14); padding: 10px 14px; border-radius: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; animation: pop .35s; }
.player.ready { background: var(--cD); box-shadow: 0 4px 0 var(--cD-d); }
.player.off { opacity: .5; }
.avatar { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; color: #fff; }
.stake { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: #3b2500; font-weight: 900; padding: 8px 16px; border-radius: 14px; box-shadow: 0 4px 0 #c67f00; }
.gq { background: #fff; color: var(--ink); border-radius: 20px; padding: 18px; margin: 12px 0 14px; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.gq .stem { margin: 0; }
.gtop { display: flex; align-items: center; gap: 10px; }
.tbar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.2); overflow: hidden; margin: 10px 0 4px; }
.tbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cD), var(--cC), var(--cA)); border-radius: 99px; transition: width .25s linear; }
.clock { width: 58px; height: 58px; border-radius: 50%; background: #fff; color: var(--stage1); display: grid; place-items: center; font-weight: 900; font-size: 22px; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.answers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .answers { grid-template-columns: 1fr; } }
.ans { border: 0; border-radius: 18px; padding: 16px; min-height: 76px; color: #fff; font: inherit; font-weight: 800; font-size: 17px; text-align: left; display: flex; gap: 12px; align-items: center; cursor: pointer; transition: transform .08s, opacity .2s; }
.ans .l { flex: 0 0 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 20px; font-weight: 900; }
.ans:active:not(:disabled) { transform: translateY(4px); }
.ans.c0 { background: var(--cA); box-shadow: 0 6px 0 var(--cA-d); } .ans.c1 { background: var(--cB); box-shadow: 0 6px 0 var(--cB-d); }
.ans.c2 { background: var(--cC); box-shadow: 0 6px 0 var(--cC-d); } .ans.c3 { background: var(--cD); box-shadow: 0 6px 0 var(--cD-d); }
.ans.c4 { background: var(--cE); box-shadow: 0 6px 0 var(--cE-d); }
.ans.dim { opacity: .35; } .ans.mine { outline: 4px solid #fff; outline-offset: 2px; }
.ans.correct { outline: 4px solid #fff; outline-offset: 2px; transform: scale(1.02); }
.ans:disabled { cursor: default; }
.feedback { text-align: center; padding: 18px; border-radius: 20px; font-size: 26px; font-weight: 900; margin: 10px 0; animation: pop .35s; }
.feedback.ok { background: var(--cD); box-shadow: 0 6px 0 var(--cD-d); } .feedback.no { background: var(--cA); box-shadow: 0 6px 0 var(--cA-d); }
.feedback small { display: block; font-size: 15px; font-weight: 700; opacity: .9; }
.board { list-style: none; padding: 0; margin: 10px 0; }
.board li { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 14px; margin-bottom: 8px; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.18); animation: slide .35s both; }
.board li.me { background: #fff6d6; }
.board .pts { margin-left: auto; font-variant-numeric: tabular-nums; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 24px 0 10px; }
.podium .p { text-align: center; width: 110px; }
.podium .blk { border-radius: 16px 16px 0 0; color: #fff; font-weight: 900; font-size: 34px; display: grid; place-items: center; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15); }
.podium .p1 .blk { height: 150px; background: linear-gradient(#ffd54a, #f2a900); } .podium .p2 .blk { height: 110px; background: linear-gradient(#e8ebf3, #b7bdcc); color: #4a4f60; }
.podium .p3 .blk { height: 80px; background: linear-gradient(#f5c08f, #d98a46); }
.podium .nm { font-weight: 900; margin-bottom: 6px; word-break: break-word; }
.crown { font-size: 34px; animation: bob 1.4s ease-in-out infinite; }
.countdown { font-size: 120px; font-weight: 900; text-align: center; animation: pop .8s infinite; }
.counts { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.counts span { min-width: 54px; text-align: center; padding: 6px 8px; border-radius: 12px; font-weight: 900; color: #fff; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.banner { position: fixed; top: 70px; right: 16px; left: auto; max-width: 360px; z-index: 40; background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow), 0 0 0 3px var(--gold); animation: pop .4s; }
@media (max-width: 720px) { .banner { left: 12px; right: 12px; top: 64px; max-width: none; } }
/* ---------- түвшний шат, Бүтээх нүд, зөвлөмж ---------- */
.ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.lvl { background: var(--bg); border-radius: 16px; padding: 12px 14px; }
.lvl-h { display: flex; gap: 10px; align-items: center; }
.lvl-e { font-size: 30px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--card); border-radius: 14px; box-shadow: 0 3px 0 var(--line); }
.blanks { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.blank { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 12px; padding: 6px 8px; margin: 0; color: var(--ink); font-weight: 800; }
.blank input { width: 70px; padding: 8px; text-align: center; font-weight: 800; font-size: 17px; }
.blank.ok { background: var(--ok-bg); } .blank.bad { background: var(--bad-bg); }
.blank em { font-style: normal; color: var(--ok); font-weight: 900; }
.reco { border: 3px solid var(--accent); }

/* ---------- ЭЕШ / SAT сонголт ---------- */
.chooser { max-width: 760px; margin: 6vh auto; text-align: center; }
.tile.big { min-height: 190px; }
.track-sw { border: 0; border-radius: 99px; padding: 6px 12px; font: inherit; font-weight: 800; background: var(--bg); color: var(--accent); cursor: pointer; margin-right: 6px; }

/* ---------- SAT тестийн интерфейс (дижитал SAT-ын бүтэцтэй, өөрийн загвар) ---------- */
:root { --bb-ink: #1b1d22; --bb-line: #d6d9e0; --bb-blue: #2a5bd7; }
.bb { position: fixed; inset: 0; z-index: 30; background: #fff; color: var(--bb-ink);
  display: flex; flex-direction: column; font-family: "Nunito", system-ui, sans-serif; }
.bb-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 18px; border-bottom: 2px dashed var(--bb-line); background: #f7f8fb; }
.bb-title { font-weight: 800; display: flex; flex-direction: column; gap: 2px; }
.bb-timer { text-align: center; font-size: 20px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; }
.bb-timer .warn { color: #c62828; }
.bb-tools { display: flex; justify-content: flex-end; gap: 10px; }
.bb-link { background: none; border: 0; color: var(--bb-ink); font: inherit; font-weight: 700; cursor: pointer; padding: 2px 4px; text-align: left; }
.bb-link:hover { color: var(--bb-blue); }
.bb-body { flex: 1; overflow: auto; padding: 22px 28px; display: block; max-width: 860px; margin: 0 auto; width: 100%; }
.bb-body.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: none; padding: 0; }
.bb-left { padding: 26px 30px; overflow: auto; border-right: 4px solid var(--bb-line); }
.bb-right { padding: 26px 30px; overflow: auto; }
.bb-passage { white-space: pre-wrap; line-height: 1.7; margin-bottom: 16px; }
.bb-stem, .bb-stem-l { white-space: pre-wrap; font-weight: 700; line-height: 1.6; margin: 10px 0 16px; }
.bb-qhead { display: flex; align-items: center; gap: 10px; background: #eef0f4; border-bottom: 2px dashed var(--bb-line); padding: 6px 8px; margin-bottom: 12px; }
.bb-num { background: #1b1d22; color: #fff; font-weight: 800; padding: 2px 10px; border-radius: 4px; }
.bb-mark, .bb-elim { background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; color: var(--bb-ink); }
.bb-mark.on { color: #c62828; } .bb-elim { border: 2px solid var(--bb-line); border-radius: 6px; padding: 0 8px; }
.bb-elim.on { background: var(--bb-blue); color: #fff; border-color: var(--bb-blue); }
.bb-opt { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.bb-choice { flex: 1; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border: 2px solid #1b1d22; border-radius: 10px; background: #fff; font: inherit; color: var(--bb-ink); cursor: pointer; }
.bb-choice:hover:not(:disabled) { border-color: var(--bb-blue); }
.bb-l { flex: 0 0 30px; height: 30px; border-radius: 50%; border: 2px solid #1b1d22; display: grid; place-items: center; font-weight: 800; }
.bb-opt.sel .bb-choice { border-color: var(--bb-blue); box-shadow: inset 0 0 0 2px var(--bb-blue); }
.bb-opt.sel .bb-l { background: var(--bb-blue); border-color: var(--bb-blue); color: #fff; }
.bb-opt.x .bb-choice { opacity: .45; text-decoration: line-through; }
.bb-strike { background: none; border: 0; font: inherit; font-weight: 800; cursor: pointer; width: 46px; color: var(--bb-ink); }
.bb-spr { max-width: 200px; font-size: 20px; font-weight: 800; border: 2px solid #1b1d22; border-radius: 8px; margin: 6px 0; }
.bb-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 18px; border-top: 2px dashed var(--bb-line); background: #f7f8fb; }
.bb-bottom > span:last-child { text-align: right; }
.bb-bottom .btn { background: var(--bb-blue); box-shadow: none; border-radius: 99px; color: #fff; }
.bb-bottom .btn.ghost { background: #fff; color: var(--bb-blue); box-shadow: inset 0 0 0 2px var(--bb-blue); }
.bb-qbtn { background: #1b1d22; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 800; cursor: pointer; }
.bb-name { font-weight: 700; }
.bb-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.bb-grid button { width: 40px; height: 40px; border: 2px dashed #8a90a0; background: #fff; border-radius: 6px; font: inherit; font-weight: 800; cursor: pointer; position: relative; color: var(--bb-blue); }
.bb-grid button.ans { background: var(--bb-blue); color: #fff; border: 2px solid var(--bb-blue); }
.bb-grid button.mk::after { content: "🔖"; position: absolute; top: -10px; right: -8px; font-size: 13px; }
.bb-grid button.cur { outline: 3px solid #1b1d22; outline-offset: 2px; }
.bb-legend { display: flex; gap: 16px; } .bb-legend i { display: inline-block; width: 14px; height: 14px; border: 2px dashed #8a90a0; margin-right: 4px; vertical-align: middle; }
.bb-legend i.cur { border: 2px solid #1b1d22; } .bb-legend i.mk { border: 0; } .bb-legend i.mk::before { content: "🔖"; font-style: normal; }
.bb-pop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 16px; }
.bb-pop-in { max-width: 640px; width: 100%; max-height: 80vh; overflow: auto; color: #1b1d22; background: #fff; }
.bb-review { max-width: 760px; margin: 0 auto; color: #1b1d22; background: #fff; }
.bb-intro { max-width: 760px; margin: 0 auto; }
.bb-ref ul { padding-left: 18px; } .bb-ref li { margin: 4px 0; }
.bb-total { text-align: center; margin: 10px 0 18px; } .bb-total b { display: block; font-size: 72px; font-weight: 900; color: var(--accent); line-height: 1; }
@media (max-width: 760px) {
  .bb-body.split { grid-template-columns: 1fr; } .bb-left { border-right: 0; border-bottom: 4px solid var(--bb-line); }
  .bb-top, .bb-bottom { grid-template-columns: 1fr auto; } .bb-tools { grid-column: 1 / -1; justify-content: flex-start; }
  .bb-name { display: none; } .bb-body { padding: 16px; } .bb-left, .bb-right { padding: 16px; }
}
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slide { from { transform: translateX(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
