/* ==========================================================================
   PRO FRÝDLANT — čistý, plochý design. Světlé plochy, vysoký kontrast.
   ========================================================================== */

:root {
  /* --- barvy (dle zadání) --- */
  --color-green: #59B033;
  --color-green-dark: #3E7D23;
  --color-black: #131313;
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-tint: #F0F6EC;
  --color-bg-tint-2: #E4EFDD;
  --color-text: #191A16;
  --color-text-muted: #43453D;   /* dost tmavá, aby byl text dobře čitelný na bílé */
  --color-border: #DCE4D5;

  /* --- typografie --- */
  --font-heading: "Avenir Next LT Pro", "Avenir Next", "Poppins", sans-serif;
  --font-body: Cambria, Georgia, "Times New Roman", serif;
  /* Nejbližší volně dostupná vizuální náhrada za rukopisný font v logu.
     Text "srdcem a rozumem" byl v podkladovém PDF loga převeden na
     křivky, takže originální font nejde zjistit přímo ze souboru — jen
     odhadnout podle tvaru písmen (tučnější tah s kontrastem tenká/silná
     linka, jako od štětce). Pokud máte skutečný font (soubor .otf/.ttf),
     pošlete ho a nahradíme tohle za přesnou shodu. */
  --font-script: "Yellowtail", "Segoe Script", cursive;

  --max-width: 1160px;
  --radius: 6px;
}

/* Pokud vlastníte licenci na Avenir Next LT Pro, odkomentujte a doplňte
   cesty k souborům:
@font-face {
  font-family: "Avenir Next LT Pro";
  src: url("../fonts/AvenirNextLTPro-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
*/

/* --- reset --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 106%; }
body, h1, h2, h3, h4, p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-black);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 1.35rem + 1.4vw, 2.35rem);
}

h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

strong { font-weight: 700; color: var(--color-black); }

.section-lead {
  max-width: 62ch;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-top: 12px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-black);
  color: #fff;
  padding: 10px 16px;
  z-index: 400;
  font-family: var(--font-heading);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--color-green-dark);
  outline-offset: 2px;
}

/* ==========================================================================
   HLAVIČKA
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: block;
  height: 38px;
}
.logo img {
  height: 100%;
  width: auto;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--color-black);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.nav a:hover {
  border-color: var(--color-green-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  align-items: flex-end;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-black);
}

.nav-toggle span:nth-child(2) { width: 70%; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
  background: var(--color-bg-tint);
}

.hero-mark {
  position: absolute;
  top: -50px;
  right: -80px;
  width: 480px;
  opacity: 0.18;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-inner {
  position: relative;
  max-width: 560px;
}

.hero-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-tint-2);
}
.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* Ořez (aspect-ratio + cover) jen na širších obrazovkách, kde je fotka
   vedle textu ve dvou sloupcích. Na mobilu (viz média níž) se naopak
   žádný ořez nenastavuje vůbec — je to bezpečnější než ho tam nejprve
   nastavit a pak zase na mobilu rušit. */
@media (min-width: 861px) {
  .hero-photo { aspect-ratio: 4 / 5; }
  .hero-photo img { height: 100%; object-fit: cover; }
}

/* siluetа Beskyd na přechodu zelená → bílá pod hero sekcí */
.hero-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  line-height: 0;
  pointer-events: none;
}
.hero-horizon svg { width: 100%; height: 100%; display: block; }
.hero-horizon-back { fill: var(--color-bg-tint-2); }
.hero-horizon-front { fill: var(--color-white); }

.hero-tagline {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2rem, 1.7rem + 1.3vw, 2.6rem);
  color: var(--color-green-dark);
  margin-bottom: 8px;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.9vw, 2.9rem);
  max-width: 20ch;
}

.ballot-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.ballot-box {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 2px solid var(--color-black);
  border-radius: 4px;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ballot-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-black);
}
.ballot-label strong {
  color: var(--color-green-dark);
  font-size: 1.2rem;
}

.hero-lead {
  margin-top: 20px;
  font-size: 1.15rem;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  padding: 13px 26px;
  font-weight: 600;
  font-size: 0.97rem;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-green);
  color: var(--color-black);
}
.btn-primary:hover {
  background: var(--color-green-dark);
  color: #fff;
}

.btn-ghost {
  color: var(--color-black);
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid var(--color-black);
  border-radius: 0;
  background: none;
}
.btn-ghost:hover {
  color: var(--color-green-dark);
  border-color: var(--color-green-dark);
}

