/* ================================================================
   style.css — Turistický klub
   Témata: light | dark | auto (systémová preference)
   Responzivní: 375px → 768px → 1024px → 1280px+
   ================================================================ */

/* ── 1. TOKENY — světlé téma (výchozí) ──────────────────────────── */
:root {
  --brand-300: #7db85a;
  --brand-500: #4a7c30;
  --brand-700: #2d4a22;
  --brand-900: #16240f;

  --bg-base:     #faf9f6;
  --bg-surface:  #ffffff;
  --bg-raised:   #f4f2ee;
  --bg-overlay:  rgba(0,0,0,.04);

  --text-primary:   #1c1b18;
  --text-secondary: #4a4840;
  --text-muted:     #7a7870;
  --text-brand:     #4a7c30;
  --text-link:      #3a6825;

  --border-subtle:  rgba(0,0,0,.07);
  --border-default: rgba(0,0,0,.13);
  --border-strong:  rgba(0,0,0,.22);
  --border-brand:   rgba(93,139,63,.4);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.14);

  --header-bg: #ffffff;
  --tile-overlay: linear-gradient(160deg, transparent 35%, rgba(0,0,0,.52) 100%);
  --tile-text: #ffffff;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'Menlo', 'Consolas', monospace;

  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  20px;

  --gap-xs:  4px;
  --gap-sm:  8px;
  --gap-md:  16px;
  --gap-lg:  28px;
  --gap-xl:  48px;

  --ease: cubic-bezier(.25,.46,.45,.94);
  --dur-f: 140ms;
  --dur-m: 220ms;
}

/* ── 2. TMAVÉ TÉMA ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:     #141a12;
  --bg-surface:  #1e2a1a;
  --bg-raised:   #263320;
  --bg-overlay:  rgba(255,255,255,.05);

  --text-primary:   #edeae2;
  --text-secondary: #b8b4aa;
  --text-muted:     #7a7870;
  --text-brand:     #7db85a;
  --text-link:      #9fcf78;

  --border-subtle:  rgba(255,255,255,.06);
  --border-default: rgba(255,255,255,.12);
  --border-strong:  rgba(255,255,255,.22);
  --border-brand:   rgba(93,139,63,.45);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 4px 12px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.58);

  --header-bg: #1a2416;
  --tile-overlay: linear-gradient(160deg, transparent 20%, rgba(0,0,0,.72) 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg-base:     #141a12;
    --bg-surface:  #1e2a1a;
    --bg-raised:   #263320;
    --bg-overlay:  rgba(255,255,255,.05);
    --text-primary:   #edeae2;
    --text-secondary: #b8b4aa;
    --text-muted:     #7a7870;
    --text-brand:     #7db85a;
    --text-link:      #9fcf78;
    --border-subtle:  rgba(255,255,255,.06);
    --border-default: rgba(255,255,255,.12);
    --border-strong:  rgba(255,255,255,.22);
    --border-brand:   rgba(93,139,63,.45);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
    --shadow-md: 0 4px 12px rgba(0,0,0,.45);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.58);
    --header-bg: #1a2416;
    --tile-overlay: linear-gradient(160deg, transparent 20%, rgba(0,0,0,.72) 100%);
  }
}

/* ── 3. RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body  {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── 4. WRAPPER ─────────────────────────────────────────────────── */
.site-wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gap-md); }
@media (min-width: 768px)  { .site-wrap { padding-inline: 28px; } }
@media (min-width: 1024px) { .site-wrap { padding-inline: 44px; } }

