/* =============================================================================
 * Higher Lower (hl) — gemeinsames Stylesheet für Host, Teilnehmer und Bühne.
 *
 * Bildsprache angelehnt an klassische „Higher or Lower"-Streams: Raster-Fläche,
 * horizontale Achse mit Strichen + Positionsnummern, „Niedrig"/„Hoch" an den
 * Enden, quadratische Bildkarten mit Rahmen und Versal-Beschriftung darunter.
 *
 * One UI (Phase 7, 2026-09-21): nur das Schema. Farben, Ecken und Schatten kommen aus
 * den --ou-*-Tokens (Rot = Aktion, Blau = Vorgabe und Werte, Gelb = wartet/Joker/Sieg,
 * Grün = richtig, Rot = falsch und Herzen). Alle Maße, Schriftgrößen, Abstände, Zeiten
 * und Animationen sind unverändert (Schutzliste 2.1, Geometrie in test:ui gemessen).
 *
 *   .hlb-*   Board (Zeitstrahl + Auswahlbereich)       .hlp-*   Spieler-Kacheln
 *   .hl-p-*  Teilnehmer-Ansicht    .hl-s-*  Bühne     .hl-h-*  Host-Cockpit
 *   .hl-flash / .hl-notice  Rückmeldungen   (Baukasten-Editor: host.css, Verwaltung)
 * ========================================================================== */

:root,
[data-ou-theme] {
  --hl-val: var(--ou-info-ink);
  --hl-grid: color-mix(in srgb, var(--ou-text) 5%, transparent);
  --hl-board: var(--ou-field-bg);
  --hl-veil: color-mix(in srgb, var(--ou-black) 62%, transparent);
}

/* -----------------------------------------------------------------------------
 * Board
 * -------------------------------------------------------------------------- */
.hlb {
  --hl-gap: 12px;
  --hl-gapbtn: 34px;
  --hl-card: 110px;
  --hl-card-min: 56px;
  --hl-card-max: 128px;
  --hl-pool-card: 104px;
  --hl-tick-h: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 20px;
  border: 1px solid var(--ou-line);
  border-radius: var(--ou-radius);
  background-color: var(--hl-board);
  background-image:
    linear-gradient(to right, var(--hl-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hl-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  user-select: none;
  -webkit-user-select: none;
}

/* Achse: Linie über die volle Breite, Enden links/rechts */
.hlb-rail {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 14px;
  align-items: start;
}
.hlb-rail::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--hl-tick-h) - 6px);
  height: 2px;
  border-radius: 2px;
  background: var(--ou-line-strong);
}
.hlb-end {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: calc(var(--hl-tick-h) - 14px);
  min-width: 3.5rem;
}
.hlb-end.is-l { align-items: flex-start; }
.hlb-end.is-r { align-items: flex-end; }
.hlb-end-label {
  padding: 0 8px;
  line-height: 16px;
  background: var(--hl-board);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ou-muted);
  white-space: nowrap;
}
.hlb-end.is-l .hlb-end-label { padding-left: 0; }
.hlb-end.is-r .hlb-end-label { padding-right: 0; }
.hlb-end-val {
  font-family: var(--ou-font-body);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--hl-val);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hlb-scroll { position: relative; min-width: 0; padding-bottom: 6px; }
.hlb-scroll.is-overflow { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.hlb-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--hl-gap);
  width: max-content;
  min-height: calc(var(--hl-tick-h) + var(--hl-card) + 44px);
  margin: 0 auto;
  padding: 0 4px;
}

/* Slot = Strich + Karte (wandert als Ganzes, FLIP braucht origin oben links) */
.hlb-slot {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--hl-card);
  transform-origin: 0 0;
  outline: none;
}
.hlb-slot:focus-visible .hlb-img { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-primary) 45%, transparent); }
.hlb-tick {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: var(--hl-tick-h);
  width: 100%;
}
.hlb-tick-num {
  font-family: var(--ou-font-body);
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  color: var(--ou-primary-ink);
  font-variant-numeric: tabular-nums;
}
.hlb-tick-mark {
  margin-top: 4px;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: var(--ou-muted);
}
.hlb-pool .hlb-tick { display: none; }