.date-badge {
  display: block;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  max-width: 280px;
}

.date-badge-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.date-badge-date {
  display: block;
  margin-top: 2px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-black);
}

/* ==========================================================================
   O NÁS
   ========================================================================== */

.intro {
  background: var(--color-bg);
  padding: 76px 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 56px;
  align-items: start;
}

.intro-text p {
  font-size: 1.08rem;
}

.intro-text p + p {
  margin-top: 16px;
  color: var(--color-text-muted);
}

.pull-quote {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.42;
  border-left: 3px solid var(--color-green);
  padding-left: 26px;
}

.pull-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.quote-card {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  padding-top: 44px;
  border-top: 1px solid var(--color-border);
}

.quote-photo {
  flex: 0 0 260px;
  width: 260px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-tint);
}
.quote-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

/* ==========================================================================
   ČÍSLA — světlé pozadí, tmavý text, výrazná zelená čísla
   ========================================================================== */

.stats {
  background: var(--color-bg-tint-2);
  padding: 52px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 1.9rem + 1vw, 2.8rem);
  font-weight: 700;
  color: var(--color-green-dark);
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ==========================================================================
   PROGRAM
   ========================================================================== */

.program {
  padding: 78px 0;
  background: var(--color-bg);
}

.program-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.program-tile {
  background: var(--color-bg-tint-2);
  border-radius: var(--radius);
  overflow: hidden;
}

.program-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-black);
}

.program-chevron {
  flex-shrink: 0;
  color: var(--color-green-dark);
  transition: transform 0.25s ease;
}
.program-toggle[aria-expanded="true"] .program-chevron { transform: rotate(180deg); }

.program-toggle:hover { color: var(--color-green-dark); }

/* max-height místo grid-template-rows trik — méně "chytré", ale
   spolehlivě funguje úplně všude včetně mobilních prohlížečů */
.program-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.program-panel.is-open { max-height: 600px; }

.program-panel-inner {}

.program-panel ul {
  padding: 0 22px 22px;
}

.program-panel li {
  position: relative;
  padding-left: 16px;
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

.program-panel li + li { margin-top: 8px; }

.program-panel li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-green-dark);
  font-weight: 700;
}

/* ==========================================================================
   KANDIDÁTI
   ========================================================================== */

.candidates {
  background: var(--color-bg-tint);
  padding: 78px 0;
}

.candidate-list {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
}

.candidate-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.candidate-card:hover .candidate-info h3,
.candidate-card:focus-visible .candidate-info h3 {
  color: var(--color-green-dark);
}

.candidate-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--color-border);
  overflow: hidden;
}

.candidate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.candidate-info {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 12px;
}

.candidate-number {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-green-dark);
}

.candidate-info h3 {
  font-size: 1rem;
  transition: color 0.15s ease;
}

.candidate-role {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.candidates-hint {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   MODAL — medailonek kandidáta / lightbox
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 12, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}
.modal-overlay.is-open { display: flex; }

.modal-panel {
  position: relative;
  background: var(--color-white);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  border-radius: var(--radius);
  overflow-y: auto;
  padding: 0 0 32px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-white);
  color: var(--color-black);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(19, 19, 19, 0.25);
}
.modal-close:hover { color: var(--color-green-dark); }

.modal-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-bg-tint);
}
.modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.modal-body { padding: 24px 32px 0; }

.modal-number {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-green-dark);
  font-size: 0.9rem;
}

.modal-body h2 {
  margin-top: 4px;
  font-size: 1.5rem;
}

