/* Time It! - game and admin. Palette from hitapps.no / HIT Games: deep indigo, glowing pink / violet / teal / lime / gold. */
:root {
  --bg: #07061a; --bg-2: #0e0c2b;
  --surface: #16143a; --surface-2: #1d1a4a; --surface-3: #262260;
  --line: rgba(160, 150, 255, .18); --line-2: rgba(160, 150, 255, .32);
  --text: #f4f3ff; --muted: #a9a6cf; --faint: #7a77a8;
  --gold: #ffb21a; --orange: #ff7a00; --amber: #ffd34d;
  --violet: #8b5cf6; --lilac: #c4a7ff; --teal: #5eead4; --pink: #f472b6; --lime: #b5e550;
  --ok: #34d399; --bad: #fb7185;
  --grad: linear-gradient(90deg, var(--pink), var(--violet) 55%, var(--teal));
  --radius: 20px;
  --maxw: 1180px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0; min-height: 100vh; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text);
  background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(55% 45% at 10% 5%, rgba(139, 92, 246, .30), transparent 70%),
              radial-gradient(45% 40% at 95% 15%, rgba(244, 114, 182, .16), transparent 70%),
              radial-gradient(50% 50% at 50% 105%, rgba(94, 234, 212, .12), transparent 70%),
              linear-gradient(180deg, var(--bg), var(--bg-2)); }
.bg::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(160, 150, 255, .30) 1.2px, transparent 1.6px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 50% at 0% 100%, #000 10%, transparent 70%); mask-image: radial-gradient(60% 50% at 0% 100%, #000 10%, transparent 70%); }
a { color: var(--lilac); }
h1, h2, h3 { font-family: "Sora", sans-serif; letter-spacing: -.01em; line-height: 1.15; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 16px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(7, 6, 26, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font: 800 1.2rem "Sora", sans-serif; }
.brand b { color: var(--pink); }
.brand-ico { width: 30px; height: 30px; color: var(--teal); filter: drop-shadow(0 0 6px rgba(94, 234, 212, .6)); }
.right { display: flex; align-items: center; gap: 6px; }
.toplink { color: var(--muted); text-decoration: none; font-size: .9rem; padding: 7px 12px; border-radius: 999px; }
.toplink:hover { color: var(--text); background: rgba(139, 92, 246, .18); }
@media (max-width: 560px) { .toplink.dim { display: none; } }
.net { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: rgba(251, 113, 133, .16); color: var(--bad); border: 1px solid rgba(251, 113, 133, .4); }
.net.ok { background: rgba(52, 211, 153, .14); color: var(--ok); border-color: rgba(52, 211, 153, .4); }

/* buttons */
.btn { --glow: var(--violet); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px;
  border-radius: 999px; border: 2px solid var(--glow); background: var(--surface); color: var(--text); font: 600 1rem "Inter", sans-serif;
  cursor: pointer; text-decoration: none; transition: box-shadow .2s, transform .15s, background .2s; box-shadow: 0 0 14px -6px var(--glow); }
.btn:hover { box-shadow: 0 0 24px -4px var(--glow); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.primary { border: 0; color: #1a1033; background: linear-gradient(135deg, #f5d0fe, var(--lilac)); box-shadow: 0 0 26px -6px rgba(244, 114, 182, .8); }
.btn.go { border: 0; color: #062018; background: linear-gradient(135deg, var(--lime), var(--teal)); box-shadow: 0 0 26px -6px rgba(94, 234, 212, .8); }
.btn.pink { --glow: var(--pink); } .btn.teal { --glow: var(--teal); } .btn.lime { --glow: var(--lime); } .btn.gold { --glow: var(--gold); } .btn.danger { --glow: var(--bad); }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; }
.btn.ghost { border-color: var(--line-2); box-shadow: none; }
.btn.block { width: 100%; }
.iconbtn { background: none; border: 1px solid var(--line); color: var(--text); width: 38px; height: 38px; border-radius: 12px; cursor: pointer; font-size: 1.3rem; line-height: 1; }
.iconbtn:hover { border-color: var(--lilac); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.center { justify-content: center; }

/* forms */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg-2); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 11px 14px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
input[type=checkbox] { width: auto; accent-color: var(--violet); }
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; cursor: pointer; }
.err { color: var(--bad); font-size: .9rem; margin: 6px 0; min-height: 1.2em; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1.5px solid var(--line-2); gap: 4px; }
.seg button { border: 0; background: none; color: var(--muted); font: 600 .92rem "Inter", sans-serif; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; box-shadow: 0 0 16px -4px var(--pink); }
.seg button:disabled { cursor: default; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); border: 1.5px solid var(--line-2); border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.stepper b { min-width: 42px; text-align: center; font: 700 1.15rem "Sora", sans-serif; }

/* panels */
.panel { background: rgba(22, 20, 58, .78); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 1.25rem; }
.glowbox { border: 2px solid transparent; background-image: linear-gradient(var(--surface), var(--surface)), linear-gradient(90deg, var(--violet), var(--pink), var(--orange));
  background-origin: border-box; background-clip: padding-box, border-box; box-shadow: 0 0 30px -8px rgba(244, 114, 182, .5), 0 0 60px -24px rgba(139, 92, 246, .7); }

/* home */
.hero { text-align: center; padding: 46px 0 18px; }
.hero h1 { font-size: clamp(2.8rem, 11vw, 5.4rem); margin: 0; letter-spacing: -.04em; line-height: .95; }
.hero h1 .bang { color: var(--pink); text-shadow: 0 0 24px rgba(244, 114, 182, .8); }
.hero .sub { font: 600 clamp(1rem, 3.5vw, 1.35rem) "Sora", sans-serif; color: var(--lilac); margin: 10px 0 8px; letter-spacing: .02em; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.deco-line { position: relative; height: 70px; margin: 26px auto 6px; max-width: 560px; }
.deco-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 18px rgba(139, 92, 246, .8); }
.deco-line span { position: absolute; top: 50%; transform: translate(-50%, -50%); padding: 5px 10px; border-radius: 10px; font: 700 .8rem "Sora", sans-serif;
  background: var(--surface); border: 1.5px solid var(--c, var(--teal)); box-shadow: 0 0 14px -3px var(--c, var(--teal)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -62%); } }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 24px; }