.hlb-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
  transition: transform var(--ou-dur) var(--ou-ease);
}
.hlb-pool .hlb-card { margin-top: 0; }
.hlb-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--ou-radius);
  border: 2px solid var(--ou-line-strong);
  background: var(--ou-surface);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: none;
  transition: border-color var(--ou-dur) var(--ou-ease), box-shadow var(--ou-dur) var(--ou-ease);
}
.hlb-img img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.hlb-mono {
  font-family: var(--ou-font-display);
  font-weight: 400;
  font-size: calc(var(--hl-card) * 0.34);
  letter-spacing: -0.02em;
  color: var(--ou-muted);
}
.hlb-cap { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.hlb-label {
  max-width: 100%;
  font-size: clamp(9.5px, calc(var(--hl-card) * 0.11), 13px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ou-text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Wert: nackte Zahl (Einheit steht an der Achse). Lange Zahlen schrumpfen mit der
   Kartenbreite (--val-len setzt der Renderer), nichts ragt über die Karte hinaus. */
.hlb-val {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--ou-font-body);
  font-size: clamp(8px, min(calc(var(--hl-card) * 0.17), calc(var(--hl-card) * 1.55 / var(--val-len, 6))), 15px);
  line-height: 1.3;
  font-weight: 700;
  color: var(--hl-val);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hlb-val:empty { display: none; }
.hlb-val[data-kind="host"] { color: var(--ou-faint); font-weight: 600; }
.hlb-val[data-kind="known"] { color: var(--ou-yellow-ink); }
.hlb-val svg { width: 1em; height: 1em; vertical-align: -0.14em; margin-right: 2px; }
.hlb-end-unit {
  max-width: 10rem;
  font-size: .6875rem;
  line-height: 1.25;
  color: var(--ou-faint);
  text-align: right;
}
.hlb-flag {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 1px 7px;
  border-radius: var(--ou-radius-sm);
  font-size: 9px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ou-on-primary);
  background: var(--ou-primary);
  box-shadow: none;
}
.hlb-flag[hidden] { display: none; }

/* Varianten */
.hlb-slot.v-anchor .hlb-img { border-color: var(--ou-info); border-width: 3px; }
.hlb-slot.v-anchor .hlb-flag { background: var(--ou-info); color: var(--ou-black); }
.hlb-slot.v-anchor .hlb-tick-mark { width: 3px; height: 16px; margin-top: 1px; background: var(--ou-info); }
.hlb-slot.v-anchor .hlb-tick-num { color: var(--ou-info-ink); }
.hlb-slot.v-fixed .hlb-img { border-color: var(--ou-primary); }
.hlb-slot.v-new .hlb-img { border-color: var(--ou-success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ou-success) 16%, transparent); }
.hlb-slot.v-new .hlb-flag { background: var(--ou-success); color: var(--ou-black); }
.hlb-slot.v-pending .hlb-img { border-style: dashed; border-color: var(--ou-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ou-primary) 14%, transparent), var(--ou-drop); }
.hlb-slot.v-pending .hlb-card { transform: translateY(-4px); }
.hlb-slot.v-submitted .hlb-img { border-color: var(--ou-yellow); animation: hl-await 1.6s var(--ou-ease) infinite; }
.hlb-slot.v-submitted .hlb-flag { background: var(--ou-yellow); color: var(--ou-black); }
.hlb-slot.v-tentative .hlb-img { border-style: dashed; border-color: var(--ou-faint); box-shadow: none; opacity: .82; }
.hlb-slot.v-tentative .hlb-flag { background: var(--ou-surface); color: var(--ou-muted); border: 1px solid var(--ou-line-strong); }
.hlb-slot.v-wrong .hlb-img { border-color: var(--ou-danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ou-danger) 14%, transparent); }
.hlb-slot.v-wrong .hlb-card { animation: hl-shake .5s var(--ou-ease) .15s both; }
.hlb-slot.v-wrong .hlb-flag { background: var(--ou-danger); color: var(--ou-black); }
.hlb-slot.v-auto .hlb-img { border-color: var(--ou-yellow); }
.hlb-slot.v-auto-new .hlb-img { border-color: var(--ou-yellow); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ou-yellow) 22%, transparent); }
.hlb-slot.v-pick .hlb-img { border-color: var(--ou-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-yellow) 25%, transparent); }
.hlb-slot.v-pick-on .hlb-img { border-color: var(--ou-yellow); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ou-yellow) 38%, transparent), var(--ou-drop); }
.hlb-slot.v-pick-on .hlb-card { transform: translateY(-6px); }
.hlb-slot.is-selected .hlb-card { transform: translateY(-8px); }
.hlb-slot.is-selected .hlb-img { border-color: var(--ou-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ou-primary) 14%, transparent), var(--ou-drop); }

