/* ==========================================================================
   Viktorina — «Koshin» dizayni: Samarqand–Buxoro koshinlari ranglari,
   sakkiz qirrali yulduz (xotam) belgisi. Fon — lojuvard, urg'u — feruza va za'faron.
   ========================================================================== */
:root { --u: 1vh;
  /* o'yin ekranlari mavzusi (standart — «Koshin», qorong'i lojuvard) */
  --gbg: #13294b; --gfg: #ffffff; --on: 255,255,255; --gpanel: #f6f1e4; --gpfg: #1c2733; --gshade: rgba(0,0,0,.22);
  --gacc: #e3a33a; --gwarn: #ffd27a; --gurg: #ffb3b9; --hdr: #13294b;
  --r-ok: #0f6f72; --r-bad: #8d2832; --r-none: #2d3b4e;
  --lapis: #13294b;      /* lojuvard — o'yin foni */
  --lapis-2: #0b1b33;
  --lapis-3: #1d3a66;
  --tq: #17a2a0;         /* feruza */
  --saf: #e3a33a;        /* za'faron */
  --pom: #c2414b;        /* anor */
  --cob: #3c63b8;        /* kobalt */
  --plum: #7a5aa6;
  --olive: #5f8d3e;
  --ivory: #f6f1e4;      /* koshin oqi (faqat matn maydonlarida) */
  --bg: #edf2f4;         /* chinni — o'qituvchi bo'limi foni */
  --card: #ffffff;
  --fg: #10202f;
  --muted: #5a6a78;
  --line: #d2dce1;
  --ok: #17a2a0;
  --bad: #c2414b;
  --gold: #e3a33a;
  --fd: "Unbounded", "Golos Text", system-ui, sans-serif;
  --fb: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --far: "Amiri", "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", serif;
  --star: polygon(50% 0%, 64.6% 14.7%, 85.4% 14.6%, 85.3% 35.4%, 100% 50%, 85.3% 64.6%, 85.4% 85.4%, 64.6% 85.3%, 50% 100%, 35.4% 85.3%, 14.6% 85.4%, 14.7% 64.6%, 0% 50%, 14.7% 35.4%, 14.6% 14.6%, 35.4% 14.7%);
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.055' stroke-width='1.4'%3E%3Cpath d='M50 18 L59.4 27.4 L72.6 27.4 L72.6 40.6 L82 50 L72.6 59.4 L72.6 72.6 L59.4 72.6 L50 82 L40.6 72.6 L27.4 72.6 L27.4 59.4 L18 50 L27.4 40.6 L27.4 27.4 L40.6 27.4 Z'/%3E%3Cpath d='M0 0 L18 50 M100 0 L82 50 M0 100 L18 50 M100 100 L82 50 M50 0 L50 18 M50 100 L50 82 M0 50 L18 50 M100 50 L82 50'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0e1a27; --card: #15263a; --fg: #e7eef3; --muted: #9db0bf; --line: #283c52; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0e1a27; --card: #15263a; --fg: #e7eef3; --muted: #9db0bf; --line: #283c52; color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font: 16px/1.5 var(--fb); -webkit-tap-highlight-color: transparent; }
body.k { background-color: var(--gbg); background-image: var(--gimg, var(--girih)); background-size: var(--gsz, auto); background-attachment: fixed; color: var(--gfg); transition: background-color .35s; }
body.k.r-ok, body.k.r-bad, body.k.r-none { background-image: var(--gpat, var(--girih)); background-size: var(--gpsz, auto); }
body.k.r-ok { background-color: var(--r-ok); }
body.k.r-bad { background-color: var(--r-bad); }
body.k.r-none { background-color: var(--r-none); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--saf); outline-offset: 2px; }
a { color: inherit; }
h1, h2 { margin: 0; line-height: 1.15; text-wrap: balance; font-family: var(--fd); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.1rem; }

/* ---------- belgi: sakkiz qirrali yulduz ---------- */
.star { clip-path: var(--star); display: inline-grid; place-items: center; }