.mygames { margin-top: 18px; }
.mygame { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.mygame:first-of-type { border-top: 0; }

/* category tiles */
.cat-ico { --c1: var(--violet); --c2: var(--teal); width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 16px -4px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .35); position: relative; overflow: hidden; }
.cat-ico::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .35), transparent 45%); }
.cat-ico svg { width: 62%; height: 62%; position: relative; z-index: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.cat-ico.sm { width: 30px; height: 30px; border-radius: 9px; }
.cat-ico.lg { width: 64px; height: 64px; border-radius: 18px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.cat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--bg-2); border: 1.5px solid var(--line);
  cursor: pointer; text-align: left; color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s, opacity .2s; }
.cat:hover:not(:disabled) { border-color: var(--line-2); }
.cat.on { border-color: var(--teal); box-shadow: 0 0 18px -6px var(--teal); background: rgba(94, 234, 212, .07); }
.cat:disabled { cursor: default; }
.cats.ro .cat:not(.on) { opacity: .35; }
.cat b { display: block; font-size: .95rem; }
.cat small { color: var(--muted); font-size: .75rem; }
.cat .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; font-size: .8rem; }
.cat.on .tick { background: var(--teal); border-color: var(--teal); color: #062018; }

/* lobby */
.lobby { display: grid; grid-template-columns: 340px 1fr; gap: 18px; padding: 22px 0 40px; align-items: start; }
@media (max-width: 860px) { .lobby { grid-template-columns: 1fr; } }
.codebox { text-align: center; }
.code { display: flex; justify-content: center; gap: 8px; margin: 8px 0 14px; }
.code span { width: 52px; height: 62px; display: grid; place-items: center; border-radius: 14px; font: 800 2rem "Sora", sans-serif; background: var(--bg-2);
  border: 2px solid var(--pink); box-shadow: 0 0 18px -5px var(--pink); }
.code span:nth-child(2) { border-color: var(--violet); box-shadow: 0 0 18px -5px var(--violet); }
.code span:nth-child(3) { border-color: var(--teal); box-shadow: 0 0 18px -5px var(--teal); }
.code span:nth-child(4) { border-color: var(--lime); box-shadow: 0 0 18px -5px var(--lime); }
.linkbox { font-size: .8rem; color: var(--muted); word-break: break-all; background: var(--bg-2); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; }
.plist .who { flex: 1; min-width: 0; }
.plist .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { --h: 280; width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 .95rem "Sora", sans-serif; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 50) 80% 50%)); position: relative; }
.av.sm { width: 28px; height: 28px; font-size: .75rem; }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--faint); border: 2px solid var(--surface); }
.av .dot.on { background: var(--ok); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--lilac); vertical-align: middle; }
.badge.j { color: var(--lime); border-color: rgba(181, 229, 80, .5); } .badge.v { color: var(--teal); border-color: rgba(94, 234, 212, .5); }
.badge.host { color: var(--gold); border-color: rgba(255, 178, 26, .55); }
.notice { padding: 12px 14px; border-radius: 14px; background: rgba(139, 92, 246, .12); border: 1px solid rgba(139, 92, 246, .35); margin-bottom: 14px; }
.notice.gold { background: rgba(255, 178, 26, .1); border-color: rgba(255, 178, 26, .4); }

