/* ==========================================================================
   Síň slávy českého hokeje — styly
   Mobile-first (390px), funkční i na desktopu (obsah max 720px, vycentrováno)
   ========================================================================== */

/* ---------- Brand fonty (lokální, žádné CDN) ---------- */
/* Druk – hlavní display písmo Síně slávy (má plnou českou diakritiku). */
@font-face {
  font-family: "Druk Cond Super";
  src: url("/fonts/Druk-CondSuper.otf") format("opentype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Druk Text";
  src: url("/fonts/DrukText-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Druk Text";
  src: url("/fonts/DrukText-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-primary: #DC2300;
  --color-secondary: #001D60;
  --color-gold: #D2910F;
  --color-background: #F5F7FA;
  --color-surface: #FFFFFF;
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #666666;
  --color-border: #E0E0E0;
  --deep-red: #A81B00;

  /* display písma – velké údery all-caps (Cond Super) a menší display (Druk Text) */
  --font-display: "Druk Cond Super", "Inter", system-ui, sans-serif;
  --font-display-text: "Druk Text", "Inter", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;

  --header-h: 64px;
  --maxw: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  background-image: url("/assets/bg_pattern_v4.png");
  background-size: 480px;
  background-repeat: repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  padding: 0 max(12px, env(safe-area-inset-left)) 0 max(12px, env(safe-area-inset-right));
  background: var(--color-secondary);
  color: #fff;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 29, 96, 0.25);
}

.header-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
}
.header-btn:active { background: rgba(255, 255, 255, 0.12); }

.header-logo {
  display: grid;
  place-items: center;
  cursor: pointer;
}
.header-logo img {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* jedno kulaté tlačítko — ukazuje vlajku jazyka, NA KTERÝ se přepne */
.lang-btn {
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  display: grid;
  place-items: center;
}
.lang-btn img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
  transition: transform 0.15s;
}
.lang-btn:active img { transform: scale(0.92); }

/* ---------- Layout ---------- */
#view {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
  min-height: calc(100vh - var(--header-h));
}
/* místo pro plovoucí dock vyhraď jen routám, které dock mají */
body.has-dock #view { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
/* expozice: menší spodní rezerva — jen tolik, aby dock nepřekryl „Procházet vše" */
body.is-expozice #view { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }

.page-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin: 18px 0 4px;
  letter-spacing: 0.005em;
  line-height: 1.02;
}
.page-desc {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* ---------- Vyhledávání ---------- */
.search {
  position: relative;
  margin: 16px 0 22px;
}
.search-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 46px;
  font-size: 16px;
  color: #fff;
  background: var(--color-secondary);
  border: none;
  border-radius: var(--radius-md);
  outline: none;
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.7); }
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
.search-results:empty { display: none; }
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
}
.search-result:last-child { border-bottom: none; }
.search-result:active { background: var(--color-background); }
.search-result .sr-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text-primary);
}
.search-result .sr-cat {
  font-size: 12px;
  color: var(--color-text-secondary);
}
.search-empty {
  padding: 14px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* ---------- Dlaždice kategorií ---------- */
.cat-grid { display: flex; flex-direction: column; gap: 14px; }

.cat-card {
  position: relative;
  display: block;
  height: 132px;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 29, 96, 0.18);
  background: var(--color-secondary);
}
.cat-card .cat-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* gradientní placeholder pro kategorie bez banneru */
.cat-card.is-placeholder {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #001240 100%);
}
.cat-card.is-placeholder .cat-year {
  position: absolute;
  right: 14px;
  bottom: 6px;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.12);
  line-height: 1;
  letter-spacing: 0;
}
.cat-card .cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 29, 96, 0.92) 0%, rgba(0, 29, 96, 0.55) 55%, rgba(0, 29, 96, 0.15) 100%);
}
.cat-card .cat-content {
  position: absolute;
  left: 20px;
  bottom: 18px;
  right: 20px;
}
.cat-card .cat-name {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  max-width: 82%;
}
.cat-card .cat-count {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.browse-all {
  display: block;
  text-align: center;
  margin: 22px 0 4px;
  font-weight: 700;
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Banner kategorie (detail) ---------- */
.cat-banner {
  position: relative;
  height: 170px;
  margin: 16px 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-secondary);
}
.cat-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-banner.is-placeholder { background: linear-gradient(135deg, var(--color-secondary) 0%, #001240 100%); }
.cat-banner .cb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0, 29, 96, 0.85) 0%, rgba(0, 29, 96, 0.1) 70%);
}
.cat-banner .cb-title {
  position: absolute; left: 20px; bottom: 16px; right: 20px;
  color: #fff; font-family: var(--font-display); font-size: 30px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.005em; line-height: 1.0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.cat-banner.is-placeholder .cb-year {
  position: absolute; right: 16px; bottom: 2px;
  font-family: var(--font-display); font-size: 72px; font-weight: 400;
  color: rgba(255, 255, 255, 0.12); line-height: 1;
}

/* ---------- Seznam artefaktů ---------- */
.art-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }

.art-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 29, 96, 0.05);
  width: 100%;
  text-align: left;
}
.art-card:active { transform: scale(0.995); }
.art-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: var(--color-background);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.art-thumb img { width: 100%; height: 100%; object-fit: contain; }
.art-thumb.is-placeholder {
  background: linear-gradient(135deg, #eef1f6 0%, #dfe5ee 100%);
  color: var(--color-secondary);
  opacity: 0.85;
}
.art-info { min-width: 0; flex: 1; }
.art-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.25;
}
.art-snippet {
  margin-top: 3px;
  font-size: 13px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-soon {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
  background: #e7ecf5;
  border-radius: 999px;
}

/* ---------- Detail artefaktu ---------- */
.art-hero {
  margin: 16px 0 4px;
  height: 300px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.art-hero img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 29, 96, 0.22));
}
.art-hero.is-placeholder {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #001240 100%);
  color: rgba(255, 255, 255, 0.35);
}

