/* ==========================================================================
   Tappoo 2.0 – moderní vzhled (vrstva nad app.css)
   Noční asfalt, dopravní žlutá, skleněné panely, gradientní odpovědi A–D.
   Pozor: backdrop-filter jen na „listových“ prvcích – na předkovi by rozbil position: fixed potomků.
   ========================================================================== */
@font-face { font-family: 'Jakarta'; src: url('/fonts/jakarta-latin-ext.woff2') format('woff2'); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Jakarta'; src: url('/fonts/jakarta-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --purple: #121a22;
  --purple-2: #0b1015;
  --signal: #ffc61a;
  --signal-2: #ff9d0a;
  --a0: #0fb5ae; --a1: #ff7a2f; --a2: #3b82f6; --a3: #f43f5e;
  --g0: linear-gradient(135deg, #19d3c5 0%, #0b8f89 100%);
  --g1: linear-gradient(135deg, #ff9a4d 0%, #e8590c 100%);
  --g2: linear-gradient(135deg, #5b9bff 0%, #1d4ed8 100%);
  --g3: linear-gradient(135deg, #ff6b81 0%, #be123c 100%);
  --gsig: linear-gradient(135deg, #ffd84d 0%, #ffb000 100%);
  --ok: #16a34a; --bad: #e11d48; --green: #16a34a; --red: #e11d48;
  --ink: #0f172a; --muted: #64748b; --line: #e5e9f0; --bg: #f4f6fb; --accent: #0f172a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .08), 0 18px 48px rgba(15, 23, 42, .16);
  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .12);
  --glass-line: rgba(255, 255, 255, .12);
  font-family: 'Jakarta', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -.005em; }
h1, h2, h3, .logo, .btn, .tile, .pin, .h-title, .pod-title { letter-spacing: -.02em; }
::selection { background: var(--signal); color: #111; }

/* ---------- tlačítka a formuláře ---------- */
.btn {
  border-radius: 12px; padding: 10px 18px; font-weight: 700; background: #fff; color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08), inset 0 0 0 1px rgba(15, 23, 42, .08);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15, 23, 42, .14), inset 0 0 0 1px rgba(15, 23, 42, .08); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.btn.primary { background: var(--gsig); color: #1a1405; box-shadow: 0 6px 20px rgba(255, 176, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.04); box-shadow: 0 10px 28px rgba(255, 176, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.dark { background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .3); }
.btn.green { background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; box-shadow: 0 6px 18px rgba(22, 163, 74, .3); }
.btn.danger { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; box-shadow: 0 6px 18px rgba(225, 29, 72, .3); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.big { border-radius: 14px; padding: 15px 28px; }
.input, select.input, textarea.input { border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: #f5b400; box-shadow: 0 0 0 4px rgba(255, 198, 26, .25); }
.check input { accent-color: #f5a400; }

/* ---------- logo ---------- */
.logo { font-weight: 800; letter-spacing: -.04em; }

/* ---------- herní motiv: noční asfalt se světly ---------- */
body.game {
  background-color: #0b1015;
  background-image:
    radial-gradient(900px 600px at 0% -10%, rgba(255, 198, 26, .16), transparent 60%),
    radial-gradient(800px 700px at 110% 110%, rgba(25, 211, 197, .13), transparent 60%),
    radial-gradient(600px 400px at 80% 0%, rgba(59, 130, 246, .10), transparent 60%),
    radial-gradient(rgba(255, 255, 255, .03) 1px, transparent 1.4px),
    linear-gradient(180deg, #111a22 0%, #0a0f14 100%);
  background-size: auto, auto, auto, 6px 6px, auto;
  background-attachment: fixed;
}
body.game::before { height: 4px; background: repeating-linear-gradient(-45deg, var(--signal) 0 12px, #0b1015 12px 24px); box-shadow: 0 0 18px rgba(255, 198, 26, .45); }
.card { border-radius: 20px; box-shadow: var(--shadow-lg); }

/* připojení */
.join-box { max-width: 380px; margin-top: 10vh; }
.join-box .logo { font-size: 52px; filter: drop-shadow(0 8px 30px rgba(255, 198, 26, .25)); }
.join-box > p { color: rgba(255, 255, 255, .78); font-weight: 600; }
.join-box .card { background: rgba(255, 255, 255, .96); padding: 18px; gap: 12px; }
.join-box .input { border-radius: 14px; font-size: 24px; padding: 14px; letter-spacing: .08em; background: #f8fafc; }

/* odpovědi A–D */
.tile {
  border-radius: 18px; font-weight: 800; box-shadow: 0 10px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; overflow: hidden; isolation: isolate;
}
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%); pointer-events: none; }
button.tile:hover { transform: translateY(-2px) scale(1.01); filter: brightness(1.06); box-shadow: 0 16px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .3); }
button.tile:active { transform: scale(.98); }
.tile.c0 { background: var(--g0); } .tile.c1 { background: var(--g1); }
.tile.c2 { background: var(--g2); } .tile.c3 { background: var(--g3); }
.tile.selected { outline: 4px solid #fff; outline-offset: -4px; box-shadow: 0 0 0 4px var(--signal), 0 16px 34px rgba(0, 0, 0, .34); }
.shape.lt { border-radius: 12px; background: rgba(255, 255, 255, .95); color: #0f172a; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }

/* mobil hráče */
.p-top { background: rgba(10, 15, 20, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--glass-line); padding: 12px 14px 10px; }
.p-top .pill { background: var(--gsig); color: #1a1405; font-weight: 800; padding: 3px 12px; box-shadow: 0 4px 12px rgba(255, 176, 0, .3); }
.p-bottom { background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); height: 54px; border-top: 1px solid rgba(15, 23, 42, .06); box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
.p-bottom .score { background: linear-gradient(135deg, #1e293b, #0f172a); color: var(--signal); border-radius: 10px; padding: 4px 14px; font-variant-numeric: tabular-nums; }
.p-q-text { font-size: 21px; line-height: 1.3; }
.p-q-text:not(.compact) { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; padding: 14px 16px; }
.timer-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.timer-bar > div { background: var(--gsig); border-radius: 99px; box-shadow: 0 0 12px rgba(255, 198, 26, .6); }
.spinner { border-color: rgba(255, 255, 255, .12); border-top-color: var(--signal); }
.points-badge { background: var(--gsig); color: #1a1405; border-radius: 14px; box-shadow: 0 8px 24px rgba(255, 176, 0, .35); }
.type-badge { background: var(--glass-2); color: var(--signal); border: 1px solid rgba(255, 198, 26, .45); border-radius: 99px; padding: 8px 22px; }
.result-ok { background: radial-gradient(800px 500px at 50% 0%, #22c55e, #0f5132) !important; }
.result-bad { background: radial-gradient(800px 500px at 50% 0%, #fb7185, #7f1d1d) !important; }
.result-part { background: radial-gradient(800px 500px at 50% 0%, #fbbf24, #7c4a03) !important; }
.order-item, .match-row { border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.slider-box { border-radius: 20px; box-shadow: var(--shadow-lg); }
.stage > img { border-radius: 14px; }
.a11y-btn { border-radius: 10px; background: var(--glass-2); border-color: var(--glass-line); }

/* ---------- plátno ---------- */
.h-bar { padding: 14px 24px; }
.h-count { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 12px; }
.h-bar .btn.small { background: var(--glass); color: #fff; box-shadow: inset 0 0 0 1px var(--glass-line); }
.h-bar .btn.small:hover { background: var(--glass-2); }
.h-lobby-top { padding: 28px 20px 10px; gap: 22px; }
.h-lobby-top .logo { font-size: 46px; filter: drop-shadow(0 8px 30px rgba(255, 198, 26, .25)); }
.h-join { border-top: 0; border-radius: 24px; padding: 18px 30px; background: rgba(255, 255, 255, .97); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .5); position: relative; overflow: hidden; }
.h-join::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--gsig); }
.h-join .pin { font-size: 84px; font-weight: 800; letter-spacing: .06em; background: linear-gradient(135deg, #0f172a, #334155); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-join .qr { border-radius: 12px; }
.h-name { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 99px; padding: 10px 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.h-name:hover { background: rgba(255, 198, 26, .18); border-color: rgba(255, 198, 26, .5); }

.h-qtext { margin: 6px 24px 0; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); background: rgba(255, 255, 255, .97); padding: 20px 32px; line-height: 1.25; }
.h-timer { background: radial-gradient(circle at 30% 30%, #1e293b, #0b1015); border: 0; box-shadow: 0 0 0 6px rgba(255, 198, 26, .9), 0 0 40px rgba(255, 198, 26, .45); }
.h-answered b { background: var(--gsig); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-intro .qt { line-height: 1.15; text-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.intro-bar { height: 10px; background: rgba(255, 255, 255, .1); }
.intro-bar > div { background: var(--gsig); box-shadow: 0 0 16px rgba(255, 198, 26, .7); }
.bars .bar .fill { border-radius: 12px 12px 0 0; }
.bars .bar .lbl { border-radius: 0 0 12px 12px; }
.bar:nth-child(1) .fill, .bar:nth-child(1) .lbl { background: var(--g0) !important; }
.bar:nth-child(2) .fill, .bar:nth-child(2) .lbl { background: var(--g1) !important; }
.bar:nth-child(3) .fill, .bar:nth-child(3) .lbl { background: var(--g2) !important; }
.bar:nth-child(4) .fill, .bar:nth-child(4) .lbl { background: var(--g3) !important; }
.explain { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px; }
.explain b { color: var(--signal); }
.h-title { font-weight: 800; }
.board .line { background: var(--glass); color: #fff; border: 1px solid var(--glass-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.board .line:nth-child(1) { background: linear-gradient(90deg, rgba(255, 198, 26, .28), rgba(255, 198, 26, .06)); border-color: rgba(255, 198, 26, .55); }
.board .line .up { color: #4ade80; }
.board .line .pts { font-variant-numeric: tabular-nums; }
.board-note { opacity: .7; }

/* ---------- administrace ---------- */
body.admin { background: radial-gradient(1200px 500px at 100% -10%, rgba(255, 198, 26, .12), transparent 60%), var(--bg); }
.a-top { background: rgba(11, 16, 21, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .18); padding: 12px 22px; }
.a-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--gsig); }
.a-top .logo { font-size: 24px; background: var(--gsig); -webkit-background-clip: text; background-clip: text; color: transparent; }
.a-top nav a { border-radius: 10px; font-weight: 600; opacity: .75; transition: background .15s, opacity .15s; }
.a-top nav a.active { background: rgba(255, 198, 26, .16); color: var(--signal); opacity: 1; }
.a-top nav a:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.a-main h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.panel, .stat, table.t, .modal { border-radius: 20px; box-shadow: var(--shadow); border: 1px solid rgba(15, 23, 42, .05); }
.modal { box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.modal-bg { background: rgba(11, 16, 21, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.quiz-card { border-radius: 20px; box-shadow: var(--shadow); border: 1px solid rgba(15, 23, 42, .05); transition: transform .2s ease, box-shadow .2s ease; }
.quiz-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quiz-card .cover {
  height: 128px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 198, 26, .9) 49% 51%, transparent 51%) 0 0 / 100% 36px repeat-y,
    radial-gradient(300px 140px at 0% 0%, rgba(255, 198, 26, .35), transparent 70%),
    radial-gradient(300px 140px at 100% 100%, rgba(25, 211, 197, .3), transparent 70%),
    linear-gradient(135deg, #1e293b, #0b1015);
}
.quiz-card h3 { font-weight: 800; }
.tag { border-radius: 99px; padding: 3px 10px; }
.tabs button { border-radius: 99px; padding: 8px 16px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; transition: background .15s; }
.tabs button.active { background: #0f172a; color: var(--signal); box-shadow: 0 6px 16px rgba(15, 23, 42, .25); }
table.t th { background: #f8fafc; text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; }
table.t tr.click:hover td { background: #fffbeb; }
.stat b { font-weight: 800; font-size: 32px; letter-spacing: -.03em; }
.q-item { border-radius: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); border: 1.5px solid transparent; transition: border-color .15s, box-shadow .15s; }
.q-item.active { border-color: #f5b400; box-shadow: 0 0 0 4px rgba(255, 198, 26, .18); }
.type-picker button { border-radius: 14px; border: 1.5px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s; }
.type-picker button:hover { border-color: #f5b400; transform: translateY(-2px); box-shadow: var(--shadow); }
.toast { border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.nq-item { border-radius: 14px; border-width: 1.5px; transition: transform .15s, border-color .15s; }
.nq-item:hover { border-color: #f5b400; transform: translateY(-1px); }

/* vyhlášení a karty z nových funkcí */
.ef-box { border-top: 0; position: relative; overflow: hidden; border-radius: 26px; }
.ef-box::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--gsig); }
.kc-item { border-radius: 16px; border-width: 1px; border-left-width: 6px; box-shadow: var(--shadow); }
.kc-stats > div { border-radius: 14px; background: linear-gradient(180deg, #fff, #f1f5f9); border: 1px solid var(--line); }
.drive-wrap, .police-fig, .police-card { box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.lvl { background: var(--glass); border: 1px solid var(--glass-line); }
.rm-status { border-radius: 20px; background: linear-gradient(135deg, #1e293b, #0b1015); box-shadow: var(--shadow-lg); }

@media (prefers-reduced-motion: reduce) {
  .btn, .tile, .quiz-card, .type-picker button, .nq-item { transition: none; }
}

/* doladění: hlavní akce na tmavých obrazovkách = žlutá, kód hry s rozestupy, popisy kvízů zkrácené */
body.game .btn.big.dark, body.game #start, .h-footer .btn.big:not(.ghost):not(.danger) {
  background: var(--gsig); color: #1a1405; box-shadow: 0 8px 24px rgba(255, 176, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
body.game #start:disabled { background: var(--glass-2); color: rgba(255, 255, 255, .6); box-shadow: none; }
.join-box .input { letter-spacing: 0; }
.join-box .input[inputmode=numeric] { letter-spacing: .2em; }
.h-footer .btn.ghost { color: #fff !important; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); background: transparent; }
.quiz-card .body p, .quiz-card .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tie-chip, .streak-chip { border-radius: 99px; }

/* ==========================================================================
   Tappoo 2.1 – víc pohybu a hloubky
   ========================================================================== */
/* pohyblivé pozadí: světla projíždějících aut (jen dekorace, pod obsahem) */
body.game::after {
  content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none; opacity: .55;
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(255, 198, 26, .07) 48%, transparent 50%) 0 0 / 900px 900px,
    linear-gradient(115deg, transparent 0 46%, rgba(25, 211, 197, .06) 48%, transparent 50%) 300px 200px / 1300px 1300px;
  animation: tp-drift 26s linear infinite;
}
@keyframes tp-drift { to { background-position: 900px 900px, 1600px 1500px; } }

/* avatar */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 800; letter-spacing: -.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 4px 12px rgba(0, 0, 0, .3); }
.h-name { display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; }
.board .line .avatar { margin-right: -2px; }
.p-bottom .me { display: inline-flex; align-items: center; gap: 10px; }
.p-bottom .me .avatar { box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0, 0, 0, .2); }

/* kruhový časovač */
.h-timer { --p: 360deg; position: relative; background: transparent; box-shadow: 0 0 40px rgba(255, 198, 26, .35); color: #fff; }
.h-timer::before { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: -1;
  background: conic-gradient(#ffc61a var(--p), rgba(255, 255, 255, .12) 0); transition: background .2s linear; }
.h-timer::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; z-index: -1; background: radial-gradient(circle at 30% 30%, #1e293b, #0b1015); }
.h-timer { isolation: isolate; }
.h-timer.extra::before { background: conic-gradient(#19d3c5 var(--p), rgba(255, 255, 255, .12) 0); }

/* čekárna */
.h-waiting { display: grid; justify-items: center; gap: 10px; }
.h-waiting small { font-size: 18px; font-weight: 600; opacity: .7; }
.hw-ring { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; background: var(--glass); border: 1px solid var(--glass-line);
  box-shadow: 0 0 0 0 rgba(255, 198, 26, .5); animation: tp-ping 2s ease-out infinite; }
@keyframes tp-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 198, 26, .45); } 100% { box-shadow: 0 0 0 36px rgba(255, 198, 26, 0); } }
.h-names { gap: 14px; padding: 26px 40px; }

/* výsledek na mobilu */
.result-card h1 { font-size: 40px; letter-spacing: -.03em; text-shadow: 0 6px 30px rgba(0, 0, 0, .3); }
.big-emoji.pop { animation: tp-pop .55s cubic-bezier(.2, 1.6, .4, 1) both; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .35)); font-size: 96px; }
@keyframes tp-pop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.result-card .explain { text-align: left; }

/* společná křižovatka: vozidla */
.veh-body { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.kx-blue { animation: tp-blue .5s steps(2) infinite; }
@keyframes tp-blue { 50% { fill: #ff1744; } }

/* administrace: úvodní panel knihovny */
.lib-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 26px 28px; margin-bottom: 20px; color: #fff;
  background: radial-gradient(500px 220px at 0% 0%, rgba(255, 198, 26, .35), transparent 70%), radial-gradient(500px 260px at 100% 100%, rgba(25, 211, 197, .28), transparent 70%), linear-gradient(135deg, #1e293b, #0b1015);
  box-shadow: var(--shadow-lg); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.lib-hero::after { content: ''; position: absolute; right: -40px; top: 0; bottom: 0; width: 260px; opacity: .25;
  background: linear-gradient(90deg, transparent 47%, #ffc61a 47% 53%, transparent 53%) 0 0 / 100% 46px repeat-y; transform: skewX(-18deg); }
.lib-hero h1 { margin: 0 0 4px !important; font-size: 34px !important; }
.lib-hero p { margin: 0; opacity: .8; }
.lib-hero .hero-stats { display: flex; gap: 12px; margin-left: auto; position: relative; z-index: 1; flex-wrap: wrap; }
.lib-hero .hs { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 10px 16px; min-width: 110px; }
.lib-hero .hs b { display: block; font-size: 28px; font-weight: 800; color: var(--signal); letter-spacing: -.03em; }
.lib-hero .hs span { font-size: 13px; opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  body.game::after, .hw-ring, .big-emoji.pop, .kx-blue { animation: none; }
}

/* ==========================================================================
   Tappoo 3.0 – aurora, 3D silnice, světelné okraje, lesk
   ========================================================================== */
@property --tp-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* aurora: pomalu plující barevná světla + jemný šum */
body.game::after {
  inset: -30%; opacity: 1; filter: blur(60px) saturate(1.2);
  background:
    radial-gradient(28% 32% at 20% 25%, rgba(255, 198, 26, .22), transparent 70%),
    radial-gradient(30% 34% at 80% 70%, rgba(25, 211, 197, .20), transparent 70%),
    radial-gradient(26% 30% at 70% 15%, rgba(59, 130, 246, .18), transparent 70%),
    radial-gradient(24% 28% at 25% 85%, rgba(244, 63, 94, .12), transparent 70%);
  background-size: 100% 100%; background-repeat: no-repeat;
  animation: tp-aurora 22s ease-in-out infinite alternate;
}
@keyframes tp-aurora {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-4%, 3%, 0) rotate(-6deg) scale(1.02); }
}
html:has(body.game)::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app { position: relative; z-index: 1; }

/* 3D silnice v perspektivě */
.road3d { position: fixed; left: 0; right: 0; bottom: 0; height: 34vh; z-index: 0; pointer-events: none; perspective: 420px; perspective-origin: 50% 0%; overflow: hidden; }
.road3d.join { height: 30vh; }
.r3-plane { position: absolute; left: 50%; bottom: -10vh; width: 70vw; min-width: 520px; height: 120vh; transform: translateX(-50%) rotateX(72deg); transform-origin: 50% 100%;
  background: linear-gradient(180deg, #2a3440, #151b22); border-left: 6px solid rgba(255, 255, 255, .35); border-right: 6px solid rgba(255, 255, 255, .35);
  box-shadow: 0 0 120px rgba(255, 198, 26, .15); }
.r3-dash { position: absolute; left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, #ffc61a 0 70px, transparent 70px 150px); animation: tp-road .9s linear infinite; box-shadow: 0 0 18px rgba(255, 198, 26, .6); }
@keyframes tp-road { to { background-position: 0 150px; } }
.r3-edge { position: absolute; top: 0; bottom: 0; width: 4px; background: repeating-linear-gradient(180deg, #fff 0 40px, transparent 40px 60px); opacity: .5; animation: tp-road .9s linear infinite; }
.r3-edge.l { left: 18%; } .r3-edge.r { right: 18%; }
.r3-light { position: absolute; width: 60px; height: 60px; border-radius: 50%; filter: blur(8px); }
.r3-light.a { left: 30%; background: radial-gradient(#fff6c2, rgba(255, 198, 26, 0) 70%); animation: tp-car 3.4s linear infinite; }
.r3-light.b { right: 28%; background: radial-gradient(#ffd0d0, rgba(255, 60, 60, 0) 70%); animation: tp-car 4.6s linear infinite reverse; }
@keyframes tp-car { from { top: -10%; } to { top: 105%; } }
.r3-fade { display: none; }
/* vzdálený konec silnice se rozplyne do pozadí (bez ostré hrany) */
.road3d { height: 44vh; }
/* rozplynutí řešíme na samotné rovině silnice (maska na předkovi s 3D potomkem se nepoužije) */
/* mlha nad koncem silnice: jen eliptická skvrna uprostřed, takže nevznikne pruh přes celou šířku */
.road3d .r3-fade { display: block; position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(ellipse 34% 42% at 50% 12%, #0c1117 0%, #0c1117 45%, rgba(12, 17, 23, .6) 70%, rgba(12, 17, 23, 0) 100%); }
.road3d.join { height: 38vh; }
.join-box { position: relative; z-index: 2; }

/* otázka na plátně: rotující světelný okraj */
.h-qtext {
  border: 3px solid transparent;
  background: linear-gradient(#ffffff, #f8fafc) padding-box, conic-gradient(from var(--tp-a), #ffc61a, #19d3c5, #3b82f6, #f43f5e, #ffc61a) border-box;
  animation: tp-spin 6s linear infinite;
}
@keyframes tp-spin { to { --tp-a: 360deg; } }

/* odpovědi: lesk, který přejede přes dlaždici */
.tile::before { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg); animation: tp-shine 4.5s ease-in-out infinite; }
.tiles .tile:nth-child(2)::before { animation-delay: .35s; } .tiles .tile:nth-child(3)::before { animation-delay: .7s; } .tiles .tile:nth-child(4)::before { animation-delay: 1.05s; }
@keyframes tp-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.tile > * { position: relative; z-index: 1; }
.p-main .tile { animation: tp-rise .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.p-main .tile:nth-child(2) { animation-delay: .06s; } .p-main .tile:nth-child(3) { animation-delay: .12s; } .p-main .tile:nth-child(4) { animation-delay: .18s; }
@keyframes tp-rise { from { transform: translateY(18px) scale(.96); opacity: 0; } }
.tile.dim { filter: grayscale(.8); }
.p-main .tile .shape { width: 52px; height: 52px; font-size: 28px; border-radius: 16px; }

/* úvod otázky: velké číslo */
.intro-num { display: flex; align-items: baseline; gap: 10px; line-height: .9; animation: tp-pop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.intro-num span { font-size: clamp(110px, 16vw, 220px); font-weight: 800; letter-spacing: -.06em;
  background: var(--gsig); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 12px 40px rgba(255, 176, 0, .35)); }
.intro-num small { font-size: clamp(26px, 3vw, 44px); font-weight: 800; color: rgba(255, 255, 255, .45); }
.intro-num.small span { font-size: 96px; }
.intro-num.small small { font-size: 26px; }
.type-badge { animation: tp-rise .5s .1s both; }
.h-intro .qt { animation: tp-rise .6s .2s both; }

/* plátno: pořadí, nadpisy, čekárna */
.h-count { font-variant-numeric: tabular-nums; }
.board .line:nth-child(1) .avatar { box-shadow: 0 0 0 3px #ffc61a, 0 0 22px rgba(255, 198, 26, .7); }
.h-title { background: linear-gradient(180deg, #fff, #cbd5e1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-join .pin { font-variant-numeric: tabular-nums; }
.h-lobby-top .logo .mark { animation: tp-float 4s ease-in-out infinite; }
@keyframes tp-float { 50% { transform: translateY(-6px) rotate(6deg); } }
.h-names, .h-lobby-top, .h-bar { position: relative; z-index: 2; }

/* mobil: připojovací karta se světelným okrajem */
.join-box .card { border: 2px solid transparent; background: linear-gradient(rgba(255, 255, 255, .97), rgba(255, 255, 255, .97)) padding-box, conic-gradient(from var(--tp-a), #ffc61a, #19d3c5, #3b82f6, #ffc61a) border-box; animation: tp-spin 7s linear infinite; }
.join-box .logo .mark { animation: tp-float 4s ease-in-out infinite; }
.join-box .btn.big { width: 100%; justify-content: center; }

/* administrace: plovoucí navigace, světelné karty */
.a-top { margin: 12px auto 0; max-width: 1240px; border-radius: 20px; top: 12px; }
.a-top::after { left: 24px; right: 24px; bottom: 0; height: 2px; border-radius: 2px; opacity: .8; }
.a-main { padding-top: 28px; }
.quiz-card { position: relative; }
.quiz-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: conic-gradient(from var(--tp-a), #ffc61a, #19d3c5, #3b82f6, #ffc61a); animation: tp-spin 5s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.quiz-card:hover::before { opacity: 1; }
.quiz-card:hover { box-shadow: 0 20px 50px rgba(15, 23, 42, .18); }
.lib-hero { animation: tp-rise .5s both; }
.quiz-grid .quiz-card { animation: tp-rise .45s both; }
.quiz-grid .quiz-card:nth-child(2) { animation-delay: .04s; } .quiz-grid .quiz-card:nth-child(3) { animation-delay: .08s; } .quiz-grid .quiz-card:nth-child(4) { animation-delay: .12s; }
.quiz-grid .quiz-card:nth-child(n+5) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  body.game::after, .r3-dash, .r3-edge, .r3-light, .h-qtext, .tile::before, .p-main .tile, .intro-num, .type-badge, .h-intro .qt,
  .h-lobby-top .logo .mark, .join-box .card, .join-box .logo .mark, .quiz-card::before, .lib-hero, .quiz-grid .quiz-card { animation: none !important; }
}
@media print { .road3d { display: none !important; } }

/* ==========================================================================
   Tappoo 3.1 – auto na silnici, měřič odpovědí, pruhy bodů, radar, světelný bod
   ========================================================================== */
/* naše auto na 3D silnici */
.r3-car { position: absolute; left: 52.5%; bottom: 3vh; width: clamp(130px, 14vw, 210px); z-index: 3; transform: translateX(-10%);
  animation: tp-sway 3.2s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }
.road3d.join .r3-car { width: 110px; bottom: 2vh; left: 53%; }
.r3-car svg { display: block; width: 100%; height: auto; }
.r3-car::before { content: ''; position: absolute; left: 50%; top: -160%; width: 160%; height: 230%; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(ellipse 30% 40% at 50% 62%, rgba(255, 244, 200, .24), rgba(255, 244, 200, 0) 100%); }
.r3-car .tail { animation: tp-brake 5s ease-in-out infinite; }
@keyframes tp-sway { 0%, 100% { transform: translateX(0) rotate(-.6deg); } 50% { transform: translateX(6%) translateY(-3px) rotate(.6deg); } }
@keyframes tp-brake { 0%, 80%, 100% { fill: #b91c1c; } 85%, 95% { fill: #ff4d4d; filter: drop-shadow(0 0 8px #ff2d2d); } }

/* plátno: kolik hráčů už odpovědělo – kruhový měřič */
.h-answered { --p: 0deg; position: relative; width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; display: grid; place-content: center; isolation: isolate; font-size: 15px; }
.h-answered::before { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: -1; background: conic-gradient(#19d3c5 var(--p), rgba(255, 255, 255, .1) 0); transition: background .4s; }
.h-answered::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; z-index: -1; background: radial-gradient(circle at 30% 30%, #1e293b, #0b1015); }
.h-answered b { font-size: 46px; line-height: 1; background: linear-gradient(180deg, #5eead4, #19d3c5); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* průběžné pořadí: pruh podle bodů */
.board .line { position: relative; overflow: hidden; isolation: isolate; }
.board .line::before { content: ''; position: absolute; inset: 0; width: var(--w, 0%); z-index: -1; border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 198, 26, .22), rgba(25, 211, 197, .12)); animation: tp-grow-w .9s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes tp-grow-w { from { width: 0; } }
.board .line:nth-child(1)::before { background: linear-gradient(90deg, rgba(255, 198, 26, .45), rgba(255, 198, 26, .12)); }

/* mobil: radar po odeslání odpovědi */
.radar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 198, 26, .7); animation: tp-radar 2.4s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: .8s; } .radar i:nth-child(3) { animation-delay: 1.6s; }
.radar span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 800; color: #1a1405; background: var(--gsig); box-shadow: 0 10px 30px rgba(255, 176, 0, .45); }
@keyframes tp-radar { from { transform: scale(.45); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* světelný bod pod prstem / myší */
.tile, .quiz-card, .nq-item { --mx: -200px; --my: -200px; }
.tile::after { background: radial-gradient(180px circle at var(--mx) var(--my), rgba(255, 255, 255, .28), transparent 60%), radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%); }
.quiz-card .body { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 198, 26, .10), transparent 60%); }

@media (prefers-reduced-motion: reduce) {
  .r3-car, .r3-car .tail, .radar i, .board .line::before { animation: none !important; }
}

/* ==========================================================================
   Tappoo 4.0 – autoškolská identita: palubní deska, tabule nad pruhy, závod, cíl
   ========================================================================== */
/* ---------- palubní deska: otáčkoměr (čas) a palivoměr (odpovědi) ---------- */
.h-mid { grid-template-columns: 220px 1fr 220px; }
.gauge-wrap { width: 210px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
.gauge { width: 100%; height: auto; display: block; overflow: visible; }
.g-face { fill: #0d141b; stroke: rgba(255, 255, 255, .14); stroke-width: 2; }
.g-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 11; stroke-linecap: round; }
.g-red { fill: none; stroke: rgba(239, 68, 68, .55); stroke-width: 11; stroke-linecap: round; }
.g-fill { fill: none; stroke: #ffc61a; stroke-width: 11; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 198, 26, .7)); transition: d .2s linear; }
.fuel .g-fill { stroke: #19d3c5; filter: drop-shadow(0 0 6px rgba(25, 211, 197, .7)); }
.g-tick { stroke: rgba(255, 255, 255, .5); stroke-width: 2; }
.g-tick.big { stroke: #fff; stroke-width: 3.5; }
.g-lab { fill: rgba(255, 255, 255, .6); font-size: 13px; font-weight: 800; text-anchor: middle; }
.g-needle { transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.g-needle path { fill: #ff3b30; filter: drop-shadow(0 0 6px rgba(255, 59, 48, .8)); }
.fuel .g-needle path { fill: #5eead4; filter: drop-shadow(0 0 6px rgba(25, 211, 197, .8)); }
.g-needle circle { fill: #1e293b; stroke: #fff; stroke-width: 3; }
.g-val { fill: #fff; font-size: 40px; font-weight: 800; text-anchor: middle; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.g-unit { fill: rgba(255, 255, 255, .55); font-size: 13px; font-weight: 700; text-anchor: middle; text-transform: uppercase; letter-spacing: .08em; }
.gauge-wrap.low .g-val { fill: #ff5a50; }
.gauge-wrap.low .g-fill { stroke: #ff5a50; }
.gauge-wrap.extra .g-fill { stroke: #19d3c5; }
.h-answered { width: auto; height: auto; display: block; }
.h-answered::before, .h-answered::after { display: none; }

/* ---------- odpovědi jako směrové tabule ---------- */
.tile {
  background: linear-gradient(180deg, #1d4f96 0%, #143a72 100%) !important;
  border-radius: 12px; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px #143a72, 0 14px 30px rgba(0, 0, 0, .4);
  color: #fff; font-weight: 800;
}
.tile .shape.lt { border-radius: 50%; color: #fff; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0, 0, 0, .25); }
.tile.c0 .shape.lt { background: #0fb5ae; } .tile.c1 .shape.lt { background: #ff7a2f; }
.tile.c2 .shape.lt { background: #f5b400; color: #1a1405; } .tile.c3 .shape.lt { background: #f43f5e; }
.tile.dim { opacity: .38; filter: grayscale(.6); }
.tile .mark { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, .7); }
.tile.selected { box-shadow: inset 0 0 0 3px #ffc61a, inset 0 0 0 6px #143a72, 0 0 0 4px #ffc61a, 0 14px 30px rgba(0, 0, 0, .4); outline: none; }

/* portál s tabulemi nad jízdními pruhy (plátno) */
.gantry { position: relative; padding: 26px 30px 0; margin: 0 10px; }
.gantry-beam { position: absolute; left: 14px; right: 14px; top: 8px; height: 16px; border-radius: 4px;
  background: repeating-linear-gradient(45deg, #9aa5b1 0 10px, #c3ccd5 10px 20px); box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
.gantry-beam .g-post { position: absolute; top: 0; width: 16px; height: 46vh; background: linear-gradient(90deg, #8b96a2, #c3ccd5, #8b96a2); border-radius: 3px; z-index: -1; }
.gantry-beam .g-post.l { left: -2px; } .gantry-beam .g-post.r { right: -2px; }
.gantry .tiles { display: grid; gap: 14px; position: relative; z-index: 1; }
.gantry.n4 .tiles { grid-template-columns: repeat(4, 1fr); }
.gantry.n3 .tiles { grid-template-columns: repeat(3, 1fr); }
.gantry.n2 .tiles { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
.gantry .tile { min-height: 110px; font-size: clamp(17px, 1.7vw, 28px); flex-direction: column; justify-content: center; text-align: center; gap: 10px; padding: 14px 12px; }
.gantry .tile .shape.lt { width: 50px; height: 50px; font-size: 26px; }
.gantry .tile::before { animation-duration: 6s; }
/* šroubky / úchyty tabule k portálu */
.gantry .tile > span:first-child::before { content: ''; position: absolute; }
.gantry-road { display: grid; gap: 14px; margin-top: 10px; height: 46px; border-radius: 6px;
  background: linear-gradient(180deg, #2a3440, #1b222b); padding: 0 6px; position: relative; overflow: hidden; }
.gantry.n4 .gantry-road { grid-template-columns: repeat(4, 1fr); }
.gantry.n3 .gantry-road { grid-template-columns: repeat(3, 1fr); }
.gantry.n2 .gantry-road { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
.gantry-road .lane { position: relative; display: grid; place-items: center; color: rgba(255, 255, 255, .65); font-size: 18px; }
.gantry-road .lane + .lane::before { content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; background: repeating-linear-gradient(180deg, #fff 0 10px, transparent 10px 18px); opacity: .6; }
.gantry-road .lane span { animation: tp-lane 1.2s ease-in-out infinite; }
@keyframes tp-lane { 50% { transform: translateY(5px); opacity: .4; } }

/* mobil: tabule pod sebou, šipka do pruhu */
.p-main .tiles:not(.img-tiles) { grid-template-columns: 1fr !important; min-height: 0; gap: 10px; }
.p-main .tiles:not(.img-tiles) .tile { flex-direction: row; justify-content: flex-start; text-align: left; min-height: 74px; padding: 12px 52px 12px 14px; font-size: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h12m-5-6 6 6-6 6' stroke='white' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), linear-gradient(180deg, #1d4f96 0%, #143a72 100%) !important;
  background-repeat: no-repeat !important; background-position: right 16px center, 0 0 !important; background-size: 26px 26px, 100% 100% !important; }
.p-main .tiles:not(.img-tiles) .tile .shape { width: 46px; height: 46px; font-size: 24px; }
.p-main .tiles.tf .tile { min-height: 96px; font-size: 22px; }

/* odhalení: vodorovné pruhy (kolik hráčů jelo kterým pruhem) */
.lanebars { display: grid; gap: 12px; max-width: 1150px; margin: 0 auto; text-align: left; }
.lb { display: grid; grid-template-columns: 54px minmax(160px, 1.1fr) 2fr 90px; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #1d4f96, #143a72); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9), 0 10px 26px rgba(0, 0, 0, .35); }
.lb .shape.lt { width: 46px; height: 46px; font-size: 24px; border-radius: 50%; color: #fff; box-shadow: 0 0 0 3px #fff; }
.lb.c0 .shape.lt { background: #0fb5ae; } .lb.c1 .shape.lt { background: #ff7a2f; } .lb.c2 .shape.lt { background: #f5b400; color: #1a1405; } .lb.c3 .shape.lt { background: #f43f5e; }
.lb-txt { font-size: clamp(18px, 1.8vw, 28px); font-weight: 800; }
.lb-bar { height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.lb-fill { height: 100%; width: 0; border-radius: inherit; background: repeating-linear-gradient(90deg, #fff 0 22px, rgba(255, 255, 255, .55) 22px 34px); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.lb.ok .lb-fill { background: repeating-linear-gradient(90deg, #4ade80 0 22px, #22c55e 22px 34px); box-shadow: 0 0 16px rgba(74, 222, 128, .6); }
.lb-n { font-size: 34px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.lb-ok { color: #4ade80; margin-left: 6px; }
.lb.ok { box-shadow: inset 0 0 0 3px #4ade80, 0 0 30px rgba(74, 222, 128, .35), 0 10px 26px rgba(0, 0, 0, .35); }
.lb.dim { opacity: .55; }

/* ---------- průběžné pořadí jako závod ---------- */
.race { display: grid; gap: 12px; max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; }
.rc-lane { display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 14px; align-items: center; animation: tp-rise .45s both; }
.rc-who { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 14px; padding: 8px 14px; min-width: 0; }
.rc-lane.lead .rc-who { border-color: rgba(255, 198, 26, .6); background: linear-gradient(90deg, rgba(255, 198, 26, .22), rgba(255, 198, 26, .05)); }
.rc-pos { min-width: 30px; } .rc-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-pts { margin-left: auto; font-variant-numeric: tabular-nums; }
.rc-who .up { color: #4ade80; font-size: 16px; }
.rc-track { position: relative; height: 62px; border-radius: 10px; overflow: visible;
  background: linear-gradient(180deg, transparent 47%, rgba(255, 255, 255, .55) 47% 53%, transparent 53%) 0 0 / 46px 100% repeat-x, linear-gradient(180deg, #2a3440, #1b222b);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25), inset 0 -3px 0 rgba(255, 255, 255, .25); }
.rc-finish { position: absolute; right: 6%; top: 0; bottom: 0; width: 18px; background: conic-gradient(#fff 25%, #111 0 50%, #fff 0 75%, #111 0) 0 0 / 9px 9px; opacity: .9; }
.rc-car { position: absolute; top: 50%; transform: translate(-50%, -50%); transition: left 1.6s cubic-bezier(.25, .8, .25, 1); display: flex; align-items: center; }
.tp-car { display: inline-block; line-height: 0; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.tp-car svg { display: block; width: 100%; height: auto; }
.rc-gain { position: absolute; left: 100%; margin-left: 6px; color: #4ade80; font-weight: 800; font-size: 18px; white-space: nowrap; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }

/* ---------- vyhlášení: cílová rovinka ---------- */
.finish { position: relative; display: grid; gap: 16px; max-width: 1250px; width: 100%; margin: 3vh auto 0; padding: 0 24px; }
.fl-lane { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: center; }
.fl-lane.empty { display: none; }
.fl-info { display: flex; align-items: center; gap: 14px; opacity: 0; transform: translateX(-30px); transition: opacity .5s, transform .6s cubic-bezier(.2, 1.4, .4, 1); }
.fl-lane.on .fl-info { opacity: 1; transform: none; }
.fl-place { position: relative; width: 74px; height: 74px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; font-weight: 800; flex: none;
  background: var(--glass-2); border: 1px solid var(--glass-line); }
.fl-place i { position: absolute; right: -10px; bottom: -10px; font-style: normal; font-size: 30px; }
.p1 .fl-place { background: var(--gsig); color: #1a1405; box-shadow: 0 0 40px rgba(255, 198, 26, .55); }
.p2 .fl-place { background: linear-gradient(135deg, #f1f5f9, #94a3b8); color: #0f172a; }
.p3 .fl-place { background: linear-gradient(135deg, #fdba74, #c2410c); color: #fff; }
.fl-who .nm { font-size: clamp(24px, 2.6vw, 40px); font-weight: 800; line-height: 1.05; }
.fl-sub { font-size: 20px; opacity: .85; font-weight: 700; display: flex; align-items: baseline; gap: 2px; }
.fl-sub .sc { font-size: 26px; font-weight: 800; color: var(--signal); font-variant-numeric: tabular-nums; }
.fl-who .pod-badges { justify-content: flex-start; font-size: 22px; }
.fl-track { position: relative; height: 92px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, transparent 47%, rgba(255, 255, 255, .5) 47% 53%, transparent 53%) 0 0 / 60px 100% repeat-x, linear-gradient(180deg, #2a3440, #161c23);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(255, 255, 255, .3); }
.p1 .fl-track { height: 112px; box-shadow: inset 0 4px 0 #ffc61a, inset 0 -4px 0 #ffc61a, 0 0 50px rgba(255, 198, 26, .25); }
.fl-line { position: absolute; right: 14%; top: 0; bottom: 0; width: 34px; background: conic-gradient(#fff 25%, #111 0 50%, #fff 0 75%, #111 0) 0 0 / 17px 17px; }
.fl-car { position: absolute; top: 50%; left: -20%; transform: translate(-50%, -50%); transition: left 1.7s cubic-bezier(.3, .9, .25, 1); }
.fl-lane.on .fl-car { left: 91%; }
.fl-lane.p2.on .fl-car { left: 89%; } .fl-lane.p3.on .fl-car { left: 87%; }
.pod-rest .line { background: var(--glass); color: #fff; border: 1px solid var(--glass-line); border-radius: 12px; }
.g-lab { font-size: 15px; }
.pod-title.drum { animation: tp-rev .09s linear infinite; }
@keyframes tp-rev { 50% { transform: translate(1px, -1px); } }
.pod-beam { display: none; }

/* mobil: výsledek jako kontrolka na palubní desce, ne celá barevná obrazovka */
.result-ok { background: radial-gradient(520px 340px at 50% 0%, rgba(34, 197, 94, .55), transparent 70%), #0b1015 !important; }
.result-bad { background: radial-gradient(520px 340px at 50% 0%, rgba(244, 63, 94, .5), transparent 70%), #0b1015 !important; }
.result-part { background: radial-gradient(520px 340px at 50% 0%, rgba(245, 158, 11, .5), transparent 70%), #0b1015 !important; }
.pp-drum { animation: tp-rev .09s linear infinite; }

@media (max-width: 900px) {
  .gantry.n4 .tiles, .gantry.n4 .gantry-road { grid-template-columns: repeat(2, 1fr); }
  .rc-lane, .fl-lane { grid-template-columns: 1fr; }
  .lb { grid-template-columns: 46px 1fr 70px; } .lb-bar { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  .gantry-road .lane span, .pod-title.drum, .pp-drum { animation: none !important; }
  .rc-car, .fl-car { transition: none; }
}