/* game */
.game { padding: 16px 0 60px; }
.score { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.chip { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line);
  cursor: pointer; color: var(--text); font: inherit; min-width: 0; }
.chip.turn { border-color: var(--pink); box-shadow: 0 0 18px -4px var(--pink); }
.chip.me { background: var(--surface-2); }
.chip.off { opacity: .55; }
.chip .nm { font-weight: 600; font-size: .88rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .pts { font: 700 .85rem "Sora", sans-serif; color: var(--teal); }
.chip .bar { width: 46px; height: 5px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.chip .bar i { display: block; height: 100%; background: var(--grad); }
.medal { font-size: 1rem; }
.turnline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; }
.turnline h2 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.7rem); }
.turnline .meta { color: var(--muted); font-size: .85rem; }
.stage { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .stage { grid-template-columns: 1fr; } }
.handbox { position: sticky; top: 76px; z-index: 5; }
@media (max-width: 760px) { .handbox { top: 64px; } .card.big { min-height: 0; padding: 12px 14px 14px; } .card.big .tt { font-size: 1.1rem; margin-top: 6px; } .card.big .yr { font-size: 1.25rem; margin-top: 4px; } }
.hint { color: var(--muted); font-size: .85rem; margin-top: 10px; text-align: center; }

/* cards */
.card { --c1: var(--violet); --c2: var(--teal); position: relative; border-radius: 18px; padding: 14px 14px 16px; background: var(--surface); color: var(--text);
  border: 2px solid transparent; background-image: linear-gradient(var(--surface), var(--surface)), linear-gradient(135deg, var(--c1), var(--c2));
  background-origin: border-box; background-clip: padding-box, border-box; box-shadow: 0 0 22px -8px var(--c1); user-select: none; -webkit-user-select: none; }
.card .ch { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; min-width: 0; }
.card .ch span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .tt { font: 700 1.05rem/1.3 "Sora", sans-serif; margin-top: 10px; }
.card .yr { font: 800 1.5rem "Sora", sans-serif; margin-top: 8px; }
.card.big { padding: 18px 18px 20px; min-height: 170px; }
.card.big .tt { font-size: 1.25rem; }
.card.big .yr.q { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .1em; }
.card.drag { cursor: grab; touch-action: none; }
.card.drag:active { cursor: grabbing; }
.card.lifted { opacity: .25; }
.drag-ghost { position: fixed; z-index: 100; pointer-events: none; width: 260px; transform: rotate(-3deg) scale(1.03); box-shadow: 0 20px 50px rgba(0, 0, 0, .55), 0 0 30px -6px var(--pink); }