/* ── 5. HEADER ──────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  display: flex; align-items: center; gap: var(--gap-sm); height: 58px;
}
@media (min-width: 768px) { .header-inner { height: 66px; gap: var(--gap-md); } }

.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px;
  background: var(--brand-500);
  clip-path: polygon(50% 0%,100% 38%,82% 100%,18% 100%,0% 38%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; flex-shrink: 0;
  transition: background var(--dur-f);
}
@media (min-width: 480px) { .logo-mark { width: 38px; height: 38px; } }
.logo-wrap:hover .logo-mark { background: var(--brand-700); }
.logo-text { display: none; }
@media (min-width: 460px) { .logo-text { display: block; } }
.club-name { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.club-sub  { font-size: 10px; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; }

.main-nav { display: flex; gap: 2px; margin-left: auto; }
.main-nav a {
  padding: 5px 9px; color: var(--text-secondary); font-size: 13px;
  border-radius: var(--r-md);
  transition: background var(--dur-f), color var(--dur-f);
  white-space: nowrap;
}
.main-nav a:hover    { background: var(--bg-overlay); color: var(--text-primary); text-decoration: none; }
.main-nav a.active   { color: var(--text-brand); }
.main-nav .nav-admin { color: var(--text-brand); border: 1px solid var(--border-brand); }
@media (max-width: 479px) { .main-nav a { padding: 5px 7px; font-size: 12px; } }

.header-right { display: flex; align-items: center; gap: var(--gap-sm); flex-shrink: 0; }
.auth-name { font-size: 12px; color: var(--text-muted); display: none; }
@media (min-width: 640px) { .auth-name { display: block; } }

.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border: 1px solid var(--border-default);
  border-radius: var(--r-md); background: var(--bg-surface);
  color: var(--text-secondary); font-size: 12px;
  transition: background var(--dur-f), border-color var(--dur-f);
}
.btn-sm:hover { background: var(--bg-raised); border-color: var(--border-strong); color: var(--text-primary); text-decoration: none; }

/* ── 6. PŘEPÍNAČ TÉMAT ──────────────────────────────────────────── */
.theme-switcher {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 3px;
}
.theme-btn {
  width: 28px; height: 24px; border: none; background: transparent;
  border-radius: var(--r-md); color: var(--text-muted); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-f), color var(--dur-f);
}
.theme-btn:hover { background: var(--bg-overlay); color: var(--text-primary); }
.theme-btn.active { background: var(--bg-surface); color: var(--text-brand); box-shadow: var(--shadow-sm); }

