/* Bratr Prokop — guide PWA.
 *
 * Design tokens jsou 1:1 z beeer-museum (web + admin), ne z prototypu:
 *  - paleta: globals.css (@theme, Modern Craft) — #FFC800 / #0A2818 / #F5F1E8
 *  - tvary: ui/Button.tsx (radius 2px, border 2px, tvrdý offset stín 4px 4px 0,
 *    press-in hover/active) a admin _instance-cbm.scss (stín je tvar, ne záře;
 *    stisk = posun o offset, roh zůstává na místě)
 *  - chat: doslovný přepis ProkopChat.module.css
 *  - písma: Oswald (display, verzálky) + Montserrat (text), jako web i admin
 */

:root {
  /* Modern Craft palette — src/app/(frontend)/[locale]/globals.css */
  --yellow: #FFC800;
  --yellow-dark: #E5B300;
  --deep: #0A2818;         /* app ground = ProkopChat panel */
  --dark: #1B4D2E;         /* vstupy, user bubliny, zdvižené plochy */
  --fresh: #2E8B3D;
  --cream: #F5F1E8;
  --brass: #B8962E;

  /* Odvozené průhlednosti krémové — stejné kroky jako ProkopChat.module.css */
  --cream-80: rgba(245, 241, 232, 0.8);
  --cream-60: rgba(245, 241, 232, 0.6);
  --cream-40: rgba(245, 241, 232, 0.4);
  --cream-30: rgba(245, 241, 232, 0.3);
  --cream-20: rgba(245, 241, 232, 0.2);
  --cream-10: rgba(245, 241, 232, 0.1);
  --cream-05: rgba(245, 241, 232, 0.05);

  /* Stín na tmavé ploše musí zůstat vidět (admin: --mk-shadow-on-ink). */
  --shadow-ink: #04160D;

  --font-display: 'Oswald', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Montserrat', ui-sans-serif, system-ui, sans-serif;

  --radius: 2px;           /* web: rounded-[2px]; admin má rovnou 0 */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream);
  background: var(--deep);
  -webkit-font-smoothing: antialiased;
}

.app {
  position: relative;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--deep);
}

/* Zrnitá textura z webu (.noise-overlay v globals.css). */
.noise { position: relative; }
.noise::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.screens {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen {
  flex: 1 1 auto;
  padding: max(14px, env(safe-area-inset-top)) 20px calc(100px + env(safe-area-inset-bottom));
  animation: fadeIn 0.28s ease-out;
}
.screen.no-tabbar { padding-bottom: 24px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Typografické role z webu ──────────────────────────────────── */

/* .kicker z globals.css */
.kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
}
.kicker--dim { color: var(--cream-40); }

h1, h2, h3 { font-family: var(--font-display); margin: 0; }

.title-xl {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.muted { color: var(--cream-60); }
.faint { color: var(--cream-40); }

/* ── Tlačítka — přepis ui/Button.tsx ("stamp" tlačítka) ────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 100ms;
  background: var(--yellow);
  color: var(--deep);
  border: 2px solid var(--deep);
  box-shadow: 4px 4px 0 var(--shadow-ink);
}
.btn:hover {
  filter: brightness(0.9);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow-ink);
}
.btn:active {
  filter: brightness(0.82);
  transform: translate(4px, 4px);
  box-shadow: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* Sekundární varianta na tmavé ploše — Button.tsx `secondary` */
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--cream);
  box-shadow: 4px 4px 0 var(--cream-30);
}
.btn--ghost:hover {
  filter: none;
  background: var(--cream-10);
  box-shadow: 2px 2px 0 var(--cream-30);
}
.btn--ghost:active {
  filter: none;
  background: var(--cream-20);
  box-shadow: none;
}

.iconbtn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--cream-20);
  background: var(--cream-05);
  color: var(--cream);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 150ms;
}
.iconbtn:hover { border-color: var(--yellow); }
.iconbtn--cam { color: var(--yellow); border-color: var(--yellow); }
.iconbtn--cam svg { width: 20px; height: 20px; }

