/* Záhada kontaminované vody – vzhled převzatý z prezentace: podmořský svět, svítící tyrkysové nadpisy, skleněné panely. */

@font-face { font-family: 'Lexend'; font-weight: 400; font-display: swap; src: url('/fonts/lexend-latin-ext-400-normal.woff2') format('woff2'); 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: 'Lexend'; font-weight: 400; font-display: swap; src: url('/fonts/lexend-latin-400-normal.woff2') format('woff2'); 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; }
@font-face { font-family: 'Lexend'; font-weight: 600; font-display: swap; src: url('/fonts/lexend-latin-ext-600-normal.woff2') format('woff2'); 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: 'Lexend'; font-weight: 600; font-display: swap; src: url('/fonts/lexend-latin-600-normal.woff2') format('woff2'); 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; }
@font-face { font-family: 'Lexend'; font-weight: 700; font-display: swap; src: url('/fonts/lexend-latin-ext-700-normal.woff2') format('woff2'); 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: 'Lexend'; font-weight: 700; font-display: swap; src: url('/fonts/lexend-latin-700-normal.woff2') format('woff2'); 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 {
  --deep: #021a2e;
  --ocean: #06304f;
  --panel: rgba(8, 48, 82, 0.62);
  --panel-strong: rgba(10, 60, 100, 0.8);
  --edge: rgba(150, 228, 255, 0.42);
  --text: #eaf8ff;
  --muted: #a6cde0;
  --heading: #c8f6ff;
  --cyan: #7fe9ff;
  --gold: #f5c04a;
  --ok: #6ee7a8;
  --late: #ffb357;
  --bad: #ff8080;
  --radius: 20px;
  --title-glow: 0 0 4px #e4fbff, 0 0 12px #8eefff, 0 0 26px #39cfff, 0 0 44px rgba(57, 207, 255, 0.6);
  --soft-glow: 0 0 10px rgba(127, 233, 255, 0.55);
  --footer-h: 44px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Lexend', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--deep);
  background-image:
    linear-gradient(180deg, rgba(2, 26, 46, 0) 0, rgba(2, 26, 46, 0) 14vw, var(--deep) 30.5vw),
    url('/img/bg.jpg');
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); }
button { font: inherit; }
sub, sup { font-size: 0.7em; line-height: 0; }
.site-footer { min-height: var(--footer-h); padding: 12px 16px; font-size: 13px; line-height: 20px; text-align: center; color: var(--muted); }
.site-footer span { white-space: nowrap; }
/* Na užších displejích se patička zalomí do dvou nebo tří řádků. */
@media (max-width: 660px) { :root { --footer-h: 64px; } }
@media (max-width: 460px) { :root { --footer-h: 84px; } }

/* ---------- Přepínač jazyka ---------- */

