/* =====================================================================
   Migs Arena – Menüs & Screens (App-Shell)
   Dunkles Neon-Arcade-Thema. HUD-Styles liegen in play.css (Präfix mp-).
   ===================================================================== */

:root {
  --bg0: #0d0b1a;
  --bg1: #171433;
  --bg2: #221d4a;
  --cyan: #4fe3ff;
  --cyan-d: #1593b8;
  --pink: #ff4fd8;
  --pink-d: #a8238c;
  --yellow: #ffd23f;
  --orange: #ff9f1c;
  --green: #5dff9e;
  --red: #ff5470;
  --text: #f4f1ff;
  --muted: #a49fcf;
  --glass: rgba(28, 24, 62, 0.72);
  --glass-solid: rgba(28, 24, 62, 0.95);
  --line: rgba(255, 255, 255, 0.09);
  --radius: 22px;
  --tb-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --font: 'Fredoka', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(.2, .9, .25, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #2a2160 0%, var(--bg1) 45%, var(--bg0) 100%) fixed;
  background-color: var(--bg0);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  user-select: none;
  -webkit-user-select: none;
}

/* Spielfläche */
#gameCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
}

/* HUD nur im Spiel sichtbar (Inhalte stylt play.css) */
body:not(.state-playing) #hud {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  touch-action: manipulation;
}

/* Abdunklung über der Attract-Demo */
#backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(13, 11, 26, .25) 0%, rgba(13, 11, 26, .78) 100%),
    linear-gradient(180deg, rgba(13, 11, 26, .55) 0%, rgba(13, 11, 26, .2) 40%, rgba(13, 11, 26, .7) 100%);
}
body.state-menu #backdrop,
body.state-result #backdrop { opacity: 1; }
body.state-result #backdrop { background: rgba(10, 8, 22, .72); }
body.state-menu.on-sub.demo-on #backdrop { background: rgba(10, 8, 22, .7); }
/* Touch-Geräte haben keine Unschärfe → Demo etwas stärker abdunkeln, damit Texte ruhig lesbar bleiben */
@media (pointer: coarse) {
  body.state-menu.demo-on:not(.on-sub) #backdrop {
    background:
      radial-gradient(ellipse 70% 60% at 50% 45%, rgba(13, 11, 26, .5) 0%, rgba(13, 11, 26, .82) 100%),
      linear-gradient(180deg, rgba(13, 11, 26, .6) 0%, rgba(13, 11, 26, .35) 40%, rgba(13, 11, 26, .75) 100%);
  }
}
/* Unschärfe nur auf Desktop (auf Handys zu teuer über der laufenden Demo) */
@media (pointer: fine) {
  body.gfx-high.state-menu #backdrop {
    -webkit-backdrop-filter: blur(3px) saturate(1.15);
    backdrop-filter: blur(3px) saturate(1.15);
  }
}
/* Ohne Demo: animiertes Raster als Hintergrund */
body.state-menu:not(.demo-on) #backdrop {
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(79, 227, 255, .07) 0%, rgba(13, 11, 26, 0) 70%),
    linear-gradient(rgba(79, 227, 255, .06) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(79, 227, 255, .06) 1px, transparent 1px) 0 0 / 34px 34px;
  animation: gridDrift 18s linear infinite;
}
@keyframes gridDrift { to { background-position: 0 0, 0 340px, 340px 0; } }

/* ------------------------------------------------------------------ */
/* Grundbausteine                                                       */
/* ------------------------------------------------------------------ */
#ui button { font-family: inherit; color: inherit; }
#ui a { color: var(--cyan); }
#ui h1, #ui h2, #ui h3 { margin: 0; font-weight: 700; letter-spacing: .01em; }
#ui p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.center { text-align: center; }
[hidden] { display: none !important; }

#ui :focus { outline: none; }
#ui :focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.panel {
  background: var(--glass-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}
@media (pointer: fine) {
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .panel {
      background: var(--glass);
      -webkit-backdrop-filter: blur(16px) saturate(1.3);
      backdrop-filter: blur(16px) saturate(1.3);
    }
    body.gfx-low .panel { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  }
}

/* 3D-Buttons */
.btn {
  --b1: #4b4580;
  --b2: #352f66;
  --bd: #1f1a45;
  --bt: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  padding: 10px 22px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--b1), var(--b2));
  color: var(--bt) !important;
  font: 600 17px/1.1 var(--font);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--bd), 0 10px 22px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .25);
  transition: translate .08s ease, box-shadow .08s ease, filter .15s ease, opacity .2s;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.08); }
.btn:active, .btn.pressed {
  translate: 0 4px;
  box-shadow: 0 2px 0 var(--bd), 0 4px 10px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .2);
}
.btn:disabled, .btn.disabled {
  filter: grayscale(.85) brightness(.75);
  cursor: not-allowed;
  opacity: .7;
}
.btn:disabled:active { translate: none; }

.btn-play { --b1: #ffe066; --b2: #ffad1f; --bd: #b5650a; --bt: #2a1400; }
.btn-cyan { --b1: #7cecff; --b2: #23b6e0; --bd: #0f6f8f; --bt: #04202c; }
.btn-pink { --b1: #ff86e6; --b2: #e632bf; --bd: #8a1673; --bt: #fff; }
.btn-ghost { --b1: #3a3570; --b2: #2b2658; --bd: #17143a; }
.btn-danger { --b1: #ff7a8e; --b2: #e23a55; --bd: #8a1428; --bt: #fff; }

.btn-lg { min-height: 60px; font-size: 22px; padding: 12px 28px; border-radius: 20px; }
.btn-xl { min-height: 84px; font-size: 34px; padding: 14px 34px; border-radius: 26px; }

.btn-play-label { font-weight: 700; letter-spacing: .06em; }
.btn-play-sub { font-size: 14px; font-weight: 600; opacity: .75; letter-spacing: .02em; }

/* Haupt-Button pulsiert */
#btn-play {
  width: min(100%, 440px);
  animation: playPulse 1.8s ease-in-out infinite;
  box-shadow: 0 8px 0 var(--bd), 0 0 0 0 rgba(255, 210, 63, .5), 0 14px 34px rgba(255, 160, 30, .35), inset 0 3px 0 rgba(255, 255, 255, .45);
}
#btn-play:active { translate: 0 6px; box-shadow: 0 2px 0 var(--bd), 0 6px 16px rgba(255, 160, 30, .3), inset 0 2px 0 rgba(255, 255, 255, .3); }
#btn-play::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: shine 3.2s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes playPulse {
  0%, 100% { scale: 1; }
  50% { scale: 1.035; }
}
@keyframes shine {
  0%, 55% { background-position: 120% 0; }
  100% { background-position: -40% 0; }
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s, transform .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); transform: rotate(30deg); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
.coin-ico { color: var(--yellow); text-shadow: 0 0 10px rgba(255, 210, 63, .8); font-size: 1.1em; }
.coin-ico.big { font-size: 34px; }
.chip-coins { color: #fff6d0; }
.chip-coins.bump { animation: bump .35s var(--ease-back); }
.chip-streak .flame { filter: drop-shadow(0 0 6px rgba(255, 120, 40, .8)); }
.chip-streak.cold { opacity: .55; }
.chip-streak.cold .flame { filter: grayscale(1); }
.chip-stars { color: var(--yellow); }
@keyframes bump { 0% { scale: 1; } 40% { scale: 1.25; } 100% { scale: 1; } }

/* Level-Badge & XP-Balken */
.lvl-badge {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 6px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--pink), #8b3dff);
  box-shadow: 0 0 16px rgba(255, 79, 216, .45), inset 0 2px 0 rgba(255, 255, 255, .35);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}
.lvl-badge.small { min-width: 34px; height: 34px; font-size: 16px; border-radius: 11px; }
.xpbar {
  position: relative;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.xpbar.big { height: 16px; }
.xpbar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 12px rgba(79, 227, 255, .6);
  transition: width .5s var(--ease-out);
}
.xpbar-fill.instant { transition: none; }

/* ------------------------------------------------------------------ */
/* Profil-Leiste                                                        */
/* ------------------------------------------------------------------ */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: calc(var(--tb-h) + var(--safe-t));
  padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l));
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(13, 11, 26, .85), rgba(13, 11, 26, 0));
  transition: opacity .3s, translate .3s var(--ease-out);
}
body:not(.state-menu) .topbar { opacity: 0; translate: 0 -100%; pointer-events: none; }

.tb-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  min-width: 0;
  flex: 0 1 230px;
  text-align: left;
}
.tb-xp { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.tb-xp-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tb-xp-label b { color: var(--text); }
.tb-chips { display: flex; gap: 8px; margin-left: auto; }
.tb-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-account .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  object-fit: cover;
  background: var(--bg2);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}
.tb-account .acc-name { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-logout {
  border: 0;
  background: none;
  color: var(--muted) !important;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
}
.acc-col { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.btn-discord {
  --b1: #7983f5; --b2: #5865f2; --bd: #3640a8; --bt: #fff;
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--bd), 0 8px 16px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .25);
  flex-direction: row;
  gap: 8px;
}
.btn-discord:active { translate: 0 3px; box-shadow: 0 1px 0 var(--bd); }
.btn-discord .d-short { display: none; }
#set-sync .acc-logout { font-size: inherit; }

/* ------------------------------------------------------------------ */
/* Screens                                                              */
/* ------------------------------------------------------------------ */
.screen {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(var(--tb-h) + var(--safe-t) + 6px) calc(16px + var(--safe-r)) calc(24px + var(--safe-b)) calc(16px + var(--safe-l));
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  translate: 0 14px;
  transition: opacity .28s ease, translate .38s var(--ease-out), visibility 0s linear .38s;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.screen.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  translate: 0 0;
  transition: opacity .28s ease, translate .38s var(--ease-out), visibility 0s;
}
.screen-result { padding-top: calc(20px + var(--safe-t)); }

.scr-head {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1040px;
  margin: 4px auto 18px;
}
.scr-head h2 { font-size: clamp(26px, 5vw, 36px); text-shadow: 0 0 18px rgba(79, 227, 255, .35); }
.scr-head .chip { margin-left: auto; }
.back-btn {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .07);
  font-size: 34px;
  line-height: 1;
  padding-bottom: 4px;
  cursor: pointer;
  transition: background .15s, translate .15s;
}
.back-btn:hover { background: rgba(255, 255, 255, .14); translate: -2px 0; }
.scr-body { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.scr-body.narrow { max-width: 560px; }
.lead { font-size: 18px; color: #d9d4ff; }
.sub-head { font-size: 18px; margin-top: 4px !important; }

/* Einblend-Stagger für Kinder */
.screen.active .tile,
.screen.active .diff-card,
.screen.active .skin-card,
.screen.active .stat-tile {
  animation: popIn .45s var(--ease-back) both;
  animation-delay: calc(var(--i, 0) * 45ms + 60ms);
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(.94); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ */
/* Hauptmenü                                                            */
/* ------------------------------------------------------------------ */
.menu-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 1040px;
  margin: 0 auto;
}
.menu-main {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.menu-side { width: 100%; max-width: 560px; }

@media (min-width: 980px) {
  .menu-wrap { flex-direction: row; align-items: flex-start; justify-content: center; gap: 34px; padding-top: 10px; }
  .menu-side { width: 340px; flex: none; margin-top: 150px; position: sticky; top: 0; }
}

.logo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: .86;
  margin-top: 26px !important;
  font-size: clamp(54px, 15vw, 104px);
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
}
.logo-migs {
  color: #e9fbff;
  text-shadow: 0 0 6px #fff, 0 0 16px var(--cyan), 0 0 38px var(--cyan), 0 0 70px rgba(79, 227, 255, .6);
  animation: flicker 6s infinite;
}
.logo-arena {
  font-size: .62em;
  letter-spacing: .28em;
  margin-right: -.28em;
  color: #ffe9fb;
  text-shadow: 0 0 6px #fff, 0 0 16px var(--pink), 0 0 36px var(--pink), 0 0 64px rgba(255, 79, 216, .6);
}
@keyframes flicker {
  0%, 18%, 22%, 60%, 64%, 100% { opacity: 1; }
  20%, 62% { opacity: .72; }
}
.logo-crowd {
  position: absolute;
  top: -24px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.logo-crowd .mig { animation: hop 1.4s var(--ease-out) infinite; animation-delay: calc(var(--i) * 140ms); }
@keyframes hop {
  0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(-14px) scale(.92, 1.08); }
  45% { transform: translateY(0) scale(1.12, .86); }
}
.tagline { color: var(--muted); font-size: 17px; letter-spacing: .04em; margin-top: -4px !important; }

/* CSS-Mig (Logo, Kampagne, Rangliste) */
.mig {
  --c1: #3d8bff; --c2: #1c4fa8; --c3: #9cc4ff;
  --s: 26px;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--s);
  height: calc(var(--s) * .94);
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 34% 28%, var(--c3) 0 10%, var(--c1) 46%, var(--c2) 100%);
  box-shadow: 0 0 calc(var(--s) * .4) rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .2);
  box-shadow: 0 0 calc(var(--s) * .45) color-mix(in srgb, var(--c1) 70%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .2);
}
.mig::before, .mig::after {
  content: '';
  position: absolute;
  top: 30%;
  width: 24%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(circle at 62% 58%, #1a1030 0 36%, #fff 40%);
}
.mig::before { left: 20%; }
.mig::after { right: 20%; }
.mig.rainbow {
  background: linear-gradient(135deg, #ff4d6d, #ffb347, #ffe066, #5dff9e, #4fe3ff, #a77dff, #ff6ad5);
  background-size: 200% 200%;
  animation: rainbowShift 3s linear infinite;
}
@keyframes rainbowShift { to { background-position: 200% 200%; } }

/* Identität: Skin + Name */
.identity {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
}
.skin-preview {
  position: relative;
  flex: none;
  width: 110px;
  height: 118px;
  border: 0;
  padding: 0;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(79, 227, 255, .16), rgba(79, 227, 255, 0) 70%);
  cursor: pointer;
  transition: transform .2s var(--ease-back);
}
.skin-preview:hover { transform: scale(1.06) rotate(-2deg); }
.skin-preview canvas { width: 110px; height: 110px; display: block; animation: bob 2.4s ease-in-out infinite; }
.skin-preview-name {
  position: absolute;
  left: 50%;
  bottom: -2px;
  translate: -50% 0;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  white-space: nowrap;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.name-field { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.name-label { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.name-field input, .code-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: 600 22px var(--font);
  user-select: text;
  -webkit-user-select: text;
  transition: border-color .2s, box-shadow .2s;
}
.name-field input:focus, .code-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(79, 227, 255, .18), 0 0 20px rgba(79, 227, 255, .25);
}
.name-hint { font-size: 12px; color: var(--muted); }
.name-hint kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line);
}
@media (pointer: coarse) { .name-hint { display: none; } }

.online-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
  min-height: 22px;
}
.online-line .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b6690;
}
.online-line.ok .dot { background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s ease-in-out infinite; }
.online-line.off .dot { background: var(--red); }
@keyframes blink { 50% { opacity: .35; } }

