/* Scout — extra styles loaded after Tailwind output.css.
   Editovatelný bez nutnosti rebuildovat Tailwind. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

/* --- Color tokens (override Tailwind base) --- */
:root {
  --accent: #d97706;        /* warm amber */
  --accent-2: #b91c1c;      /* film red */
  --highlight: #fef3c7;
}
.dark {
  --accent: #fbbf24;
  --accent-2: #f87171;
  --highlight: #422006;
}

/* --- Display typography (Playfair Display serif) --- */
.display-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-variation-settings: "opsz" 72, "SOFT" 50;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.display-xl {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.display-xl em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.display-lg {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 96;
}

.display-md {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 48;
}

.display-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.04em;
}

/* News card title — větší a serifový pro „Co se zrovna natočilo" */
.news-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 768px) {
  .news-card-title { font-size: 1.35rem; line-height: 1.15; }
}
@media (min-width: 1280px) {
  .news-card-title { font-size: 1.55rem; }
}

/* Match ring — kruhový indikátor procentuální shody (dashboard news_picks) */
.match-ring {
  position: relative;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.match-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.match-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3.5;
}
.match-ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}
.match-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.accent-rule {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 8px;
}

.text-accent { color: var(--accent); }
.bg-accent { background: var(--accent); }
.border-accent { border-color: var(--accent); }

/* --- Mini markdown prose for AI profile text --- */
.prose-mini { line-height: 1.6; }
.prose-mini p { margin-bottom: 0.7em; }
.prose-mini p:last-child { margin-bottom: 0; }
.prose-mini strong { color: var(--ink); font-weight: 600; }
.prose-mini em { font-style: italic; color: var(--accent); }
.prose-mini h3, .prose-mini h4, .prose-mini h5 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  margin: 1em 0 0.35em 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.prose-mini h3 { font-size: 1.15em; }
.prose-mini h4 { font-size: 1.05em; }
.prose-mini h5 { font-size: 1em; }
.prose-mini ul, .prose-mini ol { margin: 0.4em 0 0.7em 1.1em; }
.prose-mini ul { list-style: disc; }
.prose-mini ol { list-style: decimal; }
.prose-mini li { margin-bottom: 0.25em; }
.prose-mini code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
  background: var(--bg-sub);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}

/* --- Hero block on landing --- */
.hero-grain {
  position: relative;
  isolation: isolate;
}
.hero-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(217, 119, 6, 0.06), transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(185, 28, 28, 0.04), transparent 55%);
  pointer-events: none;
  z-index: -1;
}
.dark .hero-grain::after {
  background-image: radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.08), transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(248, 113, 113, 0.05), transparent 55%);
}

/* --- Section header with serif numeral --- */
.section-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
  margin-right: 0.5rem;
  font-variation-settings: "opsz" 144;
}

/* --- Underline accent on hover --- */
.link-accent {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
}
.link-accent:hover {
  background-size: 100% 1px;
}

/* --- Card with accent corner --- */
.card-fancy {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 1rem;
}
.card-fancy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

/* --- Improve dark mode body text contrast --- */
.dark { --ink-sub: #e0e0e0; --ink-muted: #a8a8a8; }

/* --- Bigger top-level headings --- */
.heading-1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.02em; }
.heading-2 { font-size: 1.25rem; letter-spacing: -0.015em; }

