/* ==========================================================================
   sportomatic.net – Retro-Design: Viperngrün, Sattelbraun, Elfenbein
   Alle Schriften liegen auf dem eigenen Server (assets/fonts, SIL Open Font License).
   ========================================================================== */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/playfair-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/courier-prime-latin-400-normal.woff2") format("woff2"); }

:root {
  /* Farben */
  --ivory: #F4EFE2;          /* Hintergrund: altes Handbuchpapier */
  --paper: #FAF6EC;          /* Karten, Formulare */
  --parchment: #EADFCB;      /* Tabellenköpfe, Flächen */
  --ink: #222222;            /* Text */
  --ink-soft: #4E463C;       /* Nebentext */
  --saddle: #5A2E16;         /* Sattelbraun: Lederflächen, Footer */
  --saddle-dark: #43210F;
  --cognac: #7B4021;         /* Rahmen, Nähte, Zwischentitel */
  --viper: #1E8238;          /* Viperngrün: Buttons (weiße Schrift 4,9:1) */
  --viper-deep: #1B6E2E;     /* Viperngrün dunkel: Links auf Elfenbein (5,5:1) */
  --viper-bright: #7FCB4E;   /* Viperngrün hell: nur auf Leder/dunkel (5,8:1) */

  /* Schrift */
  --f-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-type: "Courier Prime", "Courier New", monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --stitch: 1.5px dashed rgba(123, 64, 33, .55);
  --stitch-light: 1.5px dashed rgba(244, 239, 226, .45);
  --shadow: 0 1px 0 rgba(90, 46, 22, .08), 0 10px 24px -14px rgba(90, 46, 22, .45);
  --wrap: 74rem;
  --measure: 44rem;

  /* feine Körnung als Papierhaptik */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='l'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23l)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory) var(--grain);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--viper-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--saddle); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--viper); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.15; color: var(--saddle); margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); margin-top: 1.8em; }
h3 { font-size: 1.35rem; margin-top: 1.5em; }
h4 { font-family: var(--f-body); font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-top: 1.4em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--viper); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip:focus { left: .5rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1.2 var(--f-body); letter-spacing: .01em;
  padding: .72em 1.25em; border-radius: 10px; border: 2px solid transparent; background: transparent; color: inherit;
  cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn-lg { font-size: 1.08rem; padding: .85em 1.45em; }
.btn-primary { background: var(--viper); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.18), 0 6px 14px -8px rgba(27, 110, 46, .9); }
.btn-primary:hover { background: var(--viper-deep); color: #fff; }
.btn-secondary { background: transparent; color: var(--cognac); border-color: var(--cognac); }
.btn-secondary:hover { background: var(--cognac); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ink-soft); text-decoration: underline; text-underline-offset: .2em; padding-inline: .6em; }
.btn-ghost:hover { color: var(--saddle); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 239, 226, .94);
  backdrop-filter: saturate(1.2) blur(6px);
  border-top: 7px solid var(--saddle);
  box-shadow: 0 1px 0 rgba(123, 64, 33, .25);
}
.site-header::before { /* Naht im Lederband */
  content: ""; position: absolute; left: 0; right: 0; top: -4px; border-top: 1.5px dashed rgba(244, 239, 226, .5);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--saddle); }
