/* Schützenverein Meerhof
   Layout: dunkelgrüner Kopf mit Schärpen-Band (grün-weiß-grün), helle Inhaltsflächen,
   Akzente in Wappengelb. Schrift: Zilla Slab für Überschriften, Source Sans 3 für Text. */

@font-face { font-family: "Zilla Slab"; font-weight: 600; font-display: swap; src: url("../fonts/zilla-slab-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-display: swap; src: url("../fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 200 900; font-style: normal; font-display: swap; src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 200 900; font-style: italic; font-display: swap; src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2"); }

:root {
  /* Farben */
  --bg: #f6f7f3;
  --surface: #ffffff;
  --tint: #e9efe6;
  --ink: #17211a;
  --muted: #56635a;
  --line: #d9e0d6;
  --accent: #1d5c33;        /* Vereinsgrün */
  --accent-ink: #ffffff;
  --link: #1a6a37;
  --gold: #e3bd14;          /* Wappengelb */
  --head-bg: #133a22;
  --head-ink: #f3f6f0;
  --sash-green: #23793f;
  --sash-white: #f7f7f2;
  --shadow: 0 1px 2px rgb(20 40 25 / .06), 0 8px 24px -12px rgb(20 40 25 / .18);

  /* Schrift */
  --f-display: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.45rem, 1.2rem + 1vw, 1.75rem);
  --step-3: clamp(1.8rem, 1.4rem + 1.8vw, 2.4rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem);

  --wrap: 72rem;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --radius: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1511; --surface: #161f19; --tint: #131c16; --ink: #e6ece5; --muted: #9eab9f;
    --line: #29352c; --accent: #3f9a5e; --accent-ink: #08130b; --link: #7fd09a; --gold: #f0d24a;
    --head-bg: #0b1a10; --head-ink: #eef3ec; --sash-green: #2f8a4b; --sash-white: #dfe5dc;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1511; --surface: #161f19; --tint: #131c16; --ink: #e6ece5; --muted: #9eab9f;
  --line: #29352c; --accent: #3f9a5e; --accent-ink: #08130b; --link: #7fd09a; --gold: #f0d24a;
  --head-bg: #0b1a10; --head-ink: #eef3ec; --sash-green: #2f8a4b; --sash-white: #dfe5dc;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--head-bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -.005em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 52rem; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--gold); color: #111; padding: .6rem 1rem; }
.skip:focus { left: var(--gutter); top: calc(env(safe-area-inset-top, 0px) + .5rem); }

.eyebrow { font-size: var(--step--1); font-weight: 650; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.eyebrow a { color: inherit; }

/* ---------- Schärpe ---------- */
.sash { height: 9px; background: linear-gradient(to bottom, var(--sash-green) 0 3px, var(--sash-white) 3px 6px, var(--sash-green) 6px 9px); }

/* ---------- Kopf ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--head-bg); color: var(--head-ink); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; margin-right: auto; }
.brand img { width: auto; height: 44px; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font-family: var(--f-display); font-size: 1.25rem; font-weight: 700; }
.brand small { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }

#hauptmenue ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
#hauptmenue a {
  display: block; padding: .5rem .75rem; color: var(--head-ink); text-decoration: none;
  font-weight: 600; font-size: 1rem; border-radius: 4px; position: relative;
}
#hauptmenue a:hover { background: rgb(255 255 255 / .08); }
#hauptmenue a[aria-current="page"]::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .2rem; height: 3px; background: var(--gold); border-radius: 2px;
}
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem; background: none; border: 1px solid rgb(255 255 255 / .3);
    color: var(--head-ink); font: 600 1rem var(--f-body); padding: .45rem .8rem; border-radius: 4px; cursor: pointer;
  }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; position: relative; transition: transform .2s, background .2s;
  }
  .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle .bars::before { top: -6px; }
  .nav-toggle .bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
  #hauptmenue { position: absolute; left: 0; right: 0; top: 100%; background: var(--head-bg); border-top: 1px solid rgb(255 255 255 / .1); display: none; box-shadow: 0 16px 24px -12px rgb(0 0 0 / .5); }
  #hauptmenue.open { display: block; }
  #hauptmenue ul { flex-direction: column; padding: .5rem var(--gutter-r) 1rem var(--gutter); gap: 0; }
  #hauptmenue a { padding: .85rem .25rem; font-size: 1.125rem; border-bottom: 1px solid rgb(255 255 255 / .08); border-radius: 0; }
  #hauptmenue a[aria-current="page"]::after { left: auto; right: .25rem; top: 50%; bottom: auto; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-50%); }
}
.js-nav-ready #hauptmenue { transition: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--head-bg); color: #fff; overflow: hidden; }
.hero-img { width: 100%; height: clamp(320px, 52vw, 620px); object-fit: cover; object-position: center 35%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgb(10 28 16 / .82) 0%, rgb(10 28 16 / .55) 38%, rgb(10 28 16 / 0) 70%),
              linear-gradient(0deg, rgb(10 28 16 / .55), rgb(10 28 16 / 0) 45%);
}
.hero-text { position: absolute; inset: auto 0 0 0; z-index: 1; padding-block: 2rem clamp(2rem, 5vw, 4rem); }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; margin-top: .4rem; font-size: clamp(2.6rem, 1.4rem + 5vw, 5.2rem); line-height: .98; }
.hero .motto { margin-top: .8rem; font-family: var(--f-display); font-weight: 600; font-size: var(--step-1); letter-spacing: .04em; opacity: .92; }
@media (max-width: 600px) {
  .hero-img { height: auto; aspect-ratio: 16 / 10; }
  .hero::after { display: none; }
  .hero-text { position: static; padding-block: 1.5rem 2rem; }
}

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--flush { padding-block: 0 clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--tint); }
.section--green { background: var(--head-bg); color: var(--head-ink); }
.section--green .eyebrow { color: var(--gold); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }

.page-head { padding-block: clamp(2.25rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: var(--step-4); margin-top: .35rem; }
.page-intro { max-width: 46rem; margin-top: 1rem; font-size: var(--step-1); color: var(--muted); line-height: 1.5; }

.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; text-decoration: none; }
.link-arrow svg { width: 1.1em; height: 1.1em; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }
.button {
  display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.3rem; border-radius: var(--radius);
  background: var(--gold); color: #1b1a0c; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.button svg { width: 1.1em; height: 1.1em; }
.button:hover { filter: brightness(1.06); }

/* ---------- Startseite ---------- */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.intro-grid .prose h2 { margin-bottom: 1rem; }
.majestaeten { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.majestaeten img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 22%; }
.maj-text { padding: 1.25rem 1.4rem 1.5rem; display: grid; gap: .4rem; border-top: 4px solid var(--gold); }
.maj-text h2 { font-size: var(--step-2); }
.maj-text .link-arrow { margin-top: .4rem; }
@media (max-width: 820px) { .intro-grid { grid-template-columns: 1fr; } }

.chronik-teaser { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.chronik-teaser > div { max-width: 40rem; display: grid; gap: .6rem; }
.chronik-teaser p:not(.eyebrow) { opacity: .88; }

/* ---------- Text ---------- */
.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose .lead, .lead { font-size: var(--step-1); line-height: 1.55; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .3em; }
.prose blockquote { margin-inline: 0; padding: .2rem 0 .2rem 1.2rem; border-left: 4px solid var(--gold); font-style: italic; color: var(--muted); }
.signature { font-family: var(--f-display); font-weight: 600; font-size: var(--step-1); }
.note { color: var(--muted); font-size: var(--step--1); margin-top: 1.5rem; }

.article-body { margin-inline: auto; max-width: 44rem; }
.article .page-head .wrap { max-width: calc(44rem + 32px); }
.article .page-head h1 { font-size: var(--step-3); }

/* Bilder in Beiträgen */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 1rem; }
.gallery figure, .poster, .inline-right { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .45rem; line-height: 1.4; }
figcaption b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 1rem; }
.poster img { border-radius: var(--radius); box-shadow: var(--shadow); max-height: 80vh; width: auto; }
.inline-right { float: right; width: min(42%, 15rem); margin: .3rem 0 1rem 1.5rem; }
.inline-right img { border-radius: var(--radius); }
.prose h2 { clear: both; }
@media (max-width: 560px) { .inline-right { float: none; width: 100%; margin: 0; } }
[data-lightbox] { cursor: zoom-in; display: block; }

/* ---------- Aktuelles ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; position: relative; }
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.news-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 25%; background: var(--tint); }
.news-text { padding: 1.1rem 1.25rem 1.4rem; display: grid; gap: .45rem; align-content: start; }
.news-text time { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.news-text h3 a { color: var(--ink); text-decoration: none; }
.news-text h3 a::after { content: ""; position: absolute; inset: 0; }
.news-text h3 a:hover { color: var(--link); }
.news-text p { color: var(--muted); font-size: 1rem; }
.news-grid--list .news-card--big { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.news-grid--list .news-card--big .news-img img { height: 100%; aspect-ratio: auto; min-height: 18rem; }
.news-grid--list .news-card--big .news-text { padding: clamp(1.25rem, 3vw, 2.5rem); align-content: center; }
.news-grid--list .news-card--big h3 { font-size: var(--step-3); }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-grid--list .news-card--big { display: flex; }
  .news-grid--list .news-card--big .news-img img { min-height: 0; aspect-ratio: 16 / 10; }
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 44rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 650; display: grid; gap: .15rem; }
.pager small { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }
.pager .newer { text-align: right; }

/* ---------- Termine ---------- */
.year { font-size: var(--step-2); margin: 0 0 1rem; color: var(--muted); }
.termine { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.termin { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.termin-date { display: grid; place-items: center; background: var(--tint); border-radius: 4px; padding: .5rem 0; line-height: 1; font-variant-numeric: tabular-nums; }
.termin-date .d { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; }
.termin-date .m { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: .2rem; }
.termin-when { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.termin h3 { font-size: 1.2rem; margin-top: .1rem; }
.termin-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .55rem; }
.chip { display: inline-flex; align-items: center; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none; background: var(--bg); }
.chip:hover { border-color: var(--link); }
.termin--highlight { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--gold); }
.termin--highlight .termin-date { background: var(--accent); color: var(--accent-ink); }
.termin--highlight .termin-date .m { color: inherit; opacity: .85; }
.termin.past { opacity: .6; }
.termin.past .termin-date { background: transparent; border: 1px dashed var(--line); }
.termin.past.termin--highlight .termin-date { color: var(--ink); }
.termine--next .termin.past { display: none; }
.termine--next .termin.hidden-more { display: none; }
.termine-empty { padding: 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- Königspaare ---------- */
.table-tools { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem 1rem; margin-bottom: 1rem; }
.table-tools label { width: 100%; font-weight: 650; font-size: var(--step--1); }
.table-tools input {
  flex: 1 1 16rem; font: inherit; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.table-tools input:focus-visible { outline-offset: 0; }
.table-count { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.chronik { width: 100%; border-collapse: collapse; font-size: 1rem; }
.chronik th, .chronik td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.chronik thead th { background: var(--head-bg); color: var(--head-ink); font-weight: 650; position: sticky; top: 0; }
.chronik tbody th { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; color: var(--muted); width: 6.5rem; }
.chronik tbody tr:nth-child(even) { background: var(--tint); }
.chronik tbody tr:last-child td, .chronik tbody tr:last-child th { border-bottom: 0; }
.chronik tr.current { background: color-mix(in srgb, var(--gold) 22%, var(--surface)) !important; }
.chronik tr.current th { color: var(--ink); }
.chronik .none { color: var(--muted); }
.chronik mark { background: color-mix(in srgb, var(--gold) 55%, transparent); color: inherit; border-radius: 2px; }
@media (max-width: 560px) {
  .chronik thead { display: none; }
  .chronik, .chronik tbody, .chronik tr, .chronik th, .chronik td { display: block; }
  .chronik tr { padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
  .chronik th, .chronik td { padding: 0; border: 0; }
  .chronik tbody th { width: auto; font-size: .9rem; }
  .chronik td:nth-child(2) { font-weight: 650; }
  .chronik td:nth-child(3)::before { content: "Geckkönig: "; color: var(--muted); }
  .chronik td:nth-child(3):has(.none) { display: none; }
}

/* ---------- Vorstand ---------- */
.vorstand { display: grid; gap: 2.5rem; }
.vorstand-group h2 { font-size: var(--step-2); padding-bottom: .6rem; border-bottom: 3px solid var(--accent); margin-bottom: 1rem; }
.group-note { color: var(--muted); margin: -.4rem 0 1rem; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: .75rem; }
.people li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; display: grid; gap: .1rem; align-content: start; }
.people .amt { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.people .name { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; }
.people .tel { display: inline-flex; align-items: center; gap: .4rem; margin-top: .35rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.people .tel svg { width: 1rem; height: 1rem; }

/* ---------- Satzung ---------- */
.satzung { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.5rem); max-height: calc(100vh - 7rem); overflow: auto; font-size: .95rem; }
.toc summary { font-weight: 700; cursor: pointer; padding: .4rem 0; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: .28rem .6rem; text-decoration: none; color: var(--muted); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--link); border-color: var(--link); }
.toc .toc-h2 a { color: var(--ink); font-weight: 700; margin-top: .8rem; border-color: var(--accent); }
.legal h2 { font-size: var(--step-3); }
.legal h3 { font-size: 1.2rem; }
.signers { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; margin-top: 1rem; padding: 1rem; background: var(--tint); border-radius: var(--radius); }
.signers dt { font-size: var(--step--1); color: var(--muted); }
.signers dd { margin: 0; font-weight: 650; }
@media (max-width: 860px) {
  .satzung { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem; background: var(--surface); }
}

/* ---------- Fuß ---------- */
.site-footer { background: var(--head-bg); color: var(--head-ink); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 3rem 2rem; }
.footer-grid h2 { font-size: 1.1rem; margin-bottom: .8rem; color: var(--gold); }
.footer-brand { display: flex; gap: 1rem; align-items: center; }
.footer-brand img { width: auto; height: 64px; }
.site-footer a { color: var(--head-ink); }
.icon-line { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .6rem; }
.icon-line svg, .social svg { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .2rem; }
.icon-line a { word-break: break-all; }
.social { display: flex; flex-wrap: wrap; gap: .5rem; }
.social a { display: inline-flex; gap: .45rem; align-items: center; padding: .45rem .8rem; border: 1px solid rgb(255 255 255 / .22); border-radius: 999px; text-decoration: none; font-weight: 600; }
.social a svg { margin: 0; }
.social a:hover { background: rgb(255 255 255 / .08); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; padding-block: 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgb(255 255 255 / .12); font-size: var(--step--1); opacity: .85; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lightbox::backdrop { background: rgb(6 12 8 / .92); }
.lightbox[open] { display: grid; place-items: center; align-content: center; gap: .75rem; }
.lightbox img { max-width: min(94vw, 1400px); max-height: 84vh; width: auto; height: auto; border-radius: 4px; }
.lightbox-caption { color: #e8ede6; text-align: center; padding-inline: 1rem; }
.lightbox-close {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + .75rem); right: calc(env(safe-area-inset-right, 0px) + .75rem);
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .nav-toggle, .toc, .pager { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Feinschliff Handy */
@media (max-width: 420px) {
  .brand strong { font-size: 1.05rem; }
  .brand small { font-size: .7rem; }
  .brand img { width: auto; height: 38px; }
}
@media (max-width: 560px) {
  .people { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
  .people li { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: .7rem .9rem; }
  .people li:last-child { border-bottom: 0; }
  .people .name { font-size: 1.1rem; }
}
.article { padding-bottom: clamp(3rem, 7vw, 5rem); }

/* Majestäten: Unterseiten-Umschalter, Foto-Spalte */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.subnav { display: inline-flex; gap: .25rem; margin-top: 1.5rem; padding: .25rem; background: var(--tint); border: 1px solid var(--line); border-radius: 999px; flex-wrap: wrap; }
.subnav a { padding: .45rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 650; color: var(--ink); }
.subnav a:hover { background: var(--surface); }
.subnav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.chronik th.foto, .chronik td.foto { width: 3.5rem; text-align: right; padding-right: .7rem; }
.foto-btn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--link); }
.foto-btn:hover { border-color: var(--link); background: var(--tint); }
.foto-btn svg { width: 1.15rem; height: 1.15rem; }
.chronik .hint { display: block; font-size: var(--step--1); color: var(--muted); font-style: italic; margin-top: .1rem; }
.chronik tr.declined td:nth-child(2) { color: var(--muted); }
.chronik--kinder tbody th { width: 6.5rem; }
@media (max-width: 560px) {
  .chronik td.foto, .chronik th.foto { width: auto; text-align: left; margin-top: .4rem; }
  .chronik td:nth-child(3):has(.none) { display: none; }
  .chronik--kinder td:nth-child(2)::before { content: "König: "; color: var(--muted); font-weight: 400; }
  .chronik--kinder td:nth-child(3)::before { content: "Königin: "; color: var(--muted); }
  .chronik--kinder td:nth-child(2) { font-weight: 400; }
  .chronik--kinder td:nth-child(2), .chronik--kinder td:nth-child(3) { font-weight: 650; }
  .chronik--kinder td:nth-child(2)::before, .chronik--kinder td:nth-child(3)::before { font-weight: 400; }
}

/* Gefilterte Zeilen immer ausblenden (auch wenn Mobile-Layout display:block setzt) */
[hidden] { display: none !important; }

/* Blättern in der Bildansicht */
.lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: rgb(255 255 255 / .16); color: #fff;
  font-size: 2.2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 .2rem;
}
.lightbox-nav:hover, .lightbox-nav:focus-visible { background: rgb(255 255 255 / .3); }
.lightbox-prev { left: calc(env(safe-area-inset-left, 0px) + .75rem); }
.lightbox-next { right: calc(env(safe-area-inset-right, 0px) + .75rem); }
.lightbox-nav[hidden] { display: none !important; }
.lightbox img { touch-action: pan-y pinch-zoom; }
@media (max-width: 560px) {
  .lightbox-nav { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem); transform: none; width: 3.25rem; height: 3.25rem; }
  .lightbox img { max-height: 74vh; }
}

/* Lange deutsche Wörter in Überschriften umbrechen statt überlaufen */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }

/* Jahres-Sprungleiste im Archiv */
.year-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.year-jump a { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 600; font-size: var(--step--1); }
.year-jump a:hover { border-color: currentColor; }
h2.year { scroll-margin-top: 5rem; }
.news-grid + h2.year { margin-top: 2.5rem; }
