/* NEST – Farben aus dem Logo, Schablonenschrift für Überschriften, Höhenlinien als Kartenmotiv */
@font-face { font-family: "Schablone"; src: url("fonts/stencil.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --nacht: #0e110b;
  --feld: #161a11;
  --gelaende: #1f2418;
  --gelaende-hell: #283020;
  --linie: #323a26;
  --sand: #e2d4ab;
  --sand-gedeckt: #a89a72;
  --text: #ebe4cf;
  --leise: #8f8a74;
  --oliv: #6f7e47;
  --oliv-hell: #8d9c5c;
  --signal: #d0603f;
  --signal-tief: #5a2618;
  --gruen: #9cbf5f;
  --r-gross: 16px;
  --r: 10px;
  --r-klein: 7px;
  --schrift: "Archivo", "Segoe UI", system-ui, sans-serif;
  --anzeige: "Schablone", "Archivo", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--nacht); color: var(--text); font: 15px/1.55 var(--schrift); min-height: 100vh; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
svg { flex: none; }
h1, h2 { margin: 0; font-weight: 600; color: var(--sand); }
h2 { font-size: 1.02rem; letter-spacing: .005em; }
.schablone { font-family: var(--anzeige); font-weight: 800; letter-spacing: .02em; line-height: .95; }
h1.schablone { font-size: 2.6rem; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; color: var(--sand); word-break: break-all; }
.leise { color: var(--leise); font-size: .88rem; }
.zahl { color: var(--leise); font-weight: 500; font-family: var(--schrift); font-size: .9em; }
.fehler { color: #f2ab95; background: rgba(208, 96, 63, .1); border-left: 3px solid var(--signal); padding: .55rem .8rem; border-radius: var(--r-klein); }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }

/* ------------------------------------------------------------ Eingaben */
label { display: flex; flex-direction: column; gap: .35rem; font-size: .86rem; font-weight: 500; color: var(--sand-gedeckt); }
input, select, textarea {
  width: 100%;
  background: var(--nacht);
  color: var(--text);
  border: 1px solid transparent;
  border-bottom-color: var(--linie);
  border-radius: var(--r-klein) var(--r-klein) 3px 3px;
  padding: .62rem .8rem;
  font: inherit;
  transition: border-color .15s, background .15s;
}
input:hover, select:hover, textarea:hover { background: #0b0d08; border-bottom-color: var(--sand-gedeckt); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--linie); border-bottom-color: var(--sand); background: #0b0d08; }
select { appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a89a72' stroke-width='2'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 1rem; }
textarea { resize: vertical; }
textarea.code { font: 13px/1.6 var(--mono); white-space: pre; tab-size: 4; border: none; border-radius: var(--r); background: transparent; padding: 1rem 1.2rem; min-height: 60vh; }
textarea.code:focus { background: transparent; }

button {
  font: inherit; font-size: .9rem; font-weight: 600;
  color: var(--text);
  background: var(--gelaende-hell);
  border: 1px solid transparent;
  border-radius: var(--r-klein);
  padding: .55rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: background .15s, color .15s, transform .08s;
}
button:hover { background: #343d29; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: wait; }
button.haupt { background: var(--sand); color: #1a1d12; }
button.haupt:hover { background: #f0e4c0; }
button.warn { background: transparent; color: #eda48c; border-color: var(--signal-tief); }
button.warn:hover { background: var(--signal-tief); color: #ffd9cc; }
button.link { background: none; border: none; padding: 0; color: var(--sand-gedeckt); font-weight: 500; }
button.link:hover { color: var(--sand); text-decoration: underline; text-underline-offset: 3px; }
button svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.stapel { display: flex; flex-direction: column; gap: .9rem; }
.zeile { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.zeile.rechts { justify-content: flex-end; }
.feldreihe { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.feld-mit-knopf { display: flex; gap: .5rem; }

/* ------------------------------------------------------------ Anmeldung */
.tor {
  position: relative; isolation: isolate;
  min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background: radial-gradient(ellipse at 50% 30%, #1c2314, var(--nacht) 70%);
}
.tor::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("topo.svg") center / cover no-repeat; opacity: .07; }
.tor-karte { width: 100%; max-width: 380px; text-align: center; }
.tor-logo { width: 168px; height: 168px; border-radius: 50%; box-shadow: 0 0 0 1px var(--linie), 0 20px 60px rgba(0, 0, 0, .7); }
.tor-karte h1 { font-size: 2.9rem; margin-top: 1.4rem; }
.tor-unter { color: var(--sand-gedeckt); margin-top: .5rem; }
.tor-karte form { text-align: left; margin-top: 2rem; padding: 1.4rem; background: rgba(22, 26, 17, .85); border-radius: var(--r-gross); backdrop-filter: blur(6px); }
.tor-karte form button.haupt { margin-top: .3rem; padding: .7rem; }
.tor-karte .fehler { margin-top: 1rem; text-align: left; }
.qr { background: var(--sand); padding: .6rem; border-radius: var(--r); width: 196px; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: auto; }
#tor-abmelden { margin-top: 1.2rem; }

/* ------------------------------------------------------------ Gerüst */
.panel { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.leiste {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.6rem;
  padding: 1.3rem 1rem;
  background: var(--feld);
  border-right: 1px solid #22281a;
}
.leiste-marke { display: flex; align-items: center; gap: .75rem; padding: 0 .4rem; }
.leiste-logo { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 1px var(--linie); }
.leiste-marke strong { display: block; font-size: 1.75rem; color: var(--sand); letter-spacing: .08em; }
.leiste-marke span { color: var(--leise); font-size: .82rem; }
.nav { display: flex; flex-direction: column; gap: .2rem; }
.nav button {
  justify-content: flex-start; gap: .75rem;
  background: none; color: var(--leise); font-weight: 500; font-size: .95rem;
  padding: .6rem .75rem; border-radius: var(--r);
  position: relative;
}
.nav button svg { width: 1.2rem; height: 1.2rem; }
.nav button:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.nav button.aktiv { color: var(--sand); background: var(--gelaende); }
.nav button.aktiv::before { content: ""; position: absolute; left: -1rem; top: .55rem; bottom: .55rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--sand); }
.leiste-ich { margin-top: auto; display: flex; flex-direction: column; gap: .7rem; padding: .9rem .4rem 0; border-top: 1px solid var(--linie); }
.ich { flex-direction: column; align-items: flex-start; gap: 0; background: none; padding: 0; font-weight: 600; }
.ich:hover { background: none; color: var(--sand); }
.ich small { color: var(--leise); font-weight: 400; font-size: .8rem; }
.leiste-ich .link { align-self: flex-start; font-size: .85rem; }

.inhalt { min-width: 0; }
.seite { padding: 2rem 2.4rem 3rem; max-width: 1280px; display: flex; flex-direction: column; gap: 1.4rem; }
.seite-kopf { display: flex; flex-direction: column; gap: .5rem; }
.seite-kopf.zeile { flex-direction: row; align-items: flex-end; }
.seite-kopf .leise { max-width: 70ch; }

.block { background: var(--feld); border-radius: var(--r-gross); padding: 1.3rem 1.4rem; }
.block-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.block-kopf input { max-width: 280px; }
.block > h2 { margin-bottom: .2rem; }
.fuss { margin-top: .9rem; font-size: .8rem; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
.zwei.breit-links { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }

/* ------------------------------------------------------------ Lage */
.lage {
  position: relative; overflow: hidden;
  border-radius: var(--r-gross);
  padding: 1.8rem 2rem 1.6rem;
  background: linear-gradient(115deg, #232a1a 0%, #171b11 55%, #12150e 100%);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.4rem 2.5rem;
  isolation: isolate;
}
.lage::before { content: ""; position: absolute; inset: 0; background: url("topo.svg") center / cover no-repeat; opacity: .09; z-index: -1; }
.lage-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--sand-gedeckt); }
.lage-status .punkt { width: .55rem; height: .55rem; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 4px rgba(156, 191, 95, .15); animation: puls 2.4s ease-in-out infinite; }
.lage-status.aus .punkt { background: var(--signal); box-shadow: 0 0 0 4px rgba(208, 96, 63, .18); animation: none; }
@keyframes puls { 50% { box-shadow: 0 0 0 7px rgba(156, 191, 95, 0); } }
.lage-karte { font-family: var(--anzeige); font-weight: 800; font-size: clamp(3rem, 7vw, 5.6rem); line-height: .9; color: var(--sand); margin: .45rem 0 .5rem; letter-spacing: .01em; }
.lage-detail { color: var(--sand-gedeckt); }
.lage-detail b { color: var(--text); font-weight: 600; }
.lage-spieler { align-self: end; text-align: right; min-width: 190px; }
.lage-spieler .gross { font-family: var(--anzeige); font-weight: 800; font-size: 3.2rem; line-height: 1; color: var(--text); }
.lage-spieler .gross small { font-size: .5em; color: var(--leise); }
.lage-spieler .leise { margin-top: .2rem; }
.fuell { height: 4px; background: rgba(255, 255, 255, .07); border-radius: 4px; margin-top: .6rem; overflow: hidden; }
.fuell i { display: block; height: 100%; background: var(--sand); border-radius: 4px; transition: width .6s ease; }

.fraktionen { grid-column: 1 / -1; }
.tauziehen { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 3px; background: rgba(0, 0, 0, .25); }
.tauziehen i { display: block; flex: var(--anteil) 1 0; background: var(--farbe); min-width: 6px; transition: flex-grow .6s ease; }
.fraktion-legende { display: flex; gap: 2rem; margin-top: .75rem; flex-wrap: wrap; }
.fraktion-legende div { display: flex; align-items: baseline; gap: .55rem; }
.fraktion-legende .name { color: var(--sand-gedeckt); }
.fraktion-legende .wert { font-family: var(--anzeige); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--text); }
.fraktion-legende .farbe { width: .7rem; height: .7rem; border-radius: 3px; background: var(--farbe); align-self: center; }

/* ------------------------------------------------------------ Tabellen */
.tabelle-huelle { overflow-x: auto; margin: 0 -.4rem; }
.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.tabelle th { text-align: left; font-size: .8rem; font-weight: 500; color: var(--leise); padding: .4rem .7rem .7rem; white-space: nowrap; }
.tabelle td { padding: .7rem; vertical-align: middle; border-top: 1px solid #232919; }
.tabelle tbody tr:hover td { background: rgba(226, 212, 171, .025); }
.tabelle .r { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .leer { text-align: center; color: var(--leise); padding: 2.4rem 1rem; }
.tabelle .id { font-family: var(--mono); font-size: .78rem; color: var(--leise); }
.tabelle .name { font-weight: 600; }
.tabelle .aktionen { text-align: right; white-space: nowrap; }
.tabelle tr.fehl td { color: #eda48c; }
.tabelle tr.aus td:not(.aktionen) { opacity: .55; }
.konto-aktionen { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .15rem; }
.konto-aktionen button:disabled { opacity: .35; cursor: not-allowed; }
.konten-anlegen { max-width: 560px; }
.tabelle td.spieler-zelle { border-left: 3px solid var(--farbe, transparent); padding-left: .9rem; }

.knopfgruppe { display: inline-flex; gap: .2rem; }
.tabelle .aktionen button { padding: .4rem .6rem; background: transparent; color: var(--sand-gedeckt); border: none; border-radius: var(--r-klein); font-size: .82rem; font-weight: 500; }
.tabelle .aktionen button + button { margin-left: .15rem; }
.tabelle .aktionen button:hover { background: var(--gelaende-hell); color: var(--text); }
.tabelle .aktionen button.warn { color: #e39a82; }
.tabelle .aktionen button.warn:hover { background: var(--signal-tief); color: #ffd9cc; }
@media (max-width: 1100px) { .knopfgruppe button span { display: none; } }

.marke { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--gelaende-hell); color: var(--sand-gedeckt); }
.marke.gut { background: rgba(111, 126, 71, .3); color: #cfdca8; }
.marke.rot { background: rgba(208, 96, 63, .15); color: #eda48c; }
.fraktion-chip { display: inline-flex; align-items: center; gap: .45rem; }
.fraktion-chip i { width: .55rem; height: .55rem; border-radius: 2px; background: var(--farbe, var(--leise)); }

/* ------------------------------------------------------------ Steuerung */
.funk {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .9rem;
  background: var(--feld); border-radius: 999px; padding: .45rem .45rem .45rem 1.2rem;
}
.funk-icon { width: 1.4rem; height: 1.4rem; fill: none; stroke: var(--sand-gedeckt); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.funk textarea { background: transparent; border: none; resize: none; padding: .55rem 0; font-size: 1rem; min-height: 0; }
.funk textarea:focus, .funk textarea:hover { background: transparent; }
.funk:focus-within { box-shadow: 0 0 0 1px var(--sand-gedeckt); }
.funk button { border-radius: 999px; padding: .65rem 1.4rem; }
.funk #bc-zaehler { font-variant-numeric: tabular-nums; font-size: .8rem; }

.match-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.match-knoepfe button { flex-direction: row; justify-content: flex-start; text-align: left; white-space: normal; gap: .8rem; padding: .9rem 1rem; border-radius: var(--r); }
.match-knoepfe button svg { width: 1.4rem; height: 1.4rem; }
.match-knoepfe span { display: flex; flex-direction: column; }
.match-knoepfe small { font-weight: 400; font-size: .8rem; opacity: .75; }

.rotation { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; counter-reset: rot; }
.rotation li { position: relative; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--gelaende); counter-increment: rot; }
.rotation li::after { content: counter(rot); position: absolute; right: 1rem; top: .5rem; font-family: var(--anzeige); font-weight: 800; font-size: 2.4rem; color: rgba(226, 212, 171, .1); }
.rotation li.jetzt { background: linear-gradient(135deg, #3a4426, #252c1b); box-shadow: inset 0 0 0 1px var(--oliv); }
.rotation li.naechste { box-shadow: inset 0 0 0 1px var(--linie); }
.rotation .k { font-family: var(--anzeige); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--sand); }
.rotation .d { color: var(--sand-gedeckt); font-size: .85rem; margin-top: .4rem; }
.rotation .marke { margin-top: .7rem; }

/* ------------------------------------------------------------ Sonstiges */
.editor { padding: 0; }
.reiter { display: inline-flex; background: var(--feld); border-radius: 999px; padding: .25rem; gap: .2rem; }
.reiter button { background: none; color: var(--leise); border-radius: 999px; padding: .4rem 1rem; font-weight: 500; }
.reiter button.aktiv { background: var(--gelaende-hell); color: var(--sand); }
.ergebnis { background: var(--feld); border-radius: var(--r-gross); padding: 1rem 1.2rem; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; max-height: 360px; overflow: auto; margin: 0; color: var(--sand-gedeckt); }

dialog {
  background: var(--feld); color: var(--text);
  border: none; border-radius: var(--r-gross);
  padding: 1.6rem; width: min(460px, calc(100vw - 2rem));
  box-shadow: 0 0 0 1px var(--linie), 0 30px 80px rgba(0, 0, 0, .6);
}
dialog[open] { animation: auf .18s ease-out; }
@keyframes auf { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog::backdrop { background: rgba(5, 6, 4, .72); backdrop-filter: blur(3px); }
dialog h2 { font-size: 1.15rem; }
#d-inhalt { display: flex; flex-direction: column; gap: .9rem; color: var(--sand-gedeckt); }
.passwort-anzeige { font: 1.2rem var(--mono); background: var(--nacht); padding: .8rem; text-align: center; border-radius: var(--r); user-select: all; color: var(--sand); letter-spacing: .05em; }

.meldungen { position: fixed; right: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 50; max-width: calc(100vw - 2.4rem); }
.meldung { background: var(--gelaende-hell); color: var(--text); padding: .7rem 1rem .7rem .9rem; border-radius: var(--r); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 380px; display: flex; gap: .6rem; align-items: flex-start; animation: auf .2s ease-out; }
.meldung::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--gruen); margin-top: .45rem; flex: none; }
.meldung.fehl::before { background: var(--signal); }

/* ------------------------------------------------------------ Schichtplan */
:root { --art-discord: #8e98d8; --art-spiel: var(--oliv-hell); --art-beides: var(--sand); }
.art-discord { --art: var(--art-discord); }
.art-spiel { --art: var(--art-spiel); }
.art-beides { --art: var(--art-beides); }

.sp-leiste { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.sp-leiste .reiter button { min-width: 2.4rem; }
#sp-titel { color: var(--text); font-weight: 600; }
.sp-legende { margin-left: auto; display: flex; gap: 1.1rem; font-size: .85rem; color: var(--sand-gedeckt); }
.sp-legende span { display: inline-flex; align-items: center; gap: .4rem; }
.sp-legende span::before { content: ""; width: .7rem; height: .7rem; border-radius: 3px; background: var(--art); }
.sp-block { padding: .4rem; }
.sp-scroll { max-height: max(420px, calc(100vh - 250px)); overflow: auto; border-radius: var(--r); }
.sp-gitter { display: grid; grid-template-columns: 3.4rem repeat(7, minmax(110px, 1fr)); min-width: 860px; position: relative; }
.sp-achse { padding-top: 3.4rem; }
.sp-achse span { display: block; height: 34px; font-size: .72rem; color: var(--leise); text-align: right; padding-right: .5rem; transform: translateY(-.5em); font-variant-numeric: tabular-nums; }
.sp-achse span:first-child { visibility: hidden; }
.sp-tag { border-left: 1px solid #232919; }
.sp-tagkopf { position: sticky; top: 0; z-index: 3; height: 3.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--feld); border-bottom: 1px solid var(--linie); }
.sp-tagkopf span { font-size: .78rem; color: var(--leise); }
.sp-tagkopf strong { font-family: var(--anzeige); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--text); }
.sp-tag.heute .sp-tagkopf strong { color: var(--nacht); background: var(--sand); border-radius: 999px; min-width: 2rem; padding: .1rem .35rem; text-align: center; }
.sp-flaeche { position: relative; height: calc(24 * 34px); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, transparent 0 33px, #20251a 33px 34px); }
.sp-tag.heute .sp-flaeche { background-color: rgba(226, 212, 171, .025); }
.sp-schicht {
  position: absolute; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0;
  padding: .3rem .45rem; border-radius: 6px; overflow: hidden; text-align: left; cursor: pointer; white-space: nowrap;
  background: color-mix(in srgb, var(--art) 22%, var(--feld)); color: var(--text);
  border: none; border-left: 3px solid var(--art); font-size: .78rem; line-height: 1.25;
}
.sp-schicht:hover { background: color-mix(in srgb, var(--art) 34%, var(--feld)); }
.sp-schicht.eigene { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--art) 70%, transparent); }
.sp-schicht strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sp-schicht small { color: var(--sand-gedeckt); font-variant-numeric: tabular-nums; }
.sp-jetzt { position: absolute; left: 0; right: 0; height: 2px; background: var(--signal); z-index: 2; pointer-events: none; }
.sp-jetzt::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.sp-liste { display: none; }
.sp-listentag { padding: .8rem .6rem; border-top: 1px solid #232919; display: flex; flex-direction: column; gap: .4rem; }
.sp-listentag:first-child { border-top: none; }
.sp-listentag h2 { font-size: .95rem; margin-bottom: .2rem; }
.sp-zeile { justify-content: flex-start; gap: .8rem; background: var(--gelaende); border-left: 3px solid var(--art); text-align: left; }

.wahl-feld { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.wahl-feld legend { font-size: .86rem; font-weight: 500; color: var(--sand-gedeckt); padding: 0; margin-bottom: .35rem; }
.wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.wahl label { display: block; cursor: pointer; }
.wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wahl span { display: block; text-align: center; padding: .6rem .4rem; border-radius: var(--r-klein); background: var(--nacht); color: var(--sand-gedeckt); font-weight: 500; border: 1px solid transparent; transition: background .15s, color .15s; }
.wahl label:hover span { color: var(--text); }
.wahl input:checked + span { background: color-mix(in srgb, var(--art) 22%, var(--feld)); color: var(--text); border-color: var(--art); }
.wahl input:focus-visible + span { outline: 2px solid var(--sand); outline-offset: 2px; }
.wahl-discord { --art: var(--art-discord); }
.wahl-spiel { --art: var(--art-spiel); }
.wahl-beides { --art: var(--art-beides); }

.dienst { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid rgba(226, 212, 171, .08); }
.dienst:empty { display: none; }
.dienst-titel { font-weight: 600; color: var(--sand); margin-right: .3rem; }
.dienst-person { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .75rem .25rem .6rem; border-radius: 999px; background: rgba(0, 0, 0, .28); font-weight: 600; font-size: .88rem; }
.dienst-person::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--art); }
.dienst-person small { color: var(--leise); font-weight: 400; }

/* ------------------------------------------------------------ Aktivität */
.ak-spiel { --art: var(--art-spiel); }
.ak-voice { --art: var(--art-discord); }
.ak-diagramm svg { display: block; width: 100%; height: auto; }
.ak-linie { stroke: #262c1d; stroke-width: 1; }
.ak-achse { fill: var(--leise); font: 11px var(--schrift); }
.ak-b-spiel { fill: var(--art-spiel); }
.ak-b-voice { fill: var(--art-discord); }
.ak-diagramm rect:hover { filter: brightness(1.25); }

.rangliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: rang; }
.rangliste li { counter-increment: rang; }
.rangliste li.leer { color: var(--leise); padding: 1.6rem .4rem; text-align: center; }
.rang-zeile {
  width: 100%; display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "nr name zeit" ". balken balken" ". info info";
  gap: .15rem .6rem; align-items: center; text-align: left; white-space: normal;
  background: none; padding: .7rem .5rem; border-radius: var(--r); border-top: 1px solid #232919;
}
.rangliste li:first-child .rang-zeile { border-top-color: transparent; }
.rang-zeile:hover { background: var(--gelaende); }
.rang-zeile::before { content: counter(rang); grid-area: nr; font-family: var(--anzeige); font-weight: 800; font-size: 1.25rem; color: var(--leise); text-align: center; }
.rangliste li:nth-child(-n+3) .rang-zeile::before { color: var(--sand); }
.rang-name { grid-area: name; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: .45rem; overflow: hidden; text-overflow: ellipsis; }
.rang-zeit { grid-area: zeit; font-family: var(--anzeige); font-weight: 800; font-size: 1.25rem; color: var(--sand); }
.rang-balken { grid-area: balken; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.rang-balken i { display: block; height: 100%; background: var(--art); border-radius: 3px; }
.rang-info { grid-area: info; font-size: .8rem; font-weight: 400; }
.live { width: .5rem; height: .5rem; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 3px rgba(156, 191, 95, .18); flex: none; }
.sitzungen { max-height: 50vh; overflow: auto; margin: 0; }
.sitzungen td { padding: .45rem .5rem; font-size: .88rem; }

/* ------------------------------------------------------------ Spielerakte und Anticheat */
.name-link { background: none; border: none; padding: 0; color: var(--text); font-weight: 600; font-size: inherit; justify-content: flex-start; gap: .4rem; text-align: left; white-space: normal; }
.name-link:hover { background: none; color: var(--sand); text-decoration: underline; text-underline-offset: 3px; }
.name-link.id { font-weight: 400; color: var(--leise); }
.verdacht { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; font-size: .72rem; font-weight: 700; background: #6b5a2a; color: #f6e7b8; }
.verdacht.stufe-2 { background: #8a4a24; color: #ffe0c8; }
.verdacht.stufe-3 { background: var(--signal); color: #fff; }
.nav-zahl { margin-left: auto; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--signal); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.4rem; }
.zurueck { align-self: flex-start; }

.akte-kopf { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.akte-wer { display: flex; gap: 1.4rem; align-items: center; min-width: 0; }
.akte-bild { width: 112px; height: 112px; border-radius: 14px; flex: none; object-fit: cover; box-shadow: 0 0 0 1px var(--linie), 0 12px 30px rgba(0, 0, 0, .5); }
.akte-bild.leer { display: grid; place-items: center; background: var(--gelaende-hell); font-family: var(--anzeige); font-weight: 800; font-size: 3rem; color: var(--sand-gedeckt); }
.akte-name { font-size: clamp(2.4rem, 5vw, 4rem); margin: 0 0 .35rem; overflow-wrap: anywhere; }
.akte-marken { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }
.akte-knoepfe { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.akte-knoepfe .id { font-family: var(--mono); font-size: .8rem; color: var(--leise); }
.knopf { display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; border-radius: var(--r-klein); font-weight: 600; font-size: .9rem; text-decoration: none; }
.knopf.haupt { background: var(--sand); color: #1a1d12; }
.knopf.haupt:hover { background: #f0e4c0; }
.knopfreihe { display: flex; gap: .4rem; }

.akte-werte { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; background: var(--feld); border-radius: var(--r-gross); padding: 1.1rem .4rem; }
.akte-werte div { padding: .2rem 1.1rem; border-left: 1px solid var(--linie); min-width: 0; }
.akte-werte div:first-child { border-left: none; }
.akte-werte dt { color: var(--leise); font-size: .82rem; }
.akte-werte dd { margin: .15rem 0 0; font-family: var(--anzeige); font-weight: 800; font-size: 1.9rem; line-height: 1.05; color: var(--sand); overflow-wrap: anywhere; }
.akte-werte small { color: var(--leise); font-size: .78rem; }
.kf { max-height: 420px; overflow: auto; }
.tabelle tr.kill td:first-child { box-shadow: inset 3px 0 0 var(--art-spiel); }
.tabelle tr.tod td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
.kf-art { display: inline-block; min-width: 2.6rem; font-size: .75rem; font-weight: 700; color: var(--leise); }
.tabelle .marke + .marke { margin-left: .3rem; }

.stufe { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.stufe-1 { background: rgba(226, 212, 171, .1); color: var(--sand-gedeckt); }
.stufe-2 { background: rgba(214, 140, 70, .18); color: #f0bf8c; }
.stufe-3 { background: rgba(208, 96, 63, .25); color: #ffb39c; }
.ini { user-select: all; color: var(--text); max-height: none; }
.feld-einheit { display: flex; align-items: center; gap: .5rem; }
.feld-einheit input { flex: 1; }
.feld-einheit span { color: var(--leise); font-size: .85rem; min-width: 2.4rem; }

@media (max-width: 1100px) {
  .akte-werte { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1rem; }
  .akte-werte div:nth-child(4) { border-left: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 1000px) {
  .zwei, .zwei.breit-links { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  .leiste { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: .6rem; padding: .6rem 1rem; border-right: none; border-bottom: 1px solid #22281a; flex-wrap: wrap; }
  .leiste-marke { padding: 0; }
  .leiste-marke strong { font-size: 1.3rem; }
  .leiste-logo { width: 34px; height: 34px; }
  .leiste-ich { margin: 0 0 0 auto; padding: 0; border: none; flex-direction: row; align-items: center; }
  .ich small { display: none; }
  .nav { order: 3; width: 100%; min-width: 0; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .nav button { padding: .5rem .7rem; font-size: .88rem; gap: .45rem; }
  .nav button.aktiv::before { display: none; }
  .seite { padding: 1.2rem 1rem 2rem; gap: 1rem; }
  h1.schablone { font-size: 2.1rem; }
  .lage { grid-template-columns: minmax(0, 1fr); padding: 1.4rem 1.2rem; }
  .lage-karte { overflow-wrap: anywhere; }
  .lage-spieler { text-align: left; }
  .block { padding: 1rem; }
  .block-kopf input { max-width: none; }
  .feldreihe, .match-knoepfe { grid-template-columns: 1fr; }
  .funk { grid-template-columns: 1fr auto; border-radius: var(--r-gross); padding: .6rem; }
  .funk-icon, .funk #bc-zaehler { display: none; }
  .seite-kopf.zeile { flex-direction: column; align-items: flex-start; }
  .fraktion-legende { gap: 1.2rem; }
  .sp-raster { display: none; }
  .sp-liste { display: block; }
  .sp-legende { margin-left: 0; }
  .akte-kopf { grid-template-columns: minmax(0, 1fr); }
  .akte-wer { flex-direction: column; align-items: flex-start; }
  .akte-knoepfe { align-items: flex-start; }
  .akte-werte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .akte-werte div:nth-child(odd) { border-left: none; }
  .akte-werte div:nth-child(4) { border-left: 1px solid var(--linie); }
}
