/* Design nach dem Vorbild von huntshowdown.com:
   kühles Schwarzblau, Blutrot als Akzent, gesperrte Serifen-Versalien,
   Pergament-Karten wie im Shop, schmale Linien statt Rahmen. */

/* Design-Tokens des Bayou-Book-Systems. Quelle und Dokumentation:
   .claude/skills/bayou-book-design/ (base.css bleibt aussen vor, der Reset steht hier). */
@import "tokens/colors.css?v=34950298";
@import "tokens/typography.css?v=fbd92897";
@import "tokens/spacing.css?v=1f9005c7";
@import "tokens/effects.css?v=467e1a8b";

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* sonst gewinnt z. B. .btn mit display: inline-block über das Attribut */
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }  /* iOS vergrößert sonst Text im Querformat */
/* Anker scrollen überall weich zum Ziel, außer wenn das System reduzierte Bewegung wünscht.
   Sprünge beim Ansichtswechsel setzen deshalb ausdrücklich behavior: "instant". */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Ziel nicht unter der festgepinnten Kopfleiste verstecken */
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.66px;
  line-height: 1.666;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
/* Formularelemente erben sonst die Systemschrift */
button, input, select, textarea { font-family: inherit; }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; margin: 0; color: var(--ink); }
.h-display { font-size: clamp(30px, 5vw, 44px); line-height: 1.25; text-align: center; }
.h-kicker {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.25;
  text-shadow: 0 2px 2px #000;
}
.h-plate {
  font-family: var(--font-head);
  font-size: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1.25;
}
.h-plate::before { content: "- "; }
.h-plate::after { content: " -"; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.italic { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: var(--accent-translucent);
  border: 1px solid var(--red);
  border-radius: 0;
  padding: 11px 24px 8px;
  transition: background var(--ease-fast), color var(--ease-fast), border-color var(--ease-fast);
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--red); }
.btn:active { background: var(--red-press); }
.btn.light { color: var(--bg); background: rgba(245, 245, 245, .85); border-color: #f5f5f5; }
.btn.light:hover { background: #f5f5f5; }
.btn.ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, .04); }
.btn.small { font-size: 12px; letter-spacing: 3px; padding: 9px 16px 7px; }
.btn.danger:hover { border-color: var(--red-bright); color: var(--red-bright); background: transparent; }
.btn.busy { color: var(--muted); border-color: var(--line-soft); cursor: default; }
.btn svg { width: 16px; height: 16px; fill: currentColor; vertical-align: -3px; margin-right: 8px; }

/* ---------- Kopfleiste ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--surface-topbar);
  -webkit-backdrop-filter: var(--blur-topbar);
  backdrop-filter: var(--blur-topbar);
  padding-left: calc(20px + env(safe-area-inset-left));
}
.topbar-left {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-body);
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 1px solid var(--line); }
.topbar-label { display: inline-flex; align-items: baseline; gap: 6px; }  /* gemeinsame Grundlinie, sonst steht BOOK je nach Schrift höher oder tiefer als BAYOU */
/* Kasten wie bei der Wortmarke; das Letter-Spacing hängt hinter dem letzten Buchstaben,
   deshalb links 4px mehr Innenabstand, damit das Wort mittig sitzt */
.topbar-box { background: var(--ink); color: var(--bg); line-height: 1; padding: 3px 4px 5px 8px; }
.topbar-right { display: flex; justify-content: flex-end; height: 100%; position: relative; }
.topbar-cta {
  display: inline-flex; align-items: center; height: 100%;
  background: var(--accent-translucent);
  color: var(--ink); text-decoration: none;
  font-family: var(--font-body); font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  padding: 0 24px 0 24px; padding-right: calc(24px + env(safe-area-inset-right)); white-space: nowrap; border: none; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.topbar-cta:hover { background: var(--red); }
.topbar-cta svg { width: 16px; height: 16px; fill: currentColor; margin-right: 10px; flex: none; }
.topbar-cta svg + svg, .btn svg + svg { margin-left: -4px; }

/* Wortmarke Bayou Book: großes Wort, darunter der gesperrte Zusatz in einem tintenfarbenen Kasten */
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.logo-main { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.logo-box { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .45em; background: var(--ink); color: var(--bg); line-height: 1.4; }
@media (max-width: 480px) {
  .topbar-cta { padding: 0 14px; letter-spacing: 3px; }
}

/* Helle Leiste unter der Kopfzeile (bei Hunt: Social Icons) */
.lightbar {
  background: var(--ink);
  color: var(--bg);
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 28px;
  padding: 10px 16px;
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
}
.lightbar a { color: var(--bg); text-decoration: none; opacity: .85; display: inline-flex; align-items: center; gap: 8px; }
.lightbar a:hover { opacity: 1; }
.lightbar svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 560px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 20px 40px;
  background: var(--hero-bg);
}
/* der rote Mond */
.hero::before {
  content: "";
  position: absolute; left: 50%; top: 12%;
  width: 150px; height: 150px; margin-left: -75px;
  border-radius: 50%;
  background: var(--moon);
  box-shadow: var(--moon-glow);
  opacity: .9;
}
/* Silhouetten: Bodennebel und Dunkelheit zum Rand */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--hero-vignette);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .logo { margin-bottom: 26px; filter: var(--shadow-logo); }
.hero .logo-main { font-size: clamp(64px, 12vw, 120px); }
.hero .logo-box { font-size: clamp(11px, 2vw, 16px); padding: 4px 14px 6px 20px; margin-top: 12px; }
.hero .tagline { max-width: 560px; margin: 0 auto; text-shadow: var(--shadow-text); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero-actions .btn { min-width: 190px; }
.platforms {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 12px;
  margin-top: 30px;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
}
.platforms span { display: inline-flex; align-items: center; gap: 8px; }
.platforms span + span::before { content: ""; width: 1px; height: 14px; background: var(--line); margin-right: 12px; }
.platforms svg { width: 14px; height: 14px; fill: currentColor; }
.cta-note { color: var(--muted); font-style: italic; font-size: 14px; margin: 12px 0 0; }
.cta-note.err { color: var(--red-bright); }

/* News-Teaser am unteren Heldenrand: Linie über dem Titel */
.teasers {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
  max-width: 1140px; margin: 0 auto; padding: 0 20px 50px;
  position: relative; z-index: 1;
}
@media (max-width: 760px) { .teasers { grid-template-columns: 1fr; gap: 40px; } }
.teaser { text-align: center; }
.teaser::before { content: ""; display: block; width: 190px; max-width: 80%; height: 1px; margin: 0 auto; background: rgba(218, 226, 228, .55); }
.teaser h3 { padding-top: 30px; }
.teaser p { margin: 12px 0 0; color: var(--white); text-shadow: var(--shadow-text); }

/* ---------- Abschnitte ---------- */
.section { padding: 66px 40px; padding-left: max(40px, env(safe-area-inset-left)); padding-right: max(40px, env(safe-area-inset-right)); }
@media (max-width: 640px) { .section { padding: 40px 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); } }
.section.dark { background: var(--bg-2); }
.wrap { max-width: 1140px; margin: 0 auto; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.about p { max-width: 640px; margin: 18px auto 0; color: var(--muted); text-align: center; }
.about .hero-actions { margin-top: 30px; }

/* Landing: Abschnitte mit Text neben einer Vorschau aus den echten App-Bausteinen */
.section-lead { max-width: 640px; margin: 14px auto 36px; color: var(--muted); text-align: center; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-text { order: 2; }
.feature-text .h-display { text-align: left; }
.feature-text p { margin: 18px 0 0; color: var(--muted); }
.feature-preview .overall { margin-bottom: 0; background: var(--bg); }
.feature-preview .board .full { display: none; }
.feature-preview .board .abbr { display: inline; }
.feature-preview .board th, .feature-preview .board td { padding-left: 8px; padding-right: 8px; }
.feature-preview .panel-body { padding: 16px 20px; }
.feature-preview .board .who-wrap { gap: 10px; }
/* Screenshot statt nachgebauter Bausteine (Stream-Overlay): Bild mit der Inset-Linie der Panels */
.feature-shot { margin: 0; }
.feature-shot img { display: block; width: 100%; height: auto; outline: 1px solid var(--line-soft); outline-offset: -1px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
@media (max-width: 900px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 30px; }
  .feature.flip .feature-text { order: 0; }
  .feature-text { text-align: center; }
  .feature-text .h-display { text-align: center; }
}

/* Landing: Hero mit dem Film links und Text rechts (index.html, landing.js). Wortmarke und Mond stecken im Poster,
   deshalb kein eigener Mond (::before). Ab Tablet-Hochformat steht der Film über dem Text. */
.hero.hero-film { min-height: 0; display: block; text-align: left; padding: 56px 40px 64px; padding-left: max(40px, env(safe-area-inset-left)); padding-right: max(40px, env(safe-area-inset-right)); }
.hero.hero-film::before { content: none; }
/* Rotes Glühen hinter dem Mond im Poster statt oben mittig wie im alten Hero */
.hero.hero-film { background: radial-gradient(circle at 31% 34%, rgba(215, 38, 61, .3) 0, rgba(127, 27, 29, .2) 9%, transparent 27%), radial-gradient(ellipse at 50% 100%, rgba(58, 78, 92, .35), transparent 60%), linear-gradient(180deg, #050607 0%, #14100f 45%, #0c1013 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; max-width: 1140px; margin: 0 auto; }
.hero-kicker { display: block; margin-bottom: 14px; font-family: var(--font-body); font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); }
.hero-headline { display: block; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.2; text-shadow: var(--shadow-text); text-wrap: balance; }
.hero-film .tagline { max-width: none; margin: 18px 0 0; }
.hero-film .hero-actions, .hero-film .platforms { justify-content: flex-start; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero.hero-film { text-align: center; background: radial-gradient(circle at 50% 18%, rgba(215, 38, 61, .3) 0, rgba(127, 27, 29, .2) 12%, transparent 34%), radial-gradient(ellipse at 50% 100%, rgba(58, 78, 92, .35), transparent 60%), linear-gradient(180deg, #050607 0%, #14100f 45%, #0c1013 100%); }
  .hero-film .hero-text { max-width: 560px; margin: 0 auto; }
  .hero-film .hero-actions, .hero-film .platforms { justify-content: center; }
}
@media (max-width: 640px) { .hero.hero-film { padding: 20px 16px 36px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); } }

/* Film: Rahmen wie .feature-shot, Knöpfe unten im Bild (am Handy darunter), Vollbild rechts.
   Der Tonknopf zeigt den Zustand: blutrot und leuchtend, solange der Ton an ist, stumm tritt er zurück wie der Knopf daneben.
   Bis zum ersten Abspielen liegt ein großer ▶ im Mond des Posters. Er wächst mit der Breite des Films und bleibt so
   über der Wortmarke (BAYOU beginnt bei gut einem Drittel der Höhe). */
.film { position: relative; margin: 0; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--black); outline: 1px solid var(--line-soft); outline-offset: -1px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.film video:not([controls]) { cursor: pointer; }
.film-start {
  position: absolute; left: 50%; top: 0; margin-top: 13.2%; transform: translate(-50%, -50%);  /* 13,2 % der Breite = 23,5 % der 16:9-Höhe, auch wenn am Handy die Knöpfe unter dem Film im Rahmen stehen */
  display: flex; align-items: center; justify-content: center;
  width: clamp(44px, 11.5%, 72px); aspect-ratio: 1; padding: 0;
  color: var(--white); background: rgba(12, 16, 19, .35); border: 1px solid rgba(255, 255, 255, .6); border-radius: 0;
  -webkit-backdrop-filter: var(--blur-topbar); backdrop-filter: var(--blur-topbar);
  box-shadow: 0 0 34px rgba(215, 38, 61, .5);
  cursor: pointer; transition: background var(--ease-fast), border-color var(--ease-fast);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.film-start svg { width: 52%; height: 52%; fill: currentColor; margin-left: 4%; }  /* Dreieck optisch mittig */
.film-start:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.film-controls { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 8px; pointer-events: none; }
.film-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 42px; min-width: 42px; padding: 3px 18px 0;
  font-family: var(--font-head); font-size: 15px; letter-spacing: 2px; text-transform: uppercase; line-height: 1;
  color: var(--ink); background: rgba(12, 16, 19, .72); border: 1px solid var(--line); border-radius: 0;
  -webkit-backdrop-filter: var(--blur-topbar); backdrop-filter: var(--blur-topbar);
  cursor: pointer; pointer-events: auto; transition: background var(--ease-fast), border-color var(--ease-fast), box-shadow var(--ease-fast);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.film-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; margin-top: -3px; }
.film-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.film-play, .film-full { width: 42px; padding: 0; }
.film-play svg, .film-full svg { margin-top: 0; }
.film-full { margin-left: auto; }
.film-sound.on { background: var(--accent-translucent); border-color: var(--red-bright); box-shadow: var(--glow-red), 0 0 22px rgba(215, 38, 61, .35); }
@media (hover: hover) {
  .film-btn:hover { border-color: var(--ink); background: rgba(12, 16, 19, .88); }
  .film-sound.on:hover { background: var(--red); border-color: var(--red-bright); }
  .film-start:hover { background: var(--accent-translucent); border-color: var(--white); }
}
/* Vollbild: der ganze Rahmen samt Knöpfen, das Video füllt den Schirm */
.film:fullscreen { display: flex; align-items: center; justify-content: center; background: var(--black); }
.film:fullscreen video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; outline: none; box-shadow: none; }
/* Am Handy ist das Bild nur gut 190px hoch, die Knöpfe würden Text im unteren Drittel verdecken: dort stehen sie unter dem Film */
@media (max-width: 640px) {
  .film-controls { position: static; margin-top: 12px; gap: 6px; }
  .film:fullscreen .film-controls { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; }
  .film-btn { height: 40px; min-width: 40px; padding: 3px 14px 0; font-size: 13px; gap: 8px; }
  .film-btn svg { width: 18px; height: 18px; }
  .film-play, .film-full { width: 40px; padding: 0; }
}

/* ---------- Pergament-Karten (Shop-Optik) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative;
  color: var(--paper-ink);
  background: var(--paper-texture), var(--paper);
  border-radius: 2px;
  box-shadow: var(--shadow-paper);
  padding: 24px 20px 24px;
  text-align: center;
}
.card .h-plate { color: var(--paper-ink); }
.card-value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(56px, 9vw, 84px);
  line-height: 1;
  color: var(--paper-ink);
  margin: 14px 0 18px;
  font-variant-numeric: tabular-nums;
}
.card-value.bump { animation: bump .22s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.card-sub { color: var(--steel); font-style: italic; margin-top: -8px; margin-bottom: 16px; }
.card .btn { display: block; width: 100%; }
.card .btn.light { background: transparent; color: var(--paper-ink); border-color: rgba(12, 16, 19, .35); }
.card .btn.light:hover { background: rgba(12, 16, 19, .06); border-color: var(--paper-ink); }
.card .minus { margin-top: 8px; font-size: 12px; padding: 7px 10px 5px; }
.card.dark {
  color: var(--ink);
  background: var(--bg-2);
  box-shadow: var(--shadow-card-dark);
}
.card.dark .h-plate, .card.dark .card-value { color: var(--ink); }
.card.dark .card-sub { color: var(--muted); }
.hint { color: var(--muted); font-style: italic; font-size: 14px; margin: 20px 0 0; text-align: center; }
kbd {
  font-family: var(--font-body); font-size: 12px; letter-spacing: 1px;
  border: 1px solid var(--line); padding: 1px 6px; color: var(--ink);
}

/* ---------- Panels der App ---------- */
.panel { max-width: 1140px; margin: 0 auto 30px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.panel-title {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 18px;
  display: flex; align-items: center; gap: 16px;
}
.panel-title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--red-bright); color: var(--white);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0; line-height: 1;
  margin-left: -6px;
}
.panel-body { background: var(--bg-2); padding: 24px; box-shadow: var(--shadow-panel-inset); }
@media (max-width: 640px) { .panel-body { padding: 16px; } }

/* ---------- Formularfelder ---------- */
input[type="date"], input[type="text"], input[type="email"] {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color-scheme: dark;
  min-width: 170px;
}
input:focus { outline: none; border-color: var(--ink); }
.date-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.date-label { color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }

/* ---------- Zähler ---------- */
.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: stretch; }
/* K/D und K/D/A getrennt in einer eigenen Reihe unter den Zählern */
.ratios { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 30px; }
@media (max-width: 760px) { .counters, .ratios { grid-template-columns: 1fr; } }

/* ---------- Statistik-Kacheln ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--line-soft); margin-bottom: 24px; }
.stat { background: var(--bg-2); padding: 14px 12px; text-align: center; }
.stats.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* ohne Sync zwei Kacheln mehr, 4 × 2 statt 6 + 2 */
.stat-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--font-body); font-size: 26px; color: var(--ink); margin-top: 2px; }

