/* =====================================================================
 *  Kruh — mobilná fotogaléria (event archív)
 *  Implementácia design handoffu „design_handoff_kruh_galeria".
 *  Verejná časť: tmavá (default) + svetlá téma, high-fidelity.
 *
 *  Typografia (2 lokálne rodiny, žiadne runtime CDN):
 *   · IBM Plex Mono (400/500/600) — nadpisy, mená, kickery, meta, počítadlá
 *   · IBM Plex Sans (400/500)     — bežný text, tlačidlá, popisy
 * ===================================================================== */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}


:root {
  /* Typografia — mono je identita verejnej appky; sans len pre dlhší text. */
  --font-ui: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Aliasy zachované pre administráciu (mimo rozsahu redizajnu). */
  --mono: var(--font-ui);
  --sans: var(--font-sans);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* 4px rytmus */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;

  --topbar-height: 52px;
  --tabbar-height: 56px;

  /* Lightbox — vždy čierny bez ohľadu na tému. */
  --lightbox-bg: #000000;
  --lightbox-text: #ffffff;
  --lightbox-muted: rgba(255, 255, 255, 0.66);

  /* Admin — jazyk aplikácie (svetlá app paleta + červený akcent z loga).
     --accent = interaktívne/aktívne prvky; --btn = plné akčné tlačidlá (ink),
     nech sa akcent nepletie s deštruktívnou červenou tlačidiel „danger". */
  --accent: #A4161A;
  --accent-soft: rgba(164, 22, 26, 0.08);
  --btn: #1f2733;
  --btn-hover: #10151d;
  --card-bg: #ffffff;
  --text: #111827;
  --text-muted: #697386;
  --admin-border: rgba(17, 24, 39, 0.14);
  --radius: 2px;
  --pad-top: calc(16px + var(--safe-top));
}

/* Verejná paleta — svetlá aj tmavá téma sú rovnocenné (DESIGN §3.2). */
html[data-theme="light"] {
  color-scheme: light;
  --app-bg: #f5f5f2;
  --app-surface: #ffffff;
  --app-text: #111827;
  --app-muted: #697386;
  --app-border: rgba(17, 24, 39, 0.12);
  --app-accent: #A4161A;                       /* červená z loga (juh/oheň) */
  --app-accent-soft: rgba(164, 22, 26, 0.10);
  --app-tabbar: rgba(245, 245, 242, 0.94);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #0b0f14;
  --app-surface: #121821;
  --app-text: #f3f5f7;
  --app-muted: #929cab;
  --app-border: rgba(243, 245, 247, 0.14);
  --app-accent: #E5544E;                       /* jasnejšia červená pre tmavé pozadie */
  --app-accent-soft: rgba(229, 84, 78, 0.16);
  --app-tabbar: rgba(11, 15, 20, 0.94);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* iOS: gumové odpruženie (rubber-band) ťahá pri scrolle aj fixed prvky —
   spodná lišta potom „poskakuje" a nesedí pri dne. Vypnuté = natívny pocit. */
html, body { overscroll-behavior-y: none; }

body {
  margin: 0;
  background: #f5f5f2;               /* základ = admin (svetlá app paleta) */
  color: #1b1913;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Verejné stránky (majú data-theme) — mono UI a témová paleta. */
html[data-theme] body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: var(--font-ui);
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--app-accent, #A4161A); outline-offset: 2px; }

@keyframes eg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes eg-sheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
.page-fade { animation: eg-fade 0.28s ease both; }
@media (prefers-reduced-motion: reduce) {
  .page-fade { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* Flash (admin aj verejné) */
.flash-messages { margin-top: 16px; }
.flash { padding: 10px 14px; border-radius: 2px; }
.flash-error { background: #f6e4e0; color: #7a2e21; }
.flash-success { background: #e4efe0; color: #2f5a29; }

/* =====================================================================
 *  Aplikačný shell — horná navigácia
 * ===================================================================== */
.top-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  min-height: var(--topbar-height);
  padding: var(--safe-top) max(12px, var(--safe-right)) 0 max(12px, var(--safe-left));
  background: color-mix(in srgb, var(--app-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--app-border);
}
.top-nav-title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-text);
  padding: 14px 4px;
  min-height: var(--topbar-height);
  display: inline-flex; align-items: center;
  line-height: 1;
}
.top-nav .spacer { flex: 1 1 auto; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 8px 0 4px;
  /* Glyf šípky „<" je vsadený vo svojom boxe (~7.5px), takže box na 16px by
     nechal hrot posunutý dnu. Posunieme o inset doľava → HROT sedí na 16px
     ľavom okraji obsahu (rovnako ako nadpisy/texty). */
  margin-left: -7.5px;
  border: 0; background: transparent;
  color: var(--app-text);
  font-family: var(--font-ui);
  font-weight: 600; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1; text-decoration: none; cursor: pointer;
}
.back-link .icon { width: 20px; height: 20px; }
.back-link:hover { color: var(--app-accent); }

.theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  color: var(--app-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.theme-toggle:hover { color: var(--app-text); }
.theme-toggle .icon { display: none; width: 22px; height: 22px; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Pravý horný klaster akcií: prepínač témy + ikona Info (rovnako veľká).
   Blízko pri sebe: úzke boxy (36px) bez medzery, dotyková výška ostáva 44px. */
.top-actions { display: inline-flex; align-items: center; gap: 0; }
.top-actions .theme-toggle,
.top-actions .top-info { width: 32px; height: 44px; }
.top-info {
  display: grid; place-items: center;
  border: 0; background: transparent;
  color: var(--app-muted); border-radius: 6px;
  text-decoration: none; cursor: pointer;
  transition: color 0.2s ease;
}
.top-info:hover { color: var(--app-text); }
/* Aktívna sekcia (napr. Info, keď si na /info) = akcentová farba. */
.top-info.is-active { color: var(--app-accent); }
/* Rovnaká veľkosť ikony ako prepínač témy (22px). */
.top-info .icon { width: 22px; height: 22px; }

/* Obsah stránok so spodnou navigáciou má priestor pod tabbarom. */
html[data-theme] main { padding-bottom: 24px; }
body.archive main, body.autori-page main {
  padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 16px);
}
/* Detail udalosti a profil autora nemajú spodnú lištu → žiadne miesto pod ňou. */

/* =====================================================================
 *  Spodná navigácia — plná šírka, nie kapsula (DESIGN §4.3)
 * ===================================================================== */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  /* Len malá časť safe-area, nech lišta sedí čo najnižšie pri hrane telefónu
     (v standalone appke bola inak zbytočne odsadená od spodku). */
  padding-bottom: max(2px, calc(var(--safe-bottom) * 0.25));
  background: var(--app-tabbar);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--app-border);
}
.nav-tab {
  position: relative;
  min-height: 62px;
  /* Obsah pri spodku (nízko), ale s odstupom od hornej čiary aj od spodku. */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 14px 0 8px;
  gap: 3px;
  border: 0; background: transparent;
  color: var(--app-muted);
  font-family: var(--font-ui);
  font-weight: 500; font-size: 11px; letter-spacing: 0.06em;
  text-decoration: none; cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-tab .icon { width: 22px; height: 22px; }
/* Aktívny tab: farebné pozadie + horný akcentový prúžok = dobre viditeľné. */
.nav-tab.is-active {
  color: var(--app-accent);
  background: var(--app-accent-soft);
  box-shadow: inset 0 2px 0 var(--app-accent);
}

/* =====================================================================
 *  Info / Intro — vstupná obrazovka zjednotená s app shellom (DESIGN §5.7)
 * ===================================================================== */
body.onboarding-page main { padding: 0; }
.onboarding {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  color: var(--lightbox-text);
  overflow: hidden;
  animation: eg-fade 0.3s ease both;
}
.onboarding-cover { position: absolute; inset: 0; transition: filter 0.35s ease; }
.onboarding-cover img,
.onboarding-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.onboarding-cover.is-empty { background: var(--app-surface); }
/* Prepnutie témy = viditeľná zmena aj na intre. */
html[data-theme="dark"] .onboarding-cover { filter: brightness(0.74) saturate(0.95); }
html[data-theme="light"] .onboarding-cover { filter: brightness(1.04); }
.onboarding-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.08) 38%, rgba(0,0,0,.72) 82%, rgba(0,0,0,.9) 100%);
}
.onboarding-topbar {
  position: relative; z-index: 2;
  padding-top: calc(var(--safe-top) + 12px);
}
/* Jeden box s pevnou výškou vsadený do topbaru; VŠETKO v ňom je vertikálne
   vycentrované (align-items:center). Gutter 20px = rovnaký ako text dole. */
.topbar-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px;
  padding: 0 20px;
}
.onboarding-brand { display: flex; align-items: center; gap: 9px; }
.onboarding-brand .brand-mark { flex: 0 0 auto; color: rgba(255,255,255,0.92); }
/* Nahrané logo komunity — rovnaký box ako zabudovaný znak. */
.brand-logo { flex: 0 0 auto; width: 27px; height: 27px; object-fit: contain; }
.topbar-row .top-actions { display: flex; align-items: center; }
/* Ikony majú v tap-cieli vnútorný padding a krúžok malý inset — malým nudgeom
   posadíme ich VIZUÁLNE hrany presne na 20px gutter (rovnako ako text dole). */
