/* SchildScore – Styles */
@font-face { font-family: 'Plate'; src: url('/fonts/barlow-condensed-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plate'; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-soft: #f3f3f0;
  --ink: #111111;
  --ink-2: #333333;
  --muted: #6e6e6b;
  --line: #e3e3df;
  --accent: #0a3a9e;
  --up: #11804a;
  --down: #c3301f;
  --btn: #111111;
  --btn-ink: #ffffff;
  --display: 'Plate', 'Arial Narrow', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* Nacht: tiefes Blaugrau statt reinem Grau, warmes Weiß, leuchtendes EU-Blau */
  --bg: #0f1218;
  --bg-soft: #161b23;
  --ink: #eef0f4;
  --ink-2: #c3c8d2;
  --muted: #8c93a1;
  --line: #262d39;
  --accent: #7d9bff;
  --up: #3dd68c;
  --down: #ff7366;
  --btn: #eef0f4;
  --btn-ink: #0f1218;
  color-scheme: dark;
}
:root[data-theme="dark"] .site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
:root[data-theme="dark"] .plate { box-shadow: inset 0 0 0 calc(var(--h) * .022) #fbfbf9, inset 0 0 0 calc(var(--h) * .046) #161616, 0 0 0 1px rgb(255 255 255 / .06), 0 calc(var(--h) * .05) calc(var(--h) * .2) rgb(0 0 0 / .55); }
:root[data-theme="dark"] .brand { box-shadow: 0 0 0 1px rgb(255 255 255 / .15); }
:root[data-theme="dark"] .btn-primary { box-shadow: 0 6px 20px -8px rgb(125 155 255 / .45); }
:root[data-theme="dark"] .cookie, :root[data-theme="dark"] .code-list, :root[data-theme="dark"] .picker, :root[data-theme="dark"] dialog { border-color: var(--line); box-shadow: 0 20px 50px -12px rgb(0 0 0 / .7); }
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: rgb(125 155 255 / .14); }
:root[data-theme="dark"] .you { background: var(--accent); color: #0f1218; }
:root[data-theme="dark"] .plate__field:focus { background: rgb(0 51 153 / .1); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
svg { display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: .005em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 9vw, 4.2rem); }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 700px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.narrow { max-width: 720px; }
main { flex: 1; outline: none; }
.section { padding-top: 40px; padding-bottom: 40px; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: stretch; height: 30px; text-decoration: none; background: #fff; color: #111; border: 2px solid #111; border-radius: 5px; overflow: hidden; }
.brand i { width: 10px; background: #003399; }
.brand span { font: 700 21px/26px var(--display); letter-spacing: .03em; padding: 0 7px 0 6px; }
.nav { margin-left: auto; display: none; align-items: center; gap: 4px; }
.nav a { text-decoration: none; padding: 6px 10px; font-weight: 600; font-size: .95rem; color: var(--ink-2); border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.header-btn { border: 1px solid var(--line); background: var(--bg); color: var(--ink); height: 38px; min-width: 38px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.header-btn:hover { background: var(--bg-soft); }
.menu-btn { margin-left: auto; }
@media (min-width: 820px) { .nav { display: flex; } .menu-btn { display: none; } }
.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-menu a { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.mobile-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ink); }
.mobile-menu .row { padding: 12px 16px; }
@media (min-width: 820px) { .mobile-menu { display: none !important; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: .875rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0; max-width: 72ch; }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 8px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn-primary:hover { background: var(--btn); opacity: .88; }
.btn-sm { height: 36px; padding: 0 12px; font-size: .875rem; border-width: 1px; }
.btn-quiet { border-color: var(--line); }
.btn-danger { color: var(--down); border-color: currentColor; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.text-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.text-btn.muted { color: var(--muted); font-weight: 500; font-size: .85rem; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
textarea { resize: vertical; min-height: 110px; }
label { font-weight: 600; font-size: .9rem; }
.field { display: grid; gap: 6px; }
.hint { font-size: .82rem; color: var(--muted); }
.error { color: var(--down); font-weight: 600; font-size: .92rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ink); }

/* ---------- Kennzeichen ---------- */
.plate {
  --h: 46px;
  position: relative; display: inline-flex; flex: none; align-items: stretch;
  width: auto; max-width: 100%; height: var(--h); padding: calc(var(--h) * .055);
  border-radius: calc(var(--h) * .085); color: #141414; text-decoration: none; vertical-align: middle;
  background: linear-gradient(175deg, #ffffff 0%, #f5f5f2 50%, #ebebe7 100%);
  box-shadow: inset 0 0 0 calc(var(--h) * .022) #fbfbf9, inset 0 0 0 calc(var(--h) * .046) #161616,
    0 0 0 1px rgb(0 0 0 / .18), 0 calc(var(--h) * .03) calc(var(--h) * .08) rgb(0 0 0 / .18);
}
.plate::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, rgb(255 255 255 / .5) 0%, rgb(255 255 255 / 0) 30%); }
.plate__eu { position: relative; z-index: 1; width: calc(var(--h) * .4); flex: none; background: #003399; border-radius: calc(var(--h) * .05) 0 0 calc(var(--h) * .05); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(var(--h) * .07) 0 calc(var(--h) * .06); }
.plate__stars { width: 88%; }
.plate__eu b { font: 700 calc(var(--h) * .27)/1 var(--display); color: #fff; }
.plate__body {
  --fit: 1;
  flex: 0 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--h) * .07);
  font: 600 calc(var(--h) * .82 * var(--fit))/1 var(--display); letter-spacing: .01em; white-space: nowrap; overflow: hidden;
  padding: 0 calc(var(--h) * .16) calc(var(--h) * .02) calc(var(--h) * .13);
  text-shadow: calc(var(--h) * -.006) calc(var(--h) * -.008) 0 rgb(255 255 255 / .95), calc(var(--h) * .008) calc(var(--h) * .012) calc(var(--h) * .01) rgb(0 0 0 / .28);
}
.plate__digits { margin-left: calc(var(--h) * .16); }
.plate__seals { display: inline-flex; flex-direction: column; gap: calc(var(--h) * .035); flex: none; }
.seal { width: calc(var(--h) * .33); height: calc(var(--h) * .33); }
.plate--sm { --h: 34px; }
.plate--sm .plate__body { text-shadow: none; }
.plate--md { --h: 44px; }
.plate--lg { --h: clamp(60px, calc((100vw - 40px) / 4.6), 100px); }
.plate--xl { --h: clamp(60px, calc((100vw - 32px) / 4.6), 108px); }
.plate-frame { display: inline-block; padding: 6px; border-radius: 12px; background: #1b1c1f; box-shadow: 0 14px 30px -14px rgb(0 0 0 / .55); max-width: 100%; }
.plate-frame .plate { box-shadow: inset 0 0 0 calc(var(--h) * .022) #fbfbf9, inset 0 0 0 calc(var(--h) * .046) #161616; }

/* Eingabe-Schild: feste Feldbreiten, nichts verschiebt sich */
.plate-input-wrap { position: relative; display: inline-block; max-width: 100%; }
.plate--input { cursor: text; max-width: none; box-shadow: inset 0 0 0 calc(var(--h) * .022) #fbfbf9, inset 0 0 0 calc(var(--h) * .046) #161616, 0 0 0 1px rgb(0 0 0 / .2), 0 10px 30px -12px rgb(0 0 0 / .35); }
.plate--input .plate__body { gap: calc(var(--h) * .07); text-shadow: none; }
.plate__field { font: inherit; color: #141414; background: transparent; border: 0; padding: 0; margin: 0; height: calc(var(--h) * .74); border-radius: calc(var(--h) * .05); caret-color: #003399; text-transform: uppercase; }
.plate__field { width: 1.2em; flex: none; text-align: center; transition: background .2s, box-shadow .2s; }
.plate__field.plate__digits { margin-left: calc(var(--h) * .16); }
.plate__field::placeholder { color: #c9cac6; opacity: 1; }
.plate__field:focus { outline: none; background: rgb(0 51 153 / .07); }
.code-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 50%; width: min(320px, calc(100vw - 32px)); margin-left: calc(min(320px, calc(100vw - 32px)) / -2) !important; margin: 0; padding: 4px; list-style: none; background: var(--bg); border: 1px solid var(--ink); border-radius: 8px; box-shadow: 0 12px 30px -10px rgb(0 0 0 / .35); text-align: left; }
.code-list li { display: flex; gap: 12px; align-items: baseline; padding: 8px 10px; border-radius: 5px; cursor: pointer; }
.code-list li b { font: 700 1.2rem/1 var(--display); min-width: 2.2em; }
.code-list li span { color: var(--ink-2); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-list li:hover, .code-list li[aria-selected="true"] { background: var(--bg-soft); }

/* ---------- Startseite ---------- */
.intro { background: var(--bg-soft); border-bottom: 1px solid var(--line); text-align: center; }
.intro .wrap { padding-top: 40px; padding-bottom: 40px; }
.intro h1 { margin-bottom: .2em; }
.intro .lede { color: var(--ink-2); max-width: 34em; margin: 0 auto 28px; font-size: 1.05rem; }
.entry { display: grid; justify-items: center; gap: 12px; }
.entry-status { height: 2.8em; line-height: 1.4em; font-size: .92rem; color: var(--muted); max-width: 30em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; }
.entry-status.ok { color: var(--up); font-weight: 600; }
.entry-status.bad { color: var(--down); font-weight: 600; }
.entry-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.entry-actions .btn-primary { min-width: 200px; }
@media (min-width: 700px) { .intro .wrap { padding-top: 64px; padding-bottom: 56px; } }

/* ---------- Tabelle ---------- */
.table-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.table-head h2 { margin: 0; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 10px 0; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.ltable { list-style: none; margin: 0; padding: 0; }
.lrow { display: grid; grid-template-columns: 2.2em 162px 1fr auto; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
a.lrow:hover { background: var(--bg-soft); }
.lrow-head { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
.lrow > .plate { justify-self: start; }
.lrow .pos { font: 700 1.25rem/1 var(--display); text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lrow .meta { min-width: 0; display: grid; gap: 1px; }
.lrow .meta .area { font-size: .85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .meta .quote { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.lrow .pts { display: grid; justify-items: end; gap: 2px; min-width: 4.2em; }
.lrow .pts b { font: 700 1.45rem/1 var(--display); font-variant-numeric: tabular-nums; }
.lrow .pts span { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.pos-up { color: var(--up); } .neg-down { color: var(--down); }
@media (max-width: 560px) {
  .lrow { grid-template-columns: 1.6em 1fr auto; gap: 10px; }
  .lrow .meta { display: none; }
  .lrow-head .meta-h { display: none; }
}
.table-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-top: 14px; flex-wrap: wrap; }
.empty { padding: 32px 4px; color: var(--muted); border-bottom: 1px solid var(--line); }
.filters { display: grid; gap: 12px; margin: 4px 0 22px; }
@media (min-width: 640px) { .filters { grid-template-columns: 1.5fr 1fr; } }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; }
.page-title { padding-top: 34px; padding-bottom: 6px; }
.page-title p { color: var(--ink-2); margin: 0; }

/* ---------- Detailseite ---------- */
.stage { background: var(--bg-soft); border-bottom: 1px solid var(--line); text-align: center; }
.stage .wrap { padding-top: 36px; padding-bottom: 30px; display: grid; justify-items: center; gap: 14px; }
.stage .where { color: var(--ink-2); }
.stage .where b { color: var(--ink); }
.stage .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: end; padding: 28px 0 18px; }
.verdict .num { font: 700 clamp(4rem, 16vw, 5.6rem)/.8 var(--display); font-variant-numeric: tabular-nums; grid-row: span 2; }
.verdict .num.pos { color: var(--up); } .verdict .num.neg { color: var(--down); }
.verdict .counts { display: flex; gap: 18px; font-size: .95rem; color: var(--ink-2); flex-wrap: wrap; }
.verdict .counts b { font-weight: 700; }
.split { height: 6px; background: var(--down); display: flex; border-radius: 3px; overflow: hidden; }
.split span { background: var(--up); }
.split.none { background: var(--line); }
.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.vote-btn { height: 64px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 700 1.5rem/1 var(--display); letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.vote-btn .icon { width: 24px; height: 24px; }
.vote-btn.up:hover { border-color: var(--up); color: var(--up); }
.vote-btn.down:hover { border-color: var(--down); color: var(--down); }
.vote-btn.up[aria-pressed="true"] { background: var(--up); border-color: var(--up); color: #fff; }
.vote-btn.down[aria-pressed="true"] { background: var(--down); border-color: var(--down); color: #fff; }
.vote-form { display: grid; gap: 16px; padding-bottom: 8px; }
.counter { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--down); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.comments { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.comment { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.comment p { margin: 0; overflow-wrap: anywhere; }
.comment .meta { display: flex; gap: 12px; align-items: center; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mark::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.mark.up { color: var(--up); } .mark.down { color: var(--down); }

/* ---------- Statistik ---------- */
.figures { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 700px) { .figures { grid-template-columns: repeat(4, 1fr); } }
.figure { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.figure b { display: block; font: 700 2.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.figure span { font-size: .85rem; color: var(--muted); }
.cols { display: grid; gap: 36px; margin-top: 36px; }
@media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; gap: 48px; } }
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 3.2em 1fr 3.4em; gap: 12px; align-items: center; font-size: .88rem; text-decoration: none; color: var(--ink); }
.bar.wide { grid-template-columns: 10em 1fr 3em; }
.bar .k { font: 700 1.15rem/1 var(--display); }
.bar .t { height: 8px; background: var(--bg-soft); border-radius: 2px; overflow: hidden; }
.bar .t span { display: block; height: 100%; background: var(--ink); }
.bar .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
a.bar:hover .k { text-decoration: underline; }

/* ---------- Text-Seiten ---------- */
.prose { max-width: 70ch; padding-top: 34px; padding-bottom: 56px; }
.prose h1 { font-size: clamp(2.4rem, 7vw, 3.2rem); }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent); }
.prose code { background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.contact-form { display: grid; gap: 16px; max-width: 560px; }
.notice { padding: 14px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); }
.notice.ok { border-color: var(--up); }

/* ---------- Cookie-Hinweis ---------- */
.cookie { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; background: var(--bg); color: var(--ink); border: 1px solid var(--ink); border-radius: 10px; padding: 16px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .35); display: grid; gap: 12px; font-size: .92rem; }
.cookie p { margin: 0; }
.cookie .row { gap: 10px; }
@media (min-width: 700px) { .cookie { left: auto; right: 20px; bottom: 20px; width: 420px; } }

/* ---------- Dialog & Toast ---------- */
dialog { border: 1px solid var(--ink); border-radius: 12px; padding: 0; background: var(--bg); color: var(--ink); width: min(460px, calc(100vw - 24px)); }
dialog::backdrop { background: rgb(0 0 0 / .5); }
dialog form { padding: 22px; display: grid; gap: 14px; }
.radio-list { display: grid; gap: 6px; }
.radio-list label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--ink); }
.radio-list input { accent-color: var(--ink); margin-top: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 8px; font-weight: 600; font-size: .92rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 70; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-table td.actions { white-space: nowrap; }
.admin-table td.actions .btn { margin: 0 4px 4px 0; }
.table-scroll { overflow-x: auto; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.badge.warn { color: #9a6700; border-color: currentColor; }
.badge.danger { color: var(--down); border-color: currentColor; }
.segmented { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.segmented button { background: none; border: 0; padding: 10px 0; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented [aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.tile .v { font: 700 2rem/1 var(--display); }
.tile .l { font-size: .8rem; color: var(--muted); }
.stack > * + * { margin-top: 18px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 20px; }

.skeleton { background: var(--bg-soft); border-radius: 6px; height: 52px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =========================================================
   Bewegung & Reaktion – kurz, dezent, ohne Layout-Sprünge
   ========================================================= */
:root { --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.4, .5, 1); }

/* Eingabe-Schild wächst mit jedem Zeichen (transform → kein Verschieben) */
.plate-input-wrap { padding: 10px 0; }

.plate--input { transition: box-shadow .3s var(--ease); }
.plate-input-wrap:focus-within .plate--input {
  box-shadow: inset 0 0 0 calc(var(--h) * .022) #fbfbf9, inset 0 0 0 calc(var(--h) * .046) #161616,
    0 0 0 1px rgb(0 0 0 / .2), 0 0 0 5px rgb(0 51 153 / .14), 0 18px 40px -14px rgb(0 0 0 / .45);
}
.plate--input.tick .plate__body { animation: tick .18s var(--ease); }
@keyframes tick { 40% { transform: scale(1.018); } }
.plate__field:focus { box-shadow: inset 0 calc(var(--h) * -.028) 0 #003399; }
.stamp-in .seal--stamp { animation: stamp .5s var(--spring) both; }
@keyframes stamp { 0% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 55% { transform: scale(.9) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.hu-in .seal--hu { animation: stick .45s var(--spring) both; }
@keyframes stick { 0% { transform: translateY(-40%) rotate(-90deg) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.code-list { top: calc(100% - 2px); animation: drop .16s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }

/* Statuszeile & Absenden */
.entry-status { transition: color .2s; }
.entry-status.ok::before { content: "✓ "; }
.entry .btn-primary { transition: opacity .2s, transform .12s var(--ease), background .2s; }
.entry:not(.is-valid) .btn-primary { opacity: .35; }
.entry.is-valid .btn-primary { animation: ready .4s var(--spring); }
@keyframes ready { 50% { transform: scale(1.04); } }

/* Seitenwechsel */
main[data-anim] > * { animation: enter .32s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

/* Buttons & Links */
.btn, .text-btn, .header-btn, .vote-btn, .lrow, .nav a { transition: background .18s, color .18s, border-color .18s, transform .12s var(--ease), opacity .18s, box-shadow .18s; }
.btn:active, .vote-btn:active, .header-btn:active { transform: scale(.97); }
.text-btn .icon { transition: transform .3s var(--ease); }
.text-btn:hover .icon { transform: rotate(-12deg); }

/* Tabs mit gleitender Unterstreichung */
.tabs { position: relative; }
.tabs button[aria-pressed="true"] { box-shadow: none; }
.tabs-ink { position: absolute; bottom: 0; height: 2px; background: var(--ink); transition: left .28s var(--ease), width .28s var(--ease); pointer-events: none; }

/* Tabellenzeilen */
.ltable > li { animation: rowIn .34s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }
a.lrow .plate { transition: transform .2s var(--ease); }
a.lrow:hover .plate { transform: translateX(3px); }
a.lrow:hover .pos { color: var(--ink); }
.results-loading { opacity: .45; transition: opacity .15s; }

/* Detailseite */
.stage .plate-frame { animation: plateIn .5s var(--spring) both; }
@keyframes plateIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.split span { width: 0; transition: width .7s var(--ease); }
.verdict .num.bump { animation: bump .4s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12); } }
.vote-btn .icon { transition: transform .3s var(--spring); }
.vote-btn.up:hover .icon { transform: translateY(-2px) rotate(-8deg); }
.vote-btn.down:hover .icon { transform: translateY(2px) rotate(8deg); }
.vote-btn[aria-pressed="true"] .icon { animation: thumb .45s var(--spring); }
@keyframes thumb { 40% { transform: scale(1.35) rotate(-12deg); } }
.vote-btn.is-busy { opacity: .7; }
.comment { animation: rowIn .3s var(--ease) both; }

/* Statistik-Balken wachsen beim Laden */
.bar .t span { transform-origin: left; animation: barIn .7s var(--ease) both; }
@keyframes barIn { from { transform: scaleX(0); } }

/* Header bekommt beim Scrollen eine Kante */
.site-header { transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 4px 18px -10px rgb(0 0 0 / .25); }
.mobile-menu:not([hidden]) { animation: drop .18s var(--ease); }
.cookie { animation: enter .35s var(--ease) .4s both; }


/* =========================================================
   Diskussion: Kommentare mit verschachtelten Antworten
   ========================================================= */
.discussion { padding-top: 32px; }
.tabs-sm { border-bottom: 0; margin: 0; gap: 14px; }
.tabs-sm button { padding: 4px 0; font-size: .88rem; }
.thread { border-top: 1px solid var(--line); padding-top: 10px; }
.cnode { position: relative; margin-top: 12px; animation: rowIn .28s var(--ease) both; }
.crail { position: absolute; left: 4px; top: 30px; bottom: 0; width: 14px; padding: 0; border: 0; background: none; cursor: pointer; }
.crail::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--line); border-radius: 1px; transition: background .15s; }
.crail:hover::before, .crail:focus-visible::before { background: var(--ink); }
.cnode.is-collapsed > .crail { display: none; }
.cmain { min-width: 0; }
.cmeta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: .84rem; min-height: 26px; }
.ctoggle { width: 22px; height: 22px; flex: none; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 5px; font: 700 .9rem/1 system-ui, sans-serif; cursor: pointer; padding: 0; }
.ctoggle:hover { color: var(--ink); border-color: var(--ink); }
.author { font-weight: 700; }
.you { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 4px; background: var(--ink); color: var(--bg); }
.folded { font-style: italic; }
.cfold { padding-left: 29px; min-width: 0; }
.cnode.is-collapsed .cfold { display: none; }
.cbody { margin: 4px 0 6px; overflow-wrap: anywhere; line-height: 1.5; }
.cactions { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; font-size: .82rem; margin-left: -6px; }
.vote-mini { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.vote-mini b { min-width: 1.6em; text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }
.vote-mini button, .icon-btn-sm, .act { border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; font: inherit; font-weight: 600; }
.vote-mini button, .icon-btn-sm { width: 30px; height: 30px; justify-content: center; padding: 0; }
.act { height: 30px; padding: 0 8px; }
.vote-mini button:hover, .icon-btn-sm:hover, .act:hover { background: var(--bg-soft); color: var(--ink); }
.vup[aria-pressed="true"] { color: var(--up); }
.vdown[aria-pressed="true"] { color: var(--down); }
.act-quiet { font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: inherit; font-size: .9rem; color: var(--ink); }
.chip span { font-size: .78rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.react-wrap { position: relative; display: inline-flex; }
.picker { position: absolute; z-index: 30; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; padding: 5px; background: var(--bg); border: 1px solid var(--ink); border-radius: 99px; box-shadow: 0 10px 26px -10px rgb(0 0 0 / .4); animation: drop .14s var(--ease); }
.picker button { width: 36px; height: 36px; border: 0; background: none; border-radius: 50%; font-size: 1.25rem; cursor: pointer; transition: transform .15s var(--spring), background .15s; }
.picker button:hover { transform: scale(1.25); background: var(--bg-soft); }
.picker button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
.pop { animation: pop .35s var(--spring); }
@keyframes pop { 40% { transform: scale(1.3); } }
.reply-form { display: grid; gap: 8px; margin: 6px 0 4px; animation: drop .16s var(--ease); }
.reply-form textarea { min-height: 72px; }
.text-error { color: var(--down); font-weight: 600; font-size: .85rem; margin: 0; min-height: 0; }
.text-error:empty { display: none; }
textarea.is-invalid { border-color: var(--down); }
@media (max-width: 560px) {
  .cfold { padding-left: 21px; }
  .crail { left: 3px; top: 26px; width: 12px; }
  .ctoggle { width: 18px; height: 18px; font-size: .8rem; }
}

/* Gesperrte Kombination im Eingabe-Schild */
.plate--input.is-banned .plate__field { color: var(--down); text-decoration: line-through; text-decoration-thickness: 3px; }
.plate--input.is-banned { animation: shake .35s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Captcha-Dialog */
.captcha-box { min-height: 70px; display: grid; place-items: center; }

/* =========================================================
   Grafiken
   ========================================================= */

/* --- Deutschlandkarte --- */
.map-block { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .map-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.de-map { width: 100%; max-width: 420px; height: auto; margin: 0 auto; display: block; overflow: visible; }
.de-map path { fill: color-mix(in srgb, var(--accent) var(--fill, 0%), var(--bg-soft)); stroke: var(--bg); stroke-width: 1.6; stroke-linejoin: round; transition: fill .3s, transform .2s var(--ease), filter .2s; transform-box: fill-box; transform-origin: center; cursor: default; outline: none; }
.de-map path:not(.has) { fill: var(--bg-soft); stroke: var(--line); }
.de-map path:hover, .de-map path:focus-visible { transform: scale(1.03); filter: drop-shadow(0 4px 8px rgb(0 0 0 / .25)); }
.map-legend { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .78rem; color: var(--muted); margin-top: 10px; }
.map-legend i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--bg-soft), var(--accent)); box-shadow: inset 0 0 0 1px var(--line); }
.map-side .figures { margin-bottom: 18px; }
.map-side .figure b { font-size: 2.2rem; }
.state-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.state-list li { display: grid; grid-template-columns: 1.4em 1fr auto; gap: 10px; align-items: center; font-size: .92rem; }
.state-list .n { font: 700 1.1rem/1 var(--display); color: var(--muted); }
.state-list .v { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* --- Leere Zustände & 404 --- */
.empty-art { width: 160px; height: auto; display: block; margin: 0 auto 10px; }
.empty.with-art { text-align: center; border-bottom: 0; }
.notfound { text-align: center; display: grid; justify-items: center; gap: 16px; padding: 48px 0 64px; }
.notfound .plate-frame { transform: rotate(-4deg); }

/* =========================================================
   Karopapier-Hintergrund
   ========================================================= */
:root { --grid: rgb(20 24 30 / .045); --grid-strong: rgb(20 24 30 / .085); --grid-size: 28px; }
:root[data-theme="dark"] { --grid: rgb(255 255 255 / .03); --grid-strong: rgb(255 255 255 / .06); }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center top;
}
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(1100px 520px at 50% -160px, rgb(70 100 170 / .22), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size);
}
/* Kopfbereiche: etwas kräftigeres Karo, das nach unten weich ausläuft */
.intro, .stage { position: relative; isolation: isolate; background: color-mix(in srgb, var(--bg-soft) 70%, transparent); }
.intro::before, .stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center top;
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
:root[data-theme="dark"] .intro, :root[data-theme="dark"] .stage { background: rgb(22 27 35 / .55); }
/* Zeilen und Flächen, auf denen gelesen wird, bleiben ruhig */
.site-footer { background: var(--bg); }
.comment, .reply-form textarea, .filters input { background-color: var(--bg); }
