/* ==========================================================================
   Obrazárna — kamenný kouzelnický hrad
   Textury: assets/tex (generuje private/cli/textury.php)
   ========================================================================== */

:root {
  --col: 1200px;
  --gutter: 16px;
  --radius: 4px;

  /* kámen, zlato, bordó, pergamen */
  --wall-veil: rgba(8, 6, 4, .55);
  --hall-bg: #26211c;
  --hall-edge: #0d0b09;
  --ink: #e8dcc0;             /* text na kameni */
  --ink-dim: #b3a585;
  --ink-faint: #8a7e66;
  --gold: #d4af37;
  --gold-hi: #f6e27a;
  --gold-lo: #8a6a1c;
  --gold-text: #e6c55a;
  --bordo: #7a1f2b;
  --bordo-hi: #a32c3c;
  --parch-ink: #2b1d10;
  --parch-dim: #6b5236;
  --link: #f0cf6a;
  --focus: #ffd966;
  --ok: #6e9f55;
  --err: #c0503f;
  --shadow: 0 6px 18px rgba(0, 0, 0, .55);
  --torch: rgba(255, 170, 70, .14);

  --f-head: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-body: 'EB Garamond', Garamond, Georgia, 'Times New Roman', serif;

  color-scheme: dark;
}

/* Denní světlo — světlejší kámen pro ty, kdo mají v systému světlý režim */
@media (prefers-color-scheme: light) {
  :root {
    --wall-veil: rgba(240, 230, 210, .18);
    --hall-bg: #4a4239;
    --torch: rgba(255, 220, 150, .10);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: #1c1813;
  background-image:
    radial-gradient(ellipse at 50% 0%, var(--torch), transparent 60%),
    linear-gradient(var(--wall-veil), var(--wall-veil)),
    url(../tex/wall.webp);
  background-size: auto, auto, 320px auto;
  background-attachment: fixed, fixed, scroll;
}

/* Na širokých obrazovkách: noční nebe a cimbuří vnější zdi přes celou šířku,
   po stranách síně opěrné pilíře zakončené fiálami. --head-h nastavuje obrazarna.js. */
@media (min-width: 1380px) {
  body {
    --sky-h: calc(var(--head-h, 98px) - 24px);
    background-image:
      linear-gradient(90deg, rgba(255, 243, 214, .25) 0 26px, transparent 0),
      linear-gradient(90deg, transparent 0 26px, #1d2840 0),
      radial-gradient(1px 1px at 37px 21px, rgba(255, 250, 230, .7), transparent),
      radial-gradient(1px 1px at 151px 47px, rgba(255, 250, 230, .5), transparent),
      radial-gradient(1.5px 1.5px at 260px 12px, rgba(255, 250, 230, .65), transparent),
      linear-gradient(180deg, #070b16, #121c31 70%, #1d2840),
      radial-gradient(ellipse at 50% 0%, var(--torch), transparent 60%),
      linear-gradient(var(--wall-veil), var(--wall-veil)),
      url(../tex/wall.webp);
    background-size: 42px 2px, 42px 18px, 300px var(--sky-h), 300px var(--sky-h), 300px var(--sky-h), 100% var(--sky-h), auto, auto, 320px auto;
    background-position: 50% var(--sky-h), 50% var(--sky-h), 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    background-repeat: repeat-x, repeat-x, repeat-x, repeat-x, repeat-x, no-repeat, no-repeat, repeat, repeat;
    background-attachment: scroll, scroll, scroll, scroll, scroll, scroll, fixed, fixed, scroll;
  }
  .hall::before, .hall::after {   /* fiála, pod ní odstupňovaný pilíř s římsami, dál dřík do konce stránky */
    content: '';
    position: absolute;
    top: 6px; bottom: 0;
    width: 72px;
    pointer-events: none;
    background:
      url(../img/fiala.svg) 50% 0 / 64px 240px no-repeat,
      url(../img/pilir.svg) 50% 240px / 72px 760px no-repeat,
      repeating-linear-gradient(transparent 0 308px, rgba(255, 243, 214, .35) 308px 309px, #8f846f 309px 313px, #6b6151 313px 317px, rgba(0, 0, 0, .35) 317px 320px) 50% 1000px / 60px calc(100% - 1000px) no-repeat,
      repeating-linear-gradient(transparent 0 46px, rgba(30, 25, 18, .55) 46px 48px) 50% 1000px / 52px calc(100% - 1000px) no-repeat,
      linear-gradient(90deg, rgba(255, 243, 214, .25) 0 1px, transparent 1px calc(100% - 2px), rgba(0, 0, 0, .4) 0) 50% 1000px / 52px calc(100% - 1000px) no-repeat,
      linear-gradient(90deg, #a99d88, #877c69 45%, #4f473b) 50% 1000px / 52px calc(100% - 1000px) no-repeat;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6));
  }
  .hall::before { left: -82px; }
  .hall::after { right: -82px; }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--gold-text);
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(212, 175, 55, .18);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3.4vw, 1.6rem); }
h3 { font-size: 1.15rem; }

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

/* ---------- Středový sloupec — síň ---------- */
.hall {
  position: relative;
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), transparent 28px, transparent calc(100% - 28px), rgba(0,0,0,.55)),
    url(../tex/hall.webp) var(--hall-bg);
  background-size: auto, 300px auto;
  box-shadow: 0 0 0 1px var(--hall-edge), 0 0 60px rgba(0, 0, 0, .8);
}

main { flex: 1; padding: 20px var(--gutter) 40px; }

@media (min-width: 720px) {
  main { padding: 28px 36px 56px; }
}

/* ---------- Hlavička — noční nebe nad cimbuřím ---------- */
.site-head {
  --merlon-h: 14px;            /* výška zubu cimbuří */
  --parapet-h: 5px;            /* souvislá zeď pod zuby */
  --merlon-w: 18px;
  --merlon-gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  padding-bottom: calc(var(--merlon-h) + var(--parapet-h));
  background:
    radial-gradient(1px 1px at 23px 17px, rgba(255, 250, 230, .8), transparent),
    radial-gradient(1px 1px at 131px 41px, rgba(255, 250, 230, .55), transparent),
    radial-gradient(1.5px 1.5px at 197px 9px, rgba(255, 250, 230, .7), transparent),
    radial-gradient(1px 1px at 271px 52px, rgba(255, 250, 230, .45), transparent),
    radial-gradient(1px 1px at 79px 63px, rgba(255, 250, 230, .4), transparent),
    linear-gradient(180deg, #070b16, #121c31 70%, #1d2840);
  background-size: 310px 80px, 310px 80px, 310px 80px, 310px 80px, 310px 80px, auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .7);
}
.site-head::after {            /* cimbuří: zuby a souvislá zeď pod nimi */
  --period: calc(var(--merlon-w) + var(--merlon-gap));
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--merlon-h) + var(--parapet-h));
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 243, 214, .3) 0 2px, transparent 2px),
    linear-gradient(transparent var(--merlon-h), rgba(255, 243, 214, .2) var(--merlon-h) calc(var(--merlon-h) + 1px), transparent 0),
    linear-gradient(90deg, rgba(255, 243, 214, .12) 0 2px, transparent 2px calc(var(--merlon-w) - 4px), rgba(0, 0, 0, .4) 0 var(--merlon-w), transparent 0) 50% 0 / var(--period) 100% repeat-x,
    linear-gradient(180deg, #8a7f6c, #5e5546);
  -webkit-mask:
    linear-gradient(#000 0 0) 0 100% / 100% var(--parapet-h) no-repeat,
    linear-gradient(90deg, #000 0 var(--merlon-w), transparent 0) 50% 0 / var(--period) 100% repeat-x;
  mask:
    linear-gradient(#000 0 0) 0 100% / 100% var(--parapet-h) no-repeat,
    linear-gradient(90deg, #000 0 var(--merlon-w), transparent 0) 50% 0 / var(--period) 100% repeat-x;
}
@media (min-width: 900px) {
  .site-head { --merlon-h: 18px; --parapet-h: 6px; --merlon-w: 26px; --merlon-gap: 16px; }
}
.site-head__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px var(--gutter);
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold-text);
  min-width: 0;
}
.brand svg { flex: none; width: 50px; height: 56px; filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 6px rgba(212, 175, 55, .35)); }
.brand:hover svg { filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 9px rgba(246, 226, 122, .55)); }
.brand__name {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: .08em;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}
.brand__sub {
  display: none;
  font-size: .85rem;
  font-style: italic;
  color: var(--ink-dim);
  white-space: nowrap;
}
@media (min-width: 560px) {
  .brand__text { display: flex; flex-direction: column; line-height: 1.1; }
  .brand__sub { display: block; }
}

