/* ============================================================
   Liga der Heftigkeiten – Dashboard-Styles
   © 2026 D1rtyD3vil. Alle Rechte vorbehalten.
   Weitergabe, Vervielfältigung oder Nutzung dieses Codes (auch
   auszugsweise) außerhalb dieses Projekts nur mit ausdrücklicher
   schriftlicher Zustimmung von D1rtyD3vil. Siehe LICENSE.md.
   ============================================================ */
:root {
  --bg: #100d0b;
  --panel: #1c1713;
  --panel-2: #241d18;
  --line: #35291f;
  --gold: #d4a445;
  --red: #b8402f;
  --text: #ece5d8;
  --muted: #8f8477;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.screen {
  height: 100vh; width: 100vw;
  display: flex; align-items: center; justify-content: center;
}
.screen[hidden] { display: none; }
.gate-box {
  text-align: center; max-width: 420px; padding: 32px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.gate-box h1 { color: var(--gold); font-size: 22px; margin-bottom: 8px; }
.gate-box p { color: var(--text); font-size: 14px; line-height: 1.5; }
.gate-box .muted { color: var(--muted); font-size: 12.5px; }
#login-btn, .ghost-btn {
  margin-top: 16px; padding: 10px 20px; border-radius: 8px; border: none;
  background: var(--gold); color: #100d0b; font-weight: 700; cursor: pointer;
}
.ghost-btn { background: transparent; color: var(--muted); border: 1px solid var(--line); }

#app { flex-direction: column; align-items: stretch; }
#topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 6px 14px; gap: 10px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex-shrink: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; /* Firefox: Scrollbar verstecken */
  transition: padding .15s ease;
}
#topbar::-webkit-scrollbar { display: none; } /* Chrome/Opera/Edge: Scrollbar verstecken */
#topbar-left { justify-self: start; display: flex; align-items: center; gap: 10px; }
#topbar-logo { height: 30px; width: auto; flex-shrink: 0; }
#topbar-userstats {
  display: flex; flex-direction: column; gap: 1px; font-size: 10px; color: var(--muted);
  border-left: 1px solid var(--line); padding-left: 10px; white-space: nowrap;
}
#topbar-userstats span { line-height: 1.25; }
#topbar-todaytitle { color: var(--gold) !important; font-weight: 700; }
#topbar-center { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 1px; }
#topbar-thanks { font-size: 9.5px; color: var(--muted); font-style: italic; white-space: nowrap; }
#topbar-title { color: var(--gold); font-weight: 700; font-size: 14px; white-space: nowrap; }
#topbar-version { font-size: 9.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
#topbar-right {
  justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
#topbar-right-top { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#logout-btn { padding: 2px 9px; font-size: 11px; border-radius: 6px; cursor: pointer; }
#topbar-streamstatus {
  font-size: 11px; color: var(--muted); max-width: 480px; margin-top: 1px;
  overflow: hidden; white-space: nowrap; position: relative; cursor: default;
}
#topbar-streamstatus.live { color: #5cb85c; }
#topbar-streamstatus-inner {
  display: inline-block; white-space: nowrap; transition: transform 3.5s linear;
}
#topbar-subcounts { font-size: 10px; color: var(--muted); white-space: nowrap; }
#topbar-user { color: var(--muted); font-size: 12.5px; }
#topbar-online-count { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------
   Balken oben komplett ausblenden (Dashboard-Einstellung
   "topbar-hidden-toggle-checkbox"): #topbar wird aus dem Fluss
   genommen (position: fixed) und schrumpft auf eine kleine
   Kapsel mit nur Titel + Versionsstand, damit #board darunter
   automatisch die komplette Höhe füllt (mehr Platz zum
   Verschieben von Kacheln, links/rechts/unten frei). Stream-Status
   und Danke-Zeile bleiben in der Kapsel aus, damit sie wirklich
   minimal bleibt.
------------------------------------------------------------ */
body.topbar-hidden #topbar {
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%);
  width: auto; max-width: none;
  display: flex; padding: 5px 16px; border-radius: 999px;
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.4);
  z-index: 40; overflow: visible;
}
body.topbar-hidden #topbar-left,
body.topbar-hidden #topbar-right,
body.topbar-hidden #topbar-streamstatus,
body.topbar-hidden #topbar-thanks {
  display: none;
}
body.topbar-hidden #board { flex: 1; }

#board {
  position: relative; flex: 1; overflow: auto;
  background:
    linear-gradient(var(--panel-2) 1px, transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg, var(--panel-2) 1px, transparent 1px) 0 0/24px 24px;
}

/* Innerer Layer für den optionalen Zoom-Modus (siehe updateBoardScale() in
   app.js). Größe wird per JS auf die tatsächlich benötigte Fläche gesetzt;
   ohne aktiven Zoom bleibt scale(1) - verhält sich dann exakt wie vorher. */
#board-scale-wrap {
  position: relative;
  transform-origin: 0 0;
}

/* ------------------------------------------------------------
   Kino-Modus: nur Stream + Chat, füllen den ganzen Bildschirm.
   Alles andere (Topbar, restliche Kacheln, Menüs) wird ausgeblendet;
   Stream/Chat selbst bekommen ihre Größe/Position live per JS gesetzt
   (siehe enterCinemaMode()/layoutCinema() in app.js).
------------------------------------------------------------ */
body.cinema-mode-active #topbar,
body.cinema-mode-active #widgets-tab,
body.cinema-mode-active #widgets-panel,
body.cinema-mode-active #admin-tab,
body.cinema-mode-active #admin-panel,
body.cinema-mode-active #feedback-notify {
  display: none;
}
body.cinema-mode-active #board {
  overflow: hidden;
}
body.cinema-mode-active .tile:not([data-tile="player"]):not([data-tile="chat"]) {
  display: none;
}
body.cinema-mode-active .tile[data-tile="player"],
body.cinema-mode-active .tile[data-tile="chat"] {
  border-radius: 0;
  z-index: 100;
}
body.cinema-mode-active .tile[data-tile="player"] .tile-header,
body.cinema-mode-active .tile[data-tile="chat"] .tile-header {
  display: none;
}
/* Ziehen/Größe ändern der beiden Kacheln ist im Kino-Modus gesperrt -
   die Größe kommt komplett vom Trenner/Fenster, siehe layoutCinema(). */
body.cinema-mode-active .tile[data-tile="player"] .tile-resize-left,
body.cinema-mode-active .tile[data-tile="player"] .tile-resize-top,
body.cinema-mode-active .tile[data-tile="player"] .tile-resize-corner,
body.cinema-mode-active .tile[data-tile="chat"] .tile-resize-left,
body.cinema-mode-active .tile[data-tile="chat"] .tile-resize-top,
body.cinema-mode-active .tile[data-tile="chat"] .tile-resize-corner {
  display: none;
}

#cinema-exit-btn {
  position: fixed; top: 14px; right: 14px; z-index: 200;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(28, 23, 19, 0.85); color: var(--gold); font-weight: 700;
  font-size: 12.5px; cursor: pointer; backdrop-filter: blur(4px);
  opacity: 1; transition: opacity 0.4s ease;
}
#cinema-exit-btn:hover { border-color: var(--gold); }
#cinema-exit-btn[hidden] { display: none; }
/* Blendet sich aus, solange sich die Maus 3s lang nicht bewegt hat (siehe
   showCinemaExitBtnTemporarily() in app.js) - stört dann nicht mehr beim
   Zuschauen. Sobald sich die Maus wieder bewegt, sofort wieder sichtbar. */
#cinema-exit-btn.fade-out { opacity: 0; pointer-events: none; }

#cinema-splitter {
  position: fixed; top: 0; width: 8px; height: 100vh; z-index: 150;
  cursor: col-resize; background: transparent;
}
#cinema-splitter::after {
  content: ""; position: absolute; left: 3px; top: 0; width: 2px; height: 100%;
  background: var(--line); transition: background 0.15s;
}
#cinema-splitter:hover::after, #cinema-splitter.dragging::after {
  background: var(--gold);
}
#cinema-splitter[hidden] { display: none; }

.tile {
  position: absolute;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
  min-width: 200px; min-height: 140px;
  resize: none; /* eigene Griffe (links/oben/Ecke) übernehmen das jetzt komplett */
}
.tile[hidden] { display: none; }
.tile.collapsed { min-height: 0; }

/* Feste Rangordnung beim Überlappen: Stream > Chat > alle anderen */
.tile[data-tile="player"] { z-index: 12; }
.tile[data-tile="chat"] { z-index: 11; }
.tile[data-tile="calendar"],
.tile[data-tile="news"],
.tile[data-tile="music"],
.tile[data-tile="feedback"],
.tile[data-tile="vods"],
.tile[data-tile="tips"],
.tile[data-tile="runner"] { z-index: 5; }
.tile-header {
  padding: 8px 12px; font-size: 12.5px; font-weight: 700; color: var(--gold);
  background: var(--panel-2); cursor: grab; user-select: none;
  border-bottom: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile-header:active { cursor: grabbing; }
.tile-header.collapsible-header {
  display: flex; align-items: center; gap: 6px;
}
.tile-header-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-header-badge {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  font-size: 0; flex-shrink: 0;
}
.tile-collapse-btn {
  background: none; border: none; color: var(--text); cursor: pointer;
  font-size: 12px; padding: 2px 4px; flex-shrink: 0; line-height: 1;
}
.tile-collapse-btn:hover { color: var(--gold); }
.tile-toggle-btn {
  background: none; border: none; color: var(--text); cursor: pointer;
  font-size: 12px; padding: 2px 4px; flex-shrink: 0; line-height: 1;
}
.tile-toggle-btn:hover { color: var(--gold); }
.tile-toggle-btn.active-toggle { color: var(--gold); text-shadow: 0 0 6px rgba(212, 164, 69, 0.6); }
.tile.collapsed .tile-body { display: none; }
.tile[data-tile="music"].collapsed .tile-body { display: flex; } /* Ausnahme: Mini-Player bleibt sichtbar */
.tile[data-tile="music"].collapsed .music-columns { display: none; }
/* Eingeklappt: nur der linke Griff bleibt aktiv (Breite ändern), oben/Ecke
   werden von updateTileResizeMode() gesperrt - Höhe ist ja automatisch. */
.tile.collapsed .tile-collapse-btn { transform: rotate(-90deg); }
.tile-body { flex: 1; overflow: hidden; position: relative; }
.tile-body iframe { width: 100%; height: 100%; border: none; }
.tile-body.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 16px;
}