.onboarding-brand { margin-left: -2px; }
.topbar-row .top-actions { margin-right: -7px; }
.onboarding-word {
  font-family: var(--font-ui); font-weight: 600;
  font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  /* Explicitný line-height nech Safari nepočíta vyšší riadok ako Chrome
     (inak text klesne a opticky sa rozíde s krúžkom a ikonami). */
  line-height: 1;
}
/* Ikony hornej lišty nad obálkou = biele; aktívny Domov = akcent (selectnuté). */
.onboarding .theme-toggle,
.onboarding .top-info { color: rgba(255,255,255,0.82); }
.onboarding .theme-toggle:hover,
.onboarding .top-info:hover { color: #fff; }
.onboarding .top-info.is-active { color: var(--app-accent); }
.onboarding-body {
  position: relative; z-index: 2; margin-top: auto;
  padding: 24px 20px calc(var(--tabbar-height) + var(--safe-bottom) + 26px);
}
.onboarding-kicker {
  font-family: var(--font-ui);
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 11px; color: rgba(255,255,255,.74);
  margin: 0 0 12px;
}
.onboarding-title {
  font-family: var(--font-ui); font-weight: 500;
  font-size: clamp(26px, 7vw, 34px); line-height: 1.1; letter-spacing: -0.01em;
  margin: 0;
}
.onboarding-desc {
  font-family: var(--font-sans);
  margin: 14px 0 24px; font-size: 15px; line-height: 1.5;
  color: rgba(255,255,255,.82); max-width: 34ch;
}
.onboarding-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px;
  border: 0; border-radius: 6px;
  background: #fff; color: #111;
  font-family: var(--font-ui); font-weight: 500; font-size: 14px;
  letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
/* Tmavá: biele tlačidlo. Svetlá: červené akcentové tlačidlo. */
html[data-theme="light"] .onboarding-cta { background: var(--app-accent); color: #fff; }
.onboarding-scrim { transition: background 0.35s ease; }
html[data-theme="light"] .onboarding-scrim {
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.04) 38%,
    rgba(0,0,0,.5) 82%, rgba(0,0,0,.68) 100%);
}
.onboarding-cta .icon { width: 18px; height: 18px; }

/* =====================================================================
 *  Archív — ploché fotografické bloky (DESIGN §5.1)
 * ===================================================================== */
.event-list {
  list-style: none; margin: 0; padding: 12px 16px 4px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 12px;
}
.event-item { margin: 0; }
.event-block { display: block; text-decoration: none; color: inherit; }
.event-photo {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  background: var(--app-surface); overflow: hidden;
}
.event-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-block:active .event-photo { opacity: 0.9; }
.event-copy { padding: 8px 2px 0; }
.event-name {
  display: block;
  font-family: var(--font-ui); font-weight: 500;
  font-size: clamp(14px, 3.8vw, 16px); line-height: 1.18; letter-spacing: -0.01em;
  color: var(--app-text);
}
/* Dátum · miesto · počet — každé na samostatnom riadku pod nadpisom. */
.event-line {
  display: block; margin-top: 2px;
  font-family: var(--font-ui); font-weight: 500;
  font-size: 10px; letter-spacing: 0.03em; line-height: 1.35; color: var(--app-muted);
}
.event-name + .event-line { margin-top: 5px; }   /* prvý meta riadok trochu nižšie pod nadpisom */

/* Desktop: vždy 3 eventy na riadok, mriežka vyplní celé okno (bez orezania na kraji),
   fotky sa zväčšujú s oknom. Väčšie okno = väčší text (breakpointy nižšie). */
@media (min-width: 700px) {
  .event-list { grid-template-columns: repeat(3, 1fr); gap: 24px 20px; padding: 18px 24px 8px; }
}
@media (min-width: 1200px) {
  .event-list { gap: 30px 26px; padding: 24px 40px 12px; }
  .event-name { font-size: clamp(16px, 1.5vw, 22px); }
  .event-line { font-size: 12px; }
}
@media (min-width: 1700px) {
  .event-list { gap: 36px 32px; padding: 30px 56px 16px; }
  .event-name { font-size: 24px; }
  .event-line { font-size: 13px; }
}

/* =====================================================================
 *  Autori — plochý natívny zoznam (DESIGN §5.2)
 * ===================================================================== */
.autori-intro {
  padding: 16px 16px 4px;
  font-family: var(--font-sans);
  font-size: 14px; color: var(--app-muted);
}

/* Info stránka (o aplikácii) */
.info-page-body {
  padding: 18px 16px calc(var(--safe-bottom) + 14px); max-width: 660px;
  /* Vyplní obrazovku pod hlavičkou → copyright sa zatlačí úplne dole. */
  min-height: calc(100dvh - var(--topbar-height) - var(--safe-top) - 40px);
  display: flex; flex-direction: column;
}
.info-image {
  width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--app-surface); margin-bottom: 18px;
}
.info-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-title {
  font-family: var(--font-ui); font-weight: 500;
  font-size: clamp(22px, 6vw, 28px); letter-spacing: -0.01em;
  margin: 0 0 14px; color: var(--app-text);
}
.info-text {
  font-family: var(--font-sans); white-space: pre-line;
  font-size: 15px; line-height: 1.6; color: var(--app-text); margin: 0;
}
/* Copyright softvéru (autor aplikácie) — jemný, dole pod všetkým. */
.info-copyright {
  margin-top: auto;      /* zatlačí copyright úplne dole */
  padding-top: 40px;     /* zreteľný odstup od „Postavené na" aj pri krátkom obsahu */
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.03em;
  color: var(--app-muted);
}
/* Karta autora — rovnaký dizajn aj font ako zoznam autorov (krúžok + meno +
   pod-riadok), oddelená čiarou zhora. */