.brand:hover { color: var(--saddle); }
.brand-knob { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--f-head); font-style: italic; font-weight: 600; font-size: 1.55rem; }
.brand-tag { font-family: var(--f-type); font-size: .82rem; color: var(--ink-soft); margin-top: .2rem; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; gap: .15rem; }
.main-nav a { display: block; padding: .55rem .8rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.02rem; }
.main-nav a:hover { color: var(--saddle); background: var(--parchment); }
.main-nav a[aria-current="page"] { color: var(--viper-deep); font-weight: 600; box-shadow: inset 0 -3px 0 var(--viper); border-radius: var(--radius-sm) var(--radius-sm) 2px 2px; }
.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle { width: 1.6rem; height: 2.2rem; margin-left: -.5rem; border: 0; background: none; cursor: pointer; color: var(--cognac); }
.sub-toggle::after { content: ""; display: block; width: .45rem; height: .45rem; margin: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.sub-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.sub {
  position: absolute; top: calc(100% + .35rem); left: 0; min-width: 13rem; padding: .45rem;
  background: var(--paper); border: 1px solid var(--cognac); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.sub::before { content: ""; position: absolute; inset: 4px; border: var(--stitch); border-radius: 9px; pointer-events: none; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.is-open > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { position: relative; }

.nav-toggle { display: none; align-items: center; gap: .5rem; padding: .6rem .85rem; border: 0; border-radius: 10px; background: var(--viper); color: #fff; font: 600 1rem var(--f-body); cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle-bars { position: relative; }
.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"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper) var(--grain); border-bottom: 6px solid var(--saddle);
    box-shadow: 0 18px 30px -18px rgba(90, 46, 22, .6);
    max-height: calc(100vh - 5rem); overflow-y: auto;
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .main-nav > ul > li { border-bottom: 1px dashed rgba(123, 64, 33, .35); }
  .main-nav a { padding: .85rem .25rem; font-size: 1.12rem; border-radius: 0; }
  .main-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--viper); padding-left: .8rem; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { width: 3rem; height: 3rem; margin: 0; }
  .sub { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 .5rem 1rem; background: none; border: 0; box-shadow: none; display: none; opacity: 1; visibility: visible; transform: none; }
  .sub::before { display: none; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.is-open > .sub { display: block; }
  .sub a { padding: .6rem .25rem; font-size: 1.02rem; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 1.3rem; }
  .brand-knob { width: 40px; height: 40px; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 5vw, 5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(60rem 30rem at 85% 40%, rgba(127, 203, 78, .16), transparent 70%),
    radial-gradient(40rem 26rem at 5% 0%, rgba(123, 64, 33, .10), transparent 70%);
  border-bottom: 1px solid rgba(123, 64, 33, .25);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero-kicker { font-family: var(--f-type); font-size: 1rem; color: var(--cognac); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.2rem, 1.2rem + 2.8vw, 3.35rem); line-height: 1.06; margin-bottom: .45em; text-wrap: balance; }
.hero-lead { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); color: var(--ink-soft); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* ---------- Schaltschema-Viewer ---------- */
.gate { container-type: inline-size; }
.gate-inner { display: grid; gap: 1.25rem; }
.gate-visual { display: flex; justify-content: center; }
.gate-knob { width: min(100%, 380px); height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.gate-ring { stroke: var(--viper-bright); }
.gate-lines { stroke: #EFE7D4; }
.gate-letters text { fill: #EFE7D4; font: 600 42px var(--f-body); cursor: pointer; transition: fill .15s; }
.gate-letters text .idx { font-size: 24px; }
.gate-letters text.is-active { fill: var(--viper-bright); }
.gate-targets circle { fill: transparent; stroke: transparent; stroke-width: 3; cursor: pointer; transition: stroke .15s; }
.gate-targets circle:hover { stroke: rgba(127, 203, 78, .7); }
.gate-lever { fill: var(--viper-bright); stroke: #F4EFE2; stroke-width: 4; transition: transform .16s cubic-bezier(.3,.7,.4,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); pointer-events: none; }
.gate-panel {
  position: relative; background: var(--paper); border: 1px solid var(--cognac); border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1rem; box-shadow: var(--shadow);
}
.gate-panel::before { content: ""; position: absolute; inset: 5px; border: var(--stitch); border-radius: 10px; pointer-events: none; }
.gate-keys { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.gate-key {
  min-width: 2.9rem; min-height: 2.75rem; padding: 0 .55rem; border-radius: 9px;
  border: 1.5px solid var(--cognac); background: var(--ivory); color: var(--saddle);
  font: 700 1.05rem var(--f-body); cursor: pointer; transition: background-color .15s, color .15s;
}
.gate-key:hover { background: var(--parchment); }
.gate-key[aria-pressed="true"] { background: var(--viper); border-color: var(--viper); color: #fff; }
.gate-info { min-height: 8.5rem; }
.gate-gear { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .35rem; }
.gate-gear [data-gate-label] { font: 700 2rem/1 var(--f-head); color: var(--saddle); }
.gate-gear-name { font-weight: 600; color: var(--viper-deep); }
.gate-text { margin-bottom: .6rem; }
.gate-clutch { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 600; color: var(--ink-soft); margin: 0; padding: .2rem .65rem; border-radius: 999px; background: var(--ivory); }
.gate-clutch .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--cognac); transition: background-color .3s; }
.gate-clutch[data-state="slipping"] .dot { background: #C8963E; }
.gate-clutch[data-state="engaged"] .dot { background: var(--viper); }
.gate-hint { font-size: .93rem; color: var(--ink-soft); margin: .8rem 0 0; }
@container (min-width: 640px) {
  .gate-inner { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: center; gap: 2rem; }
}
.prose .gate { margin: 2rem 0; }
.gate-compact .gate-hint { display: none; }

/* ---------- Startseite ---------- */
.home-content > section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-head { max-width: var(--measure); margin-bottom: 1.75rem; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--ink-soft); }

.cards { display: grid; gap: clamp(1rem, 2vw, 1.75rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.5rem), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--cognac); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: 6px; border: var(--stitch); border-radius: 10px; pointer-events: none; }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--parchment); border-bottom: 1px solid rgba(123, 64, 33, .4); }
.card-img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.15) saturate(.95); transition: transform .4s; }
.card-body { padding: 1.15rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 .4rem; font-size: 1.4rem; }
.card p { color: var(--ink-soft); margin-bottom: 1rem; }
.card .card-more { margin-top: auto; font-weight: 600; color: var(--viper-deep); text-decoration: underline; text-underline-offset: .2em; }
a.card:hover { color: var(--ink); }
a.card:hover .card-img img { transform: scale(1.03); }
a.card:hover .card-more { color: var(--saddle); }

.leather {
  position: relative; color: var(--ivory);
  background: var(--saddle) var(--leather);
  background-blend-mode: multiply;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -1px 0 rgba(0,0,0,.25);
}
.leather::before, .leather::after { content: ""; position: absolute; left: 0; right: 0; border-top: var(--stitch-light); }
.leather::before { top: 10px; }
.leather::after { bottom: 10px; }
.leather h2, .leather h3 { color: var(--ivory); }
.leather a:not(.btn) { color: var(--viper-bright); }
.leather .btn-secondary { color: var(--ivory); border-color: rgba(244, 239, 226, .7); }
.leather .btn-secondary:hover { background: var(--ivory); color: var(--saddle); }
.register { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; }
.register p { color: #EDE3CF; max-width: 40rem; }
.register-perk { font-family: var(--f-type); font-size: 1.05rem; color: var(--viper-bright) !important; }
.register-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.register figure { margin: 0; }
.register img { border-radius: 10px; border: 4px solid var(--ivory); box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); transform: rotate(1.2deg); }
.register figcaption { font-size: .9rem; color: #D9CBB2; margin-top: .6rem; }
@media (max-width: 800px) { .register { grid-template-columns: 1fr; } }

.signature { font-family: var(--f-head); font-style: italic; font-size: 1.25rem; margin-top: 1.25rem; }

/* ---------- Unterseiten ---------- */
.page-head { padding: clamp(1.75rem, 4vw, 3rem) 0 1.5rem; border-bottom: 1px solid rgba(123, 64, 33, .25); margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.page-head h1 { margin-bottom: .3em; max-width: 52rem; text-wrap: balance; }
.page-intro { font-size: 1.22rem; color: var(--ink-soft); max-width: var(--measure); margin: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .5rem; margin: 0 0 1rem; padding: 0; font-size: .95rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--cognac); }
.crumbs a { color: var(--ink-soft); }
.page-updated { font-size: .9rem; color: var(--ink-soft); margin: 2.5rem 0 3rem; }

.prose { padding-bottom: 2rem; }
.prose > * { max-width: var(--measure); }
.prose > .wide, .prose > .table-wrap, .prose > .gallery, .prose > .gate, .prose > .cards, .prose > .books, .prose > .figure-row, .prose > .embed, .prose > .spec { max-width: none; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--cognac); }
.prose blockquote { margin: 1.75rem 0; padding: .4rem 0 .4rem 1.25rem; border-left: 4px solid var(--viper); font-family: var(--f-head); font-style: italic; font-size: 1.2rem; color: var(--saddle); }
.prose hr { border: 0; border-top: var(--stitch); margin: 2.5rem 0; }
.source { font-size: .92rem; color: var(--ink-soft); font-style: italic; }

.prose figure { margin: 2rem 0; }
.prose figure img { border-radius: var(--radius-sm); border: 1px solid rgba(123, 64, 33, .45); background: var(--paper); }
.prose figcaption, .gallery figcaption { font-size: .93rem; color: var(--ink-soft); margin-top: .55rem; }
.figure-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; align-items: start; }
.figure-row figure { margin: 0; }
.float-right { float: right; width: min(42%, 260px); margin: .3rem 0 1rem 1.75rem !important; }
@media (max-width: 640px) { .float-right { float: none; width: 100%; margin: 1.5rem 0 !important; } }
.clear { clear: both; }

/* Legenden mit Bauteilnummern (wie im Werkstatthandbuch) */
.legend { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .45rem 1.5rem; }
.legend li { display: flex; align-items: baseline; gap: .6rem; margin: 0; }
.legend b, .part { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; border-radius: 50%; background: var(--saddle); color: var(--ivory); font: 700 .85rem/1 var(--f-body); }
.part { vertical-align: .1em; margin: 0 .1rem; }

/* Infokästen */
.note { position: relative; background: var(--paper); border: 1px solid var(--cognac); border-radius: var(--radius); padding: 1.15rem 1.4rem; margin: 1.75rem 0; }
.note::before { content: ""; position: absolute; inset: 5px; border: var(--stitch); border-radius: 10px; pointer-events: none; }
.note > :last-child { margin-bottom: 0; }
.note-title { font-family: var(--f-head); font-weight: 700; color: var(--saddle); font-size: 1.15rem; margin-bottom: .4rem; }

/* Technische Daten */
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1px; background: rgba(123, 64, 33, .35); border: 1px solid var(--cognac); border-radius: var(--radius); overflow: hidden; margin: 1.75rem 0; }
.spec div { background: var(--paper); padding: .8rem 1rem; }
.spec dt { font-size: .9rem; color: var(--ink-soft); }
.spec dd { margin: 0; font-weight: 600; font-size: 1.1rem; color: var(--saddle); }
.spec dd small { display: block; font-weight: 400; font-size: .88rem; color: var(--ink-soft); }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2.25rem; border: 1px solid var(--cognac); border-radius: var(--radius); background: var(--paper); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(123, 64, 33, .18); }
thead th { background: var(--saddle); color: var(--ivory); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(127, 203, 78, .10); }
tr.group th { background: var(--parchment); color: var(--saddle); font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; padding-top: .7rem; }
tr.group th span { font-family: var(--f-body); font-weight: 500; font-size: .95rem; color: var(--ink-soft); margin-left: .5rem; }
td.mono { white-space: nowrap; }

