:root {
  --baize: #243229;
  --baize-deep: #17211a;
  --manila: #c9b27c;
  --manila-deep: #a38d58;
  --paper: #d9d7cc;
  --paper-edge: #bcb9a8;
  --ink: #1d2330;
  --ink-soft: #454a55;
  --red: #a3302a;
  --blue: #35507f;
  --pencil: #4a4f58;

  --f-stencil: "Saira Stencil One", "Impact", sans-serif;
  --f-type: "Courier Prime", "Courier New", monospace;
  --f-hand: "Caveat", cursive;

  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--baize);
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.07), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .22 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  color: var(--ink);
  font-family: var(--f-type);
  font-size: 16px;
  line-height: 1.6;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--blue); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid #f2d36b; outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

[hidden] { display: none !important; }

/* ---------- razítka ---------- */
.stamp {
  display: inline-block;
  font-family: var(--f-stencil);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1;
  padding: .28em .5em .22em;
  border: 2px solid currentColor;
  border-radius: 3px;
  color: var(--red);
  filter: url(#ink);
  mix-blend-mode: multiply;
  transform: rotate(-3deg);
  font-size: 15px;
  white-space: nowrap;
  vertical-align: middle;
}
.stamp--ok { color: var(--ink); }
.stamp--disputed { color: var(--red); }
.stamp--pod { color: var(--blue); }
.stamp--sm { font-size: 12px; }

/* ---------- obálka ---------- */
#cover {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px var(--gutter) 32px;
  gap: 28px;
  perspective: 1600px;
}
#cover.is-gone { display: none; }