/* ---------- Tabelle ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { font-family: var(--font-body); font-weight: 400; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--surface-row-hover); }
tbody tr.active { background: var(--surface-row-active); }
tbody tr.active td:first-child { color: var(--white); }
/* Eingeklappte Chronik: die letzten Zeilen blenden aus, darunter steht, wie viele noch folgen */
tbody tr.fade-1 td { opacity: .6; }
tbody tr.fade-2 td { opacity: .3; }
tbody tr.more-row td { text-align: center; padding: 14px 12px; color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
tbody tr.more-row:hover td { color: var(--ink); }
tbody tr.sync-row, tbody tr.sync-row:hover { cursor: default; background: transparent; }
tbody tr.sync-row td.date { font-style: italic; color: var(--muted); }
.more-row .dots { letter-spacing: 6px; margin: 0 8px; }
td.k { color: var(--ink); }
td.d { color: var(--muted); }
td.a { color: var(--ink); }
td.kd-cell { font-family: var(--font-body); color: var(--white); }
/* line-height 0: die Zeile ist nur so hoch wie der Totenkopf, sonst sitzt er auf der Grundlinie und steht zu hoch */
td.actions { width: 1%; white-space: nowrap; line-height: 0; }
tfoot td { border-top: 1px solid var(--line); border-bottom: none; color: var(--white); font-weight: 600; }
.empty { color: var(--muted); font-style: italic; text-align: center; padding: 18px 0; }
.x { cursor: pointer; background: none; border: none; color: var(--muted); font-family: var(--font-body); font-size: 16px; padding: 6px 10px; margin: -6px -4px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.x:hover { color: var(--red-bright); }
.x.skull { color: var(--red-bright); transition: filter var(--ease-fast), transform var(--ease-fast); }
.x.skull svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.x.skull:hover { filter: drop-shadow(0 0 6px rgba(215, 38, 61, .6)); transform: scale(1.15); }
/* Auge zum Ansehen, Stift zum Ändern: tintenfarben wie ein Ghost-Button, Verhalten wie der Totenkopf daneben */
.x.eye, .x.pen { color: var(--ink); transition: color var(--ease-fast), transform var(--ease-fast); }
.x.eye svg, .x.pen svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.x.eye:hover, .x.pen:hover { color: var(--white); transform: scale(1.15); }
@media (hover: none) { .x.eye:hover, .x.pen:hover { color: var(--ink); transform: none; } }
a.x { text-decoration: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.toolbar.center { justify-content: center; }
.table-wrap { overflow-x: auto; }

/* ---------- Hunter / Steam ---------- */
.hunter { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.avatar { width: 72px; height: 72px; flex: none; border: 1px solid var(--line); background: var(--bg); object-fit: cover; }
.hunter-main { flex: 1 1 220px; min-width: 0; }
.hunter-name { font-family: var(--font-body); font-size: 22px; color: var(--ink); overflow-wrap: anywhere; }
.hunter-name a { text-decoration: none; }
.hunter-name a:hover { color: var(--white); text-decoration: underline; }
#name-tag .hunter-item-tag { margin-left: 12px; font-family: var(--font-body); vertical-align: 5px; }
.hunter-sub { color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.hunter-summary .emoticon { width: 18px; height: 18px; vertical-align: -4px; margin: 0 1px; }
.hunter-summary {
  color: var(--ink); font-style: italic; font-size: 15px; line-height: 1.35; margin-top: 2px;
  white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.hunter-stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line-soft); }
.hunter-stats .stat { min-width: 130px; }
.hunter-note { color: var(--muted); font-style: italic; margin: 6px 0 0; }
.hunter-actions { flex-basis: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.hunter-actions .btn:disabled { opacity: .5; cursor: default; }
td.n { color: var(--muted); }
table.readonly tbody tr { cursor: default; }
table.readonly tbody tr:hover { background: transparent; }
table.readonly tbody tr.more-row { cursor: pointer; }
.hunter-note.err { color: var(--red-bright); }

/* Wer gerade in Hunt ist: Steam-Freunde und die eigene Liste, als Reihe von Avataren */
.hunter-playing { flex-basis: 100%; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.playing-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.playing-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.playing-list a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-body); font-size: 16px; color: var(--ink); }
.playing-list a:hover { color: var(--white); text-decoration: underline; }
.playing-avatar { position: relative; display: inline-flex; flex: none; }
.playing-list .topbar-avatar { width: 32px; height: 32px; }
.playing-dot, .online-dot {
  position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); box-shadow: var(--glow-green); border: 2px solid var(--bg-2);
}
/* Gerade auf der Website (Lebenszeichen aus track.js): Punkt unten rechts am Avatar, im Profil und in der Admin-Liste */
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.hunter .online-dot { width: 14px; height: 14px; right: -4px; bottom: -4px; }
.online-dot.inline { position: static; display: inline-block; vertical-align: middle; margin-left: 10px; }

/* ---------- Fußzeile ---------- */
footer {
  background: var(--black);
  color: var(--muted);
  text-align: center;
  padding: 40px 20px 30px;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  font-size: 14px;
}
footer .copy { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }
footer .made { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
footer .made a { color: var(--ink); text-decoration: none; }
footer .made a:hover, footer .made a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
/* Links zu Privacy und Terms unter der Copy-Zeile */
footer .footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 14px; }
footer .footer-link { display: inline-block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-decoration: none; }
footer .footer-link:hover, footer .footer-link:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
footer .footer-link[aria-current] { color: var(--ink); }
/* Privacy und Terms: Knopf „Back“ mittig über und unter dem Text (legal.js) */
.news-body .legal-nav { display: flex; justify-content: center; margin: 0 0 24px; }
.news-body .legal-nav:last-child { margin: 30px 0 0; }
.news-body .legal-nav .btn { text-decoration: none; color: var(--ink); }
.news-body .legal-nav .btn:hover { color: var(--white); }
/* Terms: Zustimmung bei der ersten Anmeldung (terms.html?accept=…) */
.terms-accept { box-shadow: inset 2px 0 0 var(--red-bright), var(--shadow-panel-inset); }
.terms-check { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0; cursor: pointer; }
.terms-check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--red-bright); flex: none; }
.terms-accept .toolbar { align-items: center; }
.terms-accept .toolbar .hunter-note { margin: 0 auto 0 0; }
.terms-accept .btn:disabled { opacity: .45; cursor: default; }
footer .rule { width: 100%; max-width: 1140px; height: 1px; background: var(--line-soft); margin: 0 auto 36px; }

/* ---------- Freunde ---------- */
.search-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-row input { flex: 1 1 260px; }
.hunter-list { list-style: none; margin: 14px 0 0; padding: 0; }
.hunter-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.hunter-list li:last-child { border-bottom: none; }
.hunter-list .topbar-avatar { width: 34px; height: 34px; }
.topbar-avatar.blank { display: inline-block; background: var(--bg); }
.hunter-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.hunter-item-name { font-family: var(--font-body); font-size: 17px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hunter-item-name a { text-decoration: none; }
.hunter-item-name a:hover { color: var(--white); text-decoration: underline; }
.hunter-item-sub { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hunter-item-tag {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-soft); padding: 2px 8px 1px; white-space: nowrap; vertical-align: 2px;
}
#friend-results { background: var(--surface-row-hover); padding: 0 12px; margin-top: 8px; }
.list-head { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); font-weight: 400; margin: 22px 0 0; }
.hunter-list li .btn.small + .btn.small { margin-left: 6px; }
.relation { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#friend-list { margin-top: 6px; }

/* ---------- Rangliste ---------- */
.board-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; margin-bottom: 20px; padding-right: 48px; }
.board-friends { margin-left: auto; }
.board-friends .badge { margin: 0 -4px 0 10px; min-width: 20px; height: 20px; font-size: 12px; }
.board-empty .btn { margin-left: 10px; }

/* Dropdowns im Stil der Datumsfelder: schmale Linie, gesperrte Versalien, eigener Pfeil */
.select-field { display: flex; flex-direction: column; gap: 6px; }
.select-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.select-wrap { position: relative; display: inline-block; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg);
  pointer-events: none; transition: border-color var(--ease-fast);
}
.select-wrap:hover::after, .select-wrap:focus-within::after { border-color: var(--ink); }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 0;
  font-family: var(--font-body); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  padding: 10px 40px 8px 16px; min-width: 190px; cursor: pointer; color-scheme: dark;
  transition: border-color var(--ease-fast);
}
.select-wrap select:hover, .select-wrap select:focus { outline: none; border-color: var(--ink); }
.select-wrap select option { background: var(--bg-2); color: var(--ink); text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 15px; }