.info-author-section {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--app-border);
}
.info-author-card { display: flex; align-items: center; gap: 12px; }
.info-author-avatar {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  overflow: hidden; background: var(--app-surface); display: grid; place-items: center;
}
.info-author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-author-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.info-author-name {
  font-family: var(--font-ui); font-weight: 500; font-size: 14px; color: var(--app-text);
}
.info-author-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.03em;
  color: var(--app-muted); text-decoration: none;
}
.info-author-link .icon { width: 14px; height: 14px; color: var(--app-accent); }
/* Technické parametre — jednoduchý zoznam popis : hodnota. */
.info-tech {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--app-border);
}
.info-tech-title {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--app-muted); margin: 0 0 10px;
}
.info-spec { margin: 0; }
.info-spec > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 0; border-bottom: 1px solid var(--app-border);
  font-family: var(--font-ui); font-size: 13px;
}
.info-spec > div:last-child { border-bottom: none; }   /* žiadna čiara dole */
.info-spec dt { margin: 0; color: var(--app-muted); }
.info-spec dd { margin: 0; color: var(--app-text); text-align: right; }

/* Pomoc — návod: sekcie s nadpisom a ikonou. */
.help-section { margin-top: 22px; }
.help-section:first-of-type { margin-top: 16px; }
.help-heading {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 600; font-size: 15px;
  color: var(--app-text); margin: 0 0 6px;
}
.help-heading .icon { color: var(--app-accent); flex: 0 0 auto; }
.help-body p {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.6;
  color: var(--app-text); margin: 0 0 6px;
}
.help-note {
  margin-top: 8px; padding: 10px 12px; border-radius: 8px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  font-size: 13px !important; color: var(--app-muted) !important;
}
/* Jemný footer úplne dole — odkaz na Info (o aplikácii + kontakt na autora). */
.help-footer {
  margin-top: auto; padding-top: 40px; margin-bottom: 4px;
  font-family: var(--font-ui); font-size: 12px; line-height: 1.6;
  color: var(--app-muted);
}
.help-footer a { color: var(--app-accent); text-decoration: none; }
.help-footer a:hover { text-decoration: underline; }
.author-list { list-style: none; margin: 8px 0 0; padding: 0; }
.author-list li { padding-left: 16px; }
.author-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--app-border);
  text-decoration: none; color: inherit;
}
.author-list li:last-child .author-row { border-bottom: 0; }
.author-row:active { background: var(--app-accent-soft); }
.author-avatar {
  flex: 0 0 auto; width: 46px; height: 46px;
  border-radius: 50%; overflow: hidden; background: var(--app-surface);
  display: grid; place-items: center;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-main { flex: 1 1 auto; min-width: 0; }
.author-name {
  display: block;
  font-family: var(--font-ui); font-weight: 500; font-size: 14px;
  color: var(--app-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.author-sub {
  display: block; margin-top: 3px;
  font-family: var(--font-ui);
  font-size: 11px; letter-spacing: 0.03em; color: var(--app-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.author-row .chevron { flex: 0 0 auto; color: var(--app-muted); display: inline-flex; }

/* =====================================================================
 *  Detail eventu — kompaktná hlavička (DESIGN §5.3)
 * ===================================================================== */
.event-head { padding: 14px 16px 12px; }
.event-title {
  font-family: var(--font-ui); font-weight: 500;
  font-size: clamp(24px, 6.6vw, 32px); line-height: 1.08; letter-spacing: -0.01em;
  margin: 0;
}
.event-meta {
  display: block; margin-top: 8px;
  font-family: var(--font-ui); font-weight: 500;
  font-size: 11px; letter-spacing: 0.05em; line-height: 1.5; color: var(--app-muted);
}
.event-desc-wrap { margin-top: 10px; }
.event-desc {
  font-family: var(--font-sans);
  margin: 0; font-size: 15px; line-height: 1.5; color: var(--app-text);
  max-width: 60ch;
}
/* Na mobile skrátený na 3 riadky; „Viac" ho rozbalí (bez zmeny URL). */
@media (max-width: 640px) {
  .event-desc.is-clamped {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
.event-desc-toggle {
  margin-top: 4px; padding: 4px 0; border: 0; background: none;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--app-accent); cursor: pointer;
}

/* Jemná deliaca čiara medzi hlavičkou eventu a sekciou autorov
   (rovnaká ako čiara v hornom top bare: 1px, farba borderu témy, cez celú šírku). */
.section-divider {
  height: 0; margin: 4px 0 0;   /* + 12px spodného paddingu event-head = ~16px od opisu */
  border: 0; border-top: 1px solid var(--app-border);
}

/* --- Kompaktný panel filtrov: mriežka autorov + tlačidlo „Filtre" --- */
/* Hlavička filtrov: „AUTORI" vľavo, textové „Filtre" vpravo. */
.filter-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px 8px;   /* boky 16px = zarovnané s nadpisom a mriežkou */
}
.filter-head-label {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--app-muted);
}
.filter-head-spacer { flex: 1 1 auto; }
/* „Filtre" = jednoduchý textový button s malou ikonou (žiadny štvorec/kapsula/rámik/výplň). */
.filter-open-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: none; padding: 4px 0; cursor: pointer;
  color: var(--app-text);
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.filter-open-btn .icon { width: 15px; height: 15px; color: var(--app-muted); }
.filter-open-label { display: inline; }
/* Focus ring iba pri klávesnicovej navigácii — nikdy nezostane svietiť po dotyku/myši. */
.filter-open-btn:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.filter-open-btn:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
/* Malý modrý badge s počtom dodatočných filtrov (vedľa textu). */
.filter-badge {
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--app-accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 0;
}
.filter-badge[hidden] { display: none; }

/* Autori = zalamujúca sa mriežka filter-chips (4 stĺpce × 2 riadky na mobile).
   Kompaktné boxy: avatar a meno VEDĽA seba: [av] Meno. */
.contributor-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* 3 stĺpce → väčšie meno sa zmestí na 1 riadok */
  gap: 5px;
  padding: 0 16px 6px;   /* zarovnané s nadpisom a hlavičkou (16px) */
}
/* Na malých telefónoch (≤360px) zúž boky aj vnútro chipu, nech sa „Paulina" zmestí. */
@media (max-width: 360px) {
  .contributor-filter-grid { padding: 0 10px 6px; }
}
.cfchip {
  min-width: 0;
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  gap: 4px; min-height: 34px; padding: 3px 3px 3px 6px;   /* gulička odsadená zľava, meno za ňou */
  border: 1px solid var(--app-border); border-radius: 4px;
  background: transparent; color: var(--app-muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cfchip[hidden] { display: none; }
.cfchip.is-active {
  color: var(--app-accent); border-color: var(--app-accent);
  background: var(--app-accent-soft);
}
.cfchip:focus { outline: none; }
.cfchip:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.cfchip-avatar {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  overflow: hidden; background: var(--app-surface);
  display: inline-flex; align-items: center; justify-content: center;
}
.cfchip-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* „Všetci" = malá ikona mriežky 2×2 vo farbe stavu (nie plný bod). */
.cfchip-avatar-all { background: var(--app-surface); }
.cfchip-avatar-all .icon { width: 11px; height: 11px; color: currentColor; }
.cfchip-name {
  min-width: 0; overflow: hidden;
  /* Väčšie a čitateľnejšie meno; dlhšie sa zalomí max. na 2 riadky (nie orez). */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  line-height: 1.15; letter-spacing: 0; text-align: left; color: inherit;
}
/* Menší font (10 px) — odsadeným guličkám aj menám tak sedí lepšie a zmestia sa. */
/* ≤360px: zúž vnútro chipu (musí byť ZA základným .cfchip, nech prebije padding). */
@media (max-width: 360px) {
  .cfchip { padding: 3px 3px; gap: 4px; }
}
/* Desktop: mriežka v jednom riadku (8 stĺpcov). */
@media (min-width: 641px) {
  .contributor-filter-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* --- Riadok aktívnych dodatočných filtrov (len keď je niečo vybrané) --- */
.active-filters {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; overflow-x: auto; white-space: nowrap;
  background: var(--app-bg); border-bottom: 1px solid var(--app-border);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.active-filters::-webkit-scrollbar { display: none; }
.active-filters[hidden] { display: none; }
.active-filter {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 6px 0 11px; border-radius: 999px;
  border: 1px solid var(--app-accent); background: var(--app-accent-soft);
  color: var(--app-text); cursor: pointer;
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
}
/* Počet fotiek PRED názvom v aktívnej bubline (napr. „16 iPhone ×"). */
.active-filter-count {
  font-size: 0.85em; font-weight: 700; letter-spacing: 0;
  opacity: 0.8; margin-right: 5px;
}
.active-filter .x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; font-size: 14px; line-height: 1;
  background: rgba(0, 0, 0, 0.12); color: var(--app-text);
}
.active-filter-clear {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-muted);
  padding: 0 4px; min-height: 30px;
}

/* --- Bottom sheet filtrov (mobil = odspodu; desktop = úzky modal) --- */
.fsheet-backdrop {
  position: fixed; inset: 0; z-index: 74;
  background: rgba(0, 0, 0, 0.5); animation: eg-fade 0.18s ease both;
}
.fsheet-backdrop[hidden] { display: none; }
.fsheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  margin: 0 auto; max-width: 520px;
  display: flex; flex-direction: column; max-height: 85vh;
  background: var(--app-surface); color: var(--app-text);
  border-radius: 12px 12px 0 0;
  padding-bottom: var(--safe-bottom);
  animation: eg-sheet 0.22s ease both;
}
.fsheet[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fsheet, .fsheet-backdrop { animation: none; }
}
.fsheet-grabber {
  width: 38px; height: 4px; border-radius: 999px;
  background: var(--app-border); margin: 8px auto 2px;
}
.fsheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px 10px;
}
/* Názov panelu = presne ako tlačidlo „Filtre" (ikona sliderov + rovnaký font). */
.fsheet-title {
  margin: 0; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--app-text);
}
.fsheet-title .icon { width: 15px; height: 15px; color: var(--app-muted); flex: 0 0 auto; }
/* Krížik = rovnaký krúžok ako v lightboxe (30px kruh, 15px ikona). */
.fsheet-close {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--app-border); border-radius: 50%;
  background: var(--app-surface); color: var(--app-text); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fsheet-close svg { width: 15px; height: 15px; }
.fsheet-close:active { transform: scale(0.9); }
.fsheet-close:focus { outline: none; }
.fsheet-close:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.fsheet-body { overflow-y: auto; padding: 4px 20px calc(16px + var(--safe-bottom)); }
.fsheet-section { padding: 12px 0; border-top: 1px solid var(--app-border); }
.fsheet-section:first-child { border-top: 0; }
.fsheet-section[hidden] { display: none; }
.fsheet-section-title {
  margin: 0 0 12px; font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--app-muted);
}
.fsheet-chips { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.fsheet-chips .chip { min-height: 40px; padding: 6px 0; }
.fsheet-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--app-border);
}
.fsheet-clear {
  border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-muted);
  padding: 8px 4px;
}
.fsheet-clear[hidden] { display: none; }
.fsheet-apply {
  flex: 1 1 auto; min-height: 48px; border: 0; border-radius: 8px;
  background: var(--app-accent); color: #fff; cursor: pointer;
  font-family: var(--font-ui); font-weight: 600; font-size: 14px;
  letter-spacing: 0.03em; -webkit-tap-highlight-color: transparent;
}
.fsheet-apply:active { filter: brightness(0.94); }