.hlb-slot.can-drag { cursor: grab; touch-action: none; }
.hlb-slot.can-tap { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .hlb-slot.can-drag:hover .hlb-card,
  .hlb-slot.can-tap:hover .hlb-card { transform: translateY(-3px); }
  .hlb-slot.can-drag:hover .hlb-img,
  .hlb-slot.can-tap:hover .hlb-img { box-shadow: var(--ou-drop); }
}
.hlb.is-dragging, .hlb.is-dragging .hlb-slot { cursor: grabbing; }
.hlb-slot.hlb-dragging { display: none !important; }
.hlb-slot.hlb-lifted { visibility: hidden; }

/* Platzhalter beim Ziehen */
.hlb-ph .hlb-img { border: 2px dashed var(--ou-primary); background: color-mix(in srgb, var(--ou-primary) 14%, transparent); box-shadow: none; }
.hlb-ph .hlb-tick-mark { background: var(--ou-primary); height: 16px; margin-top: 1px; }

/* „Geist" unter dem Finger/Mauszeiger */
.hlb.hlb-ghostlayer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
}
.hlb-ghost { position: absolute; left: 0; top: 0; width: var(--hl-card); }
.hlb-ghost .hlb-tick { display: none; }
.hlb-ghost .hlb-card { margin-top: 0; transform: rotate(-3deg) scale(1.06); }
.hlb-ghost .hlb-img { border-color: var(--ou-primary); box-shadow: 0 22px 44px rgba(0, 0, 0, .28); }

/* Lücken-Buttons („auswählen → Position antippen") */
.hlb-gap {
  position: relative;
  flex: none;
  width: var(--hl-gapbtn);
  align-self: stretch;
  display: flex;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--ou-radius);
  background: transparent;
  color: var(--ou-on-primary);
  align-items: flex-start;
  cursor: pointer;
}
.hlb-gap::after {
  content: '';
  position: absolute;
  top: calc(var(--hl-tick-h) + 16px);
  bottom: 30px;
  left: 50%;
  border-left: 2px dashed color-mix(in srgb, var(--ou-primary) 45%, transparent);
}
.hlb-gap-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: calc(var(--hl-tick-h) - 18px);
  border-radius: 50%;
  background: var(--ou-primary);
  box-shadow: 0 0 0 4px var(--hl-board);
  animation: hl-gap-in .28s var(--ou-ease) both;
}
.hlb-gap-dot svg { width: 14px; height: 14px; }
.hlb-gap:hover .hlb-gap-dot, .hlb-gap:focus-visible .hlb-gap-dot { transform: scale(1.12); }
.hlb-gap-text { display: none; }

/* Auswahlbereich */
.hlb-poolbox {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--ou-line-strong);
  border-radius: 0 0 var(--ou-radius) var(--ou-radius);
  transition: background var(--ou-dur) var(--ou-ease);
}
.hlb-poolbox[hidden] { display: none; }
.hlb-poolbox.is-over { background: color-mix(in srgb, var(--ou-primary) 14%, transparent); }
.hlb-poolhead {
  margin-bottom: 12px;
  text-align: center;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ou-muted);
}
.hlb-poolhead[hidden] { display: none; }
.hlb-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 14px var(--hl-gap);
  min-height: 40px;
}
.hlb-pool .hlb-slot { --hl-card: var(--hl-pool-card); }
.hlb-poolempty { text-align: center; color: var(--ou-faint); font-size: .8125rem; padding: 6px 0 2px; }
.hlb-poolempty[hidden] { display: none; }

@keyframes hl-await {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-yellow) 18%, transparent); }
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ou-yellow) 30%, transparent), var(--ou-drop); }
}
@keyframes hl-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@keyframes hl-gap-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 719px) {
  .hlb {
    --hl-gap: 10px;
    --hl-card-min: 66px;
    --hl-pool-card: 74px;
    --hl-tick-h: 28px;
    padding: 14px 12px 16px;
  }
  .hlb-rail { column-gap: 8px; }
  .hlb-end { min-width: 0; }
  .hlb-end-val { font-size: .6875rem; }
}