/* Unterste Zeile im Dashboard-Profil: "Playing Hunt now" */
.hunter-foot { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.hunter-foot .hunter-playing { flex: 1 1 280px; border-top: none; padding-top: 0; }
.privacy-admin { margin: 0 0 16px; padding: 0 24px; }

/* Icon-Knopf in der Ecke einer Box */
.panel-body.has-corner { position: relative; }
.icon-btn {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-soft); color: var(--muted); cursor: pointer; padding: 0;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn.busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.board tbody tr { cursor: default; }
.board tbody tr:hover { background: transparent; }
.board tr.me { background: var(--surface-row-active); }
.board tr.idle td { color: var(--muted); }
/* Verborgene Zahlen: eine Zelle über alle Zahlenspalten */
.board td.stats-hidden { text-align: center; font-style: italic; color: var(--muted); }
.board td.rank { font-family: var(--font-body); color: var(--white); text-align: left; width: 1%; }
.board th:nth-child(2), .board td.who { text-align: left; }
.board td.who { padding-top: 6px; padding-bottom: 6px; }
.who-wrap { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); vertical-align: middle; }
.who-avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; border: 1px solid var(--line); object-fit: cover; background: var(--bg); }
.who-avatar.blank { display: inline-block; }
.who-name { font-family: var(--font-body); font-size: 17px; line-height: 1.2; display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Herkunftsflagge hinter dem Namen (Admin). Die Schrift springt nur für Flaggen-Zeichen ein, vor allem für Windows. */
@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF;
  src: url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") format("woff2");
  font-display: swap;
}
.flag { font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 16px; line-height: 1; flex: none; cursor: default; }
.who-wrap .flag { margin-left: -6px; }
/* Plattform hinter dem Namen: Steam oder Xbox (icons.js, platformMark) */
.platform-mark { display: inline-flex; flex: none; color: var(--muted); cursor: default; vertical-align: middle; line-height: 1; }
.platform-mark svg { display: block; width: 14px; height: 14px; fill: currentColor; margin: 0; }
.who-wrap .platform-mark { margin-left: -6px; }
.comment-head .platform-mark { margin-left: -8px; }
.hunter-name .platform-mark, .hunter-item-name .platform-mark { margin-left: 8px; vertical-align: 1px; }
.hunter-name .platform-mark svg { width: 16px; height: 16px; }
.who-wrap:hover .who-name { color: var(--white); text-decoration: underline; }
.board tr.me .who-name { color: var(--white); }
.board td.kd-cell.sorted { color: var(--red-bright); }
.board tr.idle td.kd-cell { color: var(--muted); }

/* ---------- News ----------
   Feed: je Beitrag eine Box, Thumbnail randlos links, daneben Datum, Headline, Teaser und CTA.
   Thumbnails sind die einzigen Fotos im Produkt, deshalb streng 16:9 und leicht abgedunkelt. */
.news-feed { display: grid; gap: 30px; }
.news-item {
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  background: var(--bg-2); box-shadow: var(--shadow-panel-inset);
}
.news-item.no-thumb { grid-template-columns: minmax(0, 1fr); }
/* Mindestens 16:9; ist der Text daneben höher, füllt das Bild die Box bis unten */
.news-thumb { display: block; position: relative; aspect-ratio: 16 / 9; min-height: 100%; background: var(--bg); overflow: hidden; }
.news-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(.92); transition: filter var(--ease-fast); }
.news-thumb::after { content: ""; position: absolute; inset: 0; box-shadow: var(--shadow-panel-inset); pointer-events: none; }
.news-item:hover .news-thumb img { filter: none; }
.news-item-main { padding: 22px 28px 24px; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.news-new { color: var(--red-bright); border-color: var(--red-bright); }
.news-title { font-size: 24px; line-height: 1.25; margin: 6px 0 0; overflow-wrap: anywhere; }
.news-title a { text-decoration: none; }
.news-title a:hover { color: var(--white); text-decoration: underline; }
.news-teaser { color: var(--muted); margin: 10px 0 20px; overflow-wrap: anywhere; }
.news-item-main .btn { margin-top: auto; }

/* Ganzer Beitrag: schmale Spalte zum Lesen */
.news-post { max-width: var(--wrap-narrow); }
.news-post-head { margin-bottom: 20px; }
.news-post-title { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.2; margin-top: 8px; overflow-wrap: anywhere; }
.news-post-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg); margin-bottom: 24px; }
.news-body { overflow-wrap: anywhere; }
.news-body > :first-child { margin-top: 0; }
.news-body > :last-child { margin-bottom: 0; }
.news-body p, .news-body ul { margin: 0 0 18px; }
.news-body ul { padding-left: 22px; }
.news-body h3 { font-size: 18px; letter-spacing: 2px; text-transform: uppercase; line-height: 1.25; margin: 30px 0 12px; }
.news-body a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.news-body a:hover { color: var(--white); text-decoration-color: currentColor; }
.news-body .news-cta { margin: 24px 0; }
.news-body .news-cta .btn { text-decoration: none; color: var(--white); }
.news-body strong { color: var(--white); font-weight: 600; }
.news-body .news-figure { margin: 0 0 22px; }
.news-body .news-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line-soft); }
.news-body .news-figure figcaption { margin-top: 8px; color: var(--muted); font-style: italic; font-size: 15px; }

@media (max-width: 760px) {
  .news-item { grid-template-columns: minmax(0, 1fr); }
  .news-item-main { padding: 18px 16px 20px; }
  .news-title { font-size: 21px; }
  .news-item-main .btn { align-self: stretch; }
}
@media (min-width: 761px) and (max-width: 960px) { .news-item { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); } }
@media (hover: none) { .news-thumb img { filter: none; } }