/* ── Čtečka exponátů (recognition.js) ──────────────────────────── */
body.cam-open { overflow: hidden; }
.cam {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000;
  color: var(--cream);
  overflow: hidden;
}
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-mask { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
/* Rámeček: 80 % kratší strany, stejný výřez jde do modelu (frameShare). */
.cam-frame {
  position: relative;
  width: 80vmin;
  height: 80vmin;
  box-shadow: 0 0 0 100vmax rgba(10, 40, 24, 0.55);
}
.cam-frame i { position: absolute; width: 34px; height: 34px; border: 0 solid var(--yellow); }
.cam-frame i:nth-child(1) { left: -3px; top: -3px; border-left-width: 5px; border-top-width: 5px; }
.cam-frame i:nth-child(2) { right: -3px; top: -3px; border-right-width: 5px; border-top-width: 5px; }
.cam-frame i:nth-child(3) { left: -3px; bottom: -3px; border-left-width: 5px; border-bottom-width: 5px; }
.cam-frame i:nth-child(4) { right: -3px; bottom: -3px; border-right-width: 5px; border-bottom-width: 5px; }
.cam-top {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 16px 12px;
}
.cam-top .iconbtn { background: var(--deep); font-size: 24px; }
.cam-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
}
.cam-bottom {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cam-status {
  align-self: center;
  padding: 8px 14px;
  background: var(--deep);
  border: 1px solid var(--cream-20);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cam-modes { margin: 0; background: var(--deep); }
.cam-modes[hidden] { display: none; }
.cam-sheet {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-height: 72vh;
  overflow-y: auto;
  padding: 16px;
  background: var(--deep);
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadow-ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cam-sheet[hidden] { display: none; }
.cam-found { display: flex; gap: 14px; align-items: center; }
.cam-found img { width: 76px; height: 76px; object-fit: cover; border: 2px solid var(--yellow); border-radius: var(--radius); }
.cf-k {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.cf-n { font-family: var(--font-display); font-size: 19px; font-weight: 600; text-transform: uppercase; line-height: 1.2; }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}
.cam-unknown { font-family: var(--font-display); font-size: 20px; font-weight: 600; text-transform: uppercase; line-height: 1.2; }
.cu-sub { font-size: 13px; color: var(--cream-60); }
.cu-list { display: flex; flex-direction: column; gap: 8px; }
.cu-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  background: var(--cream-05);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.cu-item img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); flex: 0 0 auto; }

/* ── Karty a plochy — geometrie z ProkopChat bublin + admin stíny ── */

.card {
  background: var(--cream-05);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  padding: 18px;
}

/* Vystouplá karta: plný posunutý stín jako v adminu (tvar, ne záře). */
.card--raised {
  background: var(--dark);
  border: 1px solid var(--cream-10);
  box-shadow: 5px 5px 0 var(--shadow-ink);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 16px;
}
.topbar .tb-title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 17px;
}
.topbar .tb-sub {
  font-size: 11px;
  color: var(--cream-40);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-display);
}

/* ── Vstupní obrazovka ─────────────────────────────────────────── */

.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: calc(100dvh - 48px);
  padding-top: 12px;
}
.brandmark {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 12px;
  color: var(--yellow);
  margin-bottom: 22px;
}
.prokop-figure {
  position: relative;
  width: 176px;
  height: 176px;
  margin-bottom: 10px;
}
.prokop-figure::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 0, 0.22), rgba(255, 200, 0, 0) 68%);
}
.prokop-figure img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.5));
}
.entry .role {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 12px;
  color: var(--yellow);
  font-weight: 500;
  margin: 10px 0 16px;
}
.entry .say {
  color: var(--cream-80);
  font-size: 15px;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 24px;
}
/* Kdo, kde a co vás čeká — instituce má jméno, adresu a logo. */
.entry-info {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: var(--cream-05);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin: 0 0 22px;
  max-width: 340px;
}
.ei-logo { width: 56px; height: auto; flex: 0 0 auto; }
.ei-name {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
}
.ei-addr { font-size: 11.5px; color: var(--cream-60); margin-bottom: 4px; }
.ei-what { font-size: 11.5px; color: var(--cream-60); line-height: 1.45; }

.tb-logo { width: 46px; height: auto; flex: 0 0 auto; }

.depth.about { margin-top: 16px; }

.lang {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 26px;
}
.lang button {
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--cream-20);
  background: transparent;
  color: var(--cream-60);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 150ms;
}
.lang button.on {
  background: var(--dark);
  color: var(--cream);
  border-color: var(--yellow);
}
.entry .foot {
  margin-top: 22px;
  font-size: 11px;
  color: var(--cream-40);
  letter-spacing: 0.02em;
}