.lang-bar { display: flex; justify-content: flex-end; max-width: 1200px; margin: 0 auto; padding: 10px 16px 0; }
.lang-switch { margin: 0; }
.lang-switch label { display: inline-flex; align-items: center; gap: 6px; }
.lang-icon { font-size: 1rem; line-height: 1; }
.lang-switch select {
  padding: 5px 28px 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(2, 26, 46, 0.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a6cde0'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  appearance: none;
  cursor: pointer;
}
.lang-switch select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lang-switch button { margin-left: 6px; }
.lang-switch option { background: var(--deep); color: var(--text); }
/* Pod lištou s přepínačem (≈ 44 px) se úvodní a chybové stránky vejdou na výšku okna bez posouvání. */
.lang-bar + .screen.center, .lang-bar + #app .screen.center { min-height: calc(100vh - var(--footer-h) - 44px); padding-top: 8px; }

.screen { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
.screen.center { min-height: calc(100vh - var(--footer-h)); display: grid; place-items: center; }
.loading { text-align: center; color: var(--muted); }
.center-text { text-align: center; }
.hint { color: var(--muted); font-size: 0.9em; }
.gold { color: var(--gold); font-weight: 700; }
.accent { color: var(--cyan); }

/* ---------- Typografie ---------- */

.glow-title {
  margin: 0.2em 0 0.4em;
  font-weight: 700;
  color: #0b2b46;
  text-shadow: var(--title-glow);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.page-title { text-align: center; font-size: clamp(1.9rem, 5vw, 3.4rem); }
.glow-title.warn { color: #3a1606; text-shadow: 0 0 4px #fff2d6, 0 0 12px #ffc46b, 0 0 26px #ff9a2e; }
.lead { max-width: 900px; margin: 0 auto 24px; text-align: center; font-size: 1.12em; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }

/* ---------- Skleněné panely ---------- */

.glass {
  background: var(--panel);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(110, 220, 255, 0.16), 0 10px 34px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px 22px;
}
.glass.narrow { max-width: 640px; margin: 0 auto; }
.panels { display: grid; gap: 20px; }
.panels.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.panels.three { grid-template-columns: 1fr; }
@media (min-width: 960px) { .panels.three { grid-template-columns: 1fr 1.1fr 0.9fr; } }
.panel h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  text-align: center;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--heading);
  text-shadow: var(--soft-glow);
  border-bottom: 1px solid rgba(150, 228, 255, 0.35);
}
.panel p { margin: 0.5em 0; }
.panel img.tools { border-radius: 14px; margin: 0 auto 12px; }

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--edge);
  background: rgba(20, 80, 120, 0.55);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover { box-shadow: 0 0 16px rgba(127, 233, 255, 0.45); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(180deg, #4fd9ff 0%, #1696cf 55%, #0b6aa0 100%);
  border-color: #bff5ff;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 40, 70, 0.7);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5), 0 0 18px rgba(79, 217, 255, 0.45);
}
.btn.big { min-height: 60px; padding: 12px 56px; font-size: 1.35rem; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-top: 16px; }

/* Bublinová tlačítka odpovědí jako ve slidech */
.options { display: grid; gap: 16px; margin-top: 18px; }
.bubble {
  position: relative;
  min-height: 64px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid rgba(200, 244, 255, 0.75);
  background:
    radial-gradient(120% 70% at 30% 10%, rgba(255, 255, 255, 0.45) 0, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, rgba(120, 200, 240, 0.35), rgba(20, 70, 110, 0.55));
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 30, 60, 0.8);
  box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.35), inset 0 -4px 10px rgba(0, 40, 80, 0.4), 0 0 16px rgba(110, 220, 255, 0.35);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}
.bubble:hover:not(:disabled) { transform: translateY(-2px); box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.4), 0 0 26px rgba(127, 233, 255, 0.7); }
.bubble:disabled { cursor: wait; opacity: 0.7; }
.bubble.chosen { opacity: 1; border-color: var(--gold); }
.question { text-align: center; font-size: 1.25em; margin: 8px 0; }
.solved-note { text-align: center; font-size: 1.15em; margin-top: 24px; }
.solved-note .gold { font-size: 2em; }

