/* ================================================================
   FikraSmart Games suite — Hub (gh-), Wizard (gw-), live board (gr-),
   student screen (gs-), solo games (sg-), Challenge Wheel (gwh-).
   Loaded after the themes. Dark vivid game screens; large tap targets;
   RTL-safe (logical properties); headings forced white against themes.
   ================================================================ */
:root { --fg-font: 'Outfit', 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, sans-serif; }

/* ── shared overlay (hub, wizard) ─────────────────────────────── */
html body .fg-ov { z-index: 98000; display: none; align-items: center; justify-content: center; }
html body .fg-ov.show { display: flex; }
.gh-box, .gw-box { width: min(1120px, 96vw); max-height: 92vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%); color: #0f172a; border-radius: 28px; box-shadow: 0 40px 90px rgba(15, 23, 42, .4); font-family: var(--fg-font); overflow: hidden; animation: fgPop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes fgPop { from { opacity: 0; transform: scale(.94) translateY(16px); } to { opacity: 1; transform: none; } }
html body :is(.gh-box, .gw-box) :is(h2, h3, h4, b, label, p, small, span, input, select, textarea, button) { font-family: inherit; }
html body :is(.gh-box, .gw-box) :is(h2, h3, h4) { color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; margin: 0; }
.gh-ic { width: 46px; height: 46px; border-radius: 15px; display: inline-grid; place-items: center; font-size: 1.25rem; color: #fff; background: linear-gradient(135deg, var(--c, #6366f1), color-mix(in srgb, var(--c, #6366f1) 60%, #0f172a)); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--c, #6366f1) 70%, transparent); flex: none; }
.gh-ic.svg { position: relative; overflow: hidden; }
.gh-ic.svg svg { width: 26px; height: 26px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); transition: transform .18s; }
.gh-ic.svg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 55%); pointer-events: none; }
.gh-tile:hover .gh-ic.svg svg { transform: scale(1.1); }
.gh-x { width: 42px; height: 42px; border: 0; border-radius: 14px; background: #eef2f7; color: #334155; font-size: 1rem; cursor: pointer; flex: none; }
.gh-x:hover { background: #fee2e2; color: #dc2626; }
.gh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #0f172a; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; transition: .15s; }
.gh-btn:hover { background: #f1f5f9; }
.gh-btn.primary { background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff !important; -webkit-text-fill-color: #fff; border: 0; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c, #6366f1) 60%, transparent), 0 10px 22px -12px rgba(15, 23, 42, .6); }
.gh-btn.danger { color: #dc2626; border-color: #fecaca; background: #fff5f5; }
.gh-btn.sm { min-height: 34px; padding: 0 10px; font-size: .8rem; }
.gh-btn.big { min-height: 50px; padding: 0 26px; font-size: 1rem; }
.gh-btn.wide { width: 100%; margin-top: 10px; }
.gh-btn:disabled { opacity: .45; pointer-events: none; }

/* ── Games Hub ────────────────────────────────────────────────── */
.gh-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px 14px; border-bottom: 1px solid #eef2f7; }
.gh-title { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.gh-logo { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; color: #fff; font-size: 1.4rem; background: linear-gradient(135deg, #6366f1, #ec4899); box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .7); }
.gh-title b { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.gh-title small { color: #475569; font-weight: 600; }
.gh-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; border-radius: 13px; background: #f1f5f9; color: #64748b; min-width: 220px; }
.gh-search input { border: 0; background: transparent; color: #0f172a; font: inherit; outline: none; width: 100%; }
.gh-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 24px 0; }
.gh-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 12px; background: transparent; color: #475569; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.gh-tabs button.on { background: #0f172a; color: #fff; }
.gh-body { padding: 16px 24px 24px; overflow-y: auto; flex: 1; min-height: 240px; }
.gh-sec { margin-bottom: 22px; }
.gh-sec h3 { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.gh-sec h3 i { color: #6366f1; }
.gh-sec h3 small { font-weight: 500; color: #475569; font-size: .8rem; }
.gh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.gh-tile { position: relative; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; gap: 4px 12px; align-items: start; text-align: start; padding: 14px; border: 1px solid #e8edf5; border-radius: 20px; background: #fff; cursor: pointer; font: inherit; color: #0f172a; transition: transform .16s, box-shadow .16s, border-color .16s; }
.gh-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(15, 23, 42, .4); border-color: color-mix(in srgb, var(--c) 45%, #e8edf5); }
.gh-tile .gh-ic { grid-row: 1 / 3; }
.gh-tile .gh-tx b { display: block; font-weight: 800; font-size: .98rem; }
.gh-tile .gh-tx small { display: block; color: #475569; font-size: .78rem; line-height: 1.35; margin-top: 2px; }
.gh-badges { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.gh-badges em { font-style: normal; font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 45%, #000); }
.gh-badges em.soon { background: #e2e8f0; color: #334155; }
.gh-badges em.ai { background: #ede9fe; color: #6d28d9; }
.gh-badges em.new { background: #fef3c7; color: #b45309; }
.gh-tile.soon { border-style: dashed; }
.gh-tile.soon .gh-ic { filter: grayscale(.7); opacity: .7; }
.gh-empty { text-align: center; color: #64748b; padding: 40px 20px; }
.gh-empty.big h3 { margin: 10px 0 6px; }
.gh-empty-ic { width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg, #6366f1, #ec4899); }
.gh-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gh-card { padding: 14px; border: 1px solid #e8edf5; border-radius: 20px; background: #fff; display: flex; flex-direction: column; gap: 12px; }
.gh-card-top { display: flex; gap: 12px; align-items: center; }
.gh-card-top b { display: block; font-weight: 800; }
.gh-card-top small { color: #475569; font-size: .78rem; }
.gh-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gh-card-actions .primary { flex: 1; }

/* ── Wizard ───────────────────────────────────────────────────── */
.gw-head { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid #eef2f7; }
.gw-ttl { flex: 1; min-width: 0; }
.gw-ttl b { display: block; font-size: 1.15rem; font-weight: 800; }
.gw-ttl small { color: #475569; font-weight: 600; }
.gw-steps { display: flex; gap: 6px; margin: 0; padding: 4px; list-style: none; background: #f1f5f9; border-radius: 14px; }
.gw-steps li { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; font-size: .82rem; font-weight: 700; color: #475569; cursor: default; }
.gw-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #e2e8f0; color: #1e293b; font-size: .72rem; }
.gw-steps li.on { background: #fff; color: #0f172a; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.gw-steps li.on span { background: #0f172a; color: #fff; }
.gw-steps li.done { cursor: pointer; color: #15803d; } .gw-steps li.done span { background: #bbf7d0; color: #14532d; }
.gw-body { flex: 1; overflow: hidden; display: flex; min-height: 0; }
.gw-foot { display: flex; align-items: center; gap: 12px; padding: 12px 24px 18px; border-top: 1px solid #eef2f7; flex-wrap: wrap; }
.gw-count { font-size: .85rem; font-weight: 700; color: #7c2d12; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; background: #fef3c7; }
.gw-count.ok { color: #14532d; background: #dcfce7; }
.gw-q { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; width: 100%; min-height: 0; }
.gw-src { border-inline-end: 1px solid #eef2f7; display: flex; flex-direction: column; min-height: 0; }
.gw-src-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 14px 0; }
.gw-src-tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 0; border-radius: 12px; background: transparent; color: #475569; font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.gw-src-tabs button i { font-size: 1.05rem; }
.gw-src-tabs button.on { background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 45%, #000); }
.gw-src-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.gw-hint { margin: 0; font-size: .82rem; color: #475569; line-height: 1.45; padding: 10px 12px; border-radius: 12px; background: #f8fafc; }
.gw-hint i { color: color-mix(in srgb, var(--c) 60%, #000); margin-inline-end: 4px; }
.gw-shot { height: 120px; border-radius: 14px; background: #f1f5f9; display: grid; place-items: center; overflow: hidden; color: #475569; }
.gw-shot img { width: 100%; height: 100%; object-fit: contain; }
.gw-f { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.gw-f > span { font-size: .76rem; font-weight: 800; color: #334155; }
.gw-f.big > span { font-size: .9rem; }
html body .gw-box :is(.gw-f input, .gw-f textarea, .gw-f select, .gw-qi-edit input, .gw-qi-edit textarea, .gw-teams input) { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 11px; border: 1.5px solid #e2e8f0; background: #fff; color: #0f172a; font: inherit; font-size: .92rem; resize: vertical; }
html body .gw-box :is(.gw-f input, .gw-f textarea, .gw-f select, .gw-qi-edit input, .gw-qi-edit textarea, .gw-teams input):focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 15%, transparent); }
.gw-f.big input { font-size: 1.1rem; font-weight: 700; padding: 14px; }
.gw-row { display: flex; gap: 10px; align-items: flex-end; }
.gw-check { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: #334155; }
.gw-import { display: flex; flex-direction: column; gap: 6px; }
.gw-imp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e8edf5; border-radius: 12px; background: #fff; font: inherit; cursor: pointer; text-align: start; color: #0f172a; }
.gw-imp i { color: color-mix(in srgb, var(--c) 60%, #000); } .gw-imp span { flex: 1; font-weight: 700; } .gw-imp small { color: #475569; }
.gw-list-wrap { display: flex; flex-direction: column; min-height: 0; }
.gw-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.gw-list-head b { font-weight: 800; } .gw-list-head b span { color: color-mix(in srgb, var(--c) 45%, #000); }
.gw-list { overflow-y: auto; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.gw-list-empty { text-align: center; color: #475569; padding: 60px 20px; } .gw-list-empty i { font-size: 2.4rem; color: var(--c); opacity: .5; }
.gw-qi { border: 1px solid #e8edf5; border-radius: 16px; background: #fff; overflow: hidden; }
.gw-qi.bad { border-color: #fecaca; background: #fff7f7; }
.gw-qi-view { display: flex; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.gw-qi-n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 45%, #000); font-weight: 800; font-size: .8rem; }
.gw-qi-main { flex: 1; min-width: 0; }
.gw-qi-text { font-weight: 700; line-height: 1.45; }
.gw-qi-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gw-qi-opts span { font-size: .78rem; padding: 4px 9px; border-radius: 8px; background: #f1f5f9; color: #334155; }
.gw-qi-opts span b { color: #475569; margin-inline-end: 4px; }
.gw-qi-opts span.ok { background: #dcfce7; color: #166534; } .gw-qi-opts span.ok b { color: #16a34a; }
.gw-qi-exp { margin-top: 6px; font-size: .78rem; color: #7c2d12; } .gw-qi-exp i { color: #f59e0b; }
.gw-qi-meta { display: flex; gap: 6px; align-items: center; flex: none; }
.gw-qi-meta em { font-style: normal; font-size: .7rem; font-weight: 700; color: #334155; padding: 3px 7px; border-radius: 99px; background: #f1f5f9; }
.gw-qi-meta em.d-easy { background: #dcfce7; color: #166534; } .gw-qi-meta em.d-medium { background: #fef3c7; color: #92400e; } .gw-qi-meta em.d-hard { background: #fee2e2; color: #991b1b; }
.gw-qi-edit { display: none; flex-direction: column; gap: 8px; padding: 0 14px 14px; }
.gw-qi.edit .gw-qi-edit { display: flex; } .gw-qi.edit .gw-qi-view { opacity: .55; }
.gw-qi-eopts { display: flex; flex-direction: column; gap: 6px; }
.gw-qi-eopts label { display: flex; align-items: center; gap: 8px; }
.gw-qi-eopts label b { width: 30px; height: 30px; border-radius: 9px; color: #fff; display: grid; place-items: center; font-size: .8rem; flex: none; }
.gw-qi-eopts label input[type=radio] { width: 20px; height: 20px; accent-color: #16a34a; flex: none; }
.gw-qi-eopts label button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f1f5f9; color: #64748b; cursor: pointer; }
.gw-set { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; width: 100%; overflow-y: auto; }
.gw-set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-radius: 16px; background: #fff; border: 1px solid #e8edf5; flex-wrap: wrap; }
.gw-set-row label { font-weight: 800; font-size: .9rem; color: #0f172a; }
.gw-seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; background: #f1f5f9; }
.gw-seg button { border: 0; background: transparent; color: #475569; font: inherit; font-size: .8rem; font-weight: 700; padding: 8px 12px; border-radius: 9px; cursor: pointer; min-height: 36px; }
.gw-seg button.on { background: #0f172a; color: #fff; }
.gw-teams { display: flex; gap: 8px; flex-wrap: wrap; }
.gw-teams input { width: 130px !important; border-inline-start: 5px solid var(--c) !important; }
.gw-start { padding: 24px; width: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.gw-sum { display: flex; gap: 10px; flex-wrap: wrap; }
.gw-sum span { font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: #f1f5f9; color: #1e293b; }
.gw-start h4 { font-size: 1rem; font-weight: 800; }
.gw-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.gw-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border: 2px solid #e8edf5; border-radius: 20px; background: #fff; font: inherit; text-align: start; cursor: pointer; color: #0f172a; transition: .16s; }
.gw-mode:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(15, 23, 42, .4); }
.gw-mode i { font-size: 1.6rem; color: color-mix(in srgb, var(--c) 70%, #000); } .gw-mode b { font-size: 1.05rem; font-weight: 800; } .gw-mode small { color: #475569; line-height: 1.4; }
.gw-mode em { font-style: normal; margin-top: 8px; font-weight: 800; color: color-mix(in srgb, var(--c) 45%, #000); }
@media (max-width: 820px) { .gw-q { grid-template-columns: 1fr; } .gw-src { border-inline-end: 0; border-bottom: 1px solid #eef2f7; max-height: 46vh; } .gw-steps li { padding: 7px; } .gw-steps li:not(.on) { font-size: 0; gap: 0; } .gh-search { display: none; } }

/* ── Live board (gr-) ─────────────────────────────────────────── */
.gr-root, .gwh-root, .sg-root { position: fixed; inset: 0; z-index: 99000; display: flex; flex-direction: column; color: #fff; font-family: var(--fg-font); background: radial-gradient(1200px 700px at 15% -10%, color-mix(in srgb, var(--c, #6366f1) 45%, #0b1020) 0%, #0b1020 60%); }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(h1, h2, h3, h4, b, p, span, small, em, button, input, select) { font-family: inherit; }   /* never <i>: Font Awesome icons */
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(h1, h2, h3, h4) { color: #fff !important; -webkit-text-fill-color: #fff !important; margin: 0; }
.gr-root.alarm { animation: grAlarm .3s 4; } @keyframes grAlarm { 50% { background-color: #7f1d1d; } }
.gr-head { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: rgba(0, 0, 0, .25); border-bottom: 1px solid rgba(255, 255, 255, .08); flex: none; }
.gr-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 160px; } .gr-title > div { min-width: 0; }
.gr-title b { display: block; font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-title small { opacity: .65; font-weight: 600; font-size: .78rem; }
.gr-prog { font-weight: 700; opacity: .85; white-space: nowrap; } .gr-prog b { font-size: 1.2rem; color: #fff; }
.gr-ring, .gs-ring { --p: 100; position: relative; width: 52px; height: 52px; flex: none; }
.gr-ring svg, .gs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gr-ring .tr, .gs-ring .tr { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 3.5; }
.gr-ring .br, .gs-ring .br { fill: none; stroke: #22d3ee; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: var(--p) 100; transition: stroke-dasharray .25s linear, stroke .3s; }
.gr-ring.low .br, .gs-ring.low .br { stroke: #f43f5e; }
.gr-ring span, .gs-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 1rem; }
.gr-ring.low span, .gs-ring.low span { color: #fb7185; animation: grPulse .5s infinite alternate; } @keyframes grPulse { to { transform: scale(1.15); } }
.gr-join { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .07); color: #fff; font: inherit; cursor: pointer; }
.gr-join small { opacity: .6; font-size: .7rem; font-weight: 700; text-transform: uppercase; } .gr-join b { font-size: 1.35rem; font-weight: 900; letter-spacing: .1em; color: #a5b4fc; } .gr-join i { opacity: .7; }
.gr-ctrls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.gr-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .15); margin: 0 4px; }
.gr-ib { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-weight: 800; font-size: .82rem; cursor: pointer; transition: .15s; }
.gr-ib:hover { background: rgba(255, 255, 255, .14); } .gr-ib.on { background: var(--c, #6366f1); border-color: transparent; } .gr-ib.danger { background: rgba(239, 68, 68, .2); border-color: rgba(239, 68, 68, .4); color: #fecaca; }
.gr-ib.sm { height: 30px; min-width: 30px; }
.gr-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 38%) 1fr; gap: 18px; padding: 18px 20px; }
.gr-stage { min-height: 0; overflow: auto; border-radius: 22px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); padding: 16px; display: flex; flex-direction: column; }
.gr-qwrap { min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.gr-qcard { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.gr-qcard.self { justify-content: center; align-items: center; text-align: center; }
.gr-qbadge { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
.gr-qbadge span { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.gr-qbadge em { font-style: normal; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--c) 35%, transparent); }
.gr-qbadge em.power { background: #f59e0b; color: #1c1917; animation: grPulse .6s infinite alternate; }
.gr-qbadge em.turn { background: var(--c); }
.gr-qimg { max-height: 26vh; max-width: 100%; object-fit: contain; border-radius: 14px; align-self: center; }
.gr-qtext { font-size: clamp(1.3rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.gr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.gr-opts.n2 { grid-template-columns: 1fr 1fr; } .gr-opts.n3, .gr-opts.n5, .gr-opts.n6 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gr-opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14); background: linear-gradient(180deg, var(--oc), color-mix(in srgb, var(--oc) 72%, #000)); color: #fff; font: inherit; text-align: start; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -3px 0 rgba(0, 0, 0, .18), 0 12px 26px -14px rgba(0, 0, 0, .9); transition: transform .15s, opacity .3s, filter .3s; animation: fgRiseIn .4s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes fgRiseIn { from { opacity: 0; transform: translateY(14px); } }
.gr-opt:nth-child(2) { animation-delay: .05s; } .gr-opt:nth-child(3) { animation-delay: .1s; } .gr-opt:nth-child(4) { animation-delay: .15s; }
.gr-opt.tap { cursor: pointer; } .gr-opt.tap:hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.1); } .gr-opt.tap:active { transform: scale(.98); }
.gr-opt-l { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; line-height: 1; }
.gr-opt-l small { font-size: .55rem; opacity: .85; }
.gr-opt-t { flex: 1; font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.35rem); line-height: 1.3; overflow-wrap: anywhere; }
.gr-opt.dim { filter: saturate(.4) brightness(.6); } .gr-opt.ok { --oc: #2fbf7f; outline: 3px solid rgba(255, 255, 255, .75); outline-offset: 2px; box-shadow: 0 0 0 7px rgba(47, 191, 127, .25), 0 18px 40px -14px rgba(47, 191, 127, .6); transform: scale(1.02); }
.gr-opt.ok::after { content: '✓'; position: absolute; inset-inline-end: 14px; top: 8px; font-size: 1.6rem; font-weight: 900; }
.gr-opt-c { position: absolute; inset-inline: 0; bottom: 0; height: 8px; background: rgba(0, 0, 0, .25); }
.gr-opt-c i { display: block; height: 100%; background: #fff; transition: width .6s; } .gr-opt-c b { position: absolute; inset-inline-end: 14px; bottom: 10px; font-size: 1rem; }
.gr-exp { padding: 10px 14px; border-radius: 12px; background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .35); color: #fde68a; font-weight: 600; } .gr-exp i { color: #f59e0b; margin-inline-end: 6px; }
.gr-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px 14px; flex: none; }
.gr-banner { flex: 1; min-height: 44px; display: flex; align-items: center; }
.gr-banner span { display: inline-block; padding: 10px 18px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); font-weight: 800; font-size: 1.05rem; opacity: 0; transform: translateY(8px); transition: .3s; }
.gr-banner.show span { opacity: 1; transform: none; }
.gr-foot-r { display: flex; align-items: center; gap: 12px; }
.gr-answered { font-weight: 700; opacity: .85; } .gr-answered b { font-size: 1.3rem; }
.gr-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; }
.gr-btn:hover { background: rgba(255, 255, 255, .16); } .gr-btn.primary { background: var(--c, #6366f1); border-color: transparent; } .gr-btn small { opacity: .7; }
.gr-dim { opacity: .65; font-weight: 600; margin: 0; }
/* leaderboard stage */
.gr-lb h4 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin-bottom: 12px; }
.gr-lbrow { display: grid; grid-template-columns: 28px 1fr 2fr auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-weight: 700; }
.gr-lbrow .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); font-size: .8rem; }
.gr-lbrow.top .n { background: #f59e0b; color: #1c1917; } .gr-lbrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-lbrow .bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; } .gr-lbrow .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--c), #fff); transition: width .6s; }
.gr-lbrow em { font-style: normal; font-size: .8rem; }
.gr-teams { display: flex; flex-direction: column; gap: 14px; }
.gr-team { display: grid; grid-template-columns: 1fr 2fr auto; gap: 12px; align-items: center; }
.gr-team-name { font-weight: 800; } .gr-team-name small { display: block; opacity: .6; font-weight: 600; }
.gr-team-bar { height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; } .gr-team-bar i { display: block; height: 100%; background: var(--c); transition: width .6s; border-radius: 99px; }
.gr-team b { font-size: 1.4rem; font-weight: 900; }
/* tug */
.gr-tug { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.gr-tug-scores { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gr-tug-team { text-align: center; } .gr-tug-team b { display: block; font-size: 1.1rem; } .gr-tug-team small { font-size: 1.6rem; font-weight: 900; }
.gr-tug-team.a { color: var(--a); } .gr-tug-team.b { color: var(--b); }
.gr-tug-msg { flex: 1; text-align: center; font-weight: 800; min-height: 1.4em; }
.gr-tug-field { position: relative; flex: 1; min-height: 170px; display: flex; align-items: center; overflow: hidden; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02)); }
.gr-tug-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: repeating-linear-gradient(#fff 0 10px, transparent 10px 20px); opacity: .5; }
.gr-tug-field::before, .gr-tug-field::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8%; opacity: .25; }
.gr-tug-field::before { left: 0; background: linear-gradient(90deg, var(--a), transparent); } .gr-tug-field::after { right: 0; background: linear-gradient(-90deg, var(--b), transparent); }
.gr-tug-rope { display: flex; align-items: center; width: 100%; }
.gr-tug { --fig: clamp(84px, 16vh, 150px); }
.gr-tug-field { min-height: calc(var(--fig) + 70px) !important; }
.gr-tug-rope { position: relative; align-items: flex-end; justify-content: space-between; padding: 0 6% 22px; box-sizing: border-box; }
.gr-tug-crew { max-width: 32%; }
.gr-tug-zone { position: absolute; top: 0; bottom: 0; width: 3px; opacity: .55; background: repeating-linear-gradient(var(--a) 0 8px, transparent 8px 14px); } .gr-tug-zone.b { background: repeating-linear-gradient(var(--b) 0 8px, transparent 8px 14px); }
.gr-tug-sign { position: absolute; left: 50%; bottom: 20px; width: 34px; height: 76px; transform: translateX(-50%); z-index: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); } .gr-tug-sign svg { width: 100%; height: 100%; }
.gr-tug-scale { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; border-top: 1px solid rgba(255, 255, 255, .15); background: rgba(0, 0, 0, .25); }
.gr-tug-scale i { position: absolute; top: 0; width: 1px; height: 8px; background: rgba(255, 255, 255, .5); transform: translateX(-50%); }
.gr-tug-scale i span { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); font-size: .62rem; font-weight: 800; color: rgba(255, 255, 255, .75); }
.gr-tug-scale i.zero { height: 12px; background: #fbce15; } .gr-tug-scale i.zero span { color: #fbce15; } .gr-tug-scale i.edge { background: #fb7185; height: 12px; } .gr-tug-scale i.edge span { color: #fb7185; }
.gr-tug-dist { position: absolute; top: 8px; transform: translateX(-50%); padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .15); font-size: .74rem; font-weight: 700; white-space: nowrap; transition: left .9s cubic-bezier(.2, .8, .2, 1); z-index: 3; } .gr-tug-dist b { color: #fbce15; font-size: .95rem; }
.gr-tug-rope .gr-tug-cord { position: absolute; left: -32%; right: -32%; bottom: calc(var(--fig) * 0.40); flex: none; z-index: 2; pointer-events: none; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.gr-tug-crew { position: relative; z-index: 1; }
.gr-tug-crew { display: flex; align-items: flex-end; gap: 0; }
.gr-tug-crew .fg-puller { height: var(--fig); width: auto; display: block; margin-inline-end: calc(var(--fig) * -0.22); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.gr-tug-crew .fg-puller-flip { display: block; transform: scaleX(-1); } .gr-tug-crew .fg-puller-flip .fg-puller { margin-inline-end: 0; margin-inline-start: calc(var(--fig) * -0.22); }
.gr-tug-crew .fg-puller-body { transform-origin: 70px 110px; transition: transform .5s; animation: fgTugBob 1.1s ease-in-out infinite alternate; }
.gr-tug-crew .fg-puller:nth-child(2) .fg-puller-body, .gr-tug-crew .fg-puller-flip:nth-child(2) .fg-puller-body { animation-delay: .25s; } .gr-tug-crew .fg-puller:nth-child(3) .fg-puller-body, .gr-tug-crew .fg-puller-flip:nth-child(3) .fg-puller-body { animation-delay: .5s; }
@keyframes fgTugBob { from { transform: rotate(-10deg); } to { transform: rotate(-14deg) translateX(-2px); } }
.gr-tug-rope.lean-a .gr-tug-crew.a .fg-puller-body { animation-name: fgTugWin; } .gr-tug-rope.lean-b .gr-tug-crew.b .fg-puller-body { animation-name: fgTugWin; }
.gr-tug-rope.lean-a .gr-tug-crew.b .fg-puller-body, .gr-tug-rope.lean-b .gr-tug-crew.a .fg-puller-body { animation-name: fgTugLose; }
@keyframes fgTugWin { from { transform: rotate(-16deg); } to { transform: rotate(-22deg) translateX(-4px); } }
@keyframes fgTugLose { from { transform: rotate(-4deg); } to { transform: rotate(2deg) translateX(3px); } }
.gr-tug-cord { flex: 1; height: 14px; background: repeating-linear-gradient(-60deg, #e2b56a 0 7px, #b07a3b 7px 14px); border-top: 2px solid #f1cf8a; border-bottom: 2px solid #7a4f22; border-radius: 7px; position: relative; box-shadow: 0 3px 4px rgba(0, 0, 0, .5); }
.gr-tug-knot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); width: 30px; height: 38px; background: #ef4444; clip-path: polygon(50% 0, 100% 35%, 82% 100%, 50% 72%, 18% 100%, 0 35%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.gr-tug-knot::before { content: ''; position: absolute; left: 50%; top: 0; width: 14px; height: 14px; transform: translate(-50%, -40%); border-radius: 50%; background: #b91c1c; }
.gr-tug-clock { text-align: center; font-size: 1.6rem; font-weight: 900; }
/* xo */
.gr-xo { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.gr-xo-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.gr-xo-team { font-weight: 900; color: var(--c); font-size: 1.1rem; } .gr-xo-team small { opacity: .7; margin-inline-start: 6px; }
.gr-xo-status { flex: 1; text-align: center; padding: 8px 14px; border-radius: 99px; background: color-mix(in srgb, var(--c) 30%, transparent); font-weight: 800; }
.gr-xo-grid, .gs-xo { display: grid; gap: 8px; flex: 1; aspect-ratio: 1; max-height: 100%; max-width: 100%; margin: auto; width: min(100%, 60vh); }
.gr-xo-grid.n3, .gs-xo.n3 { grid-template-columns: repeat(3, 1fr); } .gr-xo-grid.n4, .gs-xo.n4 { grid-template-columns: repeat(4, 1fr); }
.gr-xo-cell, .gs-xo-cell { border: 0; border-radius: 16px; background: rgba(255, 255, 255, .08); color: #fff; font-size: clamp(2rem, 6vmin, 4.5rem); font-weight: 900; display: grid; place-items: center; transition: .2s; }
.gr-xo-cell.a, .gs-xo-cell.a { color: var(--a); background: color-mix(in srgb, var(--a) 22%, transparent); } .gr-xo-cell.b, .gs-xo-cell.b { color: var(--b); background: color-mix(in srgb, var(--b) 22%, transparent); }
.gr-xo-cell.free, .gs-xo-cell[data-cell] { cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); animation: grPulse .9s infinite alternate; }
.gr-xo-cell.win, .gs-xo-cell.win { box-shadow: 0 0 0 4px #fff, 0 0 28px #fff; }
/* escape */
.gr-esc { display: flex; flex-direction: column; gap: 14px; align-items: center; height: 100%; }
.gr-esc-clock, .gs-esc-clock { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; font-variant-numeric: tabular-nums; color: #86efac; text-shadow: 0 0 18px rgba(134, 239, 172, .6); }
.gr-esc-clock.low, .gs-esc-clock.low { color: #fb7185; text-shadow: 0 0 18px rgba(251, 113, 133, .7); animation: grPulse .5s infinite alternate; }
.gr-esc-locks, .gs-esc-locks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gr-esc-lock, .gs-esc-lock { width: 72px; padding: 10px 6px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .1); text-align: center; font-size: 1.7rem; opacity: .5; }
.gr-esc-lock small, .gs-esc-lock small { display: block; font-size: 1rem; font-weight: 900; color: #fde68a; margin-top: 4px; }
.gr-esc-lock.cur, .gs-esc-lock.cur { opacity: 1; border-color: #f59e0b; box-shadow: 0 0 20px rgba(245, 158, 11, .4); } .gr-esc-lock.open, .gs-esc-lock.open { opacity: 1; border-color: #22c55e; background: rgba(34, 197, 94, .15); }
.gr-esc-code { font-weight: 800; } .gr-esc-code b { font-size: 1.5rem; letter-spacing: .3em; color: #fde68a; }
.gr-esc-stats { display: flex; gap: 14px; font-weight: 800; flex-wrap: wrap; justify-content: center; }
.gr-esc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; width: 100%; overflow-y: auto; }
.gr-esc-p { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-weight: 700; font-size: .85rem; }
.gr-esc-p.ok { background: rgba(34, 197, 94, .2); } .gr-esc-p.out { opacity: .5; }
.gr-esc-mini { display: flex; gap: 2px; font-size: .9rem; margin: 4px 0; } .gr-esc-mini i { font-style: normal; opacity: .3; } .gr-esc-mini i.open { opacity: 1; }
.gr-esc-p small { opacity: .7; }
/* rocket */
.gr-rocket { display: flex; flex-direction: column; height: 100%; gap: 8px; }
.gr-rk-top { display: flex; justify-content: space-between; font-weight: 800; } .gr-rk-clock.low { color: #fb7185; }
.gr-rk-sky { position: relative; flex: 1; min-height: 240px; border-radius: 18px; background: linear-gradient(180deg, #0b1020 0%, #1e1b4b 50%, #312e81 100%); overflow: hidden; }
.gr-rk-zone { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, .2); } .gr-rk-zone span { position: absolute; inset-inline-start: 8px; top: 2px; font-size: .68rem; font-weight: 800; opacity: .6; text-transform: uppercase; letter-spacing: .06em; }
.gr-rk-lanes { position: absolute; inset: 24px 8px 8px; display: flex; gap: 4px; }
.gr-rk-lane { flex: 1; position: relative; min-width: 0; }
.gr-rk-ship { position: absolute; left: 0; right: 0; transition: bottom .8s cubic-bezier(.2, .8, .2, 1); text-align: center; }
.gr-rk-ship i { display: block; font-size: clamp(1.2rem, 3vw, 2rem); font-style: normal; transform: rotate(-45deg); filter: drop-shadow(0 0 8px #f472b6); }
.gr-rk-ship b { display: block; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gr-rk-ship small { font-size: .62rem; opacity: .7; }
/* end screen */
.gr-end { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(5, 8, 22, .85); backdrop-filter: blur(8px); opacity: 0; transition: .35s; overflow: auto; padding: 20px; }
.gr-end.show { opacity: 1; }
.gr-end-box { width: min(760px, 96vw); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.gr-end-win { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 900; }
.gr-end-stats { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-weight: 700; opacity: .9; }
.gr-end-list { width: 100%; max-height: 28vh; overflow-y: auto; }
.gr-end-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fg-podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; width: 100%; max-width: 560px; height: 220px; }
.fg-pod { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.fg-pod.empty { visibility: hidden; }
.fg-pod-medal { font-size: 2rem; } .fg-pod-name { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fg-pod-score { font-weight: 900; color: #fde68a; }
.fg-pod-bar { width: 100%; border-radius: 14px 14px 0 0; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); animation: fgRise .8s cubic-bezier(.2, .8, .2, 1) both; }
.fg-pod-1 .fg-pod-bar { height: 110px; } .fg-pod-2 .fg-pod-bar { height: 78px; } .fg-pod-3 .fg-pod-bar { height: 56px; }
@keyframes fgRise { from { transform: scaleY(0); transform-origin: bottom; } }
.fg-ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.fg-ranking li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-weight: 700; }
.fg-ranking li.me { background: color-mix(in srgb, var(--c, #6366f1) 35%, transparent); box-shadow: inset 0 0 0 2px var(--c, #6366f1); }
.fg-rk-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); font-size: .8rem; flex: none; }
.fg-rk-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fg-rk-team { font-size: .75rem; opacity: .7; } .fg-rk-score { font-weight: 900; color: #fde68a; }
@media (max-width: 900px) { .gr-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .gr-stage { max-height: 32vh; } .gr-head { flex-wrap: wrap; } }

/* ── Student screen (gs-) ─────────────────────────────────────── */
html body .gs-root { position: fixed; inset: 0; z-index: 50000; display: flex; flex-direction: column; color: #fff; font-family: var(--fg-font); background: radial-gradient(900px 500px at 50% -20%, color-mix(in srgb, var(--c, #6366f1) 50%, #0b1020) 0%, #0b1020 65%); overflow: hidden; }
html body .gs-root * { box-sizing: border-box; }
.gs-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(0, 0, 0, .25); flex: none; }
.gs-ttl { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-weight: 800; } .gs-ttl i { color: var(--c); } .gs-ttl b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-me { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.gs-team { padding: 3px 9px; border-radius: 99px; background: var(--tc); font-size: .72rem; font-weight: 900; }
.gs-name { font-weight: 700; opacity: .85; font-size: .85rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-score { padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-weight: 900; } .gs-score em { font-style: normal; }
.gs-ring { width: 44px; height: 44px; }
.gs-main { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; }
.gs-card { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 18px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.gs-card.center { align-items: center; justify-content: center; text-align: center; } .gs-card h2 { font-size: 1.5rem; font-weight: 900; }
.gs-card.good { background: rgba(34, 197, 94, .18); border-color: rgba(34, 197, 94, .4); } .gs-card.bad { background: rgba(239, 68, 68, .16); border-color: rgba(239, 68, 68, .4); }
.gs-big { font-size: 4rem; line-height: 1; } .gs-big i { color: var(--c); }
.gs-dim { opacity: .7; margin: 0; font-weight: 600; } .center { text-align: center; }
.gs-pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); animation: gsPing 1.4s infinite; margin-top: 10px; } @keyframes gsPing { 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.gs-team-big { padding: 10px 18px; border-radius: 16px; background: var(--tc); font-size: 1.1rem; font-weight: 800; }
.gs-q { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.gs-qbadge { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .76rem; font-weight: 800; }
.gs-qbadge span, .gs-qbadge em { padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-style: normal; }
.gs-qbadge em { background: var(--tc, #f59e0b); color: #fff; } .gs-qbadge em.ok { background: #16a34a; } .gs-qbadge em.bad { background: #dc2626; }
.gs-qimg { max-height: 24vh; max-width: 100%; object-fit: contain; border-radius: 12px; align-self: center; }
.gs-qtext { font-size: clamp(1.15rem, 4.5vw, 1.6rem); font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.gs-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; } .gs-opts.n2 { grid-template-columns: 1fr; } .gs-opts.n5, .gs-opts.n6 { grid-template-columns: 1fr 1fr; }
.gs-opt { display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 12px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -3px 0 rgba(0, 0, 0, .18), 0 12px 26px -14px rgba(0, 0, 0, .9); background: linear-gradient(180deg, var(--oc), color-mix(in srgb, var(--oc) 72%, #000)); color: #fff; font: inherit; text-align: start; cursor: pointer; transition: transform .12s, opacity .3s; -webkit-tap-highlight-color: transparent; }
.gs-opt:active { transform: scale(.97); } .gs-opt:disabled { cursor: default; }
.gs-opt.dim { filter: saturate(.4) brightness(.6); } .gs-opt.chosen { outline: 3px solid #fbce15; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(251, 206, 21, .18); } .gs-opt.ok { --oc: #2fbf7f; outline: 3px solid rgba(255, 255, 255, .75); outline-offset: 2px; box-shadow: 0 0 0 7px rgba(47, 191, 127, .25); } .gs-opt.bad { --oc: #e2525e; outline: 3px solid rgba(255, 255, 255, .35); outline-offset: 2px; animation: sgShake .4s; }
.gs-opt.removed { opacity: .15; text-decoration: line-through; }
.gs-opt-l { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; line-height: 1; } .gs-opt-l small { font-size: .5rem; }
.gs-opt-t { font-weight: 700; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.gs-pts { font-size: 2.4rem; font-weight: 900; color: #fde68a; } .gs-pts small { font-size: .9rem; opacity: .8; }
.gs-streak { padding: 6px 14px; border-radius: 99px; background: rgba(245, 158, 11, .25); font-weight: 800; }
.gs-exp { padding: 10px 14px; border-radius: 12px; background: rgba(245, 158, 11, .15); color: #fde68a; font-weight: 600; margin: 0; } .gs-exp i { color: #f59e0b; }
.gs-gift { margin-top: 10px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .08); width: 100%; } .gs-gift h3 { font-size: 1.1rem; } .gs-gift p { margin: 4px 0 10px; opacity: .8; }
.gs-gift-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.gs-gift-row button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 700; font-size: .8rem; cursor: pointer; }
.gs-gift-row button span { font-size: 1.8rem; }
.gs-rank { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; } .gs-rank span { padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--tc, #fff) 18%, transparent); font-weight: 700; font-size: .85rem; }
.gs-tug { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 800; font-size: .85rem; } .gs-tug-bar { flex: 1; position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--a), var(--b)); } .gs-tug-bar i { position: absolute; top: -8px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transition: left .8s; }
.gs-xo-mini { width: min(220px, 60vw); margin: 10px auto 0; } .gs-xo-mini .gs-xo { gap: 4px; } .gs-xo-mini .gs-xo-cell { font-size: 1.4rem; border-radius: 8px; }
.gs-frozen { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(14, 116, 144, .75); backdrop-filter: blur(6px); font-size: 1.3rem; font-weight: 900; } .gs-frozen div { font-size: 4rem; } .gs-frozen span { font-size: 2rem; }
.gs-flash { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); padding: 14px 22px; border-radius: 16px; background: rgba(255, 255, 255, .15); backdrop-filter: blur(8px); font-weight: 900; font-size: 1.1rem; animation: gsFlash 1.6s both; z-index: 4; white-space: nowrap; }
.gs-flash.cold { background: rgba(14, 116, 144, .8); } .gs-flash.bad { background: rgba(220, 38, 38, .8); }
@keyframes gsFlash { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.gs-fb { padding: 12px; border-radius: 14px; text-align: center; font-weight: 800; } .gs-fb.good { background: rgba(34, 197, 94, .25); } .gs-fb.bad { background: rgba(239, 68, 68, .25); } .gs-fb.wait { opacity: .6; }
.gs-esc-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; margin-bottom: 10px; border-radius: 18px; background: rgba(0, 0, 0, .25); }
.gs-esc-lock { width: 56px; padding: 6px 4px; font-size: 1.3rem; } .gs-esc-lock small { font-size: .85rem; }
.gs-key { margin-inline-start: auto; padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(253, 230, 138, .5); background: rgba(253, 230, 138, .15); color: #fde68a; font: inherit; font-weight: 900; cursor: pointer; } .gs-key:disabled { opacity: .35; }
.gs-code-row { display: flex; gap: 8px; margin-top: 10px; } .gs-code-row input { width: 150px; padding: 12px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .3); color: #fff; font: inherit; font-size: 1.6rem; font-weight: 900; letter-spacing: .3em; text-align: center; }
.gs-btn { min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--c, #6366f1); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; } .gs-btn.big { min-height: 56px; font-size: 1.1rem; width: 100%; } .gs-btn.ghost { background: rgba(255, 255, 255, .1); }
.gs-rk-head { display: flex; gap: 14px; align-items: stretch; padding: 10px; margin-bottom: 10px; border-radius: 18px; background: rgba(0, 0, 0, .25); height: 120px; }
.gs-rk-meter { position: relative; width: 36px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: visible; } .gs-rk-meter i { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 99px; background: linear-gradient(0deg, var(--c), #f472b6); transition: height .8s; } .gs-rk-meter b { position: absolute; left: 50%; transform: translate(-50%, 50%) rotate(-45deg); font-size: 1.6rem; transition: bottom .8s; }
.gs-rk-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; } .gs-rk-info small { opacity: .7; font-weight: 700; text-transform: uppercase; font-size: .68rem; } .gs-rk-info b { font-size: 1.6rem; font-weight: 900; } .gs-rk-info em { font-style: normal; opacity: .7; font-weight: 700; }
.gs-card.end h2 { font-size: 1.8rem; } .gs-winner { font-size: 1.3rem; font-weight: 900; color: #fde68a; }
.gs-end-me { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; } .gs-end-me span { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: .75rem; font-weight: 700; opacity: .9; } .gs-end-me b { font-size: 1.4rem; }
.gs-root .fg-podium { height: 160px; }

/* ── Solo games (sg-) ─────────────────────────────────────────── */
.sg-root { z-index: 99500; }
.sg-main { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; align-items: center; }
.sg-hud { display: flex; gap: 10px; align-items: center; font-weight: 800; flex-wrap: wrap; justify-content: center; } .sg-hud span { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); } .sg-hud b { font-size: 1.1rem; } .sg-hud .hot { background: rgba(245, 158, 11, .3); }
.sg-intro { width: min(720px, 100%); display: flex; flex-direction: column; gap: 16px; }
.sg-how { padding: 18px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); } .sg-how h3 { font-size: 1rem; margin-bottom: 8px; } .sg-how p { margin: 0; line-height: 1.5; opacity: .9; }
.sg-demo { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); text-align: center; font-size: 1.4rem; font-weight: 900; letter-spacing: .05em; }
.sg-setup .gw-set-row { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); } .sg-setup .gw-set-row label { color: #fff; } .sg-setup .gw-seg { background: rgba(0, 0, 0, .3); } .sg-setup .gw-seg button { color: rgba(255, 255, 255, .75); } .sg-setup .gw-seg button.on { background: var(--c); color: #fff; }
.sg-lb h3 { font-size: 1rem; margin-bottom: 8px; } .fg-lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; } .fg-lb li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-weight: 700; } .fg-lb li span { width: 24px; opacity: .6; } .fg-lb li b { flex: 1; } .fg-lb li small { opacity: .6; } .fg-lb li em { font-style: normal; color: #fde68a; font-weight: 900; } .fg-lb-empty { opacity: .6; }
.sg-result { width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.sg-score { font-size: 3.4rem; font-weight: 900; color: #fde68a; line-height: 1; } .sg-score small { display: block; font-size: .9rem; color: #fff; opacity: .7; }
.sg-lines { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; } .sg-lines span { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-weight: 700; }
.sg-save { display: flex; gap: 8px; } .sg-save input { padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .3); color: #fff; font: inherit; font-weight: 700; }
.sg-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; } .sg-actions .gs-btn.big { width: auto; flex: 1; }
.gs-btn.wide { width: 100%; }
.sg-qr { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(5, 8, 22, .8); backdrop-filter: blur(8px); padding: 20px; }
.sg-qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; border-radius: 24px; background: #fff; color: #0f172a; text-align: center; } .sg-qr-box b { font-size: 1.2rem; } .sg-qr-box .gs-btn.ghost { background: #e2e8f0; color: #0f172a; } .sg-qr-box small { color: #475569; font-weight: 700; word-break: break-all; }
.sg-timebar { width: 100%; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; } .sg-timebar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, var(--c)); transition: width .1s linear; }
.sg-mul, .sg-stroop, .sg-hunt, .sg-scr, .sg-wd { width: min(720px, 100%); display: flex; flex-direction: column; gap: 18px; align-items: center; flex: 1; }
.sg-eq { font-size: clamp(2.4rem, 8vw, 4.5rem); font-weight: 900; margin-top: 10px; }
.sg-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.sg-abtn { min-height: 90px; border-radius: 18px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: 2rem; font-weight: 900; cursor: pointer; transition: .15s; } .sg-abtn:hover { background: rgba(255, 255, 255, .18); } .sg-abtn.ok { background: #16a34a; } .sg-abtn.bad { background: #dc2626; }
.sg-lives { font-size: 1.4rem; }
.sg-task { margin: 0; font-weight: 700; opacity: .85; text-align: center; }
.sg-word { font-size: clamp(2.6rem, 9vw, 5rem); font-weight: 900; padding: 20px 30px; border-radius: 24px; background: rgba(255, 255, 255, .06); } .shake { animation: sgShake .4s; } @keyframes sgShake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.sg-cbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.sg-cbtn { min-height: 80px; border-radius: 16px; border: 0; background: var(--cc); color: #fff; font: inherit; font-size: 1.3rem; font-weight: 900; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; } .sg-cbtn b { font-size: 1.6rem; }
.sg-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: min(100%, 70vh); aspect-ratio: 1; } .sg-grid button { border: 0; border-radius: 10px; cursor: pointer; transition: transform .1s; } .sg-grid button:active { transform: scale(.95); } .sg-grid button.reveal { outline: 4px solid #fff; animation: grPulse .3s 3 alternate; }
.sg-mem { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; width: min(820px, 100%); margin: auto; }
.sg-card { aspect-ratio: 4 / 3; position: relative; border: 0; background: transparent; perspective: 800px; cursor: pointer; font: inherit; } .sg-card span { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; transition: transform .45s; font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.6rem); padding: 6px; overflow-wrap: anywhere; text-align: center; }
.sg-card .f { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); } .sg-card .f::after { content: '?'; font-size: 2rem; opacity: .5; } .sg-card .b { background: #fff; color: #0f172a; transform: rotateY(180deg); }
.sg-card.open .f, .sg-card.done .f { transform: rotateY(180deg); } .sg-card.open .b, .sg-card.done .b { transform: rotateY(0); } .sg-card.done .b { background: #bbf7d0; }
.sg-slots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; direction: inherit; } .sg-slots span { width: 52px; height: 60px; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .3); display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; } .sg-slots span.on { border-style: solid; background: rgba(255, 255, 255, .1); } .sg-slots.ok span { background: #16a34a; border-color: #16a34a; } .sg-slots span.bad { background: rgba(220, 38, 38, .5); }
.sg-letters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; } .sg-letters button { width: 58px; height: 66px; border-radius: 14px; border: 0; background: #fff; color: #0f172a; font: inherit; font-size: 1.8rem; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #94a3b8; } .sg-letters button:disabled { opacity: .2; }
.sg-wgrid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: min(100%, calc(var(--n) * 64px)); direction: inherit; } .sg-wgrid span { aspect-ratio: 1; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 1.7rem; font-weight: 900; transition: background .3s, transform .3s; }
.sg-wgrid span.fill { border-color: rgba(255, 255, 255, .6); } .sg-wgrid span.correct { background: #16a34a; border-color: #16a34a; } .sg-wgrid span.present { background: #ca8a04; border-color: #ca8a04; } .sg-wgrid span.absent { background: #334155; border-color: #334155; }
.sg-kb { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 640px; direction: inherit; } .sg-kbrow { display: flex; gap: 4px; justify-content: center; } .sg-kbrow button { flex: 1; max-width: 48px; height: 52px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; } .sg-kbrow button.wide { max-width: 72px; } .sg-kbrow button.correct { background: #16a34a; } .sg-kbrow button.present { background: #ca8a04; } .sg-kbrow button.absent { background: #1e293b; opacity: .6; }

/* ── Challenge Wheel (gwh-) ───────────────────────────────────── */
.gwh-root { --c: #eab308; }
.gwh-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(280px, 34%); gap: 18px; padding: 18px 20px; }
.gwh-wheel-wrap { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.gwh-wheel-wrap canvas { width: min(100%, 78vh); height: auto; aspect-ratio: 1; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5)); }
.gwh-pointer { position: absolute; top: calc(50% - min(50%, 39vh) - 14px); left: 50%; transform: translateX(-50%); font-size: 2.4rem; color: #fff; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); z-index: 2; line-height: 1; }
.gwh-spin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(17%, 120px); aspect-ratio: 1; border-radius: 50%; border: 4px solid #eab308; background: #0f172a; color: #fff; font: inherit; font-weight: 900; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; z-index: 2; box-shadow: 0 0 30px rgba(234, 179, 8, .5); } .gwh-spin i { font-size: 1.6rem; color: #eab308; } .gwh-spin span { font-size: .8rem; letter-spacing: .1em; } .gwh-spin:hover { transform: translate(-50%, -50%) scale(1.05); }
.gwh-side { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); min-height: 0; overflow: auto; } .gwh-side h3 { font-size: .95rem; }
.gwh-teams { display: flex; flex-direction: column; gap: 8px; }
.gwh-team { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 2px solid transparent; border-inline-start: 6px solid var(--tc); cursor: pointer; } .gwh-team.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 22%, transparent); }
.gwh-team input { grid-column: 1; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 800; font-size: 1rem; outline: none; min-width: 0; } .gwh-score { grid-column: 2; grid-row: 1; font-size: 1.5rem; font-weight: 900; color: #fde68a; }
.gwh-tags em { font-style: normal; margin-inline-end: 6px; } .gwh-pm { grid-column: 2; grid-row: 2; display: flex; gap: 4px; } .gwh-pm button { width: 30px; height: 28px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 900; cursor: pointer; }
.gwh-modal { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 8, 22, .8); backdrop-filter: blur(8px); } .gwh-modal[hidden] { display: none; }
.gwh-box { width: min(900px, 96vw); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 26px; background: #111a33; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 40px 90px rgba(0, 0, 0, .6); }
.gwh-qhead { display: flex; align-items: center; gap: 12px; } .gwh-qnum { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #eab308; color: #1c1917; font-weight: 900; font-size: 1.2rem; } .gwh-turn { padding: 8px 14px; border-radius: 99px; background: var(--tc); font-weight: 800; } .gwh-timer { margin-inline-start: auto; font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums; } .gwh-timer.low { color: #fb7185; }
.gwh-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.gwh-sel { min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: #0b1020; color: #fff; font: inherit; font-weight: 700; }
.gwh-bonus { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; } .gwh-bonus-ic { font-size: 5rem; line-height: 1; filter: drop-shadow(0 0 20px var(--bc)); } .gwh-bonus h2 { font-size: 2rem; } .gwh-bonus p { opacity: .85; margin: 0; }
.gwh-end { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
@media (max-width: 900px) { .gwh-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } .gwh-side { max-height: 36vh; } }

/* in-game UI icons (GameIcons.js UI set) */
.fg-ui { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; } .fg-ui svg { width: 100%; height: 100%; }
.fg-ui.gold { color: #fbce15; } .fg-ui.hot { color: #fbbf24; } .fg-ui.red { color: #fb7185; } .fg-ui.green { color: #4ade80; }
.gs-big .fg-ui, .gwh-bonus-ic .fg-ui { width: 4.4rem; height: 4.4rem; color: var(--c, #fbce15); }
.gs-frozen > div .fg-ui { width: 4rem; height: 4rem; }
.fg-pod-medal .fg-ui { width: 2.4rem; height: 2.4rem; }
.gr-tug-crew .fg-ui, .gr-rk-ship i .fg-ui, .gs-rk-meter b .fg-ui { width: 1em; height: 1em; vertical-align: middle; }
.gr-esc-lock .fg-ui { width: 1.8rem; height: 1.8rem; } .gs-esc-lock .fg-ui { width: 1.3rem; height: 1.3rem; } .gr-esc-mini .fg-ui { width: .95rem; height: .95rem; }
.gs-gift-row button .fg-ui { width: 1.9rem; height: 1.9rem; color: #fbce15; }
.sg-lives .fg-ui, .sg-hud .fg-ui { width: 1.3rem; height: 1.3rem; } .sg-card .b .fg-ui { width: 2.2rem; height: 2.2rem; color: #4338ca; }
.sg-demo-grid { display: inline-grid; grid-template-columns: repeat(3, 18px); gap: 3px; vertical-align: middle; } .sg-demo-grid i { width: 18px; height: 18px; border-radius: 4px; background: #22c55e; } .sg-demo-grid i.odd { background: #4ade80; }
.sg-demo-row { display: inline-flex; gap: 4px; vertical-align: middle; } .sg-demo-row i { width: 22px; height: 22px; border-radius: 5px; background: #475569; } .sg-demo-row i.g { background: #16a34a; } .sg-demo-row i.y { background: #ca8a04; }
.gr-tug-knot .fg-ui { width: 1.6rem; height: 1.6rem; }
.gwh-tags .fg-ui { color: #fbce15; }

/* contrast (WCAG AA) */
.gr-opt-l, .gs-opt-l { background: rgba(0, 0, 0, .32) !important; border-color: rgba(255, 255, 255, .25) !important; }
.gr-xo-team { color: color-mix(in srgb, var(--c) 65%, #fff) !important; } .gr-xo-team small { color: #fff; opacity: .85; }
.gr-tug-team.a { color: color-mix(in srgb, var(--a) 65%, #fff) !important; } .gr-tug-team.b { color: color-mix(in srgb, var(--b) 65%, #fff) !important; }
.gr-qbadge em.turn { background: color-mix(in srgb, var(--c) 62%, #000); } .gr-xo-status { background: color-mix(in srgb, var(--c) 40%, #000); }
.gs-team, .gs-team-big, .gm-team-chip, .gwh-turn { background: color-mix(in srgb, var(--tc) 62%, #000) !important; }
.gs-qbadge em { background: color-mix(in srgb, var(--tc, #f59e0b) 62%, #000); } .gs-qbadge em.ok { background: #15803d; } .gs-qbadge em.bad { background: #b91c1c; }
.gr-esc-lock, .gs-esc-lock { opacity: .65; }
.sg-setup .gw-seg button.on { background: #fff !important; color: #0f172a !important; }
.gr-rk-zone span { opacity: .8; }

/* lobby additions */
.gm-lobby-teams { font-weight: 700; opacity: .85; }
.lobby-student-tag.gm-teamed { border-inline-start: 5px solid var(--tc); cursor: pointer; } .gm-team-chip { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 99px; font-size: .68rem; font-weight: 800; color: #fff; }

/* ================================================================
   Theme-proof skin — same look as the Aura Quiz "Midnight & Gold" screens.
   Themes (modern-themes.css / theme-override.css) force heading fonts,
   colours and some backgrounds with !important; these rules pin ours.
   ================================================================ */
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) {
    --fg-gold: #fbce15; --fg-line: rgba(251, 206, 21, .22); --fg-line-strong: rgba(251, 206, 21, .5);
    font-family: var(--fg-font) !important; color: #f8fafc !important; isolation: isolate;
    background-color: #0f172a !important;
    background-image:
        radial-gradient(1200px 700px at 50% -10%, color-mix(in srgb, var(--c, #6366f1) 30%, transparent), transparent 60%),
        radial-gradient(900px 600px at 100% 100%, rgba(251, 206, 21, .08), transparent 55%),
        linear-gradient(180deg, #182238 0%, #0f172a 45%, #030712 100%) !important;
    -webkit-font-smoothing: antialiased;
}
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root)::before, :is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root)::after { content: none !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(h1, h2, h3, h4, h5, h6, p, span, b, small, em, strong, label, button, input, select, textarea, li, div:not(.katex):not(.katex *)) { font-family: var(--fg-font) !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(h1, h2, h3, h4, h5, h6) { color: #f8fafc !important; -webkit-text-fill-color: #f8fafc !important; background: none !important; font-weight: 800 !important; letter-spacing: 0 !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-head, .gs-head) { border-bottom: 1px solid rgba(251, 206, 21, .14) !important; background: linear-gradient(180deg, rgba(99, 102, 241, .1), rgba(0, 0, 0, .25)) !important; }
:is(html[data-theme-family], html) body :is(.gr-root, .gwh-root, .sg-root) .gr-title .gh-ic { background: linear-gradient(145deg, rgba(251, 206, 21, .22), rgba(251, 206, 21, .06)) !important; border: 1px solid var(--fg-line-strong); color: var(--fg-gold) !important; -webkit-text-fill-color: var(--fg-gold) !important; box-shadow: 0 6px 18px -8px rgba(251, 206, 21, .6) !important; }
:is(html[data-theme-family], html) body :is(.gr-root, .gwh-root, .sg-root) .gr-title .gh-ic i { color: var(--fg-gold) !important; -webkit-text-fill-color: var(--fg-gold) !important; }
:is(html[data-theme-family], html) body :is(.gr-root, .gwh-root) :is(.gr-stage, .gr-qcard, .gwh-side) { border: 1px solid var(--fg-line) !important; background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .2)) !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05) !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-prog b, .gr-join b, .gr-lbrow b, .gr-team b, .gs-score, .gs-pts, .fg-pod-score, .fg-rk-score, .gwh-score, .sg-score, .gr-tug-team small, .gr-esc-code b) { color: var(--fg-gold) !important; -webkit-text-fill-color: var(--fg-gold) !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-ring .br, .gs-ring .br) { stroke: #818cf8; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-ring.low .br, .gs-ring.low .br) { stroke: #ef5a66; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-btn.primary, .gs-btn:not(.ghost), .gh-btn.primary) { background: linear-gradient(180deg, #ffe27a 0%, #fbce15 55%, #e0b40f 100%) !important; color: #1e293b !important; -webkit-text-fill-color: #1e293b !important; border: 1px solid rgba(255, 240, 190, .55) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(0, 0, 0, .15), 0 14px 30px -12px rgba(251, 206, 21, .7) !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-btn.primary, .gs-btn:not(.ghost), .gh-btn.primary) i { color: #1e293b !important; -webkit-text-fill-color: #1e293b !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-opt, .gs-opt, .gr-opt *, .gs-opt *) { color: #fff !important; -webkit-text-fill-color: #fff !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) .katex { color: inherit !important; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(.gr-ib, .gr-btn, .gs-btn.ghost) { font-family: var(--fg-font) !important; }
/* themes paint every <main> with their paper texture — the game screens use <main> for layout only */
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root, .sg-root, .gs-root) :is(main, .gr-main, .gs-main, .sg-main, .gwh-main, section) { background: none !important; background-image: none !important; background-color: transparent !important; box-shadow: none; }
:is(html[data-theme-family], html[data-theme], html) body :is(.gr-root, .gwh-root) :is(.gr-stage, .gr-qcard, .gwh-side) { background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .2)) !important; }
/* hub + wizard: keep Outfit for headings under every theme */
:is(html[data-theme-family], html) body :is(.gh-box, .gw-box) :is(h1, h2, h3, h4, b, .gh-title b, .gw-ttl b) { font-family: var(--fg-font) !important; color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; }