.art-detail-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1.18;
  margin: 18px 0 8px;
}
/* rok artefaktu pod nadpisem — jemný sekundární údaj (nahradil inventární číslo) */
.art-year {
  margin: -2px 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}
.art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.meta-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-secondary);
  background: #e7ecf5;
  padding: 4px 11px;
  border-radius: 999px;
}
.art-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-primary);
  white-space: pre-line; /* descriptionExtra může mít víc odstavců oddělených \n\n */
}
.art-text.is-empty { color: var(--color-text-secondary); font-style: italic; }
.art-text-extra { margin-top: 14px; }

/* ---------- Související fotky (hráči / momenty) ---------- */
.art-players {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}
.art-player {
  margin: 0;
  width: 116px;
}
.art-player img {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: block;
}
.art-player figcaption {
  margin-top: 7px;
  text-align: center;
}
.art-gallery {
  margin: 22px 0 0;
}
.art-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.art-gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: block;
}
.art-gallery figcaption {
  margin-top: 9px;
  text-align: center;
}
.art-photo-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.3;
}
/* fotky detailu artefaktu jsou klikací → otevírají lightbox */
.art-player img, .art-gallery-grid img { cursor: zoom-in; }

/* ---------- Lightbox fotek ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;                 /* nad QR overlayem i dockem */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}
.lightbox[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }
/* rozmazané + ztmavené pozadí (fallback bez backdrop-filter = jen ztmavení) */
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 24, 0.82);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lb-backdrop {
    background: rgba(3, 8, 24, 0.6);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}
.lb-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
/* jeviště se dvěma překrytými sloty — v něm se přejíždí mezi fotkami */
.lb-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.lb-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.28s ease-out, opacity 0.28s ease-out;
  will-change: transform, opacity;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  background: #0a1020;
}
@media (prefers-reduced-motion: reduce) {
  .lb-slot { transition: none; }
}
.lb-caption {
  text-align: center;
  max-width: 640px;
  padding: 0 8px;
}
.lb-caption .lb-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.lb-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 3;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 14, 48, 0.6);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:active { background: var(--deep-red, #a11); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 14, 48, 0.55);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-nav[hidden] { display: none; }
.lb-nav:active { background: rgba(0, 14, 48, 0.85); }
.lb-prev { left: max(8px, env(safe-area-inset-left)); }
.lb-next { right: max(8px, env(safe-area-inset-right)); }

.related {
  margin-top: 30px;
}
.related h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--color-secondary);
  margin: 0 0 12px;
}

/* ---------- Prázdný stav ---------- */
.empty-state {
  text-align: center;
  padding: 40px 12px;
  color: var(--color-text-secondary);
}

/* ---------- Spodní plovoucí zóna (dock) — dvě kulatá tlačítka na krajích ---------- */
.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 45;
  width: min(calc(var(--maxw) - 32px), calc(100vw - 32px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
/* na detailu artefaktu je dole audio pruh — celý dock posuneme nad něj */
body.has-audiobar .dock { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* kulaté QR tlačítko vlevo */
.qr-btn {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(180deg, #1b3d72 0%, var(--color-secondary) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 29, 96, 0.4);
  transition: transform 0.12s;
}
.qr-btn:active { transform: scale(0.95); }

/* kulaté tlačítko Puk vpravo — hlava Puka + tenký červený okraj */
.puk-btn {
  position: relative;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  background: #fff;
  overflow: visible;
  box-shadow: 0 8px 22px rgba(168, 27, 0, 0.4);
  transition: transform 0.12s;
}
.puk-btn:active { transform: scale(0.95); }
.puk-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* řečová bublina u Puka */
.puk-bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  right: -2px;
  max-width: 220px;
  width: max-content;
  padding: 9px 13px;
  background: #fff;
  color: var(--color-secondary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 14, 48, 0.28);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.puk-bubble::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-bottom-right-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 3px 3px 6px rgba(0, 14, 48, 0.10);
}
.puk-bubble.is-in { opacity: 1; transform: translateY(0); pointer-events: auto; }
.puk-bubble[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .puk-bubble { transition: none; transform: none; }
  .puk-bubble.is-in { transform: none; }
}

/* ---------- Fullscreen overlay skeneru ---------- */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  overflow: hidden;
}
.qr-overlay[hidden] { display: none; }
body.qr-open { overflow: hidden; }

.qr-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qr-canvas { display: none; }

/* ztmavená maska s prosvětleným čtvercovým okénkem uprostřed */
.qr-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.qr-window {
  position: relative;
  width: min(72vw, 60vh, 320px);
  height: min(72vw, 60vh, 320px);
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6);
}
/* rohové záměrné závorky */
.qr-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 5px solid #fff;
  transition: border-color 0.1s;
}
.qr-corner.tl { top: -4px; left: -4px; border-right: none; border-bottom: none; border-top-left-radius: 16px; }
.qr-corner.tr { top: -4px; right: -4px; border-left: none; border-bottom: none; border-top-right-radius: 16px; }
.qr-corner.bl { bottom: -4px; left: -4px; border-right: none; border-top: none; border-bottom-left-radius: 16px; }
.qr-corner.br { bottom: -4px; right: -4px; border-left: none; border-top: none; border-bottom-right-radius: 16px; }
/* zelené bliknutí po načtení kódu */
.qr-window.is-hit .qr-corner { border-color: #22c55e; }
.qr-window.is-hit { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6), inset 0 0 0 4px #22c55e; }

/* velký text nahoře */
.qr-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(84px + env(safe-area-inset-top)) 18px 22px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
  text-align: center;
  pointer-events: none;
}
.qr-title {
  color: #fff;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1.02;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

/* menší pomocný text dole */
.qr-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 22px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  text-align: center;
  pointer-events: none;
}
.qr-help {
  color: rgba(255, 255, 255, 0.94);
  font-size: 15.5px;
  line-height: 1.4;
  max-width: 460px;
  margin: 0 auto;
  /* pevná výška → text nepřeskakuje při přepnutí CZ/EN */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 66px;
}
.qr-help-line { margin: 0; }