.back { display: inline-block; margin-bottom: 4px; color: var(--heading); text-decoration: none; font-weight: 600; text-shadow: 0 1px 4px #000; }
.back:hover { text-decoration: underline; }

/* ---------- Horní lišta ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(2, 26, 46, 0.86);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.95rem;
}
.topbar[hidden] { display: none; }
.topbar .who { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--heading); white-space: nowrap; }
.timer.warn { color: var(--late); }
.timer.over { color: var(--bad); }
.timer.ok { color: var(--ok); }
.digits { display: flex; gap: 4px; }
.digit {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 32px;
  border-radius: 8px;
  background: rgba(245, 192, 74, 0.18);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
}
.digit.empty { border-color: rgba(150, 228, 255, 0.35); background: transparent; color: var(--muted); }
@media (max-width: 520px) { .topbar .who { display: none; } }

/* ---------- Úvod ---------- */

.hero { width: 100%; max-width: 980px; margin: 0 auto 8px; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.intro .page-title { font-size: clamp(1.4rem, 3.4vw, 2.4rem); text-transform: uppercase; }
/* Ostatní jazyky: dolní část obrázku bez českého nápisu a název hry jako text. */
.hero-crop { position: relative; overflow: hidden; aspect-ratio: 1600 / 560; }
.hero-crop img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.hero-title { margin: 0 0 12px; text-align: center; font-size: clamp(1.5rem, 4.6vw, 2.4rem); line-height: 1.15; }
.reward { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.reward img { width: 120px; flex: none; border-radius: 12px; }
.start-box { max-width: 720px; margin: 24px auto 0; text-align: center; }
.who-big { margin: 0 0 4px; font-weight: 600; color: var(--heading); }
.note { margin: 8px 0; }
.intro-card { text-align: center; }
.intro-card .hero { margin-bottom: 16px; }

/* ---------- Akvárium ---------- */

.aquarium { position: relative; max-width: 1100px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 2px var(--edge), 0 14px 44px rgba(0, 0, 0, 0.5); }
.aquarium img { width: 100%; }
.hotspot { position: absolute; border-radius: 50%; outline-offset: 2px; transition: box-shadow 0.2s, background 0.2s; }
.hotspot.fish:not(.solved) { animation: pulse 2.6s ease-in-out infinite; }
.hotspot:hover, .hotspot:focus-visible { background: rgba(127, 233, 255, 0.16); box-shadow: 0 0 0 3px rgba(190, 245, 255, 0.9), 0 0 24px rgba(127, 233, 255, 0.9); }
.hotspot.pending { box-shadow: 0 0 0 3px rgba(255, 179, 87, 0.9), 0 0 18px rgba(255, 179, 87, 0.7); animation: none; }
.hotspot.solved { box-shadow: 0 0 0 2px rgba(245, 192, 74, 0.8); }
.hotspot.lock { border-radius: 18%; }
.hotspot.lock.ready { animation: pulse-gold 1.6s ease-in-out infinite; }
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: clamp(22px, 3vw, 36px);
  height: clamp(22px, 3vw, 36px);
  border-radius: 50%;
  background: var(--gold);
  color: #3a2500;
  font-weight: 700;
  font-size: clamp(0.8rem, 1.6vw, 1.2rem);
  box-shadow: 0 0 12px rgba(245, 192, 74, 0.9);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(190, 245, 255, 0); }
  50% { box-shadow: 0 0 0 3px rgba(190, 245, 255, 0.55), 0 0 18px rgba(127, 233, 255, 0.55); }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 192, 74, 0); }
  50% { box-shadow: 0 0 0 4px rgba(245, 192, 74, 0.8), 0 0 26px rgba(245, 192, 74, 0.8); }
}
@media (prefers-reduced-motion: reduce) { .hotspot { animation: none !important; } }

.task-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--edge);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.chip-link img { width: 52px; height: 34px; object-fit: cover; border-radius: 999px; }
.chip-link:hover { box-shadow: var(--soft-glow); }
.chip-link.solved { border-color: var(--gold); }
.chip-link .digit { width: 26px; height: 26px; }
.pending-mark { color: var(--late); }

/* ---------- Úspěch, trezor, konec ---------- */

.success { display: grid; justify-items: center; gap: 20px; padding-top: 4vh; }
.success-box { max-width: 900px; font-size: clamp(1.2rem, 2.6vw, 1.8rem); font-weight: 600; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.success-box p { margin: 0.3em 0; }
.success-box .gold { font-size: 1.3em; }
.success-fish img { width: min(230px, 60vw); border-radius: 50%; aspect-ratio: 1.6; object-fit: cover; box-shadow: 0 0 0 3px var(--gold), 0 0 40px rgba(245, 192, 74, 0.6); animation: swim 3s ease-in-out infinite; }
@keyframes swim { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }

.lock-box, .ending { text-align: center; margin-top: 12px; }
.safe { width: 180px; margin: 0 auto 8px; border-radius: 14px; }
.code-form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 18px 0 6px; }
.code-input {
  width: 9ch;
  padding: 8px 12px;
  font: inherit;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
  border-radius: 14px;
  border: 2px solid var(--gold);
  background: rgba(2, 26, 46, 0.7);
  color: var(--gold);
}
.msg { min-height: 1.5em; color: var(--late); font-weight: 600; }
.ending { max-width: 860px; margin: 12px auto 0; text-align: left; }
.ending h1, .ending .safe { text-align: center; }
.ending .result { text-align: center; font-size: 1.1em; }
.result.ok strong { color: var(--ok); }
.result.over strong { color: var(--late); }
.findings { padding-left: 1.2em; }
.findings li { margin: 6px 0; }