/* Player-Kachel: Video oben, dünne Eventleiste darunter, gleiche Breite */
.tile-body-column { display: flex; flex-direction: column; }
.player-area { flex: 1; min-height: 0; position: relative; }
.player-area iframe { width: 100%; height: 100%; border: none; }
#player-slot { width: 100%; height: 100%; }
.eventbar {
  flex-shrink: 0;
  display: flex; gap: 14px; align-items: center;
  padding: 5px 10px;
  background: var(--panel-2); border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
  overflow: hidden; white-space: nowrap;
}
.eventbar-item { overflow: hidden; text-overflow: ellipsis; }
.eventbar-item strong { color: var(--gold); font-weight: 700; }
.eventbar.hidden-widget { display: none; }

/* Rechter Ausklapp-Reiter zum Ein-/Ausblenden von Boxen */
#widgets-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl;
  background: var(--panel); color: var(--gold); border: 1px solid var(--line);
  border-right: none; border-radius: 8px 0 0 8px;
  padding: 10px 6px; cursor: pointer; font-size: 14px; z-index: 1002;
  transition: right 0.2s ease-out;
}
#widgets-tab.shifted { right: 240px; }
#widgets-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 240px;
  background: var(--panel); border-left: 1px solid var(--line);
  padding: 18px; z-index: 1001; transform: translateX(100%);
  transition: transform 0.2s ease-out;
  overflow-y: auto;
}
#widgets-panel.open { transform: translateX(0); }
#widgets-panel h2 { font-size: 13px; color: var(--gold); margin: 0 0 12px; }
.widget-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 6px 0; cursor: pointer; color: var(--text);
}
.widget-row[hidden] { display: none; }
#rearrange-btn {
  width: 100%; padding: 8px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--gold); font-weight: 700; font-size: 12.5px; cursor: pointer;
}
#rearrange-btn:hover { border-color: var(--gold); }
.panel-btn {
  width: 100%; padding: 8px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--gold); font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.panel-btn:hover { border-color: var(--gold); }
.rearrange-hint { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

#widgets-dropdown {
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--panel-2);
}
#widgets-dropdown summary {
  cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); font-weight: 700; list-style: none;
}
#widgets-dropdown summary::-webkit-details-marker { display: none; }
#widgets-dropdown summary::before { content: "▸ "; }
#widgets-dropdown[open] summary::before { content: "▾ "; }
#widgets-dropdown[open] summary { margin-bottom: 6px; }

.admin-section {
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
  background: var(--panel-2); margin-bottom: 12px;
}
.admin-section summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--red);
  list-style: none;
}
.admin-section summary::-webkit-details-marker { display: none; }
.admin-section summary::before { content: "▸ "; }
.admin-section[open] summary::before { content: "▾ "; }
.admin-section[open] summary { margin-bottom: 8px; }
.admin-section > *:not(summary) { margin-top: 6px; }
#preset-name-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 6px 8px; font-size: 12.5px; font-family: inherit;
}
#schedule-title-input, #schedule-time-input, #schedule-link-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 6px 8px; font-size: 12.5px; font-family: inherit; margin-bottom: 6px;
}

/* Spiele-Kalender-Kachel */
.calendar-body { padding: 10px 6px 14px 10px; overflow: hidden; display: flex; align-items: stretch; height: 100%; }
#calendar-timeline {
  display: flex; align-items: flex-start; height: 100%; flex: 1; min-width: 0;
  overflow-x: auto; overflow-y: hidden; padding-bottom: 4px;
}
.cal-entry {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  width: 100px; text-align: center; margin-bottom: 26px; padding-top: 12px; position: relative;
}
/* Kleiner Punkt auf der Verbindungslinie (siehe .cal-bar) - beide auf
   derselben Höhe, damit es wie eine durchgehende Zeitleiste mit Markern
   aussieht statt einzelner Karten. */
