/* O-Ton – Untertitel auf Schwarz, Metadaten als Tape-Label.
   Statische Seiten (tools/build.py), JS nur als Ergänzung (oton.js).
   Nur Systemschriften, keine externen Ressourcen. */

/* ------------------------------------------------------------- Tokens */
:root {
  --bg: #0e0e10;
  --bg-2: #131316;
  --surface: #18181c;
  --surface-2: #1f1f24;
  --text: #ebe7dc;
  --muted: #aaa597;
  --line: #2e2e34;
  --line-strong: #46464e;
  --accent: #f0b85a;
  --accent-ink: #1b1305;
  --accent-soft: rgba(240, 184, 90, .16);
  --mark-bg: rgba(240, 184, 90, .30);
  --warn: #ff8f7a;
  --focus: #f0b85a;

  /* Leinwand: in beiden Modi dunkel */
  --screen: #08080a;
  --screen-2: #111114;
  --sub: #f7efcf;
  --sub-muted: #b8b19e;
  --sub-mark: rgba(240, 184, 90, .34);

  --f-sub: "Helvetica Neue", "Arial Nova", Arial, "Liberation Sans", "Nimbus Sans", system-ui, sans-serif;
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --f-cond: "Avenir Next Condensed", "Helvetica Neue", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", sans-serif;

  --r: 3px;
  --gut: clamp(16px, 4vw, 40px);
  --max: 1120px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2efe7; --bg-2: #ebe7dc; --surface: #fbfaf6; --surface-2: #f5f2ea;
    --text: #1c1b18; --muted: #59554c; --line: #d8d2c4; --line-strong: #b9b2a2;
    --accent: #8a5200; --accent-ink: #fffaf0; --accent-soft: rgba(138, 82, 0, .10);
    --mark-bg: rgba(240, 184, 90, .55); --warn: #a8321c; --focus: #8a5200;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2efe7; --bg-2: #ebe7dc; --surface: #fbfaf6; --surface-2: #f5f2ea;
  --text: #1c1b18; --muted: #59554c; --line: #d8d2c4; --line-strong: #b9b2a2;
  --accent: #8a5200; --accent-ink: #fffaf0; --accent-soft: rgba(138, 82, 0, .10);
  --mark-bg: rgba(240, 184, 90, .55); --warn: #a8321c; --focus: #8a5200;
  color-scheme: light;
}

