/* ============================================================================
   4BlocksRP Panel - Dark-Glass-Design (angelehnt ans ESC-Menue), Fredoka,
   mobil + desktop, viele Animationen. Echter Browser -> backdrop-filter erlaubt.
   ========================================================================== */
@font-face { font-family: 'Fredoka'; src: url('/static/fonts/Fredoka-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/static/fonts/Fredoka-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  /* Native Form-Controls (select/option/input/checkbox/scrollbars) im Dunkel-Modus
     rendern -> behebt "schwarzer Text auf dunkel" bzw. "weiss auf weiss" (Browser-
     Default war Light-Scheme). */
  color-scheme: dark;
  /* ---- Marken-Akzent (EIN Hero-Akzent, leicht entschaerft ggue. #f1ff00) ---- */
  --accent: #e9f64a;                       /* gleiche Energie, weniger Netzhaut-Brennen auf Dunkel */
  --accent-strong: #c9d400;                /* tiefer Gradient-Stop, jetzt Token */
  --accent-soft: rgba(233, 246, 74, 0.14);
  --accent-line: rgba(233, 246, 74, 0.30);
  --accent-ink: #14180a;                   /* Text AUF Akzent-Flaechen */
  --accent-2: #ffffff;                      /* Sekundaer/Marke (Sand) */

  /* ---- Gold = Wirtschaft/Premium ---- */
  --gold: #fbbf24;
  --gold-soft: rgba(251, 191, 36, 0.14);
  --gold-line: rgba(251, 191, 36, 0.35);
  --gold-ink: #1c1400;

  --green: #c40f08;
  --green-2: #4f8f23;
  --green-glow: rgba(196, 15, 8, 0.55);

  /* ---- Flaechen (etwas hoehere Deckkraft fuer lesbares Dunkel-Glas) ---- */
  --bg-0: #07090d;
  --bg-1: #0d1016;
  --glass: rgba(24, 28, 37, 0.66);
  --glass-2: rgba(32, 37, 48, 0.60);
  --glass-strong: rgba(14, 17, 23, 0.88);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --hairline: rgba(255, 255, 255, 0.06);

  /* ---- Text (heller fuer 4.5:1 auf Glas) ---- */
  --txt: #eef1f6;
  --txt-dim: #a3acba;
  --txt-mute: #8b94a3;

  /* ---- Semantische Zustaende ---- */
  --good: #4ade80;  --good-soft: rgba(74, 222, 128, 0.14);
  --bad:  #fb7185;  --bad-soft:  rgba(251, 113, 133, 0.14);
  --warn: #ffb020;  --warn-soft: rgba(255, 176, 32, 0.12);
  --info: #5b8cff;  --info-soft: rgba(91, 140, 255, 0.16);

  /* ---- Abstands-Skala (4pt-Basis) ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 48px;

  /* ---- Radius-Skala (Legacy-Aliase erhalten) ---- */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;
  --radius: var(--r-lg);
  --radius-sm: var(--r-sm);

  /* ---- Elevation-Skala (eine Hue, geschichtet) ---- */
  --e-1: 0 2px 8px rgba(0, 0, 0, 0.30);
  --e-2: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
  --e-3: 0 18px 48px -16px rgba(0, 0, 0, 0.55);
  --e-4: 0 28px 70px -20px rgba(0, 0, 0, 0.65);
  --shadow: var(--e-3);
  --glow-accent: 0 16px 40px -14px rgba(233, 246, 74, 0.30);
  --glow-gold:   0 16px 40px -14px rgba(251, 191, 36, 0.32);

  /* ---- Typo-Skala (fluid, Fredoka) ---- */
  --fs-display: clamp(28px, 5vw, 46px);
  --fs-h1: clamp(24px, 3.4vw, 30px);
  --fs-h2: clamp(20px, 2.6vw, 26px);
  --fs-h3: clamp(17px, 2vw, 21px);
  --fs-body: 15px; --fs-sm: 13px; --fs-xs: 11.5px;

  --shell-max: 1180px;
  --blur: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow-x: hidden; max-width: 100%; }
body {
  background: var(--bg-0);
  color: var(--txt);
  font-family: 'Fredoka', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, strong, b { font-weight: 700; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

/* ---------- Animated background ---------- */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(233,246,74,.06), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, var(--green-glow), transparent 55%),
    linear-gradient(160deg, #0d1016 0%, #07090d 70%); }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.g1 { width: 460px; height: 460px; background: #c40f08; top: -120px; right: -80px; animation: float1 18s ease-in-out infinite; }
.g2 { width: 420px; height: 420px; background: rgba(233,246,74,.5); bottom: -160px; left: -100px; animation: float2 22s ease-in-out infinite; }
.g3 { width: 340px; height: 340px; background: #ffffff; top: 40%; left: 55%; opacity: .15; animation: float1 26s ease-in-out infinite reverse; }
.bg-grid { position: absolute; inset: 0; opacity: .04;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 50% 30%, #000 30%, transparent 80%); }
@keyframes float1 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-40px,40px) scale(1.1);} }
@keyframes float2 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(50px,-30px) scale(1.08);} }

/* ---------- Boot loader ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-ring { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--glass); color: var(--txt); font-size: 15px; font-weight: 700;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .tab:focus-visible, .bn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); border: none;
  box-shadow: var(--glow-accent); }
.btn.primary:hover { box-shadow: 0 16px 40px -8px rgba(233,246,74,.7); }
.btn.green { background: linear-gradient(135deg, var(--green-2), #3a6a18); color: #fff; border: none; box-shadow: 0 12px 30px -10px var(--green-glow); }
.btn.gold { background: linear-gradient(135deg, #ffe9a6, var(--gold)); color: var(--gold-ink); border: none; box-shadow: var(--glow-gold); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; transform: none; cursor: not-allowed; }
input[type=text] { width: 100%; background: rgba(0,0,0,.32); border: 1px solid var(--line-2);
  color: var(--txt); padding: 15px 16px; border-radius: 14px; font-size: 17px; font-family: inherit; outline: none; transition: border-color .2s ease, box-shadow .2s ease, background .15s ease; }
input[type=text]:hover { border-color: var(--line-2); background: rgba(0,0,0,.4); }
input[type=text]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: rgba(0,0,0,.46); }

/* ---------- Login / pairing ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 440px; text-align: center; animation: rise .6s cubic-bezier(.2,.9,.3,1.1) both; }
.auth-logo { width: 92px; height: 92px; border-radius: 26px; margin: 0 auto 22px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-soft), rgba(196,15,8,.25)); border: 1px solid var(--line-2);
  font-size: 44px; box-shadow: var(--shadow); animation: bob 4s ease-in-out infinite; }
.auth h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: .3px; }
.auth .lead { color: var(--txt-dim); font-size: 16px; line-height: 1.55; margin: 0 0 26px; }
.auth .err { color: var(--bad); min-height: 20px; margin: 12px 0 0; font-size: 14px; }
.pin { letter-spacing: 8px; text-align: center; text-transform: uppercase; font-weight: 700; font-size: 22px; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-7px);} }
@keyframes rise { from{ opacity:0; transform: translateY(24px);} to{ opacity:1; transform:none;} }

/* ---------- App shell (ESC-Menü-Look: Topbar + Tabs) ---------- */
.topbar { display: flex; align-items: center; gap: 18px; padding: 16px 30px; position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(8,11,15,.72)); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; text-decoration: none; color: inherit;
  padding: 5px 12px 5px 6px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(233,246,74,.07), rgba(196,15,8,.06)); transition: transform .15s ease, box-shadow .25s ease, border-color .25s ease; }
.brand:hover { transform: translateY(-1px); border-color: var(--line-2); box-shadow: 0 10px 30px -10px rgba(233,246,74,.4); }
.brand .mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto;
  background: radial-gradient(120% 120% at 30% 20%, var(--accent-soft), rgba(196,15,8,.32)); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.brand .mark img { width: 100%; height: 100%; object-fit: cover; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); user-select: none; }
.brand .name { font-weight: 700; line-height: 1; }
.brand .brand-row { display: flex; align-items: center; gap: 7px; }
.brand .brand-title { font-size: 19px; letter-spacing: .2px; }
.brand .brand-tag { font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; padding: 3px 6px; border-radius: 6px;
  color: #07090d; background: linear-gradient(135deg, var(--accent), #fbbf24); box-shadow: 0 0 14px -2px rgba(233,246,74,.5); }
.brand .name small { display: block; color: var(--txt-dim); font-size: 11px; font-weight: 500; margin-top: 4px; letter-spacing: .3px; }
.brand .name small b { color: var(--accent-2); font-weight: 800; }
.tabbar { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 16px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--txt-dim); font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; transition: all .15s ease; }
.tab .tab-ic { font-size: 17px; }
.tab:hover { color: var(--txt); background: var(--glass); }
.tab.active { color: #14180a; background: var(--accent); border-color: var(--accent); }

/* ---------- Aufgeraeumte Kopf-Navigation (Gruppen-Dropdowns) ---------- */
/* Wenige oberste Punkte -> keine horizontale Scroll-Leiste mehr noetig; overflow:visible,
   damit die Dropdowns nicht von der Tabbar geclippt werden. */
.tabbar { overflow: visible; flex-wrap: wrap; row-gap: 6px; }
/* Zarter Trenner, der die inline aufgeklappte Roleplay-Gruppe optisch zusammenhaelt. */
.tab-sep { flex: 0 0 auto; align-self: center; width: 1px; height: 22px; background: var(--line-2); margin: 0 3px; }
.tab-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.tab-group { gap: 7px; }
.tab-group .tab-caret { font-size: 11px; opacity: .7; transition: transform .18s ease; }
.tab-wrap.open .tab-group .tab-caret { transform: rotate(180deg); }
.tab-wrap.open .tab-group:not(.active):not(.tab-gold) { color: var(--txt); background: var(--glass); border-color: var(--line-2); }
.tab-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; min-width: 232px;
  display: none; flex-direction: column; gap: 2px; padding: 8px;
  background: var(--glass-strong); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--e-3); backdrop-filter: blur(var(--blur));
  animation: navMenuIn .16s cubic-bezier(.2,.9,.3,1.1) both;
}
.tab-wrap.open .tab-menu { display: flex; }
.tab-menu-h { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: var(--txt-mute); padding: 9px 10px 4px; }
.tab-menu-h:first-child { padding-top: 4px; }
.tab-menu-sep { height: 1px; background: var(--line); margin: 5px 6px; }
.tab-menu-it { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--txt-dim); font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background .13s ease, color .13s ease, border-color .13s ease; }
.tab-menu-it .tab-menu-ic { font-size: 16px; width: 20px; text-align: center; flex: 0 0 auto; }
.tab-menu-it:hover { background: var(--glass); color: var(--txt); border-color: var(--line); }
.tab-menu-it.active { background: var(--accent-soft); color: var(--txt); border-color: var(--accent-line); }
.tab-menu-it.gold { color: var(--gold); }
.tab-menu-it.gold:hover { color: #fff8e6; background: rgba(251,191,36,.14); border-color: var(--gold-line); }
@keyframes navMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.topbar-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.content { max-width: var(--shell-max); margin: 0 auto; padding: 26px 30px 80px; overflow-x: hidden; }

/* Taler-Pille (wie ESC) */
.taler-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); color: var(--gold); font-weight: 700; }
.taler-ic { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe066, #d4a017); flex: 0 0 auto; }
.taler-plus { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--gold); cursor: pointer; text-decoration: none; flex: 0 0 auto; display: grid; place-items: center; transition: transform .12s ease, filter .12s ease; }
.taler-plus:hover { transform: scale(1.12); filter: brightness(1.08); }
.taler-plus::before, .taler-plus::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #2a1d00; border-radius: 1px; }
.taler-plus::before { width: 11px; height: 2.5px; }
.taler-plus::after { width: 2.5px; height: 11px; }