/* zavírací ✕ v rohu — DOLEVA nahoru, červený kruh s bílým ✕ (design pravidlo) */
.qr-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 14px;
  z-index: 4;
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--color-primary);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(168, 27, 0, 0.45);
}
.qr-close:active { background: var(--deep-red); }
/* jen ✕ ikona — textový popisek skryjeme (JS ho i tak plní, neškodí) */
.qr-close-label { display: none; }

/* jazykové tlačítko v overlayi — naproti tlačítku Zavřít (DOPRAVA nahoru) */
.qr-lang {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 4;
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
}
.qr-lang img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.qr-lang:active { background: rgba(0, 0, 0, 0.7); }

/* přátelská hláška uprostřed (cizí kód) */
.qr-toast {
  position: absolute;
  left: 50%;
  bottom: 34%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: 82%;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  color: #fff;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.qr-toast[hidden] { display: none; }

/* chybová obrazovka (kamera zamítnuta / nedostupná) */
.qr-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--color-secondary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 26px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}
.qr-error[hidden] { display: none; }
.qr-error-icon { color: rgba(255, 255, 255, 0.85); }
.qr-error-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1.05;
}
.qr-error-steps {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 420px;
}
.qr-close-error {
  margin-top: 8px;
  padding: 14px 28px;
  color: #fff;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  border: none;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(168, 27, 0, 0.4);
}

/* menší telefony — o něco menší nadpis skeneru */
@media (max-height: 660px) {
  .qr-title { font-size: 26px; }
  .qr-top { padding-top: calc(74px + env(safe-area-inset-top)); }
}

/* ---------- Audio pruh (vizuálně připravený, zatím bez zvuku) ---------- */
.audio-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 44;
  background: var(--color-secondary);
  color: #fff;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 29, 96, 0.25);
}
.audio-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.audio-play {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  opacity: 0.55;
  cursor: not-allowed;
}
.audio-track { flex: 1; min-width: 0; }
.audio-line {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
}
.audio-line::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
}
.audio-label {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Audio průvodce se slideshow ---------- */
/* Tlačítko „Poslechnout s Pukem" pod nadpisem/rokem artefaktu */
#audio-guide-slot:empty { display: none; }
.audio-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 12px 20px 12px 16px;
  border: none;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display-text, inherit);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(220, 35, 0, 0.32);
  -webkit-tap-highlight-color: transparent;
}
.audio-guide-btn:active { background: var(--deep-red, #a81b00); }
.audio-guide-btn svg { flex: 0 0 auto; }

/* Fullscreen slideshow overlay */
.ag-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;                 /* nad dockem, audio lištou i lightboxem */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.ag-overlay[hidden] { display: none; }
body.ag-open { overflow: hidden; }
.ag-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 24, 0.85);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ag-backdrop {
    background: rgba(3, 8, 24, 0.64);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}
.ag-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 3;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 14, 48, 0.6);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ag-close:active { background: var(--deep-red, #a81b00); }
.ag-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
}
.ag-slot {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  background: #0a1020;
  opacity: 0;
  /* měkká prolínačka mezi fotkami — žádné tvrdé střihy */
  transition: opacity 0.8s ease-in-out;
  will-change: opacity;
}
.ag-slot.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .ag-slot { transition: none; }
}
.ag-caption {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 12px 8px 4px;
  max-width: 640px;
}
.ag-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
/* Lišta přehrávače dole ve slideshow */
.ag-player {
  position: relative;
  z-index: 1;
  width: min(var(--maxw), 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0, 14, 48, 0.7);
}
.ag-player .ag-cur, .ag-player .ag-dur {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  min-width: 34px;
  text-align: center;
}
.ag-play {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 1;
  -webkit-tap-highlight-color: transparent;
}
.ag-play:active { background: var(--deep-red, #a81b00); }

/* Posuvník (seek) — jednotný vzhled ve slideshow i mini liště */
.ag-range {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.ag-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}
.ag-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}
.ag-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.ag-range::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
}

/* Mini lišta přehrávače (dědí .audio-bar, jen funkční varianta) */
.ag-mini[hidden] { display: none; }
.ag-mini .audio-play { opacity: 1; cursor: pointer; }
.ag-mini .audio-track { display: flex; flex-direction: column; gap: 2px; }
.ag-mini .ag-range { height: 18px; }
.ag-mini .ag-range::-webkit-slider-thumb { margin-top: -5px; }
.ag-mini .audio-label { margin-top: 0; }
.ag-mini-images, .ag-mini-stop {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ag-mini-images:active, .ag-mini-stop:active { background: rgba(255, 255, 255, 0.28); }

/* ==========================================================================
   Homepage hub — NESCROLLOVATELNÝ, vejde se do jednoho viewportu
   ========================================================================== */
/* na homepage zakážeme scroll; ostatní routy scrollují normálně */
body.is-home {
  overflow: hidden;
  height: 100vh;   /* fallback */
  height: 100dvh;
}

/* #view se z běžného toku mění na sloupcový flex vyplňující viewport pod headerem */
body.is-home #view {
  height: calc(100vh - var(--header-h));   /* fallback */
  height: calc(100dvh - var(--header-h));
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  /* homepage nemá dock → žádné vyhrazené místo dole, hero může vyplnit viewport */
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  overflow: hidden;
}