/* ── 7. FLASH ───────────────────────────────────────────────────── */
.flash {
  padding: 11px 16px; border-radius: var(--r-md); font-size: 14px;
  margin-bottom: var(--gap-md);
}
.flash-ok      { background: #eef6e6; border-left: 3px solid var(--brand-300); color: #2d5a18; }
.flash-error   { background: #fdecea; border-left: 3px solid #d93025; color: #7a1c14; }
.flash-warning { background: #fef8e0; border-left: 3px solid #f0a500; color: #6b4a00; }
[data-theme="dark"] .flash-ok      { background: rgba(45,74,34,.5); color: #9fcf78; }
[data-theme="dark"] .flash-error   { background: rgba(100,20,20,.4); color: #f08080; }
[data-theme="dark"] .flash-warning { background: rgba(80,60,0,.4); color: #d4a030; }

/* ── 8. MAIN & FOOTER ───────────────────────────────────────────── */
.site-main { flex: 1; padding-block: var(--gap-lg); }
.site-footer {
  border-top: 1px solid var(--border-subtle);
  font-size: 12px; color: var(--text-muted);
  padding-block: 14px;
}
.footer-inner { display: flex; align-items: center; gap: var(--gap-md); flex-wrap: wrap; }
.db-badge {
  background: var(--bg-raised); border: 1px solid var(--border-subtle);
  padding: 1px 7px; border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
}

/* ── 9. METRO GRID ──────────────────────────────────────────────── */
.stats-row { display: flex; gap: var(--gap-sm); margin-bottom: var(--gap-lg); flex-wrap: wrap; }
.stat-pill {
  background: var(--bg-raised); border: 1px solid var(--border-subtle);
  border-radius: 20px; padding: 4px 14px; font-size: 12px; color: var(--text-muted);
}
.decade-block  { margin-bottom: 40px; }
.decade-label  {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.decade-label::after { content: ''; flex: 1; height: 1px; background: var(--border-subtle); }

.metro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 5px;
}
@media (min-width: 480px)  { .metro-grid { grid-template-columns: repeat(auto-fill, minmax(148px,1fr)); } }
@media (min-width: 768px)  { .metro-grid { grid-template-columns: repeat(auto-fill, minmax(168px,1fr)); } }
@media (min-width: 1024px) { .metro-grid { grid-template-columns: repeat(auto-fill, minmax(185px,1fr)); gap: 6px; } }

.year-tile {
  aspect-ratio: 1; position: relative; border-radius: var(--r-sm); overflow: hidden;
  background: var(--bg-raised);
  background-image: var(--tile-bg, none); background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; color: var(--tile-text);
  transition: transform var(--dur-m) var(--ease), box-shadow var(--dur-m) var(--ease);
}
.year-tile::before {
  content: ''; position: absolute; inset: 0;
  background: var(--tile-overlay); z-index: 1;
}
.year-tile:hover { transform: scale(1.035) translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; z-index: 2; }
/* Barevné varianty pro dlaždice bez fotky */
.year-tile:not([style*="--tile-bg"]):nth-child(5n+1) { background: #2d4a22; }
.year-tile:not([style*="--tile-bg"]):nth-child(5n+2) { background: #2e3d5a; }
.year-tile:not([style*="--tile-bg"]):nth-child(5n+3) { background: #4a3820; }
.year-tile:not([style*="--tile-bg"]):nth-child(5n+4) { background: #3a2e4a; }
.year-tile:not([style*="--tile-bg"]):nth-child(5n+5) { background: #2a3e3a; }
.year-tile.tile-draft { opacity: .55; }

.tile-content { position: relative; z-index: 2; padding: 10px; }
.tile-year    { font-size: clamp(20px, 2.5vw, 28px); font-weight: 800; line-height: 1; display: block; }
.tile-desc    { font-size: 10px; opacity: .85; display: block; margin-top: 3px; line-height: 1.3; }
.tile-photos  {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 9px; background: rgba(0,0,0,.52); backdrop-filter: blur(4px);
  padding: 2px 7px; border-radius: 20px;
}
.tile-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 9px; padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.tile-new         { background: var(--brand-500); color: #fff; }
.tile-draft-badge { background: rgba(100,80,0,.8); color: #ffe090; }

/* ── 10. YEAR DETAIL ────────────────────────────────────────────── */
.year-detail { max-width: 1000px; }
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-muted); margin-bottom: var(--gap-lg);
  transition: color var(--dur-f);
}
.back-link:hover { color: var(--text-brand); text-decoration: none; }

.year-header-inner { display: flex; align-items: flex-start; gap: var(--gap-md); margin-bottom: var(--gap-lg); }
.year-num  { font-size: clamp(44px, 8vw, 80px); font-weight: 800; line-height: 1; color: var(--text-brand); flex-shrink: 0; }
.year-meta h1 { font-size: clamp(17px, 3vw, 26px); margin-bottom: 6px; }
.year-counts  { font-size: 13px; color: var(--text-muted); }

.year-article {
  font-size: 15px; line-height: 1.78; color: var(--text-secondary);
  max-width: 680px; margin-bottom: var(--gap-xl);
}
.year-article h2, .year-article h3 { color: var(--text-primary); margin: 1.4em 0 .5em; }
.year-article p   { margin-bottom: .85em; }
.year-article img { border-radius: var(--r-md); margin: var(--gap-md) 0; }

.media-section-head {
  display: flex; align-items: center; gap: var(--gap-sm); margin-bottom: var(--gap-md);
}
.media-section-head h2 {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 500;
}
.media-count {
  background: var(--bg-raised); border-radius: 20px;
  padding: 1px 8px; font-size: 11px; color: var(--text-muted);
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 3px;
}
@media (min-width: 480px) { .photo-grid { grid-template-columns: repeat(auto-fill, minmax(128px,1fr)); gap: 4px; } }
@media (min-width: 768px) { .photo-grid { grid-template-columns: repeat(auto-fill, minmax(148px,1fr)); } }

.photo-grid .media-link {
  display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--r-sm); background: var(--bg-raised); position: relative;
}
.photo-grid .media-link img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-m) var(--ease);
}
.photo-grid .media-link:hover img { transform: scale(1.07); }

/* Badge zobrazení na fotce */
.photo-views-badge {
  position: absolute; bottom: 5px; right: 5px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  color: rgba(255,255,255,.85); font-size: 9px;
  padding: 1px 5px; border-radius: 20px;
  opacity: 0; transition: opacity var(--dur-f);
  pointer-events: none; display: flex; align-items: center; gap: 3px;
}
.photo-grid .media-link:hover .photo-views-badge { opacity: 1; }

/* Video grid */
.video-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap-md); }
@media (min-width: 600px)  { .video-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .video-grid { grid-template-columns: repeat(3,1fr); } }
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--r-md); overflow: hidden; background: var(--bg-raised); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.media-video { width: 100%; border-radius: var(--r-md); }
.media-caption { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ── 11. KOMENTÁŘE ──────────────────────────────────────────────── */
.comments-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--gap-lg); max-width: 680px;
}
.comments-section > h2 {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--gap-md);
}
.comment {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand-300);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 12px 16px; margin-bottom: 10px;
}
.comment-hidden { opacity: .5; border-left-color: var(--text-muted); }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; flex-wrap: wrap; }
.comment-header strong { color: var(--text-brand); }
.comment-header time   { color: var(--text-muted); font-size: 11px; }
.badge-hidden { background: var(--bg-raised); font-size: 10px; padding: 1px 6px; border-radius: 20px; color: var(--text-muted); }
.comment-body { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.no-comments, .comment-note { font-size: 13px; color: var(--text-muted); font-style: italic; }

.comment-form { margin-top: var(--gap-lg); }
.comment-form label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.comment-form textarea {
  width: 100%; background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--r-md); color: var(--text-primary); padding: 10px 12px;
  font-size: 14px; resize: vertical;
  transition: border-color var(--dur-f), box-shadow var(--dur-f);
}
.comment-form textarea:focus { outline: none; border-color: var(--brand-300); box-shadow: 0 0 0 3px rgba(93,139,63,.15); }
.comment-form button {
  margin-top: 10px; padding: 9px 22px;
  background: var(--brand-500); border: none; border-radius: var(--r-md);
  color: #fff; font-size: 14px; font-weight: 500;
  transition: background var(--dur-f), transform var(--dur-f);
}
.comment-form button:hover  { background: var(--brand-700); }
.comment-form button:active { transform: scale(.98); }

/* ── 12. AUTH & FORMULÁŘE ───────────────────────────────────────── */
.auth-box {
  max-width: 400px; margin: 40px auto;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: clamp(24px,5vw,40px) clamp(20px,5vw,36px);
  box-shadow: var(--shadow-md);
}
.auth-box h1 { font-size: 20px; margin-bottom: 24px; }

.admin-form label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.admin-form label input:not([type="checkbox"]):not([type="file"]):not([type="range"]),
.admin-form label textarea,
.admin-form label select {
  display: block; width: 100%; margin-top: 5px;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--r-md); color: var(--text-primary); padding: 9px 12px; font-size: 14px;
  transition: border-color var(--dur-f), box-shadow var(--dur-f);
}
.admin-form label input:focus, .admin-form label textarea:focus {
  outline: none; border-color: var(--brand-300); box-shadow: 0 0 0 3px rgba(93,139,63,.15);
}
.admin-form input[type="file"]     { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.admin-form input[type="checkbox"] { width: auto; display: inline; margin-left: 8px; accent-color: var(--brand-500); }
.form-row { display: flex; gap: var(--gap-md); flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 180px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.btn-primary {
  padding: 9px 22px; background: var(--brand-500); border: none;
  border-radius: var(--r-md); color: #fff; font-size: 14px; font-weight: 500;
  transition: background var(--dur-f), transform var(--dur-f);
}
.btn-primary:hover  { background: var(--brand-700); }
.btn-primary:active { transform: scale(.98); }

.btn-outline {
  padding: 8px 18px; border: 1px solid var(--border-brand);
  border-radius: var(--r-md); background: transparent;
  color: var(--text-brand); font-size: 14px;
  transition: background var(--dur-f);
}
.btn-outline:hover { background: var(--bg-raised); text-decoration: none; }

details {
  border: 1px solid var(--border-subtle); border-radius: var(--r-md);
  padding: 12px 16px; margin-bottom: 12px; background: var(--bg-surface);
}
details summary { cursor: pointer; font-size: 13px; color: var(--text-muted); user-select: none; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { color: var(--text-primary); margin-bottom: 14px; }

/* ── 13. ADMIN ──────────────────────────────────────────────────── */
.admin-wrap { max-width: 1000px; }
.admin-h1   { font-size: 22px; margin-bottom: var(--gap-lg); }

.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px,1fr));
  gap: var(--gap-sm); margin-top: var(--gap-md);
}
@media (min-width: 600px) { .admin-media-grid { grid-template-columns: repeat(auto-fill, minmax(138px,1fr)); } }