/* Like und Dislike unter dem Beitragstext: Daumen mit Zahl, die eigene Stimme ist hervorgehoben */
.news-votes { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.vote {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; background: transparent; color: var(--muted);
  border: 1px solid var(--line); padding: 8px 16px 7px; font-family: var(--font-body); font-size: 16px; line-height: 1;
  font-variant-numeric: tabular-nums; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}
.vote svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.vote:hover { color: var(--ink); border-color: var(--ink); }
.vote[aria-pressed="true"] { color: var(--white); border-color: var(--ink); background: rgba(255, 255, 255, .04); }
.vote.dislike[aria-pressed="true"] { color: var(--red-bright); border-color: var(--red-bright); }
.news-votes .hunter-note { margin: 0; }
@media (hover: none) { .vote:not([aria-pressed="true"]):hover { color: var(--muted); border-color: var(--line); } }

/* Kommentare unter einem Beitrag: nur Text, Knöpfe zum Ändern und Löschen direkt am Kommentar */
.panel-count { color: var(--muted); font-family: var(--font-body); font-size: 14px; letter-spacing: 1px; margin-left: -6px; }
.news-comments { text-decoration: none; }
.news-comments:hover { color: var(--ink); text-decoration: underline; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.comment:first-child { padding-top: 0; }
.comment .topbar-avatar { width: 36px; height: 36px; margin-top: 2px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 30px; }
.comment-name { font-family: var(--font-body); font-size: 17px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.comment-name:hover { color: var(--white); text-decoration: underline; }
.comment-when { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; white-space: nowrap; }
.comment-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.comment-actions .x { margin: 0; padding: 4px 6px; }
.comment-text { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.comment-form { display: flex; flex-direction: column; gap: 6px; }
.comment-form textarea, .comment-edit textarea { min-height: 96px; }
.comment-edit { margin-top: 8px; }
.comment-form-foot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.comment-form-foot .hunter-note { margin: 0 auto 0 0; }
.comment-left { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.comment-left.err { color: var(--red-bright); }
@media (max-width: 480px) {
  .comment { gap: 10px; }
  .comment .topbar-avatar { width: 30px; height: 30px; }
  .comment-form-foot .btn { flex: 1 1 auto; }
}

/* ---------- Admin: Redaktion ---------- */
.lightbar a.is-active { opacity: 1; box-shadow: 0 1px 0 var(--bg); }
.newsroom-head { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.newsroom td.title, .newsroom th.title { text-align: left; }
.newsroom td.title { font-family: var(--font-body); font-size: 17px; line-height: 1.3; min-width: 200px; }
.newsroom td.title a { color: inherit; text-decoration: none; }
.newsroom td.title a:hover { color: var(--white); text-decoration: underline; }
.newsroom td.state, .newsroom th.state { text-align: left; white-space: nowrap; }
.newsroom td.votes, .newsroom th.votes { text-align: right; white-space: nowrap; }
.votes-real { color: var(--muted); }
.newsroom th.votes svg { display: inline-block; width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; }
.newsroom .hunter-item-tag.live { color: var(--ink); border-color: var(--line); }
.newsroom td.actions .x { display: inline-block; vertical-align: middle; margin: 0 0 0 4px; }
.newsroom tbody tr { cursor: default; }
.newsroom tbody tr:hover { background: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.field-note { color: var(--muted); font-style: italic; font-size: 14px; line-height: 1.4; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 0 20px; }
textarea {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 0;
  padding: 12px 16px; width: 100%; min-height: 320px; resize: vertical;
  font-family: var(--font-body); font-size: 16.66px; line-height: 1.5; color-scheme: dark;
}
textarea:focus { outline: none; border-color: var(--ink); }
.editor input[type="text"], .editor input[type="date"] { width: 100%; min-width: 0; }
.thumb-field { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; }
.thumb-preview {
  width: 280px; max-width: 100%; aspect-ratio: 16 / 9; flex: none;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--bg); box-shadow: var(--shadow-panel-inset); overflow: hidden;
  color: var(--muted); font-style: italic; font-size: 14px;
}
.thumb-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.thumb-label { margin: 0; max-width: 320px; }
.thumb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.editor-preview { border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 20px; }
.editor-preview .news-teaser { margin: 0 0 20px; }
.editor .toolbar { align-items: center; }
.editor .toolbar .hunter-note { margin: 0 auto 0 0; }
@media (max-width: 640px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .newsroom .when { display: none; }
  .newsroom td.actions { white-space: normal; text-align: right; }
  .newsroom-head .btn { flex: 1 1 auto; }
}

/* ---------- Admin: durch die Augen eines Hunters (viewas.js) ---------- */
/* Rote Leiste über allem, solange die Ansicht läuft. Die Kopfleiste rutscht darunter. */
.view-as-bar {
  position: sticky; top: 0; z-index: 30;
  min-height: 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px calc(16px + env(safe-area-inset-right)) 6px calc(16px + env(safe-area-inset-left));
  background: var(--red); color: var(--white);
  font-size: 14px; line-height: 1.3;
}
.view-as-text { display: flex; align-items: center; gap: 10px; min-width: 0; }
.view-as-text strong { font-weight: 600; overflow-wrap: anywhere; }
.view-as-eye svg { display: block; width: 18px; height: 18px; fill: currentColor; flex: none; }
.view-as-note { color: rgba(255, 255, 255, .75); white-space: nowrap; }
.view-as-bar .btn.ghost { flex: none; color: var(--white); border-color: rgba(255, 255, 255, .6); }
.view-as-bar .btn.ghost:hover { border-color: var(--white); background: rgba(0, 0, 0, .15); }
html.view-as .topbar { top: 48px; }
/* Gesperrte Zähler und Daumen sehen gesperrt aus */
.vote:disabled { opacity: .45; cursor: default; }
.vote:disabled:hover { color: var(--muted); border-color: var(--line); }
@media (max-width: 480px) { .view-as-note { display: none; } }

/* ---------- Admin: Nutzerliste ---------- */
.admin-filter { margin-bottom: 12px; padding-right: 48px; }
.admin-users th.seen, .admin-users td.seen { text-align: left; white-space: nowrap; }
.admin-users td.who { white-space: nowrap; }
.admin-users th.actions, .admin-users td.actions { width: 1%; padding-right: 0; text-align: left; }
.admin-users td.actions .x { display: inline-block; vertical-align: middle; margin: 0; padding: 6px; }
.admin-users td.who .hunter-item-tag { margin-left: 8px; }
.admin-users th { white-space: nowrap; }
.admin-users th.who { text-align: left; }
.admin-users th button {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
}
.admin-users th button:hover, .admin-users th.sorted button { color: var(--ink); }
.admin-users th button::after { content: "▼"; display: inline-block; width: 1em; margin-left: 4px; font-size: 9px; vertical-align: 1px; visibility: hidden; }
.admin-users th.sorted button::after { visibility: visible; color: var(--red-bright); }
.admin-users th.asc button::after { content: "▲"; }
@media (max-width: 1100px) { .admin-users .who-name { max-width: 180px; } }
@media (max-width: 640px) { .admin-users .n { display: none; } .admin-stats { grid-template-columns: repeat(2, 1fr); } .admin-stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 640px) { .icon-btn { top: 10px; right: 10px; } .select-wrap select { min-width: 160px; } }

/* ---------- Admin: Nutzung ---------- */
/* Vier Tageskurven in einer Farbe, Verteilungen als Balken. Marken dünn, Raster als Haarlinie, Werte im Tooltip und in der Tabelle. */
.usage-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: 16px; padding-right: 48px; }
.usage-head .hunter-note { margin: 0 0 9px; font-size: 14px; line-height: 1.4; }
.usage-stats { margin-bottom: 18px; }
#usage-body.busy { opacity: .5; }
#usage-body { transition: opacity var(--ease-fast); }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 30px; margin-bottom: 30px; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
.chart { margin: 0; min-width: 0; }
.chart figcaption { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart-sub { letter-spacing: 1px; text-transform: none; font-style: italic; font-size: 12px; }
.chart-plot { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line-soft); stroke-width: 1; shape-rendering: crispEdges; }
.chart-grid.base { stroke: var(--line); }
.chart-tick { fill: var(--muted); font-family: var(--font-body); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-bar { fill: var(--red-bright); transition: opacity var(--ease-fast); }
.chart-svg:hover .chart-bar { opacity: .5; }
.chart-svg .chart-bar.is-hot { opacity: 1; }
.chart-line { fill: none; stroke: var(--red-bright); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--red-bright); opacity: .1; }
.chart-dot { fill: var(--red-bright); stroke: var(--bg-2); stroke-width: 2; }
.chart-cross { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute; top: 0; transform: translate(-50%, -100%);
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-soft);
  padding: 6px 10px; font-size: 13px; line-height: 1.35; white-space: nowrap; pointer-events: none; z-index: 2;
}
.chart-tip.left { transform: translate(-100%, -100%); }
.chart-tip.right { transform: translate(0, -100%); }
.chart-tip.below { transform: translate(-50%, 0); }
.chart-tip.below.left { transform: translate(-100%, 0); }
.chart-tip.below.right { transform: translate(0, 0); }
.chart-tip strong { display: block; font-weight: 600; }
.chart-tip span { color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.bar-name { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-name .flag { margin-right: 4px; }
.bar-track { height: 10px; background: var(--surface-row-hover); position: relative; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red-bright); border-radius: 0 4px 4px 0; }
.bar-val { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; min-width: 70px; text-align: right; }
.bar-pct { color: var(--muted); margin-left: 8px; font-size: 12px; display: inline-block; min-width: 30px; }
.usage-top th, .usage-top td { white-space: nowrap; }
.usage-top th.page, .usage-top td.page { text-align: left; }
.usage-days { margin-top: 30px; }
.usage-days summary { cursor: pointer; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); list-style: none; }
.usage-days summary::-webkit-details-marker { display: none; }
.usage-days summary::before { content: "▶"; display: inline-block; font-size: 9px; margin-right: 8px; vertical-align: 1px; }
.usage-days[open] summary::before { content: "▼"; }
.usage-days summary:hover { color: var(--ink); }
.usage-days .table-wrap { margin-top: 10px; }
.usage-table th, .usage-table td { white-space: nowrap; }
.usage-table tbody tr { cursor: default; }
.usage-table tbody tr:hover { background: transparent; }
.usage-table td.dim { color: var(--muted); }
@media (max-width: 640px) { .usage-stats { grid-template-columns: repeat(2, 1fr); } .usage-top .page { display: none; } }

/* Tabellen: lange und kurze Fassung von Kopfzeile und Datum, CSS blendet je nach Breite eine aus */
.abbr { display: none; }
td.date, th:first-child { white-space: nowrap; }

/* Eigene Rückfragen (dialog.js) im Stil der Boxen */
dialog.ask {
  background: var(--bg-2); color: var(--ink);
  border: none; border-radius: 0; padding: 24px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow-dialog);
  font-family: var(--font-body); font-size: 16.66px; line-height: 1.5;
}
dialog.ask::backdrop { background: rgba(0, 0, 0, .7); }
dialog.ask .ask-text { margin: 0 0 20px; white-space: pre-line; }
dialog.ask .ask-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
dialog.ask .btn.danger { border-color: var(--red-bright); }
dialog.ask .btn:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
/* Anmeldung: Auswahl Steam oder Xbox (icons.js) */
dialog.ask.signin-choice .signin-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
dialog.ask.signin-choice .signin-options .btn { justify-content: center; text-align: center; }
dialog.ask.signin-choice .signin-options .btn:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

/* Friends-Dialog: auf dem Desktop mittig, auf dem Handy als Sheet vom unteren Rand */
dialog.sheet {
  background: var(--bg-2); color: var(--ink);
  border: none; border-radius: 0; padding: 0;
  width: min(640px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 64px));
  box-shadow: var(--shadow-dialog);
  font-family: var(--font-body); font-size: 16.66px; line-height: 1.5;
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .7); }
.sheet-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px 0; }
.sheet-head .panel-title { flex: 1; margin: 0; }
.icon-btn.sheet-close { position: static; flex: none; }
.sheet-body { padding: 18px 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.list-head.first { margin-top: 0; }
#requests-in-block { margin-bottom: 22px; }
body:has(dialog[open]) { overflow: hidden; }

/* Ingame-Gesamtstatistik (overall.js): Block im Ledger, Dialog "All stats" und Sync mit Anleitung */
.overall { background: var(--bg-2); box-shadow: var(--shadow-panel-inset); padding: 18px 24px 20px; margin-bottom: 24px; }
.overall-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.overall-when { color: var(--muted); font-style: italic; font-size: 14px; }
.overall-sync { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 14px; margin-left: auto; }
.overall-stats { margin-bottom: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* "Next +0.01": eigener Block unter den Kacheln, je Quote eine Zielkarte mit Schritt und nötigen Kills */
.overall-next { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.overall-next-head { margin-bottom: 10px; }
.overall-next-hint { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.next-goals { display: grid; gap: 8px; }
.next-goal { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 10px 14px; background: var(--surface-glass); border-left: 2px solid var(--red-bright); }
.next-goal-ratio { display: flex; align-items: baseline; gap: 10px; flex-shrink: 0; line-height: 1.15; }
.next-goal-ratio .stat-label { min-width: 48px; }  /* K/D und K/D/A gleich breit, die Werte stehen untereinander */
.next-goal-step { font-family: var(--font-body); font-size: 26px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.next-goal-step b { font-weight: 500; color: var(--white); }
/* beide Seiten gleich: Beschriftung, roter Pfeil, Wert in derselben Größe wie die Kills */
.next-goal-arrow { color: var(--red-bright); margin: 0 10px; font-size: 18px; }
.next-goal-kills { display: flex; align-items: baseline; margin-left: auto; line-height: 1.15; }  /* rutscht auf schmalen Handys in die zweite Zeile */
.next-goal-num { font-family: var(--font-body); font-size: 26px; color: var(--white); font-variant-numeric: tabular-nums; }
.next-goal-unit { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.overall-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.overall-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.overall-empty .hunter-note { margin: 0; flex: 1 1 280px; }
.overall-sheet .overall-stats + .hunter-note, .overall-sheet .overall-next + .hunter-note { margin-top: 12px; }
.overall-list { margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.overall-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.overall-list dt { color: var(--muted); }
.overall-list dd { margin: 0; font-family: var(--font-body); color: var(--white); font-variant-numeric: tabular-nums; }
.overall-list + .hunter-note { margin-top: 14px; }

.sync-guide { border-bottom: 1px solid var(--line-soft); padding-bottom: 16px; margin-bottom: 18px; }
.sync-guide summary { cursor: pointer; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }
.sync-guide summary:hover { color: var(--white); }
.sync-steps { margin: 14px 0 0; padding-left: 22px; }
.sync-steps li { margin-bottom: 14px; }
.sync-steps li::marker { font-family: var(--font-body); color: var(--muted); }
.sync-steps p { margin: 0; }
.sync-steps em { font-style: normal; color: var(--white); }
.sync-steps img { display: block; width: 100%; height: auto; margin-top: 10px; box-shadow: 0 0 0 1px var(--line-soft); }

.shot-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shot-slot { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px dashed var(--line); cursor: pointer; transition: border-color var(--ease-fast), background var(--ease-fast); }
.shot-slot:hover, .shot-slot.drag { border-color: var(--ink); background: var(--surface-row-hover); }
.shot-slot.filled { border-style: solid; border-color: var(--line-soft); }
.shot-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shot-slot:focus-within { border-color: var(--ink); }
.shot-thumb { flex: none; width: 96px; aspect-ratio: 16 / 9; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot-plus { font-family: var(--font-body); font-size: 24px; color: var(--muted); }
.shot-slot.filled .shot-plus { display: none; }
.shot-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.shot-title { font-family: var(--font-body); font-size: 16px; color: var(--ink); }
.shot-sub { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.sync-status:empty { display: none; }
.sync-status { margin-top: 14px; }

.sync-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-top: 10px; }
.sync-field { display: flex; flex-direction: column; gap: 4px; }
.sync-field span { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.sync-field input { min-width: 0; width: 100%; font-variant-numeric: tabular-nums; }
.sync-field input.missing { border-color: var(--red-bright); }
.sync-check { margin: 14px 0 18px; }
.sync-check.ok { color: var(--ink); }
.sync-form .ask-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Ohne Maus: Hover-Zustände bleiben auf Touch-Geräten nach dem Tippen kleben, also aus.
   Die Tastaturzeile hilft dort auch nicht weiter. */
@media (hover: none) {
  .hint.keys { display: none; }
  .btn:hover { background: var(--accent-translucent); }
  .btn.light:hover { background: rgba(245, 245, 245, .85); }
  .btn.ghost:hover { border-color: var(--line); background: transparent; }
  .card .btn.light:hover { background: transparent; border-color: rgba(12, 16, 19, .35); }
  tbody tr:hover { background: transparent; }
  tbody tr.active:hover { background: var(--surface-row-active); }
}
/* iOS zoomt beim Fokus in Felder mit weniger als 16px Schrift hinein */
@media (pointer: coarse) {
  .select-wrap select { font-size: 16px; letter-spacing: 1.5px; }
}

/* Rangliste: bis Tablet-Hochformat kurze Spaltenköpfe, sonst läuft sie über */
@media (max-width: 900px) {
  .board .full { display: none; }
  .board .abbr { display: inline; }
  .board th, .board td { padding-left: 8px; padding-right: 8px; }
  .board .who-name { max-width: 200px; }
}

/* ---------- Handy und kleine Tablets ---------- */
@media (max-width: 640px) {
  .full { display: none; }
  .abbr { display: inline; }
  th, td { padding: 9px 6px; font-size: 15px; }
  th { font-size: 11px; letter-spacing: 1px; }
  th:first-child, td:first-child { padding-left: 4px; }
  th:last-child, td:last-child { padding-right: 4px; }
  td.kd-cell { font-size: 15px; }
  .board .who-avatar { width: 28px; height: 28px; }
  .board .who-wrap { gap: 8px; }
  .board .who-name { font-size: 15px; max-width: 120px; }
  .toolbar { justify-content: stretch; }
  .toolbar .btn { flex: 1 1 auto; }
  .stat { padding: 12px 8px; }
  .stat-value { font-size: 22px; }
  .board-controls { gap: 12px 16px; }
  .board-friends { flex: 1 1 100%; margin-left: 0; }
  .board-empty .btn { display: flex; margin: 12px auto 0; }
  dialog.sheet {
    width: 100%; max-width: 100%; max-height: 88dvh;
    margin: auto 0 0; /* unten andocken */
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-head { padding: 16px 16px 0; }
  .sheet-body { padding: 16px; }
  .select-wrap, .select-wrap select { width: 100%; }
  .overall { padding: 14px 16px 16px; }
  .stats.eight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* oben Kills, Deaths, Assists zu dritt, darunter K/D und K/D/A zu zweit */
  .overall-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .overall-stats .stat { grid-column: span 2; }
  .overall-stats .stat:nth-child(n+4) { grid-column: span 3; }
  .overall-actions .btn { flex: 1 1 auto; }
  .overall-empty .btn { flex: 1 1 100%; }
  .overall-list { grid-template-columns: 1fr; }
  .next-goal-num, .next-goal-step { font-size: 22px; }
  .shot-slots { grid-template-columns: 1fr; }
  .sync-fields { gap: 10px 12px; }
  .select-field { flex: 1 1 150px; }
  .hunter-actions { justify-content: flex-start; }
  .hunter-actions .btn { flex: 1 1 auto; }
  .date-row input[type="date"] { flex: 1 1 170px; }
}

@media (max-width: 480px) {
  .board .n { display: none; }                  /* Sessions-Spalte braucht den Platz nicht */
  .board .who-avatar { display: none; }         /* Avatare kosten die Breite, die die Zahlen brauchen */
  .board th, .board td { padding-left: 4px; padding-right: 4px; }
  .board .who-name { max-width: 110px; }
  .counters { gap: 18px; }
  .card { padding: 18px 16px 18px; }
  .card-value { font-size: 52px; margin: 8px 0 14px; }
  .card-sub { margin-top: -4px; margin-bottom: 12px; }
  /* K/D und K/D/A passen nebeneinander */
  .ratios { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
  .ratios .card { padding: 16px 8px; }
  .ratios .h-plate { font-size: 16px; letter-spacing: 1.5px; }
  .ratios .card-value { font-size: 40px; }
  .ratios .card-sub { font-size: 14px; }
  .ratios .btn { padding-left: 8px; padding-right: 8px; letter-spacing: 1px; }
  .panel { margin-bottom: 26px; }
  .panel-title { font-size: 16px; margin-bottom: 12px; }
  .platforms { gap: 4px 16px; }
  .platforms span + span::before { display: none; }   /* Trennstrich stünde sonst am Zeilenanfang */
  .hero { min-height: 0; padding: 48px 16px 32px; }
  .hero-actions .btn { min-width: 0; flex: 1 1 100%; }
  .teasers { padding-bottom: 36px; gap: 30px; }
  .lightbar { gap: 4px 20px; padding: 8px 12px; letter-spacing: 2px; }
  .hunter { gap: 12px 16px; }
  .avatar { width: 56px; height: 56px; }
  .hunter-name { font-size: 19px; }
  /* Spielzeit bekommt eine eigene Zeile, beide Werte teilen sich die Breite */
  .hunter-stats { flex-basis: 100%; }
  .hunter-stats .stat { min-width: 0; flex: 1 1 0; padding: 10px 6px; }
  .hunter-stats .stat-label { font-size: 10px; letter-spacing: 1px; white-space: nowrap; }
  .hunter-stats .stat-value { font-size: 19px; white-space: nowrap; }
  .hunter-summary { -webkit-line-clamp: 4; }
  .icon-btn { width: 32px; height: 32px; }
  input[type="text"] { min-width: 0; }
  .search-row .btn { flex: 1 1 auto; }
  /* Freundesliste: Name mit Auslassung, Knopfpaare rutschen in eine eigene Zeile */
  .hunter-list li { flex-wrap: wrap; gap: 8px 10px; }
  /* Der Name nimmt die erste Zeile bis auf den Totenkopf, alles Breitere rutscht darunter */
  .hunter-item-main { flex: 0 0 calc(100% - 90px); }
  .hunter-list li .btn { flex: 1 1 40%; }
  .hunter-list li .btn.small + .btn.small { margin-left: 0; }
  .hunter-list .topbar-avatar { width: 30px; height: 30px; }
}

/* Sehr schmale Geräte (iPhone SE, kleine Androids) */
@media (max-width: 360px) {
  .board .who-name { max-width: 84px; }
  .board th, .board td { padding-left: 3px; padding-right: 3px; font-size: 13px; }
  .topbar-cta { padding: 0 10px; letter-spacing: 2px; font-size: 11px; }
  th, td { padding: 8px 4px; font-size: 14px; }
  .card-value { font-size: 46px; }
  .ratios .card-value { font-size: 34px; }
}

/* Handy im Querformat: die Kopfleiste ist nicht mehr festgepinnt, sonst frisst sie den Platz */
@media (max-height: 460px) and (orientation: landscape) {
  .topbar { position: static; }
  .hero { min-height: 0; padding-top: 40px; }
  .hero .logo-main { font-size: 56px; }
  .hero .logo { margin-bottom: 16px; }
}

/* Steam-Overlay-Browser und kleine Fenster (rund 700 bis 1000 Pixel breit):
   drei Karten nebeneinander werden eng, also engere Abstände statt Umbruch */
@media (min-width: 641px) and (max-width: 960px) {
  .section { padding-left: 24px; padding-right: 24px; }
  .counters, .cards, .teasers, .ratios { gap: 18px; }
  .card { padding: 20px 14px; }
  .card-value { font-size: clamp(48px, 7vw, 72px); }
  .h-plate { font-size: 20px; letter-spacing: 2px; }
  .card .btn { padding-left: 10px; padding-right: 10px; letter-spacing: 1.5px; }
}

/* ---------- Navigation unten (dock.js) ----------
   Desktop: schwebende Glasleiste unten in der Mitte wie das Dock am Mac.
   Handy: Daumenleiste über die volle Breite direkt am unteren Rand.
   Steht am Ende der Datei, damit .badge und die Breakpoints weiter oben nicht dazwischenfunken. */
.view-off { display: none !important; }

.dock {
  position: fixed; z-index: 30;
  left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom));
  width: max-content; max-width: calc(100vw - 24px); margin: 0 auto;
}
.dock-bar {
  display: flex; align-items: stretch; gap: 2px;
  padding: 6px;
  border-radius: 26px;
  background: var(--dock-glass);
  -webkit-backdrop-filter: var(--blur-dock);
  backdrop-filter: var(--blur-dock);
  box-shadow: var(--shadow-dock);
}
.dock-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 76px; padding: 9px 12px 7px;
  border: none; border-radius: 20px; background: transparent; cursor: pointer;
  color: var(--muted); text-decoration: none; font: inherit;
  transition: color var(--ease-fast), background-color var(--ease-fast);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.dock-icon {
  position: relative; display: block; width: 28px; height: 28px;
  transition: transform var(--ease-dock);
}
.dock-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock-label { font-family: var(--font-body); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.dock-item.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.dock-item.is-active .dock-icon { color: var(--red-bright); filter: drop-shadow(var(--glow-red)); }
.dock-item:focus-visible { outline: 1px solid var(--ink); outline-offset: -3px; }
/* Dezent anheben unter der Maus, auf Touch-Geräten bliebe das kleben */
@media (hover: hover) {
  .dock-item:hover { color: var(--ink); }
  .dock-item.is-active:hover { color: var(--white); }
  .dock-item:hover .dock-icon { transform: translateY(-3px); }
}
.dock-item:active .dock-icon { transform: scale(.9); }
/* Trenner vor Sign out wie im Dock vor dem Papierkorb */
.dock-sep { flex: none; width: 1px; margin: 12px 6px; background: rgba(255, 255, 255, .16); }
.dock .dock-badge {
  position: absolute; top: -6px; right: -12px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-size: 11px; margin: 0;
  box-shadow: 0 0 0 2px rgba(18, 22, 26, .9);
}
/* Punkt ohne Zahl am News-Icon: seit dem letzten Besuch ist etwas erschienen */
.dock .dock-dot {
  position: absolute; top: -2px; right: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-bright); box-shadow: 0 0 0 2px rgba(18, 22, 26, .9), var(--glow-red);
}
/* Platz unter der Fußzeile, damit die Leiste nichts verdeckt */
body.has-dock footer { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

@media (max-width: 640px) {
  .dock { bottom: 0; width: auto; max-width: none; margin: 0; }
  .dock-bar {
    gap: 0; border-radius: 0;
    padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)), rgba(12, 16, 19, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 -8px 24px rgba(0, 0, 0, .35);
  }
  .dock-item { flex: 1 1 0; min-width: 0; min-height: 54px; padding: 6px 4px 5px; border-radius: 16px; }
  .dock-item.is-active { background: transparent; box-shadow: none; }
  .dock-icon { width: 26px; height: 26px; }
  .dock-label { font-size: 10px; letter-spacing: 1px; }
  .dock-sep { display: none; }
  body.has-dock footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Handy im Querformat: kleiner, damit vom Inhalt genug bleibt */
@media (max-height: 460px) and (orientation: landscape) {
  .dock-bar { padding: 4px; }
  .dock-item { min-width: 64px; min-height: 0; padding: 5px 10px 4px; gap: 2px; }
  .dock-icon { width: 22px; height: 22px; }
}

/* Ohne Weichzeichner wäre die halbdurchsichtige Leiste über Text schlecht lesbar */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock-bar { background: rgba(20, 24, 28, .97); }
}

/* ---------- Feedback (feedback.js): Aufruf in der Fußzeile, Formular als Dialog, Screenshot-Modus ---------- */
.feedback-cta { max-width: 560px; margin: 0 auto 40px; }
.feedback-cta-title { font-family: var(--font-head); font-weight: 500; font-size: 24px; color: var(--white); margin: 0 0 8px; }
.feedback-cta-text { margin: 0 auto 20px; font-size: 16.66px; line-height: 1.5; }
.feedback-lead { margin: 0; }
.feedback-dialog textarea { min-height: 150px; }
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-kinds label { cursor: pointer; }
.feedback-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-kinds span {
  display: inline-block; padding: 7px 14px 6px; border: 1px solid var(--line-soft);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  transition: color var(--ease-fast), border-color var(--ease-fast), background var(--ease-fast);
}
.feedback-kinds label:hover span { color: var(--ink); border-color: var(--line); }
.feedback-kinds input:checked + span { color: var(--white); border-color: var(--red); background: var(--surface-row-active); }
.feedback-kinds input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }
.feedback-shots { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 4px; }
.feedback-shot { position: relative; margin: 0; width: 150px; height: 96px; background: var(--bg); box-shadow: var(--shadow-panel-inset); }
.feedback-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.feedback-shot .x { position: absolute; top: 4px; right: 4px; margin: 0; padding: 4px; background: rgba(12, 16, 19, .85); }
.feedback-shot-btn { align-self: flex-start; }
.feedback-dialog .toolbar { align-items: center; }
.feedback-dialog .toolbar .hunter-note { margin: 0 auto 0 0; }
.feedback-dialog .field:last-of-type { margin-bottom: 0; }

/* Während des Screenshot-Modus liegt die Ebene über allem und fängt Klicks ab; Dock und Kopfleiste bleiben sichtbar */
html.shot-mode { cursor: crosshair; }
.shot-layer { position: fixed; inset: 0; z-index: 1000; cursor: crosshair; background: transparent; }
.shot-box {
  position: fixed; top: 0; left: 0; z-index: 1001; pointer-events: none;
  outline: 2px dashed var(--red-bright); outline-offset: 0;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
  transition: transform 80ms ease-out, width 80ms ease-out, height 80ms ease-out;
}
.shot-box.locked { outline-style: solid; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .6), var(--glow-red); }
.shot-bar {
  position: fixed; z-index: 1002; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  padding: 12px 16px; background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow-dialog);
  font-family: var(--font-body); font-size: 15px; line-height: 1.4; cursor: default;
}
.shot-bar-text { font-style: italic; }
.shot-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shot-bar .btn:disabled { opacity: .45; cursor: default; }
.shot-bar .btn.ghost:disabled:hover { border-color: var(--line); background: transparent; }
.shot-bar .btn:not(.ghost):disabled:hover { background: var(--accent-translucent); }
@media (max-width: 640px) {
  .shot-bar { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); max-width: none; }
  .shot-bar-actions { width: 100%; }
  .shot-bar-actions .btn { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; letter-spacing: 1.5px; }
  .feedback-shot { width: calc(50% - 6px); }
}

/* ---------- Admin: Feedback ---------- */
.feedback-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; padding-right: 48px; }
.feedback-list { list-style: none; margin: 0; padding: 0; }
.fb-item { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.fb-item:first-child { border-top: none; padding-top: 4px; }
.fb-item.done { opacity: .6; }
.fb-item.done:hover { opacity: 1; }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fb-meta .who-wrap { margin-right: 4px; }
.fb-meta .hunter-item-tag.bug { color: var(--red-bright); border-color: rgba(215, 38, 61, .5); }
.fb-meta .hunter-item-tag.idea { color: var(--green); border-color: rgba(143, 191, 58, .45); }
.fb-when { color: var(--muted); font-size: 14px; }
.fb-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.fb-actions .x { margin: 0; padding: 4px 6px; }
.x.check { color: var(--ink); transition: color var(--ease-fast), transform var(--ease-fast); }
.x.check svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.x.check:hover, .x.check.on { color: var(--green); }
.x.check:hover { transform: scale(1.15); }
@media (hover: none) { .x.check:hover { transform: none; } .x.check:not(.on):hover { color: var(--ink); } }
.fb-text { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-text.empty { color: var(--muted); font-style: italic; }
.fb-shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.fb-shot { display: block; width: 180px; height: 112px; padding: 0; border: 1px solid var(--line-soft); background: var(--bg); cursor: zoom-in; }
.fb-shot:hover { border-color: var(--ink); }
.fb-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fb-where { margin-top: 10px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.fb-where a { color: inherit; }
.fb-where a:hover { color: var(--ink); }
dialog.sheet.shot-view { width: min(1200px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.shot-view .sheet-body { padding-top: 12px; }
.shot-view img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
@media (max-width: 640px) { .fb-shot { width: calc(50% - 5px); } .feedback-head { padding-right: 40px; } }

/* ---------- Admin: Übersicht der Tickets (#feedback) und einzelnes Ticket (#feedback/{id}) ---------- */
.feedback-list.is-overview li + li { border-top: 1px solid var(--line-soft); }
.fb-row {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 10px;
  color: var(--ink); text-decoration: none; transition: background-color var(--ease-fast);
}
.fb-row:hover { background: var(--surface-row-hover); }
.fb-row:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }
.fb-row.unread { background: var(--surface-row-active); }
.fb-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fb-row-top .who-wrap { margin-right: 4px; }
.fb-row-top .fb-when { margin-left: auto; white-space: nowrap; }
.fb-row-top .hunter-item-tag.bug { color: var(--red-bright); border-color: rgba(215, 38, 61, .5); }
.fb-row-top .hunter-item-tag.idea { color: var(--green); border-color: rgba(143, 191, 58, .45); }
.fb-row-top .hunter-item-tag.new { color: var(--white); border-color: var(--red-bright); background: var(--surface-row-active); }
.fb-row-text { overflow-wrap: anywhere; }
.fb-row-text.empty { color: var(--muted); font-style: italic; }
.fb-row-sub { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.fb-back { margin-bottom: 16px; }
.fb-item.done:only-child { opacity: 1; }

/* ---------- Admin: Antworten auf Feedback (Tickets) ---------- */
.fb-meta .hunter-item-tag.new { color: var(--white); border-color: var(--red-bright); background: var(--surface-row-active); }
.x.reply { color: var(--ink); transition: color var(--ease-fast), transform var(--ease-fast); }
.x.reply svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.x.reply:hover, .x.reply.on { color: var(--white); }
.x.reply:hover { transform: scale(1.15); }
@media (hover: none) { .x.reply:hover { transform: none; } .x.reply:not(.on):hover { color: var(--ink); } }
.fb-thread { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fb-reply { padding: 10px 14px 12px; box-shadow: var(--shadow-panel-inset); max-width: 88%; }
.fb-reply.admin { align-self: flex-end; background: var(--surface-row-active); }
.fb-reply.hunter { align-self: flex-start; background: var(--surface-row-hover); }
.fb-reply .fb-text { margin-top: 4px; }
.fb-reply .fb-shots { margin-top: 8px; }
.fb-reply-by { font-family: var(--font-body); font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.fb-reply-form { margin-top: 14px; padding: 14px; background: var(--bg); box-shadow: var(--shadow-panel-inset); }
.fb-reply-form textarea { width: 100%; min-height: 90px; }
.fb-reply-form .feedback-shots { margin-top: 10px; }
.fb-reply-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.fb-reply-foot .hunter-note { margin: 0 auto 0 0; }
.fb-reply-add { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.fb-reply-add svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Menü über den ganzen Bildschirm (dock.js) ----------
   Der Menüpunkt im Dock öffnet es. Kacheln im Stil der Dock-Punkte, nur größer. */
dialog.menu-sheet {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: none; color: var(--ink);
  background: rgba(8, 11, 13, .82);
  -webkit-backdrop-filter: var(--blur-dock); backdrop-filter: var(--blur-dock);
}
dialog.menu-sheet[open] { display: flex; animation: menu-in .18s ease-out; }
dialog.menu-sheet::backdrop { background: transparent; }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
.menu-inner {
  flex: 1; display: flex; flex-direction: column;
  width: min(760px, 100%); margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.menu-head { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.menu-title {
  flex: 1; display: flex; align-items: center; gap: 16px;
  font-family: var(--font-head); font-size: 18px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink);
}
.menu-title::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.menu-close {
  flex: none; width: 44px; height: 44px; padding: 10px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .06); color: var(--ink); cursor: pointer;
  transition: background-color var(--ease-fast), color var(--ease-fast);
}
.menu-close svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-close:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.menu-close:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
/* Mittig in der Fläche unter dem Kopf, höchstens vier Spalten (--cols aus dock.js), weitere Reihen linksbündig */
.menu-tiles {
  display: grid; grid-template-columns: repeat(var(--cols, 4), 160px); gap: 16px;
  margin: auto; padding-bottom: 60px; /* optisch mittig, der Kopf oben zieht sonst nach unten */
}
@media (max-width: 760px) and (min-width: 641px) { .menu-tiles { grid-template-columns: repeat(var(--cols-narrow, 3), 160px); } }
.menu-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  aspect-ratio: 1; padding: 16px;
  border: none; border-radius: 26px; cursor: pointer; font: inherit;
  color: var(--ink);
  background: var(--dock-glass);
  box-shadow: var(--shadow-dock);
  transition: color var(--ease-fast), background-color var(--ease-fast);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.menu-tile .dock-icon { width: 40px; height: 40px; transition: transform var(--ease-dock); }
.menu-tile .dock-label { font-size: 13px; letter-spacing: 2px; }
.menu-tile .dock-badge {
  position: absolute; top: -6px; right: -14px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; margin: 0;
  font-size: 12px; box-shadow: 0 0 0 2px rgba(18, 22, 26, .9);
}
.menu-tile-note { font-size: 13px; font-style: italic; color: var(--red-bright); line-height: 1; margin-top: -4px; }
.menu-tile.is-danger { color: var(--muted); }
.menu-tile.is-danger .menu-tile-note { color: var(--muted); }
a.menu-tile { text-decoration: none; }
.menu-tile.is-active { color: var(--white); }
.menu-tile.is-active .dock-icon { color: var(--red-bright); filter: drop-shadow(var(--glow-red)); }
@media (hover: hover) {
  .menu-tile:hover { color: var(--white); }
  .menu-tile:hover .dock-icon { transform: translateY(-3px); }
  .menu-tile.is-danger:hover { color: var(--red-bright); }
}
.menu-tile:active .dock-icon { transform: scale(.9); }
.menu-tile:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
@media (max-width: 640px) {
  .menu-head { margin-bottom: 24px; }
  .menu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding-bottom: 0; }
  .menu-tile { border-radius: 22px; }
}

/* ---------- Messages (/messages, messages.js): Tickets des Hunters mit Antworten ---------- */
.msg-back { margin-bottom: 18px; }
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list li + li { border-top: 1px solid var(--line-soft); }
.msg-row {
  display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px 10px; margin: 0;
  border: none; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color var(--ease-fast);
}
.msg-row:hover { background: var(--surface-row-hover); }
.msg-row:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }
.msg-row.unread { background: var(--surface-row-active); }
.msg-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.msg-row .hunter-item-tag.bug { color: var(--red-bright); border-color: rgba(215, 38, 61, .5); }
.msg-row .hunter-item-tag.idea { color: var(--green); border-color: rgba(143, 191, 58, .45); }
.msg-new { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--white); background: var(--red-bright); padding: 3px 8px 2px; }
.msg-when { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.msg-row-text { overflow-wrap: anywhere; }
.msg-row.unread .msg-row-text { color: var(--white); }
.msg-row-sub { color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.msg-feedback-btn { margin-top: 14px; }
.msg-thread { display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { max-width: 88%; padding: 10px 14px 12px; box-shadow: var(--shadow-panel-inset); scroll-margin-bottom: calc(130px + env(safe-area-inset-bottom)); } /* beim Hinscrollen nicht unter dem Dock */
.msg-bubble.mine { align-self: flex-end; background: var(--surface-row-hover); }
.msg-bubble.theirs { align-self: flex-start; background: var(--surface-row-active); box-shadow: inset 2px 0 0 var(--red-bright), var(--shadow-panel-inset); }
.msg-by { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 14px; color: var(--ink); }
/* Avatar am Kopf einer Nachricht, in Messages und im Admin-Ticket */
.msg-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; border: 1px solid var(--line); object-fit: cover; background: var(--bg); }
.msg-avatar.blank { display: inline-block; }
.msg-by .msg-when { font-family: var(--font-body); font-size: 12px; }
.msg-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg-images .fb-shot { width: 160px; height: 100px; }
.msg-wait { margin: 4px 0 0; color: var(--muted); font-style: italic; text-align: center; }
.msg-reply { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.msg-reply textarea { width: 100%; min-height: 96px; resize: vertical; }
.msg-reply-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.msg-reply-foot .hunter-note { margin: 0 auto 0 0; }
@media (max-width: 640px) {
  .msg-bubble { max-width: 94%; }
  .msg-images .fb-shot { width: calc(50% - 4px); }
}

/* Friends als Seite (/friends): dasselbe #friends-panel wie im Dialog, ohne dessen Innenabstand und Scrollbereich */
.friends-home > .sheet-body { padding: 0; overflow: visible; }

/* ---------- Toast (Sync-Hinweis im Dashboard) ----------
   Schwebt über dem Dock, auf dem Handy über der Daumenleiste. */
.toast {
  position: fixed; z-index: 29;
  left: 0; right: 0; bottom: calc(104px + env(safe-area-inset-bottom));
  width: min(560px, calc(100vw - 32px)); margin: 0 auto;
  display: flex; align-items: center; gap: 12px 16px;
  padding: 14px 14px 14px 18px;
  background: var(--red); color: var(--white);
  box-shadow: var(--shadow-dialog);
  opacity: 0; transform: translateY(12px);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}
.toast.is-in { opacity: 1; transform: none; }
.toast-text { flex: 1; margin: 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.toast-text strong { color: var(--white); font-weight: 600; }
.toast-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn.toast-close { position: static; color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .45); }
.icon-btn.toast-close:hover { color: var(--white); border-color: var(--white); }
.toast .btn.light:focus-visible, .icon-btn.toast-close:focus-visible { outline: 1px solid var(--white); outline-offset: 2px; }
@media (max-width: 640px) {
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .toast-actions { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Stream-Overlay (settings.js, overlay.html) ----------
   In den Settings: Link anlegen, kopieren, erneuern, abschalten */
.overlay-link { display: flex; align-items: center; gap: 12px; width: 100%; }
.overlay-url {
  flex: 1; min-width: 0; padding: 6px 10px; font: 13px/1.4 var(--font-body); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 0;
}
.overlay-url:focus { outline: none; border-color: var(--ink); color: var(--ink); }
.overlay-link .x { margin: 0; padding: 4px; line-height: 0; }
.overlay-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.overlay-actions .btn:disabled, .overlay-link .x:disabled { opacity: .5; cursor: default; }

/* ---------- Settings (settings.js) ----------
   Eine Seite mit drei Panels. Je Einstellung eine Zeile: links Überschrift und Erklärung, rechts das Feld. */
.settings-page .panel + .panel { margin-top: 40px; }
.settings-body { display: flex; flex-direction: column; gap: 18px; }
.settings-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.settings-row + .settings-row, .settings-body > .hunter-note + .settings-row { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.settings-text { flex: 1 1 320px; min-width: 0; }
.settings-head { margin: 0 0 4px; font-family: var(--font-head); font-weight: 500; font-size: 18px; letter-spacing: 1px; color: var(--white); display: flex; align-items: center; gap: 10px; }
.settings-text .hunter-note { margin: 0; font-size: 15px; line-height: 1.5; }
.settings-row .select-field { flex: 0 1 280px; }
.settings-row .select-wrap select { width: 100%; }
.settings-body > .hunter-note { margin: 0; font-size: 14px; line-height: 1.4; }
.settings-body .overlay-link { width: 100%; }
.settings-body .overlay-actions { justify-content: flex-start; }
#settings-status { text-align: center; }
@media (max-width: 640px) {
  .settings-row .select-field, .settings-row .btn { flex-basis: 100%; }
}
/* Flagge hinter dem Namen: Profil, Dashboard, Settings */
.hunter-name .flag { margin-left: 10px; font-size: 19px; vertical-align: 1px; }
/* Kommentar eines gelöschten Kontos: Name ohne Link */
.comment-name.deleted { color: var(--muted); font-style: italic; }
.comment-name.deleted:hover { color: var(--muted); text-decoration: none; }
/* Settings › Stream overlay: wo das Overlay läuft. Logos in Markenfarbe mit leichtem Schein, damit sie auffallen. */
.stream-brands { display: flex; flex-wrap: wrap; gap: 18px 40px; border-top: 1px solid var(--line-soft); padding-top: 18px; }
.stream-group { display: flex; flex-direction: column; gap: 10px; }
.brand-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 16px 10px 14px;
  border-radius: 14px; background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.brand-chip svg { width: 28px; height: 28px; flex: none; fill: var(--brand); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--brand) 45%, transparent)); }
.brand-name { font-family: var(--font-body); font-size: 15px; letter-spacing: 1px; color: var(--white); white-space: nowrap; }
.brand-more { font-style: italic; font-size: 14px; color: var(--muted); }
/* Settings › Vorschau des Overlays (Auge): Dialog mit einer 16:9-Bühne wie ein Stream.
   Die Bühne hat feste 1280 × 720 Pixel und wird per transform auf die Dialogbreite skaliert (settings.js). */
dialog.sheet.preview-sheet { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.ov-stage-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0c1013; box-shadow: inset 0 0 0 1px var(--line-soft); }
.ov-stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; background: #0c1013 url("/img/overlay-preview.webp") center / cover no-repeat; }
.ov-stage-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.ov-cam { position: absolute; left: 24px; bottom: 28px; width: 304px; }
.ov-cam-frame {
  width: 304px; height: 171px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(215, 38, 61, .85), 0 0 18px rgba(215, 38, 61, .35), 0 12px 30px rgba(0, 0, 0, .6);
}
.ov-cam-frame img { display: block; width: 100%; height: 100%; }
.ov-cam-tag {
  position: absolute; left: 10px; bottom: -12px; display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 3px; border-radius: 4px; background: var(--bg); color: var(--ink);
  font: 600 13px/1.2 var(--font-body); letter-spacing: 1px; box-shadow: 0 0 0 1px rgba(215, 38, 61, .7);
}
.ov-cam-live { color: var(--white); background: var(--red-bright); padding: 1px 6px 0; border-radius: 3px; font-size: 11px; letter-spacing: 1.5px; }
.preview-note { margin: 12px 0 0; font-size: 14px; }
/* Zahnrad oben rechts im Dashboard-Profil (app.html): die oberste Zeile hält rechts Platz frei,
   damit Spielzeit und Name nicht darunter laufen. Die Fußzeile ("Playing Hunt now") geht wieder bis zum Rand. */
#hunter-panel:has(#btn-settings:not([hidden])) .hunter { padding-right: 44px; }
#hunter-panel:has(#btn-settings:not([hidden])) .hunter-foot { flex-basis: calc(100% + 44px); margin-right: -44px; }
/* Admin › Hunters: Ban (admin-users.js). Gedämpft wie das Auge, gesperrt hellrot mit Schein wie der Totenkopf. */
.x.ban { color: var(--muted); transition: color var(--ease-fast), transform var(--ease-fast), filter var(--ease-fast); }
.x.ban svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.x.ban:hover { color: var(--red-bright); transform: scale(1.15); }
.x.ban.on { color: var(--red-bright); filter: drop-shadow(0 0 6px rgba(215, 38, 61, .6)); }
@media (hover: none) { .x.ban:hover { transform: none; } }
.hunter-item-tag.banned { color: var(--red-bright); border-color: rgba(215, 38, 61, .6); }

/* ---------- Advanced-Modus: Schalter, Session, Runden, Challenge, Teams ---------- */

/* Basic / Advanced oben auf Play */
.mode-bar { text-align: center; }
.mode-row { display: inline-flex; align-items: center; gap: 14px; }
.mode-label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); transition: color var(--ease-fast); }
.mode-label.on { color: var(--white); }
.mode-note { color: var(--muted); font-style: italic; font-size: 14px; margin: 6px 0 0; }
.switch {
  position: relative; width: 52px; height: 28px; flex: none; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 14px;
  transition: background var(--ease-fast), border-color var(--ease-fast);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); transition: transform .18s cubic-bezier(.3, .7, .4, 1.3);
}
.switch.on { background: var(--accent-translucent); border-color: var(--red); }
.switch.on .switch-knob { transform: translateX(24px); background: var(--white); }
.switch:hover:not(:disabled) { border-color: var(--ink); }
.switch:disabled { cursor: not-allowed; opacity: .45; }
.switch:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* Einladung in eine Squad-Session */
.invite-bar .panel-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.invite-text { margin: 0; color: var(--ink); }

/* Kleine Avatare in Session, Challenge und Rundenlisten */
.who-avatar.small { width: 24px; height: 24px; }
.who-wrap .who-avatar.small + .who-name { font-size: 15px; }

/* Session: wer dabei ist, Team, Knöpfe und die Challenge des Abends */
#squad-root .list-head.first, .rounds-sheet .list-head.first { margin-top: 0; }
#squad-root .hunter-note.spaced { margin-top: 18px; }
.squad-members { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.squad-member { display: inline-flex; align-items: center; gap: 10px; }
.squad-member.mine .who-name { color: var(--white); }
.squad-member.invited .who-wrap { opacity: .55; }
.squad-team { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.squad-team-name { font-family: var(--font-body); font-size: 17px; color: var(--ink); }
.squad-team-name i { color: var(--muted); }
.squad-team .x.pen { margin: -6px 0; }
.squad-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.challenge { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.challenge-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.challenge-title { font-family: var(--font-head); font-size: 22px; letter-spacing: 2px; text-transform: uppercase; color: var(--white); }
.challenge-desc { color: var(--muted); font-style: italic; margin: 4px 0 12px; }
.challenge-board { list-style: none; margin: 0; padding: 0; max-width: 420px; }
.challenge-board li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.challenge-board li:last-child { border-bottom: none; }
.challenge-board b { font-family: var(--font-body); font-weight: 600; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.challenge-board li.lead .who-name { color: var(--white); }
.challenge-board li.lead b { color: var(--red-bright); }

/* Laufende Runde: Uhr im Titel, Zähler wie bei Basic, die anderen darunter, Teamwerte zum Antippen */
.round-timer { font-family: var(--font-body); font-size: 15px; letter-spacing: 1px; color: var(--muted); font-variant-numeric: tabular-nums; text-transform: none; }
.round-start { text-align: center; }
.round-start .hint { margin-top: 14px; }
.round-mates { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin: 22px 0 0; }
.round-mate { display: inline-flex; align-items: center; gap: 12px; }
.round-mate-kda { font-family: var(--font-body); font-size: 17px; color: var(--white); font-variant-numeric: tabular-nums; }
.round-team { margin-top: 30px; }
.team-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 30px; align-items: start; }
.team-field { display: flex; flex-direction: column; gap: 8px; }
.team-field .select-wrap select { min-width: 0; width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--line); align-self: flex-start; }
.seg-btn {
  min-width: 44px; padding: 10px 14px 8px; cursor: pointer;
  background: transparent; color: var(--ink); border: none; border-left: 1px solid var(--line-soft);
  font-family: var(--font-body); font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase;
  transition: background var(--ease-fast), color var(--ease-fast);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.seg-btn:first-child { border-left: none; }
.seg-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .04); }
.seg-btn.on { background: var(--accent-translucent); color: var(--white); }
.seg-btn:disabled { cursor: default; opacity: .5; }

/* Rundenliste: eine Spalte pro Spieler, die eigene hervorgehoben */
.rounds-table tbody tr { cursor: default; }
.rounds-table tbody tr:hover { background: transparent; }
.rounds-table tbody tr.active { background: var(--surface-row-active); }
.rounds-table th, .rounds-table td { text-align: center; }
.rounds-table th:first-child, .rounds-table td:first-child { text-align: left; }
.rounds-table td.round-n { color: var(--white); width: 1%; }
.rounds-table td.round-result { text-align: left; white-space: nowrap; }
.rounds-table th:nth-child(2) { text-align: left; }
.rounds-table th { vertical-align: bottom; }
.rounds-table th .th-main, .rounds-table th .th-sub { display: block; white-space: nowrap; }
.rounds-table th.player-col .th-main { max-width: 120px; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; }
/* Zweite Kopfzeile: sagt, was die Zahlen sind, leiser als der Name darüber */
.rounds-table th .th-sub { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .8; }
.rounds-table .player-col { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rounds-table .player-col.mine { color: var(--white); }
.round-map { display: block; color: var(--muted); font-size: 12px; font-style: italic; }
.round-live { color: var(--red-bright); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.rounds-group + .rounds-group { margin-top: 26px; }
.rounds-with { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 6px; }
.rounds-with .skull { margin-left: auto; }
.rounds-basic { font-size: 14px; color: var(--muted); }

/* Ledger: Knopf mit der Zahl der Runden eines Tages, Kacheln zu Runden und Serien */
.rounds-chip {
  margin-left: 8px; padding: 2px 8px 1px; cursor: pointer; vertical-align: 1px;
  background: transparent; color: var(--muted); border: 1px solid var(--line-soft);
  font-family: var(--font-body); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}
.rounds-chip:hover { color: var(--ink); border-color: var(--ink); }
.stats.rounds-stats { margin-top: -23px; }
.stat-sub { color: var(--muted); font-style: italic; font-size: 12px; }

/* Rangliste: Reiter Hunters / Teams, Spalte mit gewonnenen Challenges, Verbesserung bei Most improved */
.board-tabs { display: flex; gap: 22px; margin: -4px 0 18px; padding-right: 48px; }
.board-tab {
  background: none; border: none; border-bottom: 2px solid transparent; padding: 4px 0 6px; cursor: pointer;
  color: var(--muted); font-family: var(--font-body); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}
.board-tab:hover { color: var(--ink); }
.board-tab.on { color: var(--white); border-bottom-color: var(--red-bright); }
.board td.n.sorted { color: var(--red-bright); }
.delta { font-size: 12px; margin-left: 6px; color: var(--ink); }
.delta.up { color: var(--white); }
.delta.down { color: var(--red-bright); }
.delta.none { color: var(--muted); }
.team-wrap { gap: 12px; }
.team-avatars { display: inline-flex; flex: none; }
.team-avatars .who-avatar + .who-avatar { margin-left: -12px; }
.team-names { display: flex; flex-direction: column; min-width: 0; }
.team-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* Auswahl zum Einladen: ganze Zeile anklickbar */
.pick-list li { padding: 0; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--red); flex: none; margin: 0; }
.hunter-item-tag.playing-tag { color: var(--green); border-color: rgba(143, 191, 58, .5); }

/* Runde bearbeiten: eigene Zahlen mit Minus und Plus */
.steppers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 10px 0 0; }
.stepper { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stepper-row { display: flex; align-items: center; gap: 10px; }
.stepper-row .btn.small { padding: 6px 12px 4px; letter-spacing: 0; font-size: 16px; }
.stepper-value { font-family: var(--font-body); font-size: 28px; color: var(--white); min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.rounds-sheet .team-fields { margin-top: 10px; }

/* Tageswerte unter der Rundensteuerung: der ganze Spieltag wie in Basic, eine Reihe, auch auf dem Handy */
#squad-root .day-body { padding-top: 0; }
.day-date { margin-left: 10px; color: var(--muted); letter-spacing: 1px; text-transform: none; font-style: italic; }
.stats.day-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 0; }
/* Total-Zeile der Rundentabelle: K/D und K/D/A der Session unter K/D/A */
.rounds-table .foot-ratio { display: block; font-size: 11px; letter-spacing: .5px; color: var(--muted); margin-top: 2px; }

/* In der Runde stehen die drei Zähler auch auf dem Handy nebeneinander, damit die Teamwerte erreichbar bleiben */
@media (max-width: 760px) {
  #squad-root .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  #squad-root .card { padding: 14px 8px; }
  #squad-root .card .h-plate { font-size: 14px; letter-spacing: 1.5px; }
  #squad-root .card .h-plate::before, #squad-root .card .h-plate::after { content: none; }
  #squad-root .card-value { font-size: 48px; margin: 8px 0 12px; }
  #squad-root .card .btn { padding: 12px 4px 10px; font-size: 12px; letter-spacing: 1px; }
  #squad-root .card .minus { font-size: 11px; padding: 6px 4px 4px; letter-spacing: .5px; }
}

@media (max-width: 640px) {
  .day-stats .stat { padding: 10px 2px; }
  .day-stats .stat-label { font-size: 10px; letter-spacing: 1px; white-space: nowrap; }
  .day-stats .stat-value { font-size: 19px; white-space: nowrap; }
  .squad-actions { justify-content: flex-start; }
  .team-fields { grid-template-columns: 1fr; }
  .steppers { gap: 8px; }
  .stepper-row { gap: 4px; }
  .stepper-row .btn.small { padding: 6px 9px 4px; }
  .stepper-value { font-size: 22px; min-width: 26px; }
  .board-tabs { padding-right: 44px; }
}

/* ---------- Umgebung I (domain.js) ---------- */
/* Kennzeichen unten links auf I, damit niemand I mit bayoubook.app verwechselt. Über Dock und Hinweisen. */
.env-mark {
  position: fixed; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 2147483000;
  padding: 4px 9px 3px; background: var(--red-bright); color: var(--white); text-decoration: none;
  font-family: var(--font-body); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.env-mark:hover { color: var(--white); text-decoration: none; }
html[data-env="i"] .topbar { box-shadow: inset 0 -2px 0 var(--red-bright); }
/* Auf dem Handy sitzt das Dock am Rand, das Kennzeichen rutscht darüber */
@media (max-width: 640px) { .env-mark { bottom: calc(78px + env(safe-area-inset-bottom)); } }