/* timeline */
.tlhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tlhead h3 { margin: 0; font-size: 1.05rem; }
.timeline { position: relative; display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 14px 6px 18px; scroll-behavior: smooth; scrollbar-width: thin; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: var(--grad); opacity: .7; border-radius: 3px; box-shadow: 0 0 14px rgba(139, 92, 246, .7); }
.tcard { position: relative; flex: none; width: 168px; padding: 11px 12px; z-index: 1; }
.tcard .tt { font-size: .86rem; margin-top: 6px; }
.tcard .yr { font-size: 1.2rem; margin-top: 4px; }
.tcard.tent { border-style: dashed; animation: pulse 1.6s ease-in-out infinite; }
.tcard.good { box-shadow: 0 0 26px -2px var(--ok); }
.tcard.bad { box-shadow: 0 0 26px -2px var(--bad); }
@keyframes pulse { 50% { box-shadow: 0 0 28px -2px var(--pink); } }
.slot { position: relative; z-index: 2; flex: none; width: 22px; align-self: stretch; display: grid; place-items: center; border-radius: 12px; transition: width .18s, background .18s; }
.slot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); }
.slot.live { cursor: pointer; }
.slot.live::after { border-color: var(--lilac); }
.slot.hot { width: 72px; background: rgba(244, 114, 182, .14); outline: 2px dashed var(--pink); }
.slot.hot::after { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 12px var(--pink); }
.dragging .slot.live { width: 40px; }
.tl-empty { color: var(--muted); padding: 20px; }
@media (max-width: 760px) {
  .timeline { flex-direction: column; overflow-x: visible; padding: 6px 0 6px 26px; }
  .timeline::before { left: 11px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .tcard { width: 100%; }
  .slot { width: auto; height: 18px; align-self: auto; margin-left: -26px; justify-items: start; padding-left: 5px; }
  .slot.hot, .dragging .slot.live { width: auto; height: 46px; }
  .dragging .slot.hot { height: 70px; }
}
.confirm { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

/* result flash */
.flash { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.flash .fbox { pointer-events: auto; text-align: center; padding: 26px 30px; border-radius: 26px; background: rgba(14, 12, 43, .94); border: 2px solid var(--ok);
  box-shadow: 0 0 60px -10px var(--ok); max-width: min(420px, 92vw); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.flash .fbox.bad { border-color: var(--bad); box-shadow: 0 0 60px -10px var(--bad); }
.flash .big { font: 800 2.6rem "Sora", sans-serif; }
.flash .fbox .yr { font: 800 2.2rem "Sora", sans-serif; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* finished */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 26px 0 10px; }
.pod { text-align: center; width: 120px; }
.pod .step { margin-top: 8px; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; font: 800 2rem "Sora", sans-serif; }
.pod.p1 .step { height: 130px; background: linear-gradient(180deg, var(--gold), rgba(255, 122, 0, .35)); box-shadow: 0 0 40px -8px var(--gold); }
.pod.p2 .step { height: 95px; background: linear-gradient(180deg, #e2e8f0, rgba(148, 163, 184, .3)); }
.pod.p3 .step { height: 70px; background: linear-gradient(180deg, #fb923c, rgba(180, 83, 9, .35)); }
.pod .av { margin: 0 auto 6px; width: 54px; height: 54px; font-size: 1.2rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* modal / toast */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(4, 3, 16, .7); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); }
.mbox { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.mbox.wide { width: min(900px, 100%); }
.mhead { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; gap: 10px; }
.mhead h3 { margin: 0; }
.mbody { padding: 14px 18px; }
.mfoot { padding: 0 18px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80; background: var(--surface-3); border: 1px solid var(--line-2); padding: 11px 18px;
  border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 92vw; }
.toast.bad { border-color: var(--bad); }

.rules { max-width: 760px; margin: 0 auto; padding: 26px 0 50px; }
.rules li { margin-bottom: 8px; }

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: .92rem; }
.tabs a.on { color: var(--text); border-color: var(--violet); background: rgba(139, 92, 246, .18); box-shadow: 0 0 14px -6px var(--violet); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; background: var(--surface); }
table.t tr.off td { opacity: .45; }
table.t tbody tr:hover td { background: rgba(139, 92, 246, .06); }
.tablewrap { overflow: auto; max-height: 70vh; border-radius: 14px; border: 1px solid var(--line); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.kpi b { display: block; font: 800 1.7rem "Sora", sans-serif; }
.kpi span { color: var(--muted); font-size: .82rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; min-width: 4px; background: var(--grad); border-radius: 4px 4px 0 0; position: relative; }
.hbar { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: .88rem; }
.hbar .lbl { width: 190px; flex: none; display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hbar .trk { flex: 1; height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.hbar .trk i { display: block; height: 100%; background: var(--grad); }
.hbar .val { width: 60px; text-align: right; color: var(--muted); }
.lv { font-weight: 700; font-size: .75rem; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-2); }
.lv.J { color: var(--lime); } .lv.V { color: var(--teal); } .lv.A { color: var(--lilac); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .hbar .lbl { width: 130px; } }
.codes { columns: 2; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; }
.authbox { max-width: 420px; margin: 50px auto; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 1.1: countdown, shared cards, sudden death */
.timer { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--bg-2); border: 2px solid var(--teal); box-shadow: 0 0 16px -4px var(--teal); }
.timer b { min-width: 2.2ch; text-align: center; font: 800 1.5rem/1 "Sora", sans-serif; color: var(--teal); }
.timer .tbar { width: 90px; height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.timer .tbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--lime)); transition: width .25s linear; }
.timer.urgent { border-color: var(--bad); box-shadow: 0 0 22px -2px var(--bad); animation: tick 1s ease-in-out infinite; }
.timer.urgent b { color: var(--bad); }
.timer.urgent .tbar i { background: var(--bad); }
.timer.out { opacity: .6; animation: none; }
@keyframes tick { 50% { transform: scale(1.06); } }
.chip .ans { font-weight: 800; color: var(--faint); }
.chip .ans.ok { color: var(--ok); }
.chip.sdp { border-color: var(--gold); box-shadow: 0 0 18px -4px var(--gold); }
.tcard.locked { animation: none; border-style: solid; box-shadow: 0 0 20px -4px var(--lilac); }
.reslist { list-style: none; padding: 0; margin: 12px auto 0; text-align: left; max-width: 300px; }
.reslist li { display: flex; justify-content: space-between; gap: 14px; padding: 5px 10px; border-radius: 10px; }
.reslist li.ok span:first-child { color: var(--ok); }
.reslist li.bad span:first-child { color: var(--bad); }
.reslist li.me { background: rgba(139, 92, 246, .18); }
.reslist li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.flash .fbox.sd { border-color: var(--gold); box-shadow: 0 0 80px -6px var(--gold), 0 0 40px -10px var(--pink); }
.flash .fbox.sd .big { background: linear-gradient(90deg, var(--gold), var(--pink), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1), shake .5s .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