/* Filtre — textová podčiarknutá navigácia, zalamuje sa (žiadny horizontálny
   scroll), aby sa všetci autori/tagy zmestili a boli hneď viditeľní. */
.filter-bar {
  display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 10px;
  padding: 9px 16px;
  background: var(--app-bg);
  border-bottom: 1px solid var(--app-border);
}
/* Chipy sú vo vlastnom stĺpci — pri zalomení sa ďalší riadok zarovná pod prvý
   chip (nie pod label), rovnako vo všetkých osiach (autor / tag / typ). */
.filter-chips {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px;
}
/* `display:flex/inline-flex` prebíja UA `[hidden]{display:none}` — musíme
   rešpektovať `hidden` explicitne, inak JS skrytie lišty/chipu nezaberie. */
.filter-bar[hidden] { display: none; }
.chip[hidden] { display: none; }
/* Na profile autora nech filter-lišta (tagy/typ/udalosť) vizuálne vystúpi:
   horný aj dolný šedý predeľovač, jemne šedé pozadie a trošku viac priestoru.
   Susedné lišty nezdvojujú čiaru. */
.profile-page .filter-bar {
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
  padding-top: 12px; padding-bottom: 12px;
}
.profile-page .filter-bar + .filter-bar { border-top: 0; }
.chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  border: 0; background: transparent;
  padding: 2px 0; margin: 0;
  font-family: var(--font-ui); font-weight: 500;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--app-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer; white-space: nowrap;
}
.chip.is-active { color: var(--app-accent); border-bottom-color: var(--app-accent); }
/* Počet fotiek v chipe (Všetky / jednotlivé tagy). */
.chip-count {
  margin-left: 4px; font-size: 0.82em; font-weight: 600;
  letter-spacing: 0; opacity: 0.6;
}
.chip.is-active .chip-count { opacity: 0.85; }
/* Malý okrúhly avatar v chipe autora (naspäť na želanie). */
.chip-avatar {
  display: inline-flex; flex: 0 0 auto;
  width: 16px; height: 16px; border-radius: 50%; overflow: hidden;
  margin-right: 5px; background: var(--app-surface);
}
.chip-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Popisok osi filtra (Autor / Tag / Typ) — pevný stĺpec vľavo. */
.filter-label {
  flex: 0 0 44px; align-self: flex-start; padding-top: 4px;
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--app-muted); opacity: 0.7;
}

/* =====================================================================
 *  Galéria — edge-to-edge mriežka, prirodzené pomery, radius 0 (DESIGN §5.5)
 * ===================================================================== */
