/* Fotogalerie Roman Hrubý – ver: 2026-10-01 21:04
   Tmavá „temná komora“: neutrální šeď (nezkresluje barvy fotek), jediný akcent = sodíková lampa. */

:root {
  --bg: #181818;        /* neutrální, žádný barevný nádech */
  --raise: #222222;
  --line: #2e2e2e;
  --text: #e9e7e3;
  --muted: #8f8b85;
  --amber: #f2b54a;     /* sodíková výbojka – noční ulice, západy slunce */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;   /* Georgia italic – jako původní web */
  --gut: clamp(12px, 2.2vw, 28px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- hlavička + kategorie ---------- */
.top {
  display: flex; align-items: center;
  padding: 6px calc(var(--gut) - 10px);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.cats {
  display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; min-width: 0; flex: 1;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; scroll-snap-align: start;
  display: flex; align-items: baseline; gap: 4px;
  padding: 7px 10px;
  color: var(--muted); border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.cat:hover { color: var(--text); }
.cat-name { font-size: 14px; white-space: nowrap; }
.cat-n { font-size: 10.5px; color: #5c5955; font-variant-numeric: tabular-nums; }
.cat.is-on { color: var(--text); border-bottom-color: var(--amber); }
.cats.is-busy { opacity: .6; }

/* ---------- jeviště s fotkou ---------- */
.stage { position: relative; overflow: hidden; margin: var(--gut) var(--gut) 0; min-height: 220px; touch-action: pan-y; }
.photo {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%; width: auto; height: auto;  /* nikdy nezvětšuje nad originál */
  box-shadow: 0 18px 50px -20px rgba(0,0,0,.9);
  transition: opacity .22s ease;
  user-select: none; -webkit-user-drag: none;
}
.photo.is-loading { opacity: .25; }
.stage.is-missing .photo { visibility: hidden; }
.stage.is-missing::after {
  content: "Fotka není k dispozici"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 14px;
}
.tn img.is-missing { visibility: hidden; }

.zone {
  position: absolute; top: 0; bottom: 0; width: 32%; z-index: 2;
  display: flex; align-items: center; padding: 0 14px;
  color: #fff; opacity: 0; transition: opacity .2s;
}
.zone-prev { left: 0; justify-content: flex-start; }
.zone-next { right: 0; justify-content: flex-end; }
.zone svg {
  width: 42px; height: 42px; padding: 9px; stroke-width: 2;
  border-radius: 50%; background: rgba(20,20,20,.55); backdrop-filter: blur(6px);
}
.stage:hover .zone { opacity: .55; }
.stage .zone:hover, .zone:focus-visible { opacity: 1; }
@media (hover: none) { .stage:hover .zone { opacity: 0; } }

/* ---------- popisek + ovládání ---------- */
.info {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px 32px;
  padding: 16px var(--gut) 12px; max-width: 900px; width: 100%; margin: 0 auto;
}
.caption { min-width: 0; max-width: 62ch; }
.caption h1 {
  margin: 0 0 3px; font: italic 400 15px/1.35 var(--serif);
}
.meta { margin: 0; display: flex; flex-wrap: wrap; column-gap: 16px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta span:empty { display: none; }
.incats { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.incats a { color: var(--text); border-bottom: 1px solid var(--line); margin-right: 6px; transition: border-color .15s, color .15s; }
.incats a:hover { color: var(--amber); border-color: var(--amber); }

.controls { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pos { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pos b { color: var(--text); font-weight: 600; }
.btns { display: flex; gap: 2px; padding: 3px; background: var(--raise); border-radius: 12px; }
.btn {
  display: grid; place-items: center; width: 40px; height: 36px; border-radius: 9px;
  border: 0; background: none; color: var(--text); cursor: pointer; transition: background-color .15s, color .15s;
}
.btn:hover { background: #2f2f2f; }
.btn:active { color: var(--amber); }
.btn-play .i-pause { display: none; }
body.is-playing .btn-play { color: var(--amber); }
body.is-playing .btn-play .i-play { display: none; }
body.is-playing .btn-play .i-pause { display: grid; }

/* ---------- filmový pás ---------- */
.strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px var(--gut) 12px;
  scrollbar-width: thin; scrollbar-color: #3a3a3a transparent;
}
.tn { flex: none; display: block; border-radius: 4px; overflow: hidden; outline-offset: 2px; }
.tn img { display: block; width: 76px; height: 45px; object-fit: cover; opacity: .5; transition: opacity .15s; background: var(--raise); }
.tn:hover img { opacity: .9; }
.tn.is-on { outline: 2px solid var(--amber); }
.tn.is-on img { opacity: 1; }

/* ---------- patička ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 18px;
  padding: 8px var(--gut) 12px; font-size: 11.5px; color: #5f5c58; border-top: 1px solid var(--line);
}

/* ---------- prezentace / celá obrazovka: jen fotka ---------- */
body.is-full { grid-template-rows: 0 minmax(0, 1fr) auto 0 0; }
body.is-full .top, body.is-full .strip, body.is-full .foot { visibility: hidden; overflow: hidden; padding: 0; border: 0; }
body.is-full .stage { margin: 0; }
body.is-full .photo { box-shadow: none; }
body.is-full .info { padding-top: 10px; }

/* ---------- mobil ---------- */
@media (max-width: 720px) {
  body { display: block; }
  .stage { aspect-ratio: 800 / 531; margin: 10px 0 0; min-height: 0; }
  .zone { width: 40%; }
  .info { flex-direction: column; gap: 12px; }
  .controls { align-self: stretch; align-items: stretch; }
  .pos { order: -1; }
  .btns { justify-content: space-between; }
  .btn { flex: 1; height: 44px; }
  .keys { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