.cal-marker {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 3px var(--panel);
}
.cal-entry a { text-decoration: none; display: block; transition: opacity 0.15s; }
.cal-entry a:hover { opacity: 0.8; }
.cal-entry img, .cal-entry .cal-noart {
  width: 66px; height: 88px; object-fit: cover; border-radius: 6px; margin-bottom: 5px;
  background: var(--panel-2);
}
.cal-sponsored-badge {
  font-size: 8px; font-weight: 700; letter-spacing: 0.3px; color: var(--gold);
  text-transform: uppercase; margin-top: 2px;
}
.cal-entry .cal-noart { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cal-entry .cal-title {
  font-size: 11px; color: var(--text); width: 100%;
  white-space: normal; word-wrap: break-word; line-height: 1.25;
}
.cal-entry .cal-date { font-size: 10px; color: var(--muted); margin-top: 2px; }
.cal-relative {
  font-size: 9.5px; color: var(--gold); margin-top: 1px; opacity: 0.85;
}
.cal-relative.cal-relative-past { color: var(--muted); font-style: italic; }
.cal-bar { flex-shrink: 0; height: 2px; background: var(--line); margin: 7px 4px 0; align-self: flex-start; }

/* v0.44.42: Layout je nach tatsächlicher Kachelgröße (siehe computeCalendarLayoutMode
   in app.js) - der obige Block bleibt das Standard-/"wide"-Aussehen (horizontale
   Zeitleiste). Die beiden folgenden Blöcke gelten nur, wenn app.js per ResizeObserver
   auf 'stack' bzw. 'compact' umgeschaltet hat (data-layout-Attribut). */

/* HOCHFORMAT / schmale Kachel: vertikale Liste, oben -> unten. */
#calendar-timeline[data-layout="stack"] {
  flex-direction: column; align-items: stretch;
  overflow-x: hidden; overflow-y: auto;
}
.cal-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 2px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.cal-row:last-child { border-bottom: none; }
.cal-row img, .cal-row .cal-noart {
  width: 40px; height: 54px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: var(--panel-2);
}
.cal-row .cal-noart { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.cal-row-text { min-width: 0; flex: 1; text-align: left; }
.cal-row-text .cal-title { font-size: 12px; color: var(--text); white-space: normal; word-wrap: break-word; line-height: 1.25; }
.cal-row-text .cal-date { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cal-row-text .cal-relative { font-size: 10px; color: var(--gold); margin-top: 1px; opacity: 0.85; }
.cal-row-text .cal-relative.cal-relative-past { color: var(--muted); font-style: italic; }
.cal-row-next img, .cal-row-next .cal-noart { outline: 2px solid var(--gold); outline-offset: 1px; }
.cal-row .cal-next-label { font-size: 8px; font-weight: 700; letter-spacing: 0.3px; color: var(--gold); text-transform: uppercase; margin-bottom: 2px; }
.cal-row .cal-sponsored-badge { font-size: 8px; font-weight: 700; letter-spacing: 0.3px; color: var(--gold); text-transform: uppercase; display: inline-block; margin-top: 2px; }

/* SEHR KLEIN / kompakt: nur das nächste Event, zentriert, + "+N weitere Termine". */
#calendar-timeline[data-layout="compact"] {
  align-items: center; justify-content: center; overflow: hidden;
}
.cal-compact { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 100%; }
.cal-compact img, .cal-compact .cal-noart {
  width: 60px; height: 80px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; background: var(--panel-2);
}
.cal-compact .cal-noart { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cal-compact .cal-title { font-size: 12px; color: var(--text); max-width: 100%; white-space: normal; word-wrap: break-word; line-height: 1.25; }
.cal-compact .cal-date { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cal-compact .cal-relative { font-size: 10px; color: var(--gold); margin-top: 1px; opacity: 0.85; }
.cal-compact-more { font-size: 9.5px; color: var(--muted); margin-top: 6px; }

/* Chronologisch nächstes (nicht archiviertes) Spiel dezent hervorheben -
   etwas kräftigerer Rahmen ums Cover + kleines Label, aber bewusst nicht
   riesig, damit die Zeitleiste gleichmäßig bleibt. */
.cal-next-label {
  font-size: 8px; font-weight: 700; letter-spacing: 0.3px; color: var(--gold);
  text-transform: uppercase; margin-bottom: 3px;
}
.cal-entry-next img, .cal-entry-next .cal-noart {
  outline: 2px solid var(--gold); outline-offset: 1px;
}
/* Fix: "Als Nächstes"-Label macht den hervorgehobenen Eintrag ca. 12px
   höher als alle anderen - bei #calendar-timeline (overflow-y: hidden,
   feste Höhe durch die Kachel) wurde dadurch genau der unterste Teil
   dieses EINEN Eintrags abgeschnitten, also "Heute"/"Sponsored" (stehen
   im HTML ganz unten). padding-top hier um ungefähr die vom Label
   zusätzlich gebrauchte Höhe reduzieren, damit der hervorgehobene Eintrag
   insgesamt wieder genauso hoch wird wie die anderen - der Marker-Punkt
   ist ohnehin absolut positioniert und bleibt unverändert an Ort und Stelle. */
.cal-entry-next { padding-top: 0; }
#preset-list { margin-top: 10px; }
.preset-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel-2); border-radius: 6px; padding: 6px 10px; margin-bottom: 6px; font-size: 12.5px;
}
.preset-row .preset-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preset-row .preset-actions { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.preset-row button {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 2px 4px;
}
.preset-row button:hover { color: var(--gold); }
.preset-row button.preset-delete:hover { color: var(--red); }
.schedule-row { flex-wrap: wrap; }
.schedule-row.schedule-row-editing { outline: 1px solid var(--gold); }

/* Tag/Monat/Jahr statt einem einzelnen Datumsfeld - Jahr wird per JS mit
   dem aktuellen Jahr vorbefüllt, muss also im Normalfall gar nicht
   angefasst werden (siehe initScheduleAdmin in app.js). */
.schedule-date-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
/* Höher spezifisch als "#admin-panel input[type=number]" (width:100%),
   sonst würden Tag/Jahr trotz flex:1 jeweils eine eigene Zeile erzwingen. */
#admin-panel .schedule-date-parts input[type="number"], .schedule-date-parts select {
  flex: 1; width: auto; min-width: 70px; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 6px 8px; font-size: 12.5px; font-family: inherit; margin-bottom: 0;
}
.schedule-date-parts select { flex: 2; min-width: 100px; }

/* Zwei eingeklappte Untergruppen (Geplant/Archiv) statt einer langen Liste -
   Archiv startet zu (siehe [open] nur bei "Geplant" in index.html). */
.admin-subgroup { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.admin-subgroup-label {
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.4px; margin-bottom: 8px;
}

/* Countdown-Kachel */
/* v0.44.65: zentraler Countdown ("Timer") als schwebendes Overlay-Panel oben mittig.
   Kein Layout-Slot (position: fixed), das Dashboard darunter behält seine Höhe.
   Optik: Liga-/Hässlon-Holz mit Kupfer-/Gold-Rahmen und dezentem Glow - edel,
   kein Neon. Titel oben, Timer groß darunter. Klappt beim Erscheinen nach unten
   aus. [hidden] = komplett weg.
   v0.44.69 (Nutzer-Wunsch 08.10.2026): solange der Timer aktiv ist, hat er
   MAXIMALE Priorität - er liegt über ALLEN Kacheln, auch über einer nach vorne
   geholten (bringToFront zählt unbegrenzt hoch), einer gerade gezogenen/
   skalierten (9999), Kino-Modus (100), Erwähnungen-Popup (900), Seitenleisten
   (1001/1002) und Vollbild-Overlays (Tipps 2000). Kacheln dürfen dahinter
   gezogen werden.
   v0.44.70: Werkzeuge bei Maus über dem Panel ("Verschieben" entlang der
   Hauptleiste, "Verkleinern" = Mini-Pille mit nur der Zeit) - siehe
   initCountdownPanelControls() in app.js. */
#countdown-panel {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); /* top wird von positionCountdownPanel() (app.js) an die echte Topbar-Unterkante gesetzt */
  z-index: 10000; pointer-events: auto; /* v0.44.69: über allem. v0.44.70: wieder klickbar, weil es jetzt eigene Knöpfe hat (Verschieben/Verstecken) */
  width: max-content; min-width: 320px; max-width: min(92vw, 520px); /* v0.44.66: ~320-520 px je nach Titel (Desktop) */
  animation: countdown-panel-in .28s ease-out both;
}
#countdown-panel[hidden] { display: none; }
/* v0.44.66: dezente ornamentale Ecken (zwei kleine Gold-Winkel unten links/rechts, reine Deko) */
#countdown-panel::before, #countdown-panel::after {
  content: ''; position: absolute; bottom: 5px; width: 9px; height: 9px; opacity: .55; pointer-events: none;
  border-bottom: 1px solid var(--gold); border-radius: 0 0 3px 0;
}
#countdown-panel::before { left: 6px; border-left: 1px solid var(--gold); border-radius: 0 0 0 3px; }
#countdown-panel::after  { right: 6px; border-right: 1px solid var(--gold); }
#countdown-panel-inner {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 22px 10px; text-align: center; box-sizing: border-box; max-width: 100%;
  background:
    linear-gradient(180deg, rgba(212,164,69,.10), rgba(212,164,69,0) 42%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid #8a5530;                 /* Kupfer-Kante */
  border-top-color: #c98a3e;                 /* Licht von oben */
  border-radius: 0 0 14px 14px;              /* hängt unter der Topbar, unten gerundet */
  box-shadow:
    inset 0 1px 0 rgba(255,214,140,.22),     /* innere Lichtkante */
    inset 0 0 0 1px rgba(0,0,0,.35),
    0 10px 24px rgba(0,0,0,.55),             /* schwebt über dem Content */
    0 0 18px rgba(212,164,69,.18);           /* dezenter Gold-Glow */
}
#countdown-panel-inner::before {             /* feiner Goldstreifen als Aufhängung */
  content: ''; display: block; width: 46%; height: 2px; margin: -8px 0 6px; border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, rgba(212,164,69,0), var(--gold), rgba(212,164,69,0));
}
.countdown-title-text {
  font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: .2px; line-height: 1.25;
  max-width: 100%; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; /* v0.44.66: lange Titel max. 2 Zeilen + Ellipsis, die Zahl darunter bleibt an Ort und Stelle */
}
.countdown-title-text[hidden] { display: none; }
#countdown-display {
  font-size: 34px; font-weight: 800; color: #f1c65c; font-family: var(--sans, inherit);
  letter-spacing: 2px; line-height: 1.1; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(212,164,69,.35), 0 1px 0 rgba(0,0,0,.6);
}
@keyframes countdown-panel-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) { #countdown-panel { animation: none; } }
/* v0.44.70: verschoben (left wird von setCountdownPanelX gesetzt, Mitte = left), beim Anheften
   kein Fade-in-Replay und Verschiebe-Cursor überall */
#countdown-panel.is-moved { animation: none; }
#countdown-panel.is-moving { cursor: move; box-shadow: 0 0 0 2px rgba(212,164,69,.55); border-radius: 0 0 14px 14px; }
body.countdown-moving, body.countdown-moving * { cursor: move !important; }
/* Werkzeugleiste: unsichtbar, bis die Maus über dem Panel ist (oder ein Knopf den Fokus hat) */
#countdown-tools {                           /* hängt als kleine Leiste UNTER dem Panel, überdeckt also weder Titel noch Zahl */
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; padding-top: 3px;
  opacity: 0; pointer-events: none; transition: opacity .15s ease-out; white-space: nowrap;
}
#countdown-panel:hover #countdown-tools, #countdown-panel:focus-within #countdown-tools, #countdown-panel.is-moving #countdown-tools { opacity: 1; pointer-events: auto; }
#countdown-tools button {                    /* v0.44.74: drei Knöpfe -> etwas kleiner */
  font-family: var(--sans, inherit); font-size: 9.5px; font-weight: 700; line-height: 1; letter-spacing: .1px; color: var(--gold);
  background: rgba(16,13,11,.78); border: 1px solid #8a5530; border-radius: 5px; padding: 2px 5px; cursor: pointer;
}
#countdown-tools button:hover { background: rgba(212,164,69,.18); border-color: #c98a3e; color: #f1c65c; }
#countdown-tools button:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; }
#countdown-panel-inner { position: relative; }
#countdown-panel-inner[hidden] { display: none; }
/* Mini-Pille ("Verkleinern"): hochgeklappt, nur die Zeit - gaaanz klein, Klick = wieder groß */
#countdown-mini {
  display: block; margin: 0 auto; cursor: pointer; font: 700 12px/1 var(--sans, inherit); letter-spacing: 1px;
  font-variant-numeric: tabular-nums; color: #f1c65c; padding: 3px 10px 4px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid #8a5530; border-top: 0;
  border-radius: 0 0 9px 9px; box-shadow: 0 4px 12px rgba(0,0,0,.5), 0 0 10px rgba(212,164,69,.15);
}
#countdown-mini:hover { color: #ffe2a3; border-color: #c98a3e; }
#countdown-mini[hidden] { display: none; }
#countdown-panel.is-collapsed { min-width: 0; width: max-content; }
#countdown-panel.is-collapsed::before, #countdown-panel.is-collapsed::after { display: none; }
/* eingeklappte Topbar-Kapsel (body.topbar-hidden) bzw. Kino-Modus: dann näher an den oberen Rand */
body.topbar-hidden #countdown-panel { top: 52px; }
body.cinema-mode-active #countdown-panel { top: 10px; }
@media (max-width: 640px) {
  #countdown-panel { min-width: 0; max-width: 94vw; }
  #countdown-panel-inner { padding: 6px 14px 8px; }
  .countdown-title-text { font-size: 12px; }
  #countdown-display { font-size: 26px; letter-spacing: 1.5px; }
}
@media (max-width: 380px) {
  #countdown-display { font-size: 22px; }
}