.modal-role {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.modal-bio {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.modal-bio p {
  color: var(--color-text-muted);
  font-size: 1.02rem;
}
.modal-bio p + p,
.modal-bio h4 { margin-top: 14px; }
.modal-bio strong { color: var(--color-black); }

.modal-empty {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.modal-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.modal-nav button {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-black);
  cursor: pointer;
  padding: 8px 0;
}
.modal-nav button:hover { color: var(--color-green-dark); }

/* lightbox (realizované projekty) */
.lightbox-panel {
  background: none;
  max-width: 900px;
  padding: 0;
}
.lightbox-panel img { width: 100%; border-radius: var(--radius); display: block; }

.lightbox-caption {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.lightbox-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-black);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-side:hover { background: #fff; color: var(--color-green-dark); }
.lightbox-prev { left: -14px; }
.lightbox-next { right: -14px; }

@media (max-width: 640px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* ==========================================================================
   REALIZOVANÉ PROJEKTY
   ========================================================================== */

.projekty {
  background: var(--color-bg);
  padding: 78px 0;
}

/* přehled "co se povedlo" — stejný vizuál jako program, jen menší */
.achievements-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 40px;
}

.achievement-item {
  padding-top: 14px;
  border-top: 2px solid var(--color-black);
}

.achievement-item h3 { margin-bottom: 10px; font-size: 1rem; }

.achievement-item li {
  position: relative;
  padding-left: 14px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.achievement-item li + li { margin-top: 6px; }
.achievement-item li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-green-dark);
  font-weight: 700;
}

.gallery-lead {
  margin-top: 48px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-black);
}

/* Galerie — pravidelná mřížka, každá dlaždice má stejný poměr stran
   (foto se ořízne přes object-fit: cover), aby to netvořilo "nudle" */
.gallery-masonry {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  margin: 0;
  background: var(--color-bg-tint);
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.gallery-tile:hover img { transform: scale(1.06); }

.gallery-caption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  background: var(--color-green);
  color: var(--color-black);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  padding: 6px 10px;
  border-radius: 3px;
  text-align: left;
}

/* ==========================================================================
   NOVINY — vlastní listovací komponenta (.np- prefix, viz noviny/np-style.css)
   ========================================================================== */

.noviny {
  padding: 78px 0;
  background: var(--color-bg-tint);
}

.noviny .np-viewer { margin-top: 40px; }

/* jemné doladění barev komponenty pod barvy webu (proměnné jsou scoped na .np-viewer) */
.np-viewer {
  --np-accent: var(--color-green-dark);
}

.noviny-download {
  text-align: center;
  margin-top: 18px;
}
.noviny-download a {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-black);
  border-bottom: 1px solid var(--color-black);
  padding-bottom: 2px;
}
.noviny-download a:hover { color: var(--color-green-dark); border-color: var(--color-green-dark); }

/* ==========================================================================
   KONTAKT
   ========================================================================== */

.contact {
  padding: 80px 0;
  background: var(--color-green);
}

.contact-inner {
  max-width: 520px;
}

.contact h2 { color: var(--color-black); }

.contact p {
  margin-top: 12px;
  color: #1F3312;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  gap: 28px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.contact-links a {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-black);
  border-bottom: 1px solid var(--color-black);
  padding-bottom: 2px;
}

/* ==========================================================================
   PATIČKA — světlá, ne černá
   ========================================================================== */

.site-footer {
  background: var(--color-bg-tint-2);
  color: var(--color-text);
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-black);
  font-size: 0.95rem;
}
.footer-logo img { height: 24px; width: auto; }

.footer-note {
  font-size: 0.86rem;
  color: var(--color-text-muted);
}
.footer-note a {
  border-bottom: 1px solid var(--color-text-muted);
}
.footer-note a:hover {
  color: var(--color-green-dark);
  border-color: var(--color-green-dark);
}

/* ==========================================================================
   RESPONZIVITA
   ========================================================================== */

@media (max-width: 900px) {
  .candidate-list { grid-template-columns: repeat(3, 1fr); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .hero-mark { width: 360px; }
  .gallery-masonry { grid-template-columns: repeat(3, 1fr); }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-inner { max-width: none; }
  .hero-photo { max-width: 420px; margin: 12px auto 8px; }
}

@media (max-width: 640px) {
  .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 24px 20px;
    gap: 4px;
    display: none;
  }
  .nav[data-state="open"] { display: flex; }
  .nav a { padding: 10px 0; }

  .nav-toggle { display: flex; }

  .candidate-list { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: 1fr; }

  .hero { padding: 52px 0 64px; }
  .hero-mark { width: 240px; top: -24px; right: -56px; }

  .intro, .program, .candidates, .contact, .projekty, .noviny { padding: 52px 0; }

  .quote-card { flex-direction: column; align-items: flex-start; margin-top: 36px; padding-top: 32px; }
  .quote-photo { width: 180px; flex-basis: 180px; }

  .gallery-masonry { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-caption { font-size: 0.86rem; }
  .achievements-grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery-lead { margin-top: 36px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-panel {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
  .modal-body { padding: 20px 20px 0; }
  .lightbox-panel { max-height: 100vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