/* Kacheln */
.tiles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.tile {
  --tc: var(--cyan);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px 16px;
  min-height: 82px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass-solid);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--tc) 22%, transparent), transparent 60%),
    var(--glass-solid);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 12px 26px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
  cursor: pointer;
  overflow: hidden;
  transition: translate .12s ease, box-shadow .15s ease, border-color .2s;
}
.tile::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--tc);
  box-shadow: 0 0 14px var(--tc);
  opacity: .85;
}
.tile:hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--tc) 55%, transparent); box-shadow: 0 9px 0 rgba(0, 0, 0, .35), 0 16px 30px rgba(0, 0, 0, .35), 0 0 24px color-mix(in srgb, var(--tc) 30%, transparent); }
.tile:active { translate: 0 4px; box-shadow: 0 2px 0 rgba(0, 0, 0, .35), 0 4px 10px rgba(0, 0, 0, .3); }
.tile:disabled, .tile.disabled { filter: grayscale(.8) brightness(.75); cursor: not-allowed; }
.tile-ico { grid-row: 1 / 3; font-size: 34px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.tile-title { font-size: 19px; font-weight: 700; }
.tile-sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-solo { --tc: var(--cyan); }
.tile-campaign { --tc: var(--yellow); }
.tile-daily { --tc: var(--green); }
.tile-friends { --tc: var(--pink); }
.tile-skins { --tc: #a77dff; }
.tile-ranks { --tc: var(--orange); }
.tile-settings { --tc: #8a86b8; }
.tile-small { min-height: 64px; padding: 10px 14px; }
.tile-small .tile-ico { font-size: 26px; }
.tile-small .tile-title { font-size: 16px; }
.tile-small .tile-sub { font-size: 12px; }
.tile .badge-new {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  box-shadow: 0 0 10px var(--pink);
  animation: blink 1.4s ease-in-out infinite;
}

@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tiles .tile { grid-column: span 3; }
  .tiles .tile-small { grid-column: span 2; }
}
@media (max-width: 559px) {
  .tile { column-gap: 10px; padding: 12px; min-height: 74px; }
  .tile-ico { font-size: 28px; }
  .tile-title { font-size: 16px; line-height: 1.15; }
  .tile-sub { font-size: 12px; }
  .tiles .tile-settings { grid-column: span 2; min-height: 54px; }
}

/* Missionen */
.missions { padding: 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { font-size: 20px; }
.mission-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mission {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.mission.done { border-color: rgba(93, 255, 158, .5); background: rgba(93, 255, 158, .08); }
.mission.claimed { opacity: .55; }
.mission-ico { grid-row: 1 / 3; font-size: 24px; text-align: center; }
.mission-text { font-size: 14px; font-weight: 600; line-height: 1.2; }
.mission-rew { font-size: 14px; font-weight: 700; color: var(--yellow); white-space: nowrap; }
.mission-bar { grid-column: 2; display: flex; align-items: center; gap: 8px; }
.mission-bar .xpbar { flex: 1; height: 8px; }
.mission-bar .xpbar-fill { background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 8px rgba(93, 255, 158, .5); }
.mission-prog { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 54px; text-align: right; }
.mission-act { grid-column: 3; grid-row: 2; justify-self: end; }
.btn-claim {
  --b1: #8dffbf; --b2: #2fd57c; --bd: #13804a; --bt: #04210f;
  min-height: 30px;
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 11px;
  box-shadow: 0 3px 0 var(--bd), inset 0 2px 0 rgba(255, 255, 255, .35);
  animation: claimWiggle 1.6s ease-in-out infinite;
}
.btn-claim:active { translate: 0 2px; box-shadow: 0 1px 0 var(--bd); }
@keyframes claimWiggle { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -6deg; } 90% { rotate: 6deg; } 95% { rotate: -3deg; } }
.mission-check { color: var(--green); font-weight: 700; font-size: 18px; }
.missions-all { text-align: center; font-size: 14px; color: var(--green); margin-top: 10px; }

.menu-foot {
  margin: 26px auto 0;
  text-align: center;
  font-size: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.menu-foot a { text-decoration: none; font-weight: 600; }
.menu-foot a:hover { text-decoration: underline; }
.menu-foot .sep { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Solo / Booster                                                       */
/* ------------------------------------------------------------------ */
.diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.diff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px 12px;
  border-radius: 20px;
  border: 2px solid var(--line);
  background: var(--glass-solid);
  cursor: pointer;
  transition: border-color .2s, translate .12s, box-shadow .2s;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
}
.diff-card:hover { translate: 0 -2px; }
.diff-card:active { translate: 0 3px; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.diff-card.sel {
  border-color: var(--yellow);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 0 4px rgba(255, 210, 63, .18), 0 0 26px rgba(255, 210, 63, .3);
}
.diff-ico { font-size: 36px; }
.diff-name { font-size: 19px; font-weight: 700; }
.diff-desc { font-size: 13px; color: var(--muted); text-align: center; }
.diff-rec { font-size: 12px; color: var(--yellow); min-height: 15px; }

.boosters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.boost {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px 10px;
  border-radius: 18px;
  border: 2px dashed rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: border-color .2s, background .2s, translate .12s;
}
.boost:hover { background: rgba(255, 255, 255, .08); }
.boost:active { translate: 0 2px; }
.boost.on {
  border-style: solid;
  border-color: var(--cyan);
  background: rgba(79, 227, 255, .12);
  box-shadow: 0 0 20px rgba(79, 227, 255, .25);
}
.boost.on::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--cyan);
  color: #04202c;
  animation: popIn .3s var(--ease-back);
}
.boost.poor { opacity: .5; }
.boost-ico { font-size: 28px; }
.boost-name { font-size: 14px; font-weight: 700; text-align: center; line-height: 1.1; }
.boost-price { font-size: 13px; color: var(--yellow); font-weight: 700; }
.boosters.compact .boost { padding: 8px 4px 6px; border-radius: 14px; }
.boosters.compact .boost-ico { font-size: 22px; }
.boosters.compact .boost-name { font-size: 12px; }
.boosters.compact .boost-price { font-size: 12px; }
.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ------------------------------------------------------------------ */
/* Kampagne                                                             */
/* ------------------------------------------------------------------ */
.screen-campaign { display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
.screen-campaign .scr-head { width: 100%; flex: none; }
.camp-scroll {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 calc(-16px - var(--safe-r)) 0 calc(-16px - var(--safe-l));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}
.camp-map { position: relative; width: 100%; max-width: 520px; margin: 0 auto; }
.camp-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.camp-path .p-all { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2 16; }
.camp-path .p-done { fill: none; stroke: url(#campGrad); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(79, 227, 255, .7)); }
.lv-node {
  position: absolute;
  translate: -50% -50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: 700 24px var(--font);
  color: #04202c !important;
  background: radial-gradient(circle at 35% 30%, #c9f6ff, var(--cyan) 55%, #1593b8);
  box-shadow: 0 6px 0 #0d5f7c, 0 10px 22px rgba(0, 0, 0, .45), 0 0 22px rgba(79, 227, 255, .35);
  transition: scale .15s var(--ease-back);
}
.lv-node:hover { scale: 1.08; }
.lv-node:active { scale: .96; }
.lv-node.done { background: radial-gradient(circle at 35% 30%, #fff3b5, var(--yellow) 55%, #c79300); box-shadow: 0 6px 0 #8a6400, 0 10px 22px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 210, 63, .35); color: #2a1a00 !important; }
.lv-node.locked {
  background: radial-gradient(circle at 35% 30%, #57527f, #36315f 60%, #26224a);
  box-shadow: 0 6px 0 #17143a, 0 10px 18px rgba(0, 0, 0, .4);
  color: rgba(255, 255, 255, .45) !important;
  cursor: default;
  font-size: 20px;
}
.lv-node.boss { width: 80px; height: 80px; font-size: 28px; }
.lv-node.boss:not(.locked) {
  background: radial-gradient(circle at 35% 30%, #ffc4f3, var(--pink) 55%, #9c1f82);
  box-shadow: 0 7px 0 #6b1159, 0 10px 22px rgba(0, 0, 0, .45), 0 0 30px rgba(255, 79, 216, .6);
  color: #fff !important;
}
.lv-node.boss.done:not(.locked) { outline: 3px solid var(--yellow); outline-offset: 3px; }
.lv-node .lv-crown { position: absolute; top: -22px; left: 50%; translate: -50% 0; font-size: 24px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.lv-node.current { z-index: 2; }
.lv-node.current::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  animation: ring 1.6s ease-out infinite;
}
.lv-node.boss.current::before { border-color: var(--pink); }
@keyframes ring { from { opacity: .9; transform: scale(.85); } to { opacity: 0; transform: scale(1.35); } }
.lv-stars {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  translate: -50% 0;
  display: flex;
  gap: 1px;
  font-size: 15px;
  color: rgba(255, 255, 255, .22);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
  pointer-events: none;
}
.lv-stars .on { color: var(--yellow); text-shadow: 0 0 8px rgba(255, 210, 63, .8), 0 2px 3px rgba(0, 0, 0, .5); }
.lv-me { position: absolute; left: 50%; top: -34px; translate: -50% 0; pointer-events: none; }
.lv-me .mig { --s: 30px; animation: hop 1.4s var(--ease-out) infinite; }
.lv-node.boss .lv-me { top: -56px; }
/* Modus-Level (Kapitel „Modi-Meister“): Modus-Icon als kleines Abzeichen rechts oben am Knoten */
.lv-node .lv-mode {
  position: absolute;
  right: -10px;
  top: -6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  background: rgba(13, 11, 26, .92);
  border: 2px solid var(--mc, var(--cyan));
  box-shadow: 0 0 10px color-mix(in srgb, var(--mc, var(--cyan)) 70%, transparent), 0 3px 6px rgba(0, 0, 0, .5);
  pointer-events: none;
}
.lv-node.locked .lv-mode { opacity: .55; filter: grayscale(.6); }
.lv-node.boss .lv-mode { right: -8px; top: -2px; }
.lvl-mode {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  vertical-align: 1px;
  font-size: 12px;
  letter-spacing: .06em;
  color: #fff;
  background: color-mix(in srgb, var(--mc, var(--cyan)) 28%, transparent);
  border: 1px solid color-mix(in srgb, var(--mc, var(--cyan)) 75%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--mc, var(--cyan)) 45%, transparent);
}
.camp-chapter {
  position: absolute;
  left: 50%;
  translate: -50% -50%;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(13, 11, 26, .7);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* Level-Info */
.lvl-card { text-align: center; }
.lvl-num { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.lvl-num.boss { color: var(--pink); }
.lvl-title { font-size: 30px; margin: 4px 0 8px !important; }
.lvl-desc { font-size: 17px; color: #e6e2ff; margin-bottom: 14px !important; }
.lvl-goals { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.lvl-goals li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  font-size: 15px;
}
.lvl-goals .g-stars { color: var(--yellow); min-width: 54px; letter-spacing: 1px; }
.lvl-goals .g-stars .off { color: rgba(255, 255, 255, .2); }
.lvl-goals li.got { background: rgba(255, 210, 63, .1); }
.lvl-card .btn-play { width: 100%; margin-top: 14px; }
.lvl-card .sub-head { text-align: left; margin: 10px 0 8px !important; }

/* ------------------------------------------------------------------ */
/* Tages-Challenge / Freunde                                            */
/* ------------------------------------------------------------------ */
.daily-card { display: flex; align-items: center; gap: 16px; padding: 16px; }
.daily-cal {
  flex: none;
  width: 78px;
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  background: #fff;
  color: #1b1640;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 24px rgba(93, 255, 158, .3);
}
.daily-cal-m { display: block; background: var(--green); color: #04210f; font-weight: 700; font-size: 14px; padding: 3px 0; letter-spacing: .1em; }
.daily-cal-d { display: block; font-size: 38px; font-weight: 700; padding: 2px 0 4px; }
.daily-date { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
}
.stat-label { font-size: 13px; color: var(--muted); }
.stat-val { font-size: 28px; font-weight: 700; color: var(--yellow); }
.info-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.info-chips .chip { font-size: 14px; height: 32px; font-weight: 600; }
#daily-start, #solo-start { width: 100%; }

.offline-hint {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 84, 112, .12);
  border: 1px solid rgba(255, 84, 112, .4);
  font-size: 15px;
}
.fr-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.fr-card h3 { font-size: 21px; }
.code-row { display: flex; gap: 10px; }
.code-input {
  flex: 1;
  min-width: 0;
  height: 60px;
  text-align: center;
  font-size: 30px;
  letter-spacing: .4em;
  text-transform: uppercase;
  padding-left: .4em;
}
.code-input.highlight { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 79, 216, .2), 0 0 24px rgba(255, 79, 216, .35); }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pulse-hint { animation: playPulse 1.4s ease-in-out infinite; }

/* ------------------------------------------------------------------ */
/* Skins                                                                */
/* ------------------------------------------------------------------ */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 12px;
  border-radius: 20px;
  border: 2px solid var(--line);
  background: var(--glass-solid);
  cursor: pointer;
  transition: translate .12s, border-color .2s, box-shadow .2s;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
}
.skin-card:hover { translate: 0 -3px; }
.skin-card:active { translate: 0 2px; }
.skin-card canvas { width: 96px; height: 96px; }
.skin-card .sk-name { font-size: 17px; font-weight: 700; }
.skin-card .sk-status {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.skin-card.equipped { border-color: var(--green); box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(93, 255, 158, .3); }
.skin-card.equipped .sk-status { background: var(--green); color: #04210f; }
.skin-card.buy .sk-status { background: rgba(255, 210, 63, .18); color: var(--yellow); }
.skin-card.buy.poor .sk-status { color: #b9a76a; background: rgba(255, 255, 255, .06); }
.skin-card.locked canvas { filter: grayscale(1) brightness(.45); }
.skin-card.locked .sk-status { color: var(--muted); }
.skin-card .sk-lock { position: absolute; top: 40px; left: 50%; translate: -50% 0; font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .7)); }
.skin-card.rare::before {
  content: 'SELTEN';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  letter-spacing: .1em;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  color: #2a1400;
}

/* ------------------------------------------------------------------ */
/* Rangliste / Einstellungen                                            */
/* ------------------------------------------------------------------ */
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.tab {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font: 700 16px var(--font);
  color: var(--muted) !important;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tab.active { background: linear-gradient(180deg, #4b4580, #352f66); color: var(--text) !important; box-shadow: 0 3px 0 #1f1a45; }
.rk-panel { padding: 8px; min-height: 160px; }
.rk-row {
  display: grid;
  grid-template-columns: 34px 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  font-size: 16px;
}
.rk-row:nth-child(odd) { background: rgba(255, 255, 255, .035); }
.rk-row.me { background: rgba(79, 227, 255, .14); box-shadow: inset 0 0 0 2px rgba(79, 227, 255, .5); }
.rk-pos { font-weight: 700; text-align: center; color: var(--muted); }
.rk-row:nth-child(1) .rk-pos { color: var(--yellow); }
.rk-row:nth-child(2) .rk-pos { color: #dfe6ff; }
.rk-row:nth-child(3) .rk-pos { color: #ffb37a; }
.rk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-vals { display: flex; gap: 12px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.rk-vals b { color: var(--text); }
.rk-empty { padding: 30px 14px; text-align: center; color: var(--muted); }
.rk-head { display: flex; justify-content: space-between; padding: 6px 12px 10px; font-size: 13px; color: var(--muted); }
.rec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px; }
.rec-tile { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .05); display: flex; flex-direction: column; gap: 2px; }
.rec-tile .rec-ico { font-size: 22px; }
.rec-tile .rec-val { font-size: 26px; font-weight: 700; color: var(--yellow); }
.rec-tile .rec-label { font-size: 13px; color: var(--muted); }

.settings { padding: 8px 16px; }
.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.set-row:last-child { border-bottom: 0; }
.set-label { flex: 1; font-size: 17px; font-weight: 600; }
.set-val { width: 38px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.set-row input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 1 200px;
  min-width: 90px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan) var(--p, 50%), rgba(255, 255, 255, .14) var(--p, 50%));
  cursor: pointer;
}
.set-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 227, 255, .35), 0 3px 6px rgba(0, 0, 0, .4);
}
.set-row input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 227, 255, .35), 0 3px 6px rgba(0, 0, 0, .4);
}
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(0, 0, 0, .3); }
.seg-btn {
  border: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: none;
  font: 700 15px var(--font);
  color: var(--muted) !important;
  cursor: pointer;
}
.seg-btn.on { background: var(--cyan); color: #04202c !important; }
.switch { position: relative; width: 56px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  transition: background .2s;
}
.switch-ui::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
  transition: translate .2s var(--ease-back);
}
.switch input:checked + .switch-ui { background: var(--cyan); }
.switch input:checked + .switch-ui::after { translate: 24px 0; }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--cyan); outline-offset: 3px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ------------------------------------------------------------------ */
/* Ergebnis-Screen                                                      */
/* ------------------------------------------------------------------ */
.res-wrap {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.res-head { text-align: center; }
.res-kicker { font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.res-title {
  font-size: clamp(48px, 13vw, 84px);
  line-height: 1;
  margin: 4px 0 !important;
  background: linear-gradient(180deg, #fff6c2, var(--yellow) 45%, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 190, 40, .45)) drop-shadow(0 5px 0 rgba(120, 60, 0, .6));
  animation: titleIn .6s var(--ease-back) both;
}
.res-title.lose {
  background: linear-gradient(180deg, #ffd0e0, var(--red) 55%, #b0213d);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(255, 84, 112, .4)) drop-shadow(0 5px 0 rgba(90, 10, 30, .6));
}
.res-title.mid {
  background: linear-gradient(180deg, #e6fbff, var(--cyan) 55%, #1d8fc0);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(79, 227, 255, .4)) drop-shadow(0 5px 0 rgba(10, 60, 90, .6));
}
.res-title.long { font-size: clamp(38px, 10.5vw, 70px); }
@keyframes titleIn {
  0% { opacity: 0; transform: scale(2.2) rotate(-6deg); }
  60% { opacity: 1; transform: scale(.92) rotate(1deg); }
  100% { transform: none; }
}
.res-sub { font-size: 17px; color: #d9d4ff; min-height: 1em; }
.res-stars { display: flex; justify-content: center; gap: 10px; margin-top: 10px; min-height: 0; }
.res-star {
  font-size: 58px;
  line-height: 1;
  color: rgba(255, 255, 255, .14);
  text-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  transition: color .2s;
}
.res-star:nth-child(2) { translate: 0 -12px; font-size: 68px; }
.res-star.on {
  color: var(--yellow);
  text-shadow: 0 0 22px rgba(255, 210, 63, .9), 0 4px 0 #9a6b00;
  animation: starPop .5s var(--ease-back);
}
.res-star.new::after { content: ''; }
@keyframes starPop {
  0% { transform: scale(0) rotate(-90deg); }
  70% { transform: scale(1.35) rotate(10deg); }
  100% { transform: none; }
}
.res-score { font-size: 46px; font-weight: 700; color: var(--yellow); text-shadow: 0 0 18px rgba(255, 210, 63, .5); margin-top: 6px; }
.res-score small { display: block; font-size: 14px; color: var(--muted); font-weight: 600; text-shadow: none; }

.res-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px 10px;
  border-radius: 16px;
  background: var(--glass-solid);
  border: 1px solid var(--line);
  text-align: center;
}
.stat-tile .st-ico { font-size: 22px; }
.stat-tile .st-val { font-size: 24px; font-weight: 700; }
.stat-tile .st-label { font-size: 12px; color: var(--muted); }
.stat-tile.record { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 210, 63, .3); }
.rec-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  color: #2a1400;
  animation: recPulse 1s ease-in-out infinite;
}
@keyframes recPulse { 50% { scale: 1.12; } }
.res-newrec {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 0 0 14px rgba(255, 210, 63, .7);
  animation: recPulse 1s ease-in-out infinite;
}

.res-rewards { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.res-coins { display: flex; align-items: center; gap: 6px; flex: none; }
.res-coins-num { font-size: 30px; font-weight: 700; color: var(--yellow); min-width: 70px; font-variant-numeric: tabular-nums; }
.res-xp { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.res-xp-top { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.res-xpgain { margin-left: auto; color: var(--cyan); font-size: 16px; }
.res-levelup {
  text-align: center;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 79, 216, .25), rgba(79, 227, 255, .25));
  border: 2px solid rgba(255, 255, 255, .25);
  animation: popIn .5s var(--ease-back);
}
.res-levelup .lu-title { font-size: 30px; font-weight: 700; text-shadow: 0 0 18px var(--pink); }
.res-levelup .lu-sub { font-size: 15px; color: #f0eaff; }
.res-missions { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.res-missions:empty { display: none; }
.res-missions h3 { font-size: 15px; color: var(--muted); }
.res-mis-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.res-mis-row .xpbar { grid-column: 1 / 3; height: 7px; }
.res-mis-row .xpbar-fill { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.res-mis-row .rm-delta { color: var(--green); font-weight: 700; white-space: nowrap; }
.res-mis-row.done .rm-text::after { content: ' ✓'; color: var(--green); }
.res-boost { display: flex; flex-direction: column; gap: 6px; }
.res-buttons {
  position: sticky;
  bottom: calc(-24px - var(--safe-b));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 4px -16px 0;
  padding: 18px 16px calc(14px + var(--safe-b));
  background: linear-gradient(180deg, rgba(10, 8, 22, 0) 0%, rgba(10, 8, 22, .92) 28%, rgba(10, 8, 22, .97) 100%);
}
.res-buttons .btn-xl { width: min(100%, 420px); }
.res-buttons-row { display: flex; gap: 10px; width: min(100%, 420px); }
.res-buttons-row .btn { flex: 1; }

/* ------------------------------------------------------------------ */
/* Online-Overlay                                                       */
/* ------------------------------------------------------------------ */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: rgba(10, 8, 22, .55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s, visibility 0s linear .25s;
  z-index: 8;
  overflow-y: auto;
}
.overlay.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s, visibility 0s; }
.ov-panel {
  width: min(100%, 440px);
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
.overlay.open .ov-panel { animation: popIn .4s var(--ease-back); }
.ov-kicker { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ov-title { font-size: clamp(40px, 10vw, 60px); line-height: 1; }
.ov-title.win { color: var(--yellow); text-shadow: 0 0 22px rgba(255, 210, 63, .7), 0 4px 0 #9a6b00; }
.ov-rewards { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-weight: 700; font-size: 17px; }
.ov-rewards .r-coins { color: var(--yellow); }
.ov-rewards .r-xp { color: var(--cyan); }
.ov-rewards .r-lvl { color: var(--pink); }
.ov-ranking { list-style: none; margin: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.ov-ranking li {
  display: grid;
  grid-template-columns: 26px 20px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, .04);
}
.ov-ranking li.me { background: rgba(79, 227, 255, .16); box-shadow: inset 0 0 0 2px rgba(79, 227, 255, .55); font-weight: 700; }
.ov-ranking li.gap { background: none; justify-content: center; display: block; text-align: center; color: var(--muted); padding: 0; }
.ov-ranking .o-pos { color: var(--muted); font-weight: 700; text-align: center; }
.ov-ranking .o-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-ranking .o-val { font-variant-numeric: tabular-nums; color: #e6e2ff; }
.ov-ranking .mig { --s: 18px; }
.ov-countdown { font-size: 18px; font-weight: 700; color: var(--cyan); }
.ov-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ov-buttons .btn-play { flex: 1 1 100%; min-height: 58px; font-size: 22px; }
.ov-buttons .btn-ghost, .ov-buttons .btn-cyan { flex: 1; }

/* ------------------------------------------------------------------ */
/* Modals                                                               */
/* ------------------------------------------------------------------ */
.modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: rgba(8, 6, 20, .66);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s, visibility 0s linear .22s;
  overflow-y: auto;
}
.modal.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .22s, visibility 0s; }
.modal-card {
  position: relative;
  width: min(100%, 460px);
  max-height: 100%;
  overflow-x: hidden;   /* pulsierende Kacheln (scale) sollen keinen Quer-Scrollbalken erzeugen */
  overflow-y: auto;
  padding: 22px 20px 20px;
  background: var(--glass-solid);
}
.modal.open .modal-card { animation: modalIn .38s var(--ease-back); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.9); } to { opacity: 1; transform: none; } }
.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, .08);
  font-size: 18px;
  cursor: pointer;
}
.modal-x:hover { background: rgba(255, 255, 255, .16); }

.streak-card { text-align: center; }
.streak-flame { font-size: 58px; animation: flame 1.2s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255, 120, 40, .8)); }
@keyframes flame { 50% { transform: scale(1.12) rotate(-4deg); } }
.streak-card h2 { font-size: 32px; }
.streak-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 16px 0 18px; }
.sd {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 2px solid var(--line);
  font-size: 12px;
}
.sd .sd-day { color: var(--muted); font-weight: 600; }
.sd .sd-coin { font-size: 18px; color: var(--yellow); }
.sd .sd-amt { font-weight: 700; font-size: 13px; }
.sd.past { opacity: .5; }
.sd.past::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: var(--green); background: rgba(13, 11, 26, .55); border-radius: 12px; }
.sd.today { border-color: var(--yellow); background: rgba(255, 210, 63, .14); box-shadow: 0 0 18px rgba(255, 210, 63, .35); animation: recPulse 1.2s ease-in-out infinite; }
.sd.big .sd-coin { font-size: 24px; }
.streak-card .btn-play { width: 100%; }

.tut-card { text-align: center; }
.tut-canvas {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 18px;
  background: radial-gradient(ellipse at center, #241d52, #120f28);
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto 14px;
}
.tut-title { font-size: 26px; margin-bottom: 6px !important; }
.tut-text { font-size: 18px; color: #e6e2ff; min-height: 3em; }
.tut-dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.tut-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: background .2s, width .2s; }
.tut-dots span.on { background: var(--cyan); width: 26px; border-radius: 6px; }
.tut-buttons { display: flex; gap: 10px; }
.tut-buttons .btn { flex: 1; }
.tut-buttons .btn-play { flex: 1.6; }

.confirm-card { text-align: center; }
.confirm-card h2 { font-size: 26px; margin-bottom: 10px !important; }
.confirm-text { font-size: 17px; color: #e6e2ff; margin-bottom: 18px; }
.confirm-text canvas { display: block; margin: 0 auto 8px; width: 96px; height: 96px; }
.confirm-buttons { display: flex; gap: 10px; }
.confirm-buttons .btn { flex: 1; }

/* ------------------------------------------------------------------ */
/* Toasts, Status, Konfetti, Münzflug                                    */
/* ------------------------------------------------------------------ */
.toasts {
  position: absolute;
  top: calc(var(--tb-h) + var(--safe-t) + 8px);
  left: 50%;
  translate: -50% 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 460px);
  pointer-events: none;
}
/* Im Spiel unten mittig, damit das HUD oben frei bleibt */
body.state-playing .toasts { top: auto; bottom: calc(176px + var(--safe-b)); flex-direction: column-reverse; }
/* Rundenende-Overlay offen: Toasts nach oben, sonst liegen sie auf „Weiterspielen“ */
body.state-playing:has(#ov-online.open) .toasts { top: calc(12px + var(--safe-t)); bottom: auto; flex-direction: column; }
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(28, 24, 62, .96);
  border: 1px solid rgba(79, 227, 255, .35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45), 0 0 20px rgba(79, 227, 255, .15);
  font-size: 16px;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn .35s var(--ease-back);
}
.toast.out { animation: toastOut .3s ease forwards; }
.toast .btn { min-height: 34px; padding: 4px 12px; font-size: 14px; border-radius: 11px; box-shadow: 0 3px 0 var(--bd); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px) scale(.95); } }

.status-pill {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: 50%;
  translate: -50% -20px;
  z-index: 41;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(13, 11, 26, .85);
  border: 1px solid rgba(79, 227, 255, .4);
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, translate .25s var(--ease-out);
  white-space: nowrap;
}
.status-pill.show { opacity: 1; translate: -50% 0; }
body.state-playing .status-pill { top: auto; bottom: calc(128px + var(--safe-b)); translate: -50% 20px; font-size: 14px; padding: 6px 14px; }
body.state-playing .status-pill.show { translate: -50% 0; }
body.state-playing:has(#ov-online.open) .status-pill { top: calc(12px + var(--safe-t)); bottom: auto; }

.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; }
.fly-coin {
  position: fixed;
  z-index: 46;
  left: 0;
  top: 0;
  font-size: 22px;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(255, 210, 63, .9);
  pointer-events: none;
  will-change: transform;
}

/* ------------------------------------------------------------------ */
/* Responsiv                                                            */
/* ------------------------------------------------------------------ */
@media (max-width: 600px) {
  :root { --tb-h: 58px; }
  .topbar { gap: 8px; padding-left: calc(10px + var(--safe-l)); padding-right: calc(10px + var(--safe-r)); }
  .tb-profile { flex: 1 1 auto; }
  .tb-xp-label > span { display: none; }   /* XP-Text weg, „Level N“ bleibt */
  .lvl-badge { min-width: 38px; height: 38px; font-size: 18px; }
  .chip { height: 32px; padding: 0 10px; font-size: 14px; }
  .tb-account .acc-name, .tb-account .acc-col { display: none; }
  .btn-discord .d-label { display: none; }
  .btn-discord .d-short { display: inline; }
  .icon-btn { width: 38px; height: 38px; font-size: 19px; }
  .btn-xl { min-height: 74px; font-size: 30px; }
  .identity { padding: 10px; gap: 10px; }
  .skin-preview, .skin-preview canvas { width: 88px; }
  .skin-preview { height: 96px; }
  .skin-preview canvas { height: 88px; }
  .name-field input { height: 50px; font-size: 20px; }
  .diff-ico { font-size: 30px; }
  .diff-name { font-size: 17px; }
  .boost-name { font-size: 12px; }
  .res-rewards { flex-direction: column; align-items: stretch; gap: 10px; }
  .res-stats { gap: 5px; }
  .stat-tile { padding: 9px 2px 7px; border-radius: 13px; }
  .stat-tile .st-ico { font-size: 17px; }
  .stat-tile .st-val { font-size: 17px; }
  .stat-tile .st-label { font-size: 10px; line-height: 1.15; }
  .rec-badge { font-size: 8px; padding: 1px 5px; }
  .res-wrap { gap: 10px; }
  .res-coins { justify-content: center; }
  .skins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rk-vals { gap: 8px; font-size: 13px; }
}
@media (max-width: 380px) {
  .tb-chips { gap: 5px; }
  .chip-streak { display: none; }
  .diff-desc { display: none; }
}
/* Laptop-Höhen (1280×720, 1366×768 …): alle Menü-Kacheln ohne Scrollen sichtbar */
@media (min-width: 980px) and (max-height: 900px) {
  .menu-wrap { padding-top: 0; }
  .menu-main { gap: 10px; }
  .menu-side { margin-top: 110px; }
  .logo { font-size: 76px; margin-top: 18px !important; }
  .identity { padding: 8px 14px 8px 8px; }
  .skin-preview, .skin-preview canvas { width: 88px; }
  .skin-preview { height: 96px; }
  .skin-preview canvas { height: 88px; }
  #btn-play.btn-xl { min-height: 72px; }
  .tiles { gap: 10px; margin-top: 2px; }
  .tile { min-height: 72px; padding: 10px 14px; }
  .tiles .tile-small { min-height: 56px; padding: 8px 12px; }
}
@media (min-width: 980px) and (max-height: 740px) {
  .logo { font-size: 62px; margin-top: 0 !important; }
  .logo-crowd { display: none; }
  .tagline { display: none; }
  .menu-side { margin-top: 80px; }
  .menu-main { gap: 8px; }
  .identity { padding: 6px 12px 6px 6px; }
  .tile { min-height: 64px; }
  .tiles .tile-small { min-height: 48px; }
}
/* Handy quer: wenig Höhe */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --tb-h: 54px; }
  .logo { font-size: 46px; margin-top: 14px !important; flex-direction: row; gap: 14px; align-items: baseline; }
  .logo-arena { font-size: .8em; letter-spacing: .14em; }
  .logo-crowd { display: none; }
  .tagline { display: none; }
  .btn-xl { min-height: 64px; font-size: 26px; }
  .menu-wrap { flex-direction: row; align-items: flex-start; gap: 18px; }
  .menu-side { margin-top: 0; position: static; }
  .res-title { font-size: 44px; }
  .res-star { font-size: 40px; }
  .res-star:nth-child(2) { font-size: 46px; }
  .tut-canvas { max-width: 230px; }
  .tut-dots { margin: 8px 0; }
  /* Pflicht-Popup: Abholen-Button muss ohne Scrollen im Bild sein */
  .streak-flame { font-size: 34px; }
  .streak-card h2 { font-size: 26px; }
  .streak-days { margin: 10px 0 12px; }
}

/* Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  #btn-play { animation: none; }
}
body.reduced-motion #btn-play,
body.reduced-motion .logo-crowd .mig { animation: none; }

/* ------------------------------------------------------------------ */
/* Discord-Activity (body.is-activity, game/discord.js)                 */
/* ------------------------------------------------------------------ */
.act-call[hidden] { display: none !important; }
.act-call {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-color: rgba(88, 101, 242, .55);
  background:
    linear-gradient(160deg, rgba(88, 101, 242, .28), transparent 65%),
    var(--glass-solid);
}
.act-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.act-head b { letter-spacing: .02em; }
.act-head .muted { margin-left: auto; }
.act-ico { font-size: 20px; }
.act-people { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; align-items: center; }
.act-person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 3px 12px 3px 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line);
  min-width: 0;
}
.act-person.me { border-color: var(--cyan); box-shadow: 0 0 12px rgba(79, 227, 255, .25); }
.act-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: var(--bg2);
}
.act-ini {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--h, 235) 62% 46%);
}
.act-pname { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.act-more { font-weight: 700; color: var(--muted); padding: 0 6px; }
.name-field input.locked { border-color: rgba(88, 101, 242, .55); background: rgba(88, 101, 242, .12); cursor: default; }
.name-field input.locked:focus { box-shadow: none; border-color: rgba(88, 101, 242, .8); }

/* kompakteres Menü in der Activity: kein Freunde-Raum, kein Classic-Link, kein Login */
body.is-activity #tile-friends,
body.is-activity #classic-link,
body.is-activity .menu-foot .sep,
body.is-activity .tb-account { display: none !important; }
body.is-activity .tagline { display: none; }
body.is-activity .logo { font-size: clamp(44px, 11vw, 78px); margin-top: 12px !important; }
body.is-activity #btn-play .btn-play-label { font-size: .9em; }
@media (min-width: 560px) {
  body.is-activity .tiles .tile:not(.tile-small) { grid-column: span 2; }
}
@media (max-width: 559px) {
  body.is-activity .tiles .tile-settings { grid-column: span 1; min-height: 64px; }
  .act-pname { max-width: 110px; }
}
@media (max-width: 440px) {
  body.is-activity #btn-play .btn-play-label { font-size: .76em; white-space: nowrap; }
}

/* =====================================================================
   V2 – Modi, Lobby, Raumliste, Twitch, Teilen, Garderobe-Anbindung
   ===================================================================== */
:root {
  --twitch: #9146ff;
  --twitch-d: #5c16c5;
  --discord: #5865f2;
}

/* ------------------------------------------------------------------ */
/* Lobby-Zustand: deckender Hintergrund (Spiel-Canvas bleibt verdeckt)   */
/* ------------------------------------------------------------------ */
body.state-lobby #backdrop {
  opacity: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 79, 216, .16) 0%, rgba(13, 11, 26, 0) 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(79, 227, 255, .14) 0%, rgba(13, 11, 26, 0) 60%),
    linear-gradient(rgba(79, 227, 255, .05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(79, 227, 255, .05) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--bg0);
  animation: gridDrift 22s linear infinite;
}
body.state-lobby .toasts { top: calc(12px + var(--safe-t)); }