/* ── Přehled trasy ─────────────────────────────────────────────── */

.hero {
  border-radius: var(--radius);
  padding: 20px;
  background: var(--dark);
  border: 1px solid var(--cream-10);
  box-shadow: 5px 5px 0 var(--shadow-ink);
  margin-bottom: 6px;
}
.hero .kicker { display: block; margin-bottom: 8px; }
.hero h2 {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 25px;
  line-height: 1.05;
  margin-bottom: 14px;
  text-wrap: balance;
}
.metarow {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--cream-60);
}
.metarow b {
  font-family: var(--font-display);
  color: var(--yellow);
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.progress { margin: 16px 0 14px; }
.progress .bar {
  height: 8px;
  border-radius: var(--radius);
  background: var(--deep);
  border: 1px solid var(--cream-10);
  overflow: hidden;
}
.progress .bar span {
  display: block;
  height: 100%;
  background: var(--yellow);
  transition: width 0.4s ease;
}
.progress .lab {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--cream-60);
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}

.sect-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 2px 12px;
}
.sect-h h3 {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--cream-10);
  flex: 1 1 auto;
}
.sect-h .link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 0 6px 12px;
}

.floor {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  background: var(--cream-05);
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
  text-align: left;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: inherit;
}
.floor:hover { border-color: var(--yellow); }
.floor .lv {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--dark);
  border: 1px solid var(--cream-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--yellow);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.floor .fn { flex: 1 1 auto; min-width: 0; }
.floor .fn .t {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
  font-weight: 500;
}
.floor .fn .s { font-size: 11.5px; color: var(--cream-60); }
.floor .chev { color: var(--cream-40); font-size: 18px; }
.floor.here {
  border-color: var(--yellow);
  background: var(--dark);
  box-shadow: 4px 4px 0 var(--shadow-ink);
}
.floor.here .pin {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--yellow);
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ── Mapa ──────────────────────────────────────────────────────── */

.youare {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dark);
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--shadow-ink);
  padding: 12px 14px;
  margin-bottom: 18px;
}
.youare .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--yellow);
  position: relative;
  flex: 0 0 auto;
}
.youare .dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  opacity: 0.5;
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.youare .t {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
  font-weight: 500;
}
.youare .s { font-size: 11.5px; color: var(--cream-60); }

.maproom {
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  background: var(--cream-05);
  margin-bottom: 10px;
  overflow: hidden;
}
.maproom .rh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--dark);
  border-bottom: 1px solid var(--cream-10);
}
.maproom .rh .nm {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  font-weight: 600;
}
.maproom .rh .ct {
  margin-left: auto;
  font-size: 11px;
  color: var(--cream-60);
  font-variant-numeric: tabular-nums;
}
.space-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px 2px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-40);
}
/* Číslo fyzické cedule prostoru. */
.space-h .sign {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.stops {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 14px 12px;
}
.stopchip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--cream-10);
  background: var(--deep);
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--cream-60);
  cursor: pointer;
  transition: all 0.2s;
}
.stopchip:hover { border-color: var(--yellow); color: var(--cream); }
.stopchip .n {
  font-family: var(--font-display);
  color: var(--yellow-dark);
  font-weight: 600;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.stopchip.prep { border-style: dashed; color: var(--cream-40); }
.stopchip.done { color: var(--cream-40); }
.stopchip.done .n { color: var(--fresh); }
.stopchip.cur {
  border-color: var(--yellow);
  background: var(--dark);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--shadow-ink);
}

/* Přepínač Seznam / Půdorys */
.seg {
  display: flex;
  border: 2px solid var(--cream-20);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.seg button {
  flex: 1 1 0;
  padding: 10px 8px;
  background: none;
  border: none;
  color: var(--cream-60);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.seg button.on { background: var(--yellow); color: var(--deep); }

button.youare { width: 100%; text-align: left; color: var(--cream); font-family: var(--font-body); cursor: pointer; }

/* Časová osa po podlažích */
.tl-floor { margin-bottom: 4px; }
.tl-fh {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: var(--dark);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--shadow-ink);
  margin-bottom: 10px;
}
.tl-fh .nm {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  font-weight: 600;
}
.tl-fh .ct { margin-left: auto; font-size: 11px; color: var(--cream-60); }

.tl-space {
  position: relative;
  margin-left: 17px;
  padding-left: 22px;
  padding-bottom: 12px;
  border-left: 2px solid var(--cream-20);
}
.tl-space.done { border-left-color: var(--fresh); }
.tl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  color: var(--cream);
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
}
.tl-node {
  position: absolute;
  left: -16px;
  top: 21px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep);
  border: 2px solid var(--cream-30);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.tl-node svg { width: 16px; height: 16px; }