/* odkaz zpět na hrad hogwarts.cz — na úzkém displeji jen ikona */
.castle-link { margin-left: auto; flex: none; }
.castle-link .ico { width: 20px; height: 20px; }
@media (max-width: 559px) {
  .castle-link { width: 44px; height: 40px; padding: 0; }
  .castle-link__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.nav-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--gold-lo);
  color: var(--gold-text);
  border-radius: var(--radius);
  width: 44px; height: 40px;
  display: grid; place-items: center;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.castle-link + .nav-toggle { margin-left: 0; }

.site-nav {
  display: none;
  flex-direction: column;
  padding: 4px var(--gutter) 12px;
  border-top: 1px solid rgba(212, 175, 55, .25);
}
.site-nav.is-open { display: flex; }
.site-nav a, .site-nav button.linklike {
  font-family: var(--f-head);
  font-size: .95rem;
  letter-spacing: .05em;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold-hi); }
.site-nav .nav-user { display: flex; align-items: center; gap: 8px; padding: 10px 4px; flex-wrap: wrap; }
.site-nav form { margin: 0; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-head__bar { padding: 8px 24px 2px; }
  .site-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    padding: 0 0 12px;   /* odstup vyhledávání a tlačítek od zubů cimbuří */
    border: 0;
  }
  .site-nav a, .site-nav button.linklike { border: 0; padding: 8px 10px; font-size: .9rem; }
  .site-nav .nav-user { padding: 0 0 0 10px; border-left: 1px solid rgba(212, 175, 55, .3); margin-left: 6px; }
}