/* -----------------------------------------------------------------------------
 * Senkrechter Zeitstrahl (schmale Boards: Handy, Tablet hochkant)
 * Oben das eine Achsen-Ende, unten das andere; jede Karte ist eine Zeile über die
 * volle Breite mit Positionsnummer auf der Achse, Bild, Name und Wert. Kein
 * seitliches Scrollen — beim Ziehen scrollt die Seite selbst mit.
 * -------------------------------------------------------------------------- */
.hlb.is-vertical { --hl-tick-w: 36px; }
.hlb.is-vertical .hlb-rail { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
.hlb.is-vertical .hlb-rail::before {
  left: calc(var(--hl-tick-w) / 2 - 1px);
  right: auto;
  top: 6px;
  bottom: 6px;
  width: 2px;
  height: auto;
}
.hlb.is-vertical .hlb-end {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0;
  min-width: 0;
  padding-left: calc(var(--hl-tick-w) + 8px);
}
.hlb.is-vertical .hlb-end.is-r { align-items: baseline; }
.hlb.is-vertical .hlb-end-label { padding: 0; background: none; }
.hlb.is-vertical .hlb-end-val { font-size: .8125rem; }
.hlb.is-vertical .hlb-end-unit { max-width: none; text-align: left; }
.hlb.is-vertical .hlb-scroll { overflow: visible; padding: 0; }
/* Beim Einordnen fährt die breite Zeile kurz von der Kachel-Position heran: am Brettrand abschneiden,
   damit die Seite am Handy nie breiter als der Bildschirm wird (sonst wackelt oder zoomt sie). */
.hlb.is-vertical { overflow-x: clip; }
.hlb.is-vertical .hlb-row {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}
.hlb.is-vertical .hlb-row .hlb-slot { flex-direction: row; align-items: center; width: 100%; }
.hlb.is-vertical .hlb-row .hlb-tick {
  position: relative;
  z-index: 1;
  flex: none;
  width: var(--hl-tick-w);
  height: auto;
  justify-content: center;
}
.hlb.is-vertical .hlb-row .hlb-tick-num {
  min-width: 22px;
  padding: 3px 0;
  border-radius: var(--ou-radius-sm);
  background: var(--hl-board);
  text-align: center;
  font-size: 12px;
}
.hlb.is-vertical .hlb-row .hlb-tick-mark { display: none; }
.hlb.is-vertical .hlb-row .hlb-card {
  flex: 1;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 6px 12px 6px 6px;
  border-radius: var(--ou-radius);
  border: 1px solid var(--ou-line);
  background: var(--ou-surface);
  box-shadow: none;
}
.hlb.is-vertical .hlb-row .hlb-img { flex: none; width: 54px; border-radius: var(--ou-radius); box-shadow: none; }
.hlb.is-vertical .hlb-row .hlb-mono { font-size: 19px; }
.hlb.is-vertical .hlb-row .hlb-cap {
  flex: 1;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}
.hlb.is-vertical .hlb-row .hlb-label { font-size: 13px; letter-spacing: .03em; }
.hlb.is-vertical .hlb-row .hlb-val { flex: none; max-width: 45%; font-size: 15px; }
.hlb.is-vertical .hlb-row .hlb-flag { left: 4px; top: -7px; transform: none; }
.hlb.is-vertical .hlb-row .v-anchor .hlb-card { border-color: var(--ou-info); }
.hlb.is-vertical .hlb-row .v-fixed .hlb-card { border-color: color-mix(in srgb, var(--ou-primary) 45%, transparent); }
.hlb.is-vertical .hlb-row .v-new .hlb-card { border-color: var(--ou-success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-success) 16%, transparent); }
.hlb.is-vertical .hlb-row .v-pending .hlb-card { border: 2px dashed var(--ou-primary); transform: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-primary) 14%, transparent); }
.hlb.is-vertical .hlb-row .v-submitted .hlb-card { border-color: var(--ou-yellow); }
.hlb.is-vertical .hlb-row .v-tentative .hlb-card { border: 2px dashed var(--ou-faint); box-shadow: none; }
.hlb.is-vertical .hlb-row .v-wrong .hlb-card { border-color: var(--ou-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-danger) 14%, transparent); }
.hlb.is-vertical .hlb-row .v-auto .hlb-card,
.hlb.is-vertical .hlb-row .v-auto-new .hlb-card { border-color: var(--ou-yellow); }
.hlb.is-vertical .hlb-row .v-pick-on .hlb-card { transform: none; border-color: var(--ou-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-yellow) 30%, transparent); }
.hlb.is-vertical .hlb-row .is-selected .hlb-card { transform: none; border-color: var(--ou-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ou-primary) 14%, transparent); }
.hlb.is-vertical .hlb-row .hlb-ph .hlb-card { min-height: 68px; border: 2px dashed var(--ou-primary); background: color-mix(in srgb, var(--ou-primary) 14%, transparent); box-shadow: none; }
.hlb.is-vertical .hlb-row .hlb-ph .hlb-img { border: 0; background: none; }
/* Lücken als volle Zeilen: groß genug zum Antippen */
.hlb.is-vertical .hlb-gap {
  width: 100%;
  height: 34px;
  align-self: stretch;
  align-items: center;
  justify-content: flex-start;
  padding-left: calc(var(--hl-tick-w) / 2 - 13px);
}
.hlb.is-vertical .hlb-gap::after {
  top: 50%;
  bottom: auto;
  left: calc(var(--hl-tick-w) + 4px);
  right: 6px;
  border-left: 0;
  border-top: 2px dashed color-mix(in srgb, var(--ou-primary) 45%, transparent);
}
.hlb.is-vertical .hlb-gap-dot { margin: 0; }
.hlb.is-vertical .hlb-gap-text {
  display: inline;
  position: relative;
  z-index: 1;
  margin-left: 14px;
  padding: 0 8px;
  background: var(--hl-board);
  color: var(--ou-primary-ink);
  font-size: .75rem;
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
 * Spieler-Kacheln
 * -------------------------------------------------------------------------- */
.hlp { display: flex; flex-wrap: wrap; gap: 10px; }
.hlp-tile {
  position: relative;
  overflow: hidden;
  flex: 1 1 170px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 11px;
  border-radius: var(--ou-radius);
  border: 2px solid var(--ou-line);
  background: var(--ou-surface);
  transition: border-color var(--ou-dur) var(--ou-ease), box-shadow var(--ou-dur) var(--ou-ease);
}
.hlp-tile.is-me { background: var(--ou-surface); }
.hlp-tile.is-active { border-color: var(--ou-success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ou-success) 16%, transparent); }
.hlp-tile.is-winner { border-color: var(--ou-yellow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ou-yellow) 20%, transparent); }
.hlp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.hlp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hlp-tile.is-me .hlp-name::after { content: ' (du)'; font-weight: 500; color: var(--ou-muted); }
.hlp-status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: var(--ou-radius-sm);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ou-success-ink);
  background: color-mix(in srgb, var(--ou-success) 16%, transparent);
}
.hlp-tile.is-winner .hlp-status { color: var(--ou-yellow-ink); background: color-mix(in srgb, var(--ou-yellow) 16%, transparent); }
.hlp-status svg { width: 12px; height: 12px; }
.hlp-hearts { display: flex; flex-wrap: wrap; gap: 3px; }
.hl-heart { width: 20px; height: 20px; fill: none; stroke: var(--ou-danger); stroke-width: 2; stroke-linejoin: round; }
.hl-heart.is-full { fill: var(--ou-danger); }
.hl-heart.is-lost { animation: hl-heart-lost .7s var(--ou-ease) both; }
.hl-heart.is-gained { animation: hl-heart-gained .5s var(--ou-ease) both; }
.hlp-foot { display: flex; align-items: center; gap: 8px; min-height: 18px; font-size: .6875rem; color: var(--ou-muted); }
.hlp-joker { display: inline-flex; align-items: center; gap: 4px; color: var(--ou-yellow-ink); font-weight: 600; }
.hlp-joker.is-used { color: var(--ou-faint); text-decoration: line-through; }
.hlp-joker svg { width: 13px; height: 13px; }
.hlp-offline { color: var(--ou-faint); }
.hlp-tile.is-out > .hlp-head,
.hlp-tile.is-out > .hlp-hearts,
.hlp-tile.is-out > .hlp-foot { filter: grayscale(1); opacity: .6; }
.hlp-outveil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--hl-veil);
  pointer-events: none;
  animation: hl-veil-in .45s var(--ou-ease) both;
}
.hlp-outveil span {
  padding: 3px 12px;
  border-radius: var(--ou-radius-sm);
  border: 1px solid rgba(255, 255, 255, .28);
  color: var(--ou-cream);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.hlp-admin { position: relative; z-index: 2; display: flex; gap: 6px; margin-top: 2px; }
.hlp-adm-btn {
  flex: 1;
  gap: 4px;
  padding: 5px 8px;
  border-radius: var(--ou-radius);
  border: 1px solid var(--ou-line-strong);
  background: var(--ou-surface);
  font-size: .75rem;
}
.hlp-adm-btn .hl-heart { width: 14px; height: 14px; }
.hlp-adm-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ou-primary) 45%, transparent); }
.hlp.is-compact { gap: 8px; }
.hlp.is-compact .hlp-tile { flex: 1 1 150px; max-width: 240px; padding: 8px 10px; gap: 4px; }
.hlp.is-compact .hl-heart { width: 16px; height: 16px; }

