/* =============================================================
   Wollis Homepage - modernes, responsives Design
   Eine Datei: Grundlagen, Layout, Navigation, Inhalt, Galerie,
   Lightbox, Formulare, dunkles Schema, Druckansicht
   ============================================================= */

/* ---------- 1. Grundlagen & Farben ---------- */

:root {
  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFM Mono", "Courier New", monospace;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 9px;

  color-scheme: light dark;

  --bg: #edf1f7;
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --border: #dde3ec;
  --text: #1c2531;
  --muted: #62708a;
  --accent: #0e7a6f;
  --accent-strong: #096357;
  --accent-soft: #e3f2ef;
  --highlight: #f59e0b;
  --code-bg: #f1f4f9;
  --brand-grad: linear-gradient(115deg, #0e7a6f 0%, #1679c4 55%, #2b4fb5 100%);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 26px rgba(16, 24, 40, 0.08);
  --shadow-strong: 0 18px 45px rgba(16, 24, 40, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121821;
    --surface: #1a222d;
    --surface-alt: #212b38;
    --border: #2c3846;
    --text: #e6ebf2;
    --muted: #98a4b8;
    --accent: #35c3ad;
    --accent-strong: #62dcd0;
    --accent-soft: #1c3a39;
    --highlight: #fbbf24;
    --code-bg: #101720;
    --brand-grad: linear-gradient(115deg, #0b4f48 0%, #123a63 55%, #1b2b6b 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px rgba(0, 0, 0, 0.35);
    --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  --bg: #121821;
  --surface: #1a222d;
  --surface-alt: #212b38;
  --border: #2c3846;
  --text: #e6ebf2;
  --muted: #98a4b8;
  --accent: #35c3ad;
  --accent-strong: #62dcd0;
  --accent-soft: #1c3a39;
  --highlight: #fbbf24;
  --code-bg: #101720;
  --brand-grad: linear-gradient(115deg, #0b4f48 0%, #123a63 55%, #1b2b6b 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.55);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
}

:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 90;
}
.skip-link:focus {
  left: 1rem;
  top: 0.7rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- 2. Header ---------- */

.site-header {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: #fff;
  text-decoration: none;
}
.brand:hover .brand-name { text-decoration: underline; text-underline-offset: 3px; }

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 500;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.28); }
.icon-btn:active { transform: scale(0.97); }
.icon-btn svg { width: 18px; height: 18px; display: block; }

/* Der Menue-Knopf wirkt in allen Breiten: er oeffnet das vollstaendige
   Navigationsmenue (siehe 4a). Auf breiten Bildschirmen ist es ein
   Ausklapppanel unter dem Header, auf schmalen eine Schublade links. */

/* ---------- 3. Layout: Sidebar + Inhalt ---------- */

.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1rem 2.2rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.7rem;
  align-items: start;
}

.content-wrap { min-width: 0; }

/* ---------- 4. Navigation ---------- */

.sidebar {
  position: sticky;
  top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.2rem;
  box-shadow: var(--shadow);
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.sidebar-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.nav-close:hover { background: var(--accent-soft); color: var(--accent-strong); }

.nav,
.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { margin: 0.15rem 0; }

.nav a {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }

.nav .level0 > a { font-weight: 600; font-size: 0.98rem; }
.nav .level1 > a { font-size: 0.9rem; color: var(--muted); padding-left: 1.3rem; }
.nav .level2 > a { font-size: 0.85rem; color: var(--muted); padding-left: 2.1rem; }
.nav .level3 > a { font-size: 0.82rem; color: var(--muted); padding-left: 2.9rem; }

.nav .active > a,
.nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.nav .active > a.level1,
.nav .active > a.level2 { color: #fff; }

.nav-sub { margin: 0.2rem 0 0.55rem; }

.sidebar-footer {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.sidebar-footer a { color: var(--accent); }

/* ---------- 4a. Vollstaendiges Menue (Knopf oben rechts) ---------- */

/* Das Panel ist zuerst unsichtbar. Der Knopf "Menue" setzt nav-open am
   html-Element, dann erscheint das Panel mit dem ganzen Navigationsbaum
   (alle Unterpunkte), nicht nur dem aktiven Zweig.
   Breiter Bildschirm: Ausklapppanel unter dem Header rechts.
   Schmaler Bildschirm: Schublade links (siehe Responsive-Regeln).
   Die Skriptdatei setzt den Abstand von oben auf die Header-Hoehe. */
.menu-panel { display: none; }

html.nav-open .menu-panel {
  display: block;
  position: fixed;
  z-index: 70;
  top: 4.6rem;
  right: 1rem;
  left: auto;
  width: min(360px, 92vw);
  max-height: min(76vh, 640px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 0.9rem 1.1rem;
  box-shadow: var(--shadow-strong);
  animation: panel-in 0.22s ease;
}

.menu-panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.menu-panel-nav { font-size: 0.97rem; }
.menu-panel .sidebar-footer { margin-top: 0.8rem; }
.menu-panel .sidebar-footer a { display: block; padding: 0.25rem 0; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-0.4rem); }
  to   { opacity: 1; transform: none; }
}
@keyframes drawer-in {
  from { transform: translateX(-100%); }
  to   { transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- 5. Inhalt ---------- */

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem clamp(1rem, 3.5vw, 2.3rem) 1.8rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
}
.breadcrumb a:hover { color: var(--accent-strong); border-color: var(--accent); }
.breadcrumb .sep { opacity: 0.55; }
.breadcrumb .current { font-weight: 600; color: var(--text); }

.content-title {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0.15rem 0 1.15rem;
  font-weight: 700;
}

.article { max-width: 74ch; }

.article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.article a:hover { color: var(--accent-strong); }

.article h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.3;
  margin: 1.6rem 0 0.6rem;
  font-weight: 700;
}
.article h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  margin: 1.3rem 0 0.5rem;
  font-weight: 700;
  color: var(--accent-strong);
}
.article h4 {
  font-size: 1rem;
  margin: 1.1rem 0 0.4rem;
  font-weight: 700;
}
.article h2 + h3,
.article h3 + h4 { margin-top: 0.6rem; }
.article p { margin: 0.6rem 0; }
.article p:first-child { margin-top: 0; }

.article ul,
.article ol { padding-left: 1.3rem; margin: 0.7rem 0; }
.article li { margin: 0.35rem 0; }
.article li br { display: none; }

.article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.article img[align="left"] { float: left; margin: 0.3rem 1rem 1rem 0; }
.article img[align="right"] { float: right; margin: 0.3rem 0 1rem 1rem; }

.article center { text-align: center; }

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
}
.article td,
.article th {
  padding: 0.35rem 0.55rem;
  vertical-align: top;
  text-align: left;
}
.article th { font-weight: 700; border-bottom: 2px solid var(--border); }
.article table[border="1"] { border: 1px solid var(--border); }
.article table[border="1"] td,
.article table[border="1"] th { border: 1px solid var(--border); }

.article pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.9rem 0;
  max-width: 100%;
}
.article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.08em 0.35em;
  border-radius: 5px;
}