.media-card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md); overflow: hidden;
  transition: box-shadow var(--dur-f);
}
.media-card:hover { box-shadow: var(--shadow-md); }
.media-card.media-cover { border-color: var(--brand-300); }
.media-thumb {
  aspect-ratio: 1; background: var(--bg-raised);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-icon { font-size: 24px; color: var(--text-muted); }
.cover-badge { position: absolute; top: 4px; left: 4px; background: var(--brand-500); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 20px; }
.media-views-pill { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,.55); color: rgba(255,255,255,.85); font-size: 9px; padding: 1px 5px; border-radius: 20px; }
.media-card-meta { padding: 6px 8px; }
.media-type { font-size: 10px; color: var(--text-muted); display: block; }
.media-cap  { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.media-card-actions { padding: 4px 8px 8px; display: flex; gap: 4px; flex-wrap: wrap; }

.btn-xs {
  padding: 3px 9px; font-size: 11px;
  border: 1px solid var(--border-default); border-radius: var(--r-sm);
  background: transparent; color: var(--text-muted);
  transition: background var(--dur-f), color var(--dur-f);
}
.btn-xs:hover      { background: var(--bg-raised); color: var(--text-primary); }
.btn-xs.btn-ok     { border-color: rgba(93,139,63,.4); color: var(--text-brand); }
.btn-xs.btn-danger { border-color: rgba(200,50,50,.35); color: #c84040; }
.btn-xs.btn-danger:hover { background: rgba(200,50,50,.08); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted); font-weight: 500; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; color: var(--text-secondary); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-overlay); }
.row-pending td { color: var(--text-muted); }