.tl-space.done .tl-node { border-color: var(--fresh); background: var(--fresh); color: var(--cream); }
.tl-space.here .tl-node { border-color: var(--yellow); background: var(--yellow); color: var(--deep); }
.tl-ph {
  flex: 0 0 auto;
  width: 96px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
  border: 1px solid var(--cream-10);
}
.tl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-ph--plaque, .ns-ph--plaque {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--yellow);
}
.tl-tx { display: flex; flex-direction: column; min-width: 0; }
.tl-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
}
.tl-here {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
}
.tl-space .stops { padding: 8px 0 0; }
.tl-space.here > .tl-row .tl-ph { border: 2px solid var(--yellow); box-shadow: 3px 3px 0 var(--shadow-ink); }
.tl-space.done .tl-name { color: var(--cream-60); }

/* Další zastavení pod „jste tady" */
.nextstop {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--yellow);
  color: var(--deep);
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--shadow-ink);
  text-align: left;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 100ms;
}
.nextstop:active { transform: translate(4px, 4px); box-shadow: none; }
.ns-ph { flex: 0 0 auto; width: 64px; height: 48px; border-radius: var(--radius); overflow: hidden; background: var(--dark); }
.ns-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ns-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ns-k {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ns-n { font-family: var(--font-display); font-size: 15px; font-weight: 600; text-transform: uppercase; line-height: 1.2; }
.nextstop .chev { font-size: 22px; font-weight: 700; }

/* Přechod mezi podlažími */
.tl-trans {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 2px 0 14px 17px;
  padding: 12px 14px 12px 22px;
  border-left: 2px dashed var(--yellow);
  color: var(--cream);
}
.tl-stairs {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  color: var(--yellow);
  margin-left: -40px;
  background: var(--deep);
}
.tl-stairs svg { width: 22px; height: 22px; }
.tl-stairs svg.down { transform: scaleY(-1); }
.tl-trans .tt {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  font-weight: 600;
  color: var(--yellow);
}
.tl-trans .tn { font-size: 13px; color: var(--cream-80); line-height: 1.45; margin-top: 2px; }

/* Půdorys */
.plan-tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.plan-tabs button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--cream-20);
  border-radius: var(--radius);
  background: var(--cream-05);
  color: var(--cream-80);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.plan-tabs button.on { border-color: var(--yellow); background: var(--dark); color: var(--yellow); box-shadow: 3px 3px 0 var(--shadow-ink); }
.plan-view {
  position: relative;
  height: min(64vh, 520px);
  overflow: hidden;
  touch-action: none;
  background: var(--cream);
  border: 2px solid var(--cream-30);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--shadow-ink);
  user-select: none;
  -webkit-user-select: none;
}
.plan-view svg { width: 100%; height: 100%; display: block; transform-origin: 0 0; }
.plan-view .pp {
  fill: rgba(27, 77, 46, 0.18);
  stroke: var(--dark);
  stroke-width: 10;
  cursor: pointer;
}
.plan-view .pp.soft { stroke: none; }
.plan-view .pp.done { fill: rgba(46, 139, 61, 0.32); }
.plan-view .pp.here { fill: rgba(255, 200, 0, 0.55); stroke: var(--yellow-dark); }
.plan-view .pp.here.soft { stroke: none; }
.plan-view .proute {
  fill: none;
  stroke: var(--deep);
  stroke-width: 18;
  stroke-dasharray: 46 30;
  stroke-linejoin: round;
  pointer-events: none;
}
.plan-view .pl { cursor: pointer; }
.plan-view .pl rect { fill: var(--deep); }
.plan-view .pl text {
  fill: var(--yellow);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 84px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.plan-view .pl.done rect { fill: var(--fresh); }
.plan-view .pl.done text { fill: var(--cream); }
.plan-view .pl.here rect { fill: var(--yellow); stroke: var(--deep); stroke-width: 10; }
.plan-view .pl.here text { fill: var(--deep); }
.plan-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.plan-zoom button {
  width: 38px;
  height: 38px;
  border: 2px solid var(--deep);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--deep);
  cursor: pointer;
}
.plan-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.plan-key {
  display: flex;
  gap: 7px;
  align-items: baseline;
  padding: 7px 10px;
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  background: var(--deep);
  color: var(--cream-80);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
}
.plan-key b { font-family: var(--font-display); color: var(--yellow); }
.plan-key.here { border-color: var(--yellow); background: var(--dark); color: var(--cream); }
.plan-note { color: var(--cream-80); font-size: 14px; margin: 0 0 14px; }
.plan-list .tl-row {
  position: relative;
  padding: 8px 10px 8px 52px;
  margin-bottom: 8px;
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  background: var(--cream-05);
}
.plan-list .tl-row .tl-node { left: 10px; top: calc(50% - 15px); }
.plan-list .tl-row.here { border-color: var(--yellow); background: var(--dark); box-shadow: 4px 4px 0 var(--shadow-ink); }