/* =================================================================
   Missing Tailwind utilities (precompiled output.css doesn't have these)
   ================================================================= */
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-32 { width: 8rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-poster { aspect-ratio: 2 / 3; }
.rounded-sm { border-radius: 2px; }
.rounded-md { border-radius: 6px; }
.rounded-full { border-radius: 9999px; }

/* =================================================================
   Mobile safe-area (notch / home indicator)
   ================================================================= */
.safe-px { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.safe-pb { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.bottom-nav { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }

/* =================================================================
   MOVIE DETAIL — clean editorial layout
   ================================================================= */
.movie-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 0.25rem 1.5rem;
  max-width: 100%;
  overflow: hidden;
}

/* Header: poster + titles */
.md-genres-inline { display: none; }  /* zobrazí se jen na desktopu uvnitř headeru */
.md-top { display: contents; }  /* legacy no-op; header a trailer jsou samostatné bloky */
.md-header {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  align-items: start;
}
.md-poster {
  width: 70px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--bg-sub, #f4f4f4);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
}
.md-titles { min-width: 0; }
.md-title-cz {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  margin: 0;
  color: var(--ink);
  word-wrap: break-word;
}
.md-title-en {
  font-size: 0.8rem;
  color: var(--ink-sub);
  margin: 0.25rem 0 0;
  font-weight: 400;
}
.md-title-orig {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin: 0.15rem 0 0;
  font-variation-settings: "opsz" 14;
}
.md-meta {
  margin: 0.5rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.md-meta .dot { margin: 0 0.4em; opacity: 0.5; }

/* Section label */
.md-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 0.5rem;
  font-variation-settings: "opsz" 14;
}

/* Trailer */
.md-trailer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.md-trailer img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity .2s; }
.md-trailer:hover img { opacity: 1; }
.md-trailer-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.md-trailer-play > div {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform .2s;
}
.md-trailer:hover .md-trailer-play > div { transform: scale(1.08); }
.md-trailer-tag {
  position: absolute;
  bottom: 8px; left: 10px;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}
.md-trailer iframe { width: 100%; height: 100%; border: 0; }

/* Genre chips */
.md-genres { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.md-genre {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border);
  color: var(--ink-sub);
  border-radius: 999px;
  background: transparent;
}

/* Overview */
.md-overview {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-sub);
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-variation-settings: "opsz" 18;
  letter-spacing: 0.005em;
}

/* Crew table */
.md-crew {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.25rem;
  row-gap: 0.65rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.md-crew dt {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  padding-top: 0.1em;
}
.md-crew dd {
  font-size: 0.85rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

/* Cast strip — small photos, horizontal scroll */
.md-cast-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0 0.5rem;
  margin: 0 -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.md-cast-scroll::-webkit-scrollbar { height: 4px; }
.md-cast-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.md-cast-card {
  flex: 0 0 auto;
  width: 84px;
  scroll-snap-align: start;
}
.md-cast-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-sub, #eee);
  display: block;
}
.md-cast-photo-empty {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--bg-sub, #eee);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.5rem;
}
.md-cast-name {
  font-size: 0.72rem;
  font-weight: 500;
  margin: 0.45rem 0 0;
  line-height: 1.2;
  color: var(--ink);
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  hyphens: auto;
}
.md-cast-role {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin: 0.1rem 0 0;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
}

/* Rating row */
.md-rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.md-rating-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-sub);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 3px;
}
.md-rating-btn:hover { border-color: var(--ink); color: var(--ink); }
.md-rating-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* External links / actions row */
.md-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.md-actions a { color: var(--ink-sub); text-decoration: none; }
.md-actions a:hover { color: var(--accent); }
.md-action-remove {
  margin-left: auto;
  color: var(--accent-2, #b91c1c);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
}
.md-action-remove:hover { opacity: 0.75; }

/* Streaming providers row */
.md-providers {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

/* Recommendation explanation box */
.md-rec-box {
  border-left: 3px solid var(--accent);
  background: var(--surface-sub);
  border-radius: 0 8px 8px 0;
  padding: 0.875rem 1rem;
  margin: 0.75rem 0;
}
.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.72rem;
  color: var(--ink-sub);
  background: var(--surface);
  transition: border-color 0.15s, color 0.15s;
}
.provider-badge:hover { border-color: var(--accent); color: var(--ink); }

/* ─── Movie detail — desktop layout ≥1024px ───────────────────────── */
@media (min-width: 1024px) {
  .movie-detail {
    max-width: 1080px;
    margin: 0 auto;
    gap: 2.25rem;
    padding: 1.5rem 0.5rem 4rem;
  }
  /* Hero header: poster vlevo, titles vedle */
  .md-header {
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: end;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
  }
  .md-poster {
    width: 240px;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18), 0 3px 10px rgba(0,0,0,0.08);
  }
  .md-titles { padding-bottom: 0.5rem; }
  .md-title-cz {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    line-height: 1.03;
    letter-spacing: -0.03em;
  }
  .md-title-orig {
    font-size: 1.15rem;
    margin-top: 0.5rem;
  }
  .md-meta {
    margin-top: 1rem;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
  }
  /* Žánry uvnitř hero headeru (mobilní instance se skryje) */
  .md-genres-inline { display: flex; margin-top: 1.25rem; }
  .movie-detail > .md-genres { display: none; }
  /* Trailer plnou šířkou pod headerem */
  .md-trailer {
    border-radius: 6px;
    max-width: 100%;
    margin: 0;
  }
  .md-trailer-empty { display: none; }
  .md-overview {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 760px;
  }
  .md-actions {
    gap: 1.25rem;
    font-size: 0.78rem;
    padding-top: 1rem;
  }
  .md-providers {
    padding: 1rem 0;
  }
  .md-genre {
    font-size: 0.78rem;
    padding: 0.3rem 0.9rem;
  }
  .md-label {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    margin-bottom: 0.85rem;
  }
}
@media (min-width: 1280px) {
  .movie-detail { max-width: 1200px; gap: 2.75rem; }
  .md-header { grid-template-columns: 280px 1fr; gap: 3rem; }
  .md-poster { width: 280px; }
}