/* vyhledávání v hlavičce */
.search { display: flex; gap: 6px; padding: 8px 0 2px; }
.search input { flex: 1; min-width: 0; }
@media (min-width: 900px) { .search { padding: 0 0 0 8px; } .search input { width: 150px; } }

/* ---------- Patička ---------- */
.site-foot {
  padding: 18px var(--gutter) 28px;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-faint);
  border-top: 1px solid rgba(212, 175, 55, .2);
  background: rgba(0, 0, 0, .25);
}
.site-foot a { color: var(--ink-dim); }

/* ---------- Drobečková navigace ---------- */
.crumbs {
  font-size: .95rem;
  color: var(--ink-faint);
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
}
.crumbs a { color: var(--ink-dim); text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--gold-lo); }

/* ---------- Zdobený nadpis sekce ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, .35);
  position: relative;
}
.section-head::after {         /* drobné zlaté cimbuří na lince */
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 96px; height: 8px;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold) 40%, transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) 0 100% / 100% 3px no-repeat,
    linear-gradient(90deg, #000 0 7px, transparent 0) 0 0 / 12px 100% repeat-x;
  mask:
    linear-gradient(#000 0 0) 0 100% / 100% 3px no-repeat,
    linear-gradient(90deg, #000 0 7px, transparent 0) 0 0 / 12px 100% repeat-x;
}
.section-head h2 { margin: 0; }
.section-head a { font-size: .95rem; white-space: nowrap; }
.section-head:first-child { margin-top: 0; }

.lead { font-size: 1.15rem; color: var(--ink-dim); max-width: 46em; }
.lead p { margin: 0 0 .6em; }

/* ---------- Zlacený rám (mírně patinovaný) ----------
   Profil zvenku dovnitř: zkosená hrana, zlacená lišta, řada perel, rozety v rozích,
   zlatá linka a bordó sametová paspartu kolem obrazu. --fw = šířka rámu. */
.frame {
  --fw: 12px;
  --ro: calc(var(--fw) * 1.75);           /* velikost rozety v rohu */
  position: relative;
  display: block;
  padding: var(--fw);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 235, 170, .1), transparent 60%),   /* setřené, vyleštěné místo */
    linear-gradient(135deg, #e6ce73 0%, #be9b38 18%, #7a5e1e 38%, #b89635 55%, #dfc66c 70%, #74581a 100%);
  border: 2px solid;
  border-color: #e0c67a #624a15 #362808 #c4a34d;   /* světlo shora zleva */
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(248, 230, 170, .48),
    inset 0 0 6px 1px rgba(60, 38, 5, .57),    /* patina v hloubce profilu */
    var(--shadow);
}
.frame::before {               /* řada perel uprostřed lišty */
  content: '';
  position: absolute;
  inset: calc(var(--fw) * .5 - 4.5px);
  padding: 4.5px;
  background: radial-gradient(circle, #f8ebb7 0 .6px, #d7b559 1.1px, #7a5e1e 1.8px, rgba(50, 34, 5, .52) 2.1px, transparent 2.4px) 0 0 / 4.5px 4.5px round;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 1;
}
.frame::after {                /* rozety v rozích */
  --o: calc(var(--fw) * .5 - var(--ro) * .5);
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cg stroke='%235c430f' stroke-width='.6'%3E%3Cg fill='%23977627'%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(45)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(135)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(225)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(315)'/%3E%3C/g%3E%3Cg fill='%23cbaa4a'%3E%3Cellipse cy='-5' rx='2.5' ry='4.3'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(90)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(180)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(270)'/%3E%3C/g%3E%3Ccircle r='2.7' fill='%23e6ce73'/%3E%3C/g%3E%3Ccircle cx='-.8' cy='-.9' r='.9' fill='%23f8eec6'/%3E%3C/svg%3E") left var(--o) top var(--o) / var(--ro) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cg stroke='%235c430f' stroke-width='.6'%3E%3Cg fill='%23977627'%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(45)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(135)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(225)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(315)'/%3E%3C/g%3E%3Cg fill='%23cbaa4a'%3E%3Cellipse cy='-5' rx='2.5' ry='4.3'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(90)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(180)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(270)'/%3E%3C/g%3E%3Ccircle r='2.7' fill='%23e6ce73'/%3E%3C/g%3E%3Ccircle cx='-.8' cy='-.9' r='.9' fill='%23f8eec6'/%3E%3C/svg%3E") right var(--o) top var(--o) / var(--ro) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cg stroke='%235c430f' stroke-width='.6'%3E%3Cg fill='%23977627'%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(45)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(135)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(225)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(315)'/%3E%3C/g%3E%3Cg fill='%23cbaa4a'%3E%3Cellipse cy='-5' rx='2.5' ry='4.3'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(90)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(180)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(270)'/%3E%3C/g%3E%3Ccircle r='2.7' fill='%23e6ce73'/%3E%3C/g%3E%3Ccircle cx='-.8' cy='-.9' r='.9' fill='%23f8eec6'/%3E%3C/svg%3E") left var(--o) bottom var(--o) / var(--ro) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cg stroke='%235c430f' stroke-width='.6'%3E%3Cg fill='%23977627'%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(45)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(135)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(225)'/%3E%3Cellipse cy='-4.6' rx='1.7' ry='3.3' transform='rotate(315)'/%3E%3C/g%3E%3Cg fill='%23cbaa4a'%3E%3Cellipse cy='-5' rx='2.5' ry='4.3'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(90)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(180)'/%3E%3Cellipse cy='-5' rx='2.5' ry='4.3' transform='rotate(270)'/%3E%3C/g%3E%3Ccircle r='2.7' fill='%23e6ce73'/%3E%3C/g%3E%3Ccircle cx='-.8' cy='-.9' r='.9' fill='%23f8eec6'/%3E%3C/svg%3E") right var(--o) bottom var(--o) / var(--ro) no-repeat;
  filter: drop-shadow(0 1px 1px rgba(40, 25, 0, .6));
  pointer-events: none;
  z-index: 2;
}
.frame__canvas {
  display: block;
  position: relative;
  overflow: hidden;
  background: #120f0c;
  aspect-ratio: 1 / 1;
  border: calc(var(--fw) * .28) solid #5a1520;   /* sametová paspartu */
  box-shadow:
    0 0 0 1px #3e2e09,
    0 0 0 2px rgba(240, 218, 145, .55),
    0 0 0 calc(var(--fw) * .32) rgba(90, 62, 10, .38),   /* žlábek u vnitřní hrany lišty */
    0 0 5px 3px rgba(60, 40, 5, .35);
}
.frame__canvas img {
  position: absolute;          /* obraz nesmí rám roztáhnout — poměr stran určuje rám */
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .3s;
}
.frame__canvas::after {        /* stín, který paspartu vrhá na obraz */
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .7), inset 0 0 14px rgba(0, 0, 0, .4);
  pointer-events: none;
}
.grid--strip .frame { --fw: 9px; }
a.frame:hover .frame__canvas img, a.frame:focus-visible .frame__canvas img { transform: scale(1.04); filter: brightness(1.08); }