/* Admin-Steuerung (nur für den Broadcaster sichtbar) */
#admin-tab {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl;
  background: #d6362a; color: #fff; border: 1px solid #7a1f17;
  border-left: none; border-radius: 0 8px 8px 0;
  padding: 10px 6px; cursor: pointer; font-size: 13px; z-index: 1002; font-weight: 700;
  transition: left 0.2s ease-out;
  box-shadow: 0 0 10px rgba(214, 54, 42, 0.5);
}
#admin-tab:hover { background: #ef4436; }
#admin-tab.shifted { left: 280px; }
#open-admin-from-right-btn {
  background: #d6362a; color: #fff; border: 1px solid #7a1f17;
}
#open-admin-from-right-btn:hover { background: #ef4436; }
#admin-panel {
  position: fixed; left: 0; top: 0; bottom: 0; width: 280px;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 18px; z-index: 1001; transform: translateX(-100%);
  transition: transform 0.2s ease-out; font-family: var(--sans, inherit);
  overflow-y: auto;
}
#admin-panel.open { transform: translateX(0); }
#admin-panel h2 { font-size: 13px; color: var(--red); margin: 0 0 4px; }
#admin-panel .sub { font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
#admin-panel .quick-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
#admin-panel .quick-btn {
  flex: 1 1 auto; padding: 6px 8px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer;
}
#admin-panel .quick-btn:hover { border-color: var(--gold); }
#admin-panel input[type="datetime-local"], #admin-panel input[type="number"] {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 6px 8px; font-size: 12.5px; margin-bottom: 8px;
}
#admin-panel .admin-btn {
  width: 100%; padding: 8px; border-radius: 6px; border: none; font-weight: 700;
  cursor: pointer; margin-bottom: 8px; font-size: 12.5px;
}
#admin-set-btn { background: var(--gold); color: #100d0b; }
#admin-cancel-btn { background: transparent; color: var(--red); border: 1px solid var(--red); }
#admin-status { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Musik-Kachel */
.music-body { display: flex; flex-direction: column; padding: 10px; gap: 8px; }
.music-columns { display: flex; gap: 10px; flex: 1; min-height: 0; }
.music-column { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.music-column-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-bottom: 4px; flex-shrink: 0;
}
.music-view { flex: 1; overflow-y: auto; min-height: 0; }
.music-album-header {
  font-size: 12.5px; font-weight: 700; color: var(--gold); padding: 6px 2px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.music-song-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px; font-size: 12.5px; color: var(--text); border-radius: 5px;
  border-left: 2px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.music-song-row:hover { background: var(--panel-2); }
.music-song-row.in-playlist { border-left-color: var(--gold); }
.music-song-row.just-added { background: rgba(92, 184, 92, 0.25); }
.music-song-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.music-song-actions button {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 5px;
}
.music-song-actions button:hover { color: var(--gold); }
.music-song-actions button.in-playlist { color: #5cb85c; }
.music-empty { font-size: 12px; color: var(--muted); padding: 10px 4px; }
.music-player { flex-shrink: 0; border-top: 1px solid var(--line); padding-top: 8px; }
#music-now-playing { font-size: 12.5px; color: var(--gold); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#music-audio { width: 100%; height: 32px; }
.music-transport { display: flex; gap: 6px; margin-top: 6px; }
.music-transport button { flex: 1; font-size: 14px; padding: 5px; }
.music-transport button.active { border-color: var(--gold); color: var(--gold); background: var(--panel-2); }

/* Eingeklappt: Titel weg, normale Player-Leiste bleibt (Lautstärke,
   Fortschrittsbalken etc.), die 4 Knöpfe rutschen kompakt daneben in
   dieselbe Zeile - keine zweite Reihe drunter. */
.tile[data-tile="music"].collapsed .music-player {
  display: flex; align-items: center; gap: 6px; border-top: none; padding-top: 0;
}
.tile[data-tile="music"].collapsed #music-now-playing { display: none; }
.tile[data-tile="music"].collapsed #music-audio { flex: 1; height: 32px; min-width: 0; }
.tile[data-tile="music"].collapsed .music-transport {
  display: flex; margin-top: 0; gap: 2px; flex-shrink: 0; width: auto;
}
.tile[data-tile="music"].collapsed .music-transport button {
  flex: none; font-size: 13px; width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.tile[data-tile="music"].collapsed #music-playpause { display: none; } /* native Leiste hat schon Play/Pause */
#music-playpause { display: none; } /* wird aktuell nirgends gebraucht, native Leiste reicht */

/* Feedback-Kachel */
.feedback-body { display: flex; flex-direction: column; padding: 10px; gap: 8px; }
#feedback-input {
  width: 100%; min-height: 60px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 8px; font-size: 12.5px; font-family: inherit;
}
#feedback-history { flex: 1; overflow-y: auto; margin-top: 4px; }
.feedback-entry {
  background: var(--panel-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px;
  font-size: 12px;
}
.feedback-entry .fb-msg { color: var(--text); margin-bottom: 4px; }
.feedback-entry .fb-reply { color: var(--gold); border-top: 1px solid var(--line); padding-top: 4px; margin-top: 4px; }
.feedback-entry .fb-pending { color: var(--muted); font-style: italic; }
.feedback-entry.fb-unread { border: 1px solid var(--gold); }

/* Benachrichtigungs-Blase, falls Feedback-Kachel gerade ausgeblendet ist */
#feedback-notify {
  position: fixed; bottom: 20px; right: 20px; z-index: 1003;
  background: var(--gold); color: #100d0b; font-weight: 700; font-size: 13px;
  padding: 12px 16px; border-radius: 10px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: fb-pulse 1.6s infinite;
}
@keyframes fb-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Admin-Feedback-Liste */
#admin-feedback-list { max-height: 300px; overflow-y: auto; }
.admin-fb-entry {
  background: var(--panel-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 12px;
}
.admin-fb-entry .fb-from { color: var(--gold); font-weight: 700; margin-bottom: 3px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.admin-fb-entry .fb-sent-at { color: var(--muted); font-weight: 400; font-size: 11px; }
.admin-fb-entry .fb-msg { color: var(--text); margin-bottom: 6px; }
.admin-fb-entry .fb-reply-shown { color: var(--muted); border-top: 1px solid var(--line); padding-top: 4px; }
.admin-fb-entry textarea {
  width: 100%; min-height: 44px; font-size: 12px; font-family: inherit;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px;
  margin-bottom: 6px; resize: vertical;
}
.admin-fb-entry button {
  padding: 5px 10px; font-size: 11.5px; border-radius: 6px; border: none;
  background: var(--gold); color: #100d0b; font-weight: 700; cursor: pointer;
}
.admin-fb-entry .fb-actions { display: flex; gap: 6px; margin-top: 6px; }
.admin-fb-entry .fb-archive-btn { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.admin-fb-entry .fb-mute-btn { background: transparent; border: 1px solid #7a1f17; color: #d6362a; }
.admin-fb-entry .fb-mute-btn:hover { background: rgba(214, 54, 42, 0.12); }
.admin-fb-entry .fb-mute-btn:disabled { opacity: 0.6; cursor: default; }
.admin-fb-entry.fb-archived { opacity: 0.6; }
#admin-archive-toggle {
  background: none; border: none; color: var(--muted); font-size: 11.5px;
  text-decoration: underline; cursor: pointer; padding: 6px 0; display: block;
}
#admin-tab .badge {
  position: absolute; top: -8px; right: -8px;
  writing-mode: horizontal-tb;
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); color: #100d0b;
  font-size: 10px; font-weight: 700; padding: 0; margin: 0; line-height: 1;
}

/* News-Kachel */
.news-body { padding: 10px; overflow-y: auto; }
.news-entry { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.news-entry:last-child { border-bottom: none; }
.news-entry .news-title { font-size: 13px; font-weight: 700; color: var(--gold); margin-bottom: 3px; }
.news-entry .news-date { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.news-entry .news-text { font-size: 12px; color: var(--text); white-space: pre-wrap; line-height: 1.4; }

/* News-Verwaltung im Admin-Panel */
.admin-news-entry { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 12px; }
.admin-news-entry .news-title { color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.admin-news-entry .news-text { color: var(--text); margin-bottom: 6px; white-space: pre-wrap; }
.admin-news-entry textarea, .admin-news-entry input {
  width: 100%; font-size: 12px; font-family: inherit;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px;
  margin-bottom: 6px;
}

/* VODs-Kachel */
.vods-body { display: flex; flex-direction: column; padding: 10px; overflow: hidden; }
#vods-list-area, #vods-player-area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#vods-player-area[hidden] { display: none; }
#vods-list-area[hidden] { display: none; }
#vods-list { flex: 1; overflow-y: auto; }
.vod-row {
  display: flex; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer; align-items: center;
}
.vod-row:hover { background: var(--panel-2); }
.vod-row img { width: 88px; height: 50px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.vod-row .vod-info { min-width: 0; }
.vod-row .vod-title {
  font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; margin-bottom: 3px;
}
.vod-row .vod-meta { font-size: 11px; color: var(--muted); }
#vods-player-slot { flex: 1; margin-top: 8px; min-height: 0; }
#vods-player-slot iframe { width: 100%; height: 100%; border: none; }

/* "Tipps für D3vil"-Kachel (nur Button + Textfeld, Animation läuft im Overlay) */
.tips-body { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; position: relative; height: 100%; }
.tips-hint { font-size: 11px; color: var(--muted); margin-top: 8px; text-align: center; }
#tips-idle, #tips-chatbox { width: 100%; text-align: center; }
#tips-input {
  width: 100%; min-height: 50px; resize: none; font-family: inherit;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 8px; font-size: 12.5px;
}

/* Vollbild-Overlay für die "Tipp"-Cutscene */
#tips-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0, 0, 0, 0.82);
  display: flex; align-items: center; justify-content: center;
}
#tips-overlay[hidden] { display: none; }
#tips-overlay-stage { position: relative; width: min(720px, 90vw); height: 240px; }
#tips-progress-wrap { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-family: var(--sans, inherit); }
#tips-progress-label { color: var(--gold); font-size: 13px; margin-bottom: 6px; }
#tips-progress-bar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
#tips-progress-fill { height: 100%; width: 0%; background: var(--gold); }
#tips-ov-screen {
  position: absolute; right: 10px; top: 58%; transform: translateY(-50%);
  font-size: 44px; opacity: 0.35;
}
#tips-ov-envelope, #tips-ov-trash, #tips-ov-foot, #tips-ov-bird, #tips-ov-poop {
  position: absolute; left: 0; top: 58%; transform: translateY(-50%);
  font-size: 48px; line-height: 1;
}

/* "Rette Hässlon"-Kachel */
.runner-tile-body { display: flex; flex-direction: column; align-items: center; padding: 12px; gap: 8px; overflow-y: auto; }
.runner-tile-hint { font-size: 11px; color: var(--muted); text-align: center; }
#runner-best { font-size: 14px; font-weight: 700; color: var(--gold); }
.casino-lb-title { font-size: 12px; color: var(--gold); margin: 10px 0 4px; text-align: center; }
#runner-leaderboard { width: 100%; }
.casino-lb-row {
  display: flex; justify-content: space-between; padding: 4px 8px; font-size: 12px;
  background: var(--panel-2); border-radius: 5px; margin-bottom: 4px;
}
.casino-lb-row .lb-rank { color: var(--gold); font-weight: 700; margin-right: 6px; }
.casino-lb-row .lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.casino-lb-row .lb-amount { color: var(--muted); }

/* Runner-Balken: fährt von unten hoch, wenn man "Spielen" klickt.
   Höhe minimal angehoben (230px -> 260px), damit Titel + Start-Button +
   Skins-Button + Einstellungen im Hauptmenü nicht mehr eng aneinander
   kleben. Die "skins-open"-Variante gibt der Garderobe-Ansicht (Kategorien
   + große Vorschau + Info + evtl. Admin-Panel) zusätzlich deutlich mehr
   Platz nach oben, wie gewünscht. */
#runner-bar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 290px;
  background: linear-gradient(to bottom, transparent 0, transparent 40px, var(--panel) 110px, var(--panel) 100%);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(100%); transition: transform 0.35s ease-out, height 0.25s ease-out;
  z-index: 1500; display: flex; align-items: center; justify-content: center;
}
#runner-bar.open { transform: translateY(0); }
#runner-bar.skins-open { height: clamp(520px, 86vh, 780px); }
#runner-canvas { width: 100%; height: 100%; display: block; }
#runner-close-btn {
  position: absolute; top: 8px; right: 12px; z-index: 1501;
  background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer;
}
#runner-close-btn:hover { color: var(--gold); }
#runner-hud {
  position: absolute; top: 8px; left: 16px; z-index: 1501;
  display: flex; flex-direction: column; gap: 4px; font-family: var(--sans, inherit);
}
#runner-score { font-size: 18px; font-weight: 700; color: var(--gold); }
.runner-score-row { display: flex; align-items: center; gap: 4px; position: relative; }
#runner-score-popups { position: relative; height: 18px; }
.runner-score-popup {
  position: absolute; left: 0; top: 0;
  color: #5cb85c; font-weight: 700; font-size: 13px; white-space: nowrap;
  animation: runner-popup-float 900ms ease-out forwards;
}
.runner-patch-popup.golden {
  color: var(--gold); font-size: 14px;
  text-shadow: 0 0 8px rgba(212, 164, 69, 0.8);
  animation-duration: 1400ms;
}
@keyframes runner-popup-float {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-18px); opacity: 0; }
}