.shake { animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Doplňkové úlohy ---------- */

.remediation { max-width: 1000px; margin: 0 auto; }
.remediation h2 { color: var(--heading); text-shadow: var(--soft-glow); margin-top: 0; }
.activity { margin: 18px 0 6px; }
.feedback { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: rgba(40, 140, 90, 0.25); border: 1.5px solid var(--ok); }
.feedback h3 { margin-top: 0; color: var(--ok); }
.feedback .btn { margin-top: 8px; }

.targets { display: grid; gap: 12px; margin-bottom: 18px; }
.targets.groups { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.target { border-radius: 16px; border: 1.5px dashed var(--edge); background: rgba(2, 26, 46, 0.35); padding: 10px; }
.target.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
@media (max-width: 600px) { .target.pair { grid-template-columns: 1fr; } }
.pair-left { font-weight: 600; padding: 6px 8px; }
.target.group h3 { margin: 4px 6px 10px; color: var(--heading); text-align: center; }
.slot { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; align-items: center; }
.slot-empty { color: var(--muted); padding: 0 8px; }
.pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 60px; padding: 12px; border-radius: 16px; background: rgba(2, 26, 46, 0.35); }
.card-chip {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--edge);
  background: var(--panel-strong);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.card-chip:hover:not(:disabled) { box-shadow: var(--soft-glow); }
.card-chip.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(245, 192, 74, 0.6); }
.card-chip.correct { border-color: var(--ok); background: rgba(40, 140, 90, 0.35); cursor: default; opacity: 1; }
.card-chip.wrong { border-color: var(--bad); }