/* ── Zastavení ─────────────────────────────────────────────────── */

.stop-img {
  height: 180px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  background: var(--dark);
  border: 1px solid var(--cream-10);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}
.stop-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stop-img .initial {
  position: absolute;
  top: 0;
  left: 14px;
  font-family: var(--font-display);
  font-size: 110px;
  font-weight: 700;
  color: rgba(255, 200, 0, 0.14);
  line-height: 1.1;
}
.stop-img .tag {
  position: relative;
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cream);
  background: rgba(10, 40, 24, 0.75);
  border: 1px solid var(--cream-10);
  padding: 5px 9px;
  border-radius: var(--radius);
}
/* Hero s Prokopovým portrétem (bloky „naplno"). */
.stop-img--prokop { background: var(--dark); }
.stop-img--prokop .hero-prokop {
  position: absolute;
  inset: auto 10px 0 auto;
  height: 96%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(2px 3px 6px rgba(0, 0, 0, 0.4));
}

/* Hero jako plocha s číslem cedule — stejné číslo jako na fyzické ceduli. */
.stop-img--plaque { background: var(--dark); }
.stop-img--plaque .plaque-num {
  position: absolute;
  top: 50%;
  left: 24px;
  transform: translateY(-54%);
  font-family: var(--font-display);
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}

.stop-num {
  font-family: var(--font-display);
  color: var(--yellow);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.prep-badge {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep);
  background: var(--yellow);
  border-radius: var(--radius);
  padding: 2px 7px;
  margin-left: 10px;
  vertical-align: middle;
}

.prep-src { margin-bottom: 14px; }
.prep-src .narr { padding: 0 14px 6px; }

.bdots { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; }
.bdots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream-20);
}
.bdots i.on { background: var(--yellow); }

.btn--enter { margin-top: 14px; }

.stop-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 27px;
  line-height: 1.05;
  margin: 4px 0 14px;
  text-wrap: balance;
}

/* Audio přehrávač — jen vlastní nahrávky (ElevenLabs), nikdy CoW TTS. */
.player {
  background: var(--cream-05);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 16px;
}
.player .prow { display: flex; align-items: center; gap: 13px; }
.playbtn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  border: 2px solid var(--deep);
  background: var(--yellow);
  color: var(--deep);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--shadow-ink);
  transition: all 100ms;
}
.playbtn:hover { filter: brightness(0.9); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--shadow-ink); }
.playbtn:active { transform: translate(3px, 3px); box-shadow: none; }
.playbtn svg { width: 18px; height: 18px; fill: currentColor; }
.ptrack-wrap { flex: 1 1 auto; }
.ptrack {
  height: 8px;
  border-radius: var(--radius);
  background: var(--deep);
  border: 1px solid var(--cream-10);
  overflow: hidden;
  cursor: pointer;
}
.ptrack span { display: block; height: 100%; width: 0; background: var(--yellow); }
.ptime {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--cream-40);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
/* Živá křivka hlasu (WebAudio analyser, fallback vlnění). */
.vwave {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 10px;
}
.vwave[hidden] { display: none; }

.pvoice { font-size: 11px; color: var(--cream-40); margin-top: 8px; }
.pvoice b { color: var(--yellow); font-weight: 700; }

/* Avatar Prokopa v přehrávači (hlava a ramena, jako v chatu). */
.pavatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.pavatar img {
  position: absolute;
  bottom: -3px;
  left: -3px;
  width: 46px;
  height: 46px;
  object-fit: contain;
}