/* Dynamische Toast-Meldungen (Laufkommentare, Annäherung an Gegner usw.) */
#runner-toast {
  position: absolute; top: 40px; left: 16px;
  z-index: 1501; font-family: var(--sans, inherit); font-size: 12.5px;
  color: var(--gold); background: rgba(16, 13, 11, 0.75); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 20px; white-space: nowrap;
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none; max-width: 45%;
  overflow: hidden; text-overflow: ellipsis;
}
#runner-toast.visible { opacity: 1; }

/* Live-Freischaltungs-Hinweis - eigenes Feld statt #runner-toast
   (verhindert, dass Lauf-Kommentare und Unlock-Meldung sich gegenseitig
   überschreiben). Oben RECHTS, damit es sich nicht mit #runner-toast
   (oben links) überlagert. pointer-events:none, blockiert also nie Klicks
   zum Springen - "darf den Run nicht sabotieren". */
#runner-unlock-toast {
  position: absolute; top: 40px; right: 16px;
  z-index: 1502; font-family: var(--sans, inherit); font-size: 12.5px;
  color: var(--bg, #16130f); background: linear-gradient(135deg, var(--gold), #f0c869);
  border: 1px solid rgba(0,0,0,0.25); padding: 6px 13px 6px 10px; border-radius: 20px;
  white-space: nowrap; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  opacity: 0; transform: translateY(-6px); pointer-events: none; max-width: 55%;
  overflow: hidden; text-overflow: ellipsis;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#runner-unlock-toast.visible { opacity: 1; transform: translateY(0); }
#runner-unlock-toast-icon { margin-right: 6px; }
@media (max-width: 640px) {
  #runner-unlock-toast { font-size: 11px; padding: 5px 10px; top: 36px; right: 10px; }
}

/* Aufgeräumt 27.09.2026 (Hässlon v0.18.2-Integration): bis v0.18.1 hatte das
   Widget selbst eine feste Höhenklammer (--hs-max-height/overflow:hidden auf
   .hs) und scrollte nur intern in .hs-bottom - deshalb musste --hs-max-height
   hier auf 100% der (fest 600px hohen) Kachel gesetzt werden (Anhang N.9 der
   HANDOFF), sonst wurde der Sticky-Bereich zu hoch berechnet.
   Seit v0.18.2 gilt: GENAU EIN vertikaler Scroll-Owner pro Ansicht. Im
   Dashboard ist das die Kachel selbst (.tile-body, siehe deren
   overflow-y:auto/overflow-x:hidden in index.html) - das Widget hat gar
   keinen eigenen Scrollbereich und keine interne Höhenklammer mehr
   (--hs-max-height wird von keiner Regel des Moduls mehr gelesen). Die Raum-
   Skalierung (layout.js: stageScale()) ermittelt ihre Höhen-Obergrenze selbst
   über den nächsten scrollenden Vorfahren (.tile-body) bzw. fällt sonst auf
   die Fensterhöhe zurück - keine eigene CSS-Regel hier mehr nötig. */

/* Popout-Knopf im Hässlon-Kachel-Header (Nutzer-Wunsch 24.09.2026) - klein und
   quadratisch statt der vollen .panel-btn-Breite, damit er nicht über die
   ganze Kopfleiste gezogen wird. */
#haesslon-popout-btn {
  width: auto; flex: 0 0 auto; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--gold);
  font-size: 12px; line-height: 1.4; cursor: pointer;
}
#haesslon-popout-btn:hover { border-color: var(--gold); }

/* Kleine, dezente Legende - unten rechts, verdeckt keine Hindernisse */
#runner-legend {
  position: absolute; bottom: 6px; right: 12px; z-index: 1501;
  display: flex; gap: 10px; font-family: var(--sans, inherit);
  font-size: 10.5px; color: var(--muted); background: rgba(16, 13, 11, 0.55);
  padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line);
}
@media (max-width: 640px) {
  #runner-legend { font-size: 9px; gap: 6px; padding: 3px 6px; }
  #runner-legend span:not(:first-child) { display: none; } /* auf schmalen Screens nur Steuerung zeigen */
}

/* "Größere Schrift"-Option (Runner-Menü) - Sprechblasen selbst werden direkt
   in der Canvas-Zeichnung größer (siehe drawSpeechBubble/largeTextEnabled
   in app.js), hier nur die normalen HTML-Anzeigen drumherum. */
#runner-bar.large-text #runner-score { font-size: 25px; font-weight: 800; }
#runner-bar.large-text .runner-timer-row,
#runner-bar.large-text .runner-patch-row,
#runner-bar.large-text .runner-insult-mode-row { font-size: 18px; font-weight: 700; }
#runner-bar.large-text #runner-toast { font-size: 18px; font-weight: 700; }
#runner-bar.large-text #runner-legend { font-size: 14px; font-weight: 700; }

/* Game-Over-Anzeige */
#runner-gameover {
  position: absolute; inset: 0; z-index: 1502; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(16, 13, 11, 0.82); font-family: var(--sans, inherit); text-align: center;
  overflow-y: auto; padding: 8px 0;
}
#runner-gameover[hidden] { display: none; }

#runner-pause-overlay {
  position: absolute; inset: 0; z-index: 1502; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(16, 13, 11, 0.75); font-family: var(--sans, inherit); text-align: center;
}
#runner-pause-overlay[hidden] { display: none; }
#runner-pause-title { font-size: 18px; font-weight: 700; color: var(--gold); }
#runner-pause-hint { font-size: 11.5px; color: var(--muted); }

/* Countdown nach "Fortsetzen" (siehe beginResumeCountdown() in app.js) -
   bewusst OHNE cursor:pointer/Klick-Handler wie beim normalen Pause-Overlay,
   ein Klick soll den Countdown nicht abkürzen können. */
#runner-resume-countdown {
  position: absolute; inset: 0; z-index: 1502;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(16, 13, 11, 0.75); font-family: var(--sans, inherit); text-align: center;
}
#runner-resume-countdown[hidden] { display: none; }
#runner-resume-countdown-title { font-size: 14px; color: var(--muted); }
#runner-resume-countdown-number {
  font-size: 44px; font-weight: 800; color: var(--gold);
  text-shadow: 0 0 14px rgba(212, 164, 69, 0.6);
}
#runner-go-score { font-size: 22px; font-weight: 700; color: var(--gold); }
#runner-go-best { font-size: 12.5px; color: var(--text); }
#runner-go-rank { font-size: 12.5px; color: var(--text); }
#runner-go-death { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
#runner-go-hint { font-size: 11px; color: var(--muted); margin-top: 8px; }
#runner-go-menu-btn { margin-top: 8px; font-size: 11px; padding: 5px 12px; }

/* Bestenlisten-Perioden-Tabs in der Kachel */
/* Jetzt 6 Tabs statt 4 (Spielzeit/Skins neu dazu) - flex-wrap, damit sie bei
   schmalerem Panel in eine zweite Zeile umbrechen statt gequetscht zu
   werden oder horizontal zu scrollen. */
.runner-lb-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.runner-lb-tab {
  flex: 1 1 28%; min-width: 70px; padding: 4px; font-size: 11px; border-radius: 5px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.runner-lb-tab.active { color: var(--gold); border-color: var(--gold); }

/* ============================================================
   T3-TAGESBELEIDIGUNG
   ============================================================ */
.insult-body {
  padding: 14px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px; min-height: 0;
}
#insult-draw-section {
  flex-shrink: 0; width: 100%; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.insult-subline { font-size: 10.5px; color: var(--muted); font-style: italic; }
#insult-loading { font-size: 12px; color: var(--muted); }
.insult-not-eligible-text { font-size: 12.5px; color: var(--muted); padding: 10px 4px; }
.insult-prompt { font-size: 12.5px; color: var(--text); }

#insult-reel-area { width: 100%; }
#insult-reel {
  font-size: 19px; font-weight: 700; color: var(--gold); padding: 14px 10px;
  background: var(--panel-2); border: 2px solid var(--line); border-radius: 8px;
  min-height: 26px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%;
}