/* Galerie + Lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; margin: 1.5rem 0 2.25rem; }
.gallery a { display: block; padding: 5px; background: var(--paper); border: 1px solid rgba(123, 64, 33, .5); border-radius: 10px; box-shadow: var(--shadow); transition: transform .2s; }
.gallery a:hover { transform: translateY(-2px); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.gallery.gallery-pages img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(35, 18, 8, .88); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 3.5rem 1rem 4.5rem; }
.lightbox img { max-width: min(100%, 1400px); max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.5); background: var(--paper); }
.lightbox-caption { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; text-align: center; color: var(--ivory); font-size: 1rem; }
.lightbox button { position: absolute; border: 0; border-radius: 50%; width: 3rem; height: 3rem; background: rgba(244, 239, 226, .92); color: var(--saddle); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: #fff; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Bücher mit Werbelinks */
.books { display: grid; gap: 1.25rem; margin: 1.5rem 0 2rem; }
.book { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; align-items: start; padding: 1rem; background: var(--paper); border: 1px solid rgba(123, 64, 33, .45); border-radius: var(--radius); }
.book img { width: 100%; border-radius: 4px; box-shadow: 2px 3px 8px rgba(0,0,0,.25); }
.book h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
.book p { margin: 0; color: var(--ink-soft); }
.ad-label, .ad-tag { display: inline-block; margin-left: .15rem; padding: .05rem .45rem; border: 1px solid var(--cognac); border-radius: 999px; font-size: .74rem; font-weight: 600; color: var(--cognac); vertical-align: .15em; line-height: 1.4; font-family: var(--f-body); cursor: help; }
.ad-note { font-size: .95rem; color: var(--ink-soft); }