.badge-role   { padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.role-admin   { background: rgba(93,139,63,.15); color: var(--text-brand); }
.role-member  { background: var(--bg-raised); color: var(--text-muted); }
.badge-ok     { background: rgba(93,139,63,.15); color: var(--text-brand); font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.badge-pending{ background: rgba(200,150,0,.13); color: #a07000; font-size: 11px; padding: 2px 8px; border-radius: 20px; }
[data-theme="dark"] .badge-pending { color: #d4a030; }
.no-media { font-size: 13px; color: var(--text-muted); font-style: italic; margin-top: 12px; }

/* Admin dashboard */
.dash-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--gap-lg); }
.dash-stat {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 14px 20px; min-width: 90px; flex: 1;
}
.dash-stat-warn { border-color: rgba(200,150,0,.4); }
.dash-num { font-size: 26px; font-weight: 700; color: var(--text-brand); line-height: 1; }
.dash-lbl { font-size: 10px; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.dash-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap-md); margin-bottom: var(--gap-md); }
@media (min-width: 768px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.dash-panel { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: var(--gap-md); }
.dash-panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.dash-panel-head h2 { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); flex: 1; }
.dash-info { font-size: 12px; color: var(--text-muted); padding: 10px 0; border-top: 1px solid var(--border-subtle); }

/* EasyMDE dark mode */
.EasyMDEContainer .CodeMirror { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-default); border-radius: var(--r-md); }
.editor-toolbar { background: var(--bg-raised); border: 1px solid var(--border-default); border-bottom: none; border-radius: var(--r-md) var(--r-md) 0 0; }
.editor-toolbar button { color: var(--text-secondary) !important; }
.editor-toolbar button:hover, .editor-toolbar button.active { background: var(--bg-overlay) !important; border-color: var(--border-default) !important; }
.editor-preview { background: var(--bg-surface); color: var(--text-primary); }

/* ── 14. GALERIE ────────────────────────────────────────────────── */
.gallery-toolbar { display: flex; align-items: center; gap: var(--gap-md); flex-wrap: wrap; margin-bottom: var(--gap-md); }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-filter {
  padding: 5px 13px; border: 1px solid var(--border-default);
  border-radius: 20px; background: transparent; color: var(--text-muted); font-size: 12px;
  transition: background var(--dur-f), color var(--dur-f), border-color var(--dur-f);
}
.btn-filter:hover, .btn-filter.active { background: var(--bg-raised); color: var(--text-primary); border-color: var(--border-strong); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 3px; }
@media (min-width: 480px) { .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(118px,1fr)); } }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(138px,1fr)); gap: 4px; } }