/* GDPR banner — kontrastní v obou módech (přebíjí body+Tailwind reset) */
html body #gdpr-banner,
#gdpr-banner {
  background: #1a1a1a !important;
  border-top: 1px solid #3a3a3a !important;
  color: #e0e0e0 !important;
}
#gdpr-banner p { color: #e0e0e0 !important; margin: 0; }
#gdpr-banner a { color: #f59e0b !important; text-decoration: underline; }
#gdpr-banner button {
  background: #f59e0b !important;
  color: #111 !important;
  border: none;
  cursor: pointer;
  padding: 0.35rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── TMDB attribution footer — required by TMDB API Terms ───────────
   https://www.themoviedb.org/about/logos-attribution
   Logo musí být viditelné + přiložená attribution věta. */
.tmdb-footer {
  text-align: center;
  padding: 2rem 1rem 5rem;        /* bottom padding nechává místo na GDPR banner */
  border-top: 1px solid var(--border, #e5e5e5);
  margin-top: 3rem;
  background: var(--surface, transparent);
}
.tmdb-attribution {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink-sub, #555);
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 560px;
  text-align: left;
  transition: opacity 0.15s;
}
.tmdb-attribution:hover { opacity: 0.78; }
.tmdb-logo {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  display: block;
}
.tmdb-text {
  font-weight: 400;
  letter-spacing: 0.005em;
}
@media (max-width: 640px) {
  .tmdb-footer { padding: 1.5rem 1rem 6rem; }
  .tmdb-attribution {
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    font-size: 0.7rem;
  }
  .tmdb-logo { width: 92px; }
}

/* Platform filter pills */
.platform-pill {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.platform-pill:hover { border-color: var(--accent); color: var(--ink); }
.platform-pill.active { border-color: var(--accent); color: var(--accent); font-weight: 500; }

/* No-scrollbar utility */
.no-scrollbar { scrollbar-width: thin; }

/* Drop cap mobile padding override on movie row */
@media (max-width: 480px) {
  .md-header { grid-template-columns: 60px 1fr; gap: 0.85rem; }
  .md-poster { width: 60px; }
  .md-title-cz { font-size: 1.25rem; }
  .md-cast-card { width: 72px; }
  .md-cast-photo, .md-cast-photo-empty { width: 72px; height: 72px; }
}

/* Grid utilities (chybějící v compiled Tailwind output) */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Aspect ratio plakát */
.aspect-2-3 { aspect-ratio: 2 / 3; }
/* =================================================================
   DESKTOP — sidebar layout, wider grids, refined typography
   v20260510-desktop-clean
   ================================================================= */

/* Tablet container */
@media (min-width: 768px) {
  .container-app {
    max-width: 720px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Default news grid (single column on mobile) */
.grid-news { display: grid; grid-template-columns: 1fr; }

/* Default recommendations grid (single column on mobile) */
.grid-recs { display: flex; flex-direction: column; gap: 0.75rem; }
.grid-recs .rec-card-rich {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--surface-sub);
  border: 1px solid var(--border);
}
.grid-recs .rec-poster {
  position: relative;
  width: 4rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.grid-recs .rec-poster img { width: 100%; height: 100%; object-fit: cover; }
.grid-recs .rec-title { font-size: 0.95rem; font-weight: 500; }

/* Hide hero-stats by default; revealed on desktop */
.hero-stats { display: none; }

/* Desktop ≥1024px */
@media (min-width: 1024px) {
  /* Hide bottom-nav on desktop */
  .bottom-nav { display: none !important; }

  /* App shell: sidebar + main */
  .app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
  }

  /* Sidebar */
  .sidebar {
    display: flex !important;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--bg);
    padding: 1.75rem 1.25rem;
    overflow-y: auto;
  }
  .sidebar-brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--ink);
    margin-bottom: 2rem;
    text-decoration: none;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
  }
  .sidebar-brand em {
    font-style: italic;
    color: var(--accent);
    font-weight: 500;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.825rem;
    color: var(--ink-sub);
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    text-decoration: none;
    line-height: 1.2;
  }
  .sidebar-link:hover { color: var(--ink); background: var(--surface-sub); }
  .sidebar-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 6%, transparent);
  }
  .sidebar-link svg { flex-shrink: 0; opacity: 0.7; }
  .sidebar-link.active svg { opacity: 1; }
  .sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--ink-muted);
  }

  /* Hide mobile top-header on desktop */
  #top-header-mobile { display: none !important; }

  /* Desktop top header inside main column */
  .top-header-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  /* Wider container inside main */
  .container-app {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  /* Pages that want to use full main width on desktop */
  main.container-app:has(> .page-wide),
  .container-app:has(> .page-wide) {
    max-width: 1500px !important;
    padding-left: 3rem;
    padding-right: 3rem;
  }
  .container-wide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  /* Bigger base font on desktop */
  html { font-size: 14px; }

  /* Display typography scales up */
  .display-xl {
    font-size: clamp(3.5rem, 5.5vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
  }
  .display-lg {
    font-size: clamp(2.2rem, 3vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
  }
  .display-md {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  /* Festival grid: 4 cols on desktop */
  .grid-fest {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 2rem !important;
  }
  /* News grid: 2 cols on desktop */
  .grid-news {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }

  /* Two-column hero on desktop: greeting + stats */
  .hero-split {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: end;
  }
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface-sub);
  }
  .hero-stat-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--accent);
  }
  .hero-stat-label {
    font-size: 0.7rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
  }

  /* Pick-card hover */
  .pick-card { transition: transform 0.25s ease, opacity 0.2s; }
  .pick-card:hover { transform: translateY(-2px); }

  /* News-row hover */
  .news-row { padding: 1rem 0.75rem !important; transition: background 0.15s; }
  .news-row:hover { background: var(--surface-sub); }

  /* Section title row */
  .section-title-row {
    gap: 2rem;
    margin-bottom: 1.75rem;
  }

  /* === /festivaly: kartový grid 2 sloupce === */
  .grid-festivals {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .grid-festivals > a {
    padding: 1.5rem 1.5rem 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s;
  }
  .grid-festivals > a:hover {
    transform: translateY(-2px);
  }
  .festival-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    line-height: 1.15;
    font-weight: 500;
    margin-bottom: 0.4rem;
  }
  .festival-card-year {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--accent);
    font-size: 1.1rem;
  }

  /* === /lide: avatar grid === */
  .grid-people {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
  .grid-people > a {
    padding: 1rem 1.25rem !important;
  }
  .grid-people .avatar-lg {
    width: 3rem !important;
    height: 3rem !important;
  }

  /* === /profil/filmy: rozšířená šířka pro list, větší řádek === */
  .movies-list-wrap { max-width: 980px; }
  .film-row-wide { padding: 0.95rem 0.5rem !important; }

  /* === /admin: 2 sloupce festivalů === */
  .grid-admin-fest {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  /* ============================================
     PAGE HERO — společný hlavičkový blok stránek
     ============================================ */
  .page-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: end;
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
  }
  .page-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.4rem, 3.2vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 0.75rem;
  }
  .page-hero-title em {
    font-style: italic;
    color: var(--accent);
  }
  .page-hero-lead {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink-sub);
    max-width: 38rem;
  }
  .page-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    background: var(--surface-sub);
    border: 1px solid var(--border);
  }
  .page-hero-stats .stat-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--accent);
    font-weight: 600;
    font-feature-settings: "tnum";
  }
  .page-hero-stats .stat-label {
    font-size: 0.65rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
  }

  /* ============================================
     FESTIVALS — bohatá karta s artworkem
     ============================================ */
  .grid-festivals-rich {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
  .festival-card-rich {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-sub);
    transition: transform 0.25s ease, border-color 0.25s;
    text-decoration: none;
    color: inherit;
  }
  .festival-card-rich:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
  }
  .festival-card-art {
    position: relative;
    aspect-ratio: 16 / 7;
    background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 28%, var(--surface)) 0%,
      color-mix(in srgb, var(--accent) 6%, var(--surface-sub)) 100%);
    overflow: hidden;
  }
  .festival-card-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08), transparent 50%),
      radial-gradient(circle at 20% 80%, rgba(0,0,0,0.25), transparent 60%);
    pointer-events: none;
  }
  .festival-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
  }
  .festival-card-year-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    z-index: 1;
  }
  .festival-card-body {
    padding: 1.5rem 1.75rem 1.75rem;
  }
  .festival-card-body .festival-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.55rem;
    line-height: 1.15;
    font-weight: 500;
    margin-bottom: 0.35rem;
  }
  .festival-card-body .festival-edition {
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-bottom: 1rem;
  }
  .festival-card-body .festival-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
  }
  .festival-card-body .festival-meta .meta-place { color: var(--ink-sub); }
  .festival-card-body .festival-meta .meta-count {
    color: var(--ink-muted);
    font-feature-settings: "tnum";
  }

  /* ============================================
     LIDÉ — větší karty s avatarem a statistikami
     ============================================ */
  .grid-people-rich {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .person-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem 1.5rem !important;
    transition: transform 0.2s ease, border-color 0.2s;
  }
  .person-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
  }
  .person-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    background: var(--surface-sub);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    color: var(--ink-muted);
  }
  .person-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .person-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
  }
  .person-handle {
    font-size: 0.7rem;
    color: var(--ink-muted);
    margin-bottom: 1rem;
  }
  .person-stats {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    width: 100%;
    justify-content: center;
  }
  .person-stat-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    color: var(--accent);
    line-height: 1;
    font-feature-settings: "tnum";
  }
  .person-stat-label {
    font-size: 0.6rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.3rem;
  }

  /* ============================================
     PROFIL/FILMY — širší layout, kolonky
     ============================================ */
  .movies-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: start;
  }
  .movies-aside {
    position: sticky;
    top: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-sub);
    border: 1px solid var(--border);
  }
  .movies-aside .aside-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }
  .movies-aside .aside-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
  }
  .movies-aside .aside-stat:last-child { border-bottom: none; }
  .movies-aside .aside-stat .v {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--accent);
    font-feature-settings: "tnum";
  }

  /* ============================================
     ADMIN — širší layout, 2 sloupce
     ============================================ */
  .admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
    align-items: start;
  }
  .admin-aside {
    position: sticky;
    top: 1.5rem;
  }

  /* ============================================
     SETTINGS — pěkná typografie + 2 sloupce
     ============================================ */
  .settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    align-items: start;
  }
  .settings-form {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }
  .form-section {
    padding: 2rem 2.25rem;
    background: var(--surface-sub);
    border: 1px solid var(--border);
  }
  .form-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    line-height: 1.15;
    margin-bottom: 0.4rem;
  }
  .form-section-help {
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin-bottom: 1.75rem;
    max-width: 36rem;
  }
  .form-row {
    margin-bottom: 1.5rem;
  }
  .form-row:last-child { margin-bottom: 0; }
  .form-row .label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .form-hint {
    font-size: 0.7rem;
    color: var(--ink-muted);
    margin-top: 0.5rem;
  }
  .input-prefix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .input-prefix .prefix {
    padding: 0.55rem 0.75rem;
    background: var(--surface-sub);
    color: var(--ink-muted);
    font-size: 0.75rem;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    align-self: stretch;
    display: flex;
    align-items: center;
  }
  .input-prefix .input {
    border: none !important;
    flex: 1;
    background: transparent;
  }
  .form-toggle {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    cursor: pointer;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.2s;
  }
  .form-toggle:hover { border-color: var(--accent); }
  .form-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--accent);
  }
  .form-toggle .toggle-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
  }
  .form-toggle .toggle-help {
    display: block;
    font-size: 0.72rem;
    color: var(--ink-muted);
    line-height: 1.4;
  }
  .form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
  }
  .settings-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1.5rem;
  }
  .settings-aside .aside-card {
    padding: 1.5rem;
    background: var(--surface-sub);
    border: 1px solid var(--border);
  }
  .settings-aside .aside-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
  }
  .settings-aside .aside-url {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--accent);
    word-break: break-all;
  }
  .settings-aside .aside-links {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .settings-aside .aside-links li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
  }
  .settings-aside .aside-links li:last-child { border-bottom: none; }
  .settings-aside .aside-links a {
    color: var(--ink-sub);
    text-decoration: none;
  }
  .settings-aside .aside-links a:hover { color: var(--accent); }

  /* ============================================
     FESTIVAL DETAIL — program grid s postery
     ============================================ */
  .grid-festival-films {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .festival-film-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--surface-sub);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s;
  }
  .festival-film-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
  }
  .festival-film-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: var(--surface);
    overflow: hidden;
  }
  .festival-film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .festival-film-poster-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--surface-sub), var(--surface));
  }
  .festival-film-body {
    padding: 1rem 1.1rem 1.2rem;
  }
  .festival-film-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 500;
    color: var(--ink);
  }

  /* ============================================
     FESTIVAL RECOMMENDATIONS — bohaté karty
     ============================================ */
  .grid-recs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
  .rec-card-rich {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--surface-sub);
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
  }
  .rec-card-rich:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }
  .rec-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--surface);
  }
  .rec-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .rec-score-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(4px);
  }
  .rec-score-badge.is-high { background: var(--accent); color: var(--surface); }
  .rec-score-badge.is-mid { background: rgba(0, 0, 0, 0.78); }
  .rec-score-badge.is-low { background: rgba(0, 0, 0, 0.6); }
  .rec-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .rec-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    line-height: 1.15;
    font-weight: 500;
    color: var(--ink);
  }
}

/* Desktop ≥1280px */
@media (min-width: 1280px) {
  .app-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .container-app { max-width: 1200px; padding-left: 3rem; padding-right: 3rem; }
  .container-wide { max-width: 1500px; }
  .grid-fest {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  .grid-people {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .grid-festival-films {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .grid-people-rich {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Desktop ≥1536px */
@media (min-width: 1536px) {
  .container-app { max-width: 1320px; }
  .container-wide { max-width: 1680px; }
  .grid-festival-films {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