/* Stav „hlas se připravuje" — čitelný, ne rozbitý přehrávač. */
.player--pending { display: flex; gap: 14px; align-items: center; }
.player--pending p { margin: 0; font-size: 13px; color: var(--cream-60); line-height: 1.5; }

/* Lead — „jedna věta velkým", vždy fakt (kanon: screenLead). */
.stop-lead {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cream);
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--yellow);
}

/* Karaoke — na obrazovce jen jeden řádek, zvýrazňuje se po slovech. */
.karaoke { padding: 4px 0 8px; }
.kline-live {
  min-height: 4.2em;
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--cream-30);
  text-wrap: balance;
}
.kline-live span { transition: color 0.15s ease; }
.kline-live .sung { color: var(--yellow); }
.ktoggle {
  margin-top: 12px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-40);
  cursor: pointer;
}
.ktoggle:hover { color: var(--yellow); }

/* Fakta — datová vrstva: co se špatně poslouchá a dobře čte. */
.facts {
  margin: 6px 0 14px;
  border-top: 2px solid var(--cream-10);
}
.fact {
  display: grid;
  grid-template-columns: minmax(110px, 40%) 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-10);
  font-size: 13px;
  align-items: baseline;
}
.fact .fk { color: var(--cream-40); }
.fact .fv { color: var(--cream); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Hloubka — odpovědi jen tomu, kdo se zeptá. */
.depth-wrap { margin: 4px 0 14px; }
.depth-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-40);
  margin-bottom: 8px;
}
.depth {
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  background: var(--cream-05);
  margin-bottom: 7px;
}
.depth summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cream-80);
}
.depth summary::-webkit-details-marker { display: none; }
.depth summary::before { content: '+'; color: var(--yellow); font-family: var(--font-display); font-weight: 600; margin-right: 9px; }
.depth[open] summary::before { content: '−'; }
.depth[open] summary { color: var(--yellow); }
.depth p { margin: 0 14px 12px; font-size: 14px; line-height: 1.6; color: var(--cream-80); }

/* Provozní pokyn — bez persony, odlišený od výkladu. */
.navnote {
  display: flex;
  gap: 10px;
  align-items: baseline;
  background: var(--dark);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--cream-80);
  margin: 4px 0 6px;
}
.navnote .ni { color: var(--yellow); flex: 0 0 auto; }

.narr { font-size: 15px; line-height: 1.65; color: var(--cream-80); }
.narr p { margin: 0 0 13px; }
.narr .drop {
  font-family: var(--font-display);
  float: left;
  font-size: 52px;
  line-height: 0.8;
  font-weight: 700;
  color: var(--yellow);
  margin: 5px 10px 0 0;
}

.stop-actions { margin: 20px 0 0; display: flex; flex-direction: column; gap: 10px; }
.stop-nav { display: flex; gap: 10px; margin-top: 10px; }
.stop-nav .btn { flex: 1 1 0; }

/* ── Chat — doslovný přepis ProkopChat.module.css ──────────────── */

.chatwrap {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 66px - env(safe-area-inset-bottom));
  padding: max(14px, env(safe-area-inset-top)) 0 0;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--cream-10);
  flex-shrink: 0;
}
.chat-head-left { display: flex; align-items: center; gap: 12px; }
.chat-avatar { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.chat-avatar img {
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.chat-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cream);
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.25rem;
  letter-spacing: 0.08em;
}
.chat-subtitle { color: var(--cream-40); font-size: 12px; line-height: 1rem; }

.chat-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.rowBot { display: flex; justify-content: flex-start; animation: fadeIn 0.3s ease-out; animation-fill-mode: both; }
.rowUser { display: flex; justify-content: flex-end; }
.bubbleBot {
  max-width: 85%;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: var(--radius);
  background: var(--cream-05);
  color: var(--cream-80);
  border: 1px solid var(--cream-10);
  line-height: 1.6;
}
.bubbleUser {
  max-width: 80%;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--cream);
  line-height: 1.6;
}
.bubbleThinking {
  background: var(--cream-05);
  color: var(--cream-40);
  padding: 10px 16px;
  font-size: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--cream-10);
}
@media (min-width: 768px) {
  .bubbleBot, .bubbleUser, .bubbleThinking { font-size: 14px; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 16px 0;
  border-top: 1px solid var(--cream-10);
  flex-shrink: 0;
}
.chip {
  padding: 8px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--cream-10);
  background: var(--cream-05);
  color: var(--cream-60);
  font-size: 12.5px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--yellow); color: var(--cream); }

