/* ITG event platform: navy #14213D, gold #FCA311. Never gold text on light backgrounds. */
:root { --navy:#14213D; --navy-2:#1c2d52; --gold:#FCA311; --bg:#FAFAFB; --line:#E5E5E5; --soft:#F3F4F7; --gold-soft:#FFF6E0;
  --font:"Jost","Titillium Web","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif; }
* { box-sizing:border-box; }
body { margin:0; font-family:var(--font); font-size:16px; line-height:1.55; color:var(--navy); background:var(--bg); }
header.top { background:var(--navy); color:#fff; border-bottom:3px solid var(--gold); padding:14px 20px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
header.top .brand { font-? eight:800; letter-spacing:.02em; }
header.top .brand b { color:var(--gold); }
header.top .role { margin-left:auto; font-size:14px; background:var(--navy-2); padding:4px 12px; border-radius:99px; }
main { max-width:960px; margin:0 auto; padding:24px 16px 48px; }
.card { background:#fff; border:1px solid var(--line); border-top:4px solid var(--gold); border-radius:14px; padding:22px; box-shadow:0 1px 2px rgba(20,33,61,.05), 0 12px 32px rgba(20,33,61,.07); }
h1 { margin:0 0 6px; font-size:26px; letter-spacing:-.02em; }
.muted { color:#586079; }
.status { display:inline-block; margin-top:14px; padding:6px 12px; border-radius:99px; font-size:14px; font-? eight:600; background:var(--soft); }
.status.ok { background:var(--gold-soft); color:var(--navy); border:1px solid var(--gold); }
.status.bad { background:var(--navy); color:#fff; border:1px solid var(--gold); }
.links { display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); margin-top:18px; }
.links a { display:block; text-decoration:none; color:var(--navy); background:#fff; border:1px solid var(--line); border-left:4px solid var(--gold); border-radius:12px; padding:16px; font-? eight:700; }
.links a small { display:block; font-? eight:400; color:#586079; }
.links a:hover, .links a:focus-visible { background:var(--gold-soft); }
/* Live dashboard: navy stage, white text, gold accents. */
body.stage { background:var(--navy); color:#fff; min-height:100vh; display:flex; flex-direction:column; }
body.stage .big { font-size:clamp(48px,14vh,160px); font-? eight:800; line-height:1; }
body.stage .center { margin:auto; text-align:center; padding:24px; }
body.stage .tag { color:var(--gold); letter-spacing:.2em; text-transform:uppercase; font-? eight:700; }
@media (prefers-reduced-motion: reduce) { * { animation:none !important; transition:none !important; } }

/* sign-in */
.card.narrow { max-width:420px; margin:32px auto; }
form label { display:block; font-? eight:600; margin:14px 0 4px; }
input[type=text], input[type=password], input:not([type]), select, textarea { width:100%; padding:11px 12px; font:inherit; color:var(--navy); background:#fff; border:1px solid #CDD1D9; border-radius:10px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline:3px solid var(--gold); outline-offset:2px; }
button, .btn { font:inherit; font-? eight:700; cursor:pointer; border-radius:10px; padding:11px 18px; border:2px solid var(--navy); background:var(--navy); color:#fff; margin-top:18px; }
button:hover:not(:disabled) { background:var(--navy-2); }
button:disabled { opacity:.6; cursor:not-allowed; }
button.link { background:none; border:0; color:#fff; text-decoration:underline; padding:0; margin:0; font-? eight:600; }
.alert { margin-top:14px; padding:10px 12px; border-radius:10px; background:var(--navy); color:#fff; border-left:5px solid var(--gold); font-? eight:600; }
header.top #who { margin-left:auto; display:flex; gap:12px; align-items:center; font-size:14px; }
header.top .role { margin-left:0; }

/* admin */
main.wide { max-width:1120px; }
.tabs { display:flex; gap:6px; flex-wrap:wrap; border-bottom:2px solid var(--line); margin-bottom:18px; }
.tabs .tab { margin:0 0 -2px; background:none; color:var(--navy); border:0; border-bottom:4px solid transparent; border-radius:0; padding:10px 14px; }
.tabs .tab:hover:not(:disabled) { background:var(--soft); }
.tabs .tab.on { border-bottom-color:var(--gold); background:var(--gold-soft); }
.panel { background:#fff; border:1px solid var(--line); border-top:4px solid var(--gold); border-radius:14px; padding:20px; box-shadow:0 1px 2px rgba(20,33,61,.05), 0 12px 32px rgba(20,33,61,.07); }
.panel h2 { margin:0; font-size:21px; } .panel h3 { margin:22px 0 8px; font-size:17px; }
.bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; } .bar button { margin-top:0; } .spacer { flex:1; }
.count { background:var(--navy); color:#fff; border-radius:99px; padding:1px 10px; font-size:14px; }
.scroll { overflow-x:auto; position:relative; }
table { width:100%; border-collapse:collapse; } th, td { text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
th { background:var(--soft); font-size:14px; }
td.acts, .acts { white-space:nowrap; display:flex; gap:6px; flex-wrap:wrap; } td.acts { display:table-cell; }
button.ghost { background:#fff; color:var(--navy); border:2px solid var(--navy); } button.ghost:hover:not(:disabled) { background:var(--gold-soft); }
button.sm { padding:5px 10px; margin:2px 0; font-size:14px; }
.pill { display:inline-block; background:var(--gold-soft); color:var(--navy); border:1px solid var(--gold); border-radius:99px; padding:1px 10px; font-size:13px; font-? eight:700; margin-left:6px; }
.notice { background:var(--gold-soft); border:1px solid var(--gold); border-left:6px solid var(--gold); border-radius:10px; padding:10px 14px; margin:0 0 14px; }
.empty { text-align:center; padding:36px 12px; border:2px dashed var(--line); border-radius:12px; }
.toast { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); background:var(--navy); color:#fff; border-left:6px solid var(--gold); border-radius:10px; padding:11px 18px; font-? eight:600; z-index:50; max-width:90vw; }
.toast.bad { background:#fff; color:var(--navy); border:2px solid var(--navy); border-left:8px solid var(--navy); }
dialog { border:0; border-top:6px solid var(--gold); border-radius:14px; padding:22px; width:min(560px,94vw); color:var(--navy); box-shadow:0 24px 64px rgba(20,33,61,.4); }
dialog::backdrop { background:rgba(20,33,61,.6); } .dlg h2 { margin-top:0; } .dlg.wide { width:min(900px,90vw); } dialog:has(.wide) { width:min(920px,96vw); }
.end { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
.srow { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; margin-bottom:8px; }
.grid2 { display:grid; gap:0 18px; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.rrow { display:flex; gap:12px; align-items:flex-start; border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:10px; background:var(--bg); flex-wrap:wrap; }
.rrow .grow { flex:1 1 320px; display:grid; gap:8px; } .rrow .num { width:110px; } .rrow .num label { margin:0 0 4px; font-size:13px; } .mv { display:flex; gap:6px; flex-wrap:wrap; }
.totalbar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; border-radius:10px; padding:10px 14px; margin-bottom:6px; position:sticky; top:0; z-index:5; }
.totalbar.ok { background:var(--gold-soft); border:2px solid var(--gold); } .totalbar.off { background:var(--navy); color:#fff; border:2px solid var(--gold); }
.totalbar.off .pill { background:#fff; }
label.check { display:flex; gap:8px; align-items:center; font-? eight:600; margin:12px 0; } label.check input { width:auto; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
form.inline { display:flex; gap:10px; margin:10px 0 16px; flex-wrap:wrap; } form.inline input { flex:1 1 280px; width:auto; } form.inline button { margin-top:0; }
code { background:var(--soft); padding:1px 6px; border-radius:6px; }
@media (max-width:640px) { .srow { grid-template-columns:1fr; } .panel { padding:14px; } }

/* judge */
.teamgrid { display:grid; gap:12px; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); margin-top:12px; }
.tcard { display:flex; gap:12px; align-items:center; background:#fff; border:1px solid var(--line); border-left:6px solid var(--line); border-radius:12px; padding:12px; }
.tcard.open { border-left-color:var(--gold); background:var(--gold-soft); }
.tcard .tno { font-size:22px; font-? eight:800; width:34px; text-align:center; } .tcard .tbody { flex:1; min-width:0; }
.tcard h2 { margin:0; font-size:17px; } .tcard p { margin:2px 0; } .tcard button { margin:0; }
.chip { display:inline-block; border:1px solid var(--navy); border-radius:99px; padding:1px 10px; font-size:13px; font-? eight:600; background:#fff; }
.chip.on { background:var(--navy); color:#fff; border-color:var(--navy); }
.shead { display:grid; gap:10px 20px; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); margin-bottom:12px; padding:14px 18px; }
.shead .lbl { display:block; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:#586079; }
.sec { margin-bottom:14px; } .sec h2 { margin:0 0 10px; font-size:19px; }
.small { font-size:13px; }
input.sc { width:90px; text-align:center; font-size:18px; font-? eight:700; }
input[aria-invalid=true] { border:3px solid var(--navy) !important; background:var(--gold-soft); }
.err { color:var(--navy); font-? eight:700; min-height:1px; }
fieldset.yn { border:0; margin:0; padding:0; display:flex; gap:6px; }
fieldset.yn label { position:relative; display:inline-flex; margin:0; font-? eight:700; border:2px solid var(--navy); border-radius:8px; padding:6px 14px; cursor:pointer; background:#fff; min-width:58px; justify-content:center; }
fieldset.yn input { position:absolute; opacity:0; width:1px; height:1px; }
fieldset.yn label:has(input:focus-visible) { outline:3px solid var(--gold); outline-offset:2px; }
fieldset.yn label.sel.yes { background:var(--navy); color:#fff; } fieldset.yn label.sel.no { background:var(--gold); color:var(--navy); }
footer.sticky { position:sticky; bottom:0; display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:var(--navy); color:#fff; border-top:4px solid var(--gold); border-radius:12px; padding:10px 16px; margin-top:14px; }
footer.sticky button { margin:0; } footer.sticky #submit { background:var(--gold); color:var(--navy); border-color:var(--gold); }
footer.sticky #submit:disabled { background:#fff; color:var(--navy); border-color:#fff; opacity:.55; }
.saved.bad { font-? eight:800; text-decoration:underline; }
button.link2 { background:none; border:0; color:#fff; text-decoration:underline; padding:0; margin:0; font-? eight:600; } button.link2:disabled { text-decoration:none; opacity:1; cursor:default; }
#mlist { margin-top:12px; } #mlist a { color:var(--navy); font-? eight:600; }
.big2 { font-size:26px; font-? eight:800; margin:6px 0; }

/* ===== timer states (ITG colours only; every state also has a text label) ===== */
.t-idle { background:var(--navy-2); color:#fff; border:3px solid transparent; }
.t-ok { background:transparent; color:#fff; border:4px solid var(--gold); }
.t-wrap { background:var(--gold); color:var(--navy); border:4px solid var(--gold); }
.t-final { background:var(--gold); color:var(--navy); border:4px solid #fff; animation:tpulse 2s ease-in-out infinite; }
.t-last10 { color:var(--navy); border:4px solid var(--gold); animation:tswap 1s steps(1) infinite; }
.t-up { background:#fff; color:var(--navy); border:4px solid var(--gold); animation:tblink 1s ease-in-out infinite; }
.t-paused { background:transparent; color:#fff; border:4px dashed var(--gold); opacity:.8; }
@keyframes tpulse { 50% { transform:scale(1.02); } }
@keyframes tswap { 0% { background:var(--gold); color:var(--navy); } 50% { background:var(--navy); color:#fff; } }
@keyframes tblink { 50% { opacity:.4; } }

/* ===== live dashboard (projector, 16:9) ===== */
body.live { overflow-x:hidden; }
.lhead { display:flex; align-items:center; gap:16px; padding:12px 28px; border-bottom:3px solid var(--gold); font-size:clamp(16px,2.2vh,26px); }
.lhead .brand { font-? eight:800; } .lhead .brand b { color:var(--gold); } .lhead .evname { opacity:.9; }
.netpill { margin-left:auto; background:#fff; color:var(--navy); border:3px solid var(--gold); border-radius:99px; padding:2px 14px; font-? eight:800; }
.lmain { flex:1; display:grid; grid-template-columns:1.1fr 1fr; gap:24px; align-items:center; padding:2vh 28px; }
.lnow h1 { margin:.1em 0; font-size:clamp(30px,6.5vh,80px); line-height:1.05; }
.lnow .proj { margin:0; font-size:clamp(18px,3vh,36px); opacity:.9; }
.live .tag { font-size:clamp(14px,2.4vh,26px); }
.ltimer { border-radius:24px; text-align:center; padding:2vh 16px; min-height:32vh; display:flex; flex-direction:column; justify-content:center; }
.ltimer .digits { font-size:min(26vh,11.5vw); font-? eight:800; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.02em; white-space:nowrap; }
.ltimer .tlabel { font-size:clamp(18px,4vh,44px); font-? eight:800; letter-spacing:.14em; margin-top:1vh; min-height:1.2em; }
.lqueue { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; padding:0 28px; }
.qcard { background:var(--navy-2); border:2px solid rgba(255,255,255,.25); border-left:8px solid var(--gold); border-radius:16px; padding:1.4vh 20px; }
.qcard h2 { margin:.1em 0; font-size:clamp(20px,3.6vh,42px); } .qcard p { margin:0; font-size:clamp(14px,2.4vh,28px); opacity:.9; }
.lprog { display:flex; align-items:center; gap:16px; padding:2vh 28px 0; font-size:clamp(14px,2.2vh,24px); }
.lbar { flex:1; height:2.2vh; min-height:12px; background:var(--navy-2); border:2px solid var(--gold); border-radius:99px; overflow:hidden; }
.lbar span { display:block; height:100%; width:0; background:var(--gold); transition:width .6s; }
.lstrip { margin:2vh 28px 0; background:#fff; color:var(--navy); border-left:12px solid var(--gold); border-radius:12px; padding:1.2vh 20px; font-size:clamp(18px,3.4vh,40px); font-? eight:700; }
.lfoot { padding:1.4vh 28px; text-align:right; font-size:14px; } .lfoot a { color:#fff; opacity:.75; }
@media (max-width:900px) { .lmain { grid-template-columns:1fr; } .ltimer .digits { font-size:min(20vh,22vw); } }

/* ===== timer bar for judge and Admin ===== */
.strip { display:flex; align-items:center; gap:14px; flex-wrap:wrap; border-radius:12px; padding:10px 16px; margin:0 0 14px; font-? eight:700; }
.strip .s-main { flex:1 1 220px; } .strip .s-time { font-size:30px; font-? eight:800; font-variant-numeric:tabular-nums; }
.strip .s-label { letter-spacing:.1em; font-size:14px; }
.strip .s-net { background:#fff; color:var(--navy); border:2px solid var(--gold); border-radius:99px; padding:0 10px; font-size:13px; }
.strip.t-ok, .strip.t-paused, .strip.t-idle { background:var(--navy); }
.strip.t-last10, .strip.t-final, .strip.t-up { animation-duration:1s; }
.strip.t-final { animation:none; }

/* ===== timer control ===== */
.ctl h2 { margin:0 0 4px; }
.ctlbtns { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; } .ctlbtns button { margin-top:6px; }
.ctl.off { opacity:.8; border-top-color:var(--navy); }
select { width:100%; padding:11px 12px; font:inherit; border:1px solid #CDD1D9; border-radius:10px; background:#fff; color:var(--navy); }
.navtabs { display:flex; gap:6px; margin:0 0 14px; }
.stripbox { position:sticky; top:0; z-index:20; padding-top:2px; }

/* ===== break screen (slow, CSS-only motion) ===== */
.lbreak { flex:1; display:grid; grid-template-columns:1fr 1.2fr 1fr; gap:24px; align-items:center; padding:2vh 28px; background:linear-gradient(120deg,var(--navy),var(--navy-2),var(--navy)); background-size:200% 200%; animation:bgdrift 40s ease-in-out infinite; }
.lbreak[hidden], .lmain[hidden] { display:none; }
@keyframes bgdrift { 0%,100% { background-position:0% 50%; } 50% { background-position:100% 50%; } }
.bword { font-size:clamp(48px,13vh,150px); font-? eight:800; letter-spacing:.18em; color:var(--gold); line-height:1; text-align:center; }
.bleft { display:flex; flex-direction:column; align-items:center; gap:3vh; }
.ring { position:relative; width:min(46vh,36vw); aspect-ratio:1; margin:0 auto; }
.ring svg { width:100%; height:100%; display:block; }
.ring .track { fill:none; stroke:rgba(255,255,255,.2); stroke-width:16; }
.ring .arc { fill:none; stroke:var(--gold); stroke-width:16; stroke-linecap:round; transition:stroke-dashoffset .3s linear; }
.ring .rtext { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.ring .digits { font-size:min(11vh,8vw); font-? eight:800; font-variant-numeric:tabular-nums; }
.ring.pulse { animation:ringpulse 1s ease-in-out infinite; }
.ring.done .arc { stroke:#fff; } .ring.done .digits { color:var(--gold); }
@keyframes ringpulse { 50% { transform:scale(1.04); } }
.bback { text-align:center; font-size:clamp(20px,4vh,44px); font-? eight:700; margin:2vh 0 0; }
.blines { text-align:center; font-size:clamp(18px,3.4vh,38px); min-height:6em; display:flex; align-items:center; justify-content:center; }
.blines p { margin:0; padding:1.6vh 1.4vw; border-left:8px solid var(--gold); background:rgba(255,255,255,.08); border-radius:12px; }
.blines p:empty { display:none; }
.cup { position:relative; width:14vh; height:12vh; margin-top:3vh; }
.cup .mug { position:absolute; bottom:0; left:0; width:11vh; height:9vh; border:.9vh solid #fff; border-top-width:.5vh; border-radius:0 0 4vh 4vh; background:rgba(255,255,255,.1); }
.cup .handle { position:absolute; bottom:2vh; right:0; width:4.2vh; height:4.8vh; border:.9vh solid #fff; border-left:0; border-radius:0 3vh 3vh 0; }
.cup .steam { position:absolute; bottom:9vh; width:.8vh; height:4vh; background:var(--gold); border-radius:99px; opacity:0; animation:steam 5s ease-in-out infinite; }
.cup .s1 { left:3vh; } .cup .s2 { left:5.2vh; animation-delay:1.6s; } .cup .s3 { left:7.4vh; animation-delay:3.2s; }
@keyframes steam { 0% { transform:translateY(0) scaleY(.6); opacity:0; } 30% { opacity:.9; } 100% { transform:translateY(-5vh) scaleY(1.2); opacity:0; } }
.sndbtn { margin:0 12px 0 0; padding:3px 12px; background:#fff; color:var(--navy); border:2px solid var(--gold); font-size:14px; }
@media (max-width:900px) { .lbreak { grid-template-columns:1fr; } .ring { width:min(44vh,70vw); } }

/* ===== judge and Admin extras ===== */
.xbanner { background:var(--gold); color:var(--navy); border:3px solid var(--navy); border-radius:12px; padding:10px 16px; margin-bottom:8px; font-? eight:800; font-size:18px; }
.xbanner[hidden] { display:none; }
.jlist { list-style:none; margin:6px 0 10px; padding:0; display:grid; gap:6px; }
.jlist li { display:flex; gap:10px; align-items:center; flex-wrap:wrap; border:1px solid var(--line); border-radius:10px; padding:6px 10px; background:var(--bg); }
.jlist .jn { font-? eight:700; min-width:90px; } .jlist button { margin:0 0 0 auto; }
.bigtime { font-size:34px; font-? eight:800; margin:4px 0; font-variant-numeric:tabular-nums; }
.narrow { max-width:240px; }
.ctl + .ctl { margin-top:14px; }
.ctl h3 { margin:14px 0 6px; font-size:16px; }
.gridwrap td.c { text-align:center; white-space:nowrap; }

/* results table */
table.rt td.c, td.c { text-align:center; }
tr.podium td { background:var(--gold-soft); }
tr.detail > td { background:var(--bg); padding:14px; }
details { margin:8px 0; } summary { cursor:pointer; font-\77 eight:700; }

/* ===== Results reveal: white text on navy, dark text on white cards. No yellow or grey text. Gold is used only as a fill or border. ===== */
body.reveal { background:var(--navy); color:#fff; min-height:100vh; }
body.reveal header.top { display:none; }
.rwrap { max-width:none; padding:0; margin:0; min-height:100vh; display:flex; flex-direction:column; }
.rscreen { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:4vh 5vw; gap:2vh; position:relative; overflow:hidden; }
.rscreen h1 { font-size:clamp(34px,8vh,96px); margin:0; line-height:1.05; }
.rscreen .rbig { font-size:clamp(22px,4.4vh,52px); margin:0; }
.rtag { font-size:clamp(14px,2.4vh,26px); letter-spacing:.2em; text-transform:uppercase; margin:0; border-bottom:4px solid var(--gold); padding-bottom:6px; }
.rmsg { font-size:clamp(20px,3.8vh,44px); max-width:26em; margin:0; }
.rscreen.wait h1 { font-size:clamp(30px,6vh,72px); }
.startbtn { margin-top:3vh; font-size:clamp(20px,3.6vh,40px); padding:14px 56px; background:var(--gold); color:var(--navy); border:3px solid #fff; border-radius:16px; }
.startbtn:hover { background:#fff; }
.ribbon { background:var(--gold); color:var(--navy); border:4px solid #fff; border-radius:14px; padding:1vh 4vw; font-size:clamp(26px,6vh,72px); letter-spacing:.12em; text-transform:uppercase; font-\77 eight:800; }
.pcard { background:#fff; color:var(--navy); border-radius:22px; padding:3vh 4vw; min-width:min(80vw,34em); border-left:14px solid var(--gold); box-shadow:0 20px 60px rgba(0,0,0,.35); }
.pcard h2 { font-size:clamp(30px,8vh,90px); margin:0; line-height:1.05; }
.pcard .pt { font-size:clamp(18px,3.6vh,40px); margin:1vh 0; } .pcard .mem { font-size:clamp(16px,2.8vh,30px); margin:0; }
.k-podium .pcard + .pcard { margin-top:1vh; }
.winner { background:radial-gradient(ellipse at 50% 35%, rgba(255,255,255,.28), transparent 62%); }
.ogrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(15em,1fr)); gap:14px; width:min(1200px,92vw); }
.ocard { background:#fff; color:var(--navy); border-radius:14px; padding:14px 16px; border-top:6px solid var(--gold); min-height:6.5em; text-align:left; }
.ocard h3 { margin:0 0 4px; font-size:clamp(16px,2.6vh,28px); } .ocard p { margin:0; font-size:clamp(13px,2vh,22px); }
.drum { display:flex; gap:2vw; align-items:flex-end; height:18vh; }
.drum span { width:4vw; min-width:24px; background:#fff; border:4px solid var(--gold); border-radius:50% 50% 12px 12px; height:35%; animation:beat .5s ease-in-out infinite alternate; }
.drum span:nth-child(2) { animation-delay:.12s; } .drum span:nth-child(3) { animation-delay:.24s; } .drum span:nth-child(4) { animation-delay:.36s; }
.k-drum.big .drum span { animation-duration:.28s; }
@keyframes beat { to { height:100%; } }
.confetti { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.confetti i { position:absolute; top:-3vh; width:10px; height:18px; border-radius:2px; animation:fall linear infinite; }
.confetti i.c0 { background:var(--gold); } .confetti i.c1 { background:#fff; } .confetti i.c2 { background:var(--navy-2); border:2px solid #fff; }
@keyframes fall { to { top:105vh; transform:rotate(540deg); } }
.rbar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:center; padding:10px 16px; background:var(--navy-2); border-top:3px solid var(--gold); }
.rbar[hidden] { display:none; }
.rb { margin:0; background:#fff; color:var(--navy); border:2px solid #fff; border-radius:10px; padding:8px 18px; }
.rb:disabled { opacity:.45; } .rb.solo { margin-top:3vh; }
.rpos, .rhint { color:#fff; font-size:14px; } .rerr { background:#fff; color:var(--navy); border-left:8px solid var(--gold); padding:8px 14px; border-radius:8px; }
@media (prefers-reduced-motion: reduce) { .drum span { animation:none; height:70%; } .confetti { display:none; } }

/* release checklist and approval steps */
ul.checks { list-style:none; margin:6px 0 10px; padding:0; display:grid; gap:6px; }
ul.checks li { display:flex; gap:10px; align-items:flex-start; border:1px solid var(--line); border-radius:10px; padding:8px 12px; background:var(--bg); }
ul.checks li.ok { border-left:6px solid var(--navy); } ul.checks li.no { border-left:6px dashed var(--gold); background:#fff; }
ul.checks .mark { display:inline-flex; width:26px; height:26px; border-radius:50%; align-items:center; justify-content:center; flex:none; border:2px solid var(--navy); }
ul.checks li.ok .mark { background:var(--navy); color:#fff; } ul.checks li.no .mark { background:#fff; color:var(--navy); }
ol.steps { margin:6px 0 12px 20px; padding:0; } ol.steps li { margin:6px 0; } ol.steps li.ok { border-left:5px solid var(--gold); padding-left:8px; }
ol.top3 { font-size:18px; margin:6px 0 14px 22px; padding:0; } ol.top3 li { margin:6px 0; }
form.joint { background:var(--gold-soft); border:1px solid var(--gold); border-radius:10px; padding:10px 12px; } form.joint label { flex:1 1 100%; margin:0; }
a.btn { display:inline-block; text-decoration:none; } a.btn.ghost { background:#fff; color:var(--navy); border:2px solid var(--navy); }

/* rubric preview */
.pvbox { max-height:62vh; overflow:auto; border:1px solid var(--line); border-radius:12px; padding:12px; margin-top:10px; background:var(--bg); }
.pvbox footer.sticky { position:static; }
.pvframe { width:100%; height:62vh; border:1px solid var(--line); border-radius:12px; margin-top:10px; background:#fff; }
.pvframe[hidden], .pvbox[hidden] { display:none; }
button.on { background:var(--gold-soft); }

/* Light buttons on dark screens (Enable sound, the reveal controls): the general button:hover rule turns every button navy,
   which made their navy text vanish. On hover they go soft gold with navy text instead. */
.sndbtn:hover:not(:disabled), .rb:hover:not(:disabled) { background:var(--gold-soft); color:var(--navy); border-color:var(--gold); }
.sndbtn:focus-visible, .rb:focus-visible { outline:3px solid var(--gold); outline-offset:2px; }

/* admin overview */
.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin:14px 0; }
.kpi { padding:14px 16px; }
.kpi b { font-size:26px; color:var(--navy); }
.alert ul, .notice ul { margin:6px 0 0 18px; padding:0; }

/* live dashboard: fit one screen exactly, with no scrolling, at any projector or laptop size */
@media (min-width:901px) {
  body.live { height:100vh; height:100dvh; min-height:0; overflow:hidden; }
  body.live .lmain, body.live .lbreak { min-height:0; padding-top:1vh; padding-bottom:1vh; }
  body.live .ltimer { min-height:0; }
  body.live .lhead { padding-top:1vh; padding-bottom:1vh; }
  body.live .lprog { padding-top:1vh; }
  body.live .lstrip { margin-top:1vh; padding-top:.8vh; padding-bottom:.8vh; }
  body.live .lfoot { padding:.6vh 28px; }
  body.live .ring { width:min(38vh,34vw); }
  body.live .blines { min-height:0; }
  body.live .lqueue { gap:1.2vw; }
  body.live .qcard { padding:1vh 16px; }
}
body.live main.lmain, body.live main.lbreak { max-width:none; width:100%; margin:0; }

/* judge sheet: five score levels under each criterion */
.lvls { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; margin:8px 0 4px; max-width:560px; }
.lvl { display:flex; flex-direction:column; align-items:center; gap:1px; padding:6px 4px; background:#fff; color:var(--navy); border:2px solid var(--line); border-radius:9px; font-size:13px; font-\77 eight:700; line-height:1.15; cursor:pointer; }
.lvl small { font-size:12px; opacity:.8; font-\77 eight:600; }
.lvl:hover:not(:disabled), .lvl:focus-visible { background:var(--gold-soft); border-color:var(--gold); color:var(--navy); outline:none; }
.lvl.band { border-color:var(--gold); }
.lvl.on, .lvl.on:hover:not(:disabled) { background:var(--navy); border-color:var(--navy); color:#fff; }
.lvl:disabled { cursor:default; opacity:.6; }
.lvlnote { min-height:2.6em; margin:2px 0 0; }
.lvlbox { margin-top:6px; } .lvlbox textarea { margin-top:6px; }
@media (max-width:560px) { .lvls { grid-template-columns:repeat(5,minmax(0,1fr)); } .lvl { font-size:11px; padding:5px 1px; } }

/* judge sheet rubric: one compact row per criterion (name and description | five levels | score), so all of it fits one screen */
.lvls { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
.lvl { display:flex; flex-direction:column; align-items:center; gap:0; padding:4px 2px; background:#fff; color:var(--navy); border:2px solid var(--line); border-radius:8px; font-size:12.5px; font-\77 eight:700; line-height:1.15; cursor:pointer; margin:0; }
.lvl small { font-size:11px; opacity:.8; font-\77 eight:600; }
.lvl:hover:not(:disabled), .lvl:focus-visible { background:var(--gold-soft); border-color:var(--gold); color:var(--navy); outline:none; }
.lvl.band { border-color:var(--gold); }
.lvl.on, .lvl.on:hover:not(:disabled) { background:var(--navy); border-color:var(--navy); color:#fff; }
.lvl:disabled { cursor:default; opacity:.6; }
.rub { padding:0; overflow:hidden; }
.rub .pane-hd { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:9px 16px 7px; border-bottom:1px solid var(--line); }
.rub .pane-hd h2 { margin:0; font-size:16px; }
.rubric-list { display:flex; flex-direction:column; padding:0 8px; }
.crit { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1.35fr) 148px; gap:6px 14px; align-items:center; padding:clamp(3px,.8vh,8px) 8px; border-bottom:1px solid var(--line); }
.crit:last-child { border-bottom:0; }
.cinfo { display:flex; flex-direction:column; min-width:0; line-height:1.25; }
.crit-name { font-\77 eight:700; font-size:14.5px; }
.crit-look { font-size:11.5px; color:#586079; line-height:1.28; }
.cmid { min-width:0; }
.crit-readout { display:flex; flex-direction:column; align-items:flex-end; gap:0; line-height:1.15; }
.crit-flag { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--gold); position:absolute; margin-left:-12px; margin-top:7px; }
.crit:not(.untouched) .crit-flag { display:none; }
.crit-level-name { font-size:11px; font-\77 eight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--navy); }
.crit.untouched .crit-level-name { font-style:italic; text-transform:none; letter-spacing:0; font-\77 eight:500; opacity:.65; }
.crit-score { font-family:ui-monospace,Menlo,Consolas,monospace; font-\77 eight:700; font-size:17px; font-variant-numeric:tabular-nums; }
.crit-score .max { font-size:11px; opacity:.65; font-\77 eight:600; }
.crit.untouched .crit-score { opacity:.6; }
.crit .err { min-height:0; }
.rubric-foot { display:flex; align-items:center; gap:14px; padding:7px 14px 9px; border-top:1px solid var(--line); flex-wrap:wrap; }
.lvlexplain { flex:1 1 320px; min-height:2.5em; line-height:1.3; opacity:.9; display:flex; align-items:center; }
.rubric-total { display:flex; align-items:center; gap:14px; padding:6px 14px; border-radius:10px; background:var(--gold-soft); border:1px solid var(--gold); }
.rubric-total-label { font-\77 eight:700; font-size:13px; letter-spacing:.03em; }
.rubric-total-val { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:21px; color:var(--navy); font-variant-numeric:tabular-nums; }
.rubric-total-val b { font-\77 eight:800; } .rubric-total-val span { font-size:14px; opacity:.7; }
/* tighten the rest of the sheet's top so the rubric starts high on the screen */
.shead { padding:8px 14px; gap:4px 18px; margin-bottom:8px; } .shead .lbl { font-size:11px; }
/* smaller screens: the criterion name and description sit above the levels, as before */
@media (max-width:900px) { .crit { grid-template-columns:1fr auto; } .cmid { grid-column:1 / -1; order:3; } .crit-look { font-size:12px; } }
@media (max-width:560px) { .lvl { font-size:11px; padding:5px 1px; } .lvl small { font-size:10px; } }
/* short screens (laptops with toolbars): a little tighter still, nothing hidden */
@media (min-width:901px) and (max-height:760px) { .crit { padding:2px 8px; } .crit-look { font-size:11px; line-height:1.22; } .lvl { padding:3px 2px; } .rub .pane-hd { padding:6px 16px 4px; } .rubric-foot { padding:4px 14px 6px; } }

/* control room (Panel Coordinator and Admin): two panes, a big timer ring and a progress bar per judge */
.cpanes { display:grid; grid-template-columns:1.05fr 1fr; gap:14px; align-items:start; }
.ccol { display:flex; flex-direction:column; gap:14px; min-width:0; }
.ctl .pane-hd { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:6px; }
.ctl .pane-hd h2 { margin:0; font-size:17px; }
.cring { display:flex; flex-direction:column; align-items:center; gap:10px; padding:6px 0 10px; }
.phase-chip { padding:4px 16px; border-radius:99px; background:var(--soft); color:var(--navy); border:1px solid var(--line); font-size:13px; font-\77 eight:800; letter-spacing:.07em; text-transform:uppercase; }
.phase-chip.live { background:var(--gold-soft); border-color:var(--gold); }
.big-ring { position:relative; width:150px; height:150px; }
.big-ring svg { width:150px; height:150px; display:block; }
.big-ring circle { fill:none; stroke-width:8; }
.big-ring .trk { stroke:var(--line); }
.big-ring .arc { stroke:var(--navy); stroke-linecap:round; transition:stroke-dashoffset .3s linear, stroke .3s; }
.big-ring.state-warn .arc { stroke:var(--gold); }
.big-ring.state-danger .arc { stroke:var(--gold); stroke-width:10; }
.big-time { position:absolute; inset:16px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; text-align:center; overflow:hidden; }
.big-time b { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:28px; font-variant-numeric:tabular-nums; color:var(--navy); }
.big-time span { font-size:10px; letter-spacing:.04em; text-transform:uppercase; opacity:.7; font-\77 eight:600; }
.jlist .jrow { display:grid; grid-template-columns:34px 1fr auto; align-items:center; gap:12px; padding:8px 4px; }
.jlist .jrow .chip { white-space:nowrap; }
.jlist .jrow button { grid-column:2 / -1; justify-self:start; }
.j-ava { width:34px; height:34px; border-radius:50%; background:var(--gold-soft); color:var(--navy); border:1px solid var(--gold); display:flex; align-items:center; justify-content:center; font-size:12px; font-\77 eight:800; }
.j-mid { min-width:0; display:flex; flex-direction:column; gap:5px; }
.j-bar { height:7px; border-radius:4px; background:var(--soft); border:1px solid var(--line); overflow:hidden; display:block; }
.j-bar i { display:block; height:100%; width:0; background:var(--navy); transition:width .4s ease; }
@media (max-width:900px) { .cpanes { grid-template-columns:1fr; } }

/* control room: compact enough to fit one screen, with the break controls right under the timer circle */
.cpanes .ctl { padding:12px 16px; margin:0; }
.cpanes .ctl h2 { font-size:16px; }
.cpanes .ctl h3 { margin:10px 0 2px; font-size:14px; }
.cpanes .ctl label { margin-top:6px; }
.cpanes .ctl p { margin:4px 0; }
.cpanes .ctl .ctlbtns { margin-top:4px; gap:6px; } .cpanes .ctl .ctlbtns button { margin-top:2px; padding:7px 12px; }
.cpanes .cring { padding:0 0 4px; gap:6px; }
.cpanes .big-ring, .cpanes .big-ring svg { width:116px; height:116px; }
.cpanes .big-time { inset:12px; } .cpanes .big-time b { font-size:23px; }
.cpanes .jlist { margin:0; padding:0; list-style:none; } .cpanes .jlist .jrow { padding:4px 2px; }
.cpanes .bigtime { margin:2px 0; }
.cpanes select, .cpanes input { padding:7px 10px; }
.cpanes .cwrap { display:grid; grid-template-columns:150px 1fr; gap:14px; align-items:center; }
.cpanes .cctl { min-width:0; }
.cpanes #bidle { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.cpanes #bidle .ctlbtns { margin:0; }
@media (max-width:560px) { .cpanes .cwrap { grid-template-columns:1fr; } }
.cpanes #why, .cpanes #bwhy, .cpanes #rwhy, .cpanes #scwhy { font-size:11.5px; margin:2px 0; }
.cpanes .reopen { margin-top:6px; }
.cpanes .reopen h3 { margin:6px 0 2px; }
.cpanes .jlist .jrow { padding:2px 2px; }
.cpanes .ctl { padding:10px 14px; }
.cpanes { gap:12px; } .cpanes .ccol { gap:12px; }
.cpanes .ctl h3 { margin:6px 0 2px; }
.cpanes .ctl label { margin-top:3px; }

/* student star ratings */
.stars { display:inline-flex; gap:2px; vertical-align:middle; }
.star { background:none; border:0; padding:2px; line-height:0; color:var(--line); cursor:pointer; }
.star svg { width:24px; height:24px; display:block; }
.star.on { color:var(--gold); }
.star:hover:not(:disabled) { color:var(--gold); }
.star:disabled { cursor:default; opacity:.7; }
.notebtn { margin-left:8px; padding:4px 10px; font-size:13px; background:#fff; color:var(--navy); border:2px solid var(--line); border-radius:8px; cursor:pointer; }
.notebtn.filled { border-color:var(--gold); background:var(--gold-soft); }
.notebtn:hover { background:var(--gold-soft); border-color:var(--gold); }

/* team queue */
.queue .qlist { display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.q-row { display:grid; grid-template-columns:30px 1fr auto auto; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; border:1px solid transparent; }
.q-row.is-current { background:var(--gold-soft); border-color:var(--gold); }
.q-num { text-align:center; opacity:.65; font-family:ui-monospace,Menlo,Consolas,monospace; }
.q-name { display:flex; flex-direction:column; min-width:0; line-height:1.2; } .q-name b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .q-name small { opacity:.7; }
.q-chip { padding:3px 10px; border-radius:99px; font-size:11px; text-transform:uppercase; letter-spacing:.04em; font-\77 eight:700; border:1px solid var(--line); white-space:nowrap; }
.q-chip.current { background:var(--navy); color:#fff; border-color:var(--navy); }
.q-chip.next, .q-chip.ondeck { background:var(--gold-soft); border-color:var(--gold); }
.q-chip.done { opacity:.6; }
.q-move { display:flex; flex-direction:column; gap:2px; }
.q-move-btn { width:24px; height:18px; padding:0; border-radius:5px; border:1px solid var(--line); background:#fff; color:var(--navy); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.q-move-btn:hover:not(:disabled) { background:var(--gold-soft); border-color:var(--gold); }
.q-move-btn:disabled { opacity:.3; cursor:not-allowed; }
.q-move-btn svg { width:11px; height:11px; }

/* Live dashboard, Judge and Results: the event title leads and the INTechGenius name sits quietly at the very bottom.
   Every rule below is scoped to these pages (or to elements only they have). Admin and Feedback are not touched. */
header.top .evtitle { font-size:18px; }
.brandfoot { text-align:center; padding:16px 16px 20px; font-size:12px; letter-spacing:.08em; color:var(--navy); opacity:.4; }
.brandfoot b { color:inherit; }
body.stage .brandfoot { color:#fff; }
body.live .lhead .evname { margin:0; opacity:1; font-size:clamp(20px,3.6vh,36px); font-\77 eight:800; letter-spacing:.01em; }
body.live .lfoot .bf { float:left; font-size:12px; letter-spacing:.08em; opacity:.4; }
body.live .lfoot .bf b { color:inherit; }
.brandfoot b, body.live .lfoot .bf b { font-\77 eight:inherit; }
body.reveal .brandfoot { color:#fff; }

/* the university name, shown beside the event title on the Live dashboard, Judge and Results */
.evvenue { opacity:.85; }
header.top .evvenue { font-size:15px; }
body.live .lhead .evvenue { font-size:clamp(15px,2.6vh,26px); margin-left:10px; }
body.reveal .brandfoot { position:fixed; left:0; right:0; bottom:0; padding:10px 16px; pointer-events:none; }
/* judge sheet: the team picker sits beside Back to teams, and the top of the sheet takes less height */
.bar .team-select { width:auto; max-width:min(420px,62vw); padding-top:7px; padding-bottom:7px; }
.crit { padding:clamp(2px,.45vh,6px) 8px; }
.crit-look { font-size:11px; line-height:1.25; }
.shead { padding:6px 14px; gap:0 16px; margin-bottom:6px; } .shead .lbl { font-size:10.5px; } .shead b { font-size:15px; }
.lvlexplain { min-height:2.3em; }
.rubric-foot { padding:5px 14px 7px; }
/* the open judge sheet on a wide screen: the timer bar, team line and rubric are tightened so the whole rubric shows without scrolling */
@media (min-width:901px) {
  #app:has(#view.sheetmode) .strip { padding:5px 14px; margin-bottom:6px; } #app:has(#view.sheetmode) .strip .s-time { font-size:24px; }
  #view.sheetmode .bar { margin-bottom:6px; }
  #view.sheetmode .shead { display:flex; flex-wrap:wrap; gap:0 24px; padding:4px 14px; margin-bottom:6px; }
  #view.sheetmode .shead > div { display:flex; gap:6px; align-items:baseline; } #view.sheetmode .shead .lbl { display:inline; } #view.sheetmode .shead b { font-size:14px; }
  #view.sheetmode .crit { padding:2px 8px; }
  #view.sheetmode .rub .pane-hd { padding:5px 16px 3px; } #view.sheetmode .rub .pane-hd h2 { font-size:15px; }
  #view.sheetmode .rubric-foot { padding:3px 14px 5px; } #view.sheetmode .lvlexplain { min-height:2.2em; }
}
@media (min-width:901px) {
  main#app:has(#view.sheetmode) { padding-top:10px; padding-bottom:10px; }
  #view.sheetmode footer.sticky { padding:6px 16px; margin-top:8px; }
}

/* an element marked hidden stays hidden, even when a rule above gives it a display (the Panel Coordinator tick box) */
[hidden] { display:none !important; }

/* a judge's designation sits under the name where it can be read: light on the dark top bar, dark on the sheet */
header.top .whoid { display:flex; flex-direction:column; align-items:flex-end; line-height:1.2; text-align:right; }
header.top .whoname { font-size:15px; }
header.top .desig { font-size:13px; color:#e6ecf8; max-width:32ch; }
.shead .desig { font-size:13px; color:var(--navy); opacity:.85; line-height:1.25; }
@media (max-width:560px) { header.top .desig { max-width:22ch; font-size:12px; } }

/* a team name that opens its student list: it looks like text, with a dotted underline that says "more here" */
button.tname, button.tname:hover:not(:disabled) { background:none; color:inherit; border:0; padding:0; margin:0; font:inherit; font-\77 eight:inherit; text-align:left; cursor:pointer; text-decoration:underline dotted; text-underline-offset:4px; }
button.tname:hover:not(:disabled), button.tname:focus-visible { text-decoration:underline solid; }
.stpop { position:fixed; z-index:60; max-width:min(340px,92vw); background:var(--navy); color:#fff; border-left:5px solid var(--gold); border-radius:10px; padding:10px 14px; box-shadow:0 14px 36px rgba(20,33,61,.45); font-size:14px; pointer-events:none; }
.stlist { margin:8px 0 4px; padding:0; list-style:none; display:grid; gap:4px; }
.stlist li { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.stlist li span { font-size:12.5px; opacity:.8; }

/* Connection status line (Offline / Syncing / Synced). Navy and gold only, plus a text label every time. */
.netstat { position:fixed; left:14px; bottom:14px; z-index:70; display:flex; align-items:center; gap:10px; max-width:min(560px,calc(100vw - 28px)); background:var(--navy); color:#fff; border:1px solid var(--navy-2); border-left:6px solid var(--gold); border-radius:10px; padding:9px 14px; font-size:14.5px; box-shadow:0 10px 28px rgba(20,33,61,.28); }
.netstat[hidden] { display:none; }
.netstat .ns-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--gold); }
.netstat[data-state="offline"] { background:#fff; color:var(--navy); border:2px solid var(--navy); border-left:8px solid var(--gold); }
.netstat[data-state="offline"] .ns-dot { background:var(--navy); }
.netstat[data-state="syncing"] .ns-dot { animation:nsPulse 1s ease-in-out infinite; }
.netstat[data-state="failed"], .netstat[data-state="signin"] { background:#fff; color:var(--navy); border:2px solid var(--navy); border-left:8px solid var(--navy); }
.netstat button.link { color:inherit; text-decoration:underline; background:none; border:0; padding:0 0 0 4px; cursor:pointer; font:inherit; }
@keyframes nsPulse { 50% { opacity:.25; } }
@media (prefers-reduced-motion: reduce) { .netstat[data-state="syncing"] .ns-dot { animation:none; } }

/* Latest announcement, shown above the timer on judge and Admin screens. */
.annbar { background:var(--gold-soft); color:var(--navy); border:1px solid var(--gold); border-left:6px solid var(--gold); border-radius:10px; padding:8px 14px; margin-bottom:8px; font-size:15px; }
.annbar[hidden] { display:none; }

/* Admin header search. Only the exact command is understood; nothing else is searched or shown. */
header.top .hsearch { position:relative; margin-left:auto; display:flex; align-items:center; }
header.top .hsearch + #who { margin-left:0; }
header.top .hsearch input { width:170px; max-width:38vw; background:var(--navy-2); color:#fff; border:1px solid rgba(255,255,255,.25); border-right:0; border-radius:99px 0 0 99px; padding:6px 12px; font-size:14px; }
header.top .hsearch input::placeholder { color:rgba(255,255,255,.7); }
header.top .hsearch input:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }
header.top .hsearch button { background:var(--gold); color:var(--navy); border:1px solid var(--gold); border-radius:0 99px 99px 0; padding:6px 11px; display:grid; place-items:center; cursor:pointer; }
header.top .hsearch-msg { position:absolute; right:0; top:calc(100% + 8px); white-space:nowrap; background:#fff; color:var(--navy); border:2px solid var(--navy); border-left:6px solid var(--gold); border-radius:8px; padding:5px 12px; font-size:13.5px; z-index:40; }
header.top .hsearch-msg[hidden] { display:none; }

/* "Switch to paper" banner (Offline Protocol). Navy and gold, with a text label. Sticks to the top of every screen while it applies. */
.paperbar { position:sticky; top:0; z-index:90; display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:14px 20px; background:var(--navy); color:#fff; border-bottom:6px solid var(--gold); font-size:17px; line-height:1.4; }
.paperbar[hidden] { display:none; }
.paperbar .pb-tag { flex:none; background:var(--gold); color:var(--navy); padding:4px 14px; border-radius:99px; letter-spacing:.06em; text-transform:uppercase; font-size:14px; }
.paperbar .pb-text { flex:1 1 320px; }
.paperbar[data-kind="back"] { background:#fff; color:var(--navy); border:2px solid var(--navy); border-bottom:6px solid var(--gold); }
.paperbar .link { color:inherit; text-decoration:underline; background:none; border:0; padding:0; cursor:pointer; font:inherit; }

/* A team that will not present: a plain outlined chip (never colour alone: the word "Absent" is always shown), and a small action button. */
.q-chip.absent { background:#fff; color:var(--navy); border:2px dashed var(--navy); }
.q-row .q-abs { margin:0 6px; padding:3px 10px; font-size:12px; }
.q-row.is-absent .q-name { opacity:.65; }

/* The judge sheet in two columns: Section 1 (the rubric) on the left; Section 2 (students) and Section 3 (comments) stacked on the right.
   On a phone or a narrow window they stack in the order 1, 2, 3. */
.sheetgrid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(0,1fr); gap:10px; align-items:start; }
.sheetgrid.one { grid-template-columns:minmax(0,1fr); }
.sheetgrid > .scol { min-width:0; display:flex; flex-direction:column; gap:10px; }
.sheetgrid .scol .sec { margin:0; }
.sheetgrid > .scol + .scol .sec { padding:12px 16px 14px; }
.sheetgrid > .scol + .scol .sec h2 { font-size:16px; margin:0 0 4px; }
.sheetgrid > .scol + .scol .sec > p.muted { margin:0 0 8px; }
@media (max-width:1000px) { .sheetgrid { grid-template-columns:minmax(0,1fr); } }
.shead .sh-proj { display:block; font-size:13.5px; color:#586079; line-height:1.3; }
.shead .sh-team { min-width:0; }
/* rubric rows: one line each. The description is one line too (the whole text shows on hover), so all seven criteria fit on one screen. */
@media (min-width:1001px) {
  .sheetgrid .rub .crit { grid-template-columns:minmax(0,.95fr) minmax(0,1.5fr) 112px; gap:4px 10px; padding:3px 8px; align-items:center; }
  .sheetgrid .rub .crit-look { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .sheetgrid .rub .lvl { font-size:12px; padding:5px 1px; }
}
/* student rows: name, five stars and a small speech-bubble icon; the feedback opens only when the icon is clicked */
.sheetgrid .scol + .scol table { margin:0; } .sheetgrid .scol + .scol td, .sheetgrid .scol + .scol th { padding:6px 8px; }
.sheetgrid .scol + .scol td:last-child { white-space:nowrap; }
.fbtn { display:inline-grid; place-items:center; width:34px; height:34px; margin:0 0 0 10px; padding:0; border-radius:10px; background:#fff; color:var(--navy); border:2px solid var(--line); cursor:pointer; position:relative; vertical-align:middle; }
.fbtn svg, .pen svg { width:18px; height:18px; }
.fbtn:hover:not(:disabled), .fbtn:focus-visible, .pen:hover:not(:disabled), .pen:focus-visible { border-color:var(--gold); background:var(--gold-soft); color:var(--navy); outline:none; }
.fbtn.filled { background:var(--navy); color:#fff; border-color:var(--navy); }
.fbtn.filled::after { content:""; position:absolute; top:-5px; right:-5px; width:11px; height:11px; border-radius:50%; background:var(--gold); border:2px solid #fff; }
/* comments: a small pencil beside each field name that takes you to it */
.plabel { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.plabel label { margin:0; }
.pen { display:inline-grid; place-items:center; flex:none; width:28px; height:28px; margin:0; padding:0; border-radius:8px; background:#fff; color:var(--navy); border:2px solid var(--line); cursor:pointer; }
.pen svg { width:15px; height:15px; }
.pgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:4px 14px; align-items:start; }
.pgrid .pbox { min-width:0; }
.pgrid .pbox textarea { width:100%; }

/* Control room: what the team really used, and how long the event has run. */
.recs { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.recs > div { background:var(--soft); border:1px solid var(--line); border-radius:12px; padding:8px 10px; text-align:center; }
.recs b { display:block; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:20px; }
.recs span { display:block; font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; color:#586079; }
.cring .evel { text-align:center; margin:8px 0 0; }

/* The open judge sheet uses the whole width of the window (left to right), so the rubric rows stay one line each and fit on one screen. */
main#app:has(#view.sheetmode) { max-width:min(1800px,98vw); }

/* Compact right column: Sections 2 and 3 together stay close to the height of the rubric, so the sheet needs little or no scrolling. */
.sheetgrid > .scol + .scol .sec > p.muted { font-size:12px; line-height:1.3; margin:0 0 6px; }
.sheetgrid .scol + .scol td, .sheetgrid .scol + .scol th { padding:3px 8px; }
.sheetgrid .scol + .scol table thead th { padding:4px 8px; font-size:12.5px; }
.sheetgrid .scol + .scol .scroll { overflow-x:auto; }
.fbtn { width:30px; height:30px; margin-left:8px; }
.fbtn svg { width:16px; height:16px; }
.sheetgrid .scol + .scol .stars .star { padding:2px; }
.pgrid { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:2px 12px; }
.sheetgrid .scol + .scol .pbox textarea { min-height:46px; padding:6px 8px; }
.sheetgrid .scol + .scol .pbox .small { font-size:11.5px; }
.sheetgrid .scol + .scol .stars .star { margin:0; min-height:0; }
.sheetgrid .scol + .scol .fbtn { margin-top:0; margin-bottom:0; }
/* the 20-character rule is shown by the live counter under each field, so the label stays on one line */
.sheetgrid .scol + .scol .plabel .req { display:none; }
.sheetgrid .scol + .scol tbody td { padding-top:2px; padding-bottom:2px; }
.sheetgrid .scol + .scol .stars .star svg { width:22px; height:22px; }
.sheetgrid > .scol + .scol .sec { padding:9px 14px 9px; }
.sheetgrid .scol + .scol .pbox textarea { min-height:42px; }
/* on a phone the five level names must fit in one row: slightly smaller type and tighter buttons */
@media (max-width:480px) { .rub .lvls { gap:3px; } .rub .lvl { font-size:9.5px; padding:6px 0; letter-spacing:-.1px; overflow:hidden; } }

/* ===== Phone: the judge sheet is compact and every control is easy to tap ===== */
button, .btn, input, textarea, select { touch-action:manipulation; }
@media (max-width:600px) {
  /* the page above the rubric takes a fraction of the screen, so scoring starts at once */
  .navtabs { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; margin-bottom:8px; }
  .navtabs::-webkit-scrollbar { display:none; }
  .navtabs .tab { flex:none; white-space:nowrap; padding:10px 14px; }
  .stripbox { padding-top:0; }
  .strip { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0 10px; padding:6px 12px; margin-bottom:6px; align-items:center; }
  .strip .s-main { grid-column:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
  .strip .s-time { grid-column:2; grid-row:1 / span 2; font-size:26px; }
  .strip .s-label { grid-column:1; font-size:11px; letter-spacing:.08em; }
  .strip .s-net { grid-column:1 / -1; }
  #view .bar { flex-wrap:nowrap; gap:8px; margin-bottom:8px; }
  #view .bar .team-select { flex:1 1 0; min-width:0; max-width:none; }
  #view .bar #back { flex:none; margin:0; padding:8px 12px; }
  .shead { display:grid; grid-template-columns:1fr 1fr; gap:2px 12px; padding:8px 12px; margin-bottom:8px; }
  .shead .sh-team { grid-column:1 / -1; }
  .shead .sh-round, .shead .sh-event { display:none; }
  .shead b { font-size:15px; }
  /* the rubric: shorter heading, two-line descriptions, bigger level buttons */
  .sheetgrid .rub .pane-hd { display:block; padding:8px 12px 2px; } .sheetgrid .rub .pane-hd .muted { display:none; }
  .rub .crit { padding:8px 10px 10px; gap:4px 8px; }
  .rub .crit-name { font-size:15px; }
  .rub .crit-look { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:12px; }
  .rub .lvls { gap:3px; margin:4px 0 0; }
  .rub .lvl { min-height:42px; font-size:10.5px; padding:0 1px; display:flex; align-items:center; justify-content:center; letter-spacing:0; }
  /* Section 2: the name on the left, the stars and the speech bubble on the right */
  .sheetgrid .scol + .scol table, .sheetgrid .scol + .scol tbody { display:block; }
  .sheetgrid .scol + .scol tr { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; border-bottom:1px solid var(--line); }
  .sheetgrid .scol + .scol td { display:block; border:0; padding:0; }
  .sheetgrid .scol + .scol td:first-child { min-width:0; flex:1 1 auto; }
  .sheetgrid .scol + .scol td:last-child { flex:none; }
  .sheetgrid .scol + .scol .stars .star { padding:5px; }
  .sheetgrid .scol + .scol .stars .star svg { width:22px; height:22px; }
  .fbtn { width:40px; height:40px; margin-left:6px; border-radius:12px; }
  .fbtn svg { width:19px; height:19px; }
  .pen { width:40px; height:40px; border-radius:12px; }
  .pen svg { width:18px; height:18px; }
  .sheetgrid .scol + .scol .pbox textarea { min-height:70px; }
  /* the bottom bar: saved text and Submit on one line, what is missing under them */
  footer.sticky { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"saved submit" "miss miss"; gap:4px 10px; padding:8px 12px max(8px, env(safe-area-inset-bottom)); }
  footer.sticky #saved { grid-area:saved; font-size:14px; }
  footer.sticky #miss { grid-area:miss; font-size:12.5px; text-align:left; padding:0; margin:0; }
  footer.sticky #miss:empty { display:none; }
  footer.sticky .spacer { display:none; }
  footer.sticky #submit { grid-area:submit; min-height:44px; padding:8px 16px; }
  /* the note window uses the width of the phone */
  dialog { width:calc(100vw - 24px); max-width:none; }
  .dlg .end button { min-height:44px; }
}

/* Phone: the team queue. Number, full team name and status on the first line; Absent and the move arrows on the second, all easy to tap. */
@media (max-width:600px) {
  .q-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:10px 10px; }
  .q-row .q-num { flex:none; width:24px; }
  .q-row .q-name { flex:1 1 150px; min-width:0; }
  .q-row .q-name b, .q-row .q-name small { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
  .q-row .q-chip { flex:none; }
  .q-row .q-abs { margin:0 0 0 auto; min-height:40px; padding:8px 14px; font-size:13px; }
  .q-row .q-move { display:flex; gap:6px; margin:0; }
  .q-row .q-move-btn { width:40px; height:40px; margin:0; padding:0; display:grid; place-items:center; }
  .q-row .q-move-btn svg { width:18px; height:18px; }
}
.q-row { grid-template-columns:30px 1fr auto auto auto; }
.q-row > span:empty { display:none; }
.q-row .q-abs { margin:0; }
@media (max-width:600px) { .q-row .q-move { flex-direction:row; } .q-row > span:empty { display:none; } }
.q-move-btn { margin:0; }

/* Any touch screen (a tablet, a touch laptop): buttons are big enough for a finger. A mouse keeps the compact desktop sizes. */
@media (pointer:coarse) {
  .rub .lvl { min-height:40px; }
  .star { padding:6px; }
  .fbtn, .pen { width:40px; height:40px; }
  .q-move-btn { width:40px; height:40px; }
  .q-row .q-abs { min-height:40px; }
  .tabs .tab, .navtabs .tab { min-height:44px; }
  footer.sticky #submit { min-height:44px; }
}

/* The venue: a location pin instead of a dot, and the Sandip University logo on a white chip (the logo is dark and red, so it needs a light background). */
.evvenue { display:inline-flex; align-items:center; gap:.4em; }
.evvenue .pin { display:inline-grid; color:var(--gold); }
.evvenue .pin svg { width:1.1em; height:1.1em; }
.uni-chip { display:inline-flex; align-items:center; flex:none; background:#fff; border:2px solid var(--gold); border-radius:12px; padding:3px 10px; }
.uni-chip[hidden] { display:none; }
.uni-logo { display:block; height:34px; width:auto; max-width:46vw; }
header.top .uni-chip { margin-left:auto; } header.top .uni-chip + .role { margin-left:12px; }
body.live .lhead .uni-chip { margin-left:auto; } body.live .lhead .uni-logo { height:clamp(30px,5.2vh,58px); }
@media (max-width:560px) { .uni-logo { height:26px; } }

/* Under the rubric: Running total on the left, the marks count on the right. No explanation line, no hover box. */
.lvlexplain { display:none; }
.rubric-foot { justify-content:space-between; flex-wrap:nowrap; }
.rubric-marks { display:flex; align-items:center; gap:12px; font-size:14px; color:var(--navy); margin-left:auto; }
.rm-bar { display:inline-block; width:150px; height:8px; border-radius:99px; background:var(--line); overflow:hidden; }
.rm-bar i { display:block; height:100%; background:var(--gold); border-radius:99px; transition:width .2s; }
/* The mark on the right of every criterion: the level name above, the score under it, both right-aligned in one tidy column. */
.crit-flag { display:none !important; }
.crit-readout { min-width:96px; align-items:flex-end; text-align:right; }
.crit.untouched .crit-level-name { font-style:normal; text-transform:uppercase; letter-spacing:.05em; opacity:.5; font-size:11px; }
.crit-score { display:block; text-align:right; }
@media (max-width:600px) { .rubric-foot { flex-wrap:wrap; } .rm-bar { width:110px; } }

/* ===== Live dashboard timer area: a live clock when no pitch is running, the pitch timer when one is ===== */
.ltimer { display:grid; place-items:center; position:relative; overflow:hidden; }
.ltimer .tview { grid-area:1 / 1; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; transition:opacity .6s ease, transform .6s ease, visibility .6s; }
.ltimer[data-mode="clock"] .tpitch { opacity:0; transform:scale(.94); visibility:hidden; }
.ltimer[data-mode="pitch"] .tclock { opacity:0; transform:scale(1.06); visibility:hidden; }
.ltimer.t-idle { background:linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.015)); border:2px solid rgba(252,163,17,.45); box-shadow:0 0 0 1px rgba(255,255,255,.05) inset, 0 18px 50px rgba(0,0,0,.28); }
.ltimer.t-idle::before { content:""; position:absolute; inset:-40% -20% auto auto; width:70%; aspect-ratio:1; background:radial-gradient(circle, rgba(252,163,17,.22), transparent 65%); animation:cglow 7s ease-in-out infinite; pointer-events:none; }
.tclock .cday { font-size:clamp(14px,3vh,34px); font-\77 eight:800; letter-spacing:.42em; padding-left:.42em; color:var(--gold); }
.tclock .ctime { display:flex; align-items:baseline; justify-content:center; gap:.12em; margin:1.2vh 0; font-\77 eight:800; line-height:1; font-variant-numeric:tabular-nums; font-size:min(17vh,7.2vw); white-space:nowrap; text-shadow:0 4px 30px rgba(252,163,17,.25); }
.tclock .csec { font-size:.42em; color:var(--gold); opacity:.95; }
.tclock .ccolon { font-style:normal; animation:ccolon 1s steps(1) infinite; }
.tclock .cap { font-size:.2em; letter-spacing:.12em; margin-left:.5em; opacity:.8; align-self:center; border:2px solid rgba(255,255,255,.4); border-radius:8px; padding:.05em .4em; }
.tclock .cdate { font-size:clamp(16px,3.4vh,40px); letter-spacing:.06em; opacity:.92; }
.tclock .csecbar { width:min(70%,520px); height:6px; border-radius:99px; background:rgba(255,255,255,.14); margin-top:2.4vh; overflow:hidden; }
.tclock .csecbar i { display:block; height:100%; width:0; border-radius:99px; background:linear-gradient(90deg, rgba(252,163,17,.35), var(--gold)); box-shadow:0 0 12px rgba(252,163,17,.7); }
@keyframes ccolon { 50% { opacity:.25; } }
@keyframes cglow { 50% { transform:translate(-8%,10%) scale(1.15); opacity:.7; } }
@media (prefers-reduced-motion:reduce) { .ltimer .tview { transition:none; } .ltimer.t-idle::before, .tclock .ccolon { animation:none; } }
@media (max-width:900px) { .tclock .ctime { font-size:min(13vh,15vw); } }

/* Admin header search results */
header.top .hsearch-list { position:absolute; right:0; top:calc(100% + 8px); width:min(340px,86vw); margin:0; padding:4px; list-style:none; background:#fff; color:var(--navy); border:2px solid var(--navy); border-left:6px solid var(--gold); border-radius:10px; z-index:50; max-height:60vh; overflow:auto; box-shadow:0 10px 30px rgba(0,0,0,.25); }
header.top .hsearch-list[hidden] { display:none; }
header.top .hsearch-list li { display:flex; flex-direction:column; padding:7px 10px; border-radius:7px; cursor:pointer; line-height:1.25; }
header.top .hsearch-list li:hover { background:var(--gold-soft); }
header.top .hsearch-list li span { font-size:12.5px; opacity:.75; }
/* the search icon sits level with the box: no top margin from the general button rule, same height */
header.top .hsearch input, header.top .hsearch button { margin:0; box-sizing:border-box; height:34px; }
header.top .hsearch button { padding:0 12px; align-self:center; }
/* long addresses (feedback link, live link) wrap inside their card on a phone instead of widening the page */
#panel code { overflow-wrap:anywhere; word-break:break-all; }
/* phone: the live header wraps instead of pushing the university logo off the screen */
@media (max-width:700px) { .lhead { flex-wrap:wrap; gap:6px 12px; padding:10px 16px; } .lhead .uni-chip { margin-left:auto; } .lhead .uni-logo { max-height:40px; width:auto; } }
.ltimer[data-mode="wait"] .tview { opacity:0; visibility:hidden; transition:none; }

/* The "?" after each criterion name. It sits right after the name.
   What to look for is hidden until the name or the ? is clicked, then opens as a soft panel under the whole row. */
.crit-name.qlabel { position:relative; display:inline-flex; align-items:center; gap:8px; max-width:100%; cursor:pointer; }
.qlabel .qtext { flex:0 1 auto; min-width:0; }
.qlabel .qtoggle { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.qmark { display:inline-grid; place-items:center; flex:none; margin-left:0; width:20px; height:20px; border-radius:50%; background:#fff; color:var(--gold); border:2px solid var(--gold); font-size:12px; font-? eight:800; line-height:1; user-select:none; transition:background .15s, color .15s, transform .15s; }
.qlabel:hover .qmark { background:var(--gold-soft); transform:scale(1.08); }
.qlabel:has(.qtoggle:checked) .qmark { background:var(--navy); color:#fff; border-color:var(--navy); }
.qlabel:has(.qtoggle:focus-visible) { outline:3px solid var(--gold); outline-offset:2px; border-radius:6px; }
.crit .crit-look { grid-column:1 / -1; order:9; display:none !important; }
.crit:has(.qtoggle:checked) .crit-look { display:block !important; margin:6px 0 3px; padding:8px 14px; border-radius:8px; border:1px solid rgba(252,163,17,.55); border-left:4px solid var(--gold); background:var(--gold-soft); color:var(--navy); font-size:13px; line-height:1.4; white-space:normal !important; overflow:visible !important; text-overflow:clip !important; -webkit-line-clamp:unset !important; animation:qopen .18s ease-out; }
@keyframes qopen { from { opacity:0; transform:translateY(-3px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) { .crit:has(.qtoggle:checked) .crit-look { animation:none; } .qmark { transition:none; } }

/* Hover (or focus) on a level button: a small bubble with what that level means, next to the button. */
.lvltip { position:fixed; z-index:200; max-width:min(300px, calc(100vw - 16px)); padding:9px 12px 10px; border-radius:10px; background:var(--navy); color:#fff; box-shadow:0 10px 28px rgba(20,33,61,.35); border:1px solid rgba(252,163,17,.6); pointer-events:none; font-size:13px; line-height:1.4; animation:qopen .12s ease-out; }
.lvltip[hidden] { display:none; }
.lvltip::after { content:""; position:absolute; left:var(--arrow, 50%); bottom:-6px; width:10px; height:10px; margin-left:-5px; background:var(--navy); border-right:1px solid rgba(252,163,17,.6); border-bottom:1px solid rgba(252,163,17,.6); transform:rotate(45deg); }
.lvltip.below::after { bottom:auto; top:-6px; transform:rotate(225deg); }
@media (prefers-reduced-motion:reduce) { .lvltip { animation:none; } }

/* Weightage of each criterion: a small chip beside its name, and the criterion that carries the most is highlighted in gold. */
.cinfo { flex-direction:row; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.wchip { display:inline-block; padding:1px 8px; border-radius:99px; background:var(--soft); color:#3b4562; border:1px solid var(--line); font-size:11.5px; font-\77 eight:700; line-height:1.5; white-space:nowrap; }
.wchip.top { background:var(--gold); color:var(--navy); border-color:var(--gold); }
.crit.top { box-shadow:inset 5px 0 0 var(--gold); background:linear-gradient(90deg, rgba(252,163,17,.14), rgba(252,163,17,0) 55%); }
/* Admin rubric editor: the share of each criterion beside its marks, the heaviest one in gold. */
.rrow .num { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.wtag { display:inline-block; padding:1px 9px; border-radius:99px; background:var(--soft); color:#3b4562; border:1px solid var(--line); font-size:12px; font-\77 eight:700; white-space:nowrap; }
.wtag.top { background:var(--gold); color:var(--navy); border-color:var(--gold); }
#crit .rrow.top { box-shadow:inset 5px 0 0 var(--gold); background:linear-gradient(90deg, rgba(252,163,17,.12), rgba(252,163,17,0) 50%); }

/* ===== Live dashboard reactions: Clap for this team, Keep quiet, with volume and mute ===== */
body.live .lfoot { display:flex; align-items:center; justify-content:space-between; gap:10px 16px; flex-wrap:wrap; text-align:left; }
body.live .lfoot .bf { float:none; }
.reactbar { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; margin:0 auto; }
.rbtn { display:inline-flex; align-items:center; gap:10px; margin:0; padding:0 22px; height:46px; border-radius:99px; font-size:clamp(14px,2.4vh,18px); font-\77 eight:800; letter-spacing:.02em; cursor:pointer; border:2px solid transparent; transition:transform .12s, box-shadow .2s, filter .2s; }
.rbtn .ri { font-size:1.5em; line-height:1; display:inline-block; }
.rbtn:hover:not(:disabled) { transform:translateY(-2px); filter:brightness(1.06); }
.rbtn:active:not(:disabled) { transform:scale(.96); }
.rbtn:focus-visible { outline:3px solid #fff; outline-offset:3px; }
.rbtn.clap { background:linear-gradient(180deg,#ffbe3d,var(--gold)); color:var(--navy); border-color:#ffd37a; box-shadow:0 6px 20px rgba(252,163,17,.35); }
.rbtn.clap:hover:not(:disabled) { background:linear-gradient(180deg,#ffc95a,#ffb020); color:var(--navy); border-color:#ffd37a; }
.rbtn.hush { background:linear-gradient(180deg,#2c4577,#1c2d52); color:#fff; border-color:rgba(255,255,255,.35); box-shadow:0 6px 20px rgba(10,20,45,.45); }
.rbtn.hush:hover:not(:disabled) { background:linear-gradient(180deg,#36548f,#223863); color:#fff; border-color:rgba(255,255,255,.55); }
.rbtn.on { box-shadow:0 0 0 4px rgba(255,255,255,.28), 0 6px 22px rgba(252,163,17,.5); }
.rbtn.clap.on .ri { animation:rclap .32s ease-in-out infinite; }
.rbtn.hush.on .ri { animation:rhush 1.2s ease-in-out infinite; }
@keyframes rclap { 0%,100% { transform:scale(1) rotate(-8deg); } 50% { transform:scale(1.28) rotate(8deg); } }
@keyframes rhush { 0%,100% { transform:scale(1); } 50% { transform:scale(.88) translateY(2px); } }
.rvol { display:inline-flex; align-items:center; gap:8px; padding:0 12px 0 6px; height:46px; border-radius:99px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.25); }
.rmute { margin:0; width:36px; height:36px; padding:0; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.3); font-size:18px; cursor:pointer; }
.rmute:hover:not(:disabled) { background:rgba(255,255,255,.28); color:#fff; border-color:rgba(255,255,255,.5); }
.rmute[aria-pressed="true"] { background:#fff; color:var(--navy); }
.rvol input[type=range] { width:clamp(90px,10vw,150px); accent-color:var(--gold); margin:0; cursor:pointer; }
.rvol input[type=range]:focus-visible, .rmute:focus-visible { outline:3px solid var(--gold); outline-offset:2px; }
@media (max-width:700px) { .reactbar { width:100%; } .rbtn { flex:1 1 44%; justify-content:center; padding:0 12px; height:50px; } .rvol { flex:1 1 100%; justify-content:center; } .rvol input[type=range] { width:60%; } body.live .lfoot { justify-content:center; } }
@media (min-width:901px) and (max-height:760px) { .rbtn, .rvol { height:38px; } .rbtn { padding:0 16px; } }

/* the animation layer: over the whole screen, never in the way of a click */
.reactfx { position:fixed; inset:0; z-index:150; pointer-events:none; overflow:hidden; }
.reactfx .fxhand { position:absolute; bottom:-12%; left:50%; opacity:0; animation:fxrise 2s ease-out forwards; }
@keyframes fxrise { 0% { transform:translate(0,0) rotate(0) scale(.6); opacity:0; } 12% { opacity:1; } 100% { transform:translate(var(--dx,0),-95vh) rotate(var(--rot,0)) scale(1.15); opacity:0; } }
.reactfx .fxring { position:absolute; left:50%; bottom:6%; width:10px; height:10px; margin-left:-5px; border-radius:50%; border:4px solid rgba(252,163,17,.9); animation:fxring 1.1s ease-out 3; opacity:0; }
@keyframes fxring { 0% { transform:scale(1); opacity:.95; } 100% { transform:scale(60); opacity:0; } }
.reactfx .fxglow { position:absolute; inset:0; opacity:0; }
.reactfx .fxglow.clap { background:radial-gradient(ellipse at 50% 100%, rgba(252,163,17,.42), rgba(252,163,17,0) 62%); animation:fxfade 3.6s ease-in-out forwards; }
.reactfx .fxglow.hush { background:radial-gradient(ellipse at 50% 50%, rgba(8,14,30,.1), rgba(8,14,30,.78)); animation:fxfade 1.6s ease-in-out forwards; }
@keyframes fxfade { 0% { opacity:0; } 18% { opacity:1; } 78% { opacity:.9; } 100% { opacity:0; } }
.reactfx .fxshh { position:absolute; left:50%; top:42%; font-size:clamp(90px,24vmin,240px); line-height:1; transform:translate(-50%,-50%); opacity:0; animation:fxshh 1.6s ease-in-out forwards; }
@keyframes fxshh { 0% { opacity:0; transform:translate(-50%,-50%) scale(.5); } 25% { opacity:1; transform:translate(-50%,-50%) scale(1.08); } 70% { opacity:1; transform:translate(-50%,-50%) scale(1); } 100% { opacity:0; transform:translate(-50%,-50%) scale(.92); } }
.reactfx .fxclap { position:absolute; left:50%; top:40%; font-size:clamp(90px,24vmin,240px); line-height:1; transform:translate(-50%,-50%); opacity:0; animation:fxshh 3.6s ease-in-out forwards; }
.reactfx .fxclaptext { position:absolute; left:50%; top:64%; transform:translateX(-50%); color:#fff; font-size:clamp(22px,4.8vmin,48px); font-\77 eight:800; letter-spacing:.06em; text-align:center; white-space:nowrap; opacity:0; animation:fxfade 3.6s ease-in-out forwards; text-shadow:0 2px 18px rgba(0,0,0,.65); background:rgba(20,33,61,.82); border:2px solid #FCA311; border-radius:999px; padding:8px 28px; }
.reactfx .fxshhtext { position:absolute; left:50%; top:66%; transform:translateX(-50%); color:#fff; font-size:clamp(20px,4.4vmin,44px); font-\77 eight:700; letter-spacing:.08em; text-align:center; white-space:nowrap; opacity:0; animation:fxfade 1.6s ease-in-out forwards; text-shadow:0 2px 18px rgba(0,0,0,.6); }
@media (prefers-reduced-motion:reduce) { .reactfx .fxhand, .reactfx .fxring { animation:none; opacity:0; } .rbtn .ri, .rbtn.on .ri { animation:none !important; } .reactfx .fxshh { animation:fxfade 1.6s linear forwards; } .reactfx .fxclap { animation:fxfade 3.6s linear forwards; } }

/* English / Hindi switch inside Section 2 only */
.s2head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:0 0 10px; }
.s2head h2 { margin:0 !important; }
.langsw { display:inline-flex; border:1px solid var(--line); border-radius:99px; overflow:hidden; background:#fff; }
.langsw button { margin:0; padding:4px 12px; min-height:30px; border:0; border-radius:0; background:transparent; color:#3b4562; font-size:13px; font-\77 eight:700; box-shadow:none; cursor:pointer; }
.langsw button.on, .langsw button[aria-pressed="true"] { background:var(--navy); color:#fff; }
.langsw button:focus-visible { outline:2px solid var(--gold); outline-offset:-2px; }

/* Live screen: until the first click or key press, browsers keep sound off. This small pill says so and disappears after that click. */
.sndhint { position:fixed; right:16px; bottom:16px; z-index:160; background:rgba(255,255,255,.96); color:var(--navy); border:2px solid var(--gold); border-radius:99px; padding:8px 16px; font-size:14px; font-\77 eight:700; box-shadow:0 8px 24px rgba(0,0,0,.35); cursor:pointer; }
.sndhint[hidden] { display:none; }

/* Live screen on a phone: the "click once for sound" pill gets its own strip at the bottom, so it never covers the next-team card */
@media (max-width:700px) { body.has-sndhint { padding-bottom:64px; } .sndhint { left:12px; right:12px; bottom:10px; text-align:center; } }

/* Team queue drag and drop: a grip on each waiting team, a gold line shows where it will land */
.q-grip { width:28px; height:26px; margin:0; padding:0; border-radius:7px; border:1px solid var(--line); background:#fff; color:#6b7691; display:grid; place-items:center; cursor:grab; touch-action:none; box-shadow:none; }
.q-grip svg { width:16px; height:16px; }
.q-grip:hover { background:var(--gold-soft); border-color:var(--gold); color:var(--navy); }
.q-grip:active { cursor:grabbing; }
.q-row[data-waiting] { transition:box-shadow .12s ease, background .12s ease; }
.q-row.is-dragging { opacity:.55; background:var(--gold-soft); box-shadow:0 8px 22px rgba(17,23,41,.18); }
.q-row.drop-before { box-shadow:inset 0 4px 0 var(--gold); }
.q-row.drop-after { box-shadow:inset 0 -4px 0 var(--gold); }
body.q-dragging { cursor:grabbing; user-select:none; -webkit-user-select:none; }
.q-move { display:inline-flex; flex-direction:row; align-items:center; gap:4px; }
@media (max-width:700px), (pointer:coarse) { .q-grip { width:40px; height:40px; } .q-grip svg { width:20px; height:20px; } }


/* Sound on/off: a small round icon in the bottom corner of the Live Dashboard. The colour never changes, only the icon (speaker / speaker with a slash). */
.sndtog { position:fixed; right:16px; bottom:16px; z-index:165; width:46px; height:46px; margin:0; padding:0; display:grid; place-items:center; border-radius:50%; border:2px solid var(--gold); background:rgba(255,255,255,.96); color:var(--navy); font-size:22px; line-height:1; cursor:pointer; box-shadow:0 8px 24px rgba(0,0,0,.28); min-height:0; }
.sndtog:hover { background:var(--gold-soft); }
.sndtog:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
.sndhint { right:76px; }
@media (max-width:700px) { .sndtog { right:12px; bottom:10px; width:44px; height:44px; } .sndhint { left:12px; right:68px; } }

/* Live Dashboard on a phone: the break screen and the pitch screen stay inside the screen width (nothing runs off to the right).
   Break screen: BREAK on top, then the cup on the left beside the circle timer, then the message. */
@media (max-width:900px) {
  .lmain { grid-template-columns:minmax(0,1fr); }
  .lbreak, body.live .lbreak { display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-areas:"word word" "cup ring" "back back" "lines lines"; column-gap:14px; row-gap:18px; align-items:center; padding:16px 16px 24px; min-width:0; }
  .lbreak > *, .bleft > *, .bmid > * { min-width:0; }
  .bleft, .bmid { display:contents; }
  .bword { grid-area:word; font-size:clamp(40px,16vw,100px); letter-spacing:.08em; text-align:center; overflow-wrap:anywhere; }
  .bleft .cup { grid-area:cup; margin:0; justify-self:center; align-self:center; }
  .bmid .ring { grid-area:ring; width:100%; max-width:260px; height:auto; aspect-ratio:1 / 1; justify-self:center; }
  .ring .digits { font-size:min(11vh,12vw); }
  .bback { grid-area:back; font-size:clamp(20px,6vw,32px); overflow-wrap:anywhere; margin:0; }
  .blines { grid-area:lines; font-size:clamp(17px,5vw,26px); min-height:0; overflow-wrap:anywhere; }
  .blines p { padding:12px 14px; border-left-width:6px; }
}

/* ===== Results page on a phone: smaller headings, one column of cards, room between the message and the list ===== */
@media (max-width:700px) {
  .rscreen { justify-content:flex-start; padding:28px 18px 40px; gap:16px; overflow:visible; }
  .rscreen.wait, .rscreen.k-start, .rscreen.k-closing, .rscreen.k-drum, .rscreen.k-podium { justify-content:center; min-height:80vh; }
  .rscreen h1 { font-size:clamp(28px,9vw,44px); }
  .rscreen.wait h1 { font-size:clamp(28px,8.5vw,40px); }
  .rscreen .rbig { font-size:clamp(20px,6vw,28px); }
  .rmsg { font-size:clamp(16px,4.6vw,20px); line-height:1.4; margin-bottom:6px; }
  .ribbon { font-size:clamp(22px,7vw,32px); padding:8px 18px; }
  .pcard { min-width:0; width:100%; padding:20px 18px; border-left-width:10px; border-radius:18px; text-align:left; }
  .pcard h2 { font-size:clamp(26px,8vw,40px); }
  .pcard .pt { font-size:clamp(16px,4.4vw,20px); margin:6px 0; }
  .pcard .mem { font-size:15px; line-height:1.45; }
  .ogrid { grid-template-columns:1fr; width:100%; gap:10px; margin-top:6px; }
  .ocard { min-height:0; }
  .rbar { padding:10px 12px; gap:8px; } .rb { min-height:44px; }
}