/* HERO karta „Expozice" — pružná výška, ať vyplní volné místo */
.hero-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 128px;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 29, 96, 0.28);
  background: var(--color-secondary);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  /* fotorealistický hero je světlejší → silnější spodní gradient kvůli čitelnosti textu */
  background: linear-gradient(0deg, rgba(0, 14, 48, 0.97) 0%, rgba(0, 14, 48, 0.72) 42%, rgba(0, 14, 48, 0.22) 100%);
}
.hero-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.hero-sub {
  margin-top: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}
.hero-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 22px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(168, 27, 0, 0.4);
}
.hero-card:active { transform: scale(0.995); }

/* Label „ZÁŽITKY NAVÍC" */
.extras-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  padding: 0 2px;
}

/* Grid 2×2 — všechny dlaždice stejně velké, pružná výška (min 96px) */
.home-grid {
  flex: 1 1 auto;
  min-height: 192px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
.home-tile {
  position: relative;
  min-height: 96px;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 29, 96, 0.18);
  background: var(--color-secondary);
}
.home-tile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ořez nových dlaždic tak, ať je vidět Pukova hlava (obě fotky mají hlavu nahoře) */
.home-tile-bg[src*="tile_ask"] { object-position: 50% 20%; }
.home-tile-bg[src*="tile_game"] { object-position: 50% 64%; }
.home-tile-bg[src*="tile_selfie"] { object-position: 50% 26%; }
.home-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 14, 48, 0.9) 0%, rgba(0, 14, 48, 0.35) 55%, rgba(0, 14, 48, 0) 100%);
}
.home-tile-content {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 11px;
}
.home-tile-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.home-tile-sub {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}
.home-tile:active { transform: scale(0.985); }

/* menší telefony na výšku — o něco menší hero titulek */
@media (max-height: 660px) {
  .hero-title { font-size: 29px; }
  .hero-cta { margin-top: 9px; padding: 8px 18px; }
}

/* ---------- Stub stránky (Kvízy / Hry) ---------- */
.stub {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-secondary);
}
.stub-icon {
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef1f6 0%, #dfe5ee 100%);
  color: var(--color-secondary);
}
.stub .page-title { margin: 8px 0 4px; }

/* ---------- Konfety (oslavná animace) ---------- */
/* Fáborky patří NAD herní plochu/pozadí (úroveň 0), ale POD chrome, které musí
   zůstat čitelné: herní HUD (skóre/čas/životy z-index 2), overlay panely (3),
   mute (4) i navigační bar (header z-index 40). .game-screen je position:relative
   bez z-indexu → netvoří stacking kontext, takže HUD/overlay/mute soupeří s
   konfetami přímo v kořenovém kontextu. Vazbou je nejnižší z nich (HUD = 2),
   proto konfety kreslíme na z-index 1 — nad pozadím, pod veškerým chrome. */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Kvízy — seznam ---------- */