/* "Spiel starten"-Button (Topbar) */
.play-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 12px; font-weight: 800; font-size: 14px; text-decoration: none; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, #4f8f23, #3a6a18); border: 1px solid rgba(120,200,60,.5); box-shadow: 0 0 0 0 rgba(80,150,30,.5); animation: playGlow 2.6s ease-in-out infinite; transition: transform .12s ease, filter .2s ease; }
.play-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
@keyframes playGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(80,150,30,0); } 50% { box-shadow: 0 0 18px 1px rgba(120,200,60,.45); } }
@media (max-width: 860px) { .play-btn { padding: 8px 11px; font-size: 12.5px; } }

/* ============================================================================
   App-Feeling (Mobile) + Animationen & Glow (Desktop + Mobile)
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; }
/* Kein seitliches Wegswipen: horizontale Overscroll/Rubberband global aus + Seite
   selbst nie horizontal scrollbar (overflow-x:hidden oben). Absichtliche Horizontal-
   Scroller (.tabbar/.mk-subtabs) sind eigene overflow-x:auto-Boxen und bleiben nutzbar. */
html, body { overscroll-behavior: none; }
.content, .scr-body, .tabbar { -webkit-overflow-scrolling: touch; }

/* Safe-Area (Notch) */
.topbar { padding-top: max(16px, env(safe-area-inset-top)); }
@media (max-width: 860px) { .topbar { padding-top: max(12px, env(safe-area-inset-top)); } }

/* Stärkere, lebendige Ambient-Glows im Hintergrund */
.bg-glow { opacity: .6; }
.g1 { animation-duration: 16s; } .g2 { animation-duration: 20s; } .g3 { animation-duration: 24s; }

/* Brand-Logo dezent glühend */
.brand .mark { animation: markGlow 4.5s ease-in-out infinite; }
@keyframes markGlow { 0%,100% { box-shadow: 0 0 14px rgba(233,246,74,.12); } 50% { box-shadow: 0 0 26px rgba(233,246,74,.32); } }

/* Aktiver Tab + Taler-Pille glühen */
.tab.active { box-shadow: 0 8px 24px -6px rgba(233,246,74,.55); }
.taler-pill { box-shadow: 0 0 0 0 rgba(251,191,36,.0); transition: box-shadow .3s ease; }
.taler-pill:hover { box-shadow: 0 0 18px -2px rgba(251,191,36,.4); }

/* Tap-Feedback überall (App-Gefühl) */
.btn:active, .tab:active, .bn:active, .veh:active, .shop-card:active, .fac-mtile:active,
.inv-tile:active, .chatrow:active, .mk-offer:active, .appicon:active, .dt-plus:active, .taler-plus:active { transform: scale(.96); }

/* Glow-Hover auf Karten/Statistiken */
.glass.stat { transition: transform .15s ease, box-shadow .28s ease, border-color .2s ease; }
.glass.stat:hover { transform: translateY(-3px); border-color: rgba(233,246,74,.25); box-shadow: 0 18px 44px -14px rgba(233,246,74,.28); }
.veh:hover, .shop-card:hover, .inv-tile:hover, .fac-mtile:hover { box-shadow: 0 16px 40px -16px rgba(233,246,74,.28); }

/* Primär-Button: Shimmer beim Hover */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 60%; transform: translateX(-160%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); pointer-events: none; }
.btn.primary:hover::after { animation: btnShine .85s ease; }
@keyframes btnShine { to { transform: translateX(260%) skewX(-18deg); } }

/* Seitenübergang etwas dynamischer */
.page { animation: pageIn .38s cubic-bezier(.22,.61,.36,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px) scale(.995); } to { opacity: 1; transform: none; } }

/* Live-/Online-Punkte pulsieren */
.fac-mdot.on, .fac-dot.on { animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 6px var(--good); } 50% { box-shadow: 0 0 13px 2px var(--good); } }

/* Bottom-Nav (Mobile): glühender Aktiv-Indikator + Icon-Pop */
.bn { position: relative; transition: color .15s ease; }
.bn .ic { transition: transform .15s ease, filter .2s ease; }
.bn.active { color: var(--accent); }
.bn.active .ic { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 0 7px rgba(233,246,74,.65)); }
.bn.active::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.botnav { box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
.bn-more.active { color: var(--accent); }

/* "Mehr"-Bottom-Sheet (Mobile) */
.sheet-bg { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3,5,9,.6); animation: fadeIn .18s ease; }
.sheet { width: 100%; max-width: 560px; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--sp-3) var(--sp-4) calc(var(--sp-5) + env(safe-area-inset-bottom));
  border: 1px solid var(--line); border-bottom: 0; box-shadow: var(--e-4); animation: sheetUp .26s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-h { font-weight: 800; font-size: var(--fs-h3); margin: 0 4px 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.sheet-it { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 76px;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--glass-2); color: var(--txt);
  font-size: var(--fs-sm); font-weight: 700; cursor: pointer; transition: transform .1s ease, border-color .15s ease, background .15s ease; }