#insult-result {
  width: 100%; padding: 14px 10px; border-radius: 10px; border: 2px solid var(--line);
  background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.insult-result-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px;
}
#insult-result-title {
  font-size: 21px; font-weight: 800; color: var(--gold); line-height: 1.25;
  max-width: 100%; word-break: break-word; overflow-wrap: break-word;
}
#insult-result-rarity { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
#insult-result-quote { font-size: 12px; color: var(--text); font-style: italic; margin-top: 4px; }
.insult-countdown { font-size: 10px; color: var(--muted); margin-top: 8px; }

/* Seltenheits-Abstufungen - dezent bei common, spürbar bei legendary,
   aber immer noch Taverne statt Neon-Casino. */
#insult-result.rarity-common { border-color: var(--line); }
#insult-result.rarity-uncommon { border-color: #8a8175; box-shadow: 0 0 6px rgba(212, 164, 69, 0.15); }
#insult-result.rarity-rare { border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 164, 69, 0.35); }
#insult-result.rarity-epic {
  border-color: var(--gold); box-shadow: 0 0 20px rgba(212, 164, 69, 0.55);
  animation: insult-epic-pulse 1.6s ease-in-out 1;
}
#insult-result.rarity-legendary {
  border-color: #ffd76a; box-shadow: 0 0 28px rgba(255, 215, 106, 0.7);
  animation: insult-legendary-shine 1.8s ease-in-out 1;
}
@keyframes insult-epic-pulse {
  0% { box-shadow: 0 0 0 rgba(212, 164, 69, 0); }
  30% { box-shadow: 0 0 26px rgba(212, 164, 69, 0.7); }
  100% { box-shadow: 0 0 20px rgba(212, 164, 69, 0.55); }
}
@keyframes insult-legendary-shine {
  0% { box-shadow: 0 0 0 rgba(255, 215, 106, 0); transform: scale(1); }
  25% { transform: scale(1.03); }
  35% { box-shadow: 0 0 40px rgba(255, 215, 106, 0.9); }
  50% { transform: scale(0.99); }
  100% { box-shadow: 0 0 28px rgba(255, 215, 106, 0.7); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #insult-result.rarity-epic, #insult-result.rarity-legendary { animation: none; }
}

#insult-error { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#insult-result[hidden] { display: none; }
#insult-error[hidden] { display: none; }

/* Einklappen (normale Kopfzeile oben) blendet jetzt die komplette Kachel
   aus wie bei jeder anderen auch - keine Sonderbehandlung mehr. Sichtbarkeit
   der Liste hängt einzig davon ab, wie groß man die Kachel selbst zieht. */

.insult-community-toggle-wrap {
  width: 100%; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px;
  display: flex; flex-direction: column; flex: 1; min-height: 0;
}
.insult-community-label {
  width: 100%; font-size: 11px; color: var(--muted); text-align: center; flex-shrink: 0;
}
#insult-community-list-body {
  margin-top: 6px; flex: 1; min-height: 0; overflow-y: auto; text-align: left;
}
.insult-community-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: var(--text); padding: 3px 4px; border-bottom: 1px solid var(--line);
}
.insult-community-row:last-child { border-bottom: none; }
.insult-community-row .insult-community-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insult-rarity-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle; flex-shrink: 0;
}
.insult-community-row .insult-community-time { flex-shrink: 0; color: var(--muted); font-size: 10.5px; }

/* Eigene Skalier-Griffe an allen Seiten/Ecken (nativer Browser-Griff wurde
   komplett ersetzt, damit wir Grenzen als "Wand" statt Richtungssperre
   umsetzen können - der Pfeil bleibt für Zuschauer immer normal). */
.tile-resize-left {
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  cursor: ew-resize; z-index: 5;
}
.tile-resize-left.blocked { cursor: default; pointer-events: none; }
.tile-resize-top {
  position: absolute; left: 0; top: 0; right: 0; height: 6px;
  cursor: ns-resize; z-index: 6;
}
.tile-resize-top.blocked { cursor: default; pointer-events: none; }
.tile-resize-corner {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; z-index: 7;
}
.tile-resize-corner.blocked { cursor: default; pointer-events: none; }

/* Stream-Kachel: nur noch übers Eck skalierbar (behält so immer sauber
   das Seitenverhältnis, falls "16:9 halten" aktiv ist - links/oben
   würden das umgehen und wieder schwarze Balken erzeugen können). */
.tile[data-tile="player"] .tile-resize-left,
.tile[data-tile="player"] .tile-resize-top {
  display: none;
}

/* Deckt iframes während des Skalierens ab - verhindert, dass der Browser
   das iframe bei jedem einzelnen Frame neu layouten muss (teuer, das war
   die Ursache fürs Ruckeln, sobald die Maus über Stream/Chat wanderte).
   Wird nur kurz während des aktiven Ziehens am Griff eingeblendet. */
.tile-resize-cover {
  position: absolute; inset: 0; background: transparent;
  z-index: 8; pointer-events: auto; cursor: inherit;
}

/* ============================================================
   ERWÄHNUNGEN (Mentions) - Live-Verbindung zum Chat-Tool per postMessage
   ============================================================ */
.mentions-body { padding: 8px; overflow-y: auto; }
.mention-entry {
  border-bottom: 1px solid var(--line); padding: 8px 4px; margin-bottom: 4px;
}
.mention-entry:last-child { border-bottom: none; }
.mention-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
}
.mention-name { color: var(--gold); font-weight: 700; font-size: 12.5px; }
.mention-time { color: var(--muted); font-size: 10.5px; flex-shrink: 0; }
.mention-message {
  font-size: 12px; color: var(--text); margin-top: 3px; margin-bottom: 6px;
  overflow-wrap: break-word;
}
.mention-actions { display: flex; gap: 6px; align-items: center; }
.mention-reply-input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 5px 8px; font-size: 12px; font-family: inherit;
}
.mention-reply-input:disabled { opacity: 0.5; }
.mention-reply-btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--gold);
  border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
  flex-shrink: 0;
}
.mention-reply-btn:hover { border-color: var(--gold); }
.mention-reply-btn:disabled { opacity: 0.5; cursor: default; }
.mention-dismiss-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: 5px 8px; font-size: 12px; cursor: pointer; flex-shrink: 0;
}
.mention-dismiss-btn:hover { border-color: var(--red); color: var(--red); }

.mention-expand-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 11px; padding: 0 2px 0 0; vertical-align: middle;
}
.mention-expand-btn:hover { color: var(--gold); }

/* Durchgehender Gesprächsverlauf im Popup (Archiv + noch offene Nachrichten
   zusammen), zum Durchscrollen statt separatem Popup-Fenster */
.mention-thread-entry { margin-bottom: 10px; }
.mention-thread-entry:last-child { margin-bottom: 0; }
.mention-thread-them {
  font-size: 12px; color: var(--text); background: var(--panel-2);
  border-radius: 8px; padding: 6px 8px; display: flex; align-items: flex-start; gap: 6px;
}
.mention-thread-them .mention-time { flex-shrink: 0; margin-top: 1px; }
.mention-thread-them .mention-dismiss-btn { margin-left: auto; flex-shrink: 0; }
.mention-thread-you {
  font-size: 12px; color: var(--gold); margin-top: 4px; padding-left: 8px;
}

.mention-emote { height: 1.4em; vertical-align: middle; margin: 0 1px; }

/* Erwähnungen-Kachel nur sichtbar, solange tatsächlich welche offen sind */
.tile.tile-auto-hidden { display: none; }

.mention-history-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 11px; padding: 0 2px; vertical-align: middle;
}
.mention-history-btn:hover { color: var(--gold); }

.mention-dismiss-all-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: 5px 8px; font-size: 12px; cursor: pointer; flex-shrink: 0;
}
.mention-dismiss-all-btn:hover { border-color: var(--red); color: var(--red); }

.lb-duration { color: var(--muted); font-size: 10.5px; font-weight: 400; }

/* ============================================================
   MERCH STORE (Getshirts)
   ============================================================ */
.merch-body {
  padding: 14px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
}
.merch-title { font-size: 15px; font-weight: 800; color: var(--gold); }
.merch-subline { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.merch-body .panel-btn { text-decoration: none; display: block; box-sizing: border-box; }
.merch-beta-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 4px; padding: 1px 5px; margin-left: 6px;
}
.merch-stats {
  display: flex; gap: 14px; margin-top: 4px; width: 100%; justify-content: center;
}
.merch-stats .merch-stat-item { display: flex; flex-direction: column; align-items: center; }
.merch-stats .merch-stat-num { font-size: 18px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.merch-stats .merch-stat-label { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.merch-stats-unavailable { font-size: 10.5px; color: var(--muted); font-style: italic; margin-top: 4px; }

/* ============================================================
   ZUSCHAUERSERIE RETTEN
   ============================================================ */
.streak-body {
  padding: 14px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px;
  /* Bewusst NICHT "justify-content: center" - bei größerem Zug an der
     Kachel soll der Inhalt oben angeheftet bleiben (mehr Platz geht an die
     Bestenliste weiter unten), statt sich mittig im freien Raum zu
     verschieben. overflow-y:auto als Sicherheitsnetz, falls die Kachel mal
     kleiner gezogen wird, als der Inhalt braucht. */
  justify-content: flex-start;
  overflow-y: auto;
}
.streak-text { font-size: 12px; color: var(--muted); line-height: 1.5; }
.streak-body .panel-btn { text-decoration: none; display: block; box-sizing: border-box; width: 100%; }

.streak-own-block {
  width: 100%; box-sizing: border-box; margin-top: 4px; padding-top: 10px;
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px;
}
.streak-own-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.streak-own-value { font-size: 22px; font-weight: 700; line-height: 1.1; }
.streak-own-fire { font-size: 18px; }
.streak-own-hint { font-size: 11px; color: var(--muted); }
.streak-own-progress-track {
  width: 100%; height: 6px; border-radius: 3px; background: var(--bg);
  border: 1px solid var(--line); overflow: hidden; margin-top: 2px;
}
.streak-own-progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #ff9d3d, #ff5a3d);
  transition: width 0.4s ease;
}

.streak-leaderboard-details {
  width: 100%; box-sizing: border-box; text-align: left;
  display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
}
.streak-leaderboard-details summary {
  cursor: pointer; font-size: 12px; color: var(--text); padding: 4px 0;
  list-style: none; flex-shrink: 0;
}
.streak-leaderboard-details summary::-webkit-details-marker { display: none; }
.streak-leaderboard-list {
  /* Wächst mit, wenn die Kachel größer gezogen wird (mehr sichtbare
     Plätze), statt nur Leerraum in der Kachel zu lassen - min-height als
     Untergrenze für kleine Kacheln. */
  flex: 1 1 auto; min-height: 90px; max-height: 100%; overflow-y: auto;
  font-size: 11.5px; margin-top: 4px; display: flex; flex-direction: column; gap: 3px;
}
.streak-leaderboard-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 3px 6px; border-radius: 5px; background: var(--bg);
}
.streak-leaderboard-row.self { background: rgba(255, 122, 61, 0.15); }
.streak-leaderboard-rank { color: var(--muted); width: 20px; flex: none; }
.streak-leaderboard-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.streak-leaderboard-count { flex: none; font-weight: 600; }