.folder {
  position: relative;
  display: block;
  width: min(440px, 88vw);
  aspect-ratio: 4 / 5.2;
  padding: 0;
  border: 0;
  background: none;
  transform: rotate(-2deg);
  transform-style: preserve-3d;
  text-align: left;
}
.folder__back {
  position: absolute; inset: 0;
  background: var(--manila-deep);
  border-radius: 4px 10px 4px 4px;
  box-shadow: 0 30px 50px rgba(0,0,0,.45);
}
.folder__front {
  position: absolute; inset: 0;
  display: block;
  background:
    linear-gradient(100deg, rgba(255,255,255,.12), transparent 30%, rgba(0,0,0,.06)),
    var(--manila);
  border-radius: 4px 10px 4px 4px;
  transform-origin: left center;
  transition: transform .9s cubic-bezier(.6,.05,.2,1), opacity .4s .6s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.folder:hover .folder__front { transform: rotateY(-12deg); }
.folder__tab {
  position: absolute; left: 0; top: -26px;
  background: var(--manila);
  padding: 4px 18px 2px;
  border-radius: 8px 8px 0 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.folder__label {
  position: absolute; left: 7%; right: 7%; top: 9%;
  background: #ece9dd;
  padding: 22px 20px 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 6px 10px -6px rgba(0,0,0,.3);
}
.folder__title {
  display: block;
  font-family: var(--f-stencil);
  font-weight: 400;
  font-size: clamp(38px, 11vw, 58px);
  line-height: .98;
  color: var(--ink);
}
.folder__sub {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.folder__open {
  position: absolute; left: 7%; bottom: 6%;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.folder:hover .folder__open, .folder:focus-visible .folder__open { background: var(--ink); color: var(--manila); }
.folder .stamp--secret {
  position: absolute;
  right: 6%; bottom: 14%;
  font-size: clamp(26px, 8vw, 38px);
  padding: .3em .5em .24em;
  border-width: 4px;
  transform: rotate(-9deg) scale(1);
  opacity: 0;
}
.folder.is-ready .stamp--secret { animation: slam .5s cubic-bezier(.2,.9,.3,1.2) .5s forwards; }
.folder.is-ready { animation: thud .3s .85s; }
@keyframes slam {
  0%   { opacity: 0; transform: rotate(-14deg) scale(2.6); }
  70%  { opacity: 1; transform: rotate(-9deg) scale(.96); }
  100% { opacity: 1; transform: rotate(-9deg) scale(1); }
}
@keyframes thud {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  40% { transform: rotate(-2deg) translateY(5px); }
}
#cover.is-opening .folder__front { transform: rotateY(-115deg); opacity: 0; }
#cover.is-opening .folder__back { opacity: 0; transition: opacity .5s .5s; }
.cover__note {
  max-width: 44ch;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #aeb8ad;
}

/* ---------- spis ---------- */
#dossier { padding: 20px var(--gutter) 48px; animation: fadein .5s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.file {
  max-width: 1120px;
  margin: 0 auto;
}
.file__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 12px;
  color: #aeb8ad;
  font-size: 14px;
}
.file__no { margin: 0; }
.file__close {
  background: none; border: 1px solid #5b6a5d; color: #d6dfd4;
  padding: 6px 12px; border-radius: 3px;
}
.file__close:hover { background: #31423a; }

.file__wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  background: var(--manila);
  border-radius: 6px;
  padding: 14px 0 14px 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.14);
}

.sheets { position: relative; perspective: 2200px; min-width: 0; }
.sheet {
  position: relative;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .3  0 0 0 0 .25  0 0 0 .12 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>"),
    var(--paper);
  border-radius: 2px;
  padding: clamp(20px, 4vw, 48px);
  min-height: 70vh;
  box-shadow: 0 1px 0 var(--paper-edge), 0 8px 18px -8px rgba(0,0,0,.4);
  transform-origin: left center;
}
.sheet.is-in { animation: pagein .5s cubic-bezier(.3,.7,.2,1) both; }
@keyframes pagein {
  from { transform: rotateY(-35deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.tabs {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 24px;
}
.tabs button {
  position: relative;
  text-align: left;
  border: 0;
  background: #b79f69;
  color: var(--ink);
  padding: 12px 12px 12px 16px;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  transition: transform .2s;
}
.tabs button:hover { transform: translateX(4px); }
.tabs button[aria-selected="true"] {
  background: var(--paper);
  margin-left: -14px;
  padding-left: 30px;
  box-shadow: none;
}

/* typografie listu */
.h-sheet {
  font-family: var(--f-stencil);
  font-weight: 400;
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.02;
  margin: 0 0 22px;
  max-width: 18ch;
}
#sheet-spis .h-sheet { max-width: 16ch; }
.h-sub {
  font-family: var(--f-stencil);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  margin: 40px 0 10px;
}
.lede { max-width: 62ch; margin: 0 0 24px; }
.small { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; max-width: 62ch; }
.typed { max-width: 64ch; }
.typed p { margin: 0 0 16px; }
.typed q, .plain q { quotes: "„" "“"; font-style: italic; }
.plain { max-width: 64ch; padding-left: 1.2em; margin: 0 0 8px; }
.plain li { margin-bottom: 6px; }
.srcline { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }

.src {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--ink-soft);
  border-radius: 2px;
  padding: 0 4px;
  color: var(--ink-soft);
  vertical-align: 2px;
  white-space: nowrap;
}

.memo { margin-bottom: 30px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; max-width: 64ch; }
.memo dl { margin: 0; }
.memo dl > div { display: grid; grid-template-columns: 7ch 1fr; gap: 8px; }
.memo dt { font-weight: 700; }
.memo dd { margin: 0; }

.sheet > .stamp--declass {
  position: absolute; right: clamp(16px, 4vw, 48px); top: clamp(16px, 4vw, 40px);
  font-size: 22px;
  text-align: center;
  transform: rotate(7deg);
  border-width: 3px;
  line-height: 1.1;
}

.pencil {
  font-family: var(--f-hand);
  font-size: 28px;
  line-height: 1.05;
  color: var(--pencil);
  max-width: 28ch;
  margin: 8px 0 0 4px;
  transform: rotate(-2deg);
}

.questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 64ch; }
.questions button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 12px 16px;
  display: grid; gap: 2px;
  transition: background .15s;
}
.questions button:hover { background: rgba(29,35,48,.08); }
.questions .q { font-weight: 700; }
.questions .a { font-size: 14px; color: var(--ink-soft); }

.legend { margin-top: 40px; padding-top: 16px; border-top: 1px dashed var(--ink-soft); font-size: 13px; line-height: 1.9; }
.legend p { margin: 0 0 8px; }
.legend .stamp { font-size: 11px; margin-right: 4px; }
.srcs { color: var(--ink-soft); line-height: 1.9; }

/* mapa */
.mapbox { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.map { margin: 0; }
.map svg {
  width: 100%; height: auto; display: block;
  background: #c3c9c2;
  border: 2px solid var(--ink);
}
.map figcaption { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.mapnote { border-left: 4px solid var(--ink); padding-left: 14px; position: sticky; top: 16px; }
.mapnote h2 { font-family: var(--f-stencil); font-size: 24px; margin: 0 0 8px; line-height: 1.1; }
.mapnote p { margin: 0 0 12px; font-size: 15px; }

.m-land { fill: #e4e1d3; stroke: #5d6458; stroke-width: .8; }
.m-grat { fill: none; stroke: #8fa0b0; stroke-width: .5; stroke-dasharray: 2 4; }
.m-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-dasharray: 9 6; }
.m-curtain { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.m-arrow { fill: none; stroke: var(--blue); stroke-width: 5; stroke-linecap: round; }
.m-border { fill: none; stroke: #5d6458; stroke-width: 1.1; stroke-opacity: .75; stroke-linejoin: round; }
.m-zone-east { fill: rgba(163,48,42,.10); }
.m-zone-west { fill: rgba(53,80,127,.10); }
.m-zone { fill: rgba(163,48,42,.18); stroke: var(--red); stroke-width: 2; }
.m-pin { fill: var(--ink); stroke: #e4e1d3; stroke-width: 2; }
.m-hit { fill: transparent; cursor: pointer; }
.m-pinbox:hover .m-pin, .m-pinbox:focus-visible .m-pin, .m-pinbox.is-on .m-pin { fill: var(--red); }
.m-pinbox:focus-visible { outline: none; }
.m-pinbox:focus-visible .m-focus { stroke: #f2d36b; }
.m-focus { fill: none; stroke: transparent; stroke-width: 3; }
.m-name { font-family: var(--f-type); font-size: 15px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #e4e1d3; stroke-width: 4px; pointer-events: none; }
.m-side { font-family: var(--f-stencil); font-size: 22px; fill: var(--ink); opacity: .55; letter-spacing: .08em; }

/* graf */
.chart { max-width: 720px; display: grid; gap: 18px; }
.cmp__name { margin: 0 0 4px; font-weight: 700; }
.cmp__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 4px; }
.cmp__bar { height: 22px; background: var(--blue); transform-origin: left; }
.cmp__bar--ru { background: var(--red); }
.cmp__val { font-size: 14px; min-width: 7ch; text-align: right; }
.cmp__ratio { font-size: 13px; color: var(--ink-soft); margin: 2px 0 0; }
.chart.is-drawn .cmp__bar { animation: grow .8s cubic-bezier(.3,.7,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.chart-key { display: flex; gap: 18px; font-size: 14px; margin-bottom: 6px; }
.chart-key i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: var(--blue); }
.chart-key i.ru { background: var(--red); }

.callout { margin-top: 40px; padding: 18px 20px 20px; border: 2px dashed var(--red); max-width: 64ch; }
.callout .h-sub { margin-top: 0; font-size: 20px; }
.tbl { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.tbl th, .tbl td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--paper-edge); vertical-align: top; }
.tbl th { width: 11em; font-weight: 700; }

/* osoby */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
  position: relative;
  background: #e8e5d8;
  padding: 16px 16px 18px;
  box-shadow: 0 1px 0 var(--paper-edge), 0 10px 16px -10px rgba(0,0,0,.5);
  transition: transform .2s;
}
.card:nth-child(odd) { transform: rotate(-.6deg); }
.card:nth-child(even) { transform: rotate(.5deg); }
.card:hover { transform: rotate(0) translateY(-3px); }
.card::before {
  content: ""; position: absolute; left: 18px; top: -10px; width: 26px; height: 46px;
  border: 3px solid #8b8e94; border-radius: 13px;
  clip-path: inset(0 0 40% 0);
}
.card__photo {
  float: right;
  width: 78px; height: 96px;
  margin: 0 0 8px 12px;
  background: repeating-linear-gradient(45deg, #bdb9a8 0 2px, #cdc9b8 2px 6px);
  display: grid; place-content: center;
  font-family: var(--f-stencil); font-size: 30px; color: var(--ink-soft);
  border: 1px solid var(--paper-edge);
}
.card h2 { font-family: var(--f-stencil); font-size: 22px; line-height: 1.1; margin: 0 0 2px; }
.card__role { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.card p { font-size: 14.5px; line-height: 1.5; margin: 0 0 10px; }
.card__foot { clear: both; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.card__foot .stamp { font-size: 11px; }

/* podezřelí */
.suspects { display: grid; gap: 14px; max-width: 760px; }
.sus { display: grid; grid-template-columns: 1fr; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--paper-edge); }
.sus__name { font-weight: 700; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sus__name span { font-weight: 400; color: var(--ink-soft); font-size: 14px; }
.sus__bar { height: 18px; background: var(--red); transform-origin: left; opacity: .85; }
.sus__bar--none { background: repeating-linear-gradient(90deg, var(--ink-soft) 0 3px, transparent 3px 8px); height: 4px; margin-top: 7px; }
.sus__note { font-size: 14px; margin: 0; }
.suspects.is-drawn .sus__bar { animation: grow .9s cubic-bezier(.3,.7,.2,1) both; }

/* osa */
.timeline { list-style: none; margin: 0; padding: 0 0 0 0; max-width: 70ch; position: relative; }
.timeline::before { content: ""; position: absolute; left: 8.2em; top: 6px; bottom: 6px; border-left: 2px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 7.2em 1fr; gap: 0 34px; padding-bottom: 20px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: calc(8.2em - 5px); top: 8px; width: 10px; height: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.timeline li.is-key::after { background: var(--red); border-color: var(--red); }
.timeline time { font-weight: 700; text-align: right; }
.timeline h3 { margin: 0; font-size: 16px; }
.timeline p { margin: 2px 0 6px; font-size: 14.5px; line-height: 1.5; }
.timeline .stamp { font-size: 11px; }

/* nahrávky */
.deck {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 22px;
  align-items: center;
  background: #2a2f3a;
  color: #e8e5d8;
  padding: 18px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
  box-shadow: inset 0 0 0 2px #151a23;
}
.deck__reels { display: flex; gap: 10px; }
.reel {
  width: 58px; height: 58px; border-radius: 50%;
  background:
    radial-gradient(circle, #2a2f3a 0 8px, transparent 9px),
    conic-gradient(from 0deg, #8a8f99 0 60deg, #2a2f3a 60deg 120deg, #8a8f99 120deg 180deg, #2a2f3a 180deg 240deg, #8a8f99 240deg 300deg, #2a2f3a 300deg 360deg);
  border: 3px solid #8a8f99;
  display: block;
}
.deck.is-playing .reel { animation: spin 2.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.deck__title { margin: 0; font-weight: 700; font-size: 17px; line-height: 1.3; }
.deck__meta { margin: 2px 0 0; font-size: 13px; color: #aab0bb; }
.deck__ctl { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; }
.btn {
  background: #e8e5d8; color: var(--ink); border: 0; padding: 8px 16px; border-radius: 2px; font-weight: 700;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn--ghost { background: transparent; color: #e8e5d8; border: 1px solid #6a707c; padding: 7px 10px; }
.clock { font-size: 13px; white-space: nowrap; }
input[type="range"] { width: 100%; accent-color: #d8a94c; min-width: 0; }

.tapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.tape {
  display: grid; grid-template-columns: 3.2em 1fr auto; gap: 14px; align-items: center;
  width: 100%;
  text-align: left;
  background: #e8e5d8;
  border: 0;
  border-left: 8px solid var(--blue);
  padding: 12px 16px 12px 12px;
  box-shadow: 0 1px 0 var(--paper-edge);
}
.tape:hover { background: #f0eee3; }
.tape[aria-current="true"] { border-left-color: var(--red); background: #f3efde; }
.tape__no { font-family: var(--f-stencil); font-size: 26px; text-align: center; }
.tape__t { font-weight: 700; display: block; line-height: 1.3; }
.tape__s { font-size: 13.5px; color: var(--ink-soft); display: block; line-height: 1.45; margin-top: 2px; }
.tape__d { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

/* ---------- mobil ---------- */
@media (max-width: 860px) {
  .file__wrap { grid-template-columns: 1fr; padding: 0 0 12px; background: transparent; box-shadow: none; }
  .sheets { order: 2; }
  .tabs {
    order: 1; flex-direction: row; overflow-x: auto; padding: 0; gap: 4px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .tabs button { flex: 0 0 auto; border-radius: 8px 8px 0 0; padding: 10px 14px; }
  .tabs button[aria-selected="true"] { margin-left: 0; padding-left: 14px; }
  .mapbox { grid-template-columns: 1fr; }
  .mapnote { position: static; }
  .timeline::before { left: 5.7em; }
  .timeline li { grid-template-columns: 4.7em 1fr; gap: 0 28px; }
  .timeline li::after { left: calc(5.7em - 5px); }
  .deck__ctl { grid-template-columns: auto 1fr auto; }
  .deck__ctl .clock { grid-column: 1 / -1; }
  .sheet > .stamp--declass { position: static; display: inline-block; margin-bottom: 14px; }
  .sheet { min-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .folder .stamp--secret { opacity: 1; transform: rotate(-9deg); }
}

/* spis: dva sloupce */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 56px; }
.col--side .pencil { margin-top: 0; }
.col--side .h-sub { margin-top: 28px; }
@media (min-width: 1000px) {
  .cols { grid-template-columns: minmax(0, 64ch) minmax(0, 1fr); }
  .col--side { padding-top: 120px; }
}

/* ---------- jazyky ---------- */
html[data-lang="en"] [lang="cs"], html[data-lang="cs"] [lang="en"] { display: none !important; }
q { quotes: "\201C" "\201D"; }
:lang(cs) q { quotes: "\201E" "\201C"; }
.typed q, .plain q { font-style: italic; }

.hdrctl { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; gap: 8px; align-items: stretch; justify-content: flex-end; padding: 10px 14px; background: rgba(16,24,18,.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid #2f3d32; }
html { scroll-padding-top: 70px; }
#dossier { padding-top: 58px; }
.langswitch {
  display: flex;
  border: 1px solid #5b6a5d; border-radius: 3px; overflow: hidden;
  background: rgba(23,33,26,.85);
}
.langswitch button { background: none; border: 0; color: #d6dfd4; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.langswitch button[aria-pressed="true"] { background: var(--manila); color: var(--ink); }
.file__bar { padding-right: 0; }

/* razítka navíc */
.stamp--read { color: var(--ink-soft); border-style: dashed; }
.stamp--unv { color: var(--ink-soft); }

/* statická osa (v listech Opona, Ukrajina) */
.timeline--static { margin-bottom: 8px; }
.timeline--static li > div > p { max-width: 58ch; }

/* tvrzení a záznam */
.claims { display: grid; gap: 18px; max-width: 860px; }
.claim { display: grid; grid-template-columns: minmax(0, 1fr); border: 2px solid var(--ink); }
.claim__q { margin: 0; padding: 14px 16px; background: #e8e5d8; border-bottom: 2px solid var(--ink); }
.claim__a { margin: 0; padding: 14px 16px; font-size: 15px; line-height: 1.55; }
@media (min-width: 900px) {
  .claim { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .claim__q { border-bottom: 0; border-right: 2px solid var(--ink); }
}

/* odkazy a body */
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 64ch; }
.links li { border-left: 4px solid var(--ink); padding-left: 14px; }
.links h3 { margin: 0 0 4px; font-size: 16px; }
.links p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; }

/* ---------- operační stůl na úvodní stránce ---------- */
#cover { position: relative; overflow: hidden; }
.folder, .cover__note { position: relative; z-index: 2; }
.ops { position: absolute; inset: 0; z-index: 0; pointer-events: none; color: rgba(217,215,204,.2); overflow: hidden; }
.ops__cv { position: absolute; inset: 0; display: block; }
.claim__q b { display: block; margin-bottom: 4px; }

/* ================= vizuální vrstva ================= */

/* hudba */
.music { display: flex; align-items: center; gap: 8px; background: rgba(23,33,26,.85); color: #d6dfd4; border: 1px solid #5b6a5d; border-radius: 3px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.music[aria-pressed="true"] { background: var(--manila); color: var(--ink); border-color: var(--manila); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; height: 4px; background: currentColor; display: block; }
.music.is-on .eq i { animation: eq 1s ease-in-out infinite; }
.music.is-on .eq i:nth-child(2) { animation-delay: -.35s; }
.music.is-on .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
@media (max-width: 520px) { .music__t { display: none; } .file__bar { padding-right: 0; } }

/* úvod: lampa a vyčnívající portréty */
#cover::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(circle 360px at var(--mx, 50%) var(--my, 42%), rgba(0,0,0,0) 0, rgba(6,10,7,.5) 100%);
}
.peeks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 1; pointer-events: none; }
.peek {
  position: absolute; width: clamp(96px, 16vw, 170px); height: auto;
  left: calc(clamp(96px, 16vw, 170px) / -2); top: calc(clamp(96px, 16vw, 170px) * -.62);
  border: 6px solid #e9e6d8; border-bottom-width: 22px; background: #e9e6d8;
  box-shadow: 0 14px 24px rgba(0,0,0,.45);
  opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.8);
  --spread: min(300px, 34vw);
}
.peek--l1 { --tx: calc(var(--spread) * -1); --ty: -12vh; --r: -11deg; }
.peek--l2 { --tx: calc(var(--spread) * -.78); --ty: 14vh; --r: -4deg; }
.peek--r1 { --tx: var(--spread); --ty: -9vh; --r: 9deg; }
.peek--r2 { --tx: calc(var(--spread) * .82); --ty: 16vh; --r: 5deg; }
#cover.is-ready .peek { animation: deal .8s cubic-bezier(.2,.9,.3,1.1) 1.5s forwards; }
#cover.is-ready .peek--l2 { animation-delay: 1.65s; }
#cover.is-ready .peek--r1 { animation-delay: 1.8s; }
#cover.is-ready .peek--r2 { animation-delay: 1.95s; }
@keyframes deal { from { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.8); } to { opacity: 1; transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(1); } }


/* bannery listů */
.banner { margin: 0 0 30px; position: relative; overflow: hidden; border: 2px solid var(--ink); background: #bcc6c4; }
.banner img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; }
.banner.is-shown { animation: wipe 1s cubic-bezier(.6, 0, .2, 1) both; }
.banner.is-shown img { animation: kenburns 18s ease-out both; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes kenburns { from { transform: scale(1.12) translateX(2%); } to { transform: scale(1) translateX(0); } }
.banner figcaption { position: absolute; left: 0; bottom: 0; background: rgba(217,215,204,.92); font-size: 12px; padding: 3px 10px; color: var(--ink-soft); }
.sheet > .stamp--declass { z-index: 3; }
#sheet-spis > .stamp--declass { top: clamp(190px, 25vw, 330px); }

/* osobní karty s portréty */
.card { padding: 0 0 16px; }
.card::before { z-index: 2; }
.card > :not(.card__photo) { margin-left: 16px; margin-right: 16px; }
.card__photo { float: none; width: 100%; height: auto; margin: 0 0 12px; display: block; background: #bcc6c4; position: relative; overflow: hidden; border: 0; }
.card__photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: top; transition: transform .5s; }
.card:hover .card__photo img { transform: scale(1.04); }
.card h2 { padding-top: 2px; }
.card__foot { margin-bottom: 0; }
.sheet.is-in .card { animation: deal-card .65s cubic-bezier(.2,.8,.3,1.05) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes deal-card { from { opacity: 0; transform: translateY(26px) rotate(-3deg); } }
.sheet.is-in .card .card__photo { animation: wipe-up .8s cubic-bezier(.6, 0, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms + .15s); }
@keyframes wipe-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* nástěnka */
.board { position: relative; margin: 8px 0 18px; padding: 26px 18px 22px; background: #2a3a30; border: 10px solid #6b5535; box-shadow: inset 0 0 40px rgba(0,0,0,.5); display: grid; gap: 28px; justify-items: center; color: #e9e6d8; }
.board__strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.board__strings path { fill: none; stroke: #b23a30; stroke-width: 2.2; opacity: .85; transition: stroke-width .2s, opacity .2s; }
.board__strings path.is-on { stroke-width: 4; opacity: 1; }
.board__strings .knot { fill: #b23a30; }
.board__doc { position: relative; z-index: 1; background: #e9e6d8; color: var(--ink); padding: 12px 22px 14px; text-align: center; box-shadow: 0 6px 12px rgba(0,0,0,.45); transform: rotate(-1.2deg); }
.board__doc b { display: block; font-family: var(--f-stencil); font-size: 22px; }
.board__doc span { font-size: 13px; line-height: 1.35; display: block; }
.board__pins { display: flex; flex-wrap: wrap; gap: 20px 18px; justify-content: center; position: relative; z-index: 1; }
.pin { position: relative; width: clamp(110px, 17vw, 150px); padding: 7px 7px 6px; background: #e9e6d8; border: 0; box-shadow: 0 8px 14px rgba(0,0,0,.5); transform: rotate(var(--r)); transition: transform .2s; color: var(--ink); text-align: center; }
.pin:hover, .pin.is-on { transform: rotate(0) translateY(-4px) scale(1.04); }
.pin.is-on { outline: 3px solid #f2d36b; }
.pin img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.pin__tack { position: absolute; left: 50%; top: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8594c, #8e2a22); box-shadow: 0 2px 3px rgba(0,0,0,.5); z-index: 3; }
.pin__name { display: block; font-family: var(--f-hand); font-size: 22px; line-height: 1; padding-top: 4px; }
.pin__named { display: block; font-size: 11px; line-height: 1.2; color: var(--red); font-weight: 700; padding-top: 2px; }
.board__note { position: relative; z-index: 1; width: min(560px, 100%); background: rgba(233,230,216,.96); color: var(--ink); padding: 12px 16px; }
.board__note h3 { font-family: var(--f-stencil); margin: 0 0 4px; font-size: 20px; }
.board__note p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; }

/* opona */
.stage { position: relative; overflow: hidden; border: 2px solid var(--ink); background: #1b1712; }
.stage__img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; }
.ironcurtain {
  position: absolute; inset: 0; transform: translateY(-101%);
  background:
    radial-gradient(circle at 10px 10px, #8d949a 0 2px, transparent 3px) 0 0 / 40px 60px,
    repeating-linear-gradient(90deg, #4d535a 0 22px, #3a3f45 22px 26px, #565c63 26px 30px);
  border-bottom: 14px solid #23272c;
  box-shadow: inset 0 -30px 40px rgba(0,0,0,.4);
  transition: transform 1.1s cubic-bezier(.55, 0, .95, .45);
  display: grid; place-content: center;
}
.ironcurtain__txt { font-family: var(--f-stencil); font-size: clamp(24px, 6vw, 64px); color: #cfd2d0; letter-spacing: .06em; text-shadow: 0 3px 0 rgba(0,0,0,.45); opacity: 0; transition: opacity .6s 1s; }
.stage.is-down .ironcurtain { transform: translateY(0); }
.stage.is-down .ironcurtain__txt { opacity: 1; }
.stage.is-thud { animation: thud-s .45s; }
@keyframes thud-s { 20% { transform: translateY(6px); } 45% { transform: translateY(-3px); } 70% { transform: translateY(2px); } }
.stage__btn { position: absolute; right: 12px; bottom: 14px; z-index: 3; background: var(--manila); color: var(--ink); border: 2px solid var(--ink); padding: 8px 16px; font-weight: 700; }
.stage__btn .on-down { display: none; }
.stage.is-down .stage__btn .on-up { display: none; }
.stage.is-down .stage__btn .on-down { display: inline; }
.stage + .small { margin-top: 8px; }

/* časová osa: odhalování při scrollu */
.timeline li { opacity: 0; transform: translateX(-14px); transition: opacity .6s, transform .6s; }
.timeline li.seen { opacity: 1; transform: none; }
.timeline li.seen::after { animation: dot-pop .6s .15s both; }
.timeline li.is-key.seen::after { animation: dot-pop .6s .15s both, ring 2.4s 1s ease-out 2; }
@keyframes dot-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(163,48,42,.55); } 100% { box-shadow: 0 0 0 16px rgba(163,48,42,0); } }

/* mapa: živější čáry */
.m-line { animation: march 1.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -30; } }
.m-curtain { animation: march-s 3s linear infinite; }
@keyframes march-s { to { stroke-dashoffset: -16; } }
.m-zone { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.18); fill: rgba(163,48,42,.3); } }

/* přehrávač: vyhodnocovač úrovně a bonus */
.deck__reels { align-items: center; }
.vu { display: inline-flex; align-items: flex-end; gap: 3px; height: 42px; margin-left: 8px; }
.vu i { width: 6px; height: 6px; background: #d8a94c; display: block; }
.deck.is-playing .vu i { animation: vu .7s ease-in-out infinite; }
.deck.is-playing .vu i:nth-child(2) { animation-delay: -.5s; animation-duration: .9s; }
.deck.is-playing .vu i:nth-child(3) { animation-delay: -.2s; animation-duration: .6s; }
.deck.is-playing .vu i:nth-child(4) { animation-delay: -.65s; animation-duration: 1s; }
.deck.is-playing .vu i:nth-child(5) { animation-delay: -.35s; animation-duration: .8s; }
.deck.is-playing .vu i:nth-child(6) { animation-delay: -.1s; animation-duration: .55s; }
@keyframes vu { 0%, 100% { height: 6px; } 50% { height: 40px; } }
.tape__o { display: block; font-size: 12px; color: var(--ink-soft); font-style: italic; }
.tape--bonus { border-left-color: var(--red); }
.tape--bonus .tape__no { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .peek { opacity: 1; transform: translate(var(--tx), var(--ty)) rotate(var(--r)); }
  .timeline li { opacity: 1; transform: none; }
  .music.is-on .eq i { animation: none; height: 10px; }
}

#sheet-spis .col--side .stamp--declass { position: static; display: inline-block; margin: 6px 0 18px; font-size: 24px; transform: rotate(6deg); }
@media (min-width: 1000px) { .col--side { padding-top: 6px; } }

/* video smyčky v bannerech */
.vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; pointer-events: none; }
.vid.is-live { opacity: 1; }
.banner.is-shown img { animation: none; }
@media (prefers-reduced-motion: reduce) { .vid { display: none; } }

.synth { margin: 14px 0 22px; padding: 12px 14px; border: 2px dashed var(--red); background: rgba(163,48,42,.06); }
.synth__warn { margin: 0 0 10px; font-size: 14px; }
.synth__audio { width: 100%; display: block; }

/* ================= rozhlas ================= */
.radio { position: absolute; left: 28px; bottom: 26px; z-index: 3; width: 292px; display: flex; flex-direction: column; gap: 10px; }
.radio__panel { background: rgba(14,20,15,.88); border: 1px solid #4b5a4d; padding: 10px 12px; color: #d6dfd4; font-size: 12.5px; line-height: 1.45; }
.radio__panel[hidden] { display: none; }
.radio__meta { margin: 0 0 6px; font-size: 11.5px; color: #c9a566; letter-spacing: .02em; }
.radio__meta b { font-weight: 700; margin-right: 6px; }
.radio__sub { margin: 0 0 8px; min-height: 5.8em; }
.radio__warn { margin: 0 0 8px; font-size: 10.5px; color: #8e9a8f; line-height: 1.35; }
.radio__bar { height: 3px; background: #2d3a30; }
.radio__bar i { display: block; height: 100%; width: 0; background: #c9a566; }
.radio__btn { all: unset; cursor: pointer; display: block; width: 190px; position: relative; }
.radio__btn svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); transition: transform .3s; }
.radio__btn:hover svg { transform: translateY(-2px) rotate(-.6deg); }
.radio__btn:focus-visible { outline: 2px solid #c9a566; outline-offset: 4px; }
.radio__glow { opacity: 0; transition: opacity 1.2s; }
.radio__needle { transform: translateX(158px); transition: transform .08s linear; }
.radio.is-on .radio__glow { opacity: 1; animation: rflick 5s ease-in-out infinite; }
.radio.is-on .radio__eye { opacity: .85; }
.radio__cone { transform-origin: 76px 89px; }
.radio__eye { transition: opacity .6s; transform-origin: 190px 108px; }
.radio__cap { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; color: #c9a566; letter-spacing: .02em; }
.radio__on { display: none; }
.radio.is-on .radio__on { display: inline; }
.radio.is-on .radio__off { display: none; }
@keyframes rflick { 0%, 100% { opacity: 1; } 47% { opacity: .86; } 52% { opacity: 1; } 80% { opacity: .92; } }
@media (max-width: 1180px) {
  .radio { position: relative; left: auto; bottom: auto; margin: 22px auto 0; align-items: center; width: min(92vw, 330px); }
  .radio__panel { width: 100%; }
  .radio__cap { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .radio.is-on .radio__glow { animation: none; } .radio__btn:hover svg { transform: none; } }

/* ================= obchod (fiktivní) ================= */
.shop__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; margin: 18px 0 14px; }
.shop__grid[hidden], .shop__detail[hidden], #shopIntro[hidden] { display: none; }
.shop__card { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-sizing: border-box; }
.shop__thumb { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #cfcabb; border: 1px solid #b9b3a1; box-shadow: 0 6px 16px rgba(0,0,0,.16); transition: transform .25s, box-shadow .25s; }
.shop__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop__card:hover .shop__thumb { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 10px 22px rgba(0,0,0,.24); }
.shop__card:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.shop__tag { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; display: block; }
.shop__name { font-weight: 700; line-height: 1.25; display: block; }
.shop__price { font-family: var(--f-stencil); font-size: 20px; color: var(--red); display: inline-block; }
.shop__back { all: unset; cursor: pointer; font-weight: 700; margin: 6px 0 14px; display: inline-block; border-bottom: 2px solid var(--ink); }
.shop__back:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.shop__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.shop__main { width: 100%; height: auto; display: block; border: 1px solid #b9b3a1; box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.shop__thumbs { display: flex; gap: 10px; margin-top: 10px; }
.shop__t { all: unset; cursor: pointer; width: 70px; border: 2px solid transparent; opacity: .7; }
.shop__t img { width: 100%; display: block; }
.shop__t.is-on { border-color: var(--red); opacity: 1; }
.shop__h { font-family: var(--f-stencil); font-size: 30px; line-height: 1.08; margin: 4px 0 8px; }
.shop__lede { font-size: 16px; font-weight: 700; }
.shop__specs { padding-left: 18px; margin: 12px 0 18px; }
.shop__buy { border-top: 2px dashed var(--ink-soft); padding-top: 14px; }
.shop__buy .shop__price { font-size: 30px; }
.shop__sizes { display: flex; gap: 8px; margin: 12px 0; }
.shop__size { border: 1.5px solid var(--ink); padding: 3px 10px; font-weight: 700; font-size: 13px; }
.shop__btn { display: block; margin-top: 12px; padding: 11px 28px; font: inherit; font-weight: 700; font-size: 16px; background: var(--red); color: #f4efe2; border: 2px solid #7d201b; cursor: pointer; box-shadow: 0 3px 0 #7d201b; transition: transform .1s, box-shadow .1s; }
.shop__btn:hover { background: #b8382f; }
.shop__btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #7d201b; }
.shop__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.shop__fict { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 0; }
@media (max-width: 760px) { .shop__wrap { grid-template-columns: 1fr; } }

.music--fx { padding: 6px 10px; }
.music--fx[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }

.music--shop { background: var(--red); color: #f4efe2; border-color: #7d201b; letter-spacing: .03em; }
.music--shop:hover { background: #b8382f; }

.langnote { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 3px 9px; border: 2px solid var(--red); color: var(--red); font: 700 12px/1 var(--f-type); letter-spacing: .06em; text-transform: uppercase; transform: rotate(-2deg); }

.stage__msg { position: absolute; left: 0; right: 0; top: 0; padding: 18px 6% 40px; text-align: center; color: #f1ece0; background: linear-gradient(to bottom, rgba(10,12,10,.92), rgba(10,12,10,.6) 60%, rgba(10,12,10,0)); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .9s, transform .9s; z-index: 2; }
.stage__msg p { margin: 0; font-family: var(--f-stencil); font-size: clamp(16px, 2.3vw, 26px); line-height: 1.25; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.stage__msg small { display: block; margin-top: 8px; font: 700 13px/1 var(--f-type); letter-spacing: .24em; color: #d9a95f; }
.stage.is-raised .stage__msg { opacity: 1; transform: none; transition-delay: 1.1s; }
@media (prefers-reduced-motion: reduce) { .stage__msg { transition: none; } .stage.is-raised .stage__msg { transition-delay: 0s; } }

.sitefoot { text-align: center; padding: 22px 16px 34px; color: #8e9a8f; font-size: 12px; line-height: 1.5; }
.sitefoot p { margin: 0 auto 4px; max-width: 70ch; }
.sitefoot p:first-child { color: #b3bdb4; font-weight: 700; }

#dossier[hidden] + .sitefoot { display: none; }

/* vypínač animací */
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.no-anim .peek { opacity: 1; transform: translate(var(--tx), var(--ty)) rotate(var(--r)); }
.no-anim .timeline li { opacity: 1; transform: none; }
.no-anim .vid { display: none; }
.no-anim .music.is-on .eq i { height: 10px; }

/* atomový test (stage--atom): mrak kreslí canvas v app.js */
.stage--atom { background: #cfd2c4; }
.nuke { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nuke i { position: absolute; display: block; opacity: 0; }
.nuke__cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.nuke__flash { inset: 0; background: radial-gradient(circle at 51% 50%, #fffdf2 0, #fff6d8 35%, #f8e7b4 100%); }
.nuke__sky { inset: 0; background: radial-gradient(ellipse 70% 55% at 51% 50%, rgba(255,170,70,.55), rgba(255,120,50,.25) 45%, transparent 75%); mix-blend-mode: multiply; }
.nuke__ring { left: 51%; top: 50.2%; width: 14%; height: 2.2%; margin: -1.1% 0 0 -7%; border-radius: 50%; border: 3px solid rgba(255,244,214,.9); box-shadow: 0 0 18px rgba(255,214,140,.7); }
.nuke__count { position: absolute; left: 51%; top: 24%; transform: translateX(-50%); font-family: var(--f-stencil); font-size: clamp(36px, 9vw, 110px); color: #f4efe2; text-shadow: 0 3px 0 rgba(0,0,0,.55); }
.stage--atom.is-go .nuke__flash { animation: nk-flash 4.2s ease-out forwards; }
.stage--atom.is-go .nuke__sky { animation: nk-sky 16s ease-out forwards; }
.stage--atom.is-go .nuke__ring { animation: nk-ring 3.4s ease-out .1s forwards; }
.stage--atom.is-quake .stage__img, .stage--atom.is-quake .nuke { animation: nk-quake 1.6s linear; }
@keyframes nk-flash { 0% { opacity: 0; } 3% { opacity: 1; } 22% { opacity: .95; } 100% { opacity: 0; } }
@keyframes nk-sky { 0% { opacity: 0; } 8% { opacity: 1; } 100% { opacity: .35; } }
@keyframes nk-ring { 0% { opacity: .95; transform: scale(.1); } 100% { opacity: 0; transform: scale(7); } }
@keyframes nk-quake { 0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-6px, 3px); } 25% { transform: translate(5px, -4px); } 40% { transform: translate(-4px, 2px); } 60% { transform: translate(3px, -2px); } 80% { transform: translate(-2px, 1px); } }
.stage--atom.is-after .nuke__sky { opacity: .35; }
.stage--atom.is-down .stage__btn .on-up { display: none; }
.stage--atom.is-down .stage__btn .on-down { display: inline; }
.stage--atom .stage__btn:disabled { opacity: .55; cursor: default; }
.stage--atom.is-raised .stage__msg { opacity: 1; transform: none; transition-delay: .2s; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* scény s tlačítkem na mobilu: obrázek čtvercový, text a tlačítko pod ním */
.stage__pic { position: relative; overflow: hidden; }
@media (max-width: 640px) {
  .stage__img { aspect-ratio: 1 / 1; }
  .stage__msg { position: static; max-height: 0; padding: 0 14px; overflow: hidden; background: #14181a; transform: none; transition: opacity .9s, max-height .6s; }
  .stage.is-raised .stage__msg, .stage--atom.is-raised .stage__msg { max-height: 420px; padding: 14px 14px 10px; }
  .stage__btn { position: static; display: block; width: 100%; margin: 0; border-width: 2px 0 0; padding: 14px 16px; font-size: 16px; }
}

/* obálka na telefonu: nižší složka, razítko nad odkazem, výška podle viditelné plochy (iOS Safari) */
#cover { min-height: 100svh; }
@media (max-width: 700px) {
  #cover { padding-top: 84px; gap: 20px; }
  .folder { width: min(86vw, 400px); aspect-ratio: 4 / 4.4; }
  .folder__label { padding: 18px 16px 16px; }
  .folder .stamp--secret { right: 5%; bottom: 24%; font-size: clamp(22px, 6.6vw, 30px); }
  .folder__open { left: 7%; bottom: 7%; }
  .cover__note { margin: 0; font-size: 12px; line-height: 1.45; }
}

/* fotky na obálce na telefonu: řada karet pod složkou (nic se neořezává ani nepřekrývá text) */
@media (max-width: 700px) {
  #cover { padding-top: 96px; padding-bottom: 40px; }
  .folder { order: 1; }
  .peeks { order: 2; position: relative; left: auto; top: auto; width: auto; height: auto; display: flex; justify-content: center; padding: 6px 0 0; }
  .peek { position: relative; left: auto; top: auto; width: 74px; margin: 0 -7px; border-width: 4px; border-bottom-width: 14px; --tx: 0px; --ty: 0px; }
  .peek--l2 { --r: -8deg; } .peek--l1 { --r: -3deg; } .peek--r1 { --r: 3deg; } .peek--r2 { --r: 8deg; }
  .cover__note { order: 3; }
  .radio { order: 4; }
}
/* při vypnutých nebo omezených animacích musí být prvky, které se jinak objeví animací, rovnou vidět */
.no-anim .stamp--secret, .no-anim .folder__front { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .stamp--secret { opacity: 1; } }


/* ============ mobile-first zpevnění (dotyk, bezpečné okraje, čitelnost, výkon) ============ */
html { -webkit-tap-highlight-color: rgba(201,178,124,.25); }
body { overflow-wrap: break-word; }
button, a, [role="tab"], .tape, .pin { touch-action: manipulation; }

/* bezpečné okraje (výřez, zaoblené rohy, landscape) */
.hdrctl { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
#cover { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.sitefoot { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
#dossier { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

/* čitelnost: nejmenší písmo 12 px */
cite.src, .stamp--sm, .map figcaption, .banner figcaption, .tape__o { font-size: max(12px, 1em); }
cite.src, .stamp--sm { font-size: 12px; }

/* cíle dotyku: odkazy ve zdrojích a posuvník přehrávače */
.srcs a { display: inline-block; padding: 7px 2px; }
.srcs { line-height: 1.5; }
#seek { height: 32px; }
.music, .langswitch button { min-height: 40px; }
.tabs button { min-height: 44px; }

/* tabulátory listů: přichytávání a náznak, že je jich víc */
@media (max-width: 860px) {
  .tabs { scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .tabs button { scroll-snap-align: start; }
}

/* hover jen tam, kde existuje myš (na dotyku se efekt nezasekne po klepnutí) */
@media (hover: none) {
  .folder:hover .folder__front { transform: none; }
  .tabs button:hover { transform: none; }
  .card:hover .card__photo img { transform: none; }
  .shop__card:hover .shop__thumb { transform: none; box-shadow: none; }
  .pin:hover { transform: rotate(var(--r, 0deg)); }
}

/* přehrávač epizod na telefonu: kotouče nahoře, text pod nimi, ovládání přes celou šířku */
@media (max-width: 640px) {
  .deck { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 12px; }
  .deck__reels { justify-content: center; }
  .reel { width: 46px; height: 46px; }
  .deck__info { min-width: 0; text-align: center; }
  .deck__ctl { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tape { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 640px) {
  .deck__ctl .clock { order: 5; grid-column: 1 / -1; text-align: center; }
  .tape { grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px 10px; align-items: start; }
  .tape__no { font-size: 22px; grid-row: 1 / span 2; }
  .tape__d { grid-column: 2; justify-self: start; }
}

/* bannery listů na telefonu: vyšší obrázek, popisek pod ním (ne přes něj) */
@media (max-width: 640px) {
  .banner > img:not(.stage__img) { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
  .banner .vid { inset: 0 0 auto 0; height: auto; aspect-ratio: 16 / 10; }
  .banner figcaption { position: static; background: #d9d7cc; font-size: 12px; padding: 6px 10px; }
}

/* časová osa na telefonu: datum nad textem, svislá linka vlevo (žádné lámání dat uprostřed slova) */
@media (max-width: 640px) {
  .timeline::before { left: 5px; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 26px; }
  .timeline li::after { left: 0; }
  .timeline time { text-align: left; font-size: 14px; color: var(--ink-soft); }
  .timeline .stamp { font-size: 12px; }
}

/* tabulky zdrojů na úzkém telefonu: popisek nad hodnotou */
@media (max-width: 480px) {
  .sheet table, .sheet table tbody, .sheet table tr, .sheet table th, .sheet table td { display: block; width: auto; }
  .sheet table tr { padding: 8px 0; border-bottom: 1px solid var(--paper-edge); }
  .sheet table th { text-align: left; font-size: 13px; color: var(--ink-soft); padding: 0; }
  .sheet table td { padding: 2px 0 0; }
}