/* ---------- Gotické okno (sály) ---------- */
.window {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;         /* = viewBox symbolu #i-okno */
  text-decoration: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
}
.window__stone { position: absolute; inset: 0; width: 100%; height: 100%; }
.window__glass {               /* otvor okna: 54..346 × 46..476 z 400 × 500 */
  position: absolute;
  left: 13.5%; right: 13.5%;
  top: 9.2%; bottom: 4.8%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #2b3a5c, #0d1322 75%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 292 430' preserveAspectRatio='none'%3E%3Cpath d='M0 430V175A177.9 177.9 0 0 1 146 0A177.9 177.9 0 0 1 292 175V430z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 292 430' preserveAspectRatio='none'%3E%3Cpath d='M0 430V175A177.9 177.9 0 0 1 146 0A177.9 177.9 0 0 1 292 175V430z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.window__glass img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .3s;
}
.window__glass::after {        /* odlesk skla a stín ostění */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .16), transparent 35%),
    radial-gradient(ellipse 80% 70% at 50% 60%, transparent 55%, rgba(0, 0, 0, .55));
  transition: opacity .3s;
}
.window--kruzba .window__glass::after {   /* hlavní sály: olověné sklo v kosočtvercích */
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .16), transparent 35%),
    repeating-linear-gradient(60deg, transparent 0 21px, rgba(15, 10, 5, .22) 21px 22.5px),
    repeating-linear-gradient(-60deg, transparent 0 21px, rgba(15, 10, 5, .22) 21px 22.5px),
    radial-gradient(ellipse 80% 70% at 50% 60%, transparent 55%, rgba(0, 0, 0, .55));
}
a.window:hover .window__glass img, a.window:focus-visible .window__glass img { transform: scale(1.05); filter: brightness(1.1) saturate(1.05); }
a.window:hover .window__glass::after, a.window:focus-visible .window__glass::after { opacity: .45; }
a.window:focus-visible { outline: none; }
a.window:focus-visible .window__stone { filter: drop-shadow(0 0 4px var(--focus)); }
.window--empty .window__glass { display: grid; place-items: center; color: var(--gold-lo); }
.window--empty .window__glass > svg { width: 40%; height: 40%; margin-top: 25%; opacity: .55; }
.window .badge-vis { top: auto; right: auto; bottom: 9%; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* ---------- Mřížka obrazů ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
.grid--strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 600px) { .grid--strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid--strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.tile { min-width: 0; }
.tile .frame { text-decoration: none; }
.tile__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: .9rem;
  color: var(--ink-dim);
  margin-top: 6px;
  min-height: 1.3em;
}
.tile__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__stats { flex: none; display: flex; gap: 8px; color: var(--ink-faint); }
.tile__stats .ico { width: 13px; height: 13px; vertical-align: -1px; }
.grid--strip .tile__meta { font-size: .8rem; }

