/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --accent: #ff2d55;
  --accent-2: #ff375f;
  --green: #34c759;
  --red: #ff3b30;
  --orange: #ff9500;
  --gold: #ffcc00;

  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --cell: #ffffff;
  --cell-pressed: #e5e5ea;
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.6);
  --label-3: rgba(60, 60, 67, 0.3);
  --separator: rgba(60, 60, 67, 0.29);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.2);
  --bar: rgba(249, 249, 249, 0.78);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --seg-on: #ffffff;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff375f;
    --green: #30d158;
    --red: #ff453a;
    --orange: #ff9f0a;
    --gold: #ffd60a;
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --cell: #1c1c1e;
    --cell-pressed: #2c2c2e;
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.6);
    --label-3: rgba(235, 235, 245, 0.3);
    --separator: rgba(84, 84, 88, 0.6);
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.32);
    --bar: rgba(22, 22, 24, 0.78);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --seg-on: #636366;
  }
}

/* ───────────────────────── Base ───────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.29;
  letter-spacing: -0.41px;
  color: var(--label);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
input { font: inherit; letter-spacing: inherit; user-select: text; -webkit-user-select: text; }
[hidden] { display: none !important; }
svg.i { width: 1em; height: 1em; display: block; flex: none; }

#app { position: fixed; inset: 0; overflow: hidden; isolation: isolate; z-index: 0; } /* eigene Ebene: 3D-Karten bleiben unter Dialogen */

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-bottom: calc(32px + var(--safe-bottom));
}
.screen.enter-push { animation: pushIn 0.5s var(--ease) backwards; }
.screen.leave-push { animation: pushOut 0.5s var(--ease) both; }
.screen.enter-pop { animation: popIn 0.5s var(--ease) backwards; }
.screen.leave-pop { animation: popOut 0.5s var(--ease) both; z-index: 2; }
.screen.enter-fade { animation: fadeIn 0.45s var(--ease) backwards; }
.screen.leave-fade { animation: fadeOut 0.3s ease both; }
@keyframes pushIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pushOut { to { transform: translateX(-28%); filter: brightness(0.85); } }
@keyframes popIn { from { transform: translateX(-28%); filter: brightness(0.85); } to { transform: none; } }
@keyframes popOut { to { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(1.02); } }
@keyframes fadeOut { to { opacity: 0; } }

/* ───────────────────────── Navigation Bar ───────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: calc(44px + var(--safe-top));
  padding: var(--safe-top) 8px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  transition: background 0.2s, box-shadow 0.2s;
}
.navbar.scrolled {
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0.5px 0 var(--separator);
}
.navbar .small-title {
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.navbar.scrolled .small-title { opacity: 1; }
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--accent);
  height: 44px;
  padding: 0 8px;
  font-size: 17px;
}
.nav-btn .i { font-size: 22px; }
.nav-btn:active { opacity: 0.4; }
.navbar .right { justify-self: end; display: flex; }

.large-title {
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: 0.37px;
  margin: 2px 16px 8px;
}
.subtitle { color: var(--label-2); font-size: 15px; margin: -6px 16px 16px; letter-spacing: -0.24px; }

/* ───────────────────────── Inset Grouped Lists ───────────────────────── */
.section { margin: 0 16px 35px; }
.section-header {
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.08px;
  text-transform: uppercase;
  color: var(--label-2);
  padding: 0 16px 7px;
}
.section-header.big { font-size: 22px; line-height: 28px; font-weight: 700; text-transform: none; color: var(--label); padding: 0 4px 10px; letter-spacing: 0.35px; }
.section-footer { font-size: 13px; line-height: 18px; color: var(--label-2); padding: 7px 16px 0; letter-spacing: -0.08px; }

