/* 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";
@import "tokens/typography.css";
@import "tokens/spacing.css";
@import "tokens/effects.css";

* { 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 */

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; }

/* ---------- 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);
}
.lead { color: var(--muted); font-size: 16.66px; }
.italic { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  cursor: pointer;
  font-family: var(--font-head);
  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 1fr;
  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); }
@media (max-width: 640px) { .topbar-label { display: none; } }
.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-head); 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); }

/* 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; }
/* In der 45px hohen Kopfleiste reicht der Platz nicht für zwei Zeilen,
   deshalb stehen Wort und Kasten dort nebeneinander. */
.topbar .logo { flex-direction: row; align-items: center; gap: 10px; padding: 0 12px; transform: translateY(1px); white-space: nowrap; }
.topbar .logo-main { font-size: 24px; padding-top: 3px; }
.topbar .logo-box { font-size: 10px; letter-spacing: .3em; padding: 3px 5px 2px 8px; }
@media (max-width: 480px) {
  .topbar .logo-main { font-size: 20px; }
  .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: 6px 14px 4px 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); }
.section.black { background: var(--black); }
.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; }

/* ---------- 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-head);
  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; }
.date-pretty { font-family: var(--font-head); font-size: 20px; color: var(--ink); }

/* ---------- 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; }
.stat-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: var(--font-head); 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); }
td.k { color: var(--ink); }
td.d { color: var(--muted); }
td.a { color: var(--ink); }
td.kd-cell { font-family: var(--font-head); 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); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.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-head); 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; }
.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; }
.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-head); 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 {
  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);
}

/* ---------- 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 .legal { max-width: 640px; margin: 0 auto; }
footer .copy { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-bottom: 24px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
footer .links a { text-decoration: none; color: var(--muted); }
footer .links a:hover { color: var(--ink); }
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-head); 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; }

/* 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-head); 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; }

/* 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); }
.board td.rank { font-family: var(--font-head); 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-head); font-size: 17px; line-height: 1.2; display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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); }

/* ---------- Admin: Nutzerliste ---------- */
.admin-filter { margin-bottom: 12px; padding-right: 48px; }
.admin-users th.sid, .admin-users td.sid, .admin-users td.seen { text-align: left; white-space: nowrap; }
.admin-users td.sid { color: var(--muted); font-size: 14px; }
.admin-users td.sid a { color: inherit; }
.admin-users td.sid a:hover { color: var(--ink); }
.admin-users td.who { white-space: nowrap; }
.admin-users td.who .hunter-item-tag { margin-left: 8px; }
.admin-users th { white-space: nowrap; }
@media (max-width: 1100px) { .admin-users .sid { display: none; } .admin-users .who-name { max-width: 180px; } }
@media (max-width: 640px) { .admin-users .n { display: none; } .admin-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .icon-btn { top: 10px; right: 10px; } .select-wrap select { min-width: 160px; } }

/* 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; }

/* 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; }
  .board .who-name { 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; }
  .select-wrap, .select-wrap select { width: 100%; }
  .select-field { flex: 1 1 150px; }
  .hunter-actions { justify-content: flex-start; }
  .hunter-actions .btn { flex: 1 1 auto; }
  .date-row .btn { flex: 1 1 auto; }
  .date-row input[type="date"] { flex: 1 1 170px; }
  .date-pretty { flex-basis: 100%; }
}

@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 .logo-main { font-size: 18px; }
  .topbar .logo-box { display: none; }
  .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);
}
/* 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); }
}