@keyframes hl-heart-lost {
  0% { transform: scale(1); fill: var(--ou-danger); }
  35% { transform: scale(1.35); fill: var(--ou-danger); }
  100% { transform: scale(1); fill: transparent; }
}
@keyframes hl-heart-gained { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes hl-veil-in { from { opacity: 0; } to { opacity: 1; } }

/* -----------------------------------------------------------------------------
 * Aufleuchten + Hinweise
 * -------------------------------------------------------------------------- */
.hl-flash { position: fixed; inset: 0; z-index: 95; pointer-events: none; display: grid; justify-items: center; align-items: start; }
.hl-flash::before {
  content: '';
  position: absolute;
  inset: 0;
  animation: hl-flash 0.9s var(--ou-ease) both;
}
.hl-flash.is-ok::before { background: radial-gradient(ellipse at center, transparent 40%, color-mix(in srgb, var(--ou-success) 22%, transparent)); box-shadow: inset 0 0 0 8px var(--ou-success); }
.hl-flash.is-bad::before { background: radial-gradient(ellipse at center, transparent 40%, color-mix(in srgb, var(--ou-danger) 22%, transparent)); box-shadow: inset 0 0 0 8px var(--ou-danger); }
.hl-flash-pill {
  position: relative;
  margin-top: 18vh;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--ou-radius-sm);
  background: var(--ou-surface);
  border: 2px solid currentColor;
  box-shadow: var(--ou-drop);
  animation: hl-pill 1.7s var(--ou-ease) both;
}
.hl-flash.is-ok .hl-flash-pill { color: var(--ou-success-ink); }
.hl-flash.is-bad .hl-flash-pill { color: var(--ou-danger-ink); }
.hl-flash-pill svg { width: 22px; height: 22px; }
.hl-flash-pill b { font-size: clamp(1.1rem, 2.2vw, 1.6rem); letter-spacing: .04em; text-transform: uppercase; }
.hl-flash-pill span { color: var(--ou-muted); font-size: .8125rem; font-weight: 600; }
.hl-notice {
  position: fixed;
  left: 50%;
  top: 16px;
  z-index: 94;
  max-width: min(92vw, 520px);
  padding: 10px 18px;
  border-radius: var(--ou-radius-sm);
  background: var(--ou-surface);
  border: 1px solid var(--ou-line-strong);
  box-shadow: var(--ou-drop);
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
  animation: hl-notice 3.2s var(--ou-ease) both;
}
@keyframes hl-flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hl-pill {
  0% { opacity: 0; transform: translateY(-10px) scale(.96); }
  12% { opacity: 1; transform: none; }
  82% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes hl-notice {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  8%, 88% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* -----------------------------------------------------------------------------
 * Gemeinsame Kopf-/Status-Bausteine
 * -------------------------------------------------------------------------- */
.hl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 .75rem/1.35 var(--ou-font-body);
  letter-spacing: var(--ou-label-tracking);
  text-transform: uppercase;
  color: var(--ou-primary-ink);
}
.hl-kicker svg { width: 16px; height: 16px; }
.hl-title { margin: 2px 0 0; font-family: var(--ou-font-display); font-weight: 400; font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.hl-desc { margin: 4px 0 0; color: var(--ou-muted); max-width: 70ch; }
.hl-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  padding: 10px 14px;
  border-radius: var(--ou-radius);
  border: 1px solid var(--ou-line);
  background: var(--ou-surface);
  font-weight: 600;
}
.hl-status .icon svg, .hl-status > svg { width: 18px; height: 18px; }
.hl-status.is-you { border-color: var(--ou-success); background: color-mix(in srgb, var(--ou-success) 16%, transparent); color: var(--ou-text); }
.hl-status.is-wait { border-color: color-mix(in srgb, var(--ou-yellow) 50%, transparent); background: color-mix(in srgb, var(--ou-yellow) 10%, transparent); }
.hl-status.is-done { border-color: color-mix(in srgb, var(--ou-yellow) 55%, transparent); background: color-mix(in srgb, var(--ou-yellow) 12%, transparent); }
.hl-status-sub { font-weight: 400; color: var(--ou-muted); font-size: .8125rem; }
.hl-status > div, .hl-status > :only-child { grid-column: 1 / -1; }
.hl-status > .hl-status-sub, .hl-status > .hl-h-preview { grid-column: 2; justify-self: start; }
.hl-status:empty { display: none; }
.hl-rules { margin: 0; padding-left: 1.1em; color: var(--ou-muted); display: grid; gap: 4px; }
.hl-winners { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--ou-font-display); font-weight: 400; font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.hl-winners svg { width: 1em; height: 1em; color: var(--ou-yellow-ink); }

/* -----------------------------------------------------------------------------
 * Teilnehmer-Ansicht
 * -------------------------------------------------------------------------- */
.hl-p { display: flex; flex-direction: column; gap: 14px; padding-bottom: 84px; }
.hl-p-head { display: flex; flex-direction: column; gap: 2px; }
.hl-p-actions {
  position: sticky;
  bottom: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: var(--ou-radius);
  border: 1px solid var(--ou-line-strong);
  background: var(--ou-surface);
  box-shadow: var(--ou-drop);
}
.hl-p-actions .hl-grow { flex: 1; min-width: 8rem; color: var(--ou-muted); font-size: .8125rem; }
.hl-p-actions .btn-primary { min-width: 11rem; }
.hl-joker-btn { color: var(--ou-yellow-ink); border-color: color-mix(in srgb, var(--ou-yellow) 45%, transparent); }
.hl-joker-btn:hover:not(:disabled) { border-color: var(--ou-yellow); }
.hl-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.hl-confirm p { margin: 0; flex: 1; min-width: 12rem; }
@media (max-width: 719px) {
  .hl-p-actions { bottom: 8px; padding: 8px; gap: 8px; flex-wrap: nowrap; }
  .hl-p-actions:has(.btn-primary) .hl-grow { display: none; }
  .hl-p-actions .btn-primary { flex: 1; min-width: 0; padding: 12px 14px; }
  .hl-p-actions .hl-grow { font-size: .75rem; min-width: 0; }
  .hl-confirm { flex-wrap: wrap; }
  .hl-confirm p { flex-basis: 100%; min-width: 0; font-size: .8125rem; }
}
.hl-p .hl-intro-grid { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .hl-p .hl-intro-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); align-items: start; }
}