.inputBar { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-shrink: 0; }
.inputForm { display: flex; gap: 8px; }
.input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  background: var(--dark);
  color: var(--cream);
  font-size: 16px;
  font-family: var(--font-body);
  border: 2px solid var(--cream-20);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms;
}
.input::placeholder { color: var(--cream-30); }
.input:focus { border-color: var(--yellow); }
.sendButton {
  padding: 10px 12px;
  background: var(--yellow);
  color: var(--deep);
  border-radius: var(--radius);
  border: 2px solid var(--deep);
  box-shadow: 2px 2px 0 var(--deep);
  cursor: pointer;
  transition: all 100ms;
  display: flex;
  align-items: center;
}
.sendButton:hover:not(:disabled) {
  filter: brightness(0.9);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--deep);
}
.sendButton:disabled { opacity: 0.4; cursor: default; }
.sendButton svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── Konec trasy ───────────────────────────────────────────────── */

.end {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 16px;
}
.end .seal {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--deep);
  box-shadow: 5px 5px 0 var(--shadow-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 6px;
}
.end .seal svg { width: 44px; height: 44px; fill: var(--deep); }
.end h2 {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 27px;
  line-height: 1.05;
  margin: 14px 0 8px;
  text-wrap: balance;
}
.end .say {
  color: var(--cream-60);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto 22px;
}
.tip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--cream-10);
  background: var(--cream-05);
  margin-bottom: 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: inherit;
  text-decoration: none;
}
.tip:hover { border-color: var(--yellow); }
.tip .ic {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: var(--dark);
  border: 1px solid var(--cream-10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
}
.tip .ic svg { width: 20px; height: 20px; fill: currentColor; }
.tip .tx { flex: 1 1 auto; min-width: 0; }
.tip .tt {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.tip .ts { display: block; font-size: 11.5px; color: var(--cream-60); line-height: 1.45; }
.tip .soon {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep);
  background: var(--yellow);
  border-radius: var(--radius);
  padding: 2px 6px;
  margin-left: auto;
  flex: 0 0 auto;
}

/* ── Spodní navigace ───────────────────────────────────────────── */

.tabbar[hidden] { display: none; }
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(66px + env(safe-area-inset-bottom));
  display: flex;
  border-top: 1px solid var(--cream-10);
  background: rgba(10, 40, 24, 0.94);
  backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 10;
}
.tab {
  flex: 1 1 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--cream-40);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tab svg { width: 20px; height: 20px; fill: currentColor; }
.tab.on { color: var(--yellow); }

.iconbtn--num {
  width: auto;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--yellow);
}

/* Popisek varianty v demu iniciál. */
.demo-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  border-top: 1px dashed var(--cream-20);
  padding-top: 10px;
  margin: 14px 0 8px;
}
.demo-label:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* ── Ruční zadání čísla zastavení ──────────────────────────────── */
.keypad-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(4, 22, 13, 0.8);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.keypad {
  width: 100%;
  max-width: 480px;
  background: var(--deep);
  border-top: 2px solid var(--yellow);
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
}
.kp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.kp-title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
}
.kp-sub { font-size: 11.5px; color: var(--cream-40); margin-top: 2px; }
.kp-display {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--yellow);
  background: var(--dark);
  border: 1px solid var(--cream-10);
  border-radius: var(--radius);
  padding: 12px 0;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  min-height: 68px;
}
.kp-error {
  font-size: 12.5px;
  color: var(--yellow);
  text-align: center;
  margin-bottom: 6px;
}
.kp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.kp-key {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  padding: 13px 0;
  border-radius: var(--radius);
  border: 1px solid var(--cream-20);
  background: var(--cream-05);
  color: var(--cream);
  cursor: pointer;
  transition: all 100ms;
}
.kp-key:active { background: var(--cream-20); }
.kp-del { color: var(--cream-60); }
.kp-ok {
  background: var(--yellow);
  color: var(--deep);
  border: 2px solid var(--deep);
  box-shadow: 3px 3px 0 var(--shadow-ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
}
.kp-ok:active { transform: translate(3px, 3px); box-shadow: none; }

/* Offline lišta */
.offline-note {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--yellow);
  color: var(--deep);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 10px calc(5px + env(safe-area-inset-top));
  z-index: 20;
}

