/*
Theme Name: DiDiS-World
Description: Theme für DiDiS-World – Angeln & Computer. Dunkel („Saale bei Nacht“), Logbuch-Liste nach Jahren, ohne externe Abhängigkeiten.
Version: 2.0.0
Requires PHP: 8.1
Text Domain: didisworld
*/

/* ---------- Schriften (lokal, keine Google-Server) ---------- */
@font-face { font-family: "Bitter"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/bitter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bitter"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/bitter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: italic; font-display: swap; src: url("assets/fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }

/* ---------- Tokens: „Saale bei Nacht“ ---------- */
:root {
  --bg: #0e1c20;        /* Flusswasser nachts */
  --bg-2: #0a1518;      /* tiefer: Fuß, Kopfbereich */
  --surface: #15282d;   /* Ufer, Felder */
  --line: #253b41;      /* Trennlinien */
  --text: #ece6d6;      /* Papier vom Fangbuch */
  --muted: #9db0ac;     /* Nebel */
  --pose: #ff6a2b;      /* Signalfarbe der Posenspitze – einziger Akzent */
  --reed: #9cc795;      /* Schilf – Themen/Kategorien */
  --font: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bitter", Georgia, "Times New Roman", serif;
  --wrap: 76rem;
  --wrap-text: 44rem;
  --wrap-wide: 64rem; /* Galerien dürfen breiter als der Text sein */
  --r: 4px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef2f0; --bg-2: #e2e8e5; --surface: #ffffff; --line: #cfd9d5;
  --text: #13262a; --muted: #4f6560; --pose: #c4440f; --reed: #36693a;
  color-scheme: light;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Schrift wächst auf grossen Monitoren mit (16px bis 20px), dadurch skaliert das ganze Layout in rem */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; font-size: clamp(100%, 80% + .26vw, 125%); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.125rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; min-height: 100vh;
}
.site-main { flex: 1; padding-block: clamp(2rem, 5vw, 3.5rem); container-type: inline-size; }
.home:not(.paged) .site-main { padding-top: 0; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--pose); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--pose); }
:focus-visible { outline: 2px solid var(--pose); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; margin: 0; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--text { width: min(100% - 2.5rem, var(--wrap-text)); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--pose); color: #111; padding: .6rem 1rem; z-index: 100; }
.skip:focus { top: 1rem; }
.btn, button.btn, input[type="submit"] {
  display: inline-flex; align-items: center; border: 0; cursor: pointer;
  background: var(--pose); color: #15100c; font: 600 1rem/1 var(--font);
  padding: .85rem 1.3rem; border-radius: var(--r); text-decoration: none;
}
.btn:hover, input[type="submit"]:hover { filter: brightness(1.1); color: #15100c; }

/* ---------- Kopf ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg-2) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand__mark { flex: none; }
.brand__text { display: grid; line-height: 1.05; }
.brand__name { font: 700 1.3rem/1.1 var(--font-display); letter-spacing: -.01em; }
.brand__tag { font-size: .85rem; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav__list { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.nav__list a { display: block; padding: .3rem 0; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; border-bottom: 2px solid transparent; }
.nav__list a:hover { color: var(--text); border-color: var(--line); }
.nav__list .current-menu-item > a, .nav__list a[aria-current] { border-color: var(--pose); }
.search { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.search input { border: 0; background: none; color: var(--text); font: inherit; font-size: 1rem; width: 8.5rem; padding: .35rem 0; outline: none; }
.search input::placeholder { color: var(--muted); }
.search button { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; }
.search:focus-within { border-color: var(--pose); }
.search--block { max-width: 460px; margin-block: 1.5rem; gap: .5rem; border: 0; }
.search--block input { flex: 1; width: auto; border-bottom: 1px solid var(--line); padding: .6rem 0; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--muted); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
.nav-toggle { display: none; }
@media (max-width: 980px) {
  .nav-toggle { display: grid; }
  .site-nav { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: .5rem 1.25rem 1.5rem; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { padding: .85rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .nav__list a[aria-current] { color: var(--pose); border-color: var(--line); }
  .search input { width: 100%; flex: 1; }
  .theme-toggle { align-self: flex-start; }
}

/* ---------- Startseiten-Kopf ---------- */
.hero {
  position: relative; isolation: isolate; display: flex; align-items: flex-end; overflow: hidden;
  min-height: clamp(420px, 72vh, 720px); margin-bottom: clamp(2rem, 5vw, 3.5rem);
  background: var(--bg-2);
}
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04); transition: opacity 1.2s ease, transform 8s linear; }
.hero__img.is-active { opacity: 1; transform: scale(1); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(10 21 24 / .15) 0%, rgb(10 21 24 / .35) 40%, rgb(14 28 32 / .92) 88%, var(--bg) 100%); }
:root[data-theme="light"] .hero::before { background: linear-gradient(180deg, rgb(10 21 24 / .1) 0%, rgb(10 21 24 / .45) 55%, rgb(10 21 24 / .85) 100%); }
.hero__inner { padding-block: 4rem clamp(1.5rem, 4vw, 3rem); color: #f3eee2; }
.hero__title { font-size: clamp(3rem, 9vw, 6.5rem); line-height: .92; letter-spacing: -.035em; color: #f3eee2; }
.hero__lead { margin: 1.1rem 0 0; max-width: 34em; font-size: clamp(1.1rem, 2.2vw, 1.35rem); line-height: 1.5; color: rgb(243 238 226 / .9); }
.hero__facts { margin: .9rem 0 0; font-size: .95rem; color: rgb(243 238 226 / .65); }
.hero__nav { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)) auto; gap: .75rem 1.25rem; margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.hero__tab { position: relative; padding-top: .9rem; border-top: 2px solid rgb(243 238 226 / .25); }
.hero__tab::before { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: #ff6a2b; }
.hero__tab.is-active::before { width: 100%; }
.hero.is-playing .hero__tab.is-active::before { animation: hero-progress var(--hero-int, 7s) linear forwards; }
@keyframes hero-progress { from { width: 0; } to { width: 100%; } }
.hero__tab button { all: unset; cursor: pointer; display: block; color: rgb(243 238 226 / .6); transition: color .2s; }
.hero__tab button:focus-visible { outline: 2px solid #ff6a2b; outline-offset: 4px; border-radius: 2px; }
.hero__tab.is-active button, .hero__tab button:hover { color: #f3eee2; }
.hero__tab-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.hero__tab-text { display: block; margin-top: .2rem; font-size: .88rem; line-height: 1.4; }
.hero__tab-link { display: inline-block; margin-top: .35rem; font-size: .85rem; color: #ff8a55; visibility: hidden; }
.hero__tab.is-active .hero__tab-link { visibility: visible; }
.hero__pause { align-self: start; width: 2.25rem; height: 2.25rem; margin-top: .9rem; border: 1px solid rgb(243 238 226 / .35); border-radius: 50%;
  background: rgb(10 21 24 / .35); color: #f3eee2; cursor: pointer; display: grid; place-items: center; }
.hero__pause::before { content: ""; width: .7rem; height: .75rem; border-inline: .22rem solid currentColor; box-sizing: border-box; }
.hero__pause[aria-pressed="true"]::before { width: 0; height: 0; border-block: .4rem solid transparent; border-inline: .65rem solid currentColor; border-right-width: 0; margin-left: .2rem; }
.hero__pause:focus-visible { outline: 2px solid #ff6a2b; outline-offset: 2px; }
@media (max-width: 40rem) {
  .hero__nav { gap: .5rem; }
  .hero__tab-text, .hero__tab-link { display: none; }
  .hero__nav { position: relative; padding-bottom: 1.9rem; }
  .hero__tab { padding-top: 0; position: static; }
  .hero__tab::before { position: static; display: block; margin-top: -2px; }
  .hero__tab button { min-height: 2.75rem; width: 100%; }
  .hero__tab-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero__tab.is-active .hero__tab-title { left: 0; bottom: 0; width: auto; height: auto; clip-path: none; font-size: 1rem; color: #f3eee2; }
  .hero__pause { margin-top: .25rem; }
}
@media (prefers-reduced-motion: reduce) { .hero__img { transition: opacity .3s; transform: none; } }

.page-head { padding-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.75rem); }
.page-head p { margin: .5rem 0 0; }

/* ---------- Themen-Leiste ---------- */
.topics { display: flex; gap: 1.6rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.topics::-webkit-scrollbar { display: none; }
.topics a { flex: none; padding: .7rem 0; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.topics a span { font-weight: 400; font-size: .85rem; margin-left: .15rem; opacity: .8; }
.topics a:hover { color: var(--text); }
.topics a[aria-current] { color: var(--text); border-color: var(--pose); }

/* ---------- Fangbuch: Jahrgänge und Einträge ---------- */
.year { position: relative; }
.year + .year { margin-top: clamp(2rem, 5vw, 3.5rem); }
.year__label {
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); line-height: 1; letter-spacing: -.03em;
  color: var(--pose); margin-bottom: .6rem;
}
@media (min-width: 1040px) {
  .year { display: grid; grid-template-columns: 10.5rem 1fr; gap: 2.5rem; }
  .year__label { position: sticky; top: 96px; align-self: start; margin: 0; padding-top: 1.3rem; }
}

.entry {
  position: relative; display: grid; gap: .3rem 1.75rem;
  grid-template-columns: 5.2rem 1fr minmax(0, 15rem);
  grid-template-areas: "date body media";
  padding-block: 1.6rem; border-top: 1px solid var(--line);
}
.year__entries > .entry:first-child { border-top-color: transparent; }
.entry__date { grid-area: date; display: grid; align-content: start; line-height: 1; padding-top: .15rem; }
.entry__day { font: 700 2.4rem/1 var(--font-display); letter-spacing: -.02em; }
.entry__month { margin-top: .35rem; font-size: .9rem; color: var(--muted); }
.entry__body { grid-area: body; min-width: 0; }
.entry__title { font-size: clamp(1.2rem, 1rem + .8vw, 1.45rem); }
.entry__title a { text-decoration: none; }
.entry__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* ganzer Eintrag klickbar */
.entry:hover .entry__title a { color: var(--pose); }
.entry__excerpt { margin: .55rem 0 0; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.entry__meta, .post__meta { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin: .7rem 0 0; font-size: .92rem; color: var(--muted); }
.entry__meta a, .post__meta a { position: relative; z-index: 2; }
.entry__cat { color: var(--reed) !important; font-weight: 600; text-decoration: none; }
.entry__cat:hover { text-decoration: underline; }
.entry__media { grid-area: media; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r); background: var(--bg-2); align-self: start; }
.entry__media > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.entry:hover .entry__media > img { transform: scale(1.04); }

@media (max-width: 760px) {
  .entry { grid-template-columns: 1fr; grid-template-areas: "media" "date" "body"; padding-block: 1.4rem 1.8rem; }
  .year__entries > .entry:first-child { padding-top: .5rem; }
  .entry__media { aspect-ratio: 16 / 9; margin-bottom: .6rem; }
  .entry__date { display: flex; gap: .4rem; align-items: baseline; padding: 0; }
  .entry__day, .entry__month { font: 600 .95rem/1.2 var(--font); color: var(--muted); margin: 0; letter-spacing: 0; }
  .entry__day::after { content: "."; }
}

/* Bild-Varianten */
.media-contain { position: relative; width: 100%; height: 100%; overflow: hidden; display: grid; place-items: center; }
.media-contain::before { content: ""; position: absolute; inset: -20px; background: var(--img) center / cover; filter: blur(20px) brightness(.5) saturate(1.1); }
.media-contain img { position: relative; width: auto; height: auto; max-width: 90%; max-height: 88%; object-fit: contain; border-radius: 3px; }
.tile { width: 100%; height: 100%; display: grid; place-items: center; color: color-mix(in srgb, var(--reed) 55%, transparent);
  background: repeating-linear-gradient(-45deg, transparent 0 9px, color-mix(in srgb, var(--line) 45%, transparent) 9px 10px), var(--surface); }
.tile__label { display: none; }

/* ---------- Seiten blättern ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2rem 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-family: var(--font-display); }
.pager .page-numbers { padding: .4rem .2rem; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 1.1rem; border-bottom: 2px solid transparent; }
.pager a.page-numbers:hover { color: var(--text); }
.pager .current { color: var(--text); border-color: var(--pose); }
.pager .prev, .pager .next { font-family: var(--font); font-size: 1rem; color: var(--text); }

/* ---------- Beitrag ---------- */
.post__head { padding-bottom: 2rem; }
.post__date { display: block; font: 600 1.05rem/1.2 var(--font-display); color: var(--pose); margin-bottom: .8rem; }
.post__title { font-size: clamp(1.85rem, 1.1rem + 2.4vw, 2.6rem); line-height: 1.12; max-width: 24em; }
.prose { font-size: 1.125rem; line-height: 1.7; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.prose p:has(> a > img.aligncenter:only-child) { margin-block: 1.6em; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.9em; }
.prose h2 + *, .prose h3 + * { margin-top: .5em; }
.prose h4 { font: 600 1.05rem/1.3 var(--font); margin-top: 1.6em; }
.prose a { text-decoration-color: var(--pose); text-decoration-thickness: 1.5px; overflow-wrap: anywhere; word-break: break-word; }
.prose strong { font-weight: 600; }
.prose * { max-width: 100%; }
.prose img { height: auto !important; border-radius: var(--r); }
.prose a img { display: inline-block; }
.prose .alignright, .prose img.alignright { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 45%; }
.prose .alignleft, .prose img.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 45%; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) {
  .prose .alignright, .prose .alignleft, .prose img.alignright, .prose img.alignleft { float: none; margin: 1rem 0; max-width: 100%; }
}
.prose blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 3px solid var(--pose); color: var(--muted); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--pose); }
.prose code { background: var(--surface); padding: .1rem .35rem; border-radius: 3px; font-size: .88em; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); padding: 1rem 1.2rem; border-radius: var(--r); overflow-x: auto; white-space: pre-wrap; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }
.prose iframe, .prose embed, .prose object { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }
.prose [style*="width"] { max-width: 100% !important; }
.prose div[style*="float"], .prose p[style*="float"] { float: none !important; }
.prose font { color: inherit !important; font-family: inherit !important; }
.prose [style*="color"] { color: inherit !important; }
.prose [style*="background"] { background: transparent !important; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .9rem; color: var(--muted); margin-top: .45rem; }

/* Galerien: Zeilen mit echten Seitenverhältnissen (justified), breiter als die Textspalte */
.didi-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 2rem; }
.prose .didi-gallery, .prose .didi-gallery__more { max-width: none; width: min(100cqi - 2.5rem, var(--wrap-wide)); margin-inline: calc((100% - min(100cqi - 2.5rem, var(--wrap-wide))) / 2); }
.didi-gallery::after { content: ""; flex: 999 1 0; } /* letzte Reihe nicht aufblähen */
.didi-gallery__item { position: relative; display: block; overflow: hidden; border-radius: 3px; background: var(--bg-2);
  flex: var(--r, 1.333) 1 calc(var(--r, 1.333) * 9rem); aspect-ratio: var(--r, 1.333); max-height: 22rem; }
.prose > .didi-gallery__item, .prose .didi-gallery > * + * { margin: 0; }
.prose .didi-gallery__item img, .didi-gallery__item img { position: absolute; inset: 0; width: 100%; height: 100% !important; max-width: none; object-fit: cover; border-radius: 0; transition: transform .4s ease, filter .4s ease; }
.didi-gallery__item:hover img { transform: scale(1.03); filter: brightness(1.08); }
.didi-gallery[data-count="1"] .didi-gallery__item { flex-basis: 100%; max-height: none; }
@media (max-width: 600px) { .didi-gallery__item { flex-basis: calc(var(--r, 1.333) * 7rem); } }
.didi-gallery.is-collapsed .is-extra { display: none; }
.prose .didi-gallery__more { margin-top: -1rem; margin-bottom: 2rem; }
.btn--quiet { background: none !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.btn--quiet:hover { border-color: var(--pose) !important; color: var(--pose) !important; filter: none; }
.didi-pic { margin: 1.6rem 0; }
.didi-pic img { display: block; width: auto; max-width: 100%; height: auto; }
.didi-pic.aligncenter img { margin-inline: auto; }

/* Bildansicht (PhotoSwipe) */
.pswp { --pswp-bg: #060c0e; --pswp-placeholder-bg: #15282d; --pswp-icon-color: #ece6d6; --pswp-icon-color-secondary: #060c0e; --pswp-icon-stroke-color: #060c0e; --pswp-error-text-color: #ece6d6; font-family: var(--font); }
.pswp__counter { font: 600 .95rem/1 var(--font); opacity: .8; margin: 0 0 0 1.25rem; height: 60px; line-height: 60px; }
.pswp__button { opacity: .8; }
.pswp__button:hover, .pswp__button:focus-visible { opacity: 1; }
.pswp__button--arrow { width: 72px; }
.pswp__button--arrow .pswp__icn { background: rgb(255 255 255 / .1); border-radius: 50%; padding: 6px; width: 48px; height: 48px; margin-top: -24px; }
.pswp__button--arrow:hover .pswp__icn { background: var(--pose); }
.pswp__caption { position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: min(100%, 52rem); margin: 0; padding: .9rem 1.2rem 1.3rem; text-align: center; color: rgb(236 230 214 / .85); font-size: .98rem; line-height: 1.45; transition: opacity .25s; }
.pswp--ui-visible .pswp__caption { opacity: 1; }
.pswp:not(.pswp--ui-visible) .pswp__caption { opacity: 0; }
@media (max-width: 600px) { .pswp__button--arrow { display: none !important; } }

/* YouTube und andere fremde Inhalte erst nach Klick */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; margin-block: 1.6rem; }
.yt.is-playing { display: block; border: 0; }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt__btn { display: grid; justify-items: center; gap: .6rem; background: none; border: 0; color: var(--text); font: 600 1rem var(--font); cursor: pointer; }
.yt__note { position: absolute; bottom: .8rem; left: 1rem; right: 1rem; text-align: center; margin: 0; font-size: .8rem; color: var(--muted); }
.ext-embed { display: grid; place-content: center; justify-items: center; gap: .6rem; text-align: center; min-height: 200px; padding: 1.5rem; margin-block: 1.6rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.ext-embed__btn { border: 0; cursor: pointer; background: var(--pose); color: #15100c; font: 600 1rem var(--font); padding: .75rem 1.2rem; border-radius: var(--r); }
.ext-embed__note { margin: 0; font-size: .85rem; color: var(--muted); max-width: 40ch; }
.ext-embed.is-loaded { display: block; padding: 0; border: 0; min-height: 0; background: none; }
.ext-embed iframe { width: 100%; min-height: 166px; border: 0; }

/* App-Hinweis */
.appcard { display: flex; align-items: center; gap: .9rem; max-width: 460px; margin-block: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none !important; }
.appcard:hover { border-color: var(--pose); color: var(--text); }
.appcard__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--reed); }
.appcard__text { display: grid; line-height: 1.3; min-width: 0; }
.appcard__text strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appcard__text span { font-size: .9rem; color: var(--muted); }

/* Tabellen (Schonzeiten, Messen, Termine) */
.prose .table-wrap { overflow-x: auto; }
.prose .didi-table { display: table; width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose .didi-table th { text-align: left; font: 600 .95rem/1.3 var(--font-display); color: var(--muted); border-bottom: 2px solid var(--line); padding: .6rem .8rem .6rem 0; white-space: nowrap; }
.prose .didi-table td { border-bottom: 1px solid var(--line); padding: .6rem .8rem .6rem 0; vertical-align: top; }
.prose .didi-table td:empty::after { content: "–"; color: var(--muted); }
@media (max-width: 640px) {
  .prose .didi-table, .prose .didi-table tbody, .prose .didi-table tr, .prose .didi-table td { display: block; width: 100%; }
  .prose .didi-table thead { display: none; }
  .prose .didi-table tr { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .prose .didi-table td { border: 0; padding: .15rem 0; display: grid; grid-template-columns: 8.5rem 1fr; gap: .6rem; }
  .prose .didi-table td::before { content: attr(data-label); color: var(--muted); font-size: .9rem; }
  .prose .didi-table td:first-child { font: 700 1.15rem/1.3 var(--font-display); grid-template-columns: 1fr; padding-bottom: .4rem; }
  .prose .didi-table td:first-child::before { display: none; }
}

.post__foot { margin-top: 3rem; }
.tags { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: 0 0 2.5rem; font-size: .98rem; }
.tags a { color: var(--reed); }
.postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.postnav__item { display: grid; gap: .3rem; color: var(--text); text-decoration: none; font: 600 1.15rem/1.3 var(--font-display); }
.postnav__dir { font: 400 .9rem/1.2 var(--font); color: var(--muted); }
.postnav__item--next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .postnav { grid-template-columns: 1fr; gap: 1.2rem; } .postnav__item--next { grid-column: 1; text-align: left; } }
.related { margin-top: 4rem; }
.related__title { font-size: 1.5rem; padding-bottom: .4rem; }

/* ---------- Kommentare ---------- */
.comments { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.comment-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-top: 1.5rem; padding: 1.3rem 1.5rem; background: var(--surface); border-radius: var(--r); }
.comment-cta__text { margin: 0; font-size: 1.05rem; }
.comments:not(.is-collapsed) .comment-cta { display: none; }
.comments.is-collapsed .comment-respond:not(:target) { display: none; }
.comment-list .comment-respond { margin: .5rem 0 2rem 1.1rem; }
.reply { margin: .3rem 0 0; font-size: .92rem; }
.comment-reply-link { color: var(--reed); font-weight: 600; text-decoration: none; }
.comment-reply-link:hover { text-decoration: underline; }
.comment-awaiting-moderation { display: block; margin-top: .3rem; color: var(--pose); font-size: .92rem; }
.post__comment-link { color: var(--pose) !important; font-weight: 600; text-decoration: none; position: relative; z-index: 2; }
.post__comment-link:hover { text-decoration: underline; }
#cancel-comment-reply-link { margin-left: .8rem; font: 400 .95rem var(--font); color: var(--muted); }
.comments .section-h, .comment-reply-title { font-size: 1.5rem; margin: 0 0 1.2rem; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: clamp(1rem, 4vw, 2.5rem); }
.comment-body { border-left: 2px solid var(--line); padding: .2rem 0 .2rem 1.1rem; margin-bottom: 1.6rem; overflow-wrap: anywhere; }
.comment-body a { word-break: break-word; }
.comment-author { font-weight: 600; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .88rem; margin: .1rem 0 .4rem; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-content p { margin: .35rem 0; }
.reply a { font-size: .9rem; font-weight: 600; }
.comment-respond { margin-top: 2.5rem; }
.comment-form { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.comment-form > p { margin: 0; }
.comment-form .comment-notes { font-size: .95rem; }
@media (min-width: 640px) { .comment-form { grid-template-columns: 1fr 1fr; } .comment-form > p:not(.comment-form-author):not(.comment-form-email) { grid-column: 1 / -1; } }
.comment-respond .comment-reply-title { margin-bottom: .8rem; }
.comment-form label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .7rem .9rem; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--pose); outline: none; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .95rem; }
.comment-form-cookies-consent label { font-weight: 400; }

/* Kontaktformular */
.prose .lead { font-size: 1.3rem; line-height: 1.5; }
.prose .wpcf7 { margin-top: 2rem; }
.wpcf7-form { display: grid; gap: 1.3rem; }
.wpcf7-form > * + * { margin: 0; }
.cf-grid { display: grid; gap: 1.3rem; }
@media (min-width: 640px) { .cf-grid { grid-template-columns: 1fr 1fr; } }
.prose .cf-field { margin: 0; display: grid; gap: .45rem; }
.cf-field label { font: 600 1rem/1.3 var(--font); color: var(--text); }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="hidden"]), .wpcf7 textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r); padding: .8rem .95rem; transition: border-color .15s ease; }
.wpcf7 textarea { min-height: 11rem; resize: vertical; line-height: 1.55; }
.wpcf7 input:hover, .wpcf7 textarea:hover { border-color: var(--muted); }
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--pose); outline: 2px solid color-mix(in srgb, var(--pose) 35%, transparent); outline-offset: 1px; }
.cf-quiz .wpcf7-quiz-label { display: block; font-size: 1rem; color: var(--muted); margin-bottom: .45rem; }
.cf-quiz .wpcf7-form-control-wrap { max-width: 16rem; }
.prose .cf-actions { margin: .3rem 0 0; display: flex; align-items: center; gap: 1rem; }
.wpcf7 input[type="submit"] { font-size: 1.05rem; padding: .9rem 1.5rem; }
.wpcf7 input[type="submit"]:disabled { opacity: .6; cursor: progress; }
.wpcf7 .wpcf7-spinner { background-color: var(--muted); margin: 0; }
.wpcf7-not-valid-tip { color: var(--pose); font-size: .92rem; margin-top: .35rem; }
.wpcf7 .wpcf7-not-valid { border-color: var(--pose) !important; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: .9rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line); border-left-width: 4px; font-size: 1rem; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--reed); }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.aborted .wpcf7-response-output { border-color: var(--pose); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.prose .form-note { margin-top: 2rem; font-size: .95rem; color: var(--muted); }

/* ---------- Leer / 404 ---------- */
.empty { padding-block: 2rem; }
.empty h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .6rem; }

/* ---------- Fuß ---------- */
.site-footer { margin-top: 5rem; background: var(--bg-2); border-top: 1px solid var(--line); font-size: 1rem; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1.5fr repeat(3, 1fr); padding-block: 3rem 2.2rem; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__grid > :first-child { grid-column: 1 / -1; } }
.site-footer__name { font: 700 1.35rem/1.2 var(--font-display); margin: 0 0 .5rem; }
.site-footer__grid p { margin: 0; max-width: 34em; }
.footer-h { font: 600 1rem/1.3 var(--font-display); color: var(--text); margin: 0 0 .7rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer-list--years { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-family: var(--font-display); font-weight: 600; }
.footer-list a { color: var(--muted); text-decoration: none; }
.footer-list a:hover { color: var(--text); text-decoration: underline; }
.site-footer__bottom { padding-block: 1.2rem 2rem; border-top: 1px solid var(--line); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