/* -----------------------------------------------------------------------------
 * Bühne
 * -------------------------------------------------------------------------- */
#phaseHigherLower.phase { max-width: none; }
.hl-s { display: flex; flex-direction: column; gap: clamp(12px, 1.6vw, 22px); width: 100%; }
.hl-s-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hl-s-brand { font-family: var(--ou-font-display); font-size: clamp(1.9rem, 3.6vw, 3.25rem); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: .95; }
.hl-s-brand em { font-style: normal; color: var(--ou-primary-ink); }
.hl-s-cat { font-family: var(--ou-font-display); font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1; letter-spacing: .01em; text-transform: uppercase; color: var(--ou-text); }
.hl-s-desc { color: var(--ou-muted); font-size: clamp(.95rem, 1.2vw, 1.15rem); }
.hl-s .hl-status { font-size: clamp(1rem, 1.5vw, 1.35rem); padding: 12px 18px; }
.hl-s .hlb {
  --hl-card-min: 60px;
  --hl-card-max: 176px;
  --hl-pool-card: clamp(96px, 8vw, 150px);
  --hl-tick-h: 34px;
  padding: clamp(16px, 2vw, 28px);
}
.hl-s .hlb-tick-num { font-size: 13px; }
.hl-s .hlb-end-label { font-size: .8125rem; }
.hl-s .hlb-end-val { font-size: 1.125rem; }
.hl-s .hlp { justify-content: center; gap: 14px; }
.hl-s .hlp-tile { flex: 0 1 250px; max-width: 250px; padding: 12px 16px; }
.hl-s .hl-heart { width: 24px; height: 24px; }
.hl-s .hlp-name { font-size: 1.1rem; }