.quiz-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.quiz-card {
  position: relative;
  display: block;
  height: 130px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-secondary);
  box-shadow: 0 4px 14px rgba(0, 29, 96, 0.14);
}
.quiz-card.is-placeholder { background: linear-gradient(135deg, var(--color-secondary) 0%, #001240 100%); }
.quiz-card-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quiz-card-year {
  position: absolute; top: 10px; left: 16px;
  font-family: var(--font-display); font-size: 40px; color: rgba(255, 255, 255, 0.2);
}
.quiz-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 14, 48, 0.15) 0%, rgba(0, 14, 48, 0.78) 100%);
}
.quiz-card-badges {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.quiz-card-mini, .quiz-card-best {
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px;
}
.quiz-card-mini { background: var(--color-gold); color: #3a2600; }
.quiz-card-best { background: rgba(255, 255, 255, 0.92); color: var(--color-secondary); }
.quiz-card-content { position: absolute; left: 16px; right: 16px; bottom: 12px; color: #fff; }
.quiz-card-name {
  font-family: var(--font-display); font-size: 22px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.005em;
}
.quiz-card-count {
  margin-top: 4px; font-size: 13px; font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Kvízy — průchod ---------- */
.quiz-play { padding-top: 8px; }
.quiz-top { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; }
.quiz-exit {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-size: 18px; font-weight: 700; line-height: 1;
}
.quiz-progress {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--color-border); overflow: hidden;
}
.quiz-progress span {
  display: block; height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.quiz-step {
  flex: 0 0 auto; font-size: 13px; font-weight: 800;
  color: var(--color-text-secondary);
}
.quiz-question {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 400; line-height: 1.12;
  color: var(--color-secondary);
  margin: 0 0 18px;
}
.quiz-options { display: flex; flex-direction: column; gap: 12px; }
.quiz-option {
  display: flex; align-items: center;
  width: 100%; text-align: left;
  min-height: 60px; padding: 14px 18px;
  border: 2px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 16px; font-weight: 700; color: var(--color-text-primary);
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option:active { background: var(--color-background); }
.quiz-option[disabled] { opacity: 1; }
.quiz-option.is-correct { border-color: #1a8f4c; background: #e7f6ee; color: #10552f; }
.quiz-option.is-wrong { border-color: var(--color-primary); background: #fdeceb; color: #8f1a10; }
.quiz-option.is-muted { opacity: 0.5; }

.quiz-feedback { margin-top: 20px; }
.quiz-verdict {
  font-family: var(--font-display);
  font-size: 22px; text-transform: uppercase; letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.quiz-verdict.is-correct { color: #1a8f4c; }
.quiz-verdict.is-wrong { color: var(--color-primary); }
.quiz-explanation {
  font-size: 15px; line-height: 1.5; color: var(--color-text-primary);
  margin: 0 0 16px;
}
.quiz-actions { display: flex; flex-direction: column; gap: 10px; }
.quiz-learn {
  display: block; text-align: center;
  padding: 13px; border-radius: var(--radius-md);
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary); font-weight: 800; font-size: 15px;
}
.quiz-next {
  display: block; width: 100%;
  padding: 15px; border: none; border-radius: var(--radius-md);
  background: var(--color-primary); color: #fff;
  font-family: var(--font-display); font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.quiz-next:active { background: var(--deep-red); }

/* ---------- Kvízy — výsledek ---------- */
.quiz-result { text-align: center; padding: 36px 8px 24px; }
.quiz-result-eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.quiz-result .page-title { margin: 0 0 12px; }
.quiz-result-score {
  font-family: var(--font-display);
  font-size: 76px; line-height: 1; color: var(--color-primary);
}
.quiz-result-score span { font-size: 40px; color: var(--color-text-secondary); }
.quiz-result-msg {
  font-size: 16px; line-height: 1.45; color: var(--color-text-primary);
  margin: 14px auto 22px; max-width: 320px;
}
.quiz-result .quiz-next { max-width: 320px; margin: 0 auto; }

@media (min-width: 720px) {
  .audio-bar { border-top-left-radius: 0; }
}

/* ==========================================================================
   Hra „Ubraň branku!" — fixní plátno pod headerem, overlaye intro/výsledek
   ========================================================================== */
body.is-game { overflow: hidden; height: 100vh; height: 100dvh; }
body.is-game #view {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
body.game-playing .dock { display: none; }

.game-screen {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  overflow: hidden;
  background: #001030;
  touch-action: none;           /* žádné scrollování/zoom při ťukání */
  user-select: none;
  -webkit-user-select: none;
}
.game-canvas { position: absolute; inset: 0; display: block; }

/* HUD — skóre, životy, čas nad plátnem */
.game-hud {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 10px; right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  pointer-events: none;
  z-index: 2;
}
.hud-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 14, 48, 0.62);
  color: #fff;
  white-space: nowrap;
  flex: 0 0 auto;
  backdrop-filter: blur(3px);
}
.hud-k { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; opacity: 0.75; text-transform: uppercase; }
.hud-chip b { font-family: var(--font-display); font-size: 19px; font-weight: 400; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.hud-lives { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
/* Počítadlo životů = mini hokejové branky. Bílá = zbývající život, červená = inkasovaná. */
.hud-life {
  display: inline-flex;
  width: 26px; height: 22px;
  color: #fff;                                  /* obrys + síťka přes currentColor */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  transition: color 180ms ease;
}
.hud-life svg { display: block; width: 100%; height: 100%; }
.hud-life.is-out {
  color: #ff2318;                               /* rozbitá branka — gólová červená */
  filter: drop-shadow(0 0 4px rgba(255, 40, 25, 0.7)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
/* Siréna při inkasovaném gólu: krátký glow/pulz (~600 ms), pak zůstane červená. */
.hud-life.is-breaking { animation: hud-goal-siren 600ms ease-out 1; }
@keyframes hud-goal-siren {
  0%   { color: #fff;     filter: drop-shadow(0 0 0 rgba(255, 40, 25, 0)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); transform: scale(1); }
  22%  { color: #ff5a4d;  filter: drop-shadow(0 0 12px rgba(255, 40, 25, 1)) drop-shadow(0 0 6px rgba(255, 40, 25, 0.9)); transform: scale(1.28); }
  55%  { color: #ff2318;  filter: drop-shadow(0 0 5px rgba(255, 40, 25, 0.55)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); transform: scale(1.04); }
  78%  { color: #ff5a4d;  filter: drop-shadow(0 0 10px rgba(255, 40, 25, 0.9)) drop-shadow(0 0 5px rgba(255, 40, 25, 0.7)); transform: scale(1.14); }
  100% { color: #ff2318;  filter: drop-shadow(0 0 4px rgba(255, 40, 25, 0.7)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hud-life.is-breaking { animation: none; }
}

/* Mute tlačítko — roh herní obrazovky, dostupné v intro / hře / výsledku */
.game-mute {
  position: absolute;
  right: calc(10px + env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(0, 14, 48, 0.62);
  color: #fff;
  backdrop-filter: blur(3px);
  cursor: pointer;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
}
.game-mute.is-muted { color: rgba(255, 255, 255, 0.55); }
.game-mute:active { transform: scale(0.94); }

/* Overlay panely (intro / načítání / výsledek) */
.game-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 20px;
  z-index: 3;
  pointer-events: none;
}
.game-overlay:empty { display: none; }
.game-panel {
  pointer-events: auto;
  width: min(360px, 86%);
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 29, 96, 0.94) 0%, rgba(0, 14, 48, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 26px 22px 24px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.game-logo {
  display: inline-grid; place-items: center;
  width: 60px; height: 60px; margin-bottom: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.game-title { margin: 4px 0 8px; font-family: var(--font-display); font-size: 33px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.0; }
/* Výrazný „TY jsi brankář!" odznak pod titulkem — hráč hned pochopí svou roli. */
.game-you {
  display: inline-block;
  margin: 2px 0 10px;
  padding: 5px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(168, 27, 0, 0.4);
}
.game-panel-sub { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.game-best-line { font-size: 14px; color: rgba(255, 255, 255, 0.8); margin-bottom: 16px; }
.game-best-line b { color: var(--color-gold); }
.game-newbest {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #E8A81C 0%, var(--color-gold) 100%);
  color: #3a2600; font-family: var(--font-display); font-weight: 400; font-size: 16px; letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(210, 145, 15, 0.45);
}
.game-result-score {
  font-family: var(--font-display);
  font-size: 78px; font-weight: 400; line-height: 0.9;
  margin: 4px 0 6px;
  color: #fff; font-variant-numeric: tabular-nums;
}
.game-start {
  display: inline-block; width: 100%;
  margin-top: 4px;
  padding: 15px 22px;
  border: none; border-radius: 999px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(168, 27, 0, 0.5);
}
.game-start:active { transform: scale(0.98); }
.game-back {
  display: inline-block; width: 100%;
  margin-top: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px;
  background: transparent; color: #fff; font-size: 15px; font-weight: 700;
}
/* výsledkové okno: plochá tlačítka — čistá plná #DC2300 bez gradientu/stínu */
.game-result .game-start {
  background: var(--color-primary);
  box-shadow: none;
}
.game-result .game-start:active { background: var(--deep-red); transform: none; }
.game-spinner {
  width: 40px; height: 40px; margin: 0 auto 4px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff; border-radius: 50%;
  animation: game-spin 0.8s linear infinite;
}
@keyframes game-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Mapa síně — banner, vstupní řádek, interaktivní plán, bottom-sheet, kalibrace
   ========================================================================== */

/* --- Banner-tlačítko na /expozice --- */
.map-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(120deg, var(--color-secondary) 0%, #001240 100%);
  box-shadow: 0 4px 14px rgba(0, 29, 96, 0.2);
}
.map-banner:active { transform: scale(0.995); }
.map-banner-icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); color: #fff;
}
.map-banner-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.map-banner-title { font-size: 16px; font-weight: 800; line-height: 1.15; }
.map-banner-sub { font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.map-banner-arrow { font-size: 26px; font-weight: 700; color: rgba(255, 255, 255, 0.7); line-height: 1; }

/* --- Řádek „Kde to najdu" na detailu artefaktu --- */
.art-where {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--color-secondary);
  background: #e7ecf5;
  font-size: 14.5px;
  font-weight: 700;
}
.art-where:active { background: #dbe3f0; }
.art-where svg { flex: 0 0 auto; }
.art-where span:nth-of-type(1) { flex: 1; }
.art-where-arrow { font-size: 20px; color: rgba(0, 29, 96, 0.55); }

/* --- Plán: fixní plátno pod headerem --- */
body.is-map { overflow: hidden; height: 100vh; height: 100dvh; }

.map-screen {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 20;
  background: #eef2f7;
}
.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;               /* gesta řešíme sami */
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
.map-viewport:active { cursor: grabbing; }
.map-world {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.map-img, .map-ref {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}
.map-ref { z-index: 2; }             /* kalibrační překryv nad mapou */

/* jemný fade-out okrajů obrázku mapy do barvy pozadí (styl s gradienty dosazuje
   renderMap z bg.top/bg.bottom); nad obrázkem, pod piny, neblokuje gesta */
.map-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* --- Piny --- */
.map-pins { position: absolute; inset: 0; z-index: 3; --inv: 1; }
.map-pin {
  position: absolute;
  width: 44px; height: 44px;        /* hit area */
  margin: 0; padding: 0;
  border: none; background: none;
  display: grid; place-items: center;
  transform: translate(-50%, -50%) scale(var(--inv));
  transform-origin: center;
}
.map-pin-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pin-color, var(--color-secondary));
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
/* chip pod pinem: tematický název + tečky kategorií (žádné interní kódy) */
.map-pin-chip {
  position: absolute;
  top: 100%; left: 50%;
  transform: translate(-50%, 3px);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  max-width: 128px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
.map-pin-cats { display: flex; align-items: center; gap: 3px; line-height: 1; }
.map-pin-cat {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}
.map-pin-more { font-size: 9px; font-weight: 800; color: var(--color-text-secondary); }
.map-pin-label {
  font-size: 10.5px; font-weight: 800; line-height: 1.15;
  color: var(--color-secondary);
  text-align: center;
  /* Labely jsou předzkrácené v mapPins.json tak, aby se do 2 řádků vešly celé.
     line-clamp:2 je jen POJISTKA proti přetečení — reálně se nic neoříznout nemá. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* width:max-content dá labelu jeho přirozenou šířku (jinak by chip v absolutně
     pozicovaném shrink-to-fit rodiči zkolaboval na min-content = nejdelší slovo a
     text by se lámal a ořezával); max-width 116px pak dlouhé názvy zalomí do 2 řádků. */
  width: max-content;
  max-width: 130px;
}
/* ztlumený pin — nemá žádnou zapnutou kategorii (viditelný efekt filtru) */
.map-pin.is-dim { opacity: 0.25; filter: grayscale(1); }
.map-pin.is-active .map-pin-dot { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* --- POI (orientační body: vstup, pokladna, fanshop, sál, chrám) --- */
.map-poi {
  position: absolute;
  width: 44px; height: 44px;
  margin: 0; padding: 0; border: none; background: none;
  display: grid; place-items: center;
  transform: translate(-50%, -50%) scale(var(--inv));
  transform-origin: center;
  z-index: 4;
}
.map-poi-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--color-secondary);
  border: 2px solid #fff;
  border-radius: 9px 9px 9px 3px;   /* navy čtvercová/kapkovitá značka */
  box-shadow: 0 2px 7px rgba(0, 14, 48, 0.45);
}
.map-poi.is-active .map-poi-mark { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.map-poi-tip {
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translate(-50%, -6px);
  padding: 4px 9px;
  background: var(--color-secondary);
  color: #fff;
  font-size: 11.5px; font-weight: 800;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 14, 48, 0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease;
}
.map-poi.is-open .map-poi-tip { opacity: 1; }
/* highlight („kde to najdu" / naskenováno) — zvýrazněn brandovou zlatou = úspěch */
.map-pin.is-pulse .map-pin-dot {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff, 0 2px 10px rgba(210, 145, 15, 0.7);
}
.map-pin.is-pulse::before {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-gold);
  animation: mapPulse 1.4s ease-out infinite;
}
@keyframes mapPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* --- Tlačítko filtru + panel (vlevo nahoře) --- */
.map-fbtn {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 12;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: none; border-radius: 14px;
  background: #fff; color: var(--color-secondary);
  box-shadow: 0 4px 14px rgba(0, 29, 96, 0.22);
}
.map-fbtn:active, .map-fbtn.is-open { background: var(--color-secondary); color: #fff; }
.map-filter {
  position: absolute;
  top: 70px; left: 14px;
  z-index: 12;
  width: min(260px, calc(100vw - 28px));
  max-height: calc(100% - 96px);
  overflow-y: auto;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 29, 96, 0.22);
}
.map-filter[hidden] { display: none; }
.map-filter-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin: 2px 2px 8px;
}
.map-filter-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; cursor: pointer;
}
.map-filter-row input { width: 18px; height: 18px; accent-color: var(--color-secondary); flex: 0 0 auto; }
.map-filter-dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; }
.map-filter-label { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }

/* --- Nápověda / hláška --- */
.map-hint, .map-note {
  position: absolute;
  left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  padding: 8px 16px;
  font-size: 13.5px; font-weight: 700;
  color: var(--color-secondary);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(0, 29, 96, 0.18);
  pointer-events: none;
  white-space: nowrap;
}
.map-note { color: var(--color-text-secondary); }

/* --- Bottom-sheet vitríny --- */
.map-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 14, 48, 0.35);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.map-sheet-backdrop.is-open { opacity: 1; }
.map-sheet-backdrop[hidden] { display: none; }

.map-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  z-index: 60;
  width: min(var(--maxw), 100vw);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 14, 48, 0.3);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.map-sheet.is-open { transform: translate(-50%, 0); }
.map-sheet[hidden] { display: none; }

.map-sheet-grip {
  display: grid; place-items: center;
  padding: 10px 0 4px;
  cursor: grab;
  touch-action: none;
}
.map-sheet-grip span {
  width: 40px; height: 5px; border-radius: 999px;
  background: var(--color-border);
}
/* zavírací ✕ bottom-sheetu mapy — červený kruh s bílým ✕ (design pravidlo) */
.map-sheet-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  box-shadow: 0 3px 10px rgba(168, 27, 0, 0.4);
}
.map-sheet-close:active { background: var(--deep-red); }
.map-sheet-head { padding: 4px 20px 10px; }
.map-sheet-code {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  color: #fff; background: var(--color-primary);
  padding: 3px 10px; border-radius: 999px;
}
.map-sheet-name {
  font-size: 20px; font-weight: 800; color: var(--color-secondary);
  line-height: 1.2; margin: 8px 0 0; padding-right: 40px;
}
.map-sheet-head-sub {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--color-text-secondary);
  margin: 0 0 8px;
}
.map-sheet-body {
  padding: 4px 16px 8px;
  overflow-y: auto;
}
.map-sheet-empty {
  padding: 8px 4px 16px;
  color: var(--color-text-secondary); font-style: italic; font-size: 14px;
}
.map-art {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 8px; margin-bottom: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.map-art:active { background: var(--color-background); }
.map-art-thumb {
  flex: 0 0 48px; width: 48px; height: 48px;
  border-radius: 8px; overflow: hidden;
  background: var(--color-background);
  display: grid; place-items: center;
}
.map-art-thumb img { width: 100%; height: 100%; object-fit: contain; }
.map-art-thumb.is-placeholder {
  background: linear-gradient(135deg, #eef1f6 0%, #dfe5ee 100%);
  color: var(--color-secondary); opacity: 0.85;
}
.map-art-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.map-art-arrow { font-size: 20px; color: rgba(0, 29, 96, 0.4); }

/* dock nesmí překrývat ovládání sheetu — během otevřeného sheetu ho skryjeme */
body.map-sheet-open .dock { display: none; }

/* --- Kalibrační panel (jen ?calibrate=1) --- */
.cal-panel {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 14;
  width: min(240px, calc(100vw - 28px));
  max-height: calc(100% - 28px);
  overflow-y: auto;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 29, 96, 0.28);
  touch-action: auto;
}
.cal-title { font-size: 14px; font-weight: 800; color: var(--color-secondary); }
.cal-pick { font-size: 12px; color: var(--color-text-secondary); margin: 4px 0 10px; line-height: 1.4; }
.cal-op { display: block; font-size: 12px; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 10px; }
.cal-op input { width: 100%; margin-top: 6px; accent-color: var(--color-primary); }
.cal-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cal-sep { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); margin: 8px 2px 2px; }
.cal-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 7px 8px;
  border: 1px solid var(--color-border); border-radius: 10px;
  background: #fff; font-size: 13px;
}
.cal-item.is-todo { border-color: var(--color-primary); background: #fdecec; }
.cal-item.is-active { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.cal-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.cal-code { font-weight: 800; color: var(--color-secondary); }
.cal-status { margin-left: auto; font-size: 11px; color: var(--color-text-secondary); }
.cal-export {
  width: 100%; padding: 11px;
  border: none; border-radius: 12px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  color: #fff; font-size: 14px; font-weight: 800;
}

/* Plán je full-bleed přes celou šířku viewportu na všech velikostech —
   orientaci řeší JS (fit-width na portrét, fit-height + vycentrování na landscape/desktop).
   Žádná CSS rotace za běhu; piny jsou kotvené přímo na element obrázku. */

/* ==========================================================================
   Vyzbroj Zábrodského — homepage dlaždice + stránka + sběrný widget
   ========================================================================== */

/* Široká „featured" dlaždice pod mřížkou 2×2 (mřížka zůstává 2×2 netknutá) */
.home-feature {
  position: relative;
  flex: 0 0 auto;
  height: clamp(66px, 11vh, 96px);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 29, 96, 0.18);
  background: var(--color-secondary);
}
.home-feature-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}
.home-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 14, 48, 0.92) 0%, rgba(0, 14, 48, 0.6) 52%, rgba(0, 14, 48, 0.12) 100%);
}
.home-feature-content {
  position: absolute;
  left: 14px;
  right: 78px;
  top: 50%;
  transform: translateY(-50%);
}
.home-feature-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.home-feature-sub {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.home-feature-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-gold) 0%, #b0770a 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 3px 10px rgba(178, 120, 10, 0.45);
}
.home-feature:active { transform: scale(0.99); }

/* menší telefony na výšku — dlaždice o něco nižší, ať se homepage vejde */
@media (max-height: 660px) {
  .home-feature { height: clamp(58px, 9vh, 76px); }
  .home-feature-title { font-size: 18px; }
}

/* --- Stránka /vyzbroj --- */
.vyzbroj-page { max-width: 460px; margin: 0 auto; padding-top: 6px; }
.vyzbroj-page .page-title { text-align: center; }
.vyzbroj-progress {
  margin: 2px 0 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--color-secondary);
  letter-spacing: 0.02em;
}
.vyzbroj-page.is-complete .vyzbroj-progress { color: var(--color-gold); }

.vyzbroj-stage {
  position: relative;
  width: min(72vw, 300px);
  margin: 0 auto;
}
.vyzbroj-figure {
  position: relative;
  width: 100%;
  aspect-ratio: 883 / 1200;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(245, 247, 250, 0.6) 60%, rgba(0, 29, 96, 0.06) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 29, 96, 0.06);
}
.vyzbroj-page.is-complete .vyzbroj-figure {
  box-shadow: 0 0 0 3px var(--color-gold), 0 10px 26px rgba(178, 120, 10, 0.28);
}
.vyzbroj-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vyzbroj-base-ph { display: grid; place-items: center; padding: 8%; }
.vyzbroj-layer {
  position: absolute;
  transform: translate(-50%, -50%) scale(1);
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
  animation: vzPop 0.42s cubic-bezier(0.2, 1.4, 0.5, 1) both;
}
.vyzbroj-layer-mark {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, var(--color-gold) 0%, #b0770a 100%);
  box-shadow: 0 3px 9px rgba(178, 120, 10, 0.5);
}
@keyframes vzPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.vyzbroj-challenge {
  margin: 14px auto 12px;
  max-width: 340px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-secondary);
}
.vyzbroj-page.is-complete .vyzbroj-challenge { color: var(--color-gold); font-weight: 700; }

.vyzbroj-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 auto 16px;
  max-width: 360px;
}
.vyzbroj-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-secondary);
}
.vyzbroj-chip.is-got {
  border-color: var(--color-gold);
  background: #fff8ea;
  color: var(--color-secondary);
}
.vyzbroj-chip.is-locked { opacity: 0.75; }
.vyzbroj-chip-ic { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; }
.vyzbroj-chip.is-got .vyzbroj-chip-ic { color: var(--color-gold); }
.vyzbroj-chip.is-locked .vyzbroj-chip-ic { color: var(--color-text-secondary); }
.vyzbroj-chip-name { line-height: 1.2; }