/* ------------------------------------------------------------- Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--f-ui);
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px var(--gut) 64px; }
main:focus { outline: none; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; }
kbd {
  font: 600 .74rem/1 var(--f-mono); padding: .22em .45em; border-radius: 3px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; color: var(--muted); background: var(--surface);
}
mark { background: var(--mark-bg); color: inherit; border-radius: 2px; padding: 0 .05em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; font-weight: 700; }
.skip:focus { top: 8px; }
.loading, .noscript { font-family: var(--f-mono); color: var(--muted); text-align: center; padding: 3rem 1rem; }
.mono { font-family: var(--f-mono); }

/* ------------------------------------------------------------- Kopf */
.top { background: var(--bg); }
.bar {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gut) 10px;
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
}
.brand { display: grid; grid-template-columns: auto; text-decoration: none; margin-right: auto; line-height: 1; }
.wordmark {
  font: 800 1.9rem/1 var(--f-cond); font-stretch: condensed; letter-spacing: .06em;
  color: var(--text);
}
.wm-dash { color: var(--accent); margin: 0 .02em; }
.tonspur {
  display: block; height: 5px; margin: 5px 0 6px; width: 100%;
  background:
    repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, var(--muted) 0 2px, transparent 2px 9px);
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent);
  mask-image: linear-gradient(90deg, #000 55%, transparent);
  opacity: .9;
}
.claim { font: .72rem/1.2 var(--f-mono); color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  font: 600 .82rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none; color: var(--muted); padding: 10px 10px; border-radius: var(--r);
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.theme {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme:hover { border-color: var(--line-strong); }
.theme .i-moon { display: none; }
:root[data-theme="light"] .theme .i-sun { display: none; }
:root[data-theme="light"] .theme .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme .i-moon { display: block; }
}

/* ------------------------------------------------------------- Suche (fixiert) */
.searchbar {
  margin: 0; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.searchbar-in { max-width: var(--max); margin: 0 auto; padding: 10px var(--gut); }
.prompt { display: none; }
.q-hint { display: none; }
.field { position: relative; display: flex; align-items: center; }
.field svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.field input {
  width: 100%; min-width: 0; font: 500 1.05rem/1.2 var(--f-ui); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 12px 48px 12px 44px; -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.k-slash { position: absolute; right: 12px; pointer-events: none; }
.field input:focus ~ .k-slash { visibility: hidden; }

body.is-home .searchbar { border-bottom-color: transparent; }
body.is-home .searchbar-in { padding-top: 18px; padding-bottom: 14px; }
body.is-home .prompt {
  display: block; text-align: center; margin: 4px 0 14px;
  font: 700 clamp(1.7rem, 4.6vw, 3rem)/1.1 var(--f-sub); letter-spacing: -.01em; color: var(--text);
}
body.is-home .field input { font-size: clamp(1.05rem, 2.2vw, 1.3rem); padding-top: 16px; padding-bottom: 16px; border-radius: 8px; }
body.is-home .q-hint { display: block; text-align: center; color: var(--muted); font-size: .84rem; margin: -6px auto 0; padding: 0 var(--gut); max-width: var(--max); }
body.is-home.has-q .prompt, body.is-home.has-q .q-hint { display: none; }

/* ------------------------------------------------------------- Leinwand & Untertitel */
.screen {
  background: radial-gradient(120% 90% at 50% 40%, var(--screen-2), var(--screen) 70%);
  color: var(--sub); border-radius: 6px; position: relative; overflow: hidden;
  padding: clamp(46px, 6vw, 64px) clamp(16px, 5vw, 56px) clamp(28px, 6vw, 64px);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  min-height: clamp(180px, 30vw, 300px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 1px 0 rgba(0,0,0,.2);
}
.screen::before, .screen::after { /* Kasch oben/unten */
  content: ""; position: absolute; left: 0; right: 0; height: 10px; background: #000; opacity: .55;
}
.screen::before { top: 0; } .screen::after { bottom: 0; }
.screen { margin: 0; }
.subs { width: 100%; text-align: center; margin: 0 auto; padding: 0; border: 0; }
.sub {
  font: 600 clamp(1.2rem, 1.1rem + 1.2vw, 1.9rem)/1.36 var(--f-sub);
  color: var(--sub); margin: 0 auto .7em; max-width: 40ch; text-wrap: balance; overflow-wrap: anywhere;
  text-shadow: 0 0 2px #000, 0 1px 2px rgba(0,0,0,.95), 0 2px 8px rgba(0,0,0,.6);
}
.sub:last-child { margin-bottom: 0; }
.sub mark { background: var(--sub-mark); color: #fff; box-shadow: inset 0 -2px 0 #f0b85a; }
.subs.long .sub { font-size: clamp(1rem, .95rem + .6vw, 1.35rem); margin-bottom: .55em; max-width: 52ch; }
.screen-tc {
  position: absolute; top: 16px; left: 18px; right: 18px; display: flex; justify-content: space-between;
  font: .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sub-muted);
}
.screen-empty { font: .9rem/1.5 var(--f-mono); color: var(--sub-muted); text-align: center; }

/* ------------------------------------------------------------- Tape-Label */
.label {
  font-family: var(--f-mono); background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden;
}
.label-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 7px 12px; border-bottom: 2px solid var(--accent);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  background: var(--surface-2);
}
.label-head b { color: var(--text); font-weight: 700; }
.side { border: 1px solid var(--line-strong); padding: 2px 6px; border-radius: 2px; }
.label-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; padding: 14px; align-items: start; }
.fields { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 14px; }
.fields dt {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 8px 0 6px; border-bottom: 1px dashed var(--line);
}
.fields dd { margin: 0; padding: 6px 0 6px; border-bottom: 1px dashed var(--line); font-size: .9rem; overflow-wrap: anywhere; }
.fields dt:last-of-type, .fields dd:last-of-type { border-bottom: 0; }
.fields a { text-decoration-thickness: 1px; }
.kind { color: var(--muted); font-size: .78rem; }
.note { margin: 0; padding: 10px 14px 14px; font: .84rem/1.5 var(--f-ui); color: var(--muted); border-top: 1px solid var(--line); }
.badge {
  display: inline-block; font: 700 .64rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 6px; border-radius: 2px; border: 1px solid currentColor; color: var(--accent); vertical-align: 2px;
}
.badge.warn { color: var(--warn); }

/* Filmplakat (IMDb-Hotlink, 2:3) bzw. typografische Kachel in gleicher Größe */
.pst { display: block; flex: none; background: #0b0b0d; border-radius: 2px; aspect-ratio: 2 / 3; }
img.pst { object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.35); }
.pst.sm { width: 38px; height: 57px; }
.pst.md { width: 77px; height: 115px; }
.pst.lg { width: 200px; height: 300px; }
.pst.fill { width: 100%; height: auto; }
.tt {
  display: grid; place-items: center; text-align: center; overflow: hidden;
  background: repeating-linear-gradient(135deg, #141417 0 6px, #19191d 6px 12px);
  color: #ece4c8; box-shadow: inset 0 0 0 1px #2e2e34; padding: 8%;
}
.tt span {
  font: 800 .95rem/1.08 var(--f-cond); font-stretch: condensed; text-transform: uppercase; letter-spacing: .04em;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  text-wrap: balance;
}
.tt.md span { font-size: .66rem; -webkit-line-clamp: 6; }
.tt.lg span { font-size: 1.5rem; }
.tt.fill span { font-size: clamp(.9rem, .7rem + .8vw, 1.15rem); }
.imdb { font-weight: 600; text-decoration-color: var(--accent); }

/* ------------------------------------------------------------- Allgemeine Bausteine */
h1, h2, h3 { line-height: 1.15; margin: 0; }
.page-head { margin: 4px 0 22px; }
.eyebrow { font: 600 .72rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.page-title { font: 800 clamp(1.8rem, 1.4rem + 2vw, 2.8rem)/1.05 var(--f-cond); font-stretch: condensed; letter-spacing: .01em; }
.lede { color: var(--muted); max-width: 62ch; margin: 10px 0 0; }
.section-title {
  font: 700 .78rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin: 40px 0 14px; display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
  font: 600 .84rem/1 var(--f-mono); letter-spacing: .04em; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 14px;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn kbd { border-color: currentColor; color: inherit; background: transparent; opacity: .8; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.stats { font: .8rem/1.6 var(--f-mono); color: var(--muted); margin: 18px 0 0; }
.stats b { color: var(--text); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; cursor: pointer;
  font: 500 .84rem/1.2 var(--f-mono); color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
}
.chip small { color: var(--muted); font-size: .74rem; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip[aria-pressed="true"] small { color: inherit; }
.empty { color: var(--muted); font-family: var(--f-mono); font-size: .9rem; padding: 20px 0; }

/* ------------------------------------------------------------- Start */
.intro { display: grid; gap: 14px; margin-top: 6px; }
.intro .label { max-width: 760px; width: 100%; margin: 0 auto; }
.intro .actions { justify-content: center; }
.doors { align-items: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 14px; }
.door { border: 1px solid var(--line); border-radius: 6px; padding: 18px; background: var(--bg-2); }
.door h2 { font: 800 1.35rem/1.1 var(--f-cond); font-stretch: condensed; margin: 0 0 6px; }
.door p { color: var(--muted); margin: 0 0 14px; font-size: .92rem; }

/* ------------------------------------------------------------- Treffer */
.hits-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; margin: 0 0 14px; }
.hits-count { font: .84rem/1.4 var(--f-mono); color: var(--muted); margin: 0; }
.hits-count b { color: var(--text); }
.quick { margin: 0 0 20px; display: grid; gap: 10px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-row > span { font: .68rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-width: 4.5em; }
.hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hit {
  display: block; text-decoration: none; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
}
.hit:hover { border-color: var(--line-strong); }
.hit:hover .hit-label { color: var(--text); }
.hit-screen {
  display: block; background: var(--screen); padding: 18px clamp(14px, 4vw, 40px) 16px; text-align: center;
}
.hit-screen .sub {
  font-size: clamp(1.02rem, .95rem + .5vw, 1.28rem); margin: 0; max-width: 60ch; margin-inline: auto;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hit-screen .sub.none { font: .82rem/1.4 var(--f-mono); color: var(--sub-muted); text-shadow: none; }
.hit-label {
  display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 9px 14px;
  font: .8rem/1.4 var(--f-mono); color: var(--muted);
}
.hit-label .who { color: var(--text); font-weight: 700; }
.hit-label .src::before { content: "▸ "; color: var(--accent); }
.hit-label mark { color: var(--text); }
.more { margin-top: 16px; text-align: center; }

/* ------------------------------------------------------------- Zitat-Seite */
.entry { display: grid; gap: 14px; }
.entry .label-body { grid-template-columns: 77px minmax(0, 1fr); }
.crumbs { font: .8rem/1.4 var(--f-mono); color: var(--muted); margin: 0 0 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: baseline; min-width: 0; }
.crumbs li + li::before { content: "›"; padding: 0 .55em; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); overflow-wrap: anywhere; }
.xref { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 0 28px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 10px 2px; text-decoration: none;
}
.row:hover .row-t { text-decoration: underline; text-decoration-color: var(--accent); }
.row-t { font-weight: 650; overflow-wrap: anywhere; }
.row-q { grid-column: 2; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-n { font: .76rem/1 var(--f-mono); color: var(--muted); min-width: 3.2em; text-align: right; }
.row.stub .row-t { color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------- Filme */
.filters { margin: 0 0 20px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px; }
@media (max-width: 400px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tile { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); position: relative; }
.tile:hover { border-color: var(--line-strong); }
.tile:hover .tile-n { text-decoration: underline; text-decoration-color: var(--accent); }
.frame {
  position: relative; display: grid; place-items: center; padding: 12px 20px;
  background-color: #0a0a0c;
  background-image:
    radial-gradient(circle at 50% 50%, #26262b 0 2.6px, transparent 3.2px),
    radial-gradient(circle at 50% 50%, #26262b 0 2.6px, transparent 3.2px);
  background-size: 12px 13px, 12px 13px;
  background-position: 0 4px, right 0 top 4px;
  background-repeat: repeat-y, repeat-y;
}
.tile-c {
  position: absolute; top: 8px; right: 8px; font: 700 .74rem/1 var(--f-mono); color: #1b1305; background: #f0b85a;
  padding: 4px 6px; border-radius: 2px; letter-spacing: .02em;
}
.cap { padding: 10px 12px 12px; display: grid; gap: 4px; }
.tile-n { font-weight: 650; font-size: .92rem; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-k { font: .7rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.film-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 22px; align-items: center; margin: 4px 0 26px; }
.film-head .frame { border-radius: 5px; }

/* ------------------------------------------------------------- Bands */
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; list-style: none; }
.letters a {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px;
  font: 700 .8rem/1 var(--f-mono); text-decoration: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.letters a:hover { border-color: var(--accent); }
.band-group { scroll-margin-top: 96px; }
.band-group h2 { font: 800 1.6rem/1 var(--f-cond); font-stretch: condensed; color: var(--accent); margin: 26px 0 8px; }
.cols { columns: 3 240px; column-gap: 28px; list-style: none; margin: 0; padding: 0; }
.cols li { break-inside: avoid; }
.cols a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); text-decoration: none; }
.cols a:hover .bn { text-decoration: underline; text-decoration-color: var(--accent); }
.cols .bn { overflow-wrap: anywhere; min-width: 0; }
.cols .bc { font: .78rem/1.5 var(--f-mono); color: var(--muted); flex: none; }
.cols .ghost .bn { color: var(--muted); }

/* ------------------------------------------------------------- Offene Fälle */
.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.case .screen { min-height: 0; padding-top: 40px; padding-bottom: 30px; border-radius: 6px 6px 0 0; }
.case .label { border-radius: 0 0 4px 4px; border-top: 0; }
.case-more { margin: 8px 0 0; font: .8rem/1.4 var(--f-mono); text-align: right; }

/* ------------------------------------------------------------- Einsenden, Korrektur, Eingang */
.form { max-width: 680px; display: grid; gap: 16px; margin: 0; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld label {
  font: 700 .72rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text);
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
}
.req, .opt { font-weight: 600; letter-spacing: .06em; font-size: .66rem; color: var(--muted); }
.req { color: var(--accent); }
.fld input, .fld textarea, .fld select {
  width: 100%; min-width: 0; font: 1rem/1.4 var(--f-ui); color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 12px;
}
.fld textarea { resize: vertical; min-height: 4.8em; }
.fld select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.fld [aria-invalid="true"] { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.fld-hint { margin: 0; font-size: .82rem; color: var(--muted); }
.fld-err { margin: 0; font: 600 .84rem/1.4 var(--f-ui); color: var(--warn); }
.fld-err:empty { display: none; }
.form-err { padding: 10px 14px; border: 1px solid var(--warn); border-left-width: 4px; border-radius: var(--r); color: var(--warn); font-weight: 600; }
.form-err:empty { display: none; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface);
  padding: 14px 16px; border-radius: 4px; margin: 0 0 18px; max-width: 680px;
}
.notice.warn { border-left-color: var(--warn); }
.notice p { margin: 0; }
.notice .actions { margin-top: 12px; }
.notice code, .lede code { font: .86em var(--f-mono); }
.done:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.done h2 { font: 800 1.5rem/1.1 var(--f-cond); font-stretch: condensed; margin: 0 0 8px; }
.btn.quiet { background: transparent; border-style: dashed; color: var(--muted); }
.btn.quiet:hover { color: var(--text); }
.btn:disabled { opacity: .6; cursor: progress; }
.korr { margin-top: 22px; }
.korr-panel { margin-top: 12px; }
.korr-form { padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); max-width: 680px; }
.korr-h { font: 700 .78rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.korr-ref { margin: -6px 0 0; font: .8rem/1.45 var(--f-mono); color: var(--text); overflow-wrap: anywhere; }
.korr-now { margin-top: -8px; overflow-wrap: anywhere; }
.korr-now:empty { display: none; }
.inbox { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.in-item { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 14px 16px; }
.in-item.is-done { background: transparent; }
.in-item .fields { margin-top: 10px; }
.in-item .actions { margin-top: 10px; }
.in-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font: .76rem/1.4 var(--f-mono); color: var(--muted); }
.in-head b { color: var(--text); }
.st { margin-left: auto; font: 700 .64rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding: 4px 6px; border-radius: 2px; border: 1px solid currentColor; }
.st-open { color: var(--accent); } .st-ok { color: var(--text); } .st-no { color: var(--muted); }
.in-q { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff del { color: var(--warn); text-decoration-thickness: 1px; }
.diff ins { text-decoration: none; background: var(--accent-soft); color: var(--text); padding: 0 .15em; border-radius: 2px; }
.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 4px; font: 600 .86rem/1.4 var(--f-ui);
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.toast[hidden] { display: none; }
.foot-in { color: var(--muted); font-family: var(--f-mono); font-size: .74rem; }

/* ------------------------------------------------------------- Fuß */
.foot {
  border-top: 1px solid var(--line); padding: 22px var(--gut) 28px; text-align: center;
  font-size: .8rem; color: var(--muted); display: grid; gap: 6px;
}
.foot p { margin: 0; }
.foot-name { font: 800 .9rem/1 var(--f-cond); font-stretch: condensed; letter-spacing: .06em; color: var(--text); text-transform: uppercase; }
.foot-b { max-width: 60ch; margin: 0 auto !important; }
.foot-keys { font-family: var(--f-mono); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; align-items: center; }

/* ------------------------------------------------------------- Mobil */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .bar { padding-top: 12px; gap: 10px 12px; }
  .wordmark { font-size: 1.6rem; }
  .nav { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
  .nav a { padding: 10px 8px; font-size: .78rem; }
  .k-slash { display: none; }
  .field input { padding-right: 14px; }
  .label-body { gap: 12px; padding: 12px; }
  .entry .label-body { grid-template-columns: 1fr; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .fields dt { border-bottom: 0; padding-bottom: 0; }
  .film-head { grid-template-columns: 1fr; }
  .film-head .frame { justify-self: start; }
  .pst.lg { width: 160px; height: 240px; }
  .tt.lg span { font-size: 1.2rem; }
  .screen-tc { font-size: .62rem; top: 14px; left: 14px; right: 14px; }
  .sub { font-size: 1.15rem; }
  .subs.long .sub { font-size: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  /* nur Bewegung, keine Deckkraft: Text bleibt sichtbar, auch wenn Animationen pausieren */
  .sub-in { animation: subin .3s ease-out; }
  @keyframes subin { from { transform: translateY(3px); } to { transform: none; } }
}
@media print {
  .top, .searchbar, .foot, .actions { display: none; }
  .screen, .hit-screen { background: #fff; color: #000; }
  .sub { color: #000; text-shadow: none; }
}

/* ------------------------------------------------------------- Statische Seiten (v3) */
html:not(.js) .js-only { display: none !important; }
.home-intro { max-width: 760px; margin: 4px auto 22px; text-align: center; }
.home-h1 { font: 800 clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem)/1.12 var(--f-cond); font-stretch: condensed; letter-spacing: .01em; }
.home-intro .lede { margin: 10px auto 0; }
.home-intro .notice { margin: 14px auto 0; text-align: left; }
.door .list { margin-top: 4px; }
.door .chips { margin-bottom: 4px; }
.door .tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 10px; }
.entry-head { margin: 0 0 4px; }
.entry-title { font: 800 clamp(1.6rem, 1.3rem + 1.6vw, 2.4rem)/1.08 var(--f-cond); font-stretch: condensed; letter-spacing: .01em; overflow-wrap: anywhere; }
.entry-sub { margin: 8px 0 0; color: var(--muted); }
.entry-sub a { color: var(--text); }
.more-link { margin: 10px 0 0; font: .82rem/1.4 var(--f-mono); }
.cat { scroll-margin-top: 90px; }
.stub-list { margin: 10px 0 0; padding: 0 0 0 1.2em; color: var(--muted); columns: 2 220px; column-gap: 28px; }
.stub-list li { break-inside: avoid; padding: 2px 0; }
.foot-legal { font-size: .85rem; }
.foot-legal a { color: var(--text); }
.pfoot button { font: inherit; color: var(--text); background: none; border: 0; padding: 0; text-decoration: underline;
  text-decoration-color: var(--line-strong); text-underline-offset: .2em; cursor: pointer; }
.pfoot button:hover { text-decoration-color: var(--accent); }
.noscript, .notice { text-align: left; }

/* Plakate: erst nach Zustimmung (oton.js ersetzt dann .tt[data-poster] durch <img>) */
img.pst { display: block; background: #0b0b0d; }
.pconsent { margin: 10px 0 0; font: .82rem/1.45 var(--f-mono); color: var(--muted); }
.pconsent .btn { font-size: .78rem; padding: 8px 12px; }
.pconsent p { margin: 0 0 8px; max-width: 64ch; }
.pconsent .actions { margin-top: 6px; }
.intro .pconsent { text-align: center; }
.intro .pconsent p { margin-inline: auto; }

/* Abfrage beim Erstbesuch (oton.js): Leiste unten, kein Modal; body bekommt ihre Höhe als padding-bottom */
.pbanner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  background: var(--surface); color: var(--text);
  border-top: 1px solid var(--line-strong); box-shadow: 0 -6px 24px rgba(0,0,0,.28);
  padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom, 0px));
}
.pbanner::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); opacity: .7; }
.pbanner-in { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.pbanner-t { flex: 1 1 340px; margin: 0; font: .82rem/1.5 var(--f-mono); color: var(--muted); }
.pbanner-t strong { display: block; margin-bottom: 2px; font: 800 1.05rem/1.15 var(--f-cond); font-stretch: condensed; letter-spacing: .02em; color: var(--text); }
.pbanner-t a { color: var(--text); }
.pbanner-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pbanner-a .btn { font-size: .8rem; padding: 10px 14px; }
.pbanner-x {
  width: 40px; height: 40px; display: inline-grid; place-items: center; cursor: pointer;
  font: 400 1.4rem/1 var(--f-ui); color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: var(--r);
}
.pbanner-x:hover { color: var(--text); border-color: var(--line-strong); }
.toast { bottom: calc(18px + var(--pbanner-h, 0px)); }
@media (max-width: 640px) {
  .pbanner { padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .pbanner-in { gap: 8px; }
  .pbanner-t { flex-basis: 100%; }
  .pbanner-a { width: 100%; }
  .pbanner-a .btn { flex: 1 1 auto; justify-content: center; }
}
@media print { .pbanner { display: none; } }

/* Formulare */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check-row label { font: 1rem/1.45 var(--f-ui); text-transform: none; letter-spacing: 0; display: block; }
.check .fld-hint { padding-left: 30px; }
.check .fld-err { padding-left: 30px; }
.fld [aria-invalid="true"][type="checkbox"] { outline: 2px solid var(--warn); outline-offset: 2px; box-shadow: none; }
.notice[data-api-state] { margin: 0; }
@media (max-width: 640px) {
  .home-intro { text-align: left; }
  .door .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Zusatzquellen: weitere Stellen im Song, „unsicher" */
.badge.quiet { color: var(--muted); font-weight: 600; }
.more-subs { margin: 22px 0 0; }
.more-subs .section-title { margin-top: 0; }
.screen.screen-sm { min-height: 0; padding: 22px clamp(14px, 4vw, 40px); margin-top: 10px; }
.screen.screen-sm .sub { font-size: clamp(1rem, .95rem + .6vw, 1.3rem); }
.xref-song { margin-top: 28px; }
.sub-title { font: 700 .72rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 28px 0 10px; }

/* ------------------------------------------------------------- Navigation dezent, Deezer, Zahlen */
.nav a.dezent { font-weight: 400; opacity: .85; }
@media (max-width: 400px) { .nav a { padding: 10px 4px; letter-spacing: .02em; } }
.dz { margin: 16px 0 0; }
.dz-box { margin-top: 12px; }
.dz-box .notice { margin: 0; }
.dz-frame { display: block; width: 100%; max-width: 760px; height: 150px; border: 0; border-radius: 4px; }
.dz-note { font: .78rem/1.5 var(--f-mono); color: var(--muted); margin: 6px 0 0; }
.dz-note .btn { padding: 2px 8px; font-size: .74rem; }
.zkpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 32px; }
.zkpi div { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 10px 12px; }
.zkpi dt { font: .72rem/1.3 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.zkpi dd { margin: 4px 0 0; font: 700 1.5rem/1.1 var(--f-cond); }
.zgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 8px 40px; }
.zhint { color: var(--muted); font-size: .88rem; margin: -4px 0 10px; }
.zbars { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 7px; }
.zbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline; }
.zbars .zl { overflow-wrap: anywhere; min-width: 0; }
.zbars .zl small { color: var(--muted); font: .78rem var(--f-mono); }
.zbars .zn { font: .8rem/1.4 var(--f-mono); color: var(--muted); }
.zbars .zb { grid-column: 1 / -1; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.zbars .zb::before { content: ""; display: block; height: 100%; width: var(--w); background: var(--accent); }
.zbars.zdek .zl { font-family: var(--f-mono); font-size: .86rem; }
.zsaetze { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.zsaetze li { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 14px; }
.zq { margin: 0; font: 1.05rem/1.45 var(--f-sub); }
.zsongs { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.zsongs a { color: var(--text); }
.folge .sub-title { margin-top: 22px; }
@media print { .dz { display: none; } }