/* -----------------------------------------------------------------------------
 * Host-Cockpit
 * -------------------------------------------------------------------------- */
.hl-h { display: flex; flex-direction: column; gap: 16px; }
.hl-h-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hl-h-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.hl-h-head h2 .icon { color: var(--ou-primary-ink); }
.hl-h-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hl-h-pill { padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--ou-primary) 55%, transparent); border-radius: var(--ou-radius-sm); color: var(--ou-primary-ink); font: 600 .75rem/1.35 var(--ou-font-body); letter-spacing: .08em; text-transform: uppercase; }
.hl-h-pill.is-muted { border-color: var(--ou-line-strong); color: var(--ou-muted); }
.hl-h-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hl-h-actions .hl-h-end { margin-left: auto; }
.hl-h-preview { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--ou-radius-sm); font-size: .8125rem; font-weight: 700; }
.hl-h-preview.is-ok { color: var(--ou-success-ink); background: color-mix(in srgb, var(--ou-success) 16%, transparent); }
.hl-h-preview.is-bad { color: var(--ou-danger-ink); background: color-mix(in srgb, var(--ou-danger) 14%, transparent); }
.hl-h-preview svg { width: 14px; height: 14px; }
.hl-h .hlb { --hl-card-max: 112px; --hl-pool-card: 86px; }
.hl-h-grid { display: grid; gap: 16px; }
@media (min-width: 1200px) {
  .hl-h-grid { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .hl-h-grid .hlp-tile { flex-basis: 100%; max-width: none; }
}
.hl-h-side { display: flex; flex-direction: column; gap: 10px; }
.hl-h-side h3 { margin: 0; font-size: .8125rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ou-muted); font-family: var(--ou-font-body); font-weight: 700; }