/* kamenná cedulka s vytesaným jménem sálu */
.plaque {
  position: relative;
  margin: 10px auto 0;
  max-width: 92%;
  text-align: center;
  padding: 8px 14px 9px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 243, 214, .18), transparent 70%),
    linear-gradient(180deg, #9a8f7c, #7d7362 55%, #655b4c);
  border: 1px solid #3c352b;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 214, .45),
    inset 0 -2px 0 rgba(0, 0, 0, .3),
    0 3px 6px rgba(0, 0, 0, .6);
  color: #2b251d;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.25;
  letter-spacing: .03em;
  text-shadow: 0 1px 0 rgba(255, 243, 214, .4), 0 -1px 0 rgba(0, 0, 0, .35);   /* vytesané písmo */
}
.plaque::before {              /* vrytý okraj tabulky */
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(35, 29, 22, .45);
  box-shadow: 0 1px 0 rgba(255, 243, 214, .22), inset 0 1px 0 rgba(255, 243, 214, .22);
  pointer-events: none;
}
.plaque small {
  display: block;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: .9rem;
  letter-spacing: .02em;
  color: #221c15;
  text-shadow: 0 1px 0 rgba(255, 243, 214, .35);
}
/* dřevěná cedulka (přilehlé sály) — vyřezané písmo, dva kované hřeby */
.plaque--drevo {
  background:
    linear-gradient(180deg, rgba(255, 210, 150, .22), rgba(0, 0, 0, .15)),
    url(../tex/wood.webp) #5a3a1e;
  background-size: auto, 200px auto;
  border-color: #1f1208;
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, .3),
    inset 0 -2px 0 rgba(0, 0, 0, .4),
    0 3px 6px rgba(0, 0, 0, .6);
  padding-left: 22px; padding-right: 22px;
  color: #f1dcb0;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .75), 0 1px 0 rgba(255, 220, 170, .15);
}
.plaque--drevo::before {       /* hřeby po stranách */
  inset: 0;
  border: 0;
  box-shadow: none;
  background:
    radial-gradient(circle at 10px 50%, #c9c2b4 0 1px, #6a655d 2px 3.5px, #2a2622 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 10px) 50%, #c9c2b4 0 1px, #6a655d 2px 3.5px, #2a2622 4px, transparent 5px);
}
.plaque--drevo small { font-style: italic; font-size: .85rem; color: #e3cb9c; text-shadow: 0 -1px 0 rgba(0, 0, 0, .7); }

.grid--halls { gap: 26px 16px; }
@media (min-width: 960px) { .grid--halls { gap: 38px 28px; } }
.grid--halls .plaque { margin-top: 8px; }

.badge-vis {
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  background: rgba(20, 14, 8, .85);
  color: var(--gold-text);
  border: 1px solid var(--gold-lo);
  border-radius: 99px;
  font-size: .75rem;
  padding: 1px 8px;
}

/* ---------- Pergamen (popisky, komentáře, formuláře) ---------- */
.parchment {
  position: relative;
  color: var(--parch-ink);
  background: url(../tex/parchment.webp) #efe1bd;
  background-size: 256px auto;
  border-radius: 3px;
  padding: 16px 18px;
  box-shadow:
    inset 0 0 30px rgba(120, 80, 30, .35),
    inset 0 0 4px rgba(90, 60, 20, .5),
    0 4px 14px rgba(0, 0, 0, .6);
}
.parchment h1, .parchment h2, .parchment h3 { color: #5a1520; text-shadow: none; }
.parchment a { color: #7a1f2b; }
.parchment a:hover { color: #a32c3c; }
.parchment .muted { color: var(--parch-dim); }
.parchment p:first-child { margin-top: 0; }
.parchment p:last-child { margin-bottom: 0; }

.muted { color: var(--ink-faint); }

/* ---------- Detail obrazu ---------- */
.painting { margin: 0 0 20px; }
.painting .frame { --fw: 16px; width: fit-content; max-width: 100%; margin: 0 auto; }   /* rám obepne obraz */
@media (min-width: 720px) { .painting .frame { --fw: 26px; } }
.painting .frame__canvas {
  aspect-ratio: auto;
  display: flex;
  justify-content: center;
  background: #0b0907;
  cursor: zoom-in;
}
.painting .frame__canvas img {
  position: static;
  width: auto;
  height: auto;
  max-height: min(78vh, 900px);
  object-fit: contain;
}
.painting .frame__canvas:hover img { transform: none; }

.painting-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.painting-nav .pos { color: var(--ink-faint); font-size: .95rem; }

.detail { display: grid; gap: 20px; }
@media (min-width: 900px) { .detail { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }

/* stránka obrazu: název a popisek, štítek s údaji, komentáře */
.exhibit {
  display: grid;
  gap: 26px 40px;
  grid-template-areas: "head" "facts" "comments";
  margin-top: 6px;
}
@media (min-width: 900px) {
  .exhibit {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas: "head facts" "comments facts";
    grid-template-rows: auto 1fr;
    align-items: start;
  }
  .exhibit__facts { position: sticky; top: calc(var(--head-h, 98px) + 16px); }
}
.exhibit__head { grid-area: head; min-width: 0; }
/* mosazná cedulka s názvem obrazu pod rámem */
.painting__plaque {
  display: table;              /* šířka podle textu, vystředěná */
  max-width: min(92%, 34em);
  margin: 16px auto 0;
  padding: 9px 22px 10px;
  text-align: center;
  background: linear-gradient(180deg, #e6ce73, #be9b38 45%, #9c7d34 75%, #b89635);
  border: 1px solid #4a3608;
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 200, .7),
    inset 0 -1px 0 rgba(0, 0, 0, .35),
    inset 0 0 0 3px rgba(255, 235, 160, .15),
    0 3px 8px rgba(0, 0, 0, .6);
  color: #2e2106;
}
.painting__plaque h1 {
  margin: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  line-height: 1.3;
  letter-spacing: .04em;
  color: #2e2106;
  text-shadow: 0 1px 0 rgba(255, 240, 190, .55);   /* vyryté písmo */
  overflow-wrap: anywhere;
}
.painting__plaque span {
  display: block;
  margin-top: 2px;
  font-size: .95rem;
  letter-spacing: .02em;
  color: #36270a;
  text-shadow: 0 1px 0 rgba(255, 240, 190, .4);
}
.exhibit__text {
  max-width: 42em;
  margin: 0 0 18px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid rgba(212, 175, 55, .45);
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink);
}
.exhibit__text p { margin: 0 0 .5em; }
.exhibit__text p:last-child { margin-bottom: 0; }
.exhibit__head .actions { margin: 0; }
.exhibit__facts { grid-area: facts; }
.exhibit__comments { grid-area: comments; min-width: 0; }
.exhibit__comments .section-head { margin-top: 6px; }
.exhibit__comments .section-head h2 { font-size: 1.25rem; }
.section-head h2 .count {
  display: inline-block;
  min-width: 1.7em;
  padding: 0 .45em;
  border: 1px solid rgba(212, 175, 55, .5);
  border-radius: 99px;
  font-family: var(--f-body);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  vertical-align: .25em;
  color: var(--ink-dim);
  text-shadow: none;
}
.no-comments { margin: 0 0 4px; color: var(--ink-faint); font-style: italic; }
.comment-form { margin-top: 18px; }
form.comment-form { padding: 14px 16px; }
.comment-form label { font-family: var(--f-head); font-size: 1rem; letter-spacing: .03em; color: #5a1520; margin-bottom: 8px; }
.comment-form textarea { min-height: 96px; }
.comment-form .form-actions { justify-content: flex-end; margin-top: 10px; }

.facts__head {
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(120, 90, 40, .4);
  font-size: .95rem;
  letter-spacing: .08em;
}
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 14px; font-size: 1rem; }
.facts dt, .facts dd { padding: 5px 0; border-bottom: 1px dotted rgba(120, 90, 40, .35); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.facts dt { color: var(--parch-dim); font-style: italic; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }

/* ---------- Tlačítka ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 16px;
  font: 600 1rem/1.1 var(--f-body);
  letter-spacing: .02em;
  color: #2a1a05;
  background: linear-gradient(180deg, #f1d77a, #c99b32 55%, #a57b22);
  border: 1px solid #5c430f;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 245, 200, .7), 0 2px 5px rgba(0, 0, 0, .5);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); color: #2a1a05; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn .ico { width: 18px; height: 18px; }
.btn--ghost {
  background: rgba(0, 0, 0, .35);
  color: var(--ink);
  border-color: rgba(212, 175, 55, .45);
  box-shadow: none;
}
.btn--ghost:hover { color: var(--gold-hi); border-color: var(--gold); }
.btn--danger { background: linear-gradient(180deg, #b84553, #7a1f2b); color: #fbe9d0; border-color: #3d0c13; box-shadow: inset 0 1px 0 rgba(255, 200, 200, .35); }
.btn--danger:hover { color: #fff; }
.btn--small { min-height: 32px; padding: 4px 10px; font-size: .9rem; }
button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }

/* lajk — vosková pečeť se srdcem */
.like {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 16px 6px 8px;
  border-radius: 99px;
  border: 1px solid rgba(212, 175, 55, .5);
  background: rgba(0, 0, 0, .35);
  color: var(--ink);
  font: 600 1.05rem var(--f-body);
  cursor: pointer;
}
a.like { text-decoration: none; }
.like__seal {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #5a4a3a, #2a2018);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .6);
  transition: background .25s, transform .25s;
}
.like__seal svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-dim); stroke-width: 2; }
.like[aria-pressed="true"] .like__seal { background: radial-gradient(circle at 35% 30%, #d0485a, #7a1f2b 65%, #4d0f18); }
.like[aria-pressed="true"] .like__seal svg { fill: #f8d7a0; stroke: #f8d7a0; }
.like.pop .like__seal { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }

/* ---------- Komentáře ---------- */
.comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment { padding: 12px 14px; }
.comment__head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .95rem; margin-bottom: 4px; }
.comment__head time { color: var(--parch-dim); font-style: italic; font-size: .9rem; }
.comment__head form { margin-left: auto; }
.comment__body { overflow-wrap: anywhere; }
.comment__body p { margin: 0 0 .4em; }
.comment__thumb { float: left; width: 56px; margin: 2px 12px 4px 0; }
.comment__thumb img { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--gold-lo); }
.comment::after { content: ''; display: block; clear: both; }

/* jména podle kolejí */
.who { font-weight: 600; }
.who::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: #888; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.k-havraspar::before { background: #2a4f9e; }
.k-mrzimor::before { background: #e8b923; }
.k-nebelvir::before { background: #ae1f23; }
.k-zmijozel::before { background: #1f6e3a; }
.k-profesor::before { background: #6b3fa0; }

/* ---------- Formuláře ---------- */
label { display: block; font-weight: 600; margin: 0 0 4px; }
.field { margin: 0 0 14px; }
.field small, .hint { display: block; font-size: .9rem; color: var(--parch-dim); font-weight: 400; margin-top: 3px; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%;
  font: 1.05rem var(--f-body);
  color: var(--parch-ink);
  background: rgba(255, 252, 240, .85);
  border: 1px solid #a88d5c;
  border-radius: var(--radius);
  padding: 9px 10px;
  min-height: 44px;
}
textarea { min-height: 100px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--bordo); outline-offset: 0; border-color: var(--bordo); }
.site-head input[type=search] { background: rgba(0, 0, 0, .35); color: var(--ink); border-color: rgba(212, 175, 55, .45); min-height: 38px; padding: 6px 10px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--bordo); }
.form-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }

/* ---------- Hlášky ---------- */
.flash { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius); border-left: 4px solid var(--ok); background: rgba(40, 60, 30, .75); color: #eaf3dc; }
.flash--err { border-color: var(--err); background: rgba(80, 25, 20, .8); color: #fbe0d8; }

/* ---------- Stránkování ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; text-align: center; }
.pager .current { font-family: var(--f-head); color: var(--gold-text); padding: 0 8px; }

/* ---------- Úvodní erb ---------- */
.welcome { text-align: center; margin: 4px 0 26px; }
.welcome h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); margin-bottom: .2em; }
.welcome p { margin: 0 auto; max-width: 36em; color: var(--ink-dim); font-style: italic; }
.ornament { display: block; width: 220px; max-width: 70%; height: 18px; margin: 10px auto 0; color: var(--gold); }

.empty { text-align: center; padding: 30px 10px; color: var(--ink-faint); font-style: italic; }

/* ---------- Celá obrazovka ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 4, 3, .96);
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: pinch-zoom;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; transform-origin: center; user-select: none; -webkit-user-drag: none; }
.lightbox__btn {
  position: absolute;
  background: rgba(0, 0, 0, .55);
  color: var(--gold-text);
  border: 1px solid rgba(212, 175, 55, .5);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  cursor: pointer;
  text-decoration: none;
}
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (hover: none) { .lightbox__prev, .lightbox__next { display: none; } }
.lightbox__caption {
  position: absolute;
  left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 6px 16px;
  background: rgba(0, 0, 0, .6);
  border: 1px solid rgba(212, 175, 55, .35);
  border-radius: 4px;
  color: var(--gold-text);
  font-family: var(--f-head);
  font-size: 1rem;
  text-align: center;
  pointer-events: none;
}
.lightbox__caption span { font-family: var(--f-body); color: #d8cbb0; margin-left: 6px; }
.window--zamceno .window__glass > svg { width: 30%; height: 30%; opacity: .7; }

/* ---------- Administrace ---------- */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 1rem; }
table.data th, table.data td { padding: 8px 8px; border-bottom: 1px solid rgba(120, 90, 40, .35); text-align: left; vertical-align: middle; }
table.data th { font-family: var(--f-head); font-size: .85rem; letter-spacing: .04em; color: #5a1520; }
table.data td.num { text-align: right; white-space: nowrap; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-left: 22px; border-left: 1px dashed rgba(120, 90, 40, .5); margin-left: 8px; }
.tree li > .tree-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 0; border-bottom: 1px solid rgba(120, 90, 40, .25); }
.tree-row .name { font-weight: 600; flex: 1 1 200px; }
.tree-row .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tree-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tree-bar .tree-filter { flex: 1 1 220px; width: auto; }
.tree-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 4px; padding: 0; vertical-align: middle; border: 1px solid rgba(120, 90, 40, .45); border-radius: 3px; background: rgba(255, 250, 235, .5); color: var(--bordo); cursor: pointer; font-size: 14px; line-height: 1; }
.tree-toggle:hover { background: rgba(255, 250, 235, .9); }
.tree-toggle span { transition: transform .15s; }
.tree-toggle[aria-expanded="true"] span { transform: rotate(90deg); }
.tree-toggle--leaf { border-color: transparent; background: none; cursor: default; }
.tree li.is-collapsed > .tree { display: none; }
.tree li.is-hit > .tree-row .name > a { background: rgba(212, 175, 55, .35); }
.tree li.is-filtered { display: none; }
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 20px; }
@media (min-width: 720px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-cards .parchment { text-align: center; padding: 12px; }
.stat-cards strong { display: block; font-family: var(--f-head); font-size: 1.5rem; color: #5a1520; }

/* nahrávání */
.dropzone {
  border: 2px dashed var(--gold-lo);
  border-radius: 6px;
  padding: 28px 16px;
  text-align: center;
  background: rgba(0, 0, 0, .25);
  color: var(--ink-dim);
  cursor: pointer;
}
.dropzone.is-over { border-color: var(--gold-hi); background: rgba(212, 175, 55, .08); }
.dropzone input { display: none; }
.uploads { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.uploads li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 6px; background: rgba(0, 0, 0, .3); border-radius: var(--radius); }
.uploads img, .uploads .ph { width: 56px; height: 56px; object-fit: cover; background: #111; }
.uploads .name { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads .state { font-size: .85rem; color: var(--ink-faint); }
.uploads .state.ok { color: #9fd17f; }
.uploads .state.err { color: #ff9c8a; }
.bar { height: 5px; background: rgba(255, 255, 255, .1); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width .2s; }

.bulk-item { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(120, 90, 40, .35); }
.bulk-item img { width: 90px; height: 90px; object-fit: cover; border: 2px solid var(--gold-lo); }
.bulk-item .field { margin-bottom: 8px; }
.bulk-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; background: linear-gradient(transparent, #e9d9b2 30%); }

/* ---------- Pohyb jen pro ty, kdo ho chtějí ---------- */
@media (prefers-reduced-motion: no-preference) {
  body::after {                 /* mihotání pochodní na okrajích zdi */
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
      radial-gradient(ellipse 40% 60% at 0% 40%, rgba(255, 150, 50, .10), transparent 70%),
      radial-gradient(ellipse 40% 60% at 100% 40%, rgba(255, 150, 50, .10), transparent 70%);
    animation: flicker 4s infinite alternate ease-in-out;
  }
  @keyframes flicker {
    0% { opacity: .75; } 20% { opacity: 1; } 35% { opacity: .82; } 50% { opacity: .95; } 70% { opacity: .7; } 100% { opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; fill: currentColor; }

/* komentáře převzaté ze staré obrazárny */
.archive { margin-top: 16px; }
.archive > summary { cursor: pointer; font-family: var(--f-head); margin-bottom: 10px; }
.archive > summary .muted { font-family: inherit; margin-left: 6px; }
.comment--archive { opacity: .92; }
.comment--archive .comment__head time { font-style: italic; }