.photo-grid {
  list-style: none; margin: 6px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 8px; gap: 2px;
}
.photo-cell { grid-row-end: span 30; overflow: hidden; }
.photo-cell[hidden] { display: none; }
.photo-button {
  position: relative;
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; margin: 0;
  background: var(--app-surface);
  cursor: pointer; overflow: hidden;
}
.photo-button img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Značka videa v mriežke */
.play-badge {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: grid; place-items: center; pointer-events: none;
}
.play-badge::before {
  content: ""; display: block; margin-left: 2px;
  border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
}
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1300px) {
  .photo-grid { grid-template-columns: repeat(5, 1fr); max-width: 1600px; margin-inline: auto; }
}

.empty-state {
  padding: 40px 16px; text-align: center;
  font-family: var(--font-ui); font-size: 13px; color: var(--app-muted);
}

/* Plávajúce tlačidlo „späť hore" v dlhých galériách */
.scroll-top {
  position: fixed; z-index: 30;
  right: 16px; bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 14px);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--app-border);
  background: var(--app-surface); color: var(--app-accent);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.scroll-top[hidden] { display: none; }
.scroll-top:active { transform: scale(0.93); }

/* Toast — krátke potvrdenie (napr. „Uložené do Fotiek") nad lightboxom aj obsahom */
.eg-toast {
  position: fixed; left: 50%; z-index: 10000;
  bottom: calc(var(--safe-bottom) + 96px);
  transform: translate(-50%, 12px);
  display: inline-flex; align-items: center;
  max-width: 82vw; white-space: nowrap;
  padding: 11px 20px; border-radius: 999px;
  background: rgba(20, 24, 30, 0.96); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  font-family: var(--font-ui); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.eg-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Lišta „Ostatní autori" na konci profilu — rýchle prepnutie bez scrollu hore */
.author-switch {
  margin: 28px 0 12px; padding: 22px 16px 0;
  border-top: 1px solid var(--app-border);
}
.author-switch-title {
  margin: 0 0 12px; padding: 0 2px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--app-muted);
}
.author-switch-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.author-switch-list li[hidden] { display: none; }   /* nezaberá gap ani miesto */
.author-switch-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 1px solid var(--app-border); background: var(--app-surface);
  text-decoration: none; color: var(--app-text);
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  cursor: pointer;  /* funguje aj ako <button> (prepínač autora na evente) */
}
.author-switch-item[hidden] { display: none; }
.author-switch-item:active { background: var(--app-accent-soft); }
.author-switch-avatar {
  display: inline-flex; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
  background: var(--app-bg);
}
.author-switch-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* „Všetci" v prepínači — ikona mriežky 2×2 (rovnako ako v hornom filtri). */
.author-switch-avatar-all {
  background: var(--app-surface);
  align-items: center; justify-content: center;
}
.author-switch-avatar-all .icon { width: 15px; height: 15px; color: var(--app-muted); }

/* =====================================================================
 *  Profil autora — kompaktná, doľava zarovnaná hlavička (DESIGN §5.6)
 * ===================================================================== */
.profile-head {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px;
  align-items: center;
  padding: 16px 16px 14px;
}
.profile-avatar {
  grid-row: span 2; align-self: start;
  width: 60px; height: 60px;
  border-radius: 50%; overflow: hidden; background: var(--app-surface);
  display: grid; place-items: center;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-name {
  margin: 0; align-self: end;
  font-family: var(--font-ui); font-weight: 500; font-size: 20px; letter-spacing: -0.01em;
  color: var(--app-text);
}
.profile-meta {
  margin: 0; align-self: start;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.04em; color: var(--app-muted);
}
.profile-note {
  grid-column: 1 / -1; margin: 10px 0 0;
  font-family: var(--font-sans); font-size: 14px; line-height: 1.5; color: var(--app-text);
  max-width: 60ch;
}

/* =====================================================================
 *  Lightbox — čistý čierny fullscreen (DESIGN §6)
 * ===================================================================== */
body.no-scroll { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: var(--lightbox-bg); color: var(--lightbox-text);
  display: flex; flex-direction: column;
  animation: eg-fade 0.2s ease both;
}
.lightbox[hidden] { display: none; }
.lightbox-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 14px) 14px 0;   /* odsadené od horného okraja, nie nalepené */
}
.lb-btn {
  width: 30px; height: 30px;   /* rovnako veľké ako avatar prispievateľa dole */
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--lightbox-text);
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: background 0.18s ease, transform 0.12s ease;
}
.lb-bar-right { display: flex; align-items: center; gap: 9px; }
.lb-btn svg { width: 15px; height: 15px; stroke-width: 2; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-btn:active { transform: scale(0.9); }
/* Žiadny modrý focus-rám po ťuknutí; jemný biely len pri ovládaní klávesnicou. */
.lb-btn { -webkit-tap-highlight-color: transparent; }
.lb-btn:focus { outline: none; }
.lb-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.lightbox:focus { outline: none; }
.lightbox-stage {
  flex: 1 1 auto; min-height: 0; position: relative;
  overflow: hidden;
  touch-action: none;   /* vlastný pinch-zoom / swipe riadi JS, nie prehliadač */
}
.lightbox-video { touch-action: auto; }   /* natívne ovládanie videa nechaj tak */
/* Každá „snímka" je full-stage flex-centrovaný rám; posúva sa transformom. */
.lb-frame {
  position: absolute; inset: 0;
  padding: calc(var(--safe-top) + 48px) 0 calc(var(--safe-bottom) + 72px);
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.lb-frame[hidden] { display: none; }
.lightbox-image, .lightbox-video, .lb-peek {
  max-width: 100%; max-height: 100%; display: block;
}
.lightbox-image, .lb-peek { object-fit: contain; }
.lightbox-video { background: #000; }
.lightbox-image[hidden], .lightbox-video[hidden] { display: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: none;
}
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
@media (hover: hover) and (pointer: fine) { .lb-nav { display: grid; } }
.lightbox-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
}
.lb-cap-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-avatar {
  width: 30px; height: 30px; flex: 0 0 auto;
  border-radius: 50%; overflow: hidden; background: rgba(255,255,255,0.15);
}
.lb-avatar[hidden] { display: none; }
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-author {
  display: block;
  font-family: var(--font-ui); font-weight: 500; font-size: 13px; color: var(--lightbox-text);
}
.lb-equip {
  display: block; margin-top: 1px;
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.05em; color: var(--lightbox-muted);
}
.lb-counter {
  flex: 0 0 auto;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.06em; color: var(--lightbox-muted);
}

/* =====================================================================
 *  Download bottom sheet (DESIGN §7)
 * ===================================================================== */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, 0.5);
  animation: eg-fade 0.18s ease both;
}
.sheet-backdrop[hidden] { display: none; }
.download-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  margin: 0 auto; max-width: 520px;
  background: var(--app-surface); color: var(--app-text);
  border-radius: 12px 12px 0 0;
  padding: 8px 0 calc(10px + var(--safe-bottom));
  animation: eg-sheet 0.22s ease both;
}
.download-sheet[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .download-sheet, .sheet-backdrop, .lightbox { animation: none; }
}
.sheet-handle {
  width: 38px; height: 4px; border-radius: 999px;
  background: var(--app-border);
  margin: 8px auto 6px;
}
.sheet-title {
  margin: 0; padding: 6px 20px 10px;
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--app-muted);
}
.sheet-option {
  display: block; padding: 14px 20px; min-height: 64px;
  border-top: 1px solid var(--app-border);
  text-decoration: none; color: inherit;
}
.sheet-option[hidden] { display: none; }
.sheet-option:active { background: var(--app-accent-soft); }
.sheet-option-title {
  display: block;
  font-family: var(--font-ui); font-weight: 500; font-size: 15px; color: var(--app-text);
}
.sheet-option-desc {
  display: block; margin-top: 3px;
  font-family: var(--font-sans); font-size: 13px; color: var(--app-muted);
}
.sheet-cancel {
  display: block; width: 100%; min-height: 44px;
  margin-top: 6px; padding: 12px;
  border: 0; border-top: 1px solid var(--app-border);
  background: transparent; color: var(--app-accent);
  font-family: var(--font-ui); font-weight: 500; font-size: 14px;
  cursor: pointer;
}