/* ---------- o'yin: umumiy bloklar ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 14px; min-height: 100vh; }
.card { background: var(--card); color: var(--fg); border-radius: 18px 6px 18px 6px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
body.k .card { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.25); }
.eb { font-size: .82rem; font-weight: 600; color: var(--gacc); }
.mut { color: var(--muted); }
body.k .mut { color: rgba(var(--on),.72); }
.btn { background: var(--tq); color: #fff; border: 0; border-radius: 12px; padding: 14px 18px; font-weight: 700; width: 100%; font-family: var(--fd); font-size: .95rem; letter-spacing: .01em; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.w { background: var(--saf); color: var(--lapis-2); }
.btn.g { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn.sm { width: auto; padding: 10px 14px; font-size: .85rem; }
select, input[type=text] { font: inherit; font-weight: 600; padding: 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--fg); width: 100%; }
.bar { height: 8px; background: rgba(var(--on),.14); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--tq), var(--saf)); transform-origin: left; transition: transform .25s linear; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; }
.pill { background: rgba(var(--on),.1); border: 1px solid rgba(var(--on),.16); border-radius: 999px; padding: 3px 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.gold { background: linear-gradient(100deg, #b97a17, var(--saf) 40%, #ffe3a3 50%, var(--saf) 60%, #b97a17); background-size: 250% 100%; color: var(--lapis-2); border-radius: 10px; padding: 8px 12px; font-weight: 800; text-align: center; animation: shimmer 2.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.qt { background: var(--gpanel); color: var(--gpfg); border-radius: 16px 6px 16px 6px; padding: 16px 18px; font-weight: 600; font-size: 1.12rem; line-height: 1.45; }
.aq, .ar { font-family: var(--far); }
.aq { font-size: 1.12em; font-weight: 400; }

/* ---------- variantlar ---------- */
.tiles { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tile { border: 0; border-radius: 14px; color: #fff; font-weight: 600; text-align: left; padding: 12px 14px 12px 10px; min-height: 64px; display: flex; align-items: center; gap: 12px; font-size: 1rem; line-height: 1.3; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); position: relative; }
.tile .sh { clip-path: var(--star); flex: none; width: 2.3em; height: 2.3em; display: grid; place-items: center; background: rgba(255,255,255,.92); font-family: var(--fd); font-weight: 800; font-size: .95rem; }
.t0 { background: var(--tq); } .t0 .sh { color: var(--tq); }
.t1 { background: var(--saf); color: #2a1a00; } .t1 .sh { color: #9a6410; }
.t2 { background: var(--pom); } .t2 .sh { color: var(--pom); }
.t3 { background: var(--cob); } .t3 .sh { color: var(--cob); }
.t4 { background: var(--plum); } .t4 .sh { color: var(--plum); }
.t5 { background: var(--olive); } .t5 .sh { color: var(--olive); }
.tile:disabled { cursor: default; }
.tiles.done .tile { opacity: .3; transform: scale(.97); transition: .25s; }
.tiles.done .tile.pick { opacity: 1; transform: scale(1.02); box-shadow: 0 0 0 4px rgb(var(--on)), 0 0 26px rgba(var(--on),.45); }
.tiles.tf { grid-template-columns: 1fr 1fr; }
.tiles.tf .tile { min-height: 132px; flex-direction: column; justify-content: center; font-size: 1.2rem; font-family: var(--fd); text-align: center; padding: 14px; }
.tiles.tf .tile .sh { width: 2.8em; height: 2.8em; font-size: 1.2rem; }
.tiles.multi .tile .ck { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 2px solid rgba(255,255,255,.8); display: grid; place-items: center; font-size: .95rem; color: transparent; }
.tiles.multi .tile.sel { box-shadow: 0 0 0 3px rgb(var(--on)), inset 0 -4px 0 rgba(0,0,0,.18); }
.tiles.multi .tile.sel .ck { background: #fff; color: var(--lapis); }
.hint { margin: 0; text-align: center; font-weight: 600; opacity: .88; font-size: .92rem; }
.ord, .mt { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ord li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--gpanel); color: var(--gpfg); border-radius: 12px; padding: 9px 10px; border-left: 8px solid; font-weight: 600; }
.ord .n { font-family: var(--fd); font-weight: 800; color: var(--lapis-3); width: 1.4em; text-align: center; }
.mv { display: flex; flex-direction: column; gap: 4px; }
.mv button { border: 0; background: #dfe6ea; border-radius: 7px; width: 40px; height: 30px; font-size: .9rem; color: var(--lapis); }
.mv button:disabled { opacity: .3; }
.mt li { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; }
.mt .l, .mt .r { border-radius: 12px; padding: 10px; font-weight: 600; min-height: 48px; display: flex; align-items: center; }
.mt .l { color: #fff; }
.mt .r { background: var(--gpanel); color: var(--gpfg); }
.mt .eq { font-weight: 800; color: var(--saf); }
.gtx { background: var(--gpanel); color: var(--gpfg); border-radius: 16px 6px 16px 6px; padding: 14px; font-size: 1.15rem; line-height: 2.2; font-weight: 600; }
.gtx .gp { border: 2px dashed var(--lapis-3); background: #e3eaf5; color: var(--lapis-3); border-radius: 8px; padding: 2px 10px; min-width: 4.5em; font-weight: 800; margin: 0 2px; }
.gtx .gp.f { border-style: solid; background: var(--lapis-3); color: #fff; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bank button { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 700; background: var(--saf); color: var(--lapis-2); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); font-size: 1.05rem; }
.bank button:disabled { opacity: .3; }
.sv { font-family: var(--fd); font-size: 3rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; color: var(--saf); }
input[type=range] { width: 100%; height: 36px; accent-color: var(--saf); }

/* ---------- natija va kutish ---------- */
.big { font-family: var(--fd); font-size: 4.5rem; font-weight: 800; text-align: center; line-height: 1; font-variant-numeric: tabular-nums; }
.res { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-top: 7vh; }
.res .ic { clip-path: var(--star); width: 104px; height: 104px; background: rgba(var(--on),.16); display: grid; place-items: center; font-size: 2.8rem; font-weight: 800; }
.res .pts { background: var(--gshade); border-radius: 10px; padding: 8px 18px; font-family: var(--fd); font-size: 1.3rem; font-weight: 700; }
.praise { font-family: var(--fd); font-size: 2rem; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: rgba(var(--on),.12); border-radius: 10px; padding: 6px 12px; font-weight: 600; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.board li { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 10px; align-items: center; background: var(--gpanel); color: var(--gpfg); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.board .rk { font-family: var(--fd); color: var(--lapis-3); font-weight: 800; }
.board .pt { font-variant-numeric: tabular-nums; font-weight: 700; }
.card .board li { background: var(--bg); color: var(--fg); }
.rv { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.rv p { margin: 0; }
.tag { font-size: .8rem; font-weight: 700; }
.tag.ok { color: var(--ok); } .tag.bad { color: var(--bad); }
.ar { font-size: 1.2rem; line-height: 1.9; background: var(--bg); border-radius: 8px; padding: 6px 10px; text-align: start; }
.msg { min-height: 1.3em; font-weight: 600; color: var(--bad); }
body.k .msg { color: var(--gwarn); }

/* ---------- avatar ---------- */
.avpick { display: flex; gap: 12px; align-items: flex-end; }
.avbig { font-size: 4rem; line-height: 1; text-align: center; }
.avgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; max-height: 236px; overflow: auto; padding: 2px; }
.avgrid button { font-size: 1.75rem; line-height: 1; border: 2px solid transparent; border-radius: 12px; background: var(--bg); padding: 7px 0; }
.avgrid button.on { border-color: var(--tq); background: rgba(23,162,160,.14); }
.avtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.avtabs button { border: 0; border-radius: 999px; padding: 5px 11px; font-size: .85rem; font-weight: 600; background: var(--bg); color: var(--fg); }
.avtabs button.on { background: var(--lapis); color: #fff; }

/* ==========================================================================
   Katta ekran
   ========================================================================== */
body.scr { --u: 1vh; }
body.scr .wrap { max-width: none; padding: calc(2.4 * var(--u)) 2.4vw calc(9 * var(--u)); gap: calc(2 * var(--u)); height: calc(100 * var(--u)); min-height: 0; overflow: hidden; }
.s-head { display: flex; justify-content: space-between; align-items: center; gap: 2vw; font-weight: 600; font-size: calc(2.3 * var(--u)); }
.s-q { background: var(--gpanel); color: var(--gpfg); border-radius: calc(2.2 * var(--u)) .8vh calc(2.2 * var(--u)) .8vh; padding: calc(2.6 * var(--u)) 2.4vw; font-size: clamp(20px, calc(4.1 * var(--u)), 56px); font-weight: 700; text-align: center; line-height: 1.3; box-shadow: 0 calc(1.2 * var(--u)) calc(3 * var(--u)) rgba(0,0,0,.25); }
.s-mid { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 3vw; min-height: 0; }
.s-timer { position: relative; width: calc(18 * var(--u)); height: calc(18 * var(--u)); flex: none; display: grid; place-items: center; }
.s-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.s-timer .trk { fill: rgba(var(--on),.06); stroke: rgba(var(--on),.14); stroke-width: 3; }
.s-timer .prg { fill: none; stroke: var(--gacc); stroke-width: 5; stroke-linejoin: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.s-timer b { position: relative; font-family: var(--fd); font-size: calc(6.5 * var(--u)); font-weight: 800; font-variant-numeric: tabular-nums; }
.s-timer.urgent .prg { stroke: var(--pom); }
.s-timer.urgent b { animation: beat 1s ease-in-out infinite; color: var(--gurg); }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } }
.s-cnt { text-align: center; font-weight: 600; font-size: calc(2.6 * var(--u)); flex: none; }
.s-cnt b { display: block; font-family: var(--fd); font-size: calc(7 * var(--u)); line-height: 1; }
.s-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: calc(1.4 * var(--u)); }
.s-tiles .tile { min-height: calc(11 * var(--u)); font-size: clamp(16px, calc(3 * var(--u)), 40px); padding: calc(1.4 * var(--u)) 1.4vw calc(1.4 * var(--u)) 1vw; border-radius: calc(1.6 * var(--u)); }
.s-tiles .tile .sh { font-size: calc(2.6 * var(--u)); }
.s-tiles.rev .tile:not(.right) { opacity: .22; filter: saturate(.4); transform: scale(.96); transition: .5s; }
.s-tiles .tile.right { box-shadow: 0 0 0 .5vh rgb(var(--on)), 0 0 calc(4 * var(--u)) rgba(var(--on),.5); animation: glow 1.4s ease-in-out infinite; }
.s-tiles .tile.right::after { content: "✓"; margin-left: auto; clip-path: var(--star); background: #fff; color: var(--tq); width: calc(6 * var(--u)); height: calc(6 * var(--u)); display: grid; place-items: center; font-size: calc(3.4 * var(--u)); font-weight: 800; animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes glow { 50% { box-shadow: 0 0 0 .5vh rgb(var(--on)), 0 0 calc(7 * var(--u)) rgba(var(--on),.75); } }
@keyframes stamp { from { transform: scale(2.4) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.s-hist { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2.4vw; height: 100%; padding-bottom: calc(1 * var(--u)); }
.s-hist .col { display: flex; flex-direction: column; align-items: center; gap: .8vh; font-weight: 700; font-size: calc(2.8 * var(--u)); }
.s-hist .col i { display: block; width: 7vw; border-radius: calc(1 * var(--u)) calc(1 * var(--u)) 0 0; min-height: 4px; transform-origin: bottom; animation: grow .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.s-hist .col:nth-child(2) i { animation-delay: .1s; } .s-hist .col:nth-child(3) i { animation-delay: .2s; } .s-hist .col:nth-child(4) i { animation-delay: .3s; }
.s-hist .col i.t1 { background: var(--saf); }
@keyframes grow { from { transform: scaleY(0); } }
.s-hist .col .sh { clip-path: var(--star); width: calc(4.6 * var(--u)); height: calc(4.6 * var(--u)); display: grid; place-items: center; background: rgb(var(--on)); color: var(--gbg); font-family: var(--fd); font-weight: 800; font-size: calc(2 * var(--u)); }
.s-ans { background: var(--gpanel); color: var(--gpfg); border-radius: calc(2 * var(--u)) .8vh calc(2 * var(--u)) .8vh; padding: calc(2 * var(--u)) 2vw; font-size: calc(4 * var(--u)); font-weight: 700; text-align: center; }
.s-match { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; font-size: calc(3 * var(--u)); font-weight: 600; }
.s-match ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(1 * var(--u)); }
.s-match li { border-radius: calc(1.2 * var(--u)); padding: calc(1.2 * var(--u)) 1.2vw; color: #fff; }
.s-match .rt li { background: var(--gpanel); color: var(--gpfg); }
.s-gap { display: inline-block; min-width: 5em; border-bottom: .5vh solid var(--lapis-3); color: var(--lapis-3); text-align: center; margin: 0 .3em; font-weight: 800; }
.s-gap.f { background: #dff3f2; color: #0d6c6b; border-color: var(--tq); border-radius: .6vh; padding: 0 .4em; animation: stamp .5s both; }
.s-board { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-direction: column; gap: calc(1 * var(--u)); width: min(70vw, 1100px); }
.s-board li { display: grid; grid-template-columns: 3em 1fr auto auto; gap: 2vw; align-items: center; background: var(--gpanel); color: var(--gpfg); border-radius: calc(1.2 * var(--u)); padding: calc(1.4 * var(--u)) 2vw; font-weight: 700; font-size: calc(3.2 * var(--u)); animation: slidein .5s cubic-bezier(.2, .9, .3, 1) both; }
.s-board li:nth-child(2) { animation-delay: .12s; } .s-board li:nth-child(3) { animation-delay: .24s; } .s-board li:nth-child(4) { animation-delay: .36s; } .s-board li:nth-child(5) { animation-delay: .48s; }
.s-board .rk { font-family: var(--fd); color: var(--lapis-3); }
.s-board .sc { font-family: var(--fd); font-variant-numeric: tabular-nums; }
.dl { font-size: calc(2.2 * var(--u)); font-weight: 800; border-radius: 999px; padding: .2vh .9vw; }
.dl.up { background: #d6f2ef; color: #0d6c6b; } .dl.dn { background: #f6dbde; color: #8d2832; }
@keyframes slidein { from { transform: translateX(-12vw); opacity: 0; } }
.s-lobby { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 3vw; align-items: start; min-height: 0; }
.s-join { background: var(--gpanel); color: var(--gpfg); border-radius: calc(2.4 * var(--u)) .8vh calc(2.4 * var(--u)) .8vh; padding: calc(2.4 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(1.2 * var(--u)); font-weight: 600; font-size: calc(2.4 * var(--u)); max-width: 36vw; }
.s-join .u { font-size: calc(2.2 * var(--u)); word-break: break-all; text-align: center; color: var(--lapis-3); font-weight: 700; }
#qr img, #qr canvas { width: calc(26 * var(--u)) !important; height: calc(26 * var(--u)) !important; }
.s-names { display: flex; flex-wrap: wrap; gap: calc(1.2 * var(--u)); align-content: flex-start; }
.s-names .chip { font-size: calc(2.8 * var(--u)); padding: .8vh 1.4vw; background: rgba(var(--on),.1); border: 1px solid rgba(var(--on),.15); animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.s-scr { width: 100%; margin-top: calc(1 * var(--u)); padding-top: calc(1.6 * var(--u)); border-top: 2px dashed rgba(19,41,75,.25); display: flex; flex-direction: column; align-items: center; gap: calc(.8 * var(--u)); font-size: calc(1.9 * var(--u)); }
.s-scr b { font-size: calc(2.2 * var(--u)); color: var(--lapis-3); word-break: break-all; text-align: center; user-select: all; }
.s-scr button { border: 0; border-radius: 999px; background: var(--lapis); color: #fff; font: inherit; font-weight: 700; padding: calc(.9 * var(--u)) calc(2.2 * var(--u)); cursor: pointer; }
.s-pin { display: flex; flex-direction: column; align-items: center; }
.s-pin b { font-family: var(--fd); font-size: calc(8.5 * var(--u)); letter-spacing: .08em; line-height: 1; color: var(--lapis); }
.s-ctl { position: fixed; left: 1.4vw; bottom: calc(1.6 * var(--u)); display: flex; gap: .8vw; z-index: 9; }
.s-ctl button, .s-ctl a { border: 0; border-radius: 999px; background: rgba(var(--on),.12); color: var(--gfg); font-weight: 700; font-size: calc(2.1 * var(--u)); padding: .9vh 1.4vw; text-decoration: none; font-family: var(--fb); }
.s-ctl .w { background: var(--saf); color: var(--lapis-2); }
.s-ctl .snd.big { background: var(--saf); color: var(--lapis-2); animation: breathe 1.8s ease-in-out infinite; }
.s-ctl { flex-wrap: wrap; max-width: calc(100vw - 2.8vw); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; flex: 1; min-height: 0; }
.podium .p { display: flex; flex-direction: column; align-items: center; gap: calc(1 * var(--u)); width: 22vw; font-weight: 700; opacity: 0; animation: rise .9s cubic-bezier(.2, .9, .3, 1) forwards; }
.podium .p:nth-child(3) { animation-delay: .6s; } .podium .p:nth-child(1) { animation-delay: 2.2s; } .podium .p:nth-child(2) { animation-delay: 4s; }
@keyframes rise { from { opacity: 0; transform: translateY(calc(14 * var(--u))); } to { opacity: 1; transform: none; } }
.podium .av { font-size: calc(9 * var(--u)); line-height: 1; }
.podium .nm { font-size: calc(3 * var(--u)); text-align: center; background: var(--gpanel); color: var(--gpfg); border-radius: calc(1.4 * var(--u)); padding: calc(1 * var(--u)) 1.4vw; }
.podium .nm span { font-family: var(--fd); color: var(--lapis-3); }
.podium .blk { width: 100%; border-radius: calc(1.6 * var(--u)) calc(1.6 * var(--u)) 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: calc(2 * var(--u)); font-family: var(--fd); font-size: calc(7 * var(--u)); background: linear-gradient(var(--lapis-3), var(--lapis-2)); border: 1px solid rgba(255,255,255,.12); border-bottom: 0; }
.podium .p:nth-child(2) .blk { background: linear-gradient(#c78a22, #7c4f0b); }
.podium .blk small { font-family: var(--fb); font-size: calc(2.6 * var(--u)); opacity: .85; }
.rest { display: flex; flex-wrap: wrap; gap: calc(1 * var(--u)) 2vw; justify-content: center; font-size: calc(2.3 * var(--u)); font-weight: 600; opacity: 0; animation: rise .8s 5.2s forwards; }
@keyframes breathe { 50% { transform: scale(1.06); } }

/* ---------- kirish animatsiyalari (har savolda tasodifiy) ---------- */
.in-slide .s-q { animation: inSlide .6s cubic-bezier(.2, .9, .3, 1) both; }
.in-zoom .s-q { animation: inZoom .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.in-flip .s-q { animation: inFlip .7s cubic-bezier(.2, .9, .3, 1) both; }
.in-drop .s-q { animation: inDrop .7s cubic-bezier(.3, 1.5, .5, 1) both; }
.in-unfold .s-q { animation: inUnfold .7s cubic-bezier(.2, .9, .3, 1) both; }
.in-twirl .s-q { animation: inTwirl .8s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes inSlide { from { transform: translateX(-60vw); opacity: 0; } }
@keyframes inZoom { from { transform: scale(.2); opacity: 0; } }
@keyframes inFlip { from { transform: perspective(900px) rotateX(90deg); opacity: 0; } }
@keyframes inDrop { from { transform: translateY(-60vh); } }
@keyframes inUnfold { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes inTwirl { from { transform: rotate(-12deg) scale(.5); opacity: 0; } }
.s-tiles .tile, .tiles .tile, .ord li, .mt li, .bank button { animation: tileIn .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.s-tiles .tile:nth-child(2), .tiles .tile:nth-child(2), .ord li:nth-child(2), .mt li:nth-child(2) { animation-delay: .08s; }
.s-tiles .tile:nth-child(3), .tiles .tile:nth-child(3), .ord li:nth-child(3), .mt li:nth-child(3) { animation-delay: .16s; }
.s-tiles .tile:nth-child(4), .tiles .tile:nth-child(4), .ord li:nth-child(4), .mt li:nth-child(4) { animation-delay: .24s; }
.s-tiles.rev .tile { animation: none; }
@keyframes tileIn { from { transform: translateY(24px) scale(.9); opacity: 0; } }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.bounce { animation: bounce .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bounce { from { transform: scale(.3); } }
.spin8 { animation: spin8 6s linear infinite; }
@keyframes spin8 { to { transform: rotate(360deg); } }
.flame { display: inline-block; animation: flick .6s ease-in-out infinite alternate; }
@keyframes flick { to { transform: scale(1.15) rotate(6deg); } }
.cd-num { animation: cdpop 1s ease-out infinite; display: inline-block; }
@keyframes cdpop { 0% { transform: scale(1.6); opacity: .2; } 30% { transform: scale(1); opacity: 1; } }

/* tik ekran (telefon yoki planshet tik holatda): o'lchamlar kenglikka qarab */
@media (max-aspect-ratio: 4/5) {
  body.scr { --u: 1.05vw; }
  body.scr .wrap { height: auto; min-height: 100vh; overflow: visible; padding: 14px 14px 90px; }
  .s-lobby { grid-template-columns: 1fr; }
  .s-join { max-width: none; }
  #qr img, #qr canvas { width: min(60vw, 260px) !important; height: min(60vw, 260px) !important; }
  .s-pin b { font-size: 13vw; }
  .s-mid { flex-wrap: wrap; justify-content: center; }
  .s-mid > .s-ans, .s-mid > .ord, .s-mid > .s-match, .s-mid > div[style*="flex:1"] { flex-basis: 100%; order: 3; }
  .s-tiles { grid-template-columns: 1fr; }
  .s-board { width: 100%; }
  .podium { gap: 2vw; } .podium .p { width: 30vw; }
}
/* ---------- effekt qatlami ---------- */
#fxc { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 30; }
.banner { position: fixed; left: 0; right: 0; top: 40%; z-index: 31; pointer-events: none; display: flex; justify-content: center; }
.banner span { font-family: var(--fd); font-weight: 800; font-size: clamp(28px, 8vh, 96px); color: #fff; background: var(--pom); padding: 1.4vh 4vw; border-radius: 1.4vh; box-shadow: 0 2vh 5vh rgba(0,0,0,.35); animation: bannerIn 1.6s cubic-bezier(.2, .9, .3, 1) forwards; }
.banner.gold span { background: var(--saf); color: var(--lapis-2); }
.banner.tq span { background: var(--tq); }
@keyframes bannerIn { 0% { transform: translateX(-120vw) skewX(-12deg); } 25% { transform: none; } 75% { transform: none; opacity: 1; } 100% { transform: translateX(120vw) skewX(12deg); opacity: 0; } }
.edge { position: fixed; inset: 0; pointer-events: none; z-index: 29; box-shadow: inset 0 0 0 0 transparent; }
.edge.on { animation: edge 1s ease-in-out infinite; }
@keyframes edge { 50% { box-shadow: inset 0 0 12vh rgba(194,65,75,.55); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .podium .p, .rest { opacity: 1; }
}

/* ==========================================================================
   O'qituvchi bo'limi
   ========================================================================== */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--hdr) var(--girih); color: #fff; position: sticky; top: 0; z-index: 5; }
.top .logo { display: flex; align-items: center; gap: 10px; font-family: var(--fd); font-weight: 700; font-size: 1.05rem; text-decoration: none; color: #fff; }
.logo .mark { width: 26px; height: 26px; }
.top .sp { flex: 1; }
.top .who { font-size: .85rem; opacity: .75; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .btn2 { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.page { max-width: 1000px; margin: 0 auto; padding: 22px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.page h1 { font-size: 1.6rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.btn2 { border: 1.5px solid var(--line); background: var(--card); color: var(--fg); border-radius: 10px; padding: 8px 13px; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn2:hover { border-color: var(--tq); }
.btn2.p { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.btn2.p:hover { background: var(--lapis-3); }
.btn2.d { color: var(--bad); }
.btn2:disabled { opacity: .45; cursor: not-allowed; }
.btn2.sm { padding: 5px 9px; font-size: .82rem; }
label.f, div.f { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .88rem; }
.inp, textarea.inp, select.inp { font: inherit; font-weight: 500; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); width: 100%; }
textarea.inp { min-height: 72px; resize: vertical; line-height: 1.5; }
.inp:focus { border-color: var(--tq); outline: none; box-shadow: 0 0 0 3px rgba(23,162,160,.18); }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.err { color: var(--bad); font-weight: 600; font-size: .88rem; }
.okc { color: var(--ok); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.qcard { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--tq); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
#gm .qcard { border-top-color: var(--saf); }
.qcard h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; font-family: var(--fd); font-weight: 600; }
.badge { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .75rem; font-weight: 700; background: #d9efee; color: #0d6c6b; }
.badge.g { background: #fbecd0; color: #7c4f0b; }
.badge.r { background: #f6dbde; color: #8d2832; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--lapis-2); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 50; max-width: 90vw; }
.modal { position: fixed; inset: 0; background: rgba(8,18,33,.55); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal .card { max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; }
.ed { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .ed { grid-template-columns: 1fr; } }
.qlist { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
.qlist button { text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); border-radius: 10px; padding: 8px 10px; font-size: .85rem; display: grid; grid-template-columns: 1.8em 1fr auto; gap: 6px; align-items: center; }
.qlist button.on { border-color: var(--tq); box-shadow: 0 0 0 2px var(--tq) inset; }
.qlist button .n { font-family: var(--fd); font-weight: 700; color: var(--tq); }
.qlist button .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qlist button .x { color: var(--bad); font-weight: 800; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.opt .sw { clip-path: var(--star); width: 34px; height: 34px; display: grid; place-items: center; color: #fff; font-family: var(--fd); font-weight: 700; font-size: .8rem; }
.opt input[type=radio], .opt input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--tq); }
.pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; font-weight: 600; color: var(--muted); }
.drop.on { border-color: var(--tq); color: var(--tq); }
input.pin { font-family: var(--fd); font-size: 1.7rem; font-weight: 700; text-align: center; letter-spacing: .2em; }
.home-hero { background: var(--hdr) var(--girih); color: #fff; border-radius: 22px 8px 22px 8px; padding: 30px 18px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
table.rep { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.rep th, table.rep td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
table.rep th { font-weight: 700; }
.hero-mark { width: 92px; height: 92px; }

/* ==========================================================================
   Tillar, kutubxona, jamoalar, Telegram, yangilanish xabari
   ========================================================================== */
select.lang { border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; border-radius: 10px; padding: 7px 8px; font: 600 .85rem var(--fb); max-width: 9.5em; }
select.lang option { color: #1c2733; }
.top select.lang { padding: 6px 6px; }
.ltop { display: flex; justify-content: flex-end; }
.s-ctl select.lang.ctl { border: 0; border-radius: 999px; font-size: calc(2.1 * var(--u)); padding: .9vh 1vw; background: rgba(var(--on),.12); }
.btn2.tg, .s-ctl .tg { background: #229ed9; border-color: #229ed9; color: #fff; }
body.k .btn2.tg { border: 0; }
.libf .inp { width: auto; }
.libf input.inp { min-width: 200px; }
ol.qprev { margin: 0; padding-inline-start: 1.4em; display: flex; flex-direction: column; gap: 10px; }
ol.qprev li { border-bottom: 1px solid var(--line); padding-bottom: 8px; }

/* jamoalar */
.tchip { display: inline-block; color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .85rem; }
.teamopt { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.tpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.tpick button { border: 3px solid transparent; border-radius: 12px; background: var(--tc); color: #fff; font: 700 1rem var(--fb); padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.tpick button small { font-weight: 600; font-size: .75rem; opacity: .85; }
.tpick button.on { border-color: #fff; outline: 3px solid var(--tc); transform: translateY(-2px); }
.tbadge { display: inline-block; margin: 6px auto 0; background: var(--tc); color: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 700; }
.tdot { display: inline-block; width: .8em; height: .8em; clip-path: var(--star); background: var(--tc); margin-inline-end: .4em; vertical-align: -.05em; }
.s-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(18vw, 1fr)); gap: 1.2vw; width: 100%; }
.s-teams .tcol { display: flex; flex-direction: column; gap: calc(.8 * var(--u)); align-items: flex-start; border-top: calc(.8 * var(--u)) solid var(--tc); background: rgba(var(--on),.06); border-radius: calc(1.2 * var(--u)); padding: calc(1 * var(--u)) 1vw; }
.s-teams .th { font-family: var(--fd); font-weight: 700; font-size: calc(3 * var(--u)); color: var(--gfg); }
.s-teams .th b { background: var(--tc); color: #fff; border-radius: 999px; padding: 0 .6em; margin-inline-start: .3em; }
.s-teams .chip { font-size: calc(2.4 * var(--u)) !important; }
.s-board.teams li { border-inline-start: calc(1 * var(--u)) solid var(--tc); }
.s-board.teams small { font-family: var(--fb); font-weight: 600; opacity: .6; font-size: .7em; }
.podium.teams .blk { background: linear-gradient(var(--tc), color-mix(in srgb, var(--tc) 55%, #000)) !important; }
.podium .av.sm { font-size: calc(5 * var(--u)); letter-spacing: -.1em; }

/* «yangi versiya» xabari */
.upd { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 60; background: var(--saf); color: var(--lapis-2); border-radius: 999px; padding: 6px 6px 6px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.upd button { border: 0; border-radius: 999px; font: 700 .9rem var(--fb); padding: 7px 14px; cursor: pointer; }
.upd .go { background: var(--lapis); color: #fff; }
.upd .x { background: transparent; color: var(--lapis-2); padding: 7px 10px; }

/* arabcha: o'ngdan chapga */
[dir=rtl] .tile { text-align: right; }
[dir=rtl] .qlist button, [dir=rtl] table.rep th, [dir=rtl] table.rep td { text-align: right; }
[dir=rtl] .s-ctl { left: auto; right: 1.4vw; }
[dir=rtl] body { font-family: var(--fb), "Amiri", serif; }
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .top .sp { flex-basis: 100%; height: 0; order: 1; }
  .top .logo { order: 0; }
  .top > :not(.logo):not(.sp) { order: 2; }
  .top .who { display: none; }
}
@media (max-width: 640px) { #ttl { flex: 1 1 100%; order: -1; } }
.qlist button .tx, .qcard h3 { unicode-bidi: plaintext; }

body.k select.lang { border-color: rgba(var(--on),.25); background: rgba(var(--on),.1); color: var(--gfg); }
body.k .ltop a, body.k .res a:not(.btn) { color: inherit; }

/* ==========================================================================
   Mavzular (o'qituvchi o'yin ochganda tanlaydi): Koshin (qorong'i) · Tong · Osmon · Bog'
   ========================================================================== */
[data-gt="osmon"] {
  --gbg: #e2f0fb; --gfg: #0f2a47; --on: 15,42,71; --gpanel: #ffffff; --gpfg: #0f2a47; --gshade: rgba(15,42,71,.07);
  --gacc: #1f74d8; --gwarn: #c0392b; --gurg: #e0435a; --hdr: #1b63b5; --r-ok: #ccf0e4; --r-bad: #fde0e4; --r-none: #dbe7f2;
  --tq: #10b0ab; --saf: #ffb21e; --pom: #f2546b; --cob: #3b6cf0; --plum: #9a5cf0; --olive: #2fb06c; --blk1: #3b6cf0; --blk2: #2148b5;
  --gimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='150'%3E%3Cg fill='%23ffffff' fill-opacity='.6'%3E%3Cellipse cx='44' cy='42' rx='30' ry='11'/%3E%3Cellipse cx='64' cy='35' rx='19' ry='13'/%3E%3Cellipse cx='176' cy='112' rx='34' ry='12'/%3E%3Cellipse cx='196' cy='104' rx='20' ry='13'/%3E%3C/g%3E%3Cpath d='M120 66 l3 7 7 3 -7 3 -3 7 -3 -7 -7 -3 7 -3z' fill='%231b63b5' fill-opacity='.10'/%3E%3C/svg%3E"), linear-gradient(180deg, #c9e5fb 0%, #e6f3fe 55%, #f7fbff 100%); --gsz: 240px 150px, 100% 100%;
  --gpat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='150'%3E%3Cg fill='%23ffffff' fill-opacity='.6'%3E%3Cellipse cx='44' cy='42' rx='30' ry='11'/%3E%3Cellipse cx='64' cy='35' rx='19' ry='13'/%3E%3Cellipse cx='176' cy='112' rx='34' ry='12'/%3E%3Cellipse cx='196' cy='104' rx='20' ry='13'/%3E%3C/g%3E%3Cpath d='M120 66 l3 7 7 3 -7 3 -3 7 -3 -7 -7 -3 7 -3z' fill='%231b63b5' fill-opacity='.10'/%3E%3C/svg%3E"); --gpsz: 240px 150px;
}
[data-gt="tong"] {
  --gbg: #ffe2cf; --gfg: #2d2140; --on: 45,33,64; --gpanel: #fffaf5; --gpfg: #2d2140; --gshade: rgba(45,33,64,.07);
  --gacc: #d9480f; --gwarn: #b5452e; --gurg: #c2414b; --hdr: #8f2f52; --r-ok: #cdeee4; --r-bad: #f9d2d6; --r-none: #f0e1d6;
  --tq: #0fa3a3; --saf: #f59e0b; --pom: #e5484d; --cob: #4f63e8; --plum: #9d4edd; --olive: #5b9b2d; --blk1: #c2416b; --blk2: #8a2346;
  --gimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='108'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.6'%3E%3Cpath stroke-width='2' d='M10 108 V48 Q10 12 42 4 Q74 12 74 48 V108'/%3E%3Cpath stroke-width='1' d='M20 108 V52 Q20 22 42 15 Q64 22 64 52 V108'/%3E%3C/g%3E%3Ccircle cx='42' cy='60' r='3' fill='%23c2416b' fill-opacity='.18'/%3E%3C/svg%3E"), linear-gradient(165deg, #ffe6c4 0%, #ffcfc2 48%, #fff1e4 100%); --gsz: 84px 108px, 100% 100%;
  --gpat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='108'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.6'%3E%3Cpath stroke-width='2' d='M10 108 V48 Q10 12 42 4 Q74 12 74 48 V108'/%3E%3Cpath stroke-width='1' d='M20 108 V52 Q20 22 42 15 Q64 22 64 52 V108'/%3E%3C/g%3E%3Ccircle cx='42' cy='60' r='3' fill='%23c2416b' fill-opacity='.18'/%3E%3C/svg%3E"); --gpsz: 84px 108px;
}
[data-gt="bog"] {
  --gbg: #154c3d; --gfg: #ffffff; --on: 255,255,255; --gpanel: #fbf7ec; --gpfg: #1c2a24; --gshade: rgba(0,0,0,.22);
  --gacc: #f2b134; --gwarn: #ffd27a; --gurg: #ffb3b9; --hdr: #154c3d; --r-ok: #0f7d74; --r-bad: #8d2832; --r-none: #2c3f39;
  --tq: #19b39a; --saf: #f2b134; --pom: #e2555f; --cob: #4a7fe0; --plum: #a066c8; --olive: #8bb43a;
  --gimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1.6'%3E%3Cpath d='M0 60 C30 20 90 100 120 60'/%3E%3Cpath d='M60 0 C20 30 100 90 60 120'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.07'%3E%3Cellipse cx='30' cy='38' rx='9' ry='4' transform='rotate(-35 30 38)'/%3E%3Cellipse cx='90' cy='82' rx='9' ry='4' transform='rotate(-35 90 82)'/%3E%3Cellipse cx='82' cy='28' rx='8' ry='3.5' transform='rotate(40 82 28)'/%3E%3Cellipse cx='38' cy='92' rx='8' ry='3.5' transform='rotate(40 38 92)'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(circle at 50% 25%, #1f6b53 0%, #154c3d 55%, #0f3a2e 100%); --gsz: 120px 120px, 100% 100%;
  --gpat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1.6'%3E%3Cpath d='M0 60 C30 20 90 100 120 60'/%3E%3Cpath d='M60 0 C20 30 100 90 60 120'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.07'%3E%3Cellipse cx='30' cy='38' rx='9' ry='4' transform='rotate(-35 30 38)'/%3E%3Cellipse cx='90' cy='82' rx='9' ry='4' transform='rotate(-35 90 82)'/%3E%3Cellipse cx='82' cy='28' rx='8' ry='3.5' transform='rotate(40 82 28)'/%3E%3Cellipse cx='38' cy='92' rx='8' ry='3.5' transform='rotate(40 38 92)'/%3E%3C/g%3E%3C/svg%3E"); --gpsz: 120px 120px;
}
[data-gt="bog"] .podium .blk { background: linear-gradient(#1f7a5c, #0f3a2e); }
[data-gl] body.k .qt, [data-gl] body.k .s-q, [data-gl] body.k .s-ans, [data-gl] body.k .s-join, [data-gl] body.k .board li, [data-gl] body.k .s-board li,
[data-gl] body.k .ord li, [data-gl] body.k .mt .r, [data-gl] body.k .gtx, [data-gl] body.k .podium .nm, [data-gl] body.k .card {
  box-shadow: 0 1px 0 rgba(var(--on),.06), 0 8px 22px rgba(var(--on),.09);
}
[data-gl] body.k .card { box-shadow: 0 0 0 1px rgba(var(--on),.07), 0 10px 26px rgba(var(--on),.1); }
[data-gl] .podium .blk { background: linear-gradient(var(--blk1), var(--blk2)); color: #fff; border-color: transparent; }
[data-gl] .podium .p:nth-child(2) .blk { background: linear-gradient(#e4a43a, #b06f12); }
[data-gl] body.k .s-tiles.rev .tile:not(.right) { opacity: .3; }
[data-gl] body.k .tiles.done .tile { opacity: .4; }
[data-gl] body.k .res .ic { background: var(--gpanel); box-shadow: 0 8px 22px rgba(var(--on),.12); }
[data-gl] body.k.r-ok .res .ic { color: var(--tq); } [data-gl] body.k.r-bad .res .ic { color: var(--pom); }
[data-gl] body.k .gold { color: #3a2400; }
/* o'qituvchi oynasidagi mavzu tanlagich */
.thpick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thpick label { cursor: pointer; border: 2px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; }
.thpick input { position: absolute; opacity: 0; pointer-events: none; }
.thpick label:has(input:checked) { border-color: var(--tq); box-shadow: 0 0 0 2px var(--tq) inset; }
.thpick i { display: block; width: 100%; height: 34px; border-radius: 8px; }
select.lang { width: auto; }
.s-ctl { align-items: center; }
/* mustaqil topshiriq */
.qcard.task { border-top-color: var(--plum); }
.taskcode { display: flex; flex-direction: column; align-items: center; }
.taskcode b { font-family: var(--fd); font-size: 2.6rem; letter-spacing: .1em; color: var(--lapis); }

/* ==========================================================================
   Sayt foni (o'qituvchi sahifalari va PIN sahifasi) — sarlavhadagi «🎨» tanlagichdan
   ========================================================================== */
body:not(.k) { background-color: var(--bg); background-image: var(--pimg, none); background-size: var(--psz, auto); background-attachment: fixed; }
:root[data-gt="osmon"] { --bg: #e9f4fd; --card: #ffffff; --fg: #0f2a47; --muted: #557089; --line: #cfe0ee; color-scheme: light;
  --pimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='150'%3E%3Cg fill='%23ffffff' fill-opacity='.6'%3E%3Cellipse cx='44' cy='42' rx='30' ry='11'/%3E%3Cellipse cx='64' cy='35' rx='19' ry='13'/%3E%3Cellipse cx='176' cy='112' rx='34' ry='12'/%3E%3Cellipse cx='196' cy='104' rx='20' ry='13'/%3E%3C/g%3E%3Cpath d='M120 66 l3 7 7 3 -7 3 -3 7 -3 -7 -7 -3 7 -3z' fill='%231b63b5' fill-opacity='.10'/%3E%3C/svg%3E"), linear-gradient(180deg, #d4eafb 0%, #eef6fe 60%, #f8fbff 100%); --psz: 240px 150px, 100% 100%; }
:root[data-gt="tong"] { --bg: #fff1e8; --card: #fffdfb; --fg: #2d2140; --muted: #7a6273; --line: #efd8cb; color-scheme: light;
  --pimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='108'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.6'%3E%3Cpath stroke-width='2' d='M10 108 V48 Q10 12 42 4 Q74 12 74 48 V108'/%3E%3Cpath stroke-width='1' d='M20 108 V52 Q20 22 42 15 Q64 22 64 52 V108'/%3E%3C/g%3E%3Ccircle cx='42' cy='60' r='3' fill='%23c2416b' fill-opacity='.18'/%3E%3C/svg%3E"), linear-gradient(165deg, #ffe8cc 0%, #ffe1d8 50%, #fff6ef 100%); --psz: 84px 108px, 100% 100%; }
:root[data-gt="koshin"] { --bg: #0e1a27; --card: #15263a; --fg: #e7eef3; --muted: #9db0bf; --line: #283c52; color-scheme: dark;
  --pimg: var(--girih); --psz: auto; }
:root[data-gt="bog"] { --bg: #0f3a2e; --card: #154a3b; --fg: #eef6f0; --muted: #a9c4b6; --line: #24604d; color-scheme: dark;
  --pimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1.6'%3E%3Cpath d='M0 60 C30 20 90 100 120 60'/%3E%3Cpath d='M60 0 C20 30 100 90 60 120'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.07'%3E%3Cellipse cx='30' cy='38' rx='9' ry='4' transform='rotate(-35 30 38)'/%3E%3Cellipse cx='90' cy='82' rx='9' ry='4' transform='rotate(-35 90 82)'/%3E%3Cellipse cx='82' cy='28' rx='8' ry='3.5' transform='rotate(40 82 28)'/%3E%3Cellipse cx='38' cy='92' rx='8' ry='3.5' transform='rotate(40 38 92)'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(circle at 50% 20%, #17543f 0%, #0f3a2e 70%); --psz: 120px 120px, 100% 100%; }
.top select[data-theme] { max-width: 8.5em; }