.article hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.4rem 0;
}

/* Restricted-area notice */
.notice {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 14px 0;
}

.notice h2,
.notice h3 { margin-top: 0; }

.notice form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.notice label {
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notice input[type="text"],
.notice input[type="password"] {
  font: inherit;
  padding: 0.35em 0.6em;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
}

.notice input[type="submit"] {
  font: inherit;
  font-weight: 600;
  padding: 0.45em 1.1em;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--grad-a);
  color: #fff;
  cursor: pointer;
}

.notice input[type="submit"]:hover { background: var(--grad-b); }

.notice p:first-child { font-weight: 600; }

.article blockquote {
  margin: 0.9rem 0;
  padding: 0.4rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--surface-alt);
  color: var(--muted);
}

.article input,
.article textarea,
.article select {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  max-width: 100%;
}
.article input[type="submit"],
.article input[type="button"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.article input[type="submit"]:hover,
.article input[type="button"]:hover { background: var(--accent-strong); }

.print-line {
  margin: 1.6rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.print-line a { color: var(--accent); }

/* ---------- 6. Galerie ---------- */

/* Die Galerie hat keine eigene Ueberschrift mehr: dieselbe Ueberschrift
   steht schon ganz oben als Seitenueberschrift (h1.content-title), und
   die Zeile "N Bilder - Bild anklicken fuer die vergroesserte Ansicht"
   ueber der Galerie gibt es nicht mehr: Zahl und Copyright stehen
   unter der Galerie (.gallery-count, .gallery-credit). */

.gallery {
  list-style: none;
  margin: 0.8rem 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.gallery-item {
  margin: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent);
}
.gallery-item a { display: block; }
.gallery-item img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--surface);
}
.gallery-item figcaption {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}
.gallery-item a:focus-visible,
.gallery-item a:hover { outline-offset: 2px; }