.sheet-it:hover { background: var(--accent-soft); border-color: var(--accent-line); transform: translateY(-2px); }
.sheet-it:active { transform: scale(.95); }
.sheet-it.gold .sheet-ic { filter: drop-shadow(0 0 6px var(--gold)); }
.sheet-ic { font-size: 26px; line-height: 1; }
.sheet-foot { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.sheet-foot .btn.block { justify-content: flex-start; }

/* Kompakte Mobile-Topbar (kleiner Schirm): Buttons als Icons */
@media (max-width: 560px) {
  .play-btn { font-size: 0; padding: 9px 12px; }
  .play-btn::before { content: '▶'; font-size: 15px; }
  .topbar-right .btn.ghost { font-size: 0; padding: 9px 12px; }
  .topbar-right .btn.ghost::before { content: '⎋'; font-size: 17px; }
  .taler-pill { padding: 8px 11px; gap: 6px; }
  .topbar { gap: 8px; }
}

/* Phone-Dock: Eingangs-Anim + FAB glüht stärker */
.phone-fab { box-shadow: 0 12px 30px -6px rgba(233,246,74,.5); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ===== Dopamin-Pack: Konfetti, Ripple, Pop-In, Gradient-Headlines ===== */
/* Schimmernde Gradient-Überschriften */
.page-head h2 { background: linear-gradient(100deg, #ffffff 0%, var(--accent) 45%, #ffffff 70%); background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: textShine 7s linear infinite; }
@keyframes textShine { to { background-position: 220% center; } }
.brand .brand-title { background: linear-gradient(100deg, #fff, var(--accent-2), #fff); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: textShine 8s linear infinite; }

/* Ripple auf Buttons/Tabs */
.btn, .tab, .fac-mbtn, .shop-step { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.4); transform: scale(0); animation: rip .55s ease-out forwards; pointer-events: none; mix-blend-mode: overlay; }
@keyframes rip { to { transform: scale(2.6); opacity: 0; } }

/* Pop-In Stagger (nur bei Erst-Render via .anim) */
.anim > * { animation: popIn .5s cubic-bezier(.2,.8,.3,1.25) both; }
.anim > *:nth-child(1){animation-delay:.02s}.anim > *:nth-child(2){animation-delay:.06s}.anim > *:nth-child(3){animation-delay:.1s}
.anim > *:nth-child(4){animation-delay:.14s}.anim > *:nth-child(5){animation-delay:.18s}.anim > *:nth-child(6){animation-delay:.22s}
.anim > *:nth-child(7){animation-delay:.26s}.anim > *:nth-child(8){animation-delay:.3s}.anim > *:nth-child(9){animation-delay:.34s}
.anim > *:nth-child(10){animation-delay:.38s}.anim > *:nth-child(n+11){animation-delay:.42s}
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }

/* Konfetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti i { position: absolute; top: -12vh; width: 10px; height: 14px; opacity: .96; will-change: transform; animation: confFall linear forwards; }
@keyframes confFall { 0% { transform: translateY(-12vh) rotate(0deg); } 100% { transform: translateY(115vh) rotate(900deg); opacity: .85; } }

/* Taler-Pille im Header pulsiert leicht golden */
.topbar .taler-pill { animation: talerBreath 5s ease-in-out infinite; }
@keyframes talerBreath { 0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } 50% { box-shadow: 0 0 16px -2px rgba(251,191,36,.35); } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 22px; }
.page-head h2 { font-size: 26px; margin: 0; }
.page-head .sub { color: var(--txt-dim); font-size: 14px; }

/* page transition */
.page { animation: fade .3s ease both; }
@keyframes fade { from{ opacity:0; transform: translateY(10px);} to{ opacity:1; transform:none;} }

/* ---------- Cards ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* hero/character header */
.charcard { display: flex; align-items: center; gap: 18px; padding: 22px; position: relative; overflow: hidden; }
.charcard::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--accent-soft); filter: blur(40px); }
.avatar { width: 78px; height: 78px; border-radius: 20px; object-fit: cover; border: 1px solid var(--line-2); background: var(--glass-2); flex: 0 0 auto; }
.avatar.ph { display: grid; place-items: center; font-size: 34px; }
.charcard .who { min-width: 0; }
.charcard .who h3 { font-size: 23px; margin: 0 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--accent-soft); border: 1px solid rgba(233,246,74,.3); color: var(--accent); }
.chip.green { background: rgba(196,15,8,.2); border-color: var(--green); color: #b6e88a; }
.chip.gold { background: rgba(251,191,36,.16); border-color: var(--gold); color: var(--gold); }

/* stat cards */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .lab { color: var(--txt-dim); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .val { font-size: 30px; font-weight: 700; margin-top: 8px; letter-spacing: .5px; }
.stat .val.green { color: #bdf08e; } .stat .val.gold { color: var(--gold); }
.stat .spark { position: absolute; right: -20px; bottom: -20px; font-size: 80px; opacity: .06; }

/* ---------- Vehicles ---------- */
.veh { overflow: hidden; transition: transform .15s ease, border-color .2s; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); }
.veh:hover { transform: translateY(-4px); border-color: var(--line-2); }
.veh .pic { height: 130px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.06), transparent 70%); display: grid; place-items: center; }
.veh .pic img { max-width: 86%; max-height: 110px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.veh .body { padding: 13px 15px 15px; }
.veh .plate { display: inline-block; font-weight: 700; letter-spacing: 1px; background: #11151c; border: 1px solid var(--line-2); border-radius: 7px; padding: 2px 9px; font-size: 13px; }
.veh .model { color: var(--txt-dim); font-size: 13px; margin-top: 7px; text-transform: capitalize; }
.veh .meta { display: flex; gap: 12px; margin-top: 10px; font-size: 12.5px; color: var(--txt-dim); }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4ade80, #a3e635); }

/* ---------- generic list ---------- */
.list { padding: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; transition: background .15s; }
.row:hover { background: rgba(255,255,255,.04); }
.row + .row { border-top: 1px solid var(--line); }
.row .ic-img { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; background: rgba(255,255,255,.05); padding: 4px; flex: 0 0 auto; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { color: var(--txt-dim); font-size: 13px; }
.count-pill { font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 11px; font-size: 14px; }

/* tabs (sub) */
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.subtab { padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--txt-dim); font-weight: 700; font-size: 14px; transition: all .15s; }
.subtab.active { background: var(--accent-soft); border-color: rgba(233,246,74,.3); color: var(--accent); }

/* empty + skeleton */
.empty { text-align: center; color: var(--txt-mute); padding: 48px 20px; font-size: 15px; }
.empty .em { font-size: 40px; display: block; margin-bottom: 12px; opacity: .6; }
.sk { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- PHONE MIRROR ---------- */
.phone-wrap { display: grid; place-items: center; padding: 8px 0 20px; }
.phone { width: 360px; max-width: 100%; height: 720px; max-height: calc(100dvh - 150px); border-radius: 42px; position: relative;
  background: linear-gradient(160deg, #15191f, #0a0d12); border: 1px solid var(--line-2); padding: 14px;
  box-shadow: var(--shadow), inset 0 0 0 6px #05070a; overflow: hidden; }
.phone .notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 130px; height: 26px; background: #05070a; border-radius: 0 0 16px 16px; z-index: 5; }
.scr { position: absolute; inset: 14px; border-radius: 30px; overflow: hidden; background:
  radial-gradient(120% 70% at 50% 0%, rgba(196,15,8,.35), transparent 60%),
  radial-gradient(90% 60% at 50% 100%, rgba(233,246,74,.1), transparent 60%),
  linear-gradient(180deg, #0c1117, #06080c); display: flex; flex-direction: column; }
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px 6px; font-size: 13px; font-weight: 700; color: #dfe6ee; }
.scr-body { flex: 1; overflow-y: auto; overflow-x: hidden; }
.home-num { text-align: center; color: var(--txt-dim); font-size: 13px; margin: 6px 0 10px; }
.home-num b { color: #fff; font-size: 18px; display: block; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; padding: 14px 18px; }
.appicon { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.appicon .bubble { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  border: 1px solid var(--line-2); position: relative; transition: transform .12s; }
.appicon:active .bubble { transform: scale(.9); }
.appicon .lbl { font-size: 11px; color: #d8dee6; }
.appicon .badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.ai-msg { background: linear-gradient(135deg,#34c759,#1ea34a); } .ai-call{ background: linear-gradient(135deg,#34c759,#0a8f3c);} .ai-cont{ background: linear-gradient(135deg,#5ac8fa,#2b8fd6);} .ai-note{ background: linear-gradient(135deg,#ffd60a,#f0a500);} .ai-photo{ background: linear-gradient(135deg,#ff375f,#ff8e3c);} .ai-vm{ background: linear-gradient(135deg,#8e8e93,#5b5b60);} .ai-web{ background: linear-gradient(135deg,#c9d400,#7fa31e);}
.app-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 10px; position: sticky; top: 0; background: rgba(8,11,15,.7); backdrop-filter: blur(8px); z-index: 3; }
.app-head .back { font-size: 22px; color: var(--accent); width: 30px; }
.app-head .ttl { font-weight: 700; font-size: 17px; }

/* Chat geoeffnet: Eingabefeld unten festpinnen, nur Nachrichten scrollen (echtes Handy-Feeling) */
.scr-body.chat-open { display: flex; flex-direction: column; overflow: hidden; }
.scr-body.chat-open .app-head { flex: 0 0 auto; }
.scr-body.chat-open .thread { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.scr-body.chat-open .composer { flex: 0 0 auto; }
.phone-mobile-body.chat-open { height: calc(100dvh - 150px); min-height: 0; }

/* chat bubbles */
.thread { padding: 10px 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.bub { max-width: 78%; padding: 9px 13px; border-radius: 17px; font-size: 14px; line-height: 1.35; word-wrap: break-word; animation: pop .25s ease both; }
.bub.them { align-self: flex-start; background: #2a2f37; border-bottom-left-radius: 5px; }
.bub.me { align-self: flex-end; background: linear-gradient(135deg,#0a84ff,#0060df); color: #fff; border-bottom-right-radius: 5px; }
.bub .time { display: block; font-size: 10px; opacity: .6; margin-top: 3px; }
@keyframes pop { from{ opacity:0; transform: translateY(6px) scale(.97);} to{ opacity:1; transform:none;} }
.chatrow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.chatrow .ava { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,#3a4150,#262b34); display: grid; place-items: center; font-weight: 700; color: #cfd6df; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.note { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 12px; }
.note .nt { font-weight: 700; margin-bottom: 4px; }
.note .nc { color: var(--txt-dim); font-size: 13px; white-space: pre-wrap; }

/* ---------- bottom nav (mobile) ---------- */
.botnav { display: none; }

/* ---------- Sozial: Bestenliste + Freunde ---------- */
.lb-list, .fr-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.lb-row.top { border-color: rgba(233,246,74,.4); background: linear-gradient(135deg, var(--accent-soft), transparent); }
.lb-rank { width: 34px; text-align: center; font-weight: 800; font-size: 16px; }
.lb-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.lb-ava.ph { display: grid; place-items: center; background: rgba(255,255,255,.08); font-weight: 800; font-size: 14px; }
.lb-row .t { font-weight: 700; font-size: 14px; }
.lb-amt { font-weight: 800; color: #4ade80; white-space: nowrap; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.fr-row .t { font-weight: 700; font-size: 14px; }
.fr-row .s { color: var(--txt-mute); font-size: 12px; }

/* Lightbox-Aktionen (Download/Teilen) */
.lb-bar { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.lb-btn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-strong); color: var(--txt);
  font-size: 20px; cursor: pointer; display: grid; place-items: center; text-decoration: none; }

/* ---------- Fraktion-Verwaltung ---------- */
.frak-adm-list { display: flex; flex-direction: column; gap: 8px; }
.frak-adm-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.frak-adm-row .t { font-weight: 700; font-size: 14px; }
.frak-adm-row .s { color: var(--txt-mute); font-size: 12px; }
.frak-adm-b { padding: 9px 13px !important; min-height: 40px; font-size: 13px; flex: 0 0 auto; }
.frak-adm-b.danger { color: #ff6b6b; border-color: rgba(255,107,107,.4); }

/* ---------- Markt-Aktionen ---------- */
.mk-gate { margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  color: #ffd86b; background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.35); }
.mk-act { padding: 8px 16px !important; font-size: 13px; flex: 0 0 auto; margin-left: 8px; }
.mk-note { font-size: 11px; color: var(--txt-mute); margin-left: 8px; white-space: nowrap; }
.mk-bm-total { font-weight: 800; font-size: 15px; color: var(--accent-2); }
.mk-sell { padding: 16px 18px; }
.mk-sellgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.mk-sellcard { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; cursor: pointer; transition: transform .12s ease, border-color .2s ease; }
.mk-sellcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.mk-sellcard:active { transform: scale(.96); }
.mk-sellcard .mk-itemic { margin: 0 auto 6px; }
.mk-sc-name { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-sc-cnt { font-size: 11px; color: var(--txt-mute); }

/* ---------- Bank ---------- */
.bank-transfer { padding: 16px 18px; }
.bank-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.bank-inp { flex: 1; min-width: 140px; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 11px 14px; color: var(--txt); font-size: 14px; font-family: inherit; outline: none; }
.bank-inp:focus { border-color: var(--accent); }
/* Lesbarkeits-Absicherung: alle Form-Controls hellen Text; Dropdown-Listen dunkel
   (manche Browser rendern <option> sonst hell-auf-hell trotz color-scheme). */
select, input, textarea, .bank-inp { color: var(--txt); }
select option, option, .bank-inp option { background-color: #12151c; color: var(--txt); }
select:disabled, input:disabled, .bank-inp:disabled { color: var(--txt); opacity: .6; }
.bank-hist { display: flex; flex-direction: column; gap: 8px; }
.bank-tx { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.bank-tx-ic { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); font-size: 15px; }
.bank-tx .t { font-weight: 700; font-size: 14px; }
.bank-tx .s { color: var(--txt-mute); font-size: 12px; }
.bank-amt { font-weight: 800; font-size: 14px; white-space: nowrap; }
.bank-amt.pos { color: #4ade80; }
.bank-amt.neg { color: #ff6b6b; }

/* ---------- PWA: Benachrichtigungen/Installieren ---------- */
.pwa-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.pwa-row .btn { font-size: 14px; }

/* ---------- Voice-Anruf-Overlay ---------- */
.call-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(196,15,8,.35), transparent 60%), rgba(6,8,12,.86); animation: toastIn .25s ease both; }
.call-card { width: min(92vw, 360px); padding: 34px 26px 28px; border-radius: 26px; text-align: center;
  background: linear-gradient(180deg, #11161d, #0a0d12); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.call-ring { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), rgba(196,15,8,.18)); }
.call-overlay.incoming .call-ring { animation: callPulse 1.4s ease-in-out infinite; }
@keyframes callPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(233,246,74,.5); } 50% { box-shadow: 0 0 0 18px rgba(233,246,74,0); } }
.call-ava { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; font-weight: 800;
  color: #07090d; background: linear-gradient(135deg, var(--accent), #fbbf24); }
.call-name { font-size: 22px; font-weight: 800; }
.call-status { margin-top: 6px; color: var(--txt-dim); font-size: 15px; font-weight: 600; min-height: 20px; }
.call-actions { display: flex; justify-content: center; gap: 26px; margin-top: 26px; }
.call-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 26px; cursor: pointer; color: #fff;
  display: grid; place-items: center; transition: transform .12s ease, filter .2s ease; }
.call-btn:active { transform: scale(.92); }
.call-btn.accept { background: linear-gradient(135deg, #34c759, #1ea34a); box-shadow: 0 10px 24px -6px rgba(52,199,89,.6); animation: callPulse 1.4s ease-in-out infinite; }
.call-btn.decline { background: linear-gradient(135deg, #ff453a, #d32f25); box-shadow: 0 10px 24px -6px rgba(255,69,58,.6); }
.call-btn.mute { background: #2a2f37; }
.call-btn.mute.on { background: linear-gradient(135deg, #ff9f0a, #f08000); }
.thread-call { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2);
  background: linear-gradient(135deg, #34c759, #1ea34a); color: #fff; font-size: 16px; cursor: pointer; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; display: flex; flex-direction: column; gap: 9px; z-index: 200; width: max-content; max-width: 92vw; }
.toast { background: var(--glass-strong); border: 1px solid var(--line-2); color: var(--txt); padding: 13px 18px; border-radius: 14px;
  box-shadow: var(--shadow); backdrop-filter: blur(12px); font-size: 14px; font-weight: 700; animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes toastIn { from{ opacity:0; transform: translateY(20px) scale(.95);} to{ opacity:1; transform:none;} }

/* ---------- responsive: mobile ---------- */
@media (max-width: 860px) {
  .topbar { padding: 12px 14px; gap: 10px; }
  .tabbar { display: none; }                 /* Tabs unten als Bottom-Nav */
  .brand { padding: 4px 10px 4px 5px; gap: 10px; }
  .brand .mark { width: 40px; height: 40px; }
  .brand .brand-title { font-size: 17px; }
  .brand .name small { display: block; font-size: 10px; margin-top: 3px; }
  .content { padding: 16px 14px 96px; }
  .page-head h2 { font-size: 22px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .botnav { display: grid; }
  .phone-dock { display: none; }             /* Mobile: Handy laeuft als eigener Tab, kein Dock */
  .bn { padding: 9px 2px; }                  /* groessere Tap-Flaeche (~46px) */
  /* Toasts NICHT hinter der Bottom-Nav verstecken */
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 94vw; }
  /* Modal-Knoepfe gestapelt + voll breit -> sicher mit dem Daumen treffbar */
  .confirm-actions { flex-direction: column; gap: 8px; }
  .confirm-actions .btn { width: 100%; }
}
@media (min-width: 861px) {
  .bn-phone { display: none; }               /* Desktop: kein Handy-Tab in der (versteckten) Bottom-Nav */
}

/* mobile top bar */
.topbar-m { display: none; align-items: center; justify-content: space-between; padding: 14px 16px; position: sticky; top: 0; z-index: 30;
  background: rgba(8,11,15,.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-m .brand { padding: 0; }
.topbar-m .mark { width: 34px; height: 34px; font-size: 18px; }
.topbar-m .name { font-size: 16px; }

.botnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(10,13,18,.9); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bn { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 2px; min-height: 52px; color: var(--txt-mute); font-size: 10.5px; font-weight: 700;
  border: 0; background: transparent; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bn .ic { font-size: 21px; }
.bn .bnl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn.active { color: var(--accent); }

/* Notification-Punkt mit Anzahl (Handy-FAB + Bottom-Nav-Handy-Tab) */
.nbadge { position: absolute; min-width: 18px; height: 18px; border-radius: 999px; background: var(--bad, #ff3b30); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; padding: 0 5px; box-shadow: 0 0 0 2px rgba(8,11,15,.9), 0 4px 10px -2px rgba(255,59,48,.6);
  animation: nbadgePop .3s cubic-bezier(.2,.9,.3,1.4) both; }
.bn-phone .nbadge { top: 2px; right: calc(50% - 22px); }
.phone-fab .nbadge { top: -2px; right: -2px; }
@keyframes nbadgePop { from { transform: scale(0); } to { transform: scale(1); } }

/* Mobile: Handy als voller Tab im Content (kein schwebendes Dock) */
.phone-mobile { display: flex; justify-content: center; }
.phone-mobile-body { width: 100%; max-width: 520px; min-height: calc(100dvh - 220px);
  border-radius: 22px; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--line-2);
  background: radial-gradient(120% 50% at 50% 0%, rgba(196,15,8,.28), transparent 60%), linear-gradient(180deg, #0c1117, #06080c); }

.promo-strip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px dashed rgba(233,246,74,.35);
  border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), rgba(196,15,8,.12)); }
.promo-strip .em { font-size: 24px; }
.promo-strip .tx { flex: 1; font-size: 13.5px; color: var(--txt-dim); }
.promo-strip .tx b { color: #fff; }

/* ---------- Avatar-Mugshot-Overlay ---------- */
.chatrow .ava { position: relative; overflow: hidden; }
.ava-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Markt (ESC-Look gespiegelt) ---------- */
.mk-head { margin: 2px 0 16px; }
.mk-brand { display: flex; align-items: center; gap: 14px; }
.mk-bic { width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(233,246,74,.3); }
.mk-bt { font-size: 24px; font-weight: 700; line-height: 1.1; }
.mk-bs { font-size: 13px; color: var(--txt-dim); margin-top: 3px; }
.mk-subtabs { display: flex; gap: 8px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px; margin-bottom: 14px; overflow-x: auto; }
.mk-stab { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--txt-dim); border-radius: 10px; padding: 10px 18px; cursor: pointer; transition: all .15s ease; }
.mk-stab:hover { color: var(--txt); background: rgba(255,255,255,.05); }
.mk-stab.active { color: #14180a; background: var(--accent); }
.mk-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.mk-stat { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; text-align: center; }
.mk-stat-ic { position: absolute; top: 9px; right: 11px; font-size: 14px; opacity: .5; }
.mk-stat-l { display: block; font-size: 11px; color: var(--txt-mute); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.mk-stat b { font-size: 22px; }
.mk-list { display: flex; flex-direction: column; gap: 10px; }
.mk-offer { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; transition: border-color .15s ease, transform .12s ease; }
.mk-offer:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mk-itemic { position: relative; overflow: hidden; width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #0e1116; border: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--txt-dim); }
.mk-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5px; background: #0e1116; }
.mk-mid { min-width: 0; }
.mk-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-osub { color: var(--txt-dim); font-size: 13px; margin-top: 2px; }
.mk-qty { color: var(--txt-dim); font-size: 14px; font-weight: 700; }
.mk-price { font-weight: 700; font-size: 17px; color: var(--accent); white-space: nowrap; }
.mk-price.ok { color: #bdf08e; }
@media (max-width: 860px) { .mk-offer { gap: 12px; padding: 11px 13px; } .mk-qty { display: none; } }

/* ---------- Serverlogo (gross, transparent, unten rechts) ---------- */
.logo-bg { position: fixed; right: -70px; bottom: -70px; width: 640px; height: 640px; pointer-events: none;
  background: url('/static/logo.png') no-repeat right bottom; background-size: contain; opacity: .055; }
@media (max-width: 860px) { .logo-bg { width: 360px; height: 360px; opacity: .045; right: -40px; bottom: -40px; } }

/* ---------- Persistentes Handy-Dock (unten rechts) ---------- */
.phone-dock { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.phone-fab { width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--line-2); background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); font-size: 27px; cursor: pointer; box-shadow: 0 12px 30px -6px rgba(233,246,74,.5); animation: fabPulse 2.6s ease-in-out infinite; }
@keyframes fabPulse { 0%,100% { box-shadow: 0 12px 30px -6px rgba(233,246,74,.3); } 50% { box-shadow: 0 14px 44px 0 rgba(233,246,74,.6); } }
.phone-frame { position: relative; animation: dockIn .35s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes dockIn { from { opacity: 0; transform: translateY(22px) scale(.96); } to { opacity: 1; transform: none; } }
.phone-min { position: absolute; top: -10px; left: -10px; z-index: 6; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-strong); color: var(--txt); font-size: 18px; line-height: 1; cursor: pointer; }
.phone-dock.open .phone-fab { display: none; }
.phone-dock:not(.open) .phone-frame { display: none; }
.phone-dock .phone { width: 332px; height: 660px; max-height: calc(100dvh - 64px); margin: 0; }
@media (min-width: 861px) { .phone-min { display: none; } }  /* Desktop: immer offen, kein Minimieren */

/* No-Phone-Zustand im Handy */
.nophone { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px; color: var(--txt-dim); }
.nophone .em { font-size: 56px; opacity: .5; }
.nophone .t { font-weight: 700; font-size: 17px; color: var(--txt); }

/* Fraktion */
.fac-hero { display: flex; align-items: center; gap: 16px; padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.fac-hero .em { width: 64px; height: 64px; flex: 0 0 auto; display: grid; place-items: center; font-size: 32px; border-radius: 18px; background: var(--accent-soft); border: 1px solid rgba(233,246,74,.3); }
.fac-hero h3 { font-size: 24px; margin: 0 0 6px; }
.fac-mem { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 13px; }
.fac-mem + .fac-mem { border-top: 1px solid var(--line); }
.fac-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--txt-mute); }
.fac-dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.fac-msg { margin-left: auto; border: 1px solid var(--line-2); background: var(--glass); color: var(--txt); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.fac-msg:hover { border-color: var(--accent-2); color: var(--accent); }
.fac-map-note { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--txt-dim); font-size: 14px; }

/* Fahrzeug-Detail-Modal */
.modal-bg { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; cursor: pointer; animation: fade .2s ease; }
.modal { width: 100%; max-width: 460px; padding: 0; overflow: hidden; cursor: default; max-height: 90dvh; display: flex; flex-direction: column; animation: rise .3s cubic-bezier(.2,.9,.3,1.1) both; }
.modal .m-pic { height: 200px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.08), transparent 70%); }
.modal .m-pic img { max-width: 88%; max-height: 180px; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); }
.modal .m-body { padding: 18px 20px 22px; overflow-y: auto; }
.modal .m-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal .m-title h3 { margin: 0; font-size: 22px; text-transform: capitalize; }
.modal .m-x { border: none; background: transparent; color: var(--txt-dim); font-size: 22px; cursor: pointer; width: 44px; height: 44px; min-width: 44px; display: grid; place-items: center; border-radius: 10px; margin: -8px -8px -8px 0; transition: background .15s ease, color .15s ease; }
.modal .m-x:hover { background: rgba(255,255,255,.08); color: var(--txt); }
.m-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.m-stat { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.m-stat .l { color: var(--txt-dim); font-size: 12px; }
.m-stat .v { font-weight: 700; font-size: 16px; margin-top: 3px; }
@media (max-width: 860px) {
  .phone-dock { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .phone-dock .phone { width: calc(100vw - 28px); height: calc(100dvh - 160px); }
}

/* ---------- Schließfach als Kachel-Inventar ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
.inv-tile { position: relative; aspect-ratio: 1; background: var(--glass); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px; transition: transform .12s ease, border-color .2s; }
.inv-tile:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.inv-tile img { width: 58px; height: 58px; object-fit: contain; }
.inv-tile .ph { font-size: 30px; opacity: .7; }
.inv-tile .nm { font-size: 11.5px; color: var(--txt-dim); text-align: center; line-height: 1.2; max-height: 28px; overflow: hidden; }
.inv-tile .ct { position: absolute; top: 6px; right: 7px; background: var(--accent); color: #14180a; font-weight: 700; font-size: 12px; border-radius: 8px; padding: 1px 8px; }

/* ---------- Markt-Kategorien ---------- */
.mk-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mk-cat { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--txt-dim); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s ease; }
.mk-cat:hover { color: var(--txt); }
.mk-cat.active { color: #14180a; background: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Kontakt-Detail ---------- */
.cdetail { padding: 20px; text-align: center; }
.big-ava { width: 100px; height: 100px; border-radius: 50%; margin: 6px auto 14px; position: relative; overflow: hidden; background: linear-gradient(135deg, #3a4150, #262b34); display: grid; place-items: center; font-size: 36px; font-weight: 700; color: #cfd6df; }
.big-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cdetail .cn { font-size: 21px; font-weight: 700; }
.cdetail .cnum { color: var(--txt-dim); margin: 4px 0 18px; font-size: 15px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: fade .2s ease; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.7); }

/* ---------- Chat-Composer ---------- */
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 9px; background: rgba(7,9,13,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.composer input { flex: 1; background: rgba(255,255,255,.07); border: 1px solid var(--line-2); border-radius: 18px; padding: 10px 14px; color: var(--txt); font-size: 14px; font-family: inherit; outline: none; text-align: left; letter-spacing: 0; text-transform: none; }
.composer button { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: none; background: linear-gradient(135deg, #0a84ff, #0060df); color: #fff; font-size: 17px; cursor: pointer; }
.composer button:disabled { opacity: .5; }
.voice-mic { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.07); color: var(--txt); font-size: 17px; cursor: pointer; }
.voice-mic.rec { background: linear-gradient(135deg, #ff453a, #d32f25); color: #fff; border-color: transparent; animation: callPulse 1.2s ease-in-out infinite; }
.veh .pic-ph { font-size: 52px; opacity: .5; }

/* Fraktion: Layout + 3D-Live-Karte */
.fac-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .fac-layout { grid-template-columns: 1fr; } }
.fac-live-line { margin: 14px 0; padding: 11px 15px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); font-size: 14px; color: var(--txt-dim); }
.fac-map-wrap { position: relative; padding: 8px; overflow: hidden; }
.fac-map { width: 100%; height: 540px; border: 0; border-radius: 14px; background: #0a0d12; display: block; }
@media (max-width: 980px) { .fac-map { height: 400px; } }
.fac-map-tag { position: absolute; left: 18px; top: 18px; background: rgba(7,9,13,.82); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 11px; font-size: 12px; color: var(--txt-dim); pointer-events: none; }
.fac-map-wrap { margin-bottom: 4px; }

/* Fraktion: Hero-Chips + Mitglieder-Kacheln */
.fac-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.sec-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--txt-mute); font-weight: 700; margin: 22px 4px 12px; }
.fac-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 12px; }
.fac-mtile { position: relative; text-align: center; padding: 18px 14px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(14px); cursor: pointer; transition: transform .12s ease, border-color .2s ease; }
.fac-mtile:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.fac-mdot { position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--txt-mute); }
.fac-mdot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.fac-mava { width: 66px; height: 66px; border-radius: 50%; margin: 2px auto 11px; position: relative; overflow: hidden; background: linear-gradient(135deg, #3a4150, #262b34); display: grid; place-items: center; font-weight: 700; font-size: 21px; color: #cfd6df; border: 2px solid var(--line-2); }
.fac-mava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fac-mtile.on .fac-mava { border-color: var(--good); }
.fac-mname { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-mrank { color: var(--txt-dim); font-size: 12px; margin-top: 3px; }
.fac-mbtn { margin-top: 11px; width: 100%; border: 1px solid var(--line-2); background: var(--accent-soft); color: var(--accent); border-radius: 9px; padding: 7px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s ease; }
.fac-mbtn:hover { background: var(--accent); color: #14180a; border-color: var(--accent); }
.fac-map-slot { width: 100%; height: 540px; border-radius: 14px; background: #0a0d12; display: grid; place-items: center; color: var(--txt-mute); }
@media (max-width: 980px) { .fac-map-slot { height: 400px; } }
.fac-map-wrap.is-mobile .fac-map-slot { height: auto; min-height: 88px; padding: 18px; }
.fac-map-ph { font-size: 14px; opacity: .7; text-align: center; line-height: 1.5; padding: 0 14px; }
.map-overlay { position: fixed; z-index: 40; border: 0; border-radius: 14px; background: #0a0d12; box-shadow: 0 0 0 1px var(--line); }

/* 4B-Taler "+"-Button (Übersicht) */
.dt-plus { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; font-weight: 700; line-height: 1; text-decoration: none; background: rgba(251,191,36,.16); border: 1px solid var(--gold); color: var(--gold); transition: all .15s ease; }
.dt-plus:hover { background: var(--gold); color: #14180a; transform: translateY(-1px); }

/* Dorfladen */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin-bottom: 8px; }
.shop-card { padding: 16px 14px; text-align: center; display: flex; flex-direction: column; gap: 7px; }
.shop-img { width: 64px; height: 64px; object-fit: contain; margin: 2px auto; }
.shop-ph { font-size: 34px; opacity: .7; margin: 2px auto; }
.shop-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-price { color: var(--gold); font-weight: 700; font-size: 15px; }
.shop-qrow { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 2px 0; }
.shop-step { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--glass); color: var(--txt); font-size: 18px; line-height: 1; cursor: pointer; }
.shop-step:hover { border-color: var(--accent-2); }
.shop-qty { width: 50px !important; text-align: center; padding: 7px 4px !important; font-size: 15px !important; letter-spacing: 0 !important; text-transform: none !important; }
.shop-card .btn { padding: 9px; font-size: 14px; }

/* Bestätigungsdialog */
.modal.confirm { max-width: 400px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-actions .btn { padding: 11px 18px; }

/* ---------- LIVE-ANSICHT (Gold-Tab + Live-Bühne) ---------- */
/* Gold glühender Tab oben */
.tab.tab-gold {
  color: var(--gold);
  border-color: rgba(251,191,36,.5);
  background: linear-gradient(135deg, rgba(251,191,36,.10), rgba(251,191,36,.02));
  animation: goldGlow 2.4s ease-in-out infinite;
}
.tab.tab-gold:hover { color: #fff8e6; background: rgba(251,191,36,.18); }
.tab.tab-gold.active {
  color: #1c1400;
  background: linear-gradient(135deg, #ffd75e, var(--gold));
  border-color: var(--gold);
  animation: goldGlowActive 2.2s ease-in-out infinite;
}
@keyframes goldGlow {
  0%,100% { box-shadow: 0 0 10px -4px rgba(251,191,36,.5); }
  50%     { box-shadow: 0 0 20px 0 rgba(251,191,36,.85); }
}
@keyframes goldGlowActive {
  0%,100% { box-shadow: 0 0 16px -2px rgba(251,191,36,.7); }
  50%     { box-shadow: 0 0 30px 2px rgba(251,191,36,1); }
}
.bn-gold .ic { filter: drop-shadow(0 0 6px rgba(251,191,36,.9)); }
.bn-gold.active { color: var(--gold); }
.live-gold-tag {
  font-size: 11px; font-weight: 800; letter-spacing: 1px; vertical-align: middle;
  padding: 3px 8px; border-radius: 7px; color: #1c1400;
  background: linear-gradient(135deg, #ffd75e, var(--gold));
  box-shadow: 0 0 16px -2px rgba(251,191,36,.8);
}

/* ===== Live-Hero: High-FPS-Gameplay-Stream (Premium), pompös ===== */
.live-hero { position: relative; border-radius: 22px; overflow: hidden; margin-bottom: 22px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,215,94,.16), rgba(0,0,0,0) 55%),
              linear-gradient(160deg, #14110a, #0a0c10 62%);
  border: 1px solid rgba(255,215,94,.28); box-shadow: 0 24px 60px -24px rgba(255,200,60,.42); }
.live-hero-glow { position: absolute; inset: -45% 25% auto -20%; height: 75%;
  background: radial-gradient(closest-side, rgba(255,215,94,.5), transparent 70%); filter: blur(64px); pointer-events: none; }
.live-hero-inner { position: relative; padding: 28px 26px 26px; }
.live-hero-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.6px;
  padding: 5px 12px; border-radius: 999px; color: #1c1400;
  background: linear-gradient(135deg, #ffe9a6, var(--gold)); box-shadow: 0 0 22px -2px rgba(251,191,36,.85); }
.live-hero-title { font-size: clamp(30px, 6vw, 56px); line-height: 1.02; margin: 14px 0 8px; font-weight: 900; letter-spacing: -1.2px; }
.live-hero-title .grad { background: linear-gradient(120deg, #ffd75e, #fff6cf 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-hero-lead { font-size: clamp(14px, 2.3vw, 17px); color: var(--txt-dim); max-width: 540px; margin: 0 0 18px; }
.live-hero-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden;
  background: radial-gradient(80% 120% at 50% 0%, rgba(255,215,94,.10), #05060a 60%); border: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; }
.live-hero-stage:focus { outline: none; }
/* Steuerung aktiv: deutlicher Rahmen-Glow als Rückmeldung (du hast Fokus/Kontrolle) */
.live-hero-stage.controlling { box-shadow: inset 0 0 0 3px var(--gold), 0 0 26px -4px rgba(251,191,36,.8); }
.live-hero-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; pointer-events: none; -webkit-user-select: none; user-select: none; }
.live-hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; padding: 14px; text-align: center; }
.live-hero-status { background: rgba(10,12,18,.78); border: 1px solid rgba(255,215,94,.28); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; max-width: 92%; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7); }

/* Bühnen-Steuerung: Vollbild + Push-to-Talk (Overlay, bleibt im Vollbild sichtbar) */
.live-stage-ctrl { position: absolute; right: 12px; top: 12px; bottom: auto; display: flex; gap: 10px; align-items: center; z-index: 7; }
/* Grouped Tray: die 4 Knöpfe lesen sich als EIN Element statt verstreuter Kreise */
.live-stage-ctrl.tray { padding: 6px; border-radius: 999px; gap: 6px;
  background: rgba(8,10,15,.5); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: var(--lv-blur); -webkit-backdrop-filter: var(--lv-blur); box-shadow: 0 8px 24px -8px rgba(0,0,0,.6); }
.live-stage-ctrl.tray .lv-ib { width: 42px; height: 42px; font-size: 18px; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.live-stage-ctrl.tray .lv-ib:hover { background: rgba(255,255,255,.16); }
.live-stage-ctrl.tray .lv-ib--gold { background: linear-gradient(135deg,#ffe9a6,var(--gold)); border-color: transparent; }
.live-stage-ctrl.tray .live-join.mic.on { background: linear-gradient(135deg,#7bed9f,#2ecc71); }
/* Vollbild-Knopf lebt jetzt IN der Bedien-Leiste (oben rechts) -> statisch im Flex-Fluss. */
.live-fsbtn { position: static; width: 46px; height: 46px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); cursor: pointer; font-size: 20px;
  background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .15s ease, transform .12s ease; }
.live-fsbtn:hover { background: rgba(0,0,0,.74); transform: translateY(-1px); }
.live-join { border: 0; cursor: pointer; font-size: 15px; font-weight: 800; padding: 13px 20px; border-radius: 999px; transition: transform .12s ease, box-shadow .2s ease, filter .15s ease;
  background: linear-gradient(135deg, #ffe9a6, var(--gold)); color: #1c1400;
  box-shadow: 0 8px 24px -6px rgba(251,191,36,.7); -webkit-user-select: none; user-select: none; white-space: nowrap; }
.live-join.on { background: linear-gradient(135deg, #7bed9f, #2ecc71); color: #06310f; transform: scale(1.04);
  box-shadow: 0 0 0 5px rgba(46,204,113,.22), 0 8px 24px -6px rgba(46,204,113,.6); }
.live-join.ctrl { background: linear-gradient(135deg, #a0c4ff, #5b8cff); color: #06143a; box-shadow: 0 8px 24px -6px rgba(91,140,255,.6); }
.live-join.ctrl.on { background: linear-gradient(135deg, #7bed9f, #2ecc71); color: #06310f; }
/* Mitreden = nur Mikro-Symbol -> runder Icon-Button (wie Vollbild-Knopf, aber gold). */
.live-join.mic { padding: 0; width: 46px; height: 46px; font-size: 20px; display: flex; align-items: center; justify-content: center; }
/* Touch-Joystick (unten links auf der Bühne) */
.live-joy { position: absolute; left: 16px; bottom: 16px; width: 122px; height: 122px; border-radius: 50%;
  background: rgba(0,0,0,.5); border: 2px solid rgba(255,215,94,.55); box-shadow: 0 4px 18px rgba(0,0,0,.5); z-index: 5; touch-action: none; }
.live-joy-knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 4px 14px rgba(0,0,0,.5); }
/* CSS-Pseudo-Vollbild (Touch/iOS, wo die Fullscreen-API auf <div> nicht geht) */
.live-hero-stage.live-pseudofs { position: fixed; inset: 0; border-radius: 0; background: #000; z-index: 99999; margin: 0; }
/* KEINE CSS-Drehung mehr: die fixe Bühne füllt das Gerät im jeweiligen Querformat
   direkt; ist das Gerät (iOS) noch hochkant, blendet .live-need-rotate den Hinweis ein. */
body.live-fs-lock { overflow: hidden; }
.live-hero-stage:fullscreen { width: 100vw; height: 100vh; }
.live-hero-stage:fullscreen, .live-hero-stage.live-pseudofs { border-radius: 0; background: #000; }
.live-hero-stage:fullscreen .live-hero-video, .live-hero-stage.live-pseudofs .live-hero-video { width: 100%; height: 100%; }
.live-hero-stage:fullscreen .live-join, .live-hero-stage.live-pseudofs .live-join { font-size: 18px; padding: 16px 26px; }
.live-hero-stage:fullscreen .live-join.mic, .live-hero-stage.live-pseudofs .live-join.mic { width: 54px; height: 54px; font-size: 24px; padding: 0; }
.live-hero-stage:fullscreen .live-joy, .live-hero-stage.live-pseudofs .live-joy { width: 150px; height: 150px; left: 28px; bottom: 72px; }
.live-hero-stage:fullscreen .live-joy-knob, .live-hero-stage.live-pseudofs .live-joy-knob { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
/* Mobile-Aktionsknöpfe (rechts, über der Steuerleiste) */
.live-mbtns { position: absolute; right: 14px; bottom: 16px; display: flex; flex-direction: column; gap: 12px; z-index: 6; }
/* Menue-Modus (Mobile): Wählen/Zurück unten rechts; Joystick navigiert die Auswahl. */
.live-navbar { position: absolute; right: 16px; bottom: 18px; z-index: 7; display: flex; gap: 12px; }
.live-navbtn { width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); cursor: pointer;
  font-size: 26px; font-weight: 800; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .1s ease, filter .15s ease; }
.live-navbtn:active { transform: scale(.9); }
.live-navbtn.ok { background: linear-gradient(135deg,#7bed9f,#2ecc71); color: #06310f; border-color: transparent; box-shadow: 0 8px 22px -8px rgba(46,204,113,.7); }
.live-navbtn.back { background: rgba(10,12,18,.6); color: #ffb3bb; border-color: rgba(255,93,108,.45); }
.live-hero-stage:fullscreen .live-navbtn, .live-hero-stage.live-pseudofs .live-navbtn { width: 74px; height: 74px; font-size: 30px; }
.live-hero-stage:fullscreen .live-navbar, .live-hero-stage.live-pseudofs .live-navbar {
  right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); }
/* Cursor-Overlay (Zeiger im Cursor-Modus) – nur Anzeige, faengt keine Klicks ab. */
/* Maus wird beim Steuern per Pointer-Lock gefangen (Browser blendet den OS-Cursor dabei
   automatisch aus) -> sie verlaesst das Bild nie. Esc gibt sie frei (dann wieder sichtbar,
   um Knoepfe zu treffen / erneut reinzuklicken). Im Cursor-Modus zeigt das gelbe Overlay. */
.live-cursor { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; z-index: 9; pointer-events: none;
  transform: translate(-50%, -50%); border-radius: 50%; background: rgba(233,246,74,.9);
  border: 2px solid rgba(0,0,0,.7); box-shadow: 0 0 10px rgba(233,246,74,.8), 0 0 0 1px rgba(255,255,255,.4); }
/* Harte Garantie (positiv gegated): Joystick + Touch-Aktionsknöpfe erscheinen NUR,
   wenn die Bühne ausdrücklich im Touch-Modus ist. Jeder andere Zustand (Maus/Pointer
   ODER gar kein Modus gesetzt) -> komplett versteckt. Fix für "Joystick auf dem Desktop". */
.live-hero-stage:not(.mode-touch) .live-joy,
.live-hero-stage:not(.mode-touch) .live-mbtns { display: none !important; }
.live-mbtn { width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); cursor: pointer;
  font-size: 24px; background: rgba(0,0,0,.5); color: #fff; touch-action: none; -webkit-user-select: none; user-select: none; }
.live-mbtn.on { background: linear-gradient(135deg,#7bed9f,#2ecc71); color: #06310f; border-color: transparent; }
.live-hero-stage:fullscreen .live-mbtns, .live-hero-stage.live-pseudofs .live-mbtns { right: 28px; bottom: 110px; gap: 16px; }
.live-hero-stage:fullscreen .live-mbtn, .live-hero-stage.live-pseudofs .live-mbtn { width: 74px; height: 74px; font-size: 30px; }
.live-hero-stage:-webkit-full-screen { width: 100vw; height: 100vh; background: #000; }
.live-hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-hero { border: 0; cursor: pointer; font-weight: 800; font-size: 16px; padding: 14px 26px; border-radius: 14px;
  color: #1c1400; background: linear-gradient(135deg, #ffe9a6, var(--gold));
  box-shadow: 0 12px 30px -8px rgba(251,191,36,.7); transition: transform .12s ease, box-shadow .2s ease; }
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -8px rgba(251,191,36,.92); }
.btn-hero.stop { background: linear-gradient(135deg, #ff9a9a, #ff5d5d); color: #2a0000; box-shadow: 0 12px 30px -8px rgba(255,90,90,.6); }
.btn-lock { border: 1px solid rgba(255,215,94,.4); background: rgba(255,215,94,.08); color: #ffe9a6;
  font-weight: 800; font-size: 15px; padding: 13px 22px; border-radius: 14px; cursor: not-allowed; opacity: .9; }
.live-sink { border: 1px solid var(--line); background: rgba(255,255,255,.05); color: #e8eef5;
  font-weight: 600; font-size: 13px; padding: 12px 14px; border-radius: 14px; cursor: pointer; max-width: 260px; }
.btn-mute { border: 1px solid var(--line); background: rgba(255,255,255,.05); color: #e8eef5;
  font-weight: 700; font-size: 14px; padding: 13px 18px; border-radius: 14px; cursor: pointer; transition: border-color .15s ease; }
.btn-mute:hover { border-color: rgba(255,215,94,.45); }
.live-hero-getprem { color: var(--gold); font-weight: 700; font-size: 14px; text-decoration: none; }
.live-hero-getprem:hover { text-decoration: underline; }
/* Gesperrt (non-premium): Bühne abgedunkelt + Schloss */
.live-hero.locked .live-hero-stage { filter: grayscale(.5) brightness(.45); }
.live-hero.locked .live-hero-stage::after { content: '🔒'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; font-size: 46px; opacity: .85; }

.live-sub-head { display: flex; align-items: baseline; gap: 10px; margin: 8px 2px 8px; }
.live-sub-head h3 { margin: 0; font-size: 16px; }
.live-sub-head .sub { color: var(--txt-mute); font-size: 12px; }

.live-stage { margin-top: 6px; }

/* Online: Live-Bild */
.live-on { animation: rise .4s ease both; }
.live-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: 1px;
  padding: 6px 12px; border-radius: 10px; color: #fff; background: rgba(251,113,133,.16); border: 1px solid rgba(251,113,133,.4); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: liveDotPulse 1.4s infinite; }
@keyframes liveDotPulse { 0% { box-shadow: 0 0 0 0 rgba(251,113,133,.7); } 70% { box-shadow: 0 0 0 9px rgba(251,113,133,0); } 100% { box-shadow: 0 0 0 0 rgba(251,113,133,0); } }
.live-meta { color: var(--txt-dim); font-size: 13px; }
.live-refresh { margin-left: auto; padding: 8px 14px; }
.live-img-wrap { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2);
  background: #05070a; box-shadow: var(--shadow); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.live-img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: .35; } to { opacity: 1; } }
.live-capturing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--txt-dim); font-weight: 600; text-align: center; padding: 30px; }
.live-hint { margin-top: 12px; color: var(--good); font-size: 13.5px; font-weight: 600; text-align: center; }

/* Offline: Blurry-Platzhalter mit CTA */
.live-off { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.live-off-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.5) saturate(1.1); transform: scale(1.08); }
.live-off-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 28px; background: radial-gradient(120% 90% at 50% 40%, rgba(7,9,13,.35), rgba(7,9,13,.78)); }
.live-off-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; letter-spacing: .5px;
  padding: 6px 14px; border-radius: 999px; color: var(--txt-dim); background: rgba(0,0,0,.45); border: 1px solid var(--line-2); }
.live-off-overlay h3 { margin: 0; font-size: clamp(20px, 4vw, 30px); max-width: 560px; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.live-off-overlay p { margin: 0; color: var(--txt-dim); max-width: 460px; line-height: 1.55; }
.live-off-overlay .btn { margin-top: 6px; }
@media (max-width: 640px) { .live-img-wrap, .live-off { aspect-ratio: 4 / 3; } .live-refresh { margin-left: 0; } }

/* ---------- Suche / Filter ---------- */
.search-wrap { position: relative; margin: 4px 0 16px; }
.search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: .6; pointer-events: none; }
.search-inp { width: 100%; background: rgba(0,0,0,.32); border: 1px solid var(--line-2); color: var(--txt);
  padding: 12px 14px 12px 40px; border-radius: 13px; font-size: 15px; font-family: inherit; outline: none; transition: border .2s; }
.search-inp:focus { border-color: var(--accent); }

/* ---------- Icon-Button (Zahnrad) ---------- */
.icon-btn { padding: 9px 12px; font-size: 16px; line-height: 1; }

/* ---------- Einstellungen ---------- */
.settings .m-title { margin-bottom: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.set-row.col { flex-direction: column; align-items: stretch; gap: 10px; }
.set-row:last-of-type { border-bottom: 0; }
.set-l .t { font-weight: 700; }
.set-l .s { color: var(--txt-dim); font-size: 12.5px; margin-top: 2px; }
.set-accents { display: flex; gap: 10px; }
.accent-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.accent-sw:hover { transform: scale(1.12); }
.accent-sw.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.5); }

/* Versions-Anzeige (unten links, ganz klein + transparent) – Deploy-Verifikation */
#ver-stamp { position: fixed; left: 8px; bottom: 6px; z-index: 6; pointer-events: none;
  font-size: 10px; letter-spacing: .3px; color: var(--txt-dim); opacity: .26; user-select: none; }

/* Live-Diagnose-Box (Offline-Ansicht) */
.live-dbg { margin-top: 14px; max-width: 94%; font-size: 12px; line-height: 1.4; word-break: break-all;
  background: rgba(0,0,0,.45); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; color: var(--txt-dim); }
.live-dbg.muted-dbg { opacity: .7; }

/* ===== Live-Ansicht: Design-Politur (Demo, 24.06) ===== */
.live-join:hover { transform: translateY(-1px); filter: brightness(1.06); }
.live-join.ctrl:hover { box-shadow: 0 10px 28px -6px rgba(91,140,255,.75); }
.btn-mute.close { border-color: rgba(255,90,90,.35); color: #ffb3b3; }
.btn-mute.close:hover { border-color: rgba(255,90,90,.6); background: rgba(255,90,90,.08); }
.live-off-overlay .btn.primary { background: linear-gradient(135deg,#ffe9a6,var(--gold)); color: #1c1400;
  box-shadow: 0 12px 30px -8px rgba(251,191,36,.6); }
.live-sink { height: 48px; padding: 0 14px; border-radius: 14px; max-width: 240px;
  border-color: rgba(255,215,94,.25); background: rgba(255,215,94,.05); }
.live-hero-stage.controlling, .live-hero-stage.live-pseudofs { touch-action: none; overscroll-behavior: contain; }
/* Mobile/Vollbild: Safe-Area + dynamische Höhe (Notch/Home-Indikator) */
/* Pseudo-FS füllt randlos über inset:0 (kein Padding -> echtes Vollbild). Safe-Area nur auf Overlays. */
.live-hero-stage.live-pseudofs .live-joy, .live-hero-stage:fullscreen .live-joy {
  left: calc(28px + env(safe-area-inset-left)); bottom: calc(72px + env(safe-area-inset-bottom)); }
.live-hero-stage.live-pseudofs .live-mbtns, .live-hero-stage:fullscreen .live-mbtns {
  right: calc(24px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); }
.live-hero-stage.live-pseudofs .live-stage-ctrl, .live-hero-stage:fullscreen .live-stage-ctrl {
  top: calc(10px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); bottom: auto; }
.live-hero-stage.live-pseudofs .live-fsbtn, .live-hero-stage:fullscreen .live-fsbtn {
  width: 54px; height: 54px; font-size: 24px; }
/* "Dreh dein Handy quer"-Vollbild-Overlay: NUR wenn das Gerät (iOS) noch hochkant ist
   und kein Orientation-Lock greift (Klasse von watchOrientation gesetzt). */
body.live-need-rotate::after { content: '📱  Dreh dein Handy quer fürs Vollbild-Gameplay';
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px; background: rgba(5,6,10,.92); color: #ffd75e;
  font-weight: 800; font-size: clamp(18px, 5vw, 26px); letter-spacing: .3px; }
@media (max-width: 560px) {
  .live-hero-inner { padding: 20px 16px; }
  .live-hero-lead { font-size: 14px; }
  .live-hero-cta .btn-hero { width: 100%; justify-content: center; }
}

/* Kein Doppeltipp-Zoom auf den Live-Buttons (Mobile) */
.live-fsbtn, .live-join, .btn-hero, .btn-mute, .live-hero-getprem, .btn-lock,
.live-hero-cta button, .live-stage-ctrl button, .live-mbtn, .live-wheel-it { touch-action: manipulation; }

/* ===== Live-Steuerung: Aktionsrad, Qualität, Verbindungs-Anzeige, Autopilot (24.06) ===== */
/* Einheitlicher Glas-Look + taktiles Feedback für alle runden Overlay-Knöpfe */
.live-fsbtn, .live-join.mic, .live-wheel-btn, .live-qbtn, .live-mbtn {
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease; }
.live-fsbtn:active, .live-join.mic:active, .live-wheel-btn:active, .live-qbtn:active, .live-mbtn:active { transform: scale(.9); }
/* Aktionsrad-Knopf + Qualitäts-Knopf (rund, wie Mikro/Vollbild) */
.live-wheel-btn, .live-qbtn { width: 46px; height: 46px; border-radius: 999px; cursor: pointer; font-size: 20px;
  border: 1px solid rgba(255,215,94,.32); background: rgba(0,0,0,.5); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.live-wheel-btn:hover, .live-qbtn:hover { background: rgba(0,0,0,.74); border-color: rgba(255,215,94,.55); }
.live-mbtn { border-color: rgba(255,215,94,.22); }
.live-fsbtn { border-color: rgba(255,215,94,.22); }

/* Aktionsrad-Popover (mittig auf der Bühne) */
/* Aktionsrad: HART hidden bis .open (nie ein leeres Panel mitten im Bild) */
.live-wheel { display: none; }
.live-wheel.open { display: block; }
.live-wheel { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 9;
  width: min(420px, 88%); padding: 14px; border-radius: 18px;
  background: rgba(10,12,18,.92); border: 1px solid rgba(255,215,94,.3);
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: rise .16s ease both; }
.live-wheel-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px;
  font-weight: 800; font-size: 15px; color: #ffe9a6; }
.live-wheel-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.06); color: #fff; cursor: pointer; font-size: 15px; }
.live-wheel-x:hover { background: rgba(255,90,90,.16); border-color: rgba(255,90,90,.4); }
.live-wheel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.live-wheel-it { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 12px 6px; border-radius: 13px; cursor: pointer; min-height: 74px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.05); color: var(--txt);
  font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.15;
  transition: transform .1s ease, background .15s ease, border-color .15s ease; }
.live-wheel-it .i { font-size: 24px; line-height: 1; }
.live-wheel-it:hover { background: rgba(255,215,94,.1); border-color: rgba(255,215,94,.4); transform: translateY(-1px); }
.live-wheel-it:active { transform: scale(.94); }
.live-wheel-it.auto { background: rgba(255,215,94,.1); border-color: rgba(255,215,94,.4); color: #ffe9a6; }
.live-wheel-it.stop { grid-column: 1 / -1; flex-direction: row; gap: 9px; min-height: 0; padding: 12px;
  background: rgba(255,90,90,.16); border-color: rgba(255,90,90,.45); color: #ffb3b3; font-size: 14px; }

/* Verbindungs-/Daten-Anzeige (oben Mitte) */
/* Status oben links: LIVE-Chip + Verbindung in EINER Zeile (entzerrt das Overlay) */
.live-topleft { position: absolute; top: 12px; left: 12px; z-index: 7; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.live-topleft .lv-livechip { position: static; }
.live-meter { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px;
  background: rgba(10,12,18,.55); border: 1px solid rgba(255,255,255,.14); backdrop-filter: var(--lv-blur); -webkit-backdrop-filter: var(--lv-blur);
  color: #dfe6ef; font-size: 12px; font-weight: 700; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 24px -8px rgba(0,0,0,.6); }
.live-meter-dots { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.live-meter-dots i { width: 3px; border-radius: 1px; background: rgba(255,255,255,.25); }
.live-meter-dots i:nth-child(1) { height: 5px; } .live-meter-dots i:nth-child(2) { height: 9px; } .live-meter-dots i:nth-child(3) { height: 13px; }
.live-meter-dots i.on { background: #7bed9f; }
.live-meter-res { color: #ffe9a6; } .live-meter-data { color: var(--txt-dim); }

/* Autopilot-Status (oben Mitte, unter der Anzeige – tippen = stoppen) */
.live-ap { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); z-index: 7;
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(91,140,255,.2); border: 1px solid rgba(160,196,255,.5); color: #cfe0ff;
  font-size: 13px; font-weight: 800; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 0 rgba(91,140,255,.5); animation: liveApPulse 1.8s infinite; }
.live-ap .x { background: rgba(255,255,255,.16); padding: 2px 9px; border-radius: 999px; font-size: 11px; }
@keyframes liveApPulse { 0% { box-shadow: 0 0 0 0 rgba(91,140,255,.5); } 70% { box-shadow: 0 0 0 10px rgba(91,140,255,0); } 100% { box-shadow: 0 0 0 0 rgba(91,140,255,0); } }

/* Vollbild: größere Knöpfe + Safe-Area für die neuen Bedien-Elemente */
.live-hero-stage:fullscreen .live-wheel-btn, .live-hero-stage.live-pseudofs .live-wheel-btn,
.live-hero-stage:fullscreen .live-qbtn, .live-hero-stage.live-pseudofs .live-qbtn { width: 54px; height: 54px; font-size: 24px; }
.live-hero-stage:fullscreen .live-topleft, .live-hero-stage.live-pseudofs .live-topleft { top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); }
.live-hero-stage:fullscreen .live-ap, .live-hero-stage.live-pseudofs .live-ap { top: calc(46px + env(safe-area-inset-top)); }
@media (max-width: 640px) { .live-wheel-grid { grid-template-columns: repeat(3, 1fr); } }

/* Erst-Hilfe-Overlay (einmal pro Gerät beim ersten Steuern) */
.live-coach { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 14px calc(20px + env(safe-area-inset-bottom)); pointer-events: none; animation: rise .2s ease both; }
.live-coach-card { pointer-events: auto; max-width: 460px; width: 100%; text-align: center;
  background: rgba(10,12,18,.92); border: 1px solid rgba(255,215,94,.32); border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 20px 50px -16px rgba(0,0,0,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #e8eef5; font-size: 13.5px; display: flex; flex-direction: column; gap: 7px; }
.live-coach-card .h { font-weight: 800; font-size: 15px; color: #ffe9a6; }
.live-coach-ok { margin-top: 4px; align-self: center; border: 0; cursor: pointer; font-weight: 800; font-size: 14px;
  padding: 10px 22px; border-radius: 12px; color: #1c1400; background: linear-gradient(135deg,#ffe9a6,var(--gold));
  box-shadow: 0 8px 22px -8px rgba(251,191,36,.7); }
.live-coach-ok:active { transform: scale(.95); }

/* ===== Live-Ansicht: Premium-Player-Chrome (Scrims, LIVE-Chip, Idle-Fade, A11y) ===== */
.live-hero { --lv-blur: blur(13px) saturate(1.15); --lv-live: #ff5d6c; }
/* Fokus-Sichtbarkeit (A11y) */
.lv-ib:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(251,191,36,.4); border-color: rgba(255,215,94,.55); }
.live-hero-stage:focus-visible { outline: 2px solid rgba(251,191,36,.6); outline-offset: -2px; }
.live-wheel-x:focus-visible, .live-ap:focus-visible, .live-coach-ok:focus-visible, .live-wheel-it:focus-visible {
  outline: 2px solid rgba(251,191,36,.6); outline-offset: 2px; }

/* Top-/Bottom-Scrim: nur wenn der Stream offen ist -> echtes Player-Gefühl */
.live-hero-stage.is-open::before, .live-hero-stage.is-open::after {
  content: ''; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 3; transition: opacity .25s ease; }
.live-hero-stage.is-open::before { top: 0; height: 32%; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.live-hero-stage.is-open::after { bottom: 0; height: 34%; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent); }

/* LIVE-Chip auf der Bühne (oben links) */
.lv-livechip { position: absolute; top: 12px; left: 12px; z-index: 7; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(10,12,18,.55); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: var(--lv-blur); -webkit-backdrop-filter: var(--lv-blur); color: #fff; font-weight: 800; font-size: 11px;
  letter-spacing: 1.2px; box-shadow: 0 8px 24px -8px rgba(0,0,0,.6); transition: opacity .35s ease; }
.lv-livechip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lv-live);
  box-shadow: 0 0 0 0 rgba(255,93,108,.7); animation: lvLive 1.6s infinite; }
.lv-livechip.stalled .dot { animation: none; background: #b9a14a; }
@keyframes lvLive { 70% { box-shadow: 0 0 0 7px rgba(255,93,108,0); } 100% { box-shadow: 0 0 0 0 rgba(255,93,108,0); } }
.live-hero-stage:fullscreen .lv-livechip, .live-hero-stage.live-pseudofs .lv-livechip { top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); }

/* Chrome verblasst bei Untätigkeit (Joystick/Aktionsknöpfe bleiben – man steuert ja) */
.live-hero-stage .live-stage-ctrl, .live-hero-stage .live-topleft { transition: opacity .35s ease; }
.live-hero-stage.lv-idle .live-stage-ctrl, .live-hero-stage.lv-idle .live-topleft { opacity: 0; pointer-events: none; }

/* Dim hinter dem Aktionsrad (Overlay deckt die ganze Bühne, lässt Klicks zum Rad durch) */
.live-hero-stage.lv-dim > .live-hero-overlay { background: rgba(0,0,0,.5); transition: background .18s; }

/* Touch: Chrome nicht ganz ausblenden (kein Hover zum Aufwecken), keine klebrigen Hover */
@media (hover: none) {
  .live-hero-stage.lv-idle .live-stage-ctrl, .live-hero-stage.lv-idle .live-topleft { opacity: .9; pointer-events: auto; }
  .lv-ib:hover, .live-wheel-it:hover { transform: none; }
}
/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce) {
  .lv-livechip .dot, .live-dot, .live-ap, .live-hero-status { animation: none !important; }
  .lv-ib, .live-wheel-it, .btn-hero, .live-hero-stage .live-stage-ctrl, .live-hero-stage .lv-livechip { transition: none !important; }
}

/* ---------------- FEATURES (Schaufenster) ---------------- */
.feat-hero { position: relative; overflow: hidden; border-radius: var(--radius); padding: 0; margin-bottom: 24px; border: 1px solid rgba(251,191,36,.22); }
.feat-hero-glow { position: absolute; inset: -55% 18% auto -18%; height: 85%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(251,191,36,.42), transparent 70%); filter: blur(22px); }
.feat-hero-inner { position: relative; padding: 30px 28px; }
.feat-hero-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--gold); background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3); padding: 5px 12px; border-radius: 999px; }
.feat-hero-title { font-size: clamp(26px, 5vw, 46px); line-height: 1.04; margin: 14px 0 8px; font-weight: 900; letter-spacing: -1px; }
.feat-hero-title .grad { background: linear-gradient(120deg, #ffd75e, #fff6cf 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.feat-hero-lead { font-size: clamp(14px, 2.2vw, 16px); color: var(--txt-dim); max-width: 560px; margin: 0 0 18px; }
.feat-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.feat-sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.feat-sec-head h3 { font-size: 19px; margin: 0; }
.feat-sec-head span { color: var(--txt-dim); font-size: 13px; }

.feat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
.feat-card { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-sm);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.feat-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 16px 34px -18px rgba(0,0,0,.7); }
.feat-ic { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px;
  border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--line); }
.feat-body { min-width: 0; }
.feat-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.feat-top h4 { margin: 0; font-size: 15.5px; }
.feat-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(233,246,74,.3); padding: 2px 8px; border-radius: 999px; }
.feat-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--txt-dim); }
.feat-hot { border-color: rgba(251,191,36,.28); }
.feat-hot .feat-ic { background: rgba(251,191,36,.16); border-color: rgba(251,191,36,.4); }
.feat-hot .feat-badge { color: var(--gold); background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.35); }

.feat-foot { margin-top: 28px; padding: 22px; border-radius: var(--radius); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.feat-foot p { margin: 0; color: var(--txt-dim); font-size: 14px; }
.feat-foot b { color: #fff; }

/* ---------------- Troll-Webcam ---------------- */
.wc-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.wc-hint { color: var(--txt-dim); font-size: 14px; text-align: center; }
.wc-stage { position: relative; width: 280px; height: 280px; max-width: 80vw; max-height: 80vw;
  border-radius: 18px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.1); }
.wc-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
/* Kopf-Schablone (Oval) – zeigt, welcher Ausschnitt im Spiel landet. */
.wc-mask { position: absolute; inset: 0; pointer-events: none;
  box-shadow: 0 0 0 2000px rgba(0,0,0,.45) inset; }
.wc-mask::before { content: ''; position: absolute; left: 50%; top: 47%; transform: translate(-50%,-50%);
  width: 62%; height: 78%; border-radius: 50%; border: 2px dashed rgba(255,255,255,.85);
  box-shadow: 0 0 0 2000px rgba(0,0,0,.45); }
.wc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.wc-status { font-weight: 600; min-width: 120px; text-align: center; }
.wc-hide { display: none !important; }

/* ---------- Mobile-Performance: teure Effekte drosseln (INP/Scroll auf Mittelklasse-Handys) ---------- */
/* backdrop-filter + gestapelte 90px-Blurs sind das Teuerste auf mobilen GPUs. Die Glas-Tokens
   sind bereits semi-deckend (.66) -> ohne backdrop-filter immer noch als Panel lesbar. */
@media (max-width: 860px) {
  .topbar, .botnav, .glass, .panel, .modal, .sheet, .chip, .subtab, .taler-pill,
  .live-stage-ctrl, .live-meter, .lv-livechip, .live-wheel, .live-ap, .live-coach {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  /* Hintergrund-Glows: kleinerer Blur-Radius + weniger Deckkraft = deutlich guenstiger. */
  .bg-glow { filter: blur(60px); opacity: .32; }
  .g3 { display: none; }   /* dritter Glow auf Mobile weglassen */
}
/* Wer Bewegung reduziert: die animierten Hintergrund-Glows komplett anhalten. */
@media (prefers-reduced-motion: reduce) {
  .bg-glow { animation: none !important; }
}

/* ===================== Onboarding-Hub (Cinematic Dark-Glow) ===================== */
.hub-bg {
  position: fixed; inset: 0; z-index: 4000;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1100px 780px at 50% 26%, rgba(196,15,8,.20), transparent 60%),
    radial-gradient(900px 700px at 50% 118%, var(--accent-soft), transparent 60%),
    var(--bg-0);
  overflow: hidden; animation: hub-fade .45s ease both;
}
.hub-bg.closing { animation: hub-out .34s ease both; }
.hub-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hub-orbs i { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .5; animation: hub-float 15s ease-in-out infinite; }
.hub-inner { position: relative; text-align: center; padding: 24px; max-width: 980px; width: 100%; }
.hub-badge {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 22px;
  display: grid; place-items: center; font-size: 42px; background: var(--glass);
  box-shadow: 0 0 0 1px var(--accent-line), 0 0 42px var(--accent-soft);
  animation: hub-rise .6s cubic-bezier(.2,.8,.2,1) both, hub-glow 3.6s ease-in-out 0.6s infinite;
}
.hub-title { font-size: clamp(28px, 5vw, 46px); font-weight: 800; margin: 0; letter-spacing: .4px; text-shadow: 0 0 34px rgba(233,246,74,.22); animation: hub-rise .6s cubic-bezier(.2,.8,.2,1) .05s both; }
.hub-sub { color: var(--txt-dim); margin: 8px 0 32px; font-size: clamp(14px,2.2vw,18px); animation: hub-rise .6s cubic-bezier(.2,.8,.2,1) .1s both; }
.hub-cards { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.hub-card {
  position: relative; width: 232px; max-width: 82vw; padding: 30px 20px 24px; border-radius: 22px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.10); background: var(--glass); color: var(--txt); overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
  box-shadow: 0 10px 30px rgba(0,0,0,.42);
  animation: hub-rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.hub-card::after { content:''; position:absolute; left:50%; top:-34%; width:170%; height:120%; transform:translateX(-50%); background: radial-gradient(closest-side, var(--c1s), transparent 70%); opacity:.4; pointer-events:none; }
.hub-card > * { position: relative; z-index: 1; }
.hub-card:hover, .hub-card:focus-visible { transform: translateY(-8px) scale(1.03); border-color: var(--c1); box-shadow: 0 18px 52px rgba(0,0,0,.5), 0 0 48px var(--c1s); outline: none; }
.hub-ic { font-size: 48px; line-height: 1; margin-bottom: 12px; filter: drop-shadow(0 0 15px var(--c1s)); }
.hub-name { font-size: 22px; font-weight: 800; }
.hub-desc { color: var(--txt-dim); font-size: 12.5px; margin-top: 5px; line-height: 1.4; }
.hub-go { margin-top: 16px; font-size: 12px; color: var(--c1); font-weight: 800; letter-spacing: .3px; opacity: .95; }
.gm-card { transition: transform .2s, box-shadow .2s; }
.gm-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 30px var(--c1); }
@keyframes hub-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes hub-out { from { opacity: 1 } to { opacity: 0 } }
@keyframes hub-rise { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }
@keyframes hub-float { 0%,100% { transform: translate(0,0) } 50% { transform: translate(34px,-26px) } }
@keyframes hub-glow { 0%,100% { box-shadow: 0 0 0 1px var(--accent-line), 0 0 30px var(--accent-soft) } 50% { box-shadow: 0 0 0 1px var(--accent-line), 0 0 58px var(--accent-soft) } }
@media (max-width: 520px) { .hub-cards { gap: 14px } .hub-card { width: 100%; max-width: 340px } }
@media (prefers-reduced-motion: reduce) {
  .hub-orbs i, .hub-badge { animation: none !important; }
  .hub-card, .hub-title, .hub-sub, .hub-badge { animation-duration: .01ms !important; }
}

/* Cfx-PLA Pflicht-Fußzeile (Non-Endorsement-Disclaimer + Betreiber-Kontakt) */
.legal-foot { display: flex; flex-direction: column; gap: 4px; text-align: center; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); font-size: 10.5px; line-height: 1.6; color: var(--txt); opacity: .45; }
.legal-foot a { color: inherit; text-decoration: underline; }
@media (max-width: 860px) { .legal-foot { padding-bottom: 96px; } } /* Platz fuer die Bottom-Nav */