.list { background: var(--cell); border-radius: 12px; overflow: hidden; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  width: 100%;
  text-align: left;
  background: var(--cell);
  transition: background 0.2s;
}
button.row:active, .row.tappable:active { background: var(--cell-pressed); transition: none; }
.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: var(--sep-inset, 16px);
  height: 0.5px;
  background: var(--separator);
}
.row.has-icon { --sep-inset: 60px; }
.row .body { flex: 1; min-width: 0; padding: 11px 0; }
.row .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .detail { font-size: 15px; color: var(--label-2); letter-spacing: -0.24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .value { color: var(--label-2); }
.row .chev { color: var(--label-3); font-size: 14px; }
.row .check { color: var(--accent); font-size: 20px; opacity: 0; transform: scale(0.6); transition: 0.25s var(--spring); }
.row.checked .check { opacity: 1; transform: none; }
.row.destructive { color: var(--red); }
.row.tint { color: var(--accent); }

.icon-tile {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  flex: none;
}

.row input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--label);
  height: 44px;
  padding: 0;
}
.row input::placeholder { color: var(--label-3); }
.minus-btn {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none;
}
.minus-btn:disabled { opacity: 0.3; }
.plus-btn {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 14px; flex: none;
  background: var(--c, var(--accent));
  letter-spacing: 0;
}

/* Stepper */
.stepper { display: flex; background: var(--fill); border-radius: 8px; overflow: hidden; flex: none; }
.stepper button { width: 46px; height: 32px; display: grid; place-items: center; font-size: 16px; }
.stepper button:active { background: var(--fill-2); }
.stepper button:disabled { opacity: 0.3; }
.stepper .sep { width: 0.5px; background: var(--separator); margin: 8px 0; }

/* Switch */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 16px; background: var(--fill-2);
  transition: background 0.25s;
}
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s var(--spring);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 50px; border-radius: 14px;
  font-size: 17px; font-weight: 600;
  background: var(--accent); color: #fff;
  transition: transform 0.2s var(--ease), opacity 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); opacity: 0.85; }
