:root {
  /* Vzhled Tappoo: asfalt + dopravní žlutá. (--purple zůstává jako název proměnné pro hlavní tmavou barvu.) */
  --purple: #1f272e;
  --purple-2: #141a1f;
  --signal: #ffc61a;
  --signal-ink: #1b1b1f;
  --a0: #0c8599;
  --a1: #e8590c;
  --a2: #7048e8;
  --a3: #c2255c;
  --red: #d6203a;
  --blue: #1c6dd0;
  --yellow: #e0a100;
  --green: #2b8a3e;
  --ok: #2b8a3e;
  --bad: #d6203a;
  --ink: #1b1b1f;
  --muted: #6b6b76;
  --line: #e3e3ea;
  --bg: #f4f4f8;
  --card: #fff;
  --accent: #1f272e;
  --radius: 10px;
  --shadow: 0 2px 0 rgba(0, 0, 0, .12);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.spacer { flex: 1; }

/* ---------- tlačítka a formuláře ---------- */
.btn {
  border: 0; border-radius: 6px; padding: 10px 18px; font-weight: 700;
  background: #fff; color: var(--ink); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; line-height: 1.2;
}
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--signal); color: var(--signal-ink); }
.btn.dark { background: #333; color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.big { padding: 16px 28px; font-size: 20px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.input::placeholder { color: #8a8f96; }
.input:focus { outline: none; border-color: var(--accent); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
.error-msg { color: var(--bad); font-weight: 600; min-height: 1.3em; }

/* ---------- herní motiv (hráč + plátno) ---------- */
body.game {
  background: var(--purple); color: #fff; min-height: 100vh; min-height: 100dvh;
  /* jemná textura asfaltu */
  background-image:
    radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1.5px),
    linear-gradient(180deg, #27313a 0%, #1a2026 100%);
  background-size: 7px 7px, 100% 100%;
  background-attachment: fixed;
  overflow-x: hidden;
}
/* výstražný pruh nahoře – podpis Tappoo */
body.game::before {
  content: ''; position: fixed; left: 0; right: 0; top: 0; height: 5px; z-index: 30; pointer-events: none;
  background: repeating-linear-gradient(-45deg, var(--signal) 0 14px, #1b1b1f 14px 28px);
}
.logo { font-weight: 900; font-size: 44px; letter-spacing: -1px; display: inline-flex; align-items: center; gap: 12px; }
.logo .mark { width: 1.05em; height: 1.05em; flex: none; }
.card { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }

.join-box { max-width: 340px; margin: 12vh auto 0; padding: 0 16px; text-align: center; }
.join-box .card { display: grid; gap: 10px; padding: 16px; }
.join-box .input { text-align: center; font-weight: 800; font-size: 20px; padding: 12px; }

.shape { width: 1.4em; height: 1.4em; flex: none; }
/* odpovědi jsou písmena A–D jako v testech z pravidel provozu */
.shape.lt { display: inline-grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .95); color: #1b1b1f;
  font-weight: 900; font-size: .95em; line-height: 1; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  border: 0; border-radius: 6px; color: #fff; font-weight: 800; font-size: 20px; padding: 16px;
  display: flex; align-items: center; gap: 14px; text-align: left; min-height: 80px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .2); position: relative;
}
.tile.c0 { background: var(--a0); } .tile.c1 { background: var(--a1); }
.tile.c2 { background: var(--a2); } .tile.c3 { background: var(--a3); }
.tile.dim { opacity: .3; }
.tile.selected { outline: 6px solid var(--signal); outline-offset: -6px; }
.tile .mark { margin-left: auto; font-size: 28px; }

/* ---------- hráč ---------- */
.p-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px 6px; min-height: 44px;
  background: rgba(0, 0, 0, .25); font-weight: 700;
}
.p-top .pill { background: #fff; color: var(--ink); border-radius: 20px; padding: 2px 12px; }
.p-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px; height: 48px; background: #fff; color: var(--ink); font-weight: 800; z-index: 5;
}
.p-bottom .score { background: #333; color: #fff; border-radius: 4px; padding: 3px 12px; }
.p-main { padding: 14px 14px 80px; max-width: 720px; margin: 0 auto; }
.p-center { min-height: calc(100dvh - 130px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.p-q-text { font-size: 20px; font-weight: 800; text-align: center; margin: 6px 0 14px; }
.p-main .tiles { min-height: 52vh; }
.p-main .tiles.tf { grid-template-columns: 1fr 1fr; }
.p-main .tile { font-size: 18px; justify-content: center; flex-direction: column; text-align: center; }
.p-main .tile .shape { width: 46px; height: 46px; font-size: 26px; }
.big-emoji { font-size: 84px; line-height: 1; }
.result-ok { background: var(--ok) !important; }
.result-bad { background: var(--bad) !important; }
.result-part { background: #b76e00 !important; }
.points-badge { background: rgba(0, 0, 0, .3); border-radius: 6px; padding: 8px 20px; font-size: 26px; font-weight: 900; }
.spinner { width: 54px; height: 54px; border: 7px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.timer-bar { height: 6px; background: rgba(255, 255, 255, .25); border-radius: 3px; overflow: hidden; margin: 0 0 12px; }
.timer-bar > div { height: 100%; background: var(--signal); width: 100%; transition: width .25s linear; }

.order-list, .seq-list { display: grid; gap: 8px; }
.order-item {
  display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 6px;
  padding: 10px 10px 10px 14px; font-weight: 700; box-shadow: var(--shadow);
}
.order-item .num { background: var(--purple); color: #fff; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; flex: none; }
.order-item .arrows { margin-left: auto; display: flex; gap: 6px; }
.order-item .arrows button { border: 0; background: var(--bg); border-radius: 6px; width: 42px; height: 38px; font-size: 18px; }

.match-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; background: #fff; color: var(--ink); border-radius: 6px; padding: 10px 12px; box-shadow: var(--shadow); }
.match-row b { font-size: 16px; }
.match-row select { width: 100%; min-width: 0; text-overflow: ellipsis; padding: 10px; border-radius: 6px; border: 2px solid var(--line); font-weight: 700; }
.match-row select.done { border-color: var(--green); }

.slider-box { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px 18px; text-align: center; }
.slider-value { font-size: 52px; font-weight: 900; color: var(--purple); }
.slider-box input[type=range] { width: 100%; height: 44px; accent-color: var(--purple); }
.slider-ends { display: flex; justify-content: space-between; font-weight: 700; color: var(--muted); }

/* obrázek s překryvy (pin, nebezpečí, křižovatka) */
.stage { position: relative; display: inline-block; line-height: 0; max-width: 100%; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.stage > img { display: block; max-width: 100%; max-height: 55vh; border-radius: 6px; background: #fff; }
.stage.clickable { cursor: crosshair; }
.stage .ov { position: absolute; transform: translate(-50%, -50%); line-height: 1; pointer-events: none; }
.ov.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: var(--red); border: 3px solid #fff; transform: translate(-50%, -100%) rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.ov.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ov.dot.ok { background: var(--green); } .ov.dot.bad { background: var(--red); }
.ov.zone { border-radius: 50%; border: 4px solid #00e676; background: rgba(0, 230, 118, .18); box-shadow: 0 0 0 3px rgba(0,0,0,.35); }
.ov.zone.editing { border-color: var(--yellow); background: rgba(255, 200, 0, .25); pointer-events: auto; cursor: pointer; }
.ov.tap { width: 34px; height: 34px; border-radius: 50%; background: rgba(226, 27, 60, .85); border: 3px solid #fff; color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 16px; pointer-events: auto; }
.ov.veh {
  min-width: 40px; height: 40px; padding: 0 6px; border-radius: 20px; background: #fff; color: var(--ink); border: 3px solid var(--ink);
  font-weight: 900; font-size: 20px; display: grid; place-items: center; pointer-events: auto; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.ov.veh.picked { background: var(--signal); color: var(--signal-ink); border-color: #1b1b1f; }
.ov.veh .ord { position: absolute; top: -12px; right: -12px; background: var(--yellow); color: #111; border-radius: 50%; width: 24px; height: 24px; font-size: 14px; display: grid; place-items: center; border: 2px solid #fff; }

.reaction-pad {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; font-weight: 900; text-align: center; padding: 20px; background: #1c1c28; color: #fff; touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.reaction-pad.go { background: #e21b3c; }
.reaction-pad .big { font-size: 64px; }
.reaction-pad.go .big { font-size: 90px; animation: pulse .35s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }

/* ---------- plátno moderátora ---------- */
#app.host { min-height: 100vh; display: flex; flex-direction: column; }
.h-lobby-top { display: flex; gap: 16px; align-items: stretch; justify-content: center; padding: 20px; flex-wrap: wrap; }
.h-join { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 14px 26px; display: flex; gap: 22px; align-items: center; }
.h-join .url { font-size: 22px; font-weight: 700; }
.h-join .pin { font-size: 72px; font-weight: 900; letter-spacing: 4px; line-height: 1; font-variant-numeric: tabular-nums; }
.h-join { border-top: 8px solid var(--signal); }
.h-join .qr { background: #fff; padding: 6px; }
.h-join .qr img, .h-join .qr canvas { width: 140px !important; height: 140px !important; }
.h-bar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
.h-count { background: rgba(0, 0, 0, .3); border-radius: 6px; padding: 8px 16px; font-weight: 800; font-size: 22px; }
.h-names { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 20px 40px; }
.h-name {
  background: rgba(0, 0, 0, .3); border-radius: 6px; padding: 10px 18px; font-weight: 800; font-size: 22px; border: 0; color: #fff;
  animation: pop .3s ease-out;
}
.h-name:hover { background: rgba(255,198,26,.25); }
.h-name.off { opacity: .45; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.h-waiting { font-size: 28px; font-weight: 800; text-align: center; margin-top: 8vh; opacity: .85; }

.h-qtext { background: #fff; color: var(--ink); font-size: clamp(22px, 3vw, 40px); font-weight: 800; text-align: center; padding: 18px 30px; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.h-mid { flex: 1; display: grid; grid-template-columns: 140px 1fr 140px; align-items: center; gap: 20px; padding: 20px; min-height: 0; }
.h-mid .content { text-align: center; min-width: 0; }
.h-mid .content .stage > img { max-height: 48vh; }
.h-timer { width: 120px; height: 120px; border-radius: 50%; background: var(--purple-2); display: grid; place-items: center; font-size: 48px; font-weight: 900; border: 6px solid var(--signal); color: var(--signal); }
.h-answered { text-align: center; font-weight: 800; font-size: 20px; }
.h-answered b { display: block; font-size: 56px; }
.h-tiles { padding: 0 20px 20px; }
.h-tiles .tile { font-size: clamp(18px, 2vw, 30px); min-height: 90px; }
.h-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 0 20px 20px; }
.h-intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 20px; text-align: center; }
.h-intro .qt { font-size: clamp(28px, 4vw, 56px); font-weight: 900; max-width: 1100px; }
.type-badge { background: var(--signal); color: var(--signal-ink); font-weight: 900; border-radius: 8px; padding: 8px 22px; font-size: 20px; }
.intro-bar { width: min(700px, 80vw); height: 14px; background: rgba(255,255,255,.2); border-radius: 7px; overflow: hidden; }
.intro-bar > div { height: 100%; background: var(--signal); width: 0; }

.bars { display: flex; gap: 22px; justify-content: center; align-items: flex-end; height: 34vh; }
.bars .bar { width: 110px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars .bar .fill { width: 100%; border-radius: 4px 4px 0 0; min-height: 8px; transition: height .7s cubic-bezier(.2, .8, .2, 1); }
.bars .bar .lbl { background: inherit; width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 6px; font-size: 26px; font-weight: 900; color: #fff; }
.bars .bar.dim { opacity: .35; }
.explain { background: rgba(0, 0, 0, .3); border-radius: var(--radius); padding: 14px 20px; font-size: 20px; max-width: 1000px; margin: 14px auto 0; text-align: left; }
.explain b { color: #ffd54f; }
.big-number { font-size: 90px; font-weight: 900; }
.words { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; align-items: center; max-width: 1100px; margin: 0 auto; }
.words span { font-weight: 900; line-height: 1.1; animation: pop .4s ease-out backwards; }
.list-answers { display: grid; gap: 8px; max-width: 800px; margin: 0 auto; text-align: left; }
.list-answers div { background: rgba(0, 0, 0, .3); padding: 10px 16px; border-radius: 6px; font-size: 22px; font-weight: 700; display: flex; gap: 10px; }
.list-answers div.ok { background: var(--green); }
.list-answers .cnt { margin-left: auto; opacity: .9; }
.numline { position: relative; height: 120px; margin: 40px 60px 10px; }
.numline .axis { position: absolute; left: 0; right: 0; top: 70px; height: 6px; background: #fff; border-radius: 3px; }
.numline .band { position: absolute; top: 60px; height: 26px; background: rgba(38, 137, 12, .8); border-radius: 4px; }
.numline .v { position: absolute; top: 48px; width: 14px; height: 14px; border-radius: 50%; background: #ffd54f; transform: translateX(-50%); border: 2px solid #333; }
.numline .c { position: absolute; top: 0; transform: translateX(-50%); background: var(--green); padding: 4px 12px; border-radius: 6px; font-weight: 900; font-size: 22px; white-space: nowrap; }
.numline .end { position: absolute; top: 88px; font-weight: 700; }
.reaction-flash { position: fixed; inset: 0; background: var(--red); display: grid; place-items: center; font-size: 18vw; font-weight: 900; z-index: 30; animation: pulse .35s ease-in-out infinite alternate; }

.board { max-width: 900px; margin: 0 auto; width: 100%; display: grid; gap: 10px; padding: 10px 20px; }
.board .line { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--ink); border-radius: 6px; padding: 14px 20px; font-size: 26px; font-weight: 800; animation: slidein .4s ease-out backwards; }
.board .line .up { color: var(--green); font-size: 18px; }
.board .line .pts { margin-left: auto; }
@keyframes slidein { from { transform: translateX(-40px); opacity: 0; } }
.h-title { text-align: center; font-size: 40px; font-weight: 900; margin: 18px 0; }

.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; height: 55vh; margin-top: 2vh; }
.podium .col { width: min(240px, 28vw); display: flex; flex-direction: column; align-items: center; }
.podium .who { font-size: 28px; font-weight: 900; text-align: center; margin-bottom: 10px; animation: pop .5s ease-out backwards; }
.podium .blk { width: 100%; background: #2f3a45; border-radius: 6px 6px 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 16px; font-weight: 900; box-shadow: inset 0 -8px 0 rgba(0,0,0,.2); animation: grow 1s cubic-bezier(.2,.8,.2,1) backwards; transform-origin: bottom; }
.podium .medal { font-size: 60px; }
.podium .sc { font-size: 22px; margin-top: 6px; }
@keyframes grow { from { transform: scaleY(0); } }

/* ---------- administrace ---------- */
body.admin { background: var(--bg); }
.a-top { background: var(--purple); color: #fff; border-bottom: 4px solid var(--signal); display: flex; align-items: center; gap: 6px; padding: 10px 20px; flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.a-top .logo { font-size: 24px; margin-right: 16px; color: var(--signal); text-decoration: none; }
.a-top nav a { color: #fff; text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 6px; opacity: .85; }
.a-top nav a.active, .a-top nav a:hover { background: rgba(255,255,255,.15); opacity: 1; }
.a-main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
.a-main h1 { margin: 0 0 16px; font-size: 28px; }
.a-main h2 { font-size: 20px; margin: 26px 0 12px; }
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.quiz-card { background: #fff; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,.1); overflow: hidden; display: flex; flex-direction: column; }
.quiz-card .cover { height: 120px; background: linear-gradient(90deg, transparent 48%, var(--signal) 48% 52%, transparent 52%) 0 0 / 100% 40px repeat-y, linear-gradient(135deg, #2b353f, #161b20); display: grid; place-items: center; overflow: hidden; }
.quiz-card .cover img { max-height: 100px; }
.quiz-card .body { padding: 14px 16px; flex: 1; }
.quiz-card h3 { margin: 0 0 6px; font-size: 18px; }
.quiz-card .meta { font-size: 13px; color: var(--muted); }
.quiz-card .actions { display: flex; gap: 6px; padding: 0 16px 14px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #eef1f4; color: var(--purple); margin-right: 4px; }
.tag.zaci { background: #e3f2fd; color: #0d47a1; }
.tag.ucitele { background: #fff3e0; color: #e65100; }

.editor { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.q-list { position: sticky; top: 70px; display: grid; gap: 8px; max-height: calc(100vh - 90px); overflow: auto; padding-bottom: 10px; }
.q-item { background: #fff; border: 2px solid transparent; border-radius: 8px; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.q-item.active { border-color: var(--accent); }
.q-item .t { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-item .n { font-size: 12px; color: var(--muted); display: flex; gap: 6px; }
.q-item .mv { margin-left: auto; display: flex; gap: 2px; }
.q-item .mv button { border: 0; background: var(--bg); border-radius: 4px; padding: 0 6px; }
.panel { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ans-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ans-edit .a { display: flex; align-items: center; gap: 8px; border-radius: 6px; padding: 8px; color: #fff; }
.ans-edit .a input[type=text] { flex: 1; border: 0; border-radius: 4px; padding: 8px; color: var(--ink); }
.ans-edit .a input[type=checkbox] { width: 24px; height: 24px; accent-color: #fff; }
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.type-picker button { background: #fff; border: 2px solid var(--line); border-radius: 8px; padding: 12px; text-align: left; }
.type-picker button:hover { border-color: var(--accent); }
.type-picker b { display: block; margin-bottom: 4px; }
.type-picker small { color: var(--muted); }
.type-picker .grp { grid-column: 1 / -1; font-weight: 800; margin-top: 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.img-edit { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.img-edit .stage > img { max-height: 380px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gallery button { background: #fff; border: 2px solid var(--line); border-radius: 8px; padding: 8px; font-size: 12px; }
.gallery button:hover { border-color: var(--accent); }
.gallery img { height: 70px; object-fit: contain; display: block; margin: 0 auto 6px; }
.list-edit { display: grid; gap: 8px; }
.list-edit .li { display: flex; gap: 8px; align-items: center; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 22px; width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { margin-top: 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 20px; border-radius: 6px; z-index: 60; font-weight: 600; }
.toast.err { background: var(--red); }

table.t { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
table.t th, table.t td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
table.t th { background: #fafafe; font-size: 13px; color: var(--muted); }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #faf7ff; }
.tbl-wrap { overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat b { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 13px; }
.pct { display: inline-block; min-width: 46px; text-align: center; font-weight: 800; border-radius: 4px; padding: 2px 6px; color: #fff; }
.matrix td.c { text-align: center; font-weight: 800; }
.matrix td.ok { background: #e3f5dc; color: var(--green); }
.matrix td.bad { background: #fde4e8; color: var(--red); }
.matrix td.part { background: #fff3cd; color: #8a6100; }
.matrix td.none { color: #bbb; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: #fff; padding: 8px 14px; border-radius: 6px; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tabs button.active { background: var(--purple); color: var(--signal); }
.login-box { max-width: 380px; margin: 10vh auto; }

@media (max-width: 800px) {
  .editor { grid-template-columns: 1fr; }
  .q-list { position: static; max-height: none; }
  .grid2, .grid3, .ans-edit { grid-template-columns: 1fr; }
  .h-mid { grid-template-columns: 1fr; }
  .bars .bar { width: 60px; }
}
@media (max-width: 420px) {
  .tile { font-size: 16px; padding: 12px; }
}
@media print {
  .a-top, .no-print, .btn { display: none !important; }
  body.admin { background: #fff; }
  table.t, .stat { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- nové autoškolské typy ---------- */
.bet { background: rgba(0,0,0,.25); border-radius: var(--radius); padding: 8px; margin-bottom: 12px; }
.bet-q { font-weight: 800; text-align: center; margin-bottom: 6px; }
.bet-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bet-btn { border: 2px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 8px; padding: 8px 4px; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; }
.bet-btn small { opacity: .8; font-weight: 600; font-size: 11px; }
.bet-btn.on { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }

.img-tiles { min-height: 0 !important; }
.img-tile { flex-direction: column !important; padding: 0 !important; overflow: hidden; background: #fff !important; min-height: 150px; gap: 0 !important; }
.img-tile img { flex: 1; width: 100%; max-height: 22vh; object-fit: contain; padding: 12px; }
.img-tile-bar { width: 100%; display: flex; justify-content: center; padding: 6px; }
.img-tile.c0 .img-tile-bar { background: var(--a0); } .img-tile.c1 .img-tile-bar { background: var(--a1); }
.img-tile.c2 .img-tile-bar { background: var(--a2); } .img-tile.c3 .img-tile-bar { background: var(--a3); }
.img-tile .shape { width: 26px !important; height: 26px !important; }
.host .img-tile img { max-height: 16vh; }

.brake-track { position: relative; height: 52vh; max-width: 260px; margin: 0 auto; border-radius: 8px; overflow: hidden; touch-action: manipulation;
  background: linear-gradient(90deg, #7cb35a 0 18%, #bfbfbf 18% 21%, #555 21% 79%, #bfbfbf 79% 82%, #7cb35a 82%); }
.brake-track::after { content: ''; position: absolute; left: 49%; width: 2%; top: 0; bottom: 0; background: repeating-linear-gradient(#fff 0 18px, transparent 18px 36px); opacity: .7; }
.stop-line { position: absolute; left: 21%; right: 21%; top: 12%; height: 8px; background: #fff; z-index: 2; }
.stop-line span { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); font-weight: 900; color: #fff; font-size: 14px; letter-spacing: 2px; }
.car-top { position: absolute; left: 56%; width: 34px; height: 58px; margin-top: -29px; border-radius: 9px; background: #e53935; border: 2px solid #111; z-index: 3;
  box-shadow: inset 0 12px 0 -2px #bfe3ff, 0 3px 6px rgba(0,0,0,.4); }
.car-top.lead { background: #1e88e5; left: 56%; top: 105%; }
.speedo { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-weight: 900; padding: 3px 8px; border-radius: 6px; z-index: 4; font-size: 14px; }
.brake-msg { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-weight: 900; font-size: 22px; color: #fff; text-shadow: 0 2px 6px #000; z-index: 5; padding: 0 8px; }
.brake-msg.ok { color: #b9f6ca; } .brake-msg.bad { color: #ff8a80; }
.brake-btn { width: 100%; max-width: 360px; margin: 12px auto 0; display: flex; justify-content: center; font-size: 30px; padding: 18px; touch-action: manipulation; }
.gap-track .brake-msg { top: 70%; font-size: 18px; }
.post { position: absolute; left: 80%; top: 40%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: #fdd835; border: 3px solid #333; z-index: 2; }
.post::before { content: ''; position: absolute; left: -200px; right: 7px; top: 4px; height: 0; border-top: 2px dashed rgba(255,255,255,.5); }
.post.flash { animation: pulse .3s ease-in-out 4 alternate; background: #fff; }

.reaction-pad.gonogo { background: #14141c; }
.reaction-pad.bad { background: #5c0a14; }
.gn-rule { font-size: 20px; }
.semafor { background: #222; border: 4px solid #444; border-radius: 22px; padding: 12px; display: grid; gap: 10px; }
.lamp { width: 84px; height: 84px; border-radius: 50%; opacity: .15; }
.lamp.r { background: #ff1744; } .lamp.o { background: #ff9100; } .lamp.g { background: #00e676; }
.lamp.on { opacity: 1; box-shadow: 0 0 40px currentColor; }
.lamp.r.on { box-shadow: 0 0 50px #ff1744; } .lamp.g.on { box-shadow: 0 0 50px #00e676; }
.walker { font-size: 80px; opacity: 0; height: 90px; transition: opacity .05s; }
.walker.on { opacity: 1; }
.gn-status { font-size: 22px; min-height: 30px; }
.host .semafor .lamp { width: 16vh; height: 16vh; }
.host .walker { font-size: 16vh; height: 17vh; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 6px 12px; font-weight: 800; min-width: 48px; }
.chip.on { background: var(--purple); color: var(--signal); border-color: var(--purple); }

.ov.placed { width: 13%; max-width: 64px; pointer-events: none; }
.ov.placed img { width: 100%; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.palette { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sign-pick { background: #fff; border: 4px solid transparent; border-radius: 10px; padding: 6px; width: 76px; height: 76px; }
.sign-pick img { width: 100%; height: 100%; object-fit: contain; }
.sign-pick.on { border-color: var(--yellow); transform: scale(1.08); }

.draw-layer { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.draw-line { fill: none; stroke: #ff1744; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.draw-line.ok { stroke: #00e676; } .draw-line.thin { stroke-width: 2.5; opacity: .75; }
.draw-line.corridor { stroke: rgba(0, 230, 118, .45); stroke-linecap: round; }
.ov.startdot { width: 22px; height: 22px; border-radius: 50%; background: #00e676; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.4); }

.scen-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.scen-progress span { width: 34px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.25); }
.scen-progress span.done { background: #00e676; } .scen-progress span.cur { background: #fff; }
.scen-card p { font-size: 18px; font-weight: 700; margin: 6px 0 0; }
.scen-opt { border: 0; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 800; font-size: 17px; padding: 14px; text-align: left; box-shadow: var(--shadow); }
.scen-opt.on { background: var(--yellow); color: #fff; }
.scen-opt:disabled { opacity: .7; }

.cloze { font-size: 18px; line-height: 2.2; font-weight: 600; }
.cloze select { font: inherit; font-weight: 800; padding: 4px 6px; border: 2px solid var(--purple); border-radius: 6px; margin: 0 4px; max-width: 100%; }
.cloze select.done { border-color: var(--green); background: #e8f5e9; }
.words-card { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.word { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 6px; padding: 8px 12px; font-size: 20px; font-weight: 700; }
.word.on { border-color: var(--red); background: #fde4e8; color: var(--red); text-decoration: line-through; }
.word.wrong { background: var(--red); color: #fff; border-color: var(--red); text-decoration: line-through; }
.fill-ok { background: var(--green); color: #fff; padding: 2px 10px; border-radius: 6px; font-weight: 900; }
.seg-cards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.seg-card { background: #fff; color: var(--ink); border-radius: 10px; padding: 14px 18px; min-width: 170px; text-align: center; font-weight: 800; font-size: 20px; }
.seg-card img { height: 70px; display: block; margin: 0 auto 6px; }
.seg-card .sp { font-size: 40px; font-weight: 900; color: var(--purple); }
.seg-card .pc { font-size: 15px; color: var(--muted); }
.word-count { position: absolute; top: -12px; right: -8px; background: #333; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 13px; }

/* ---------- minihry ---------- */
.mg { max-width: 560px; margin: 0 auto; }
.mg-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; margin-bottom: 6px; gap: 8px; }
.mg-score { background: rgba(0,0,0,.3); border-radius: 6px; padding: 3px 10px; font-weight: 800; font-size: 15px; }
.mg-time { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.mg-time > div { height: 100%; background: #ffd54f; width: 100%; }
.mg-area { position: relative; }
.mg-over { text-align: center; padding: 30px 10px; }
.mg-road { position: relative; height: 50vh; border-radius: 10px; overflow: hidden; touch-action: manipulation;
  background: linear-gradient(90deg, #7cb35a 0 4%, #555 4% 96%, #7cb35a 96%); }
.mg-road::before, .mg-road::after { content: ''; position: absolute; top: 0; bottom: 0; width: 1.5%; background: repeating-linear-gradient(#fff 0 20px, transparent 20px 40px); opacity: .7; }
.mg-road::before { left: 34%; } .mg-road::after { left: 65%; }
.mg-road.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mg-car, .mg-obs { position: absolute; transform: translate(-50%, -50%); font-size: 40px; line-height: 1; }
.mg-car { top: 88%; transition: left .12s; transform: translate(-50%, -50%) rotate(-90deg); }
.mg-obs { top: 0; }
.mg-ctrl { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 22px; }
.mg-ctrl .btn { font-size: 34px; padding: 12px 40px; touch-action: manipulation; }
.mg-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mg-card { aspect-ratio: 3 / 4; border: 0; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; font-size: 12px; padding: 4px; position: relative; overflow: hidden; }
.mg-card .back { position: absolute; inset: 0; display: grid; place-items: center; background: var(--purple); color: #fff; font-size: 30px; font-weight: 900; }
.mg-card.open .back, .mg-card.done .back { display: none; }
.mg-card .front { display: grid; place-items: center; height: 100%; }
.mg-card img { width: 90%; max-height: 90%; object-fit: contain; }
.mg-card.done { background: #c8f7c5; opacity: .75; }
.mg-statement { background: #fff; color: var(--ink); border-radius: 10px; padding: 24px 16px; font-size: 21px; font-weight: 800; text-align: center; min-height: 130px; display: grid; place-items: center; }
.mg-fb { text-align: center; font-size: 32px; height: 44px; }
.mg-fb.pop { animation: pop .3s ease-out; }
.mg-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-yesno .tile { justify-content: center; font-size: 24px; min-height: 90px; }
.mg-dash { display: flex; justify-content: center; align-items: center; gap: 30px; margin: 10px 0; }
.mg-limit { width: 110px; height: 110px; border-radius: 50%; background: #fff; border: 12px solid #d7141a; color: #111; font-size: 44px; font-weight: 900; display: grid; place-items: center; }
.mg-speed { font-size: 72px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.mg-bar { position: relative; height: 22px; background: rgba(255,255,255,.2); border-radius: 11px; margin: 10px 0 16px; }
.mg-bar .band { position: absolute; top: 0; bottom: 0; background: rgba(0,200,83,.7); border-radius: 11px; }
.mg-bar .needle { position: absolute; top: -6px; width: 6px; height: 34px; margin-left: -3px; background: #fff; border-radius: 3px; }
.mg-pedal { width: 100%; justify-content: center; font-size: 26px; padding: 26px; touch-action: none; user-select: none; -webkit-user-select: none; }
.mg-pedal.on { transform: scale(.97); filter: brightness(1.2); }
.mg-hint { text-align: center; font-size: 14px; opacity: .85; }
.mg-field { position: relative; height: 52vh; border-radius: 10px; overflow: hidden;
  background: linear-gradient(#9ccc7a 0 30%, #bfbfbf 30% 34%, #555 34% 66%, #bfbfbf 66% 70%, #9ccc7a 70%); }
.mg-pop { position: absolute; transform: translate(-50%, -50%); border: 0; background: transparent; font-size: 46px; padding: 6px; animation: pop .2s ease-out; touch-action: manipulation; }
.mg-pop.hit { filter: drop-shadow(0 0 10px #00e676); transform: translate(-50%, -50%) scale(1.3); }
.mg-pop.miss { filter: drop-shadow(0 0 10px #ff1744) grayscale(1); }
.mg-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mg-menu button { background: #fff; color: var(--ink); border: 0; border-radius: 12px; padding: 18px 12px; text-align: center; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.mg-menu .ic { font-size: 44px; display: block; }
.mg-menu b { display: block; margin: 6px 0 4px; font-size: 17px; }
.mg-menu small { color: var(--muted); }
.mg-menu .best { display: block; margin-top: 6px; font-weight: 800; color: var(--purple); font-size: 13px; }

/* zdravověda */
.cpr-btn { width: 220px; height: 220px; border-radius: 50%; border: 0; margin: 10px auto; display: grid; place-items: center; font-size: 60px;
  background: radial-gradient(circle at 50% 40%, #ff5252, #b71c1c); color: #fff; box-shadow: 0 10px 0 #7f0000; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.cpr-btn.push { transform: translateY(8px) scale(.96); box-shadow: 0 2px 0 #7f0000; }
.cpr-btn small { display: block; font-size: 18px; font-weight: 900; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.keypad button { height: 64px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; font-weight: 700; aspect-ratio: 1; justify-self: center; width: 64px; }
.keypad button.call { background: #00c853; }
.keypad button.del { background: transparent; }
.dial-display { text-align: center; font-size: 44px; font-weight: 900; letter-spacing: 6px; min-height: 60px; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.triage-card { background: #fff; color: var(--ink); border-radius: 8px; padding: 10px 12px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.triage-card b { font-size: 16px; }
.triage-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.triage-btns button { border: 3px solid transparent; border-radius: 6px; padding: 8px 4px; font-weight: 800; color: #fff; opacity: .45; }
.triage-btns button.on { opacity: 1; border-color: #111; }
.tg-red { background: #d50000; } .tg-yellow { background: #f9a825; } .tg-green { background: #2e7d32; }
.clues { display: grid; gap: 8px; margin-bottom: 12px; }
.clue { background: #fff; color: var(--ink); border-radius: 8px; padding: 10px 14px; font-weight: 700; font-size: 17px; animation: slidein .35s ease-out; }
.clue small { color: var(--muted); margin-right: 6px; }
.host .clue { font-size: 26px; }

/* ---------- tlačítko Odeslat: vždy vidět nad spodní lištou ---------- */
.btn.send-btn {
  position: fixed; left: 12px; right: 12px; bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  width: auto !important; max-width: 696px; margin: 0 auto !important; z-index: 6;
  justify-content: center; font-size: 22px; padding: 18px 24px;
  background: var(--green); color: #fff; border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 -4px 0 rgba(0, 0, 0, .2);
}
.btn.send-btn:not(:disabled) { animation: sendGlow 1.4s ease-in-out infinite; }
.btn.send-btn:disabled { background: #4a4a55; color: #ddd; opacity: 1; border-color: rgba(255, 255, 255, .35); }
@keyframes sendGlow { 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, .35), 0 8px 24px rgba(0, 0, 0, .45), inset 0 -4px 0 rgba(0, 0, 0, .2); } }
.p-main:has(.send-btn) { padding-bottom: 170px; }

/* ---------- vyhlášení výsledků (plátno) ---------- */
body.podium-on { overflow: hidden; }
.pod-wrap { position: relative; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.pod-beam { position: absolute; top: -20vh; width: 34vw; height: 140vh; pointer-events: none; opacity: .22; filter: blur(6px);
  background: linear-gradient(to bottom, rgba(255, 255, 220, .95), rgba(255, 255, 220, 0) 80%); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); }
.pod-beam.l { left: 4vw; transform-origin: 50% 0; animation: beamL 3.2s ease-in-out infinite alternate; }
.pod-beam.r { right: 4vw; transform-origin: 50% 0; animation: beamR 3.6s ease-in-out infinite alternate; }
@keyframes beamL { from { transform: rotate(-22deg); } to { transform: rotate(18deg); } }
@keyframes beamR { from { transform: rotate(22deg); } to { transform: rotate(-18deg); } }
.pod-wrap.done .pod-beam { opacity: .1; }
.pod-title { position: relative; text-align: center; font-size: clamp(30px, 4.4vw, 60px); font-weight: 900; margin: 1vh 0 0; min-height: 1.3em; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.pod-title.swap { animation: titleIn .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes titleIn { from { transform: scale(.6); opacity: 0; } }
.pod-title.drum { animation: drumShake .12s linear infinite; }
@keyframes drumShake { 25% { transform: translate(-2px, 1px); } 75% { transform: translate(2px, -1px); } }
.podium2 { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 18px; height: 56vh; margin-top: 1vh; }
.podium2 .col { width: min(260px, 28vw); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.podium2 .who { min-height: 4.6em; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; margin-bottom: 10px; visibility: hidden; }
.podium2 .who .nm { font-size: clamp(22px, 2.6vw, 36px); font-weight: 900; line-height: 1.1; word-break: break-word; }
.podium2 .who .cr { font-size: 64px; line-height: 1; visibility: hidden; }
.podium2 .col.on .who { visibility: visible; animation: popName .7s cubic-bezier(.2, 1.6, .4, 1); }
.podium2 .col.on .who .cr { visibility: visible; animation: crownDrop .9s cubic-bezier(.3, 1.5, .5, 1) .25s backwards; }
@keyframes popName { from { transform: translateY(40px) scale(.3); opacity: 0; } }
@keyframes crownDrop { from { transform: translateY(-60vh) rotate(-30deg); } }
.podium2 .blk { position: relative; width: 100%; border-radius: 10px 10px 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 14px;
  font-weight: 900; color: #fff; overflow: hidden; background: #2f3a45; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .22);
  animation: grow 1.1s cubic-bezier(.2, .8, .2, 1) backwards; transform-origin: bottom; transition: background .6s, box-shadow .6s; }
.podium2 .blk .place { font-size: clamp(54px, 7vw, 110px); line-height: 1; opacity: .35; transition: opacity .4s; }
.podium2 .blk .medal { font-size: 64px; line-height: 1; display: none; }
.podium2 .blk .sc { font-size: clamp(22px, 2.4vw, 34px); margin-top: 8px; font-variant-numeric: tabular-nums; }
.podium2 .blk .ok { font-size: 17px; opacity: .85; margin-top: 2px; visibility: hidden; }
.podium2 .col.on .blk .ok { visibility: visible; }
.podium2 .col.on .blk .place { display: none; }
.podium2 .col.on .blk .medal { display: block; animation: popName .6s cubic-bezier(.2, 1.6, .4, 1); }
.podium2 .col.p1.on .blk { background: linear-gradient(180deg, #ffd54f, #f9a825 60%, #c17900); box-shadow: 0 0 60px rgba(255, 213, 79, .7), inset 0 -10px 0 rgba(0, 0, 0, .2); color: #3b2500; }
.podium2 .col.p2.on .blk { background: linear-gradient(180deg, #eceff1, #b0bec5 60%, #78909c); box-shadow: 0 0 40px rgba(236, 239, 241, .45), inset 0 -10px 0 rgba(0, 0, 0, .2); color: #263238; }
.podium2 .col.p3.on .blk { background: linear-gradient(180deg, #ffab76, #d9773a 60%, #9c4a17); box-shadow: 0 0 40px rgba(255, 171, 118, .45), inset 0 -10px 0 rgba(0, 0, 0, .2); }
.podium2 .col.on .blk::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 2.6s ease-in-out .3s infinite; }
@keyframes shine { 0% { left: -60%; } 45%, 100% { left: 130%; } }
.pod-rest { opacity: 0; max-width: 760px; margin: 14px auto 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 20px; }
.pod-rest.on { opacity: 1; }
.pod-rest .line { display: flex; gap: 12px; background: #fff; color: var(--ink); border-radius: 6px; padding: 8px 16px; font-size: 20px; font-weight: 800; }
.pod-rest.on .line { animation: slidein .45s ease-out backwards; }
.pod-rest .line .pts { margin-left: auto; font-variant-numeric: tabular-nums; }
.pod-foot { opacity: 0; pointer-events: none; transition: opacity .6s; }
.pod-foot.on { opacity: 1; pointer-events: auto; }
.pod-skip { position: absolute; right: 18px; bottom: 14px; font-size: 14px; opacity: .55; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }

/* ---------- vyhlášení výsledků (mobil) ---------- */
.pp-drum { font-size: 96px; line-height: 1; animation: drumHit .28s ease-in-out infinite alternate; }
@keyframes drumHit { from { transform: rotate(-8deg) scale(.95); } to { transform: rotate(8deg) scale(1.05); } }
.pp-medal { font-size: 120px; line-height: 1; animation: medalIn 1s cubic-bezier(.2, 1.5, .4, 1); filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); }
@keyframes medalIn { from { transform: scale(0) rotate(-200deg); opacity: 0; } }
.pp-rank { font-size: 44px; font-weight: 900; margin: 0; animation: popName .6s cubic-bezier(.2, 1.6, .4, 1) .35s backwards; }
.pp-msg { font-size: 20px; font-weight: 700; margin: 0; animation: slidein .5s ease-out .6s backwards; }
.pp-score { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pp-acc { width: 100%; max-width: 360px; }
.pp-acc .bar { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: 6px; }
.pp-acc .bar > div { height: 100%; width: 0; background: #00e676; border-radius: 7px; transition: width 1.4s cubic-bezier(.2, .8, .2, 1) .5s; }
.pp-top { width: 100%; max-width: 360px; text-align: left; animation: slidein .5s ease-out 1s backwards; }
.pp-top .me { outline: 3px solid #ffd54f; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .pod-beam, .pod-title.drum, .pp-drum, .btn.send-btn:not(:disabled), .podium2 .col.on .blk::after { animation: none !important; }
}

/* ---------- mobil: otázka oddělená od odpovědí ---------- */
.p-main .p-q-text {
  background: rgba(0, 0, 0, .28); border: 2px solid rgba(255, 255, 255, .18); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0 22px; position: relative;
}
.p-main .p-q-text::after {
  content: ''; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  width: 56px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35);
}

/* ---------- mobil: obrázky a přiblížení ---------- */
.q-img { position: relative; display: block; margin: -8px auto 18px; padding: 8px; border: 0; border-radius: 12px; background: #fff; max-width: 100%; }
.q-img img { display: block; max-height: 24vh; max-width: 100%; margin: 0 auto; object-fit: contain; }
.zoom-btn {
  position: absolute; top: 6px; right: 6px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; line-height: 1; cursor: pointer; pointer-events: auto;
  background: rgba(0, 0, 0, .65); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.img-tile { position: relative; }
.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(10, 6, 20, .94); display: grid; place-items: center;
  touch-action: none; overscroll-behavior: contain; animation: lbIn .18s ease-out;
}
@keyframes lbIn { from { opacity: 0; } }
.lightbox img {
  max-width: 96vw; max-height: 84vh; object-fit: contain; background: #fff; border-radius: 10px; padding: 10px;
  transform-origin: center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
.lb-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: #fff; color: var(--ink); font-size: 26px; font-weight: 900; box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
.lb-hint { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: #fff; opacity: .75; font-weight: 700; font-size: 15px; pointer-events: none; }
.p-main:has(.q-img) .tiles { min-height: 34vh; }
.q-img .zoom-btn { top: -12px; right: -12px; width: 36px; height: 36px; font-size: 17px; border: 2px solid #fff; }
.img-tile .zoom-btn { width: 34px; height: 34px; font-size: 16px; top: 4px; right: 4px; }
.stage .zoom-btn { top: 8px; right: 8px; line-height: 1; }

/* ================= 2026-10: úpravy hratelnosti ================= */

/* ---------- celá dovednostní otázka na jednu obrazovku (bez posouvání) ---------- */
body.fit { overflow: hidden; }
body.fit .p-main {
  height: calc(100dvh - 44px - 48px); padding: 8px 12px 10px; display: flex; flex-direction: column; overflow: hidden;
}
body.fit .p-main > .timer-bar { flex: none; margin-bottom: 8px; }
.fit-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fit-box > * { flex: none; }
.fit-box .fit-stage { flex: 1 1 auto; min-height: 140px; }
.p-main .p-q-text.compact { font-size: 16px; padding: 8px 12px; margin: 0 0 6px; }
.p-main .p-q-text.compact::after { display: none; }
.fit-info { text-align: center; margin: 0 0 6px; font-weight: 700; opacity: .9; font-size: 14px; }
.fit-box .brake-track { height: auto; width: 100%; max-width: 340px; }
.fit-box .brake-btn { margin-top: 8px; padding: 14px; font-size: 26px; }
.brake-track:has(canvas) { background: #6f9e52; }
.brake-track:has(canvas)::after { display: none; }
.brake-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.brake-track .brake-msg { top: 42%; }

/* ---------- posuvník: velký jezdec, −/+, stupnice ---------- */
.sv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sv-row .slider-value { flex: 1; line-height: 1.1; font-variant-numeric: tabular-nums; }
.slider-value { font-size: clamp(32px, 10vw, 52px); }
.slider-value small { font-size: .45em; white-space: nowrap; }
.sv-step { width: 58px; height: 58px; flex: none; border-radius: 50%; border: 0; background: var(--purple); color: var(--signal);
  font-size: 34px; font-weight: 900; line-height: 1; touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.sv-step:active { transform: translateY(2px); box-shadow: none; }
.rail { position: relative; margin: 14px 0 0; }
.big-range { -webkit-appearance: none; appearance: none; width: 100%; height: 56px; margin: 0; background: transparent; touch-action: none; display: block; }
.big-range:focus { outline: none; }
.big-range::-webkit-slider-runnable-track { height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--signal) var(--p, 50%), #d4d9de var(--p, 50%)); }
.big-range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 44px; margin-top: -14px; border-radius: 50%; background: var(--purple); border: 6px solid var(--signal); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.big-range::-moz-range-track { height: 16px; border-radius: 8px; background: #d4d9de; }
.big-range::-moz-range-progress { height: 16px; border-radius: 8px; background: var(--signal); }
.big-range::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; background: var(--purple); border: 6px solid var(--signal); }
.ticks { position: relative; height: 46px; margin: 0 22px; }
.tick { position: absolute; top: 0; width: 2px; height: 9px; background: #a7afb8; transform: translateX(-50%); }
.tick.major { width: 3px; height: 16px; background: var(--purple); }
.tick-lbl { position: absolute; top: 16px; transform: translateX(-50%); border: 0; background: none; padding: 4px 2px; font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sv-hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- otázka jasně oddělená od odpovědí ---------- */
.p-main .p-q-text { border-left: 6px solid var(--signal); margin-bottom: 28px; }
.p-main .tiles { gap: 12px; }
.chips { gap: 8px; }
.match-row .chips { display: grid; grid-template-columns: repeat(4, 1fr); }
.match-row .chips .chip { min-width: 0; padding: 8px 4px; }
.pool-title { margin: 22px 0 10px; font-weight: 800; font-size: 20px; opacity: .85; }
.pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pool-chip { background: #fff; color: var(--ink); border-radius: 8px; padding: 8px 16px; font-weight: 800; font-size: 22px; box-shadow: 0 3px 0 rgba(0,0,0,.2); }

/* ---------- výsledek na plátně dřív než na mobilu ---------- */
.look-bar { width: min(280px, 80%); height: 8px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
.look-bar > div { height: 100%; background: var(--signal); }
.phones-note { font-size: 16px; opacity: .8; }

/* ---------- série a shoda bodů ---------- */
.streak-badge { background: linear-gradient(90deg, #ff6d00, #ffc61a); color: #1b1b1f; font-weight: 900; font-size: 20px; border-radius: 8px; padding: 8px 16px; animation: pop .5s ease-out; }
.streak-mini { font-weight: 800; opacity: .9; }
.streak-chip { background: rgba(255,109,0,.15); color: #c43e00; border-radius: 6px; padding: 2px 8px; font-size: 18px; }
.streak-chip.hot { background: #ffc61a; color: #1b1b1f; }
.tie-chip { background: #eef1f4; color: var(--muted); border-radius: 6px; padding: 2px 8px; font-size: 16px; }
.board-note { text-align: center; opacity: .75; font-weight: 700; margin: 8px 0 0; }

/* ---------- novinky: blinkr, kontrolky, světla ---------- */
.chip.sig { font-size: 14px; }
.match-row .sig-chips { grid-template-columns: repeat(2, 1fr); }
.dash-ic { display: inline-grid; place-items: center; flex: none; filter: drop-shadow(0 0 6px currentColor); }
.dash-ic svg { width: 100%; height: 100%; }
.dash-ic.off { color: #59626b !important; filter: none; }
.dash-list { display: grid; gap: 10px; }
.dash-card { background: #101418; border: 2px solid #2d363f; border-radius: 12px; padding: 10px; display: flex; gap: 12px; align-items: center; }
.dash-lit { width: 74px; height: 74px; display: grid; place-items: center; background: #05070a; border-radius: 10px; flex: none; }
.dash-btns { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dash-btns button { border: 3px solid transparent; border-radius: 8px; padding: 8px 2px; color: #fff; font-size: 20px; opacity: .5; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dash-btns button small { font-size: 11px; font-weight: 800; }
.dash-btns button.on { opacity: 1; border-color: #fff; }
.dc-stop { background: #b3132a; } .dc-service { background: #b07d00; } .dc-info { background: #22703a; }
.dash-board { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; background: #05070a; border-radius: 16px; padding: 24px; max-width: 1100px; margin: 0 auto 10px; }
.lamp-host { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; color: #ccc; }
.lamp-host.ok { color: #00e676; }
.lamp-host small { font-weight: 600; opacity: .8; }
.dash-reveal { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; max-width: 1200px; margin: 0 auto; text-align: left; }
.dash-rv { display: flex; gap: 14px; align-items: center; background: #05070a; border-left: 10px solid; border-radius: 10px; padding: 10px 14px; font-size: 19px; }
.dash-prev { display: inline-grid; place-items: center; background: #05070a; border-radius: 8px; padding: 4px; }
.lamp-panel { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: #101418; border-radius: 14px; padding: 12px; }
.lamp-sw { position: relative; display: flex; align-items: center; gap: 10px; border: 2px solid #2d363f; background: #05070a; color: #cfd6dd; border-radius: 10px; padding: 10px; font-weight: 800; font-size: 15px; text-align: left; }
.lamp-sw.on { border-color: var(--signal); color: #fff; }
.lamp-sw .led { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #333; }
.lamp-sw.on .led { background: #00e676; box-shadow: 0 0 8px #00e676; }

/* ---------- novinky: otáčkoměr, smyk, kruháč ---------- */
.gear-dash { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 0; }
.gear-dash .gauge { height: 100%; max-height: 300px; width: auto; max-width: 68%; }
.gear-dash.host .gauge { height: 42vh; max-width: none; }
.gear-side { display: flex; flex-direction: column; align-items: center; }
.gear-side small { opacity: .75; font-weight: 700; }
.gear-no { font-size: 64px; font-weight: 900; color: var(--signal); line-height: 1; }
.gear-speed { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gear-msg { text-align: center; font-weight: 800; font-size: 18px; min-height: 28px; margin: 6px 0; }
.skid-road { position: relative; height: 100%; min-height: 160px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(90deg, #dfe8ef 0 8%, #5a6168 8% 92%, #dfe8ef 92%); }
.skid-road::before { content: ''; position: absolute; left: 49%; width: 2%; top: -44px; bottom: 0; background: repeating-linear-gradient(#fff 0 22px, transparent 22px 44px); animation: roadRun .5s linear infinite; }
@keyframes roadRun { to { transform: translateY(44px); } }
.skid-car { position: absolute; left: 50%; top: 50%; width: 60px; height: 104px; margin: -52px 0 0 -30px; border-radius: 14px; background: #ffc61a; border: 3px solid #111;
  transition: transform .18s ease-out; transform-origin: 50% 25%; }
.skid-glass { position: absolute; left: 8px; right: 8px; top: 16px; height: 20px; border-radius: 4px; background: #bfe3ff; }
.skid-car.sk-R { transform: rotate(-28deg); } /* záď ujíždí doprava → příď se stáčí doleva */
.skid-car.sk-L { transform: rotate(28deg); }
.skid-arrow { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap; font-weight: 900; color: #ff1744; text-shadow: 0 1px 2px #fff; font-size: 18px; }
.skid-host { height: 46vh; max-width: 520px; margin: 0 auto 10px; }
.steer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.steer { border: 0; border-radius: 14px; background: #fff; color: var(--ink); font-size: 40px; font-weight: 900; padding: 10px 6px; display: flex; flex-direction: column; align-items: center;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); }
.steer small { font-size: 14px; }
.steer:active { transform: translateY(2px); }
.steer:disabled { opacity: .45; }
.rb-stage { display: grid; place-items: center; min-height: 0; }
.rb-svg { height: 100%; max-height: 420px; width: auto; max-width: 100%; border-radius: 12px; }
.rb-host { height: 52vh; display: grid; place-items: center; }
.rb-host .rb-svg { height: 100%; max-height: none; }
.rb-car .blink.on { animation: blinkAnim .7s steps(2, start) infinite; }
@keyframes blinkAnim { to { opacity: 0; } }

/* ---------- novinky: pruhy, ulice, pohled ---------- */
.lanes-wrap { text-align: center; }
.lanes-svg { width: 100%; height: auto; max-width: 360px; border-radius: 12px; display: inline-block; vertical-align: top; }
.lanes-wrap.host .lanes-svg { display: block; margin: 0 auto; max-width: 100%; height: 44vh; width: auto; }
.lanes-svg .pickable { cursor: pointer; }
.lane-car { transition: transform .25s ease-out; }
.zone-wrap { background: #fff; border-radius: 12px; padding: 6px; }
.zone-svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.zone-svg.pickable { cursor: crosshair; touch-action: manipulation; }
.zone-wrap.host { max-width: 1300px; margin: 0 auto 10px; }
.glance-img { background: #fff; border-radius: 12px; padding: 6px; }
.glance-img img { display: block; width: 100%; max-height: 52vh; object-fit: contain; }
.glance-img.host img { max-height: 54vh; }
.glance-img.host.small img { max-height: 26vh; }
.glance-bar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.2); overflow: hidden; margin-top: 10px; }
.glance-bar > div { height: 100%; background: var(--signal); }
.glance-gone { text-align: center; font-weight: 800; font-size: 18px; margin: 0 0 12px; }

/* knihovna otázek */
.bank-group { border-top: 1px solid rgba(0,0,0,.08); padding: 6px 0; }
.bank-group summary { cursor: pointer; list-style: none; }
.bank-group summary::-webkit-details-marker { display: none; }
.bank-group summary .check { margin: 6px 0; }
.bank-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 18px; padding-left: 30px; }
.bank-topic { margin: 5px 0; }
.link-btn { background: none; border: 0; padding: 4px 0; color: inherit; opacity: .75; text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.link-btn:hover { opacity: 1; }
.report-box { margin-top: 10px; width: 100%; max-width: 420px; }
.report-box textarea { width: 100%; margin-bottom: 6px; }
.h-ref { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 16px; opacity: .85; }
.h-report { display: inline-flex; gap: 6px; align-items: center; }
.h-report .input { width: 320px; padding: 6px 10px; font-size: 15px; }

/* ================= 2026-10-21: plátno bez posouvání, celá věta u „Najdi chybu“, další kvíz ================= */
#app.host { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
/* Oblast, do které se obsah zmenší (zoom), když by se nevešel – plátno se nikdy neposouvá. */
.h-area { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.h-fit { width: 100%; }
.h-mid { grid-template-rows: minmax(0, 1fr); }
.h-mid .content.h-area { align-self: stretch; }
.h-qtext { flex: none; }
#app.host > .h-tiles, #app.host > .h-footer, #app.host > .h-bar { flex: none; }
.host .words-card { max-width: 1200px; margin: 0 auto; }
.host .word { font-size: clamp(20px, 2.2vw, 32px); padding: 8px 14px; }
.spot-sentence { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 16px 24px; max-width: 1200px; margin: 0 auto 16px;
  font-size: clamp(20px, 2.2vw, 32px); font-weight: 700; line-height: 1.45; text-align: left; border-left: 8px solid var(--signal); }
.spot-sentence .wrong { background: var(--red); color: #fff; padding: 0 8px; border-radius: 4px; text-decoration: line-through; }
.spot-sentence .fix { background: var(--green); color: #fff; padding: 0 8px; border-radius: 4px; margin-left: 6px; }
.next-quiz { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.nq-list { display: grid; gap: 6px; max-height: 55vh; overflow: auto; margin-top: 10px; }
.nq-item { display: flex; gap: 10px; align-items: center; text-align: left; border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; }
.nq-item:hover { border-color: var(--purple); }
.nq-item b { flex: 1; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 18px; }
.skill-grid .check { margin: 6px 0; align-items: center; }
.skill-grid select { width: auto; padding: 2px 6px; margin-left: auto; }
#app.host .h-reveal .bars { height: 24vh; }
.keep-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; border-left: 6px solid var(--signal); }

/* Zastav na čáře: úvodní karta, údaj „do čáry“, výsledek */
.brake-dist { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.7); color: #ffc61a; font-weight: 900; padding: 4px 10px; border-radius: 6px; z-index: 4; font-size: 18px; font-variant-numeric: tabular-nums; }
.brake-dist:empty { display: none; }
.brake-track .brake-msg.intro { top: 6px; bottom: 6px; left: 6px; right: 6px; display: flex; align-items: center; justify-content: center; text-shadow: none; padding: 0; }
.brake-intro { background: rgba(17,17,17,.92); border: 2px solid #ffc61a; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; line-height: 1.3; max-width: 420px; text-align: left; }
.brake-intro b { color: #ffc61a; font-size: 20px; }
.brake-rule { background: #ffc61a; color: #111; border-radius: 8px; padding: 6px 8px; font-weight: 800; }
.brake-count { align-self: center; font-size: 40px; font-weight: 900; color: #ffc61a; line-height: 1; margin-top: 4px; }
.brake-track .brake-msg.ok, .brake-track .brake-msg.bad { top: 26%; }
.brake-msg.ok > div, .brake-msg.bad > div { display: inline-block; background: rgba(0,0,0,.72); border-radius: 10px; padding: 8px 12px; }
.brake-msg small { display: block; font-size: 14px; font-weight: 700; color: #fff; margin-top: 4px; }

/* ---------- lobby: hráč s delším časem ---------- */
.h-name .xt { display: none; margin-left: 6px; }
.h-name.extra .xt { display: inline; }
.h-name.extra { box-shadow: inset 0 0 0 3px var(--signal); }

/* ---------- pauza a vysvětlení přes celé plátno ---------- */
.pause-veil, .p-pause { position: fixed; inset: 0; z-index: 60; background: rgba(10,14,18,.86); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.pause-veil .pv-icon, .p-pause .pv-icon { font-size: 120px; line-height: 1; color: var(--signal); }
.pause-veil .pv-text { font-size: 64px; font-weight: 900; }
.p-pause .pv-icon { font-size: 80px; }
.h-timer.extra { background: var(--signal); color: var(--signal-ink); }
.explain-full { position: fixed; inset: 0; z-index: 70; background: rgba(10,14,18,.93); display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.ef-box { background: #fff; color: var(--ink); border-radius: 18px; border-top: 10px solid var(--signal); padding: 3vh 3vw; max-width: 1500px; width: 100%; max-height: 94vh; overflow: auto; display: flex; flex-direction: column; gap: 2vh; }
.ef-box.wide { max-width: 1700px; }
.ef-q { font-size: clamp(22px, 2.6vw, 44px); font-weight: 800; }
.ef-ans { font-size: clamp(22px, 2.4vw, 40px); font-weight: 900; color: var(--ok); }
.ef-img { max-height: 32vh; max-width: 100%; object-fit: contain; align-self: center; border-radius: 10px; }
.ef-text { font-size: clamp(22px, 2.4vw, 42px); line-height: 1.35; }
.ef-ref { font-size: clamp(16px, 1.5vw, 26px); color: var(--muted); }
.ef-box > .btn { align-self: center; }

/* ---------- vyhlášení: odznaky, celkové pořadí relace ---------- */
.pod-badges { display: flex; gap: 4px; justify-content: center; font-size: 28px; margin-top: 6px; flex-wrap: wrap; }
.mini-badge { font-size: .9em; margin-left: 2px; }
.sess-t { width: 100%; border-collapse: collapse; font-size: clamp(16px, 1.7vw, 28px); }
.sess-t th, .sess-t td { padding: .45em .6em; border-bottom: 1px solid var(--line); text-align: left; }
.sess-t th { background: var(--purple); color: #fff; position: sticky; top: 0; }
.sess-t td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sess-t td.total { font-weight: 900; font-size: 1.15em; }
.sess-t tr.top1 { background: #fff6d6; } .sess-t tr.top2 { background: #f1f3f5; } .sess-t tr.top3 { background: #fbeee4; }
.nq-list.grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.nq-list.grid .nq-item { flex-direction: column; align-items: flex-start; }
.nq-desc { font-size: 14px; color: var(--muted); }

/* ---------- mobil: vyhlášení, čitelnost ---------- */
.pp-badges { display: grid; gap: 6px; width: 100%; max-width: 420px; margin: 8px auto; }
.pp-badge { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; background: rgba(255,255,255,.1); border: 1px solid rgba(255,198,26,.6); border-radius: 10px; padding: 6px 10px; }
.pp-badge .bi { grid-row: span 2; font-size: 32px; align-self: center; }
.pp-badge small { opacity: .85; }
.pp-session { color: var(--ink); max-width: 420px; margin: 8px auto; }
.a11y-btn { margin-left: 8px; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; font-weight: 900; padding: 3px 9px; font-size: 15px; cursor: pointer; }
.a11y-modal { color: var(--ink); }
body.a11y-big { font-size: 120%; }
body.a11y-big .p-q-text { font-size: 1.35em; }
body.a11y-big .tile { font-size: 1.25em; min-height: 90px; }
body.a11y-big .p-bottom, body.a11y-big .p-top { font-size: 1.15em; }
body.a11y-contrast.game { background: #000 !important; background-image: none !important; }
body.a11y-contrast .p-q-text, body.a11y-contrast h1, body.a11y-contrast h2, body.a11y-contrast p { color: #fff; }
body.a11y-contrast .tile { background: #000 !important; color: #fff !important; border: 4px solid #fff !important; box-shadow: none !important; }
body.a11y-contrast .tile .shape { background: #fff !important; color: #000 !important; }
body.a11y-contrast .btn { border: 3px solid #fff; }
body.a11y-contrast .timer-bar > div { background: #fff !important; }

/* ---------- televize: párovací obrazovka, plátno jen pro čtení ---------- */
.tv-box { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.tv-box h1 { font-size: 48px; margin: 0; }
.tv-box p { font-size: 26px; margin: 0; }
.tv-code { font-size: 140px; font-weight: 900; letter-spacing: .15em; color: var(--signal); line-height: 1; font-family: Consolas, monospace; }
.tv-box .qr { background: #fff; padding: 12px; border-radius: 12px; }
body.tv-mode .h-footer .btn, body.tv-mode .h-bar .btn, body.tv-mode .next-quiz, body.tv-mode .pod-foot .h-footer, body.tv-mode .pause-veil .btn { display: none !important; }

/* ---------- ovladač na mobilu ---------- */
.remote { max-width: 520px; margin: 0 auto; }
.rm-status { background: var(--purple); color: #fff; border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; font-weight: 600; }
.rm-title { font-size: 20px; font-weight: 900; color: var(--signal); }
.rm-q { font-size: 15px; opacity: .85; margin-top: 4px; }
.rm-btns { display: grid; gap: 10px; margin-top: 14px; }
.rm-btns .btn { width: 100%; justify-content: center; min-height: 70px; font-size: 22px; }

/* ---------- osobní karta ---------- */
.kc-wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.kc-top { margin-bottom: 6px; }
.kc-game { margin-top: 16px; }
.kc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kc-stats > div { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; display: grid; }
.kc-stats b { font-size: 26px; }
.kc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.kc-badge { background: #fff6d6; border: 1px solid var(--signal); border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 14px; }
.kc-item { border: 2px solid var(--line); border-left-width: 8px; border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #fff; break-inside: avoid; }
.kc-item.ok { border-left-color: var(--ok); } .kc-item.bad { border-left-color: var(--bad); } .kc-item.part { border-left-color: var(--yellow); }
.kc-head { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.kc-pts { font-weight: 800; color: var(--ink); }
.kc-q { font-weight: 700; font-size: 17px; margin: 4px 0 6px; }
.kc-img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; margin: 6px 0; }
.kc-row { margin: 3px 0; } .kc-row.good { color: var(--ok); }
.kc-expl { background: #f1f8f3; border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.kc-ref { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kc-perfect { font-size: 18px; font-weight: 700; }
.print-sign { display: none; }
@media print {
  .no-print { display: none !important; }
  .print-sign { display: flex; justify-content: space-between; margin-top: 40px; }
  .kc-wrap { padding: 0; }
}

/* ---------- pokyny policisty ---------- */
.police-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.police-step { font-weight: 800; opacity: .85; }
.police-fig { background: linear-gradient(#9ec5e8, #cfe3f3 55%, #6b7178 55%, #4a4f55); border-radius: 14px; padding: 8px 20px 4px; position: relative; }
.police-car { position: absolute; left: 8px; top: 6px; font-size: 12px; font-weight: 700; color: #1b1b1f; background: rgba(255,255,255,.7); border-radius: 6px; padding: 1px 6px; }
.police-btns { display: grid; gap: 8px; width: 100%; max-width: 420px; }
.police-btn { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; padding: 12px 16px; border-radius: 12px; border: 4px solid; background: #fff; color: #1b1b1f; cursor: pointer; }
.police-btn span { font-size: 26px; }
.police-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.police-card { background: linear-gradient(#9ec5e8, #cfe3f3 55%, #6b7178 55%, #4a4f55); border: 5px solid transparent; border-radius: 14px; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; }
.police-card > b { align-self: flex-start; color: #1b1b1f; font-size: 22px; }
.police-ans { color: #fff; font-weight: 900; border-radius: 8px; padding: 4px 10px; font-size: 20px; }
.police-card small { font-size: 15px; }

/* ---------- společná křižovatka ---------- */
.drive-svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.drive-wrap { background: #222; border-radius: 12px; }
.drive-veh.mine .drive-ring { fill: none; stroke: #ffc61a; stroke-width: 8; animation: drive-pulse 1s ease-in-out infinite; }
@keyframes drive-pulse { 50% { stroke-opacity: .25; } }
.drive-me { text-align: center; font-size: 18px; margin: 4px 0 8px; }
.drive-me b { background: #ffc61a; color: #111; border-radius: 6px; padding: 0 8px; }
.drive-banner { --p: 0%; margin: 8px 0; padding: 8px 12px; border-radius: 10px; font-weight: 800; text-align: center;
  background: linear-gradient(90deg, rgba(255,198,26,.45) var(--p), rgba(255,255,255,.12) var(--p)); }
.drive-banner.host { font-size: clamp(20px, 2vw, 34px); background: rgba(255,198,26,.2); }
.drive-go { width: 100%; justify-content: center; min-height: 76px; font-size: 28px; background: #2b8a3e; color: #fff; }
.drive-go:disabled { background: #555; }
.drive-host { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; text-align: left; }
.drive-wrap.host { max-height: 68vh; }
.drive-wrap.host .drive-svg { max-height: 68vh; }
.drive-side { display: grid; gap: 10px; font-size: clamp(16px, 1.4vw, 24px); }
.drive-live { display: grid; gap: 6px; }
.drive-live .dl { background: rgba(255,255,255,.1); border-radius: 8px; padding: 6px 10px; }
.drive-live .dl.good { border-left: 6px solid #2ecc71; } .drive-live .dl.badv { border-left: 6px solid #ff5252; }
.drive-log h3 { margin: 0 0 6px; }
.drive-log .dl-row { padding: 4px 0; }
.drive-log .bad { color: #ff8a80; } .drive-log .ok { color: #69f0ae; }
.drive-boom { animation: boom .4s ease-out; }
@keyframes boom { from { transform-box: fill-box; opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) { .drive-host { grid-template-columns: 1fr; } }

/* ---------- přizpůsobená obtížnost ---------- */
.adaptive-box { border: 2px dashed var(--signal); background: #fffbea; border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.lvl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1400px; margin: 0 auto; }
.lvl { background: rgba(255,255,255,.1); border-radius: 14px; padding: 14px; border-top: 8px solid; display: grid; gap: 6px; text-align: center; }
.lvl1 { border-color: #2ecc71; } .lvl2 { border-color: #ffc61a; } .lvl3 { border-color: #ff5252; }
.lvl-n { font-size: 72px; font-weight: 900; line-height: 1; }
.lvl.wide { text-align: left; font-size: clamp(16px, 1.4vw, 24px); }
.lvl-a { color: #69f0ae; font-weight: 800; }