/* Setup */
.hl-setup { display: flex; flex-direction: column; gap: 16px; }
.hl-setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hl-setup-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px;
  text-align: left;
  font-weight: 400;
  border-radius: var(--ou-radius);
  border: 2px solid var(--ou-line);
  background: color-mix(in srgb, var(--ou-text) 3%, transparent);
}
.hl-setup-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ou-primary) 45%, transparent); }
.hl-setup-card.is-on { border-color: var(--ou-primary); background: color-mix(in srgb, var(--ou-primary) 14%, transparent); }
.hl-setup-card:disabled { opacity: .5; }
.hl-setup-title { font-family: var(--ou-font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.05; text-transform: uppercase; }
.hl-setup-desc { color: var(--ou-muted); font-size: .8125rem; }
.hl-setup-meta { color: var(--ou-faint); font-size: .75rem; }
.hl-setup-thumbs { display: flex; gap: 6px; }
.hl-setup-thumbs img { width: 38px; height: 38px; object-fit: cover; border-radius: var(--ou-radius-sm); border: 1px solid var(--ou-line); }
.hl-setup-label { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ou-muted); margin: 0; }
.hl-part-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.hl-part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border-radius: var(--ou-radius-sm);
  border: 1px solid var(--ou-line-strong);
  background: var(--ou-surface);
  color: var(--ou-text);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.hl-part input { accent-color: var(--ou-primary); }
.hl-part.is-off { color: var(--ou-faint); background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .hlb-slot.v-submitted .hlb-img, .hlb-slot.v-wrong .hlb-card, .hl-heart.is-lost, .hl-heart.is-gained,
  .hlb-gap-dot, .hlp-outveil { animation: none; }
  .hl-flash-pill, .hl-notice { animation-duration: 2s; }
}
.hl-p-actions[hidden], .hl-h-actions[hidden] { display: none; }
.hl-status > .hl-winners + .hl-status-sub { grid-column: 1 / -1; }