/* --- Sběrný widget (modal s párty jiskrami) --- */
.vyzbroj-widget {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.vyzbroj-widget.is-in { opacity: 1; }
.vyzbroj-widget-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 12, 40, 0.62);
  backdrop-filter: blur(2px);
}
.vyzbroj-widget-card {
  position: relative;
  width: min(92vw, 340px);
  padding: 22px 20px 20px;
  border-radius: 22px;
  background: var(--color-surface);
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 12, 40, 0.4);
  overflow: hidden;
  transform: translateY(10px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.vyzbroj-widget.is-in .vyzbroj-widget-card { transform: translateY(0) scale(1); }
.vyzbroj-widget.is-complete .vyzbroj-widget-card {
  box-shadow: 0 0 0 3px var(--color-gold), 0 18px 48px rgba(0, 12, 40, 0.4);
}
.vyzbroj-widget-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 29, 96, 0.06);
  color: var(--color-secondary);
  font-size: 16px;
  line-height: 1;
  z-index: 3;
}
.vyzbroj-widget-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--color-gold) 0%, #b0770a 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  position: relative;
  z-index: 2;
}
.vyzbroj-widget-imgwrap {
  position: relative;
  z-index: 2;
  height: 132px;
  display: grid;
  place-items: center;
  margin: 6px 0 10px;
}
.vyzbroj-widget-img {
  max-height: 132px;
  max-width: 82%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
  animation: vzPop 0.5s cubic-bezier(0.2, 1.4, 0.5, 1) both;
}
.vyzbroj-widget-img-ph {
  width: 96px;
  height: 132px;
  display: grid;
  place-items: center;
  gap: 4px;
  opacity: 0.6;
}
.vyzbroj-widget-imgnote { font-size: 11px; color: var(--color-text-secondary); }
.vyzbroj-widget-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.02;
  color: var(--color-secondary);
}
.vyzbroj-widget.is-complete .vyzbroj-widget-title { color: var(--color-gold); }
.vyzbroj-widget-sub {
  position: relative;
  z-index: 2;
  margin: 8px 0 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}
.vyzbroj-widget-cta {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--deep-red) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(168, 27, 0, 0.35);
}

/* párty jiskry uvnitř karty */
.vyzbroj-sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.vz-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%) scale(var(--s));
  background:
    radial-gradient(circle, currentColor 0 12%, transparent 14%),
    linear-gradient(currentColor, currentColor) center/2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center/100% 2px no-repeat;
  opacity: 0;
  animation: vzSpark 1.6s ease-in-out var(--d) infinite;
}
.vz-spark.c-gold { color: var(--color-gold); }
.vz-spark.c-red { color: var(--color-primary); }
.vz-spark.c-navy { color: var(--color-secondary); }
.vz-spark.c-white { color: #fff; }
@keyframes vzSpark {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--s) * 0.3)) rotate(0deg); }
  40% { opacity: 0.95; transform: translate(-50%, -50%) scale(var(--s)) rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .vyzbroj-layer, .vyzbroj-widget-img { animation: none; }
  .vz-spark { animation: none; opacity: 0.85; }
  .vyzbroj-widget, .vyzbroj-widget-card { transition: none; }
}