/* ============================================================
   SAMMELHEFT (Tagesbeleidigung)
   ============================================================ */
.insult-collection-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.insult-collection-row .ghost-btn { font-size: 11px; padding: 4px 8px; flex-shrink: 0; }
#insult-collection-body {
  margin-top: 8px; max-height: 220px; overflow-y: auto; text-align: left;
}
/* Eine Sektion pro Seltenheit, mit ganz leichtem Farbschimmer im
   Hintergrund - nur zur Orientierung beim Scrollen (welche Seltenheit
   gerade im Blick ist), bewusst sehr transparent gehalten statt kräftig
   eingefärbt. Gleiche Farbfamilie wie RARITY_DOT_COLORS in app.js. */
.insult-collection-section {
  border-radius: 6px; padding: 6px 6px 4px; margin: 6px 0;
}
.insult-collection-section:first-child { margin-top: 0; }
.insult-collection-section.rarity-section-common { background: rgba(143, 132, 119, 0.06); }
.insult-collection-section.rarity-section-uncommon { background: rgba(122, 155, 118, 0.07); }
.insult-collection-section.rarity-section-rare { background: rgba(111, 143, 176, 0.08); }
.insult-collection-section.rarity-section-epic { background: rgba(155, 111, 176, 0.09); }
.insult-collection-section.rarity-section-legendary { background: rgba(212, 164, 69, 0.12); }

.insult-collection-rarity-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin: 2px 0 4px; font-weight: 700;
}
.insult-collection-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px;
}
.insult-collection-item {
  font-size: 11px; padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.insult-collection-item.unlocked { color: var(--text); }
.insult-collection-item.locked { color: var(--muted); opacity: 0.5; }
.insult-collection-item.rarity-legendary.unlocked { color: var(--gold); font-weight: 700; }

/* ============================================================
   RUNNER-HAUPTMENÜ
   ============================================================ */
#runner-menu {
  position: absolute; inset: 0; z-index: 20; display: none;
  flex-direction: row; align-items: center; justify-content: center; gap: 34px;
  background: rgba(16, 13, 11, 0.92);
}
#runner-menu.visible { display: flex; }
#runner-menu-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
#runner-menu-title {
  font-size: 28px; font-weight: 800; color: var(--gold);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
#runner-menu-start-btn { width: 220px; padding: 12px; font-size: 15px; }
#runner-menu-settings {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; background: var(--panel-2);
}
.runner-menu-setting-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer;
}
#runner-menu-skins-btn { width: 220px; padding: 12px; font-size: 15px; }

/* Kleine Hässlon-Vorschau rechts neben dem Hauptmenü (zeigt den aktuell
   ausgerüsteten Skin, siehe renderRunnerMenuPreview in app.js). Auf sehr
   schmalen/kurzen Fenstern ausgeblendet, damit das Menü nicht überläuft -
   dort bleibt einfach die reine Menü-Spalte wie bisher. */
#runner-menu-preview-wrap {
  width: 120px; height: 120px; border-radius: 14px; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.25);
}
#runner-menu-preview-canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 620px), (max-height: 480px) {
  #runner-menu-preview-wrap { display: none; }
}

/* ============================================================
   SKIN-/COSMETIC-GARDEROBE ("Rette Hässlon")
   ============================================================
   Eigenständige Vollbild-Ansicht über dem Spiel (wie Menü/Pause/Gameover),
   bewusst ruhig & "tavernig" gehalten statt wie ein Mobile-Shop. */
#runner-skins-view {
  position: absolute; inset: 0; z-index: 1504; display: none;
  flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 14px; padding: 18px 14px 14px; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 20%, rgba(212,164,69,0.08), transparent 60%),
              rgba(16, 13, 11, 0.96);
}
#runner-skins-view.visible { display: flex; }

#runner-skins-header {
  width: 100%; max-width: 460px; display: grid;
  grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  flex-shrink: 0;
}
#runner-skins-header .ghost-btn { padding: 5px 10px; font-size: 11.5px; }
#runner-skins-title {
  text-align: center; font-size: 19px; font-weight: 800; color: var(--gold);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
#runner-skins-header-spacer { width: 1px; }

#runner-skins-body {
  width: 100%; max-width: 460px; display: flex; flex-direction: column;
  align-items: center; gap: 14px; flex-shrink: 0;
}

.skin-slot-row {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
/* Fahrzeuge-Kategorie vorerst ausgeblendet (Daten/Architektur bleiben erhalten,
   damit die Sektion später ohne weitere Arbeit wieder aktiviert werden kann). */
.skin-slot-row[data-category="vehicle"] {
  display: none;
}
.skin-slot-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted);
}
.skin-slot-nav {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.skin-arrow {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--gold);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.skin-arrow:hover { border-color: var(--gold); }
.skin-arrow:active { transform: scale(0.92); }
.skin-arrow:disabled { opacity: 0.3; cursor: default; transform: none; border-color: var(--line); }
.skin-slot-name {
  flex: 1; min-width: 0; text-align: center; font-size: 13.5px; font-weight: 700;
  color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 4px;
}
.skin-slot-name.locked { color: var(--muted); }
.skin-slot-name.equipped { color: var(--gold); }

#runner-skin-preview-wrap {
  position: relative; width: 300px; height: 300px; margin: 2px 0;
  border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 28px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
#runner-skin-preview-canvas { width: 100%; height: 100%; }
#runner-skin-preview-canvas.fade { animation: skin-preview-fade 0.22s ease; }
@keyframes skin-preview-fade {
  0% { opacity: 0.15; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
#runner-skin-lock-badge {
  position: absolute; top: 8px; right: 8px; font-size: 20px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}
#runner-skin-equipped-badge {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(16,13,11,0.8); border: 1px solid var(--gold); color: var(--gold);
  font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  animation: skin-equip-pop 0.3s ease;
}
@keyframes skin-equip-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(4px) scale(0.9); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

#runner-skin-info {
  width: 100%; max-width: 460px; display: flex; flex-direction: column;
  align-items: center; gap: 5px; text-align: center; padding-top: 2px;
}
#runner-skin-info-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
#runner-skin-info-desc { font-size: 11.5px; color: var(--muted); min-height: 14px; }
#runner-skin-info-unlock {
  font-size: 11px; color: var(--gold); font-style: italic; max-width: 320px;
}
#runner-skin-info-progress { width: 220px; margin-top: 2px; }
#runner-skin-progress-label { font-size: 10px; color: var(--muted); text-align: center; margin-top: 3px; }
#runner-skin-equip-btn { width: 200px; padding: 9px; font-size: 13px; margin-top: 4px; }
#runner-skin-equip-btn.is-equipped { background: var(--panel-2); color: var(--gold); border: 1px solid var(--gold); cursor: default; }
#runner-skin-equip-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* "Neues Cosmetic freigeschaltet"-Hinweis - eigenständiges kleines Toast,
   dezent, kein Feuerwerk. WICHTIG: display ist standardmäßig "none" und
   wird NUR über die .visible-Klasse auf "flex" gesetzt (nicht über das
   "hidden"-Attribut) - eine frühere Version setzte hier versehentlich
   unconditional "display:flex", wodurch der Bereich das native
   [hidden]-Verhalten überstimmt hat und dauerhaft sichtbar blieb. */
#runner-skin-notify {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  z-index: 1503; display: none; align-items: center; gap: 12px;
  background: rgba(16,13,11,0.94); border: 1px solid var(--gold); border-radius: 14px;
  padding: 10px 14px; font-size: 12px; color: var(--text); max-width: 92%;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
#runner-skin-notify.visible { display: flex; animation: skin-notify-slide 0.3s ease; }
@keyframes skin-notify-slide {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#runner-skin-notify-icon { font-size: 24px; flex-shrink: 0; }
#runner-skin-notify-body { min-width: 0; }
#runner-skin-notify-title {
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px; color: var(--gold);
}
#runner-skin-notify-text { font-size: 13px; font-weight: 700; color: var(--text); }
#runner-skin-notify-achievement { font-size: 11px; color: var(--muted); margin-top: 2px; max-width: 220px; }
#runner-skin-notify-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
#runner-skin-notify-actions .panel-btn,
#runner-skin-notify-actions .ghost-btn { padding: 5px 12px; font-size: 11px; white-space: nowrap; }

/* ---- Mehrfach-Freischaltung (2+ Cosmetics in einem Run, Abschnitt 10/11) */
#runner-multiunlock-modal {
  position: absolute; inset: 0; z-index: 1600; display: none;
  align-items: center; justify-content: center;
  background: rgba(10, 8, 7, 0.88); padding: 16px;
}
#runner-multiunlock-modal.visible { display: flex; }
#runner-multiunlock-overview, #runner-multiunlock-detail {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--gold); border-radius: 16px;
  padding: 22px 20px; max-width: 92vw; box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}