/* Stažení pro cestu bez signálu (offline.js). Nenápadné: stav, ne výzva. */
.dl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  vertical-align: middle;
  color: var(--cream-40);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.dl svg { width: 12px; height: 12px; }
.dl.is-ready { color: var(--cream-60); }
.dl.is-ready svg { color: var(--yellow); }
.dl.is-busy svg, .dl-ic.is-busy svg { animation: dl-pulse 1.6s ease-in-out infinite; }
@keyframes dl-pulse { 50% { opacity: 0.3; } }

.pstate { font-size: 12px; color: var(--cream-60); line-height: 1.5; margin-top: 8px; }
.player.is-loading .playbtn { animation: dl-pulse 1.6s ease-in-out infinite; }
.player.is-waiting .playbtn { opacity: 0.5; }

.dlnote svg { width: 14px; height: 14px; display: block; }
.dlnote.is-ready { border-color: var(--cream-20); }

.dlall { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--cream-60); }
.dlall[hidden] { display: none; }
.dlall .dl-ic { color: var(--yellow); flex: 0 0 auto; }
.dlall .dl-ic svg { width: 16px; height: 16px; display: block; }
.dlall-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--cream-20);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--cream-80);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dlall-btn .dl-tx { display: flex; flex-direction: column; gap: 2px; }
.dlall-btn b { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream); }
.dlall-btn span span { font-size: 12px; color: var(--cream-60); }
@media (prefers-reduced-motion: reduce) {
  .dl.is-busy svg, .dl-ic.is-busy svg, .player.is-loading .playbtn { animation: none; }
}

/* ── Dialog s hosty (repliky po řádcích) ─────────────────────────────
   Každý řádek: avatar a jméno mluvčího (odkaz do „Kdo je kdo“), pod ním
   replika. Prokop vlevo bez rámečku, host s tenkou linkou vlevo, ať je
   střídání hlasů vidět i bez barev. */
.dlg-line { margin: 0 0 16px; }
.dlg-line p { margin: 0 0 10px; }
.dlg-line p:last-child { margin-bottom: 0; }
.dlg-who {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 6px; color: var(--cream); text-decoration: none;
  min-height: 32px;
}
.dlg-av {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 50%; overflow: hidden;
  background: var(--dark); border: 2px solid var(--cream-20);
}
.dlg-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlg-name {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--cream-60);
}
.dlg-who:hover .dlg-name, .dlg-who:focus-visible .dlg-name { color: var(--yellow); }
.dlg-who:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.dlg-line--guest .dlg-av { border-color: var(--yellow); }
.dlg-line--guest .dlg-tx { border-left: 2px solid var(--yellow); padding-left: 12px; margin-left: 15px; }
.dlg-line--prokop .dlg-tx { padding-left: 0; }

/* Karaoke: kdo právě mluví */
.k-who { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.k-who--guest .dlg-av { border-color: var(--yellow); }
.k-who--guest .dlg-name { color: var(--yellow); }

/* ── Kdo je kdo ────────────────────────────────────────────────────── */
.who-link {
  display: inline-block; margin: 2px 0 10px;
  font-size: 13px; color: var(--cream-60); text-decoration: underline;
  text-underline-offset: 3px;
}
.who-link:hover, .who-link:focus-visible { color: var(--yellow); }
.who-h {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 18px; color: var(--cream); margin: 22px 16px 4px;
}
.who-lead { margin: 0 16px 12px; font-size: 14px; color: var(--cream-60); }
.who-card {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: start;
  margin: 0 16px 12px; padding: 12px;
  background: var(--cream-05); border: 2px solid var(--cream-10); border-radius: var(--radius);
  scroll-margin-top: 72px;
}
.who-card.is-focus { border-color: var(--yellow); }
.who-card--prokop { margin-top: 14px; }
.who-art { width: 88px; aspect-ratio: 374 / 520; border-radius: var(--radius); overflow: hidden; background: var(--dark); }
.who-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.who-tx { min-width: 0; font-size: 14px; line-height: 1.55; color: var(--cream-80); }
.who-tx p { margin: 0 0 8px; }
.who-name {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 17px; color: var(--cream); margin: 0 0 6px;
}
.who-years { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--cream-60); font-weight: 400; }
.who-kind { font-size: 13px; color: var(--cream-60); }