.crossword-wrap { display: grid; gap: 20px; }
@media (min-width: 900px) { .crossword-wrap { grid-template-columns: auto 1fr; align-items: start; } }
.crossword {
  --cell: min(34px, calc((100vw - 72px) / var(--cols)));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  grid-auto-rows: var(--cell);
  justify-content: center;
}
.cw-cell { position: relative; background: #eaf7fc; border: 1px solid #5d8aa3; }
.cw-cell.sol { background: #fff0c4; }
.cw-cell.active { background: #c9f1ff; }
.cw-cell.sol.active { background: #ffe39a; }
.cw-cell.wrong { background: #ffd2d2; }
.cw-cell.correct { background: #c9f3dc; }
.cw-cell input {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #062a44;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-size: calc(var(--cell) * 0.55);
  text-transform: uppercase;
  caret-color: transparent;
}
.cw-cell input:focus { outline: 2px solid #f5a623; outline-offset: -2px; }
.cw-num, .cw-sol { position: absolute; font-size: 9px; line-height: 1; color: #2b5068; pointer-events: none; }
.cw-num { top: 2px; left: 2px; }
.cw-sol { bottom: 2px; left: 2px; color: #a36a00; }
.clues h3 { margin: 0 0 6px; color: var(--heading); }
.clue-list { margin: 0 0 14px; padding-left: 0; list-style: none; }
.clue-list li { padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.clue-list li:hover { background: rgba(127, 233, 255, 0.1); }
.clue-list li.active { background: rgba(127, 233, 255, 0.2); }
.tajenka { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; justify-content: center; margin-top: 18px; }
.tajenka-label { margin-right: 8px; font-weight: 600; color: var(--heading); }
.tj { position: relative; display: grid; place-items: center; width: 38px; height: 42px; background: #fff0c4; color: #062a44; border: 1px solid #a37b2a; font-weight: 700; font-size: 1.2rem; }
.tj small { position: absolute; bottom: 1px; left: 3px; font-size: 9px; font-weight: 400; color: #a36a00; }
.tajenka.correct .tj { background: #c9f3dc; }

.multi { display: grid; gap: 10px; }
.multi-opt {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--edge);
  background: var(--panel-strong);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.multi-opt .box { flex: none; width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--cyan); }
.multi-opt[aria-pressed='true'] { border-color: var(--gold); }
.multi-opt[aria-pressed='true'] .box { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--panel-strong); }
.multi-opt.correct { border-color: var(--ok); }
.multi-opt:disabled { cursor: default; }

/* ---------- Modální okno a hlášky ---------- */

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 10, 20, 0.7); }
.modal-backdrop[hidden] { display: none; }
.modal { max-width: 520px; width: 100%; background: rgba(6, 40, 70, 0.96); }
.modal .glow-title { font-size: 1.8rem; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #5a1d1d; border: 1px solid var(--bad); }
.toast[hidden] { display: none; }

/* ---------- Administrace ---------- */

.admin-body { background-image: none; background: var(--deep); font-size: 15px; }
.admin-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: var(--ocean); border-bottom: 1px solid var(--edge); }
.admin-user { color: var(--muted); }
.admin-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.admin-bar { align-items: center; }
.print-toolbar .lang-switch { margin-left: auto; }
.admin { max-width: 1240px; margin: 0 auto; padding: 16px; }
.admin h1 small { font-size: 0.55em; font-weight: 400; color: var(--muted); }
.card { background: rgba(8, 48, 82, 0.55); border: 1px solid var(--edge); border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.card h2 { margin-top: 0; font-size: 1.2rem; color: var(--heading); }
.admin form { margin: 10px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form label { display: grid; gap: 4px; font-size: 0.9em; color: var(--muted); }
.admin input[type='text'], .admin input[type='number'] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: #031f36;
  color: var(--text);
  font: inherit;
}
.admin input[type='number'] { width: 7em; }
.admin button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--edge); background: #1679ad; color: #fff; font-weight: 600; cursor: pointer; }
.admin button.danger { background: #8a2626; border-color: #e07070; }
.admin button.secondary { background: transparent; color: var(--heading); }
.admin a.button { display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--edge); background: transparent; color: var(--heading); font-weight: 600; text-decoration: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.copy-row { display: flex; gap: 10px; align-items: center; }
.copy-row input.links { flex: 1; min-width: 0; }
.csv-link { margin-left: 10px; font-size: 0.9em; }
details summary { cursor: pointer; }
.summary-title { display: inline; }
.school-list { padding-left: 1.2em; }
.school-list li { margin: 6px 0; }
.school-list .hint { margin-left: 8px; }
.links { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--edge); background: #031f36; color: var(--text); font: 13px/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.data th, .data td { padding: 6px 8px; border-bottom: 1px solid rgba(150, 228, 255, 0.18); text-align: left; white-space: nowrap; }
.data th { color: var(--heading); font-weight: 600; }
.ok { color: var(--ok); }
.late { color: var(--late); }
.wrong { color: var(--bad); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.85em; border: 1px solid currentColor; }
.tag.ok { color: var(--ok); }
.tag.late { color: var(--late); }
.tag.run { color: var(--cyan); }
.tag.muted { color: var(--muted); }
.crumbs a { color: var(--heading); }
.class-off { color: var(--muted); }
.class-state.on { border-color: var(--ok); }
.class-state.off { border-color: var(--late); }
.class-state h2 { margin-bottom: 4px; }
.class-state p { margin: 0; }
.button-row .inline-form, .data .inline-form { margin: 0; }
.results tr.flash { animation: row-flash 2.5s ease-out; }
@keyframes row-flash { 0%, 30% { background: rgba(245, 192, 74, 0.28); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .results tr.flash { animation: none; outline: 1px solid var(--gold); } }
code { font-family: ui-monospace, Consolas, monospace; }

/* ---------- QR kódy k tisku (A4, 3 × 4 kartičky na list) ---------- */

@page { size: A4; margin: 10mm; }
.print-body { background-image: none; background: #dfe4e8; color: #111; color-scheme: light; font-size: 15px; }
.print-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px 16px; background: var(--ocean); color: var(--text); }
.print-toolbar a { color: var(--heading); }
.print-body .site-footer { color: #555; }
.print-toolbar .hint { flex-basis: 100%; margin: 0; color: var(--muted); }
.print-toolbar button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--edge); background: #1679ad; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.sheets { padding: 16px; overflow-x: auto; }
.sheet { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 69mm; width: 190mm; background: #fff; }
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 3mm 4mm;
  border-right: 0.3mm dashed #888;
  border-bottom: 0.3mm dashed #888;
  text-align: center;
  line-height: 1.25;
}
.qr-card:nth-child(3n + 1) { border-left: 0.3mm dashed #888; }
.qr-card:nth-child(-n + 3) { border-top: 0.3mm dashed #888; }
.qr-card > div { max-width: 100%; }
.qr-game { font-size: 8pt; color: #555; }
.qr-student { font-size: 16pt; font-weight: 700; }
.qr-class { font-size: 8pt; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr { width: 40mm; height: 40mm; margin: 1.5mm 0; fill: #000; }
.qr-url { font: 6pt/1.3 ui-monospace, Consolas, monospace; color: #555; overflow-wrap: anywhere; }
@media screen {
  .sheet { box-sizing: content-box; min-height: 277mm; padding: 10mm; margin: 0 auto 16px; align-content: start; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
}
@media print {
  .print-body { background: #fff; }
  .print-toolbar, .site-footer { display: none; }
  .sheets { padding: 0; overflow: visible; }
  .sheet:not(:last-child) { break-after: page; }
}