#runner-multiunlock-title {
  font-size: 18px; font-weight: 800; color: var(--gold); text-align: center;
}
#runner-multiunlock-cards {
  display: flex; gap: 12px; max-width: min(560px, 88vw); overflow-x: auto;
  padding: 4px 2px 8px;
}
.multiunlock-card {
  flex-shrink: 0; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 6px; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease;
}
.multiunlock-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.multiunlock-card-canvas { width: 70px; height: 70px; }
.multiunlock-card-name { font-size: 11px; font-weight: 700; color: var(--text); text-align: center; }
#runner-multiunlock-detail-canvas { width: 150px; height: 150px; }
#runner-multiunlock-detail-name { font-size: 16px; font-weight: 800; color: var(--gold); text-align: center; }
#runner-multiunlock-detail-desc { font-size: 12px; color: var(--text); text-align: center; max-width: 260px; }
#runner-multiunlock-detail-unlock { font-size: 11px; color: var(--muted); text-align: center; max-width: 260px; }
#runner-multiunlock-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

#runner-skin-admin-panel {
  width: 100%; max-width: 460px; margin-top: 4px; padding: 8px;
  border-radius: 6px; background: var(--panel-2); border: 1px dashed var(--line);
}

/* "COSMETIC AUSRICHTEN" - Admin-Live-Kalibrierung (X/Y/Scale/Rotation) */
#runner-skin-align-panel { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.skin-align-row {
  display: grid; grid-template-columns: 52px 1fr 56px; align-items: center;
  gap: 8px; margin-bottom: 6px; font-size: 11px; color: var(--muted);
}
.skin-align-row input[type="range"] { width: 100%; accent-color: var(--gold); }
.skin-align-row input[type="number"] {
  width: 56px; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 4px; padding: 3px 4px; font-size: 11px;
}
#skin-align-output {
  width: 100%; margin-top: 8px; height: 100px; resize: vertical;
  background: var(--bg); border: 1px solid var(--gold); color: var(--text);
  border-radius: 6px; padding: 8px; font-family: monospace; font-size: 11px;
}

/* Kleinere Fenster: Vorschau nie winzig werden lassen, Pfeile bleiben
   gut klickbar - nur Abstände/Schriftgrößen werden kompakter. */
@media (max-width: 480px), (max-height: 480px) {
  #runner-skins-view { gap: 5px; padding: 6px 8px; }
  #runner-skin-preview-wrap { width: 140px; height: 140px; }
  #runner-skins-title { font-size: 14px; }
  .skin-arrow { width: 30px; height: 30px; font-size: 14px; }
  #runner-skin-info-desc { min-height: 0; }
}

/* ============================================================
   PFLASTER-SYSTEM (Community-Sammelziel, "Rette Hässlon")
   ============================================================ */
.runner-timer-row {
  font-size: 11px; color: var(--muted); margin-top: 2px;
}
.runner-patch-row {
  font-size: 11px; color: var(--muted); margin-top: 2px;
}
.runner-insult-mode-row {
  font-size: 11px; color: var(--gold); margin-top: 2px; font-weight: 700;
}

/* Community-Vorrats-Anzeige oberhalb des Spiels, in der Kachel */
#patch-pool-widget {
  width: 100%; margin: 8px 0; padding: 8px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
}
#patch-pool-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-bottom: 5px; text-align: center;
}
.patch-bar-track {
  width: 100%; height: 10px; border-radius: 5px; background: var(--bg);
  border: 1px solid var(--line); overflow: hidden;
}
.patch-bar-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #7a5a20, var(--gold));
  transition: width 0.7s ease-out; border-radius: 5px;
}
#patch-pool-count { font-size: 12px; color: var(--gold); font-weight: 700; text-align: center; margin-top: 4px; }
#patch-pool-hint { font-size: 10px; color: var(--muted); text-align: center; margin-top: 2px; font-style: italic; }

/* Game-Over: Pflaster-Ergebnis + animierter Community-Balken */
#runner-go-patches { font-size: 13px; color: var(--text); margin-top: 4px; }
#runner-go-community-bar-wrap { width: 80%; margin: 8px auto 0; }
#runner-go-community-label { font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }

/* Admin-Testwerkzeuge fürs Pflastersystem */
#patch-admin-panel {
  width: 100%; margin-top: 8px; padding: 8px; border-radius: 6px;
  background: var(--panel-2); border: 1px dashed var(--line);
}
.patch-admin-title { font-size: 10px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; }
.patch-admin-row { display: flex; gap: 6px; margin-bottom: 6px; }
.patch-admin-row:last-child { margin-bottom: 0; }
.patch-admin-row input {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 4px 6px; font-size: 11px;
}
.patch-admin-row .ghost-btn { font-size: 10.5px; padding: 4px 8px; flex: 1; }

/* ============================================================
   ERWÄHNUNGEN-POPUP (frei verschiebbar, unabhängig vom Kachel-Raster)
   ============================================================ */
#mentions-popup {
  position: fixed; z-index: 900; width: 320px; max-height: 420px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5); display: flex; flex-direction: column;
  overflow: hidden;
}
#mentions-popup[hidden] { display: none; }
#mentions-popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  cursor: grab; user-select: none; flex-shrink: 0;
}
#mentions-popup-header:active { cursor: grabbing; }
#mentions-popup-title { font-weight: 700; color: var(--gold); font-size: 13px; }
#mentions-popup-close-btn {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px;
  padding: 4px 8px; line-height: 1; border-radius: 4px;
}
#mentions-popup-close-btn:hover { color: var(--red); background: rgba(184, 64, 47, 0.15); }
#mentions-popup-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
#mentions-popup-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; background: var(--panel-2);
  border-top: 1px solid var(--line); flex-shrink: 0;
}
.mentions-popup-tab {
  background: var(--bg); border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: 3px 8px; font-size: 11px; cursor: pointer; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mentions-popup-tab.active { color: var(--gold); border-color: var(--gold); }
.mentions-popup-tab.unread {
  color: var(--gold); animation: mentions-tab-blink 1s ease-in-out infinite;
}
@keyframes mentions-tab-blink {
  0%, 100% { border-color: var(--line); }
  50% { border-color: var(--gold); box-shadow: 0 0 6px rgba(212, 164, 69, 0.6); }
}

.preset-actions button.active-toggle { color: var(--gold); border-color: var(--gold); }

.preset-sponsor-check {
  display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted);
  cursor: pointer; padding: 0 4px;
}
.preset-sponsor-check input { cursor: pointer; margin: 0; }

/* ── Umfragen (v0.44.45) ─────────────────────────────────────────────────── */
.poll-body { padding: 10px 12px 12px; }
.poll-close-btn { font-size: 14px; }
.poll-card { padding: 4px 0 10px; }
.poll-card + .poll-card { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.poll-title { color: var(--gold); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.poll-question { font-size: 13px; color: var(--text); white-space: pre-wrap; word-wrap: break-word; margin-bottom: 6px; }
.poll-extra { font-size: 12px; color: var(--muted); white-space: pre-wrap; word-wrap: break-word; margin-bottom: 6px; }
.poll-img { display: block; max-width: 100%; max-height: 220px; border-radius: 6px; margin: 4px 0 8px; background: var(--panel-2); }
.poll-mode-hint { font-size: 10.5px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.poll-options { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.poll-option { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--panel-2); cursor: pointer; font-size: 13px; }
.poll-option:hover { outline: 1px solid var(--line); }
.poll-option input { margin: 0; flex-shrink: 0; }
.poll-option span { flex: 1; min-width: 0; word-wrap: break-word; }
.poll-option-img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--panel); }
.poll-vote-btn { width: 100%; margin-top: 2px; }
.poll-msg { font-size: 12px; margin-top: 6px; color: var(--muted); }
.poll-msg[data-kind="error"] { color: #ff8a70; }
.poll-foot { font-size: 11px; color: var(--muted); margin-top: 8px; }
.poll-results { display: flex; flex-direction: column; gap: 7px; }
.poll-result-row { display: grid; grid-template-columns: 1fr; gap: 3px; }
.poll-result-label { font-size: 13px; color: var(--text); word-wrap: break-word; }
.poll-result-mine .poll-result-label { color: var(--gold); }
.poll-result-bar { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.poll-result-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #c98a22); border-radius: 5px; transition: width 0.4s ease; min-width: 0; }
.poll-result-meta { font-size: 11px; color: var(--muted); }
.poll-participants { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-weight: 700; }
/* Admin */
#admin-polls-section textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; font-family: inherit; margin-bottom: 6px; resize: vertical; }
.poll-images-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.poll-img-thumb { position: relative; }
.poll-img-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }
.poll-img-thumb button { position: absolute; top: -6px; right: -6px; padding: 0 5px; font-size: 10px; }
.poll-upload-label { display: inline-block; cursor: pointer; }
.poll-option-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.poll-option-row input[type=text] { flex: 1; margin-bottom: 0; }
.poll-option-row label { cursor: pointer; white-space: nowrap; }
.poll-admin-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.poll-admin-msg { font-size: 12px; margin-top: 6px; color: var(--muted); }
.poll-admin-msg[data-kind="error"] { color: #ff8a70; }
.poll-admin-msg[data-kind="ok"] { color: #86cf78; }
.poll-admin-row { display: block; }
.poll-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.poll-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; padding: 2px 6px; border-radius: 4px; background: var(--panel); color: var(--muted); flex-shrink: 0; }
.poll-status-active { color: #86cf78; } .poll-status-scheduled { color: var(--gold); } .poll-status-ended { color: #ff8a70; }
.poll-admin-meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.poll-admin-row .poll-results { margin: 6px 0 8px; }
.poll-publish-form { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; gap: 4px; }
.poll-publish-form input[type=datetime-local], .poll-publish-form select { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 3px 6px; font-family: inherit; font-size: 12px; }
.danger-btn { color: #ff8a70; }