.gallery-count {
  display: block;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.gallery-credit {
  margin: 0.6rem 0 1.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.code-download {
  margin: 1rem 0;
}
.code-download a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- 7. Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(9, 14, 22, 0.88);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.lightbox.open { display: block; }

.lightbox-stage {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.2rem 5.5rem;
  /* Der Bereich ist eine Vollflaechen-Decklage. Ohne diese Zeile
     liegen die Knöpfe (schliessen, vor, zurueck) unter dem figure
     und sind nicht klickbar: der Klick geht an das figure.
     Die Bildflaechen selbst bleibt klickbar (sicht). */
  pointer-events: none;
}
.lightbox-stage img {
  max-width: min(94vw, 1400px);
  max-height: 78vh;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  background: #fff;
  pointer-events: auto;
}
.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  max-width: min(90vw, 900px);
  text-align: center;
  color: #e8edf4;
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
  /* Text ueber dem Bild: nicht anklickbar, er darf Knöpfe nicht zudecken */
  pointer-events: none;
}
.lightbox-count {
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.55);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin: 0;
  pointer-events: none;
}
.lightbox-btn {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.lightbox-btn:hover { background: rgba(15, 23, 42, 0.85); }
.lb-close { top: 1rem; left: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-credit {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: #94a3b8;
  font-size: 0.78rem;
  margin: 0;
  pointer-events: none;
}
body.no-scroll { overflow: hidden; }

/* ---------- 8. Fusszeile ---------- */

.site-footer {
  margin-top: 1.1rem;
  padding: 1rem 0.2rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  align-items: baseline;
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Der Uberzug gehoert zum Menuepanel und zur Schublade und ist zuerst
   unsichtbar; er deckt die Seite ab, wenn das Menue offen ist. */
.backdrop { display: none; }
html.nav-open .backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(9, 14, 22, 0.45);
  animation: fade-in 0.22s ease;
}

/* ---------- 9. Responsive ---------- */

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 1rem 0.85rem 2rem;
    gap: 1rem;
  }

  /* Die linke Sidebar faellt hier weg: das Menuepanel (Knopf oben
     rechts) ist die Schublade und zeigt den ganzen Baum. */
  .sidebar { display: none; }

  /* Das Menuepanel wird zur Schublade von links */
  html.nav-open .menu-panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: min(86vw, 320px);
    max-height: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    border-right: 1px solid var(--border);
    padding: 1rem 1rem 2rem;
    animation: drawer-in 0.28s ease;
  }

  html.nav-open .backdrop { animation: fade-in 0.28s ease; }

  .gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.6rem; }
}

@media (max-width: 520px) {
  .brand-name { font-size: 1.15rem; }
  .brand-sub { font-size: 0.78rem; }
  .content-card { padding: 1rem 1rem 1.4rem; border-radius: var(--radius-sm); }
  .icon-btn { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .lightbox-btn { width: 40px; height: 40px; font-size: 1.2rem; }
}

/* ---------- 9a. Popup-Seite (imgpopup.php) ---------- */

.popup-page {
  background: var(--bg);
}

.popup-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0.9rem 2rem;
}

.popup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.popup-top a { color: var(--accent); text-decoration: none; font-weight: 600; }
.popup-top a:hover { text-decoration: underline; }

.popup-close {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
}
.popup-close:hover { background: var(--accent-soft); color: var(--accent-strong); }

.popup-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.8rem;
  text-align: center;
}

.popup-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.popup-caption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.popup-qt { margin: 1rem 0; }

.qt-player,
.qt-player embed {
  max-width: 100%;
  height: auto;
}

.footer-text {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.printview .footer-text a { color: var(--accent); }

/* ---------- 10. Bewegung & Druck ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001s !important;
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .sidebar,
  .menu-panel,
  .backdrop,
  .breadcrumb,
  .site-footer,
  .print-line,
  .lightbox,
  .gallery-item:hover { display: none !important; }
  body { background: #fff; color: #000; }
  .layout { display: block; padding: 0; }
  .content-card {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: #fff;
  }
  .article a { color: #000; text-decoration: none; }
  .article a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
  }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .gallery-item { border: 1px solid #bbb; break-inside: avoid; }
}