/* ------------------------------------------------------------------ */
/* Hauptmenü: Modus am SPIELEN-Button, neue Kacheln, Herausforderung      */
/* ------------------------------------------------------------------ */
.btn-play-mode {
  --mc: #ffc531;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #2a1400;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mc) 70%, transparent);
}
.btn-xl .btn-play-mode { font-size: 14px; }
.tile-rooms { --tc: #2ee6b8; }
.tile-twitch { --tc: var(--twitch); }
@media (min-width: 560px) {
  .tiles .tile-half { grid-column: span 3; }
}
body.is-activity .tiles .tile-half { grid-column: span 2; }
body.is-activity #tile-rooms,
body.is-activity #tile-twitch,
body.is-activity #invite-panel,
body.is-activity #ch-banner { display: none !important; }

.ch-banner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 44px 12px 14px;
  border-radius: 20px;
  border: 2px solid rgba(255, 79, 216, .6);
  background:
    linear-gradient(120deg, rgba(255, 79, 216, .28), rgba(255, 210, 63, .14) 60%, rgba(79, 227, 255, .12)),
    var(--glass-solid);
  box-shadow: 0 0 28px rgba(255, 79, 216, .3), 0 10px 26px rgba(0, 0, 0, .35);
  animation: popIn .5s var(--ease-back) both, chGlow 2.4s ease-in-out infinite;
}
@keyframes chGlow { 50% { box-shadow: 0 0 42px rgba(255, 79, 216, .5), 0 10px 26px rgba(0, 0, 0, .35); } }
.ch-ico { font-size: 34px; animation: flame 1.4s ease-in-out infinite; }
.ch-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ch-who { font-size: 16px; }
.ch-who b { color: var(--yellow); }
.ch-what { font-size: 14px; color: #f0eaff; opacity: .9; }
.ch-accept { min-height: 46px; padding: 8px 16px; font-size: 16px; flex: none; }
.ch-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  font-size: 14px;
}
.ch-x:hover { background: rgba(255, 255, 255, .16); }