.btn:disabled { opacity: 0.35; transform: none; }
.btn .i { font-size: 20px; }
.btn.secondary { background: var(--fill); color: var(--accent); }
.btn.glass { background: rgba(255, 255, 255, 0.14); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.btn.white { background: #fff; color: #000; }
.btn.small { height: 36px; border-radius: 18px; font-size: 15px; width: auto; padding: 0 16px; }

.screen.with-bar { display: flex; flex-direction: column; padding-bottom: 0; }
.screen.with-bar > * { flex: none; }
.bottom-bar {
  margin-top: auto !important;
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -0.5px 0 var(--separator);
  z-index: 5;
}

/* ───────────────────────── Home ───────────────────────── */
.hero {
  position: relative;
  margin: 8px 16px 28px;
  border-radius: 22px;
  overflow: hidden;
  padding: 22px 20px 20px;
  color: #fff;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(120% 90% at 100% 0%, #ff9f0a 0%, transparent 55%),
    radial-gradient(90% 80% at 0% 100%, #5e5ce6 0%, transparent 60%),
    linear-gradient(140deg, #ff2d55, #bf1f6b 60%, #3a0f5c);
  box-shadow: 0 18px 40px -12px rgba(255, 45, 85, 0.55);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='.12'/></svg>");
  mix-blend-mode: overlay; pointer-events: none;
}
.hero .hero-vinyl {
  position: absolute; right: -58px; top: -58px; width: 230px; height: 230px;
  animation: spin 14s linear infinite;
  opacity: 0.95;
}
.hero h2 { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.5px; position: relative; z-index: 1; max-width: 70%; }
.hero p { margin: 6px 0 16px; opacity: 0.85; font-size: 15px; position: relative; z-index: 1; max-width: 75%; letter-spacing: -0.24px; }
.hero .btn { position: relative; z-index: 1; }

.resume-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px;
  background: var(--cell); width: 100%; text-align: left;
}
.resume-card:active { background: var(--cell-pressed); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 28px; height: 28px; font-size: 12px; box-shadow: 0 0 0 2px var(--cell); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; flex: none; box-shadow: 0 2px 6px rgba(255, 45, 85, 0.35); }

/* Trinkspiel-Karte auf dem Startbildschirm */
.drink-card {
  display: flex; align-items: center; gap: 14px; width: calc(100% - 32px); margin: -12px 16px 28px; padding: 14px 16px;
  border-radius: 20px; text-align: left; color: #fff; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 214, 10, 0.55), transparent 60%),
    linear-gradient(135deg, #ff9f0a, #d9480f 70%, #7a1f0a);
  box-shadow: 0 14px 30px -12px rgba(255, 140, 0, 0.6);
  transition: transform 0.2s var(--ease);
}
.drink-card:active { transform: scale(0.98); }
.drink-card .drink-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; background: rgba(255, 255, 255, 0.22); flex: none; }
.drink-card .body { flex: 1; min-width: 0; }
.drink-card .dt { font-size: 19px; font-weight: 800; letter-spacing: -0.2px; }
.drink-card .dd { font-size: 14px; opacity: 0.88; letter-spacing: -0.15px; }
.drink-card .age { font-family: var(--font-rounded); font-size: 12px; font-weight: 800; padding: 3px 7px; border-radius: 7px; background: rgba(0, 0, 0, 0.22); }
.drink-card .chev { opacity: 0.7; font-size: 14px; }

/* Segmented Control */
.row.col { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 11px; padding-bottom: 12px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--fill); border-radius: 9px; padding: 2px; }
.segmented button { height: 30px; border-radius: 7px; font-size: 14px; font-weight: 500; letter-spacing: -0.1px; transition: background 0.2s, box-shadow 0.2s; }
.segmented button.on { background: var(--seg-on); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); font-weight: 600; }
.btn.amber { background: linear-gradient(135deg, #ff9f0a, #e8590c); }

/* Song list in category */
.year-pill {
  font-family: var(--font-rounded); font-weight: 700; font-size: 15px;
  min-width: 52px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; background: hsl(var(--h) 75% 50%); flex: none; letter-spacing: 0;
}

.prose { padding: 0 16px 16px; font-size: 16px; line-height: 1.45; letter-spacing: -0.3px; }
.prose p { margin: 0 0 10px; }
.prose b { font-weight: 600; }

/* ───────────────────────── Game (immersive) ───────────────────────── */
.game {
  --tint: #ff375f;
  background: #07070b;
  color: #fff;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  color-scheme: dark;
}
.game-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.game-bg::before, .game-bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
  transition: background 1s;
}
.game-bg::before { width: 90vmax; height: 90vmax; left: -40vmax; top: -45vmax; background: var(--tint); animation: drift1 18s ease-in-out infinite alternate; }
.game-bg::after { width: 70vmax; height: 70vmax; right: -35vmax; bottom: -30vmax; background: #5e5ce6; opacity: 0.35; animation: drift2 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12vmax, 8vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-10vmax, -6vmax) scale(0.9); } }

.game > *:not(.game-bg) { position: relative; z-index: 1; flex-shrink: 0; }

.game-top {
  padding: calc(var(--safe-top) + 6px) 12px 0;
  display: flex; align-items: center; gap: 8px;
}
.circle-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-size: 16px; flex: none; color: #fff;
  transition: transform 0.2s var(--ease);
}
.circle-btn:active { transform: scale(0.9); }

.scoreboard { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.scoreboard::-webkit-scrollbar { display: none; }
.score-chip {
  display: flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 10px 0 4px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px; font-weight: 600; letter-spacing: -0.08px;
  transition: background 0.3s, box-shadow 0.3s;
}
.score-chip .avatar { width: 28px; height: 28px; font-size: 12px; }
.score-chip.active { background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 1.5px var(--c); }
.score-chip .n { font-family: var(--font-rounded); font-weight: 700; }
.score-chip .t { display: inline-flex; align-items: center; gap: 2px; color: var(--gold); font-family: var(--font-rounded); }

.token {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd60a 45%, #c99400);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
}
.token.lg { width: 16px; height: 16px; }
.token.empty { background: rgba(255, 255, 255, 0.15); box-shadow: none; }

.turn-head { padding: 18px 20px 0; text-align: center; }
.turn-head .kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.turn-head h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.4px; }
.turn-head h1 .name { color: var(--tint); filter: brightness(1.25) saturate(1.1); }
.turn-head .tokens { display: inline-flex; gap: 4px; margin-top: 8px; }

.stage { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 0 10px; }

/* Vinyl */
.player { position: relative; width: min(64vw, 272px, 34vh); aspect-ratio: 1; }
.player svg.ring { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); transform: rotate(-90deg); }
.ring .track { stroke: rgba(255, 255, 255, 0.12); }
.ring .bar { stroke: var(--tint); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; filter: drop-shadow(0 0 6px var(--tint)); }
.vinyl {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(255,255,255,0.06) 31.5% 32%, transparent 32.5%),
    conic-gradient(from 30deg, rgba(255,255,255,0.0), rgba(255,255,255,0.14) 10%, rgba(255,255,255,0) 20%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.12) 60%, rgba(255,255,255,0) 70%),
    repeating-radial-gradient(circle, #111 0 1.5px, #1b1b1f 1.5px 3px);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation: spin 2.2s linear infinite;
  animation-play-state: paused;
}
.player.playing .vinyl { animation-play-state: running; }
.vinyl .label {
  position: absolute; inset: 32%; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35), transparent 50%), linear-gradient(135deg, var(--tint), #5e5ce6);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.3);
}
.vinyl .label::after { content: ""; position: absolute; inset: 44%; border-radius: 50%; background: #07070b; }
.play-btn {
  position: absolute; inset: 32%; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 34px; z-index: 2;
  transition: transform 0.25s var(--ease);
}
.play-btn .i { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.play-btn:active { transform: scale(0.88); }
.play-btn .spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.player-controls { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 15px; font-weight: 500;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.pill-btn:active { transform: scale(0.94); }
.pill-btn:disabled { opacity: 0.35; }
.pill-btn .i { font-size: 16px; }
.time { font-family: var(--font-rounded); font-variant-numeric: tabular-nums; font-size: 13px; color: rgba(255,255,255,0.6); min-width: 36px; text-align: center; }

/* Timeline */
.tl-wrap { padding: 0 0 6px; }
.tl-label { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 10px; font-size: 13px; color: rgba(255,255,255,0.65); font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }
.tl-label .count { font-family: var(--font-rounded); text-transform: none; letter-spacing: 0; }
.timeline {
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 6px 20px 14px;
  scroll-padding: 0 40px;
}
.timeline::-webkit-scrollbar { display: none; }
.timeline > :first-child { margin-left: auto; }
.timeline > :last-child { margin-right: auto; }
.tl-card {
  --h: 330;
  flex: none; width: 92px; height: 124px; border-radius: 16px;
  padding: 10px 9px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, hsl(var(--h) 85% 58%), hsl(calc(var(--h) + 35) 75% 38%));
  box-shadow: 0 10px 24px -10px hsl(var(--h) 80% 40% / 0.8), inset 0 1px 0 rgba(255,255,255,0.25);
  scroll-snap-align: center;
  position: relative;
  overflow: hidden;
}
.tl-card::before {
  content: ""; position: absolute; width: 90px; height: 90px; right: -34px; top: -34px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(0,0,0,0.12) 0 1px, transparent 1px 3px);
}
.tl-card .y { font-family: var(--font-rounded); font-weight: 800; font-size: 27px; letter-spacing: -0.5px; line-height: 1; position: relative; }
.tl-card .t { font-size: 11px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: -0.1px; }
.tl-card .a { font-size: 10.5px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; letter-spacing: -0.1px; }
.tl-card.new { animation: cardIn 0.7s var(--spring) both; box-shadow: 0 0 0 2px #fff, 0 10px 30px -6px hsl(var(--h) 90% 55% / 0.9); }
@keyframes cardIn { from { transform: translateY(-40px) scale(0.6) rotate(-8deg); opacity: 0; } }

.gap {
  flex: none; width: 26px; height: 124px; display: grid; place-items: center; position: relative;
  transition: width 0.4s var(--spring);
}
.gap .slot {
  display: grid; place-items: center; line-height: 1;
  width: 4px; height: 56px; border-radius: 2px; background: rgba(255, 255, 255, 0.18);
  transition: all 0.4s var(--spring);
}
.gap.interactive .slot { width: 18px; height: 110px; border-radius: 9px; background: transparent; border: 1.5px dashed rgba(255, 255, 255, 0.28); display: grid; place-items: center; color: rgba(255,255,255,0.55); font-size: 12px; }
.gap.interactive:active .slot { background: rgba(255,255,255,0.1); }
.gap.selected { width: 108px; }
.gap.selected .slot {
  width: 92px; height: 124px; border-radius: 16px; border: 0; color: #fff; font-size: 40px; font-weight: 800; font-family: var(--font-rounded);
  background: linear-gradient(160deg, var(--tint), #5e5ce6);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 30px -2px var(--tint);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 44px 4px var(--tint); } }
.gap.claimed { width: 44px; }
.gap.claimed .slot {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85), 0 4px 14px rgba(0,0,0,0.4);
}
.gap.claimed.editing .slot { font-size: 15px; animation: pulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 2px #fff, 0 0 18px var(--c); }
.gap.edge-hint .slot::after { content: attr(data-hint); }

.game-bottom { padding: 8px 16px calc(12px + var(--safe-bottom)); }
/* Aktionsknopf bleibt immer sichtbar, Inhalt scrollt darunter durch */
.game #g-bottom {
  position: sticky; bottom: 0; z-index: 5; margin-top: auto;
  padding-top: 22px;
  background: linear-gradient(to top, rgba(7, 7, 11, 0.94) 55%, rgba(7, 7, 11, 0));
}
.hint { text-align: center; font-size: 14px; color: rgba(255,255,255,0.6); margin: 0 20px 10px; min-height: 18px; letter-spacing: -0.15px; }

/* Challenge */
.challenge-box {
  margin: 0 16px; padding: 16px; border-radius: 20px;
  background: rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.12);
  text-align: center;
}
.challenge-box h2 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: 0.5px; font-family: var(--font-rounded); background: linear-gradient(90deg, #ffd60a, #ff375f, #bf5af2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.challenge-box p { margin: 4px 0 12px; font-size: 14px; color: rgba(255,255,255,0.7); letter-spacing: -0.15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 4px; border-radius: 18px;
  background: rgba(255,255,255,0.1); font-size: 15px; font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}
.chip .avatar { width: 28px; height: 28px; font-size: 12px; }
.chip:active { transform: scale(0.94); }
.chip.on { background: rgba(255,255,255,0.22); box-shadow: inset 0 0 0 1.5px var(--c); }
.chip.done { background: var(--c); }
.chip .x { font-size: 11px; opacity: 0.8; margin-left: 2px; }
.chip:disabled { opacity: 0.35; }

.mini-disc { width: 64px; height: 64px; position: relative; flex: none; }
.mini-disc .vinyl { animation-duration: 2.2s; }

/* Reveal flip card */
.flip { width: min(60vw, 240px, 27vh); aspect-ratio: 1; perspective: 1200px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flip 1.1s var(--ease) 0.15s both; }
@keyframes flip { from { transform: rotateY(180deg) scale(0.85); } 60% { transform: rotateY(-8deg) scale(1.04); } to { transform: none; } }
.flip-face { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.flip-back { transform: rotateY(180deg); background: linear-gradient(160deg, var(--tint), #5e5ce6); display: grid; place-items: center; font-size: 80px; font-weight: 800; font-family: var(--font-rounded); }
.flip-front { background: #222 center/cover no-repeat; box-shadow: 0 30px 60px -18px rgba(0,0,0,0.9); }
.flip-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.75)); }
.flip-front .year {
  position: absolute; left: 16px; bottom: 12px; z-index: 1;
  font-family: var(--font-rounded); font-size: 56px; font-weight: 900; letter-spacing: -1.5px; line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.song-meta { text-align: center; margin-top: 14px; padding: 0 24px; animation: rise 0.6s var(--ease) 0.9s both; }
.song-meta .st { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.2; }
.song-meta .sa { font-size: 17px; color: rgba(255,255,255,0.7); margin-top: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.result {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; height: 40px; padding: 0 18px; border-radius: 20px;
  font-weight: 700; font-size: 17px; animation: pop 0.6s var(--spring) 1s both;
}
.result.ok { background: rgba(48, 209, 88, 0.2); color: #4be27a; box-shadow: inset 0 0 0 1px rgba(48,209,88,0.4); }
.result.bad { background: rgba(255, 69, 58, 0.18); color: #ff6961; box-shadow: inset 0 0 0 1px rgba(255,69,58,0.4); }
.result.steal { background: rgba(255, 214, 10, 0.18); color: #ffd60a; box-shadow: inset 0 0 0 1px rgba(255,214,10,0.4); }
.result .i { font-size: 18px; }
@keyframes pop { from { opacity: 0; transform: scale(0.5); } }

.bonus-row {
  display: flex; align-items: center; gap: 12px; margin: 0 16px 10px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.1);
  text-align: left; animation: rise 0.5s var(--ease) 1.1s both;
}
.bonus-row .body { flex: 1; min-width: 0; }
.bonus-row .ttl { font-size: 15px; font-weight: 600; }
.bonus-row .sub { font-size: 13px; color: rgba(255,255,255,0.6); }

/* Spielende: letzte Runde & Stechen */
.endgame-banner {
  display: flex; width: fit-content; align-items: center; gap: 8px; margin: 10px auto 0; padding: 7px 14px; border-radius: 16px; max-width: calc(100% - 32px);
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.22), rgba(255, 159, 10, 0.18)); color: #ffd60a;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 10, 0.45); font-size: 13px; line-height: 1.3; text-align: left; letter-spacing: -0.1px;
  animation: pop 0.5s var(--spring) both;
}
.endgame-banner .i { font-size: 16px; flex: none; }
.endgame-banner b { font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; }
.endgame-banner.tiebreak { background: linear-gradient(135deg, rgba(255, 55, 95, 0.25), rgba(191, 90, 242, 0.22)); color: #ff8fab; box-shadow: inset 0 0 0 1px rgba(255, 55, 95, 0.5); }
.score-chip.out { opacity: 0.38; }

/* Trinkspiel im Spiel */
.no-anim, .no-anim * { animation: none !important; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 26px; padding: 0 11px; border-radius: 13px; background: rgba(255, 159, 10, 0.18); color: #ffc15a; font-size: 13px; font-weight: 600; }
.mode-pill .i { font-size: 14px; }
.score-chip .t.k, .chip-left { display: inline-flex; align-items: center; gap: 1px; color: #ffd60a; font-family: var(--font-rounded); }
.chip-left { font-size: 13px; opacity: 0.85; }
.score-chip .t.k .i, .chip-left .i { font-size: 12px; }
.konter-left { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 600; color: var(--orange); }
.pill-btn .i + .i, .pill-btn .i:last-child { font-size: 15px; }

.flip.compact { width: min(46vw, 180px, 21vh); }
.flip.compact .year { font-size: 42px; left: 12px; bottom: 10px; }

.flags { display: flex; gap: 8px; justify-content: center; padding: 4px 16px 0; animation: rise 0.5s var(--ease) 1.1s both; }
.flag {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}
.flag:active { transform: scale(0.95); }
.flag .i { font-size: 16px; }
.flag.on { background: rgba(48, 209, 88, 0.22); color: #4be27a; box-shadow: inset 0 0 0 1.5px rgba(48, 209, 88, 0.6); }
.flags-hint { text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.5); margin: 6px 0 10px; animation: rise 0.5s var(--ease) 1.15s both; }

.tally {
  margin: 0 16px 6px; padding: 12px 14px 6px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  animation: rise 0.5s var(--ease) 1.2s both;
}
.tally.quick { animation: pop 0.5s var(--spring) both; }
.tally-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #ffc15a; margin-bottom: 4px; }
.tally-head .i { font-size: 15px; }
.tally-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.tally-row + .tally-row { box-shadow: 0 -0.5px 0 rgba(255, 255, 255, 0.1); }
.tally-row .avatar { width: 28px; height: 28px; font-size: 12px; }
.tally-row .nm { flex: 1; font-weight: 600; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sip { font-family: var(--font-rounded); font-weight: 700; font-size: 14px; height: 28px; padding: 0 11px; border-radius: 14px; display: inline-flex; align-items: center; flex: none; }
.sip.drink { background: rgba(255, 159, 10, 0.2); color: #ffb340; }
.sip.give { background: rgba(10, 132, 255, 0.2); color: #64b5ff; }
.ex-card {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin: 6px 0 4px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.25), rgba(255, 55, 95, 0.25)); box-shadow: inset 0 0 0 1px rgba(255, 214, 10, 0.4);
}
.ex-card .i { font-size: 22px; color: #ffd60a; }
.ex-card b { display: block; font-size: 15px; }
.ex-card span { font-size: 13px; color: rgba(255, 255, 255, 0.75); }

.duel-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 22px; animation: pop 0.6s var(--spring) both; }
.duelist { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; min-width: 90px; }
.duelist .avatar { width: 54px; height: 54px; font-size: 22px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 24px var(--c); }
.duel-vs .vs { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: linear-gradient(145deg, #ffd60a, #ff9f0a); color: #3a1a00; box-shadow: 0 8px 20px -6px #ff9f0a; }
.duel-ask { text-align: center; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.75); margin: 4px 0 10px; }
.duel-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 6px; }
.duel-choice button {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1.5px var(--c); font-weight: 700; font-size: 16px; color: #fff;
  transition: transform 0.2s var(--ease);
}
.duel-choice button:active { transform: scale(0.96); }
.duel-choice button .avatar { width: 28px; height: 28px; font-size: 12px; }
.duel-choice .tie { grid-column: 1 / -1; height: 44px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); font-weight: 600; color: rgba(255, 255, 255, 0.85); }

.final-sip { display: inline-flex; text-align: left; max-width: 100%; align-items: center; gap: 8px; margin: -10px 0 22px; padding: 8px 14px; border-radius: 16px; background: rgba(255, 159, 10, 0.18); color: #ffc15a; font-weight: 600; font-size: 15px; animation: rise 0.6s var(--ease) 0.55s both; }

/* ───────────────────────── Sheet ───────────────────────── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.4);
  animation: fadeIn2 0.35s ease both;
}
.sheet-backdrop.closing { animation: fadeOut 0.3s ease both; }
@keyframes fadeIn2 { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 88vh; overflow-y: auto;
  background: var(--bg);
  border-radius: 14px 14px 0 0;
  padding: 8px 0 calc(20px + var(--safe-bottom));
  animation: sheetUp 0.5s var(--ease) both;
  color: var(--label);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.sheet.closing { animation: sheetDown 0.35s var(--ease) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet .grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 12px; }
.sheet-head h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 0.35px; }
.sheet-close { width: 30px; height: 30px; border-radius: 50%; background: var(--fill); color: var(--label-2); display: grid; place-items: center; font-size: 12px; }

.pgroup + .pgroup { position: relative; }
.pgroup + .pgroup::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 0.5px; background: var(--separator); z-index: 1; }
.mini-tl { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 16px 12px 58px; }
.mini-tl span { font-family: var(--font-rounded); font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: #fff; background: hsl(var(--h) 70% 48%); letter-spacing: 0; }

/* Alert */
.alert-backdrop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn2 0.25s ease both;
}
.alert-backdrop.closing { animation: fadeOut 0.2s ease both; }
.alert-backdrop.closing .alert { animation: alertOut 0.2s ease both; }
.alert {
  width: min(340px, 100%); border-radius: 30px; text-align: center;
  padding: 26px 20px 20px;
  background: var(--bg-elevated);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  animation: alertIn 0.45s var(--spring) both; color: var(--label);
}
@keyframes alertIn { from { transform: scale(0.88) translateY(12px); opacity: 0; } }
@keyframes alertOut { to { transform: scale(0.95); opacity: 0; } }
.alert-icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px;
  display: grid; place-items: center; font-size: 26px; color: #fff;
  background: linear-gradient(145deg, var(--accent), #bf5af2);
  box-shadow: 0 10px 24px -8px var(--accent);
}
.alert-icon.gold { background: linear-gradient(145deg, #ffd60a, #ff9f0a); box-shadow: 0 10px 24px -8px #ff9f0a; }
.alert-icon.red { background: linear-gradient(145deg, #ff6961, #ff3b30); box-shadow: 0 10px 24px -8px #ff3b30; }
.alert h4 { margin: 0 0 6px; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: 0.2px; }
.alert p { margin: 0 4px; font-size: 15px; line-height: 1.4; color: var(--label-2); letter-spacing: -0.2px; }
.alert p b { color: var(--label); font-weight: 600; }
.alert .actions { display: grid; gap: 8px; margin-top: 22px; }
.alert .actions button {
  height: 50px; border-radius: 25px; font-size: 17px; font-weight: 600;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.alert .actions button:active { transform: scale(0.97); opacity: 0.85; }
.alert .actions .primary { background: var(--accent); color: #fff; }
.alert .actions .destructive { background: rgba(255, 59, 48, 0.14); color: var(--red); }
.alert .actions .cancel { background: var(--fill); color: var(--label); font-weight: 500; }

.switch.maxed span { opacity: 0.45; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 10px); z-index: 70;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  padding: 10px 18px; border-radius: 24px;
  background: var(--bar); color: var(--label);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25); font-size: 15px; font-weight: 600;
  animation: toastIn 0.5s var(--spring) both;
}
.toast.out { animation: toastOut 0.3s ease both; }
@keyframes toastIn { from { transform: translate(-50%, -120%); opacity: 0; } }
@keyframes toastOut { to { transform: translate(-50%, -120%); opacity: 0; } }

/* Winner */
.winner { text-align: center; padding: calc(var(--safe-top) + 40px) 20px 0; }
.trophy {
  width: 110px; height: 110px; margin: 0 auto 16px; border-radius: 30px; display: grid; place-items: center; font-size: 58px;
  background: linear-gradient(145deg, #ffd60a, #ff9f0a); color: #fff; box-shadow: 0 20px 50px -10px rgba(255, 159, 10, 0.7);
  animation: pop 0.8s var(--spring) 0.2s both;
}
.winner h1 { margin: 0; font-size: 36px; font-weight: 800; letter-spacing: -0.5px; animation: rise 0.6s var(--ease) 0.4s both; }
.winner p { margin: 6px 0 24px; color: rgba(255,255,255,0.7); animation: rise 0.6s var(--ease) 0.5s both; }
.ranking { margin: 0 16px 20px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,0.08); text-align: left; animation: rise 0.6s var(--ease) 0.6s both; }
.ranking .r { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.ranking .r + .r { box-shadow: 0 -0.5px 0 rgba(255,255,255,0.12); }
.ranking .pos { font-family: var(--font-rounded); font-weight: 800; width: 20px; color: rgba(255,255,255,0.5); }
.ranking .nm { flex: 1; font-weight: 600; }
.ranking .sc { font-family: var(--font-rounded); font-weight: 700; }

canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

.empty-state { text-align: center; color: var(--label-2); padding: 40px 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