/* =====================================================================
 *  Administrácia — čistý editorial vzhľad (IBM Plex, svetlý)
 * ===================================================================== */
body.admin {
  background: #f5f5f2;
  color: #1b1913;
  font-family: var(--sans);
  /* Admin je fixne SVETLÝ. Meta color-scheme je "light dark" (kvôli verejnej
     časti) — pri tmavom systéme by UA vykreslil polia s bielym písmom na
     našom bielom pozadí. Vynútená svetlá schéma pre všetky admin controls. */
  color-scheme: light;
}
body.admin main { max-width: 1000px; padding: 0 20px calc(64px + var(--safe-bottom)); }

/* Horná lišta — jazyk aplikácie: mono, ikony, aktívna položka = akcent + prúžok. */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: calc(10px + var(--safe-top)) 0 0;
  border-bottom: 1px solid var(--admin-border);
}
.admin-nav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 2px; }
.admin-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 12px 12px;
  border-bottom: 2px solid transparent;   /* rezerva pre aktívny prúžok */
  margin-bottom: -1px;                     /* prúžok sadne na čiaru hlavičky */
}
.admin-nav a .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.admin-nav a:hover { color: var(--text); }
.admin-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
}
/* „Vzhľad stránky" — jemne oddelené od obsahových položiek. */
.admin-nav-site { border-left: 1px solid var(--admin-border); margin-left: 8px; padding-left: 16px !important; }

/* Konto menu (vpravo hore) — details/summary dropdown, bez JS. */
.admin-account { position: relative; margin-bottom: 6px; }
.admin-account summary {
  list-style: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--admin-border); background: var(--card-bg);
  color: var(--text-muted);
}
.admin-account summary::-webkit-details-marker { display: none; }
.admin-account summary:hover { color: var(--text); }
.admin-account[open] summary,
.admin-account.is-active summary { color: var(--accent); border-color: var(--accent); }
.admin-account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 230px;
  background: var(--card-bg); border: 1px solid var(--admin-border);
  border-radius: 6px; box-shadow: 0 8px 28px rgba(17, 24, 39, 0.14);
  padding: 6px; display: grid;
}
.admin-account-menu a, .admin-account-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: 4px;
  background: none; color: var(--text); text-decoration: none;
  font-family: var(--sans); font-size: 0.92rem; cursor: pointer;
}
.admin-account-menu a:hover, .admin-account-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.admin-account-menu form { border-top: 1px solid var(--admin-border); margin-top: 6px; padding-top: 6px; }

/* Sprievodca prvým spustením (Prehľad) */
.admin-guide {
  margin: 16px 0 6px; padding: 14px 16px;
  background: var(--card-bg); border: 1px solid var(--admin-border); border-radius: 6px;
}
.admin-guide-steps { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 8px; }
.admin-guide-steps li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.admin-guide-check {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.78rem;
  border: 1px solid var(--admin-border); color: var(--text-muted);
}
.admin-guide-steps li.is-done { color: var(--text-muted); }
.admin-guide-steps li.is-done .admin-guide-check {
  background: #2f5a29; border-color: #2f5a29; color: #fff;
}
.admin-guide-steps a { color: var(--accent); }