/* Linkliste */
.linklist { list-style: none; padding: 0 !important; display: grid; gap: .9rem; }
.linklist li { padding: .9rem 1.1rem; background: var(--paper); border-left: 4px solid var(--viper); border-radius: 0 10px 10px 0; margin: 0; }
.linklist a { font-weight: 600; font-size: 1.1rem; }
.linklist span { display: block; color: var(--ink-soft); }

/* Blog */
.post-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); margin-bottom: 2rem; }
.post-teaser { display: flex; flex-direction: column; background: var(--paper); border: 1px solid rgba(123, 64, 33, .45); border-radius: var(--radius); overflow: hidden; }
.post-teaser-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-teaser-body { padding: 1.1rem 1.3rem 1.3rem; }
.post-teaser h3 { margin: 0 0 .4rem; font-size: 1.3rem; }
.post-teaser h3 a { color: var(--saddle); text-decoration: none; }
.post-teaser h3 a:hover { text-decoration: underline; }
.post-teaser p { color: var(--ink-soft); margin: 0; }
.post-date { font-size: .92rem; color: var(--cognac); margin: 0 0 .35rem; }
.post-cover img { width: 100%; max-height: 32rem; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 3rem; border-top: var(--stitch); margin-top: 2rem; }
.post-nav a { text-decoration: none; font-weight: 600; max-width: 48%; }
.post-nav a span { display: block; font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.post-nav .next { text-align: right; margin-left: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-bottom: 3rem; }
.empty { padding: 2rem 0 4rem; color: var(--ink-soft); }

/* Formulare */
.contact-form { max-width: var(--measure); background: var(--paper); border: 1px solid var(--cognac); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); position: relative; margin: 1.5rem 0 2rem; }
.contact-form::before { content: ""; position: absolute; inset: 6px; border: var(--stitch); border-radius: 10px; pointer-events: none; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1.25rem; }
.field { margin-bottom: 1.1rem; position: relative; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid rgba(123, 64, 33, .55); border-radius: 9px; padding: .65rem .8rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--viper); box-shadow: 0 0 0 3px rgba(30, 130, 56, .22); }
.field-check label { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; font-size: .98rem; }
.field-check input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--viper); flex: none; }
.notice { border-radius: 10px; padding: .9rem 1.15rem; margin: 1rem 0; max-width: var(--measure); }
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice-ok { background: #E3F0D8; border: 1px solid var(--viper); }
.notice-error { background: #F7E2D7; border: 1px solid #A2431D; }
.notice-warn { background: #F6EBC9; border: 1px solid #B3892E; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; padding: 3rem 0 2.25rem; }
.site-footer { position: relative; color: #E7DCC6; background: var(--saddle-dark) var(--leather); background-blend-mode: multiply; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; border-top: var(--stitch-light); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem 3rem; }
.footer-name { font-family: var(--f-head); font-style: italic; font-weight: 600; font-size: 1.4rem; color: var(--ivory); margin-bottom: .4rem; }
.footer-brand p:last-child { max-width: 32rem; font-size: .98rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-nav a, .footer-nav .linklike { color: var(--ivory); font-size: 1rem; }
.footer-nav a:hover, .footer-nav .linklike:hover { color: var(--viper-bright); }
.footer-copy { grid-column: 1 / -1; font-size: .9rem; color: #C9B89A; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(244, 239, 226, .15); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }


/* ---------- Elemente aus dem CMS (Editor, Mediathek, Zwei-Klick-Lösung) ---------- */
.btn.solid { background: var(--viper); color: #fff; border-color: var(--viper); }
.btn.solid:hover { background: var(--viper-deep); }
.adminbar { background: var(--saddle-dark); color: var(--ivory); font-size: .9rem; padding: .35rem 1.25rem; text-align: right; }
.adminbar a { color: var(--viper-bright); }
.main-nav .nolink { display: block; padding: .55rem .8rem; font-weight: 500; color: var(--ink); cursor: default; }

/* Bilder aus der Mediathek: <figure class="img img-gross|mittel|klein img-links|rechts|mitte"> */
.prose figure.img { margin: 1.75rem 0; max-width: 100%; }
.prose figure.img img { width: 100%; height: auto; }
.prose figure.img a.zoom { display: block; cursor: zoom-in; }
figure.img-mittel { width: 60%; }
figure.img-klein { width: 36%; }
figure.img-mitte { margin-left: auto !important; margin-right: auto !important; }
figure.img-links { float: left; margin: .3rem 1.75rem 1rem 0 !important; }
figure.img-rechts { float: right; margin: .3rem 0 1rem 1.75rem !important; }
figure.img-gross.img-links, figure.img-gross.img-rechts { float: none; margin: 1.75rem 0 !important; }
figure .credit { display: block; font-size: .82rem; color: var(--ink-soft); opacity: .85; margin-top: .15rem; }
figure .credit a { color: inherit; }
@media (max-width: 640px) { figure.img-mittel, figure.img-klein { width: 100%; } figure.img-links, figure.img-rechts { float: none; margin: 1.5rem 0 !important; } }
.prose::after { content: ""; display: block; clear: both; }

/* Zwei-Klick-Platzhalter (YouTube & Co.) */
.consent-ph {
  position: relative; width: 100%; max-width: 52rem; margin: 1.75rem 0 2.25rem; min-height: 220px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: var(--radius); color: var(--ivory);
  background: var(--saddle) var(--leather); background-blend-mode: multiply; border: 1px solid var(--saddle-dark);
}
.consent-ph::before { content: ""; position: absolute; inset: 8px; border: var(--stitch-light); border-radius: 10px; pointer-events: none; }
.consent-ph-in { position: relative; padding: 1.25rem 1.5rem; max-width: 36rem; }
.consent-ph-in b { display: block; font: 700 1.3rem/1.25 var(--f-head); margin-bottom: .4rem; }
.consent-ph-in b::before { content: ""; display: block; width: 3rem; height: 3rem; margin: 0 auto .6rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='3' y='9' width='42' height='30' rx='9' fill='none' stroke='%237FCB4E' stroke-width='2.5'/%3E%3Cpath d='M20 17.5v13l11-6.5z' fill='%237FCB4E'/%3E%3C/svg%3E") center / contain no-repeat; }
.consent-ph-in p { font-size: .95rem; color: #E7DCC6; margin: .4rem 0; }
.consent-ph-in a { color: var(--viper-bright); }
.consent-ph-in .muted { font-size: .9rem; }
.consent-ph-btns { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .9rem !important; }
.consent-ph-btns .btn:not(.solid) { color: var(--ivory); border-color: rgba(244, 239, 226, .7); }
.consent-ph-btns .btn:not(.solid):hover { background: var(--ivory); color: var(--saddle); }
.consent-frame { display: block; width: 100%; max-width: 52rem; height: auto; border: 0; border-radius: var(--radius); margin: 1.75rem 0 2.25rem; background: #000; }
img.consent-img:not(.on) { background: var(--parchment); min-height: 60px; }
@media (max-width: 520px) { .consent-ph-in p:not(.consent-ph-btns) { font-size: .88rem; } }

/* Cookie-Banner (consent.js) */
.cc {
  position: fixed; z-index: 90; left: 1rem; right: 1rem; bottom: 1rem; max-width: 44rem; max-height: calc(100vh - 2rem); overflow: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--cognac); border-radius: var(--radius);
  box-shadow: 0 18px 40px -12px rgba(67, 33, 15, .55);
}
.cc::before { content: ""; position: absolute; inset: 6px; border: var(--stitch); border-radius: 10px; pointer-events: none; }
.cc-in { position: relative; padding: 1.2rem 1.4rem 1.25rem; }
.cc h2 { font-size: 1.3rem; margin: 0 0 .4rem; }
.cc h2:focus { outline: none; }
.cc p { font-size: .97rem; }
.cc-opts { border-top: var(--stitch); margin: .25rem 0 1rem; }
.cc-opts[hidden] { display: none; }
.cc-o { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 0; border-bottom: var(--stitch); cursor: pointer; }
.cc-o input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--viper); }
.cc-o small { color: var(--ink-soft); font-size: .9rem; line-height: 1.45; display: inline-block; margin-top: .15rem; }
.cc-btns { display: flex; flex-wrap: wrap; gap: .55rem; position: relative; }
.cc-btns .btn { flex: 1 1 10rem; background: var(--paper); color: var(--saddle); border-color: var(--cognac); }
.cc-btns .btn:hover { background: var(--cognac); color: var(--ivory); }

/* Kleinkram */
.feed-link, .back { margin: 1.5rem 0 3rem; }
.field-short input { max-width: 9rem; }
.form-note { font-size: .93rem; color: var(--ink-soft); margin: 1rem 0 0; }
.contact-form .field input:not([type]) { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid rgba(123, 64, 33, .55); border-radius: 9px; padding: .65rem .8rem; }
.contact-form .field input:not([type]):focus { outline: none; border-color: var(--viper); box-shadow: 0 0 0 3px rgba(30, 130, 56, .22); }
.prose > .consent-ph, .prose > .consent-frame, .prose > figure.img-gross { max-width: 52rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .cc, .hero-actions, .gate-keys, .consent-ph-btns, .adminbar { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}