/* Einladen (Menü-Seite + Freunde-Screen) */
.invite-card { margin-top: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.invite-card:empty { display: none; }
#fr-invite { margin-top: 0; }
.inv-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.inv-ico { font-size: 22px; }
.inv-count {
  margin-left: auto;
  font-weight: 700;
  font-size: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 79, 216, .18);
  color: #ffc3f1;
}
.invite-card.done .inv-count { background: rgba(93, 255, 158, .18); color: var(--green); }
.inv-goal { display: flex; align-items: center; gap: 12px; }
.inv-mig { flex: none; animation: bob 2.4s ease-in-out infinite; }
.inv-goal-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; min-width: 0; }
.inv-rar { font-size: 12px; font-weight: 700; color: #ffb800; letter-spacing: .06em; text-transform: uppercase; }
.inv-steps { display: flex; gap: 8px; }
.inv-step {
  flex: 1;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .18);
}
.inv-step.on { color: #2a0a22; background: linear-gradient(90deg, var(--pink), var(--yellow)); border: 0; box-shadow: 0 0 14px rgba(255, 79, 216, .45); }
.inv-share { min-height: 42px; font-size: 15px; }

/* ------------------------------------------------------------------ */
/* Modus-Karten                                                         */
/* ------------------------------------------------------------------ */
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-card {
  --mc: var(--cyan);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  align-items: start;
  text-align: left;
  padding: 14px 14px 12px;
  min-height: 118px;
  border-radius: 20px;
  border: 2px solid var(--line);
  background:
    radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--mc) 24%, transparent), transparent 60%),
    var(--glass-solid);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 10px 22px rgba(0, 0, 0, .28);
  cursor: pointer;
  overflow: hidden;
  transition: translate .12s, border-color .2s, box-shadow .2s;
}
.screen.active .mode-card { animation: popIn .45s var(--ease-back) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
.mode-card::after {
  content: '';
  position: absolute;
  inset: auto -30% -60% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--mc) 30%, transparent), transparent 70%);
  pointer-events: none;
}
.mode-card:hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--mc) 55%, transparent); }
.mode-card:active { translate: 0 3px; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.mode-card.sel {
  border-color: var(--mc);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 0 4px color-mix(in srgb, var(--mc) 22%, transparent), 0 0 30px color-mix(in srgb, var(--mc) 40%, transparent);
}
.mode-card.sel::before {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #120f28;
  background: var(--mc);
  animation: popIn .3s var(--ease-back);
}
.mc-ico { grid-row: 1 / 3; font-size: 36px; line-height: 1; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--mc) 50%, transparent)); }
.mode-card.sel .mc-ico { animation: hop 1.4s var(--ease-out) infinite; }
.mc-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-name { font-size: 18px; font-weight: 700; color: #fff; }
.mode-card.sel .mc-name { color: var(--mc); text-shadow: 0 0 14px color-mix(in srgb, var(--mc) 50%, transparent); }
.mc-desc { font-size: 13px; line-height: 1.3; color: var(--muted); }
.mc-time { grid-column: 2; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--mc) 80%, #fff); margin-top: 6px; }
.mode-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-card.compact {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  text-align: center;
  min-height: 0;
  padding: 10px 6px 8px;
  border-radius: 16px;
  row-gap: 2px;
}
.mode-card.compact .mc-ico { grid-row: auto; font-size: 26px; }
.mode-card.compact .mc-name { font-size: 13px; }
.mode-card.compact.sel::before { width: 18px; height: 18px; font-size: 11px; top: 5px; right: 5px; }
.mode-card.ro { cursor: default; }
.mode-card.ro:not(.sel) { opacity: .5; }
.mode-card.ro:hover { translate: none; }
.mode-grid.compact[data-desc]::after {
  content: attr(data-desc);
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 2px 6px 0;
}

/* Solo-Screen */
.solo-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.solo-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.solo-lead { font-size: 16px; text-align: center; color: #d9d4ff; max-width: 760px; margin: 0 auto !important; }
#solo-start { width: min(100%, 520px); margin: 0 auto; }

/* Freunde */
.fr-create-card { align-items: center; text-align: center; overflow: hidden; }
.fr-create-card .btn-play { width: 100%; }
.fr-hero { display: flex; gap: 14px; font-size: 34px; margin-bottom: 2px; }
.fr-hero span { animation: hop 1.4s var(--ease-out) infinite; }
.fr-hero span:nth-child(2) { animation-delay: .14s; }
.fr-hero span:nth-child(3) { animation-delay: .28s; }
.fr-duel { width: 100%; min-height: 42px; font-size: 15px; }
.fr-browse { width: 100%; }

/* ------------------------------------------------------------------ */
/* Lobby                                                                */
/* ------------------------------------------------------------------ */
.screen-lobby { padding-top: calc(16px + var(--safe-t)); padding-bottom: 0; }
.screen-lobby .scr-head { max-width: 1100px; }
.lb-count { font-variant-numeric: tabular-nums; }
.lb-connect {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 30px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lb-connect-text { font-size: 19px; font-weight: 600; }
.lb-spinner { display: flex; gap: 10px; }
.lb-spinner span {
  width: 18px;
  height: 17px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 34% 28%, #c9f6ff 0 12%, var(--cyan) 46%, #1593b8 100%);
  box-shadow: 0 0 12px rgba(79, 227, 255, .6);
  animation: hop 1s var(--ease-out) infinite;
}
.lb-spinner span:nth-child(2) { animation-delay: .15s; background: radial-gradient(circle at 34% 28%, #ffd1f4 0 12%, var(--pink) 46%, #a8238c 100%); }
.lb-spinner span:nth-child(3) { animation-delay: .3s; background: radial-gradient(circle at 34% 28%, #fff3b5 0 12%, var(--yellow) 46%, #c79300 100%); }

.lb-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 110px;
}
.lb-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lb-code-card { padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.lb-code-top { display: flex; align-items: center; gap: 14px; }
.lb-code-box { flex: 1; min-width: 0; }
.lb-code-label { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.lb-code { display: flex; gap: 8px; }
.lb-ch {
  flex: 1;
  max-width: 76px;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(79, 227, 255, .18), rgba(255, 79, 216, .14));
  border: 2px solid rgba(79, 227, 255, .5);
  text-shadow: 0 0 10px #fff, 0 0 24px var(--cyan);
  box-shadow: inset 0 0 18px rgba(79, 227, 255, .2), 0 6px 0 rgba(0, 0, 0, .35);
  animation: popIn .5s var(--ease-back) both;
  animation-delay: calc(var(--i, 0) * 80ms);
}
.lb-qr-btn {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(79, 227, 255, .35);
  transition: transform .2s var(--ease-back);
}
.lb-qr-btn:hover { transform: scale(1.06) rotate(-2deg); }
.lb-qr { width: 88px; height: 88px; display: block; image-rendering: pixelated; }
.lb-qr-cap { font-size: 11px; font-weight: 700; color: #1b1640 !important; letter-spacing: .08em; text-transform: uppercase; }
.lb-share-row { display: flex; gap: 10px; }
.lb-share-row .btn { flex: 1; min-height: 48px; font-size: 16px; }

.lb-members-card { padding: 14px; }
.lb-members-card .panel-head h3, .lb-settings-card .panel-head h3, .lb-chat-card .panel-head h3 { font-size: 19px; }
.lb-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lb-mem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  border: 2px solid transparent;
  transition: border-color .25s, background .25s;
  animation: popIn .4s var(--ease-back) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.lb-mem.me { background: rgba(79, 227, 255, .1); }
.lb-mem.ready { border-color: rgba(93, 255, 158, .6); background: rgba(93, 255, 158, .1); }
.lb-av { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.lb-av canvas { width: 52px; height: 52px; display: block; }
.lb-mem.ready .lb-av canvas { animation: bob 1.2s ease-in-out infinite; }
.lb-av-bot { font-size: 30px; opacity: .8; }
.lb-crown { position: absolute; top: -12px; left: 50%; translate: -50% 0; font-size: 20px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); animation: hop 1.8s var(--ease-out) infinite; }
.lb-mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-mname { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-you { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--cyan); color: #04202c; flex: none; }
.lb-mstate { font-size: 13px; color: var(--muted); }
.lb-mem.ready .lb-mstate { color: var(--green); font-weight: 700; }
.lb-acts { display: flex; gap: 6px; flex: none; }
.lb-act {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 16px;
  transition: background .15s, transform .15s;
}
.lb-act:hover { background: rgba(255, 255, 255, .15); transform: scale(1.08); }
.lb-kick:hover { background: rgba(255, 84, 112, .3); }
.lb-bots { background: none; border: 2px dashed rgba(255, 255, 255, .12); color: var(--muted); font-weight: 600; }
.lb-invite { background: none; padding: 0; border: 0; }
.lb-invite-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 2px dashed rgba(255, 79, 216, .55);
  background: rgba(255, 79, 216, .08);
  color: #ffc3f1 !important;
  font: 700 16px var(--font);
  cursor: pointer;
  animation: recPulse 1.6s ease-in-out infinite;
}

.lb-settings-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.lb-host-hint { font-weight: 700; color: var(--muted); }
.lb-host-hint.me { color: var(--yellow); }
.lb-settings-card.ro .lb-rows { opacity: .65; }
.lb-preset {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px 14px;
  border-radius: 16px;
  border: 2px solid rgba(255, 77, 109, .5);
  background: linear-gradient(110deg, rgba(255, 77, 109, .22), transparent 70%);
  cursor: pointer;
  transition: translate .12s, box-shadow .2s;
}
.lb-preset > span:first-child { grid-row: 1 / 3; font-size: 26px; }
.lb-preset b { font-size: 16px; }
.lb-preset:hover { translate: 0 -2px; box-shadow: 0 0 20px rgba(255, 77, 109, .35); }
.lb-preset.on { border-color: #ff4d6d; box-shadow: 0 0 22px rgba(255, 77, 109, .45); }
.lb-rows .set-row { min-height: 54px; }
.lb-row.off input[type=range] { opacity: .4; }
.lb-rows .seg-btn:disabled, .lb-rows input:disabled { cursor: not-allowed; }
.seg-wrap { flex-wrap: wrap; justify-content: flex-end; }
.seg-btn:disabled:not(.on) { opacity: .55; }

.lb-chat-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lb-chat-log {
  height: 210px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .28);
  user-select: text;
  -webkit-user-select: text;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.lb-chat-empty { margin: auto; color: var(--muted); font-size: 14px; }
.lb-msg { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 15px; line-height: 1.3; animation: toastIn .25s var(--ease-back); }
.lb-msg-name { font-weight: 700; color: var(--cyan); }
.lb-msg-text { color: #f0eaff; word-break: break-word; }
.lb-msg.mine .lb-msg-name::after { content: ' (Du)'; color: var(--muted); font-weight: 600; font-size: 12px; }
.lb-msg.sys { color: var(--muted); font-size: 13px; font-style: italic; justify-content: center; }
.lb-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-qc {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .07);
  font: 600 14px var(--font);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.lb-qc:hover { background: rgba(255, 255, 255, .15); transform: translateY(-2px); }
.lb-chat-row { display: flex; gap: 8px; }
.lb-chat-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: 600 16px var(--font);
  user-select: text;
  -webkit-user-select: text;
}
.lb-chat-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(79, 227, 255, .18); }
.lb-send { min-height: 48px; padding: 0 16px; font-size: 20px; }

.lb-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 18px calc(16px + var(--safe-r)) calc(14px + var(--safe-b)) calc(16px + var(--safe-l));
  background: linear-gradient(180deg, rgba(10, 8, 22, 0) 0%, rgba(10, 8, 22, .92) 30%, rgba(10, 8, 22, .98) 100%);
  pointer-events: auto;
}
.lb-bar .btn { flex: 1; max-width: 340px; min-height: 66px; }
.lb-bar.solo .lb-ready { max-width: 520px; }
.lb-ready.on { --b1: #8dffbf; --b2: #2fd57c; --bd: #13804a; --bt: #04210f; box-shadow: 0 6px 0 var(--bd), 0 0 26px rgba(93, 255, 158, .45), inset 0 2px 0 rgba(255, 255, 255, .35); }
.lb-ready:not(.on) { animation: playPulse 1.6s ease-in-out infinite; }
.lb-start { animation: playPulse 1.8s ease-in-out infinite; }

/* Start-Countdown über dem Spiel */
.go-countdown {
  --mc: #ffd23f;
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(13, 11, 26, .45), transparent 60%);
}
.go-countdown.show { display: flex; }
.go-num {
  font-size: clamp(110px, 26vw, 220px);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 14px #fff, 0 0 40px var(--mc), 0 0 90px var(--mc), 0 8px 0 rgba(0, 0, 0, .35);
  animation: goPop .3s var(--ease-back) both;
}
.go-num.go { color: var(--mc); font-size: clamp(90px, 20vw, 180px); animation: goPop .35s var(--ease-back) both, goOut .5s ease .35s forwards; }
.go-mode { font-size: clamp(22px, 5vw, 34px); font-weight: 700; color: #fff; text-shadow: 0 0 18px var(--mc); animation: popIn .35s var(--ease-back) both, goOut .5s ease .4s forwards; }
@keyframes goPop { from { opacity: 0; transform: scale(2.4) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes goOut { to { opacity: 0; transform: scale(1.4); } }

/* ------------------------------------------------------------------ */
/* Raumliste                                                            */
/* ------------------------------------------------------------------ */
.rm-live .dot { width: 9px; height: 9px; border-radius: 50%; background: #6b6690; }
.rm-live.ok .dot { background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s ease-in-out infinite; }
.rm-filter { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.rm-filter::-webkit-scrollbar { display: none; }
.rm-chip {
  --mc: var(--cyan);
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, .06);
  font: 700 14px var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.rm-chip.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 22%, transparent); }
.rm-list { display: flex; flex-direction: column; gap: 10px; min-height: 140px; }
.rm-row {
  --mc: var(--cyan);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mc);
  background: linear-gradient(100deg, color-mix(in srgb, var(--mc) 16%, transparent), transparent 55%), var(--glass-solid);
  animation: popIn .4s var(--ease-back) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.rm-row.full { opacity: .6; }
.rm-ico { font-size: 30px; flex: none; }
.rm-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rm-title { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.rm-kind { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); letter-spacing: .04em; }
.rm-kind-twitch { background: var(--twitch); color: #fff; }
.rm-kind-private { background: rgba(255, 79, 216, .25); color: #ffc3f1; }
.rm-kind-public { background: rgba(79, 227, 255, .2); color: #c9f6ff; }
.rm-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-people { font-weight: 700; font-size: 15px; white-space: nowrap; flex: none; }
.rm-acts { display: flex; gap: 8px; flex: none; }
.rm-acts .btn { min-height: 42px; padding: 6px 14px; font-size: 15px; border-radius: 14px; }
.rm-empty { padding: 30px 14px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: #e6e2ff; }
.rm-empty-ico { font-size: 40px; animation: hop 1.6s var(--ease-out) infinite; }
#rm-create { width: 100%; }

/* ------------------------------------------------------------------ */
/* Anmelden, Anbieter-Badges                                           */
/* ------------------------------------------------------------------ */
.btn-twitch { --b1: #a970ff; --b2: var(--twitch); --bd: var(--twitch-d); --bt: #fff; flex-direction: row; gap: 10px; }
.btn-login {
  --b1: #4b4580; --b2: #352f66; --bd: #1f1a45; --bt: #fff;
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--bd), 0 8px 16px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .25);
  flex-direction: row;
  gap: 8px;
}
.btn-login .d-short { display: none; }
.prov-ico {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.prov-twitch { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M4 2 2.5 6v14h5v3h3l3-3h4l5-5V2H4zm16 12-3 3h-5l-3 3v-3H5V4h15v10z'/%3E%3Cpath fill='%23fff' d='M15 7h2v5h-2zM10 7h2v5h-2z'/%3E%3C/svg%3E"); }
.prov-discord { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M19.5 5.3A17 17 0 0 0 15.3 4l-.5 1.1a15.6 15.6 0 0 0-5.6 0L8.7 4a17 17 0 0 0-4.2 1.3C1.8 9.3 1.1 13.2 1.4 17a17 17 0 0 0 5.2 2.6l1.1-1.8a11 11 0 0 1-1.7-.8l.4-.3a12.2 12.2 0 0 0 11.2 0l.4.3-1.7.8 1.1 1.8a17 17 0 0 0 5.2-2.6c.4-4.4-.7-8.3-3.1-11.7zM8.7 14.7c-1 0-1.9-1-1.9-2.2s.8-2.2 1.9-2.2 1.9 1 1.9 2.2-.8 2.2-1.9 2.2zm6.6 0c-1 0-1.9-1-1.9-2.2s.8-2.2 1.9-2.2 1.9 1 1.9 2.2-.8 2.2-1.9 2.2z'/%3E%3C/svg%3E"); }
.prov-badge {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px var(--bg1);
}
.prov-badge.prov-twitch { background-color: var(--twitch); }
.prov-badge.prov-discord { background-color: var(--discord); }
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.avatar-wrap .prov-badge { position: absolute; right: -4px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; }
.tb-account .avatar { border-color: var(--cyan); }

.login-card { text-align: center; display: flex; flex-direction: column; gap: 12px; }
.login-migs { font-size: 46px; animation: hop 1.6s var(--ease-out) infinite; }
.login-card h2 { font-size: 30px; }
.login-btns { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.login-btn { flex-direction: row; gap: 12px; width: 100%; }
.login-btn .prov-ico { width: 26px; height: 26px; }
#login-discord { --b1: #7983f5; --b2: var(--discord); --bd: #3640a8; --bt: #fff; }

/* Profil-Kopf (Meine Rekorde) */
.prof-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 14px; }
.prof-mig { flex: none; width: 64px; height: 64px; }
.prof-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prof-name { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; }

/* ------------------------------------------------------------------ */
/* Twitch-Studio                                                        */
/* ------------------------------------------------------------------ */
.st-chip.on { color: #fff; background: var(--twitch); border-color: transparent; box-shadow: 0 0 16px rgba(145, 70, 255, .6); }
.st-body { max-width: 760px; }
.st-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(145, 70, 255, .35), rgba(255, 79, 216, .14) 70%), var(--glass-solid);
  border: 1px solid rgba(145, 70, 255, .55);
  box-shadow: 0 0 34px rgba(145, 70, 255, .25);
}
.st-hero-ico { font-size: 54px; filter: drop-shadow(0 0 18px rgba(145, 70, 255, .9)); animation: bob 2.4s ease-in-out infinite; }
.st-hero-text h3 { font-size: 22px; margin-bottom: 6px !important; }
.st-feats { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: #efe6ff; }
.st-sec { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.st-sec-head { display: flex; align-items: center; gap: 10px; }
.st-sec-head h3 { font-size: 19px; }
.st-sec-ico { font-size: 22px; }
.st-who { display: flex; align-items: center; gap: 12px; }
.st-av { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--twitch); object-fit: cover; flex: none; }
.st-av-ini { display: grid; place-items: center; background: var(--twitch-d); font-weight: 700; font-size: 20px; }
.st-who-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.st-logout { min-height: 40px; font-size: 14px; padding: 6px 14px; }
.st-connect { width: 100%; }
.st-points { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.st-points.ok { background: rgba(93, 255, 158, .1); color: #c8ffe0; }
.st-points.warn { background: rgba(255, 210, 63, .1); color: #fff1c2; }
.st-fx { display: flex; flex-direction: column; gap: 6px; }
.st-fx-row {
  --fc: var(--twitch);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 18%, transparent), transparent 60%), rgba(255, 255, 255, .03);
  border-left: 3px solid var(--fc);
  transition: opacity .2s;
}
.st-fx-row.off { opacity: .45; }
.st-fx-ico { font-size: 24px; flex: none; width: 30px; text-align: center; }
.st-fx-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-fx-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.st-cmd { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .4); color: #d4baff; }
.st-fx-desc { font-size: 12px; color: var(--muted); line-height: 1.3; }
.st-cost { display: flex; align-items: center; gap: 4px; flex: none; }
.st-cost-ico { font-size: 14px; }
.st-cost-in {
  width: 78px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: 700 15px var(--font);
  text-align: right;
  user-select: text;
  -webkit-user-select: text;
}
.st-cost-in:focus { outline: none; border-color: var(--twitch); }
.st-sync { width: 100%; }
.st-row { min-height: 60px; }
.st-row .set-label { display: flex; flex-direction: column; gap: 2px; }
.st-sub { font-size: 13px; font-weight: 500; color: var(--muted); }
.st-link { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 8px; align-items: center; }
.st-link-label { grid-column: 1 / 3; font-size: 13px; font-weight: 700; color: var(--muted); }
.st-link-url {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .35);
  color: #e6dcff;
  font: 500 14px ui-monospace, 'Cascadia Mono', Consolas, monospace;
  user-select: text;
  -webkit-user-select: text;
}
.st-copy { min-height: 42px; padding: 6px 14px; font-size: 14px; }
.st-obs { margin: 4px 0 0; padding-left: 22px; font-size: 14px; color: #e6e2ff; display: flex; flex-direction: column; gap: 3px; }
.st-start { width: 100%; }

/* ------------------------------------------------------------------ */
/* Zuschauer-Landing (?tw=kanal)                                        */
/* ------------------------------------------------------------------ */
.screen-twland { display: flex; align-items: center; justify-content: center; padding-top: calc(var(--tb-h) + var(--safe-t)); }
.tw-wrap { width: 100%; max-width: 560px; margin: auto; }
.tw-card {
  padding: 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 2px solid rgba(145, 70, 255, .6);
  background: radial-gradient(120% 80% at 50% 0%, rgba(145, 70, 255, .4), transparent 60%), var(--glass-solid);
  box-shadow: 0 0 50px rgba(145, 70, 255, .35), 0 18px 40px rgba(0, 0, 0, .4);
  animation: popIn .5s var(--ease-back) both;
}
.tw-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: #eb0400; color: #fff; }
.tw-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1s ease-in-out infinite; }
.tw-title { font-size: clamp(30px, 7vw, 44px); line-height: 1.08; }
.tw-chan { color: #d4baff; text-shadow: 0 0 18px var(--twitch), 0 0 40px rgba(145, 70, 255, .6); }
.tw-lead { font-size: 16px; color: #efe6ff; }
.tw-id { display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 18px; background: rgba(0, 0, 0, .25); }
.tw-mig { width: 84px; height: 84px; animation: bob 2.4s ease-in-out infinite; }
.tw-idcol { display: flex; flex-direction: column; text-align: left; }
.tw-name { font-size: 20px; }
.tw-btn { width: 100%; }
.tw-btn-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.btn-xl.btn-twitch .btn-play-label { font-size: 24px; }
.tw-row { display: flex; gap: 10px; width: 100%; }
.tw-row .btn { flex: 1; }

/* ------------------------------------------------------------------ */
/* Ergebnis: Teilen, Clip, Herausforderung                              */
/* ------------------------------------------------------------------ */
.res-share { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-btn {
  flex: 1 1 0;
  min-width: 100px;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass-solid);
  cursor: pointer;
  font: 700 13px var(--font);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  transition: translate .12s, border-color .2s, box-shadow .2s;
}
.share-btn:hover { translate: 0 -2px; border-color: rgba(79, 227, 255, .5); }
.share-btn:active { translate: 0 3px; box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.sb-ico { font-size: 24px; }
.share-btn.hot {
  border-color: var(--pink);
  background: linear-gradient(160deg, rgba(255, 79, 216, .3), transparent 70%), var(--glass-solid);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 22px rgba(255, 79, 216, .45);
  animation: recPulse 1.2s ease-in-out infinite;
}
.share-btn.busy { opacity: .6; pointer-events: none; }
.share-btn.busy .sb-ico { animation: hop .8s var(--ease-out) infinite; }

.res-chbox { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; border-color: rgba(255, 84, 112, .5); }
.res-chbox.won { border-color: rgba(255, 210, 63, .7); box-shadow: 0 0 30px rgba(255, 210, 63, .25); }
.chb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.chb-side { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.chb-side.best { background: rgba(255, 210, 63, .14); box-shadow: inset 0 0 0 2px rgba(255, 210, 63, .55); }
.chb-name { font-size: 14px; color: var(--muted); font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chb-val { font-size: 30px; font-weight: 700; }
.chb-side.best .chb-val { color: var(--yellow); text-shadow: 0 0 14px rgba(255, 210, 63, .6); }
.chb-vs { font-size: 20px; font-weight: 700; color: var(--pink); text-shadow: 0 0 12px var(--pink); }
.chb-diff { text-align: center; font-size: 15px; font-weight: 600; color: #e6e2ff; }
.chb-back { min-height: 46px; }

/* Online-Overlay V2 */
.ov-mode {
  --mc: var(--cyan);
  font-size: 18px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 14px;
  color: #fff;
  background: color-mix(in srgb, var(--mc) 22%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mc) 60%, transparent);
  animation: popIn .45s var(--ease-back) both;
}
.ov-next {
  --mc: var(--cyan);
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 999px;
  align-self: center;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc) 60%, transparent);
}
.ov-next b { color: color-mix(in srgb, var(--mc) 70%, #fff); }
.ov-ranking li { grid-template-columns: 26px 20px 1fr auto auto; }
.ov-ranking li.team { box-shadow: inset 3px 0 0 var(--tc); }
.ov-ranking li.zombie .o-name { color: #a8f07a; }
.o-duel {
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 77, 109, .2);
  font-size: 13px;
  cursor: pointer;
}
.o-duel:hover { background: rgba(255, 77, 109, .4); }
.ov-buttons .btn-pink { flex: 1; }

/* Willkommensgeschenk / QR */
.gift-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gift-box { font-size: 64px; animation: giftShake 1.2s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(255, 79, 216, .7)); }
@keyframes giftShake { 0%, 70%, 100% { rotate: 0deg; scale: 1; } 75% { rotate: -10deg; scale: 1.1; } 85% { rotate: 10deg; scale: 1.1; } 92% { rotate: -5deg; } }
.gift-card h2 { font-size: 30px; }
.gift-text { font-size: 16px; color: #e6e2ff; }
.gift-mig { width: 120px; height: 120px; }
.gift-items { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gift-item { padding: 8px 14px; border-radius: 999px; font-weight: 700; background: rgba(255, 210, 63, .14); border: 1px solid rgba(255, 210, 63, .5); color: #fff1c2; }
.gift-card .btn-play { width: 100%; margin-top: 6px; }
.qr-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-big { width: 260px; height: 260px; border-radius: 16px; image-rendering: pixelated; box-shadow: 0 0 34px rgba(79, 227, 255, .4); }
.qr-code { font-size: 44px; font-weight: 700; letter-spacing: .3em; margin-right: -.3em; text-shadow: 0 0 18px var(--cyan); }
.qr-url { word-break: break-all; user-select: text; -webkit-user-select: text; }

/* ------------------------------------------------------------------ */
/* Einstellungen: Musik & Controller                                   */
/* ------------------------------------------------------------------ */
.settings-music, .pad-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 17px; font-weight: 700; }
.track-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.track-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, .04);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, translate .12s;
}
.track-btn:hover { translate: 0 -2px; }
.track-btn.on { border-color: var(--cyan); background: rgba(79, 227, 255, .12); box-shadow: 0 0 18px rgba(79, 227, 255, .25); }
.track-btn.on .tr-ico { animation: bob 1s ease-in-out infinite; }
.track-btn.locked { opacity: .55; }
.tr-ico { font-size: 22px; flex: none; }
.tr-text { display: flex; flex-direction: column; min-width: 0; }
.tr-name { font-weight: 700; font-size: 15px; }
.tr-mood { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pad-state { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.pad-state.on { background: rgba(93, 255, 158, .18); color: var(--green); }
.pad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pad-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.pad-key {
  flex: none;
  min-width: 44px;
  height: 34px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(180deg, #4b4580, #352f66);
  box-shadow: 0 3px 0 #1f1a45;
}
.pad-text { display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; min-width: 0; }
.pad-text b { font-size: 14px; }
.chip-mode { --mc: var(--green); border-color: color-mix(in srgb, var(--mc) 60%, transparent) !important; background: color-mix(in srgb, var(--mc) 16%, transparent) !important; }

/* ------------------------------------------------------------------ */
/* Controller-Fokus (MigsGamepadUI) – gut sichtbarer Neon-Rahmen        */
/* ------------------------------------------------------------------ */
.gp-focus,
[data-gp-focus],
.gamepad-focus,
body.gp-mode #ui :focus-visible {
  outline: 3px solid var(--cyan) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(79, 227, 255, .25), 0 0 28px rgba(79, 227, 255, .55) !important;
  z-index: 2;
}
/* Gelbe Haupt-Buttons: weißer Rahmen + Cyan-Schein (gelb auf gelb war kaum zu sehen) */
.btn-play.gp-focus, .btn-play[data-gp-focus], body.gp-mode #ui .btn-play:focus-visible { outline-color: #fff !important; box-shadow: 0 0 0 7px rgba(79, 227, 255, .35), 0 0 34px rgba(79, 227, 255, .7), 0 0 60px rgba(255, 210, 63, .45) !important; }

/* ------------------------------------------------------------------ */
/* Responsiv V2                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .lb-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .solo-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .btn-login .d-label { display: none; }
  .btn-login .d-short { display: inline; }
  .avatar-wrap .prov-badge { width: 15px; height: 15px; }
  .mode-card { min-height: 0; padding: 10px; column-gap: 10px; }
  .mc-ico { font-size: 28px; }
  .mc-name { font-size: 16px; }
  .mc-desc { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .mode-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lb-ch { border-radius: 12px; }
  .lb-qr { width: 72px; height: 72px; }
  .lb-chat-log { height: 170px; }
  .lb-bar .btn { min-height: 58px; font-size: 19px; }
  .rm-row { flex-wrap: wrap; gap: 8px 10px; }
  .rm-col { flex: 1 1 calc(100% - 50px); }
  .rm-people { margin-left: 40px; }
  .rm-acts { margin-left: auto; }
  .st-fx-row { flex-wrap: wrap; }
  .st-fx-col { flex: 1 1 calc(100% - 44px); }
  .st-cost { margin-left: 40px; }
  .st-hero { flex-direction: column; text-align: center; }
  .track-grid, .pad-grid { grid-template-columns: 1fr; }
  .share-btn { min-width: 70px; padding: 8px 4px; font-size: 12px; }
  .sb-ico { font-size: 20px; }
  .ch-banner { flex-wrap: wrap; }
  .ch-accept { width: 100%; }
  .chb-val { font-size: 24px; }
}
@media (max-width: 380px) {
  .mode-grid { grid-template-columns: 1fr; }
  .lb-share-row { flex-direction: column; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .lb-chat-log { height: 120px; }
  .lb-bar { padding-top: 10px; }
  .lb-bar .btn { min-height: 50px; }
}

/* Countdown über der Lobby (Host-Start) */
.go-countdown.lobby { background: radial-gradient(circle at 50% 50%, rgba(13, 11, 26, .78), rgba(13, 11, 26, .55) 70%); z-index: 35; }
/* Badges auf kleinen Kacheln nicht über den Titel legen */
.tile-small .badge-new { top: auto; bottom: 6px; right: 6px; font-size: 10px; padding: 1px 6px; }
.tile-small:has(.badge-new) .tile-sub { padding-right: 62px; }
.rm-filter { flex-wrap: wrap; justify-content: center; overflow: visible; }
@media (max-width: 600px) {
  .rm-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
}

/* ===================================================================== */
/* V3: Spielwelten, Hype, Murmel-Menü, Lobby-Karte, Stream-Studio V3      */
/* ===================================================================== */
:root { --marble: #39d7ff; --marble2: #ff7ad9; --tiktok: #fe2c55; --tiktok2: #25f4ee; --yt: #ff0033; --kick: #53fc18; }

/* Profilleiste: Saison + Crew */
.chip-season, .chip-crew { cursor: pointer; border: 1px solid var(--line); font: inherit; color: var(--text); }
.chip-season { color: #fff3c4; background: linear-gradient(120deg, rgba(255, 210, 63, .22), rgba(255, 79, 216, .18)), rgba(0, 0, 0, .25); }
.chip-season .season-ico { font-size: 15px; }
.chip-season.ready { box-shadow: 0 0 14px rgba(255, 210, 63, .7); animation: blink 1.4s ease-in-out infinite; }
.chip-crew { font-weight: 700; letter-spacing: .06em; color: #c9fff0; background: rgba(46, 230, 184, .16); }
.chip-season:hover, .chip-crew:hover { border-color: rgba(255, 255, 255, .3); }
.chip-season[hidden], .chip-crew[hidden] { display: none; }

/* Weltzähler */
.world-line {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 4px 8px;
  margin-top: -2px !important; padding: 5px 14px; border-radius: 999px; font-size: 15px;
  background: linear-gradient(90deg, rgba(79, 227, 255, .14), rgba(255, 79, 216, .12)); border: 1px solid rgba(79, 227, 255, .25);
  color: #e9fbff; max-width: 100%;
}
.world-line[hidden] { display: none; }
.world-ico { font-size: 16px; }
.world-num { font-size: 18px; color: #fff; text-shadow: 0 0 12px rgba(79, 227, 255, .8); font-variant-numeric: tabular-nums; }
.world-extra { font-size: 12px; color: var(--muted); }
.world-line.bump .world-num { animation: bump .45s var(--ease-back); }

/* Spielwelten */
.tiles-head { width: 100%; display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 6px 0 -4px !important; }
.tiles-head::before, .tiles-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent); }
.worlds { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.world-tile {
  grid-column: 1 / -1;
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 132px; padding: 16px 18px; border-radius: 22px; text-align: left; cursor: pointer; color: var(--text);
  border: 1px solid rgba(57, 215, 255, .45);
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 122, 217, .32), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(57, 215, 255, .3), transparent 60%), var(--glass-solid);
  box-shadow: 0 7px 0 rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .35), 0 0 34px rgba(57, 215, 255, .18), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: translate .12s ease, box-shadow .15s ease;
  font: inherit;
}
.world-tile:hover { translate: 0 -3px; box-shadow: 0 10px 0 rgba(0, 0, 0, .35), 0 18px 36px rgba(0, 0, 0, .35), 0 0 44px rgba(57, 215, 255, .35); }
.world-tile:active { translate: 0 4px; }
.world-tile .badge-new { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--pink); color: #fff; box-shadow: 0 0 10px var(--pink); animation: blink 1.4s ease-in-out infinite; z-index: 1; }
.wt-kicker { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: #8ff0ff; position: relative; }
.wt-title { font-size: 28px; font-weight: 700; line-height: 1.05; position: relative; text-shadow: 0 0 18px rgba(57, 215, 255, .6); display: flex; align-items: center; gap: 8px; }
.wt-ico { font-size: 30px; filter: drop-shadow(0 0 10px rgba(255, 122, 217, .9)); }
.wt-sub { font-size: 14px; color: #e3e0ff; position: relative; max-width: 70%; }
.wt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; position: relative; }
.wt-chips span { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); }
.wt-art { position: absolute; right: 0; top: 0; bottom: 0; width: 42%; pointer-events: none; opacity: .95; }
.wt-ramp { position: absolute; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #4fe3ff, #b26bff); box-shadow: 0 0 10px rgba(79, 227, 255, .8); }
.wt-ramp.r1 { width: 60%; right: 8%; top: 30%; rotate: 12deg; }
.wt-ramp.r2 { width: 55%; right: 30%; top: 56%; rotate: -12deg; }
.wt-ramp.r3 { width: 50%; right: 6%; top: 82%; rotate: 10deg; }
.wt-ball { position: absolute; width: 18px; height: 18px; border-radius: 50%; top: -20px; box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .25), 0 0 12px currentColor; animation: wtRoll 3.6s cubic-bezier(.45, .05, .55, .95) infinite; }
.wt-ball.b1 { background: #ffd23f; color: #ffd23f; right: 60%; }
.wt-ball.b2 { background: #ff4fd8; color: #ff4fd8; right: 45%; animation-delay: -.9s; }
.wt-ball.b3 { background: #5dff9e; color: #5dff9e; right: 70%; animation-delay: -1.8s; }
.wt-ball.b4 { background: #4fe3ff; color: #4fe3ff; right: 30%; animation-delay: -2.7s; }
@keyframes wtRoll {
  0% { translate: 0 0; opacity: 0; }
  8% { opacity: 1; }
  30% { translate: -40px 36px; }
  55% { translate: 30px 74px; }
  80% { translate: -26px 112px; }
  100% { translate: 10px 150px; opacity: 0; }
}
.reduced-motion .wt-ball { animation: none; top: 40%; }
.tile-editor { --tc: #ffb347; }
.tile-modes3 { --tc: #7ddc3a; }
.tile-season { --tc: var(--yellow); }
.tile-achievements { --tc: #ff7a45; }
.tile-crew { --tc: #2ee6b8; }
.worlds .tile-small { min-height: 60px; }
@media (min-width: 560px) {
  .worlds { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .worlds .world-tile { grid-column: span 4; grid-row: span 2; }
  .worlds .tile-small { grid-column: span 2; }
}
@media (max-width: 559px) {
  .world-tile { min-height: 118px; padding: 14px; }
  .wt-title { font-size: 24px; }
  .wt-sub { max-width: 100%; font-size: 13px; }
  .wt-art { width: 38%; opacity: .55; }
}
.pwa-install { width: 100%; min-height: 48px; font-size: 15px; gap: 6px; border-style: dashed; }
.pwa-install[hidden] { display: none; }

/* Murmel-Menü */
.mr-coins { margin-left: auto; }
.mr-hero {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(57, 215, 255, .28), rgba(255, 122, 217, .2) 70%), var(--glass-solid);
  border: 1px solid rgba(57, 215, 255, .45); box-shadow: 0 0 34px rgba(57, 215, 255, .2);
}
.mr-hero-ball { font-size: 30px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(57, 215, 255, .35) 45%, rgba(20, 16, 50, .8)); box-shadow: 0 0 18px rgba(57, 215, 255, .6);
  animation: bob 2.2s ease-in-out infinite; }
.mr-hero-ball.m2 { animation-delay: -.7s; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(255, 122, 217, .4) 45%, rgba(20, 16, 50, .8)); margin-left: -22px; }
.mr-hero-ball.m3 { animation-delay: -1.4s; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(255, 210, 63, .4) 45%, rgba(20, 16, 50, .8)); margin-left: -22px; }
.mr-hero-text { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #e6e2ff; min-width: 0; }
.mr-hero-text b { font-size: 20px; color: #fff; }
.mr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mr-card {
  --mc: var(--marble);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; min-height: 120px; border-radius: 20px; text-align: left;
  cursor: pointer; color: var(--text); font: inherit; border: 1px solid color-mix(in srgb, var(--mc) 45%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 26%, transparent), transparent 65%), var(--glass-solid);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 12px 26px rgba(0, 0, 0, .3); transition: translate .12s ease, box-shadow .15s;
}
.mr-card:hover { translate: 0 -3px; box-shadow: 0 9px 0 rgba(0, 0, 0, .35), 0 0 26px color-mix(in srgb, var(--mc) 40%, transparent); }
.mr-card:active { translate: 0 4px; }
.mr-card.disabled { filter: grayscale(.8) brightness(.7); }
.mr-tour { --mc: var(--yellow); }
.mr-online { --mc: #2ee6b8; }
.mr-lobby { --mc: var(--pink); }
.mr-ico { font-size: 34px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--mc) 80%, transparent)); }
.mr-name { font-size: 20px; font-weight: 700; }
.mr-desc { font-size: 13px; color: var(--muted); line-height: 1.3; }
.mr-settings { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.mr-settings .seg-wrap { justify-content: flex-end; }
.mr-hint { margin: 4px 0 0 !important; }
@media (min-width: 760px) { .mr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 420px) {
  .mr-card { min-height: 104px; padding: 12px; }
  .mr-name { font-size: 17px; }
  .mr-ico { font-size: 28px; }
  .mr-settings .set-row { flex-wrap: wrap; }
  .mr-hero { padding: 12px; }
  .mr-hero-ball { width: 42px; height: 42px; font-size: 24px; }
}

/* Lobby: Spiel & Karte */
.lb-game { margin-bottom: 8px; }
.lb-game .seg-btn { flex: 1; }
.lb-map-btn { min-height: 38px; padding: 4px 12px; font-size: 14px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-map-row.off { opacity: .55; }
.lb-rows[hidden], .lb-marble-row[hidden], .mode-grid[hidden] { display: none; }
.maps-card { max-width: 520px; width: 100%; }
.maps-tabs { margin: 6px 0 10px; }
.maps-list { display: flex; flex-direction: column; gap: 8px; max-height: min(52vh, 420px); overflow-y: auto; padding-right: 4px; }
.map-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); transition: border-color .15s, background .15s;
}
.map-item:hover { border-color: rgba(79, 227, 255, .5); background: rgba(79, 227, 255, .08); }
.map-item.sel { border-color: var(--cyan); box-shadow: 0 0 14px rgba(79, 227, 255, .35); }
.map-ico { font-size: 26px; flex: none; }
.map-col { display: flex; flex-direction: column; min-width: 0; }
.map-col b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maps-editor { width: 100%; margin-top: 10px; }

/* Stream-Studio V3 */
.st-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(13, 11, 26, .85); overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 3; backdrop-filter: blur(8px); }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px 14px; border-radius: 14px;
  border: 1px solid transparent; background: transparent; color: var(--muted); font: 700 15px var(--font); cursor: pointer; white-space: nowrap;
}
.st-tab:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.st-tab.on { color: #fff; background: linear-gradient(120deg, rgba(145, 70, 255, .55), rgba(255, 79, 216, .35)); border-color: rgba(255, 255, 255, .18); box-shadow: 0 0 18px rgba(145, 70, 255, .45); }
.st-tab[data-tab="tiktok"].on { background: linear-gradient(120deg, rgba(254, 44, 85, .6), rgba(37, 244, 238, .35)); box-shadow: 0 0 18px rgba(254, 44, 85, .45); }
.st-tab[data-tab="ytkick"].on { background: linear-gradient(120deg, rgba(255, 0, 51, .55), rgba(83, 252, 24, .3)); box-shadow: 0 0 18px rgba(255, 0, 51, .4); }
.st-tab[data-tab="donation"].on { background: linear-gradient(120deg, rgba(255, 210, 63, .5), rgba(93, 255, 158, .3)); color: #1b1600; }
.st-tab-ico { font-size: 18px; }
.st-game { flex-wrap: wrap; }
.st-game .seg-btn, .st-mlen .seg-btn { flex: 1; }
.st-mlen { flex-wrap: wrap; }
.st-modes { gap: 8px; }
.st-name-in, .st-se-in {
  min-width: 0; width: 220px; max-width: 55%; height: 40px; padding: 0 12px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .3); color: var(--text); font: 600 15px var(--font); user-select: text; -webkit-user-select: text;
}
.st-name-in:focus, .st-se-in:focus { outline: none; border-color: var(--cyan); }
.st-need { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-need li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.st-need-ico { font-size: 22px; width: 28px; text-align: center; flex: none; }
.st-need-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-ext { color: #8ff0ff; font-weight: 700; font-size: 14px; text-decoration: none; word-break: break-all; }
.st-ext:hover { text-decoration: underline; }
.st-ext::after { content: " ↗"; }
.st-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: stp; display: flex; flex-direction: column; gap: 8px; }
.st-steps li { counter-increment: stp; position: relative; padding: 8px 10px 8px 44px; border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 14px; line-height: 1.5; color: #ece8ff; }
.st-steps li::before {
  content: counter(stp); position: absolute; left: 10px; top: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pink); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 0 10px rgba(255, 79, 216, .6);
}
.st-k { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); border-bottom-width: 3px; background: rgba(255, 255, 255, .08); font: 700 13px var(--font); color: #fff; white-space: nowrap; }
.st-keyrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }
.st-keyrow .st-link-label { grid-column: 1 / 3; color: #ffd0d8; }
.st-keyacts { display: flex; gap: 6px; }
.st-keyacts .btn { min-height: 42px; padding: 6px 10px; font-size: 13px; }
.st-key { letter-spacing: .08em; }
.st-hooks { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px dashed rgba(255, 255, 255, .12); }
.st-hooks-head { font-size: 13px; font-weight: 700; color: #cfc8ff; }
.st-hook .st-link-label { color: #e6e2ff; font-weight: 600; }
.st-hook-url { font-size: 12px !important; }
.st-rules-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.st-rules-bar .btn { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.st-rules { display: flex; flex-direction: column; gap: 6px; }
.st-rule {
  display: grid; grid-template-columns: 1.1fr 1.2fr 1fr 1fr 1.2fr .7fr auto auto; gap: 6px; align-items: center;
  padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .04); border-left: 3px solid rgba(79, 227, 255, .5); transition: background .25s, box-shadow .25s;
}
.st-rule.off { opacity: .5; }
.st-rule.hit { background: rgba(93, 255, 158, .16); box-shadow: 0 0 16px rgba(93, 255, 158, .35); border-left-color: var(--green); }
.st-rule-head { background: transparent; border-left-color: transparent; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 8px; }
.st-rule select, .st-rule input[type="text"], .st-rule input[type="number"] {
  width: 100%; min-width: 0; height: 36px; padding: 0 6px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .35); color: var(--text); font: 600 13px var(--font); user-select: text; -webkit-user-select: text;
}
.st-rule select:disabled { opacity: .45; }
.st-rule option { background: #1d1842; color: #fff; }
.st-r-cond, .st-r-cdw { display: flex; align-items: center; gap: 4px; min-width: 0; }
.st-r-ab, .st-r-unit { font-size: 12px; color: var(--muted); flex: none; }
.st-r-del { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(255, 84, 112, .4); background: rgba(255, 84, 112, .12); color: #ffb3c0; cursor: pointer; font: 700 14px var(--font); }
.st-r-del:hover { background: rgba(255, 84, 112, .3); }
.st-r-desc { grid-column: 1 / -1; font-size: 12px; color: var(--muted); padding: 0 2px; }
.st-r-desc.err { color: #ffb3c0; font-weight: 700; }
.st-tests { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; }
.st-tests-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.st-test { min-height: 34px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.st-test:hover { border-color: var(--green); background: rgba(93, 255, 158, .12); }
.st-test:active { translate: 0 2px; }
.st-safe { flex-wrap: wrap; justify-content: flex-end; }
.st-editlayout { width: 100%; }
.st-ovl { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .22); }
.st-ovl-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.st-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.st-chk input { width: 18px; height: 18px; accent-color: var(--pink); }
.st-qr-row { display: flex; gap: 14px; align-items: center; }
.st-qr { width: 120px; height: 120px; flex: none; border-radius: 12px; background: #fff; padding: 4px; box-shadow: 0 0 22px rgba(79, 227, 255, .35); }
.st-qr-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-qr-col b { font-size: 20px; letter-spacing: .06em; }
.st-se-row { display: flex; gap: 8px; align-items: center; }
.st-se-row .st-se-in { flex: 1; max-width: none; width: auto; }
.st-points.ok { margin: 0; }
@media (max-width: 700px) {
  .st-rule { grid-template-columns: 1fr 1fr; }
  .st-rule-head { display: none; }
  .st-r-on, .st-r-del { justify-self: end; }
  .st-r-cdw { justify-self: start; }
}
@media (max-width: 420px) {
  .st-tab { padding: 6px 10px; font-size: 14px; min-height: 42px; }
  .st-tab-name { font-size: 13px; }
  .st-keyrow { grid-template-columns: 1fr; }
  .st-keyacts { flex-wrap: wrap; }
  .st-qr-row { flex-direction: column; align-items: flex-start; }
  .st-name-in { max-width: 100%; width: 100%; }
  .st-name { flex-wrap: wrap; }
  .st-steps li { padding-left: 40px; font-size: 13px; }
}
body.is-activity .tile-editor,
body.is-activity #btn-install { display: none; }
/* V3 Feinschliff: Abzeichen kleiner Kacheln als Reiter oben (Untertitel bleibt lesbar), Sprungziele unter den Studio-Tabs */
.worlds .tile-small .badge-new, .tiles .tile-season .badge-new, .tiles .tile-achievements .badge-new, .tiles .tile-crew .badge-new {
  top: 0; bottom: auto; right: 10px; font-size: 9px; padding: 1px 7px 2px; border-radius: 0 0 8px 8px; animation: none;
}
.worlds .tile-small:has(.badge-new) .tile-sub, .tiles .tile-season:has(.badge-new) .tile-sub,
.tiles .tile-achievements:has(.badge-new) .tile-sub, .tiles .tile-crew:has(.badge-new) .tile-sub { padding-right: 0; }
.st-sec { scroll-margin-top: 74px; }
.lb-map-btn { flex-direction: row; gap: 4px; }

/* ------------------------------------------------------------------ */
/* V4: Physik-Shows (Menü-Kachel, Show-Screen, Stream-Studio) und      */
/* verständliche Einstellungen (Kurztext, Beispiel, ⓘ, Empfohlen)      */
/* ------------------------------------------------------------------ */
.world-tile.tile-shows {
  border-color: rgba(255, 210, 63, .5);
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 210, 63, .26), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(255, 79, 216, .3), transparent 60%), var(--glass-solid);
  box-shadow: 0 7px 0 rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .35), 0 0 34px rgba(255, 79, 216, .2), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.world-tile.tile-shows:hover { box-shadow: 0 10px 0 rgba(0, 0, 0, .35), 0 18px 36px rgba(0, 0, 0, .35), 0 0 44px rgba(255, 79, 216, .38); }
.tile-shows .wt-kicker { color: #ffe27a; }
.tile-shows .wt-title { text-shadow: 0 0 18px rgba(255, 79, 216, .65); }
@media (min-width: 560px) { .worlds .world-tile.tile-shows { grid-column: 1 / -1; grid-row: auto; min-height: 120px; } }
.sh-art { width: 40%; }
.sh-ring { position: absolute; top: 50%; right: 18%; border-radius: 50%; border: 3px solid transparent; translate: 50% -50%;
  animation: shSpin 6s linear infinite; }
.sh-ring.o1 { width: 104px; height: 104px; border-color: #4fe3ff #4fe3ff #4fe3ff transparent; box-shadow: 0 0 14px rgba(79, 227, 255, .55); }
.sh-ring.o2 { width: 72px; height: 72px; border-color: #ff4fd8 transparent #ff4fd8 #ff4fd8; animation-duration: 4.2s; animation-direction: reverse; box-shadow: 0 0 12px rgba(255, 79, 216, .55); }
.sh-ring.o3 { width: 40px; height: 40px; border-color: #ffd23f #ffd23f transparent #ffd23f; animation-duration: 3s; box-shadow: 0 0 10px rgba(255, 210, 63, .55); }
.sh-pop { position: absolute; font-size: 20px; top: 50%; right: 18%; translate: 50% -50%; animation: shPop 3.4s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .5)); }
.sh-pop.p2 { animation-delay: -1.1s; }
.sh-pop.p3 { animation-delay: -2.2s; }
@keyframes shSpin { to { rotate: 360deg; } }
@keyframes shPop {
  0% { translate: 50% -50%; opacity: 0; scale: .6; }
  15% { opacity: 1; scale: 1; }
  70% { translate: calc(50% + 70px) calc(-50% - 34px); opacity: 1; }
  100% { translate: calc(50% + 110px) calc(-50% + 46px); opacity: 0; }
}
.reduced-motion .sh-ring, .reduced-motion .sh-pop { animation: none; }
.reduced-motion .sh-pop { opacity: 0; }
@media (max-width: 559px) { .sh-art { opacity: .5; } }

/* Show-Screen */
.sh-hero {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 79, 216, .28), rgba(255, 210, 63, .16) 70%), var(--glass-solid);
  border: 1px solid rgba(255, 79, 216, .45); box-shadow: 0 0 34px rgba(255, 79, 216, .2);
}
.sh-hero-ico { font-size: 54px; filter: drop-shadow(0 0 18px rgba(255, 210, 63, .8)); animation: bob 2.4s ease-in-out infinite; flex: none; }
.sh-hero-text { min-width: 0; }
.sh-hero-text h3 { font-size: 22px; margin-bottom: 6px !important; }
.sh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sh-card {
  --sc: var(--cyan);
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 18px 18px;
  min-height: 210px; border-radius: 24px; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  border: 1px solid color-mix(in srgb, var(--sc) 55%, transparent);
  background: radial-gradient(110% 90% at 100% 0%, color-mix(in srgb, var(--sc) 30%, transparent), transparent 65%), var(--glass-solid);
  box-shadow: 0 7px 0 rgba(0, 0, 0, .35), 0 14px 30px rgba(0, 0, 0, .32), 0 0 26px color-mix(in srgb, var(--sc) 22%, transparent);
  transition: translate .12s ease, box-shadow .15s;
}
.sh-card:hover, .sh-card:focus-visible { translate: 0 -4px; box-shadow: 0 11px 0 rgba(0, 0, 0, .35), 0 0 40px color-mix(in srgb, var(--sc) 45%, transparent); }
.sh-card:active { translate: 0 4px; }
.sh-ico { font-size: 56px; line-height: 1; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--sc) 85%, transparent)); }
.sh-name { font-size: 25px; font-weight: 700; line-height: 1.1; text-shadow: 0 0 16px color-mix(in srgb, var(--sc) 60%, transparent); }
.sh-desc { font-size: 15px; color: #e3e0ff; flex: 1; }
.sh-go { margin-top: 6px; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--sc) 24%, rgba(0, 0, 0, .3)); border: 1px solid color-mix(in srgb, var(--sc) 60%, transparent); }
.sh-stream .sh-tostudio { align-self: flex-start; min-height: 44px; font-size: 14px; }
@media (max-width: 759px) {
  .sh-grid { grid-template-columns: 1fr; }
  .sh-card { min-height: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; padding: 16px; }
  .sh-ico { grid-row: span 3; font-size: 46px; align-self: center; }
  .sh-name { font-size: 21px; }
  .sh-desc { font-size: 14px; }
  .sh-go { justify-self: start; }
  .sh-hero { padding: 14px; gap: 12px; }
  .sh-hero-ico { font-size: 40px; }
}

/* Stream-Studio: Physik-Show wählen */
.st-game-show {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit; border: 1px dashed rgba(255, 79, 216, .55);
  background: linear-gradient(110deg, rgba(255, 79, 216, .16), rgba(255, 210, 63, .08)), rgba(0, 0, 0, .2); transition: background .2s, box-shadow .2s;
}
.st-game-show:hover { box-shadow: 0 0 22px rgba(255, 79, 216, .3); }
.st-game-show.on { border-style: solid; border-color: var(--pink); background: linear-gradient(110deg, rgba(255, 79, 216, .34), rgba(255, 210, 63, .16)), rgba(0, 0, 0, .2);
  box-shadow: 0 0 26px rgba(255, 79, 216, .4), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.st-gs-ico { font-size: 32px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 210, 63, .7)); }
.st-gs-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-gs-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.st-gs-new { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 1px 7px; border-radius: 999px; background: var(--pink); color: #fff; box-shadow: 0 0 10px var(--pink); }
.st-gs-sub { font-size: 13px; color: var(--muted); }
.st-showtypes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-showtype {
  --sc: var(--cyan);
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 14px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit; border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 16%, transparent), transparent 70%), rgba(0, 0, 0, .25);
}
.st-showtype b { font-size: 15px; }
.st-showtype.on { border-color: var(--sc); box-shadow: 0 0 18px color-mix(in srgb, var(--sc) 45%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 32%, transparent), transparent 75%), rgba(0, 0, 0, .25); }
.st-st-ico { font-size: 26px; }
.st-st-desc { font-size: 12px; color: var(--muted); }
.st-showstudio, .st-showstudio2 { align-self: flex-start; min-height: 46px; font-size: 15px; }
.st-groupchips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-groupchip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
@media (max-width: 559px) { .st-showtypes { grid-template-columns: 1fr; } .st-showtype { flex-direction: row; align-items: center; flex-wrap: wrap; } .st-st-desc { flex-basis: 100%; } }

/* Verständliche Einstellungen */
.st-explain { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 12px; background: rgba(79, 227, 255, .06); border: 1px solid rgba(79, 227, 255, .14); }
.st-ex-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-ex-short { font-size: 14px; font-weight: 500; color: #e9e6ff; }
.st-ex { font-size: 13px; color: var(--muted); line-height: 1.35; }
.st-set { display: flex; flex-direction: column; gap: 4px; }
.st-set > .st-ex { padding: 0 2px 4px; }
.st-ttl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-rec { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  color: #1b1500; background: linear-gradient(90deg, var(--yellow), #ffe98a); box-shadow: 0 0 10px rgba(255, 210, 63, .45); }
.st-info-btn { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1px solid rgba(79, 227, 255, .5); background: rgba(79, 227, 255, .12);
  color: var(--cyan); font: 700 14px/1 var(--font); cursor: pointer; padding: 0; display: inline-grid; place-items: center; }
.st-info-btn:hover, .st-info-btn.on { background: var(--cyan); color: #06222b; box-shadow: 0 0 12px rgba(79, 227, 255, .6); }
.st-info-text { font-size: 13px; line-height: 1.45; color: #dcd8ff; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); border-left: 3px solid var(--cyan); }
.st-info-text[hidden] { display: none; }
.st-info-text p { margin: 0 0 4px; }
.st-info-text p:last-child { margin-bottom: 0; }

/* Regel-Editor: Voreinstellungen + Gruppen */
.st-presets { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.st-presets-label { font-size: 13px; font-weight: 700; color: var(--muted); align-self: center; }
.st-preset { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border-radius: 12px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); }
.st-preset:hover { border-color: var(--cyan); }
.st-preset.on { border-color: var(--green); background: rgba(93, 255, 158, .12); box-shadow: 0 0 14px rgba(93, 255, 158, .3); }
.st-preset-name { font-size: 15px; font-weight: 700; }
.st-preset-desc { font-size: 12px; color: var(--muted); line-height: 1.3; }
.st-preset-own { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.st-rgroup { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 4px; }
.st-rgroup-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 4px 4px 2px; border-bottom: 1px solid var(--line); }
.st-rgroup-head b { font-size: 16px; }
.st-rgroup-desc { font-size: 12px; color: var(--muted); flex: 1; min-width: 160px; }
.st-rgroup-n { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.st-rg-mitspielen .st-rule { border-left-color: rgba(79, 227, 255, .6); }
.st-rg-helfen .st-rule { border-left-color: rgba(93, 255, 158, .65); }
.st-rg-aergern .st-rule { border-left-color: rgba(255, 84, 112, .7); }
.st-rg-ziele .st-rule { border-left-color: rgba(255, 210, 63, .7); }
.st-r-desc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-r-text { color: #e6e2ff; font-weight: 600; font-size: 13px; }
.st-r-ex { grid-column: 1 / -1; font-size: 12px; color: var(--muted); padding: 0 2px; line-height: 1.35; }
.st-r-info { grid-column: 1 / -1; }
.st-addthanks { align-self: flex-start; min-height: 38px; font-size: 13px; padding: 4px 12px; }
.st-fx-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.st-fx-grp { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.st-fx-grp.help { background: rgba(93, 255, 158, .14); color: var(--green); }
.st-fx-grp.tease { background: rgba(255, 84, 112, .14); color: #ff9aae; }
@media (max-width: 700px) {
  .st-presets { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ */
/* Breitbild & große Monitore: gleicher Seitenabstand statt schmaler    */
/* Mittelspalte, mehr Spalten, etwas größere Oberfläche                 */
/* ------------------------------------------------------------------ */
:root { --gutter: clamp(16px, 3.5vw, 160px); }
@media (min-width: 1280px) {
  .screen {
    padding-left: calc(var(--gutter) + var(--safe-l));
    padding-right: calc(var(--gutter) + var(--safe-r));
  }
  .scr-head, .scr-body, .menu-wrap, .screen-lobby .scr-head { max-width: none; }
  .scr-body.narrow { max-width: 900px; }
  .solo-lead { max-width: 1100px; }
  /* Stream-Studio: Karten fließen in Spalten über die volle Breite */
  #st-body.scr-body { display: block; columns: 560px; column-gap: 24px; }
  #st-body > * { break-inside: avoid; margin: 0 0 22px; }
  #st-body > .st-hero, #st-body > .st-tabs { column-span: all; }
}
/* Oberfläche mit der Bildschirmhöhe mitwachsen lassen (z. B. 1440p/Ultrawide) */
@media (min-width: 1600px) and (min-height: 1000px) { #ui { zoom: 1.12; } }
@media (min-width: 2200px) and (min-height: 1200px) { #ui { zoom: 1.28; } }
@media (min-width: 3000px) and (min-height: 1400px) { #ui { zoom: 1.45; } }

/* Ergebnis-Screen: Freischalt-/Info-Meldungen nicht über Titel und Statistik legen */
body.state-result .toasts {
  top: calc(var(--tb-h) + var(--safe-t) + 8px);
  left: auto;
  right: calc(16px + var(--safe-r));
  translate: none;
  align-items: flex-end;
  width: min(300px, 24vw);
}
body.state-result .toast { font-size: 14px; padding: 10px 14px; }
@media (max-width: 1100px) {
  body.state-result .toasts {
    top: auto;
    bottom: calc(150px + var(--safe-b));
    right: 50%;
    translate: 50% 0;
    align-items: center;
    flex-direction: column-reverse;
    width: min(92vw, 420px);
  }
}

/* ===================================================================== */
/* Layout V5: Dashboard-Hauptmenü, Solo-Seitenleiste, Darstellung,       */
/* eigenes Teilen-Panel                                                   */
/* ===================================================================== */

/* ---------------- Hauptmenü als Dashboard (body.menu-dash, app.js applyMenuLayout) */
body.menu-dash #scr-menu {
  display: flex;
  flex-direction: column;
  container: menuscr / size;
  padding-bottom: calc(6px + var(--safe-b));
}
body.menu-dash #scr-menu > .menu-wrap { display: none; }
body.menu-dash .menu-dash {
  --dg: clamp(8px, 1.4cqh, 18px);
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: clamp(290px, 26%, 560px) minmax(0, 1fr) clamp(290px, 26%, 560px);
  gap: clamp(16px, 1.8cqw, 44px);
  padding-top: calc(var(--dg) * .5);
}
body.menu-dash .menu-foot { margin: 6px auto 0; font-size: 12px; opacity: .75; }
.dash-col { display: flex; flex-direction: column; gap: var(--dg); min-width: 0; }
.dash-alerts, .dash-foot { display: contents; }
.dash-group { display: flex; flex-direction: column; gap: calc(var(--dg) * .7); }
body.menu-dash .tiles-head { margin: 0 !important; font-size: 12px; }
/* Abzeichen als Reiter oben, Untertitel bleibt lesbar */
body.menu-dash .menu-dash .badge-new { top: 0; bottom: auto; right: 12px; font-size: 9px; padding: 1px 7px 2px; border-radius: 0 0 8px 8px; animation: none; }
body.menu-dash .menu-dash .tile:has(.badge-new) .tile-sub { padding-right: 0; }

/* links: Logo, Schnellstart-Karte (hervorgehoben), Zusammen spielen */
.dash-hero { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
body.menu-dash .logo { font-size: clamp(50px, 10cqh, 124px); margin-top: 28px !important; }
body.menu-dash .tagline { margin-top: 2px !important; text-align: center; font-size: clamp(14px, 1.9cqh, 19px); }
body.menu-dash .world-line { margin-top: 6px !important; }
body.menu-dash .ch-banner { padding-right: 40px; }
.dash-playcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(var(--dg) * .8);
  padding: 26px 14px 12px;
  border-color: rgba(255, 210, 63, .42);
  background: radial-gradient(120% 80% at 50% 100%, rgba(255, 197, 49, .18), transparent 62%), var(--glass-solid);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, .1), 0 0 44px rgba(255, 197, 49, .16), 0 18px 40px rgba(0, 0, 0, .35);
}
.dash-playcard::before {
  content: "\26A1  Schnell loslegen";
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -50%;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #2a1400;
  background: linear-gradient(90deg, #ffe066, #ffad1f);
  box-shadow: 0 0 16px rgba(255, 197, 49, .55);
}
.dash-playcard .identity { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dash-playcard #btn-play { width: 100%; min-height: clamp(70px, 10cqh, 104px); font-size: clamp(28px, 4.2cqh, 40px); }
.dash-playcard .online-line { justify-content: center; }
.dash-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--dg) * .8); }
body.menu-dash .pwa-install { min-height: 40px; }

/* Kacheln im Dashboard: senkrecht (Symbol oben), wachsen mit der Höhe */
body.menu-dash .dash-social .tile,
body.menu-dash .dash-play .tile,
body.menu-dash .dash-meta .tile {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-content: center;
  text-align: center;
  row-gap: 2px;
  padding: 12px 10px 10px;
}
body.menu-dash .dash-social .tile-ico, body.menu-dash .dash-play .tile-ico, body.menu-dash .dash-meta .tile-ico { grid-row: auto; }
body.menu-dash .menu-dash .tile .tile-sub { max-width: 100%; }
body.menu-dash .dash-social .tile { min-height: clamp(78px, 11cqh, 120px); }
body.menu-dash .dash-social .tile-ico { font-size: clamp(26px, 4cqh, 40px); }
body.menu-dash .dash-social .tile-title { font-size: clamp(15px, 2.1cqh, 20px); }

/* Mitte: Spielwelten groß + Solo/Kampagne/Tages-Challenge */
.dash-center { container: dashc / inline-size; }
.dash-worlds { flex: 3 1 auto; min-height: 0; display: flex; flex-direction: column; gap: calc(var(--dg) * .7); }
body.menu-dash .worlds {
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(116px, 1fr) minmax(106px, 1fr) auto;
  gap: calc(var(--dg) * .8);
}
body.menu-dash .worlds .world-tile { grid-column: 1 / -1; min-height: 0; justify-content: center; }
body.menu-dash .worlds #tile-marble { grid-row: 1; }
body.menu-dash .worlds #tile-shows { grid-row: 2; grid-column: 1 / -1; min-height: 0; }
body.menu-dash .worlds .tile-small { grid-row: 3; grid-column: auto; min-height: clamp(56px, 8cqh, 84px); }
body.menu-dash .worlds .wt-title { font-size: clamp(24px, 3.8cqh, 46px); }
body.menu-dash .worlds .wt-ico { font-size: 1.05em; }
body.menu-dash .worlds .wt-sub { font-size: clamp(13px, 1.8cqh, 18px); }
body.menu-dash .worlds .wt-kicker { font-size: clamp(11px, 1.3cqh, 13px); }
body.menu-dash .worlds .wt-chips span { font-size: clamp(12px, 1.4cqh, 14px); }
@container dashc (min-width: 900px) {
  body.menu-dash .worlds { grid-template-rows: minmax(150px, 1fr) auto; }
  body.menu-dash .worlds #tile-marble { grid-row: 1; grid-column: 1; }
  body.menu-dash .worlds #tile-shows { grid-row: 1; grid-column: 2; }
  body.menu-dash .worlds .tile-small { grid-row: 2; }
  body.menu-dash .worlds .wt-sub { max-width: 62%; }
}
.dash-center > .dash-group { flex: 1 1 auto; min-height: 0; }
.dash-play { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--dg) * .8); }
body.menu-dash .dash-play .tile { min-height: clamp(96px, 14cqh, 230px); }
body.menu-dash .dash-play .tile-ico { font-size: clamp(30px, 5.4cqh, 58px); }
body.menu-dash .dash-play .tile-title { font-size: clamp(16px, 2.4cqh, 24px); }
body.menu-dash .dash-play .tile-sub { font-size: clamp(12px, 1.6cqh, 15px); }

/* rechts: Missionen, Einladen, Fortschritt & Extras */
.dash-right { container: dashr / inline-size; }
.dash-side { display: flex; flex-direction: column; gap: var(--dg); }
body.menu-dash .invite-card { margin-top: 0; }
.dash-group-meta { flex: 1 1 auto; justify-content: flex-end; }
.dash-meta { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(64px, 1fr); max-height: calc(380px + var(--dg)); gap: calc(var(--dg) * .7); }
body.menu-dash .dash-meta .tile { min-height: clamp(64px, 9.5cqh, 116px); padding: 10px 6px 8px; }
body.menu-dash .dash-meta .tile-ico { font-size: clamp(22px, 3.4cqh, 34px); }
body.menu-dash .dash-meta .tile-title { font-size: clamp(13px, 1.8cqh, 17px); line-height: 1.15; }
body.menu-dash .dash-meta .tile-sub { font-size: clamp(11px, 1.3cqh, 13px); }
/* Einstellungen sitzen im Dashboard oben rechts am Zahnrad */
body.menu-dash #tile-settings { display: none; }
body.menu-dash #tb-settings { border-color: rgba(79, 227, 255, .35); }

/* wenig Höhe (1366×700, 1280×720 …): kompakter, damit nichts scrollt */
@container menuscr (max-height: 700px) {
  .logo-crowd, .tagline { display: none; }
  .logo { margin-top: 6px !important; }
  .dash-playcard .skin-preview, .dash-playcard .skin-preview canvas { width: 80px; }
  .dash-playcard .skin-preview { height: 86px; }
  .dash-playcard .skin-preview canvas { height: 80px; }
  .dash-playcard .name-field input { height: 46px; font-size: 19px; }
  .dash-playcard .name-hint { display: none; }
  .missions { padding: 10px 12px; }
  .missions .panel-head { margin-bottom: 6px; }
  .missions .panel-head h2 { font-size: 17px; }
  .mission-list { gap: 6px; }
  .mission { padding: 5px 10px; }
  .mission-ico { font-size: 20px; }
  .invite-card { padding: 10px 12px; gap: 7px; }
  .invite-card .inv-steps { display: none; }
  .invite-card .inv-mig { width: 40px !important; height: 40px !important; }
  .dash-meta .tile-sub, .dash-play .tile-sub { display: none; }
  .tiles-head { font-size: 11px; }
}

/* sehr wenig Höhe (z. B. 150 % auf 1920×950 → 1280×633 nutzbar) */
@container menuscr (max-height: 600px) {
  .logo { font-size: 46px; }
  .world-line { display: none; }
  .dash-playcard { padding-top: 22px; }
  .dash-playcard .name-label { display: none; }
  .dash-playcard #btn-play { min-height: 62px; font-size: 26px; }
  .dash-playcard .btn-play-sub { font-size: 12px; }
  .worlds { grid-template-rows: minmax(90px, 1fr) minmax(84px, 1fr) auto; }
  .wt-chips { display: none; }
  .worlds .tile-small { min-height: 50px; padding-top: 6px; padding-bottom: 6px; }
  .dash-play .tile { min-height: 76px; padding: 8px 6px; }
  .dash-social .tile { min-height: 68px; padding: 8px 6px; }
  .dash-social .tile-sub { display: none; }
  .invite-card .inv-goal { display: none; }
  .dash-meta .tile { min-height: 54px; padding: 6px 4px; }
  .pwa-install .muted { display: none; }
}
/* schmale Spalten (Dashboard erzwungen oder groß gezoomt): weniger Umbrüche */
@container dashr (max-width: 340px) {
  .mission-text { font-size: 13px; }
  .mission { grid-template-columns: 28px 1fr auto; gap: 2px 8px; }
  .invite-card .inv-steps, .dash-meta .tile-sub { display: none; }
}
@container dashc (max-width: 540px) {
  .dash-play .tile-title { font-size: 15px; }
}

/* ---------------- Solo-Arena: Modus-Raster + feste Seitenleiste */
.solo-main, .solo-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.solo-sum { display: none; }
@media (min-width: 1100px) {
  #scr-solo .scr-head, #scr-solo .solo-body { max-width: 1820px; }
  #scr-solo .solo-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 26%, 440px);
    gap: 28px;
    align-items: start;
  }
  .solo-main { container: solom / inline-size; gap: 12px; }
  .solo-side {
    position: sticky;
    top: 0;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--glass-solid);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .solo-side .sub-head { font-size: 16px; margin-top: 0 !important; }
  .solo-side .solo-bottom { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .solo-side .solo-col { gap: 8px; }
  .solo-side .diff-card { padding: 10px 6px 8px; border-radius: 16px; }
  .solo-side .diff-ico { font-size: 28px; }
  .solo-side .diff-name { font-size: 17px; }
  .solo-side .diff-desc { font-size: 12px; line-height: 1.2; }
  .solo-side .boost { padding: 8px 4px 6px; border-radius: 14px; }
  .solo-side .boost-ico { font-size: 22px; }
  .solo-side .boost-name { font-size: 12px; }
  .solo-side .solo-lead { display: none; }
  .solo-sum {
    --mc: var(--cyan);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 2px solid color-mix(in srgb, var(--mc) 55%, transparent);
    background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--mc) 22%, transparent), transparent 65%), rgba(0, 0, 0, .25);
  }
  #solo-start { width: 100%; min-height: 64px; font-size: 26px; }
  #solo-modes .mode-card { min-height: 128px; padding: 16px 16px 14px; }
  #solo-modes .mc-ico { font-size: 40px; }
  #solo-modes .mc-name { font-size: 19px; }
  #solo-modes .mc-desc { font-size: 13.5px; }
}
@container solom (min-width: 820px) { #solo-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@container solom (max-width: 819px) { #solo-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ss-top { display: flex; align-items: center; gap: 12px; }
.ss-ico { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--mc) 50%, transparent)); }
.ss-text { display: flex; flex-direction: column; min-width: 0; }
.ss-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ss-name { font-size: 22px; color: var(--mc); text-shadow: 0 0 14px color-mix(in srgb, var(--mc) 45%, transparent); line-height: 1.1; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-chips span { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.ss-desc { font-size: 13px; line-height: 1.35; color: #d9d4ff; }
.ss-tip { font-size: 13px; line-height: 1.35; color: var(--muted); }
@media (max-height: 800px) and (min-width: 1100px) {
  .ss-desc { display: none; }
  #scr-solo .scr-head { margin-bottom: 8px; }
  #scr-solo .solo-body { gap: 12px 24px; }
  #solo-modes .mode-card { min-height: 0; padding: 11px 14px 9px; }
  #solo-modes .mc-ico { font-size: 32px; }
  #solo-modes .mc-desc { font-size: 13px; line-height: 1.25; }
  #solo-modes .mc-time { margin-top: 4px; }
  .solo-side { padding: 12px; gap: 10px; }
  .solo-sum { padding: 9px 12px; gap: 6px; }
  .solo-side .diff-desc { display: none; }
  #solo-start { min-height: 56px; }
}

/* ---------------- Einstellungen: Darstellung + zweispaltig auf breiten Bildschirmen */
.settings-display { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.set-block { display: flex; flex-direction: column; gap: 8px; }
.set-block + .set-block { border-top: 1px solid var(--line); padding-top: 12px; }
.set-block .set-label { flex: none; }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap .seg-btn { flex: 1 1 auto; white-space: nowrap; }
.set-explain { font-size: 13px; line-height: 1.4; color: var(--muted); }
.set-explain b { color: var(--text); }
.set-now { font-size: 12px; color: #8ff0ff; }
@media (min-width: 1280px) {
  #scr-settings .scr-head { max-width: 1240px; }
  /* zwei Spalten wie ein Mauerwerk: keine Lücken, wenn Karten unterschiedlich hoch sind */
  #scr-settings .scr-body.narrow { max-width: 1240px; display: block; columns: 2; column-gap: 24px; }
  #scr-settings .scr-body.narrow > * { break-inside: avoid; margin: 0 0 18px; }
  #scr-settings .scr-body > .settings-actions, #scr-settings .scr-body > #set-sync { column-span: all; }
}

/* ---------------- Teilen-Panel (Einladung, Lobby, Herausforderung) */
.share-card { width: min(100%, 580px); display: flex; flex-direction: column; gap: 12px; }
.shp-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffc3f1; padding-right: 44px; }
.shp-title { font-size: 26px; padding-right: 44px; line-height: 1.1; }
.shp-note { font-size: 14px; color: #d9d4ff; line-height: 1.35; }
.shp-main { display: flex; gap: 16px; align-items: stretch; }
.shp-qr { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shp-qr canvas { border-radius: 14px; image-rendering: pixelated; box-shadow: 0 0 26px rgba(79, 227, 255, .35); }
.shp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.shp-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.shp-label-targets { margin-top: 2px; }
.shp-code-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 79, 216, .1); border: 1px solid rgba(255, 79, 216, .38);
}
.shp-code { font-size: 34px; line-height: 1.1; letter-spacing: .12em; color: #fff; text-shadow: 0 0 16px var(--pink); word-break: break-all; user-select: text; -webkit-user-select: text; }
.shp-mini { border: 0; border-radius: 10px; padding: 4px 10px; background: rgba(255, 255, 255, .1); font: 600 13px var(--font); cursor: pointer; }
.shp-mini:hover { background: rgba(255, 255, 255, .18); }
.shp-mini.ok { background: rgba(93, 255, 158, .2); color: var(--green) !important; }
.shp-link { display: flex; gap: 8px; }
.shp-link input {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .35); color: var(--text); font: 600 14px var(--font); user-select: text; -webkit-user-select: text;
}
.shp-link input:focus { outline: none; border-color: var(--cyan); }
.shp-copy { flex: none; min-height: 46px; padding: 6px 14px; font-size: 15px; }
.shp-copy.ok { --b1: #8dffbf; --b2: #2fd57c; --bd: #13804a; --bt: #04210f; }
.shp-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
#ui .shp-t {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px 8px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); text-decoration: none;
  font: 600 12px var(--font); cursor: pointer; transition: translate .12s, background .2s, border-color .2s;
}
#ui .shp-t:hover { translate: 0 -2px; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.shp-ico { width: 34px; height: 34px; display: block; }
.shp-ico svg { width: 100%; height: 100%; display: block; }
.shp-tname { white-space: nowrap; }
.shp-hint { min-height: 1.3em; font-size: 14px; color: var(--green); text-align: center; }
.shp-hint.pop { animation: popIn .3s var(--ease-back); }
/* Teilen-Panel offen: Meldungen unten statt über dem Panel-Kopf */
#ui:has(#modal-share.open) .toasts { top: auto; bottom: calc(14px + var(--safe-b)); flex-direction: column-reverse; z-index: 29; }
@media (max-width: 540px) {
  .shp-main { flex-direction: column; align-items: center; }
  .shp-info { width: 100%; }
  .shp-code { font-size: 28px; }
  .shp-targets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Einladen-Karte: Teilen + Schnellknöpfe */
.inv-share-row { display: flex; gap: 8px; }
.inv-share-row .inv-share { flex: 1; min-width: 0; padding-left: 10px; padding-right: 10px; white-space: nowrap; font-size: 15px; }
#ui .inv-quick {
  flex: none; width: 46px; min-height: 42px; display: grid; place-items: center; padding: 0; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .06); cursor: pointer; transition: translate .12s, background .2s;
}
#ui .inv-quick:hover { translate: 0 -2px; background: rgba(255, 255, 255, .12); }
.inv-quick .shp-ico { width: 26px; height: 26px; }
.inv-quick .shp-tname { display: none; }

/* ---------------- Physik-Shows-Auswahl: auf breiten Bildschirmen nicht in die Breite ziehen */
@media (min-width: 1280px) {
  #scr-shows .scr-head, #scr-shows .sh-body { max-width: 1560px; }
  #scr-shows .sh-card { min-height: 250px; padding: 24px 22px 20px; }
  #scr-shows .sh-desc { font-size: 16px; }
}

/* ---------------- Ergebnis auf breiten, niedrigen Bildschirmen (1366×700 …): zweispaltig statt scrollen */
@media (min-width: 1200px) and (max-height: 860px) {
  .res-wrap { max-width: 1000px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 12px 22px; align-items: start; }
  .res-wrap > * { grid-column: 1 / -1; }
  .res-wrap > .res-stats, .res-wrap > .res-share { grid-column: 1; }
  .res-wrap > .res-rewards, .res-wrap > .res-missions, .res-wrap > .res-boost { grid-column: 2; }
}
@media (min-width: 1200px) and (max-height: 860px) { .res-wrap > .res-head { justify-self: center; } }
/* Erfolg-Popup (achievements.js) auf dem Ergebnis-Screen nicht über den Titel: breit → links oben, schmal → unten */
body.state-result .hy-ach-pop { left: calc(16px + var(--safe-l)); max-width: min(360px, 26vw); transform: translate(0, -140%); }
body.state-result .hy-ach-pop.is-in { transform: translate(0, 0); }
@media (max-width: 1100px) {
  body.state-result .hy-ach-pop { top: auto; bottom: calc(230px + var(--safe-b)); left: 50%; max-width: min(460px, calc(100vw - 24px)); transform: translate(-50%, 160%); opacity: 0; }
  body.state-result .hy-ach-pop.is-in { transform: translate(-50%, 0); opacity: 1; }
}
/* Discord-Activity im Dashboard: Räume/Studio/Einladen sind ausgeblendet → „Mit Freunden“ volle Breite */
body.is-activity .dash-social .tile { grid-column: 1 / -1; }