.admin-page { margin-top: 26px; }
.admin-page h1 {
  font-family: var(--mono); font-weight: 500;
  font-size: 1.7rem; letter-spacing: -0.02em; margin: 0;
}
.admin-page h2 {
  font-family: var(--mono); font-weight: 500;
  font-size: 1.15rem; letter-spacing: -0.01em; margin: 0 0 4px;
}
.admin-page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 8px;
}
.admin-meta { color: #6f6a5f; margin: 6px 0 16px; }
.admin-badge {
  display: inline-block;
  background: #e7e1d4; color: #4a463d;
  border-radius: 2px; padding: 3px 12px;
  font-family: var(--mono); font-size: 0.78rem;
}

/* Tlačidlá */
.btn, .admin-actions a.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 18px;
  border: 0; border-radius: 2px;
  background: var(--btn); color: #fff;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--btn-hover); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.inline-form { display: inline; margin: 0; }
button.danger { background: #9b3f2f; }
button.danger:hover { background: #883425; }

.admin-subsection { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e2dccf; }

/* Tabuľka */
.admin-table {
  width: 100%; border-collapse: collapse; margin-top: 16px;
  background: #fff; border: 1px solid #e2dccf; border-radius: 2px; overflow: hidden;
}
.admin-table th {
  text-align: left; padding: 11px 14px;
  font-family: var(--mono); font-weight: 500; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: #8a857a;
  background: #f6f3ec; border-bottom: 1px solid #e2dccf;
}
.admin-table td {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid #eee8dc; vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td a { color: #1b1913; text-decoration: none; font-weight: 500; }
.admin-table td a:hover { text-decoration: underline; }
.admin-row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-row-actions a {
  color: var(--accent); text-decoration: none; font-size: 0.9rem; padding: 6px 8px;
}
.admin-row-actions a:hover { text-decoration: underline; }
.admin-row-actions button {
  min-height: 34px; padding: 6px 12px;
  border: 0; border-radius: 2px;
  background: #9b3f2f; color: #fff;
  font-size: 0.85rem; cursor: pointer;
}

.admin-avatar-sm {
  display: block; width: 38px; height: 38px;
  border-radius: 50%; overflow: hidden; background: #e7e1d4;
}
.admin-avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Formuláre */
.admin-form { display: grid; gap: 5px; max-width: 560px; margin-top: 16px; }
.admin-form label {
  font-family: var(--mono); font-weight: 500; font-size: 0.82rem;
  color: #4a463d; margin-top: 10px;
}
.admin-form input, .admin-form textarea, .admin-form select {
  padding: 11px 13px;
  border: 1px solid #d8d1c5; border-radius: 2px;
  font-size: 1rem; font-family: var(--sans); width: 100%;
  background: #fff; color: #1b1913;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.admin-form-row { display: flex; gap: 12px; }
.admin-form-row > div { flex: 1; }
.admin-checkbox { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.92rem; }
.admin-checkbox input { width: auto; }
.admin-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.admin-form-actions a { color: #6f6a5f; }
.admin-hint, .admin-note { color: #6f6a5f; font-size: 0.88rem; }

/* Avatar pole vo formulári */
.avatar-field { display: flex; gap: 16px; align-items: flex-start; margin: 2px 0 4px; }
.avatar-preview {
  flex: 0 0 auto; width: 84px; height: 84px;
  border-radius: 50%; overflow: hidden; background: #e7e1d4;
  display: grid; place-items: center;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-empty { color: #a9a294; font-size: 1.4rem; }
.intro-preview {
  flex: 0 0 auto; width: 170px; height: 108px;
  border-radius: 2px; overflow: hidden; background: #e7e1d4;
  border: 1px solid #d8d1c5; display: grid; place-items: center;
}
.intro-preview img, .intro-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-field-body { flex: 1; min-width: 0; }
.avatar-field-body input[type="file"] { font-size: 0.9rem; }

/* Kruhový cropper */
.cropper { margin: 12px 0 4px; max-width: 300px; }
.cropper[hidden] { display: none; }
.cropper-view {
  position: relative;
  width: 240px; height: 240px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 0 0 1px #d8d1c5;
}
.cropper-view:active { cursor: grabbing; }
.cropper-view img {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
  max-width: none;
}
.cropper-zoom {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 0; max-width: 240px;
  font-family: var(--mono); font-size: 0.78rem; color: #4a463d;
}
.cropper-zoom input { flex: 1; }
.cropper-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.cropper-actions #cropperCancel {
  border: 0; background: none; color: #6f6a5f;
  font-family: var(--sans); font-size: 0.9rem; cursor: pointer;
}

/* Mriežka fotiek */
.admin-photo-grid {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
  align-items: start;  /* karty sa neťahajú na výšku najvyššej v riadku */
}
.admin-photo { background: #fff; border-radius: 2px; overflow: hidden; border: 1px solid #e2dccf; }
.admin-photo.is-cover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.admin-photo.is-hidden { opacity: 0.5; }
/* Náhľad = celá fotka v skutočných proporciách (na výšku/šírku), bez orezu. */
.admin-photo-thumb { position: relative; background: #e7e1d4; }
.admin-photo-thumb img { width: 100%; height: auto; display: block; }
.admin-photo-noimg {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; color: #8a857a; font-size: 0.82rem;
}
.admin-photo-tag {
  position: absolute; top: 6px; left: 6px;
  background: var(--btn); color: #fff;
  font-family: var(--mono); font-size: 0.66rem; padding: 2px 7px; border-radius: 2px;
}
.admin-photo-tag.hidden-tag { left: auto; right: 6px; background: #9b3f2f; }
.admin-photo-info { padding: 7px 9px; font-size: 0.8rem; color: #6f6a5f; }
.admin-photo-info a { color: #6f6a5f; }
.admin-photo-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 9px 9px; }
.admin-photo-actions button {
  min-height: 32px; padding: 5px 9px;
  border: 0; border-radius: 2px;
  background: #ece7dc; color: #1b1913;
  font-size: 0.78rem; cursor: pointer;
}
.admin-photo-actions button.danger { background: #9b3f2f; color: #fff; }

/* Zaškrtávadlo v rohu náhľadu (hromadný výber) */
.admin-photo-check {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  width: 26px; height: 26px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid #d7d0c1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.admin-photo-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.admin-photo:has(.admin-photo-check input:checked) {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent);
}
.admin-photo-author {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem;
  color: #1b1913; background: #ece7dc; padding: 1px 7px; border-radius: 2px; margin-right: 6px;
}
.admin-photo-tags { display: block; margin-top: 4px; }
.admin-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.66rem;
  color: #274b7a; background: #e6ecf5; padding: 1px 6px; border-radius: 2px;
  margin: 0 4px 3px 0;
}

/* Lišta hromadného presunu autora */
.reassign-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 16px 0 0; padding: 10px 12px;
  background: #fff; border: 1px solid #e2dccf; border-radius: 2px;
  font-size: 0.82rem;
}
.reassign-bar .reassign-all { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.reassign-bar .reassign-all input { width: 16px; height: 16px; accent-color: var(--accent); }
.reassign-count { color: #6f6a5f; font-family: var(--mono); font-size: 0.76rem; }
.reassign-hint { color: #8a8578; font-size: 0.72rem; }
.reassign-hint kbd {
  font-family: var(--mono); font-size: 0.72em;
  padding: 1px 5px; border: 1px solid #d7d0c1; border-radius: 3px;
  background: #f4f1e9; color: #4a463c;
}
.reassign-spacer { flex: 1 1 auto; }
.reassign-bar select {
  min-height: 34px; padding: 4px 8px; border: 1px solid #d7d0c1;
  border-radius: 2px; background: #fbf9f4; font-size: 0.82rem;
}
.reassign-bar .btn { padding: 7px 14px; }
.reassign-bar button:not(.btn) {
  min-height: 34px; padding: 6px 12px;
  border: 1px solid #d7d0c1; border-radius: 2px; background: #fff;
  font-size: 0.82rem; cursor: pointer; color: #1b1913;
}
.reassign-bar button.danger { border-color: #9b3f2f; color: #9b3f2f; background: #fff; }
/* Rýchly výber podľa autora / typu / techniky — jemne odlíšený od hlavnej lišty. */
.admin-quickselect {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 8px 0 0; padding: 10px 12px;
  background: #f4f1e9; border: 1px solid #e2dccf; border-radius: 2px;
  font-size: 0.82rem;
}
.admin-quickselect .qs-label { font-weight: 600; color: #4a463c; }
.admin-quickselect label { display: inline-flex; align-items: center; gap: 6px; color: #6f6a5f; }
.admin-quickselect select {
  min-height: 34px; padding: 4px 8px; border: 1px solid #d7d0c1;
  border-radius: 2px; background: #fff; font-size: 0.82rem;
}
.admin-quickselect .btn { padding: 7px 14px; }
.admin-quickselect button:not(.btn) {
  min-height: 34px; padding: 6px 12px;
  border: 1px solid #d7d0c1; border-radius: 2px; background: #fff;
  font-size: 0.82rem; cursor: pointer; color: #1b1913;
}
.admin-quickselect .qs-count { color: #6f6a5f; font-family: var(--mono); font-size: 0.76rem; }

.admin-sort { font-size: 0.85rem; color: #6f6a5f; margin: 6px 0 12px; }
.admin-sort a { color: #6f6a5f; text-decoration: none; }
.admin-sort a.is-active { color: #1b1913; font-weight: 600; text-decoration: underline; }
.admin-subhead {
  font-family: var(--mono); font-weight: 500; font-size: 1.05rem;
  margin: 26px 0 4px; padding-top: 18px; border-top: 1px solid #e2dccf;
}

/* Priebeh nahrávania */
.upload-progress {
  margin-top: 18px; padding: 16px;
  background: #fff; border: 1px solid #e2dccf; border-radius: 2px;
}
.upload-progress[hidden] { display: none; }
.up-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.up-title { font-family: var(--mono); font-weight: 500; }
.up-count { font-family: var(--mono); font-weight: 600; font-size: 1.05rem; color: #1b1913; }
.up-bar-track {
  height: 10px; margin: 12px 0 8px;
  background: #ece7dc; border-radius: 2px; overflow: hidden;
}
.up-bar { height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width 0.2s ease; }
.up-status { margin: 0; color: #6f6a5f; font-size: 0.85rem; }
.up-statusrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.up-stop {
  flex: 0 0 auto; min-height: 32px; padding: 5px 12px;
  border: 1px solid #d7d0c1; border-radius: 7px; background: #fff;
  color: #9b3f2f; font-size: 0.8rem; cursor: pointer;
}
.up-stop[hidden] { display: none; }
.up-stop:disabled { opacity: 0.5; cursor: default; }
.up-errors { margin: 10px 0 0; padding-left: 18px; color: #9b3f2f; font-size: 0.82rem; }
.up-errors:empty { display: none; }
.upload-progress .btn { margin-top: 12px; }

/* Živé náhľady nahrávaných fotiek */
.up-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px; margin: 12px 0 0;
}
.up-thumbs:empty { display: none; }
.up-thumb {
  position: relative; aspect-ratio: 1 / 1; border-radius: 2px; overflow: hidden;
  background: #ece7dc; opacity: 0.4; transition: opacity 0.25s ease, box-shadow 0.2s ease;
}
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-thumb.is-active { opacity: 0.8; box-shadow: 0 0 0 2px var(--accent); }
.up-thumb.is-done { opacity: 1; }
.up-thumb.is-error { opacity: 1; box-shadow: 0 0 0 2px #9b3f2f; }
.up-thumb .tick {
  position: absolute; right: 4px; bottom: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--btn); color: #fff;
  font-size: 12px; line-height: 18px; text-align: center;
  opacity: 0; transition: opacity 0.2s ease;
}
.up-thumb.is-done .tick, .up-thumb.is-error .tick { opacity: 1; }
.up-thumb .tick.err { background: #9b3f2f; }

/* Prihlásenie */
.admin-login { max-width: 360px; margin: 12vh auto 0; }
.admin-login h1 {
  font-family: var(--mono); font-weight: 500; font-size: 1.6rem;
  letter-spacing: -0.02em; margin: 0 0 16px;
}
.admin-login form { display: grid; gap: 10px; }
.admin-login label { font-family: var(--mono); font-size: 0.82rem; color: #4a463d; }
.admin-login input {
  padding: 11px 13px; border: 1px solid #d8d1c5; border-radius: 2px;
  font-size: 1rem; font-family: var(--sans); background: #fff;
  color: #1b1913; caret-color: #1b1913;
}
.admin-login button {
  min-height: 46px; margin-top: 4px; border: 0; border-radius: 2px;
  background: var(--btn); color: #fff; font-family: var(--sans);
  font-size: 1rem; font-weight: 500; cursor: pointer;
}
.admin-login button:hover { background: var(--btn-hover); }

/* Prehľad — štatistiky */
.admin-stats {
  display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0;
  list-style: none; padding: 0;
}
.admin-stats > div {
  flex: 1; min-width: 130px;
  background: #fff; border: 1px solid #e2dccf; border-radius: 2px; padding: 16px 18px;
}
.admin-stats dt {
  color: #6f6a5f; font-family: var(--mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.admin-stats dd { margin: 6px 0 0; font-family: var(--mono); font-size: 1.8rem; font-weight: 500; }

/* --- Admin v2: prehľad, nastavenia, tagy, údržba --- */
.admin-health { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 10px 0 22px; }
.admin-health > div { background: var(--card-bg); border: 1px solid #e3ded2; border-radius: var(--radius); padding: 10px 14px; }
.admin-health dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.admin-health dd { margin: 4px 0 0; font-family: var(--mono); font-size: 0.95rem; }
.admin-attention { margin: 8px 0 20px; padding-left: 18px; }
.admin-attention li { margin: 4px 0; }
.admin-inline-form { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.admin-inline-form input[type="text"], .admin-inline-form select { padding: 5px 8px; }
.admin-danger-zone { border-top: 2px solid #9b3f2f; margin-top: 26px; padding-top: 12px; }
.admin-danger-zone h2 { color: #9b3f2f; }
.admin-file-list { font-family: var(--mono); font-size: 0.82rem; padding-left: 18px; }
.admin-file-list li { margin: 3px 0; overflow-wrap: anywhere; }
.admin-warn { color: #9b3f2f; cursor: help; }
.admin-remember { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 0.9rem; }
/* Náhľad loga v admine — tmavý podklad (biele časti loga inak nevidno). */
.intro-preview--logo { background: #0b0f14; }
.intro-preview--logo img { object-fit: contain; padding: 6px; }
.btn-danger, .admin-page button.btn-danger { background: #fff; border: 1px solid #9b3f2f; color: #9b3f2f; border-radius: var(--radius); padding: 5px 10px; cursor: pointer; }
.btn-danger:hover { background: #9b3f2f; color: #fff; }

/* --- Admin: mobil (spodná tab lišta ako vo verejnej appke) --- */
.admin-tabbar { display: none; }
.only-mobile { display: none !important; }

@media (max-width: 820px) {
  .admin-header { display: none; }              /* horné menu len na desktope */
  .only-mobile { display: block !important; }   /* Vzhľad stránky v konto menu */
  body.admin main {
    padding-bottom: calc(64px + var(--safe-bottom) + 16px);
  }
  .admin-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--card-bg);
    border-top: 1px solid var(--admin-border);
    padding-bottom: max(2px, calc(var(--safe-bottom) * 0.25));
  }
  .admin-tabbar > a, .admin-tabbar .admin-account--up summary {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 3px; min-height: 56px; padding: 8px 0 7px;
    color: var(--text-muted); text-decoration: none;
    border: 0; background: none; width: auto; height: auto; border-radius: 0;
  }
  /* Položky KONTO menu vnútri lišty = normálne riadky (nie tab itemy). */
  .admin-tabbar .admin-account-menu a,
  .admin-tabbar .admin-account-menu button {
    display: block; width: 100%; min-height: 0; text-align: left;
    padding: 11px 12px; color: var(--text);
  }
  .admin-tabbar .icon { width: 21px; height: 21px; }
  .admin-tab-label {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
  }
  .admin-tabbar a.is-active,
  .admin-tabbar .admin-account--up.is-active summary,
  .admin-tabbar .admin-account--up[open] summary {
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 2px 0 var(--accent);
  }
  /* Konto menu sa na mobile otvára NAHOR nad lištou */
  .admin-account--up { position: relative; margin: 0; }
  .admin-account--up .admin-account-menu {
    top: auto; bottom: calc(100% + 10px); right: 6px;
  }

  /* Tabuľky → karty (žiadny horizontálny scroll) */
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
  .admin-table thead { display: none; }
  .admin-table { border: 0; background: none; }
  .admin-table tr {
    background: var(--card-bg); border: 1px solid var(--admin-border);
    border-radius: 6px; margin-bottom: 10px; padding: 4px 0;
  }
  .admin-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-bottom: 0; padding: 7px 14px;
  }
  .admin-table td[data-label]::before {
    content: attr(data-label);
    font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
    flex: 0 0 auto;
  }
  .admin-table td.admin-row-actions { justify-content: flex-end; flex-wrap: wrap; }

  /* Bulk lišta a inline formy — ovládanie na plnú šírku */
  .reassign-bar select, .reassign-bar input[type="text"] { flex: 1 1 140px; min-width: 0; }
  .admin-inline-form { width: 100%; }
  .admin-inline-form select, .admin-inline-form input[type="text"] { flex: 1 1 auto; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