.gallery-item { aspect-ratio: 1; display: block; position: relative; overflow: hidden; border-radius: var(--r-sm); background: var(--bg-raised); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-m) var(--ease); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-year { position: absolute; bottom: 4px; left: 5px; font-size: 9px; color: rgba(255,255,255,.8); font-weight: 600; letter-spacing: .04em; text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none; }

/* ── 15. LIGHTBOX ───────────────────────────────────────────────── */
/* ── LIGHTBOX ────────────────────────────────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.93);
  display: none; align-items: center; justify-content: center;
  padding: 60px 60px 16px;   /* prostor pro šipky L/R a horní lištu */
}
#lightbox.open { display: flex; }

#lb-bg { position: absolute; inset: 0; z-index: 0; }

#lb-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; height: 100%; max-width: 1400px;
}

/* Obal obrázku — v normálním módu ořízne, v zoom módu scrolluje */
#lb-img-wrap {
  flex: 1;
  width: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-radius: var(--r-md);
}

/* Normální mód: přizpůsobit oknu */
#lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  cursor: zoom-in;
  transition: opacity var(--dur-f);
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Zoom mód: originální velikost, scrollování */
#lightbox.lb-zoomed #lb-img-wrap {
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.3) transparent;
}
#lightbox.lb-zoomed #lb-img-wrap::-webkit-scrollbar { width: 5px; height: 5px; }
#lightbox.lb-zoomed #lb-img-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 3px; }
#lightbox.lb-zoomed #lb-img { border-radius: 0; transition: none; }

/* Spinner */
#lb-spinner {
  position: absolute; width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: rgba(255,255,255,.8);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none; z-index: 2; pointer-events: none;
}
#lightbox.loading #lb-spinner { display: block; }
#lightbox.loading #lb-img     { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Patička lightboxu */
#lb-footer {
  display: flex; align-items: center; gap: var(--gap-md);
  margin-top: 10px; width: 100%; flex-shrink: 0; min-height: 28px;
}
#lb-cap     { color: rgba(255,255,255,.65); font-size: 13px; flex: 1; text-align: center; }
#lb-toolbar { display: flex; align-items: center; gap: 10px; }
#lb-views   { color: rgba(255,255,255,.4); font-size: 11px; white-space: nowrap; }

/* Zoom tlačítko */
#lb-zoom-btn {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8); font-size: 14px; padding: 4px 10px;
  border-radius: var(--r-md);
  transition: background var(--dur-f), color var(--dur-f);
  white-space: nowrap;
}
#lb-zoom-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
#lightbox.lb-zoomed #lb-zoom-btn { background: rgba(93,139,63,.4); border-color: rgba(93,139,63,.6); color: #9fcf78; }

/* Nápověda na kurzoru při zoom */
#lightbox.lb-zoomed #lb-img { cursor: grab; }
#lightbox.lb-zoomed #lb-img:active { cursor: grabbing; }

/* Navigační tlačítka */
#lb-close, #lb-prev, #lb-next {
  position: fixed; z-index: 9002;
  background: rgba(255,255,255,.1); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85); font-size: 18px;
  border-radius: var(--r-md); padding: 8px 14px;
  transition: background var(--dur-f), opacity var(--dur-f);
}
#lb-close:hover, #lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,.22); }

/* Šipky se skryjí při zoom (pohyb je pan, ne přechod) */
#lightbox.lb-zoomed #lb-prev,
#lightbox.lb-zoomed #lb-next { opacity: .25; pointer-events: none; }

#lb-close { top: 14px; right: 14px; }
#lb-prev  { left: 10px; top: 50%; transform: translateY(-50%); }
#lb-next  { right: 10px; top: 50%; transform: translateY(-50%); }

@media (max-width: 479px) {
  #lightbox    { padding: 50px 48px 12px; }
  #lb-prev, #lb-next { padding: 6px 10px; font-size: 15px; }
  #lb-zoom-btn { font-size: 12px; padding: 3px 8px; }
}

/* ── 16. UTILITY ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 20px; }
:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 2px; border-radius: var(--r-sm); }
