/* Design des Spiele-Hubs – Spiel-Look: dunkle Fantasy-Kulisse, Panels mit goldenem Metallrahmen und Nieten,
   rote Banner-Titel, dicke 3D-Knöpfe. Alle Farben hängen an den Variablen unten -> an EINER Stelle änderbar.
   Bausteine:  .frame (Rahmen mit Nieten, Füllung über --fill)  .panel (Rahmen mit Innenabstand)  .ribbon (Banner)
               .btn (+ .green .red .stone .blue)  .round-btn  .coin-chip  .chip  .tabs  .switch */
:root {
  --text: #f6ead0; --muted: #bca77f; --ink: #3a2300;
  --gold-hi: #fff1b0; --gold: #f2c650; --gold-mid: #d39a26; --gold-lo: #8a5a12; --gold-edge: #6b4a12;
  --wood-hi: #3d2817; --wood-lo: #1f130a;
  --red: #c8322b; --red-lo: #6d1410;
  --green-edge: #1e5410; --red-edge: #5e120d; --stone-edge: #23252e;
  --gold-border: linear-gradient(160deg, #fff0b8 0%, #e2b04a 22%, #8a5a12 48%, #f3cd6c 72%, #9c6a18 100%);
  --r: 18px; --r-s: 12px;
  --font: "Segoe UI", Tahoma, Geneva, Verdana, system-ui, -apple-system, sans-serif;
  --font-display: "Cinzel", Georgia, serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0814; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
input { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--gold); }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }

/* ---------- Kulisse: Nachthimmel mit warmem Licht, Funken und Vignette */
#app { position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -8%, rgba(255, 186, 80, .28), transparent 60%),
    radial-gradient(circle at 12% 85%, rgba(70, 110, 255, .20), transparent 42%),
    radial-gradient(circle at 90% 75%, rgba(200, 60, 170, .16), transparent 45%),
    linear-gradient(45deg, rgba(255, 255, 255, .018) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .018) 75%) 0 0 / 34px 34px,
    linear-gradient(-45deg, rgba(255, 255, 255, .018) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .018) 75%) 0 0 / 34px 34px,
    linear-gradient(180deg, #1d1633 0%, #110c20 55%, #08060f 100%); }
#app::before { content: ""; position: absolute; inset: -50% 0 0; pointer-events: none; opacity: .55;
  background:
    radial-gradient(1.5px 1.5px at 10% 20%, #ffe7a8, transparent), radial-gradient(1px 1px at 30% 65%, #fff, transparent),
    radial-gradient(2px 2px at 55% 35%, #ffd27a, transparent), radial-gradient(1px 1px at 75% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 25%, #ffe7a8, transparent), radial-gradient(1px 1px at 42% 90%, #ffd27a, transparent);
  background-size: 420px 420px; animation: drift 60s linear infinite; }
#app::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%); }
@keyframes drift { to { transform: translateY(420px); } }

.screen { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); overflow: hidden; }
.screen.enter-forward { animation: in-fwd .25s ease-out; }
.screen.enter-back { animation: in-back .25s ease-out; }
@keyframes in-fwd { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes in-back { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.pad { padding: 18px 16px 36px; display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 820px; margin: 0 auto; }

/* ---------- Rahmen: goldener Metallrand, dunkle Holz-Füllung, Nieten in den Ecken */
.frame { position: relative; border: 3px solid transparent; border-radius: var(--r); color: var(--text);
  background: var(--fill, linear-gradient(180deg, var(--wood-hi), var(--wood-lo))) padding-box, var(--gold-border) border-box;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .5), inset 0 0 0 4px rgba(255, 214, 120, .16), inset 0 18px 30px rgba(255, 210, 140, .05), 0 12px 26px rgba(0, 0, 0, .55); }
.frame::before { content: ""; position: absolute; inset: 4px; z-index: 3; pointer-events: none; border-radius: calc(var(--r) - 5px);
  --n: radial-gradient(circle, #fff6cf 0 1.4px, #d7a33a 2.4px, #5a3a0c 3.4px, transparent 4.2px);
  background: var(--n) 0 0 / 11px 11px no-repeat, var(--n) 100% 0 / 11px 11px no-repeat, var(--n) 0 100% / 11px 11px no-repeat, var(--n) 100% 100% / 11px 11px no-repeat; }
.panel { padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.panel > .ribbon:first-child { margin: -40px auto 2px; }
.card-t { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Banner-Titel */
.ribbon { display: flex; justify-content: center; margin: 0; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .55)); }
.ribbon > span { position: relative; display: inline-block; max-width: 100%; padding: 9px 36px 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(.98rem, 3.6vw, 1.3rem);
  text-transform: uppercase; letter-spacing: .07em; line-height: 1.15; text-align: center; color: #ffe9ad; text-shadow: 0 2px 0 #4a0d0d, 0 0 12px rgba(255, 200, 80, .35);
  background: linear-gradient(180deg, #e04a3f 0%, var(--red) 40%, #8e1d18 60%, var(--red-lo) 100%);
  box-shadow: inset 0 2px 0 #f6cf72, inset 0 -2px 0 #f6cf72, inset 0 4px 0 rgba(0, 0, 0, .25), inset 0 -4px 0 rgba(0, 0, 0, .25);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 50%, 100% 100%, 0 100%, 16px 50%); }

/* ---------- Knöpfe (3D) */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 2px solid var(--gold-edge);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 44%, var(--gold-mid) 56%, #b57a14 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(0, 0, 0, .18), 0 5px 0 var(--gold-edge), 0 9px 14px rgba(0, 0, 0, .5);
  transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--gold-edge), 0 3px 6px rgba(0, 0, 0, .5); }
.btn:disabled { filter: grayscale(.6) brightness(.8); cursor: default; }
.btn.big { min-height: 56px; font-size: 1.05rem; width: 100%; }
.btn.green { border-color: var(--green-edge); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); background: linear-gradient(180deg, #c6f78a 0%, #6ccf43 44%, #3fa528 56%, #2a7a18 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 5px 0 var(--green-edge), 0 9px 14px rgba(0, 0, 0, .5); }
.btn.red, .btn.danger { border-color: var(--red-edge); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); background: linear-gradient(180deg, #ff9a88 0%, #e2483c 44%, #bb2b22 56%, #8e1d18 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 5px 0 var(--red-edge), 0 9px 14px rgba(0, 0, 0, .5); }
.btn.stone, .btn.ghost { border-color: var(--stone-edge); color: #ece4cf; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); background: linear-gradient(180deg, #8d91a0 0%, #5b5f6e 44%, #474a57 56%, #34363f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 5px 0 var(--stone-edge), 0 9px 14px rgba(0, 0, 0, .5); }
.btn.is-busy { color: transparent; text-shadow: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .25); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.round-btn { flex-shrink: 0; display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 3px solid transparent; font-size: 1.5rem; line-height: 1; color: var(--gold-hi);
  background: radial-gradient(circle at 50% 35%, #4a3220, #1e130a) padding-box, var(--gold-border) border-box; box-shadow: 0 4px 0 #3a250c, 0 8px 14px rgba(0, 0, 0, .5); transition: transform .08s; }
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3a250c; }

/* ---------- Kleinteile */
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(242, 198, 80, .2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px 16px; text-align: center; }
.notice { flex: 1; max-width: 440px; margin: 0 auto; } .notice h1 { font-family: var(--font-display); color: var(--gold); }
.big-ic, .empty-ic { font-size: 3.2rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: .9rem; color: var(--text);
  background: linear-gradient(#24170d, #24170d) padding-box, var(--gold-border) border-box; }
.chip.on { color: var(--ink); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-mid)) padding-box, var(--gold-border) border-box; }
.badge { position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: linear-gradient(#ff6b5c, #c8322b); border: 2px solid #ffe2a0; color: #fff; font-size: .72rem; font-style: normal; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.badge.hide { display: none; }
.coin-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 6px; border-radius: 999px; border: 3px solid transparent; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--gold-hi);
  background: linear-gradient(180deg, #2e1e10, #160d06) padding-box, var(--gold-border) border-box; box-shadow: 0 6px 14px rgba(0, 0, 0, .5); }
.coin-chip .coin { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 1.15rem; background: radial-gradient(circle at 40% 35%, #fff3b8, #e0a92c 60%, #8a5a12); box-shadow: 0 0 10px rgba(255, 200, 80, .55); }
.link { color: var(--gold); font-size: .9rem; align-self: center; }
.ic-emoji { line-height: 1; } .ic-img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Meldungen */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#layer > * { pointer-events: auto; }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(20px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; pointer-events: none; padding: 0 16px; }
.toast { max-width: 480px; padding: 11px 18px; border-radius: 14px; border: 2px solid transparent; font-weight: 700; color: var(--text);
  background: linear-gradient(#2a1a0e, #1a0f07) padding-box, var(--gold-border) border-box; box-shadow: 0 8px 20px rgba(0, 0, 0, .6); animation: pop .2s ease-out; }
.toast.bad { background: linear-gradient(#7a1a14, #4d0f0b) padding-box, var(--gold-border) border-box; }
.toast.ok { background: linear-gradient(#2a6b1c, #17420f) padding-box, var(--gold-border) border-box; }
.toast.out { opacity: 0; transition: opacity .2s; }

/* ---------- Ladebildschirm + Intro */
#splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: radial-gradient(60% 45% at 50% 45%, #2b2045, #0b0814); transition: opacity .35s; }
#splash.out { opacity: 0; pointer-events: none; }
.splash-logo { width: min(70vw, 420px); height: auto; filter: drop-shadow(0 10px 30px rgba(255, 180, 60, .35)); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03); } }
#intro { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: opacity .6s ease; }
#intro.out { opacity: 0; pointer-events: none; }
.intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; background: #000; }
#intro.playing .intro-video { opacity: 1; }
#intro.show-logo .intro-video { opacity: 0; transition-duration: .7s; }
.intro-logo { position: relative; width: min(82vw, 560px); opacity: 0; transform: scale(.86); pointer-events: none; }
.intro-logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 50px rgba(255, 170, 60, .4)); }
#intro.show-logo { background: radial-gradient(65% 55% at 50% 50%, #3a2a5a 0%, #160f28 55%, #06040b 100%); transition: background .7s; }
#intro.show-logo .intro-logo { animation: logo-in 1.1s cubic-bezier(.2, 1.3, .4, 1) .15s forwards; }
@keyframes logo-in { to { opacity: 1; transform: scale(1); } }
.intro-shine { position: absolute; inset: 0; overflow: hidden; -webkit-mask: url("../assets/brand/logo.webp") center / contain no-repeat; mask: url("../assets/brand/logo.webp") center / contain no-repeat; }
.intro-shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; left: -40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-18deg); }
#intro.show-logo .intro-shine::after { animation: shine 1.1s ease-in-out 1s forwards; }
@keyframes shine { to { left: 120%; } }
.intro-skip { position: absolute; right: calc(18px + var(--safe-r)); bottom: calc(22px + var(--safe-b)); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(0, 0, 0, .6); color: #fff; font-weight: 700; opacity: 0; animation: fade-in .4s ease .6s forwards; }
.intro-sound { position: absolute; left: calc(18px + var(--safe-l)); bottom: calc(22px + var(--safe-b)); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .6); color: #fff; font-size: 1.2rem; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Kopfzeile der Unterbildschirme */
.topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.topbar .ribbon { min-width: 0; }
.topbar .ribbon > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Formulare */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-l { font-family: var(--font-display); font-weight: 700; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); }
.field-h { font-size: .78rem; }
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-s); border: 2px solid #5a3d18; background: #120a05; color: var(--text); font: inherit; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .6); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .6), 0 0 0 3px rgba(242, 198, 80, .25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; } .check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold-mid); }
.form-msg { color: #ff8f80; font-weight: 700; font-size: .9rem; } .form-msg:empty { display: none; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #120a05; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .6); }
.tab { min-height: 42px; border: 0; border-radius: 11px; background: transparent; font-family: var(--font-display); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tab.on { color: var(--ink); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-mid)); box-shadow: 0 2px 0 var(--gold-edge); }
.lang-row { display: flex; gap: 8px; flex-wrap: wrap; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; }
.switch { position: relative; width: 56px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #120a05; border: 2px solid #5a3d18; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .6); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff3b8, #d39a26 70%); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); transition: transform .15s; }
.switch input:checked + i { background: linear-gradient(180deg, #4bb52f, #2a7a18); border-color: var(--green-edge); }
.switch input:checked + i::after { transform: translateX(24px); }

/* ---------- Login */
.auth-wrap { width: 100%; max-width: 430px; margin: 0 auto; padding: 18px 16px 36px; display: flex; flex-direction: column; gap: 18px; }
.auth-wrap .lang-row { justify-content: flex-end; }
.auth-logo { width: min(74vw, 330px); height: auto; align-self: center; filter: drop-shadow(0 10px 30px rgba(255, 180, 60, .3)); }
.auth-card { margin-top: 18px; }

/* ---------- Hauptmenü */
.home { width: 100%; max-width: 1100px; margin: 0 auto; padding: 12px 16px 32px; display: flex; flex-direction: column; gap: 18px; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hud-me { --r: 999px; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 18px 4px 4px; }
.hud-me.frame::before { display: none; }
.avatar { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
  border: 3px solid transparent; background: radial-gradient(circle at 40% 30%, #5aa0ff, #1a4fb8 65%, #0c2766) padding-box, var(--gold-border) border-box; box-shadow: 0 0 12px rgba(90, 160, 255, .35); }
.hud-me-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hud-me-t b { font-family: var(--font-display); color: var(--gold-hi); }
.hud-me-t small { color: var(--muted); }
.hud-me-t b, .hud-me-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.home-logo { width: min(62vw, 360px); height: auto; align-self: center; margin: -4px 0 -6px; filter: drop-shadow(0 10px 30px rgba(255, 180, 60, .3)); }

/* Spielkarten */
.gcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (min-width: 900px) { .gcards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gcard { display: flex; flex-direction: column; padding: 0; text-align: center; overflow: hidden; animation: card-in .5s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(var(--i, 0) * 90ms);
  transition: transform .15s, box-shadow .15s; }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.95); } }
.gcard:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .5), 0 0 28px color-mix(in srgb, var(--c) 65%, transparent), 0 16px 30px rgba(0, 0, 0, .6); }
.gcard:active { transform: translateY(-1px) scale(.98); }
.gcard-art { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; overflow: hidden; border-radius: calc(var(--r) - 4px) calc(var(--r) - 4px) 0 0;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 75%, #fff) 0%, var(--c) 35%, color-mix(in srgb, var(--c) 45%, #000) 100%); }
.gcard-rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .14) 0 10deg, transparent 10deg 24deg); animation: spin 28s linear infinite; }
.gcard-ic { position: relative; font-size: clamp(3.2rem, 11vw, 5.4rem); filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); animation: float 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.7s); }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.gcard-plate { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; margin: -20px 10px 0; padding: 8px 10px 9px; border-radius: 12px; border: 2px solid transparent;
  background: linear-gradient(180deg, #2c1c0f, #170d06) padding-box, var(--gold-border) border-box; box-shadow: 0 6px 12px rgba(0, 0, 0, .5); }
.gcard-plate b { font-family: var(--font-display); font-size: clamp(.9rem, 2.6vw, 1.12rem); color: var(--gold-hi); text-transform: uppercase; letter-spacing: .04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.gcard-plate small { color: var(--muted); font-size: .78rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard-btn { margin: 12px 12px 16px; min-height: 42px; font-size: .88rem; pointer-events: none; }
.gcard-soon { position: absolute; top: 20px; right: -38px; z-index: 4; width: 150px; padding: 4px 0; transform: rotate(45deg); font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #ffe9ad;
  background: linear-gradient(180deg, #e04a3f, #8e1d18); box-shadow: inset 0 1px 0 #f6cf72, inset 0 -1px 0 #f6cf72, 0 3px 6px rgba(0, 0, 0, .5); }
.gcard.soon .gcard-art { filter: saturate(.45) brightness(.7); }
.gcard.is-busy { pointer-events: none; filter: brightness(.75); }

/* Minispiele / Events */
.home-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.more { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; transition: transform .12s, filter .15s; }
.more:hover { filter: brightness(1.1); } .more:active { transform: scale(.98); }
.more.blue { --fill: linear-gradient(180deg, #2a62d6, #123a8c 60%, #0b2459); }
.more.violet { --fill: linear-gradient(180deg, #8a46d6, #4b1d8c 60%, #2c0f59); }
.more-ic { position: relative; flex-shrink: 0; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; font-size: 1.9rem; border: 3px solid transparent;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .25), rgba(0, 0, 0, .35)) padding-box, var(--gold-border) border-box; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.more-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.more-tx b { font-family: var(--font-display); font-size: 1.08rem; color: #fff; text-transform: uppercase; letter-spacing: .04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.more-tx small { color: rgba(255, 255, 255, .78); font-size: .8rem; }
.more-go { font-size: 2rem; line-height: 1; color: var(--gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }

@media (max-width: 560px) {
  .home { gap: 14px; padding-top: 10px; }
  .home-logo { width: min(52vw, 230px); }
  .gcards, .home-more { gap: 12px; }
  .gcard-art { aspect-ratio: 4 / 3; }
  .gcard-ic { font-size: 3.4rem; }
  .gcard-plate { margin: -16px 8px 0; padding: 7px 6px; }
  .gcard-plate b { font-size: .82rem; letter-spacing: .02em; }
  .gcard-plate small { display: none; }
  .gcard-btn { margin: 9px 9px 12px; min-height: 36px; padding: 0 8px; font-size: .76rem; }
  .gcard-soon { top: 14px; right: -44px; font-size: .68rem; }
  .more { gap: 8px; padding: 8px 10px; }
  .more-ic { width: 40px; height: 40px; font-size: 1.3rem; border-width: 2px; }
  .more-tx b { font-size: .86rem; }
  .more-tx small, .more-go { display: none; }
  .hud-me-t small { display: none; }
}

/* ---------- Spiel im Vollbild */
.screen-play { padding: 0; background: #000; }
.play-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.play-back { position: absolute; top: calc(10px + var(--safe-t)); left: calc(10px + var(--safe-l)); z-index: 2; display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 14px 0 8px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--gold-hi); opacity: .8;
  background: linear-gradient(rgba(20, 12, 6, .85), rgba(20, 12, 6, .85)) padding-box, var(--gold-border) border-box; }
.play-back span:first-child { font-size: 1.4rem; line-height: 1; }
.play-back:hover { opacity: 1; }

/* ---------- Minispiele-Liste */
.mtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.mtile { display: flex; flex-direction: column; padding: 0; text-align: left; overflow: hidden; transition: transform .12s; }
.mtile:hover { transform: translateY(-3px); }
.mtile-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; font-size: 2.6rem; border-radius: calc(var(--r) - 4px) calc(var(--r) - 4px) 0 0;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 40%, color-mix(in srgb, var(--c) 45%, #000)); }
.mtile-art.has-cover { background-size: cover; background-position: center; }
.mtile-tag { position: absolute; top: 8px; right: 8px; font-size: .9rem; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 2px 7px; }
.mtile-tx { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.mtile-tx b { font-family: var(--font-display); color: var(--gold-hi); }
.mtile-tx small { font-size: .78rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Events */
.ecard { display: flex; gap: 14px; padding: 16px; --fill: linear-gradient(90deg, color-mix(in srgb, var(--c) 35%, var(--wood-hi)), var(--wood-lo) 70%); }
.ecard-ic { width: 60px; height: 60px; flex-shrink: 0; display: grid; place-items: center; font-size: 2rem; border-radius: 50%; border: 3px solid transparent;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 70%, #fff), color-mix(in srgb, var(--c) 50%, #000)) padding-box, var(--gold-border) border-box; }
.ecard-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ecard-tx > b { font-family: var(--font-display); font-size: 1.08rem; color: var(--gold-hi); }
.ecard-top { display: flex; align-items: center; gap: 8px; } .ecard-top .chip { min-height: 24px; padding: 0 10px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.ecard.live .chip.on { color: #fff; background: linear-gradient(180deg, #6ccf43, #2a7a18) padding-box, var(--gold-border) border-box; }
.ecard-time { color: var(--gold); font-weight: 700; }

/* ---------- Fenster */
.modal-back { position: fixed; inset: 0; display: grid; place-items: center; padding: 40px 16px 16px; background: rgba(5, 3, 10, .72); backdrop-filter: blur(3px); animation: fade-in .15s ease; }
.modal-back.out { opacity: 0; transition: opacity .15s; }
.modal { width: 100%; max-width: 410px; max-height: 88vh; overflow: visible; padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 14px; text-align: center; animation: pop .22s cubic-bezier(.2, 1.3, .4, 1); }
.modal > .ribbon:first-child { margin: -46px auto 0; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-ic { font-size: 3.4rem; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.modal-b { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.modal-btns { display: flex; gap: 12px; justify-content: center; margin-top: 6px; } .modal-btns .btn { flex: 1; }

/* ---------- Kopfleiste: Währungen + runde Knöpfe */
.hud-me { cursor: pointer; text-align: left; color: var(--text); }
.hud-me:hover { filter: brightness(1.1); }
.hud-r { gap: 8px; }
.hud-cur, .hud-btns { display: flex; align-items: center; gap: 8px; }
.round-btn { position: relative; }
.round-btn .badge { top: -4px; right: -4px; }
.coin-chip.wrench .coin { background: radial-gradient(circle at 40% 35%, #d8ecff, #6aa8ff 60%, #1d4fb8); box-shadow: 0 0 10px rgba(90, 160, 255, .5); }
@media (max-width: 720px) {
  .hud { flex-wrap: wrap; }
  .hud-r { width: 100%; justify-content: space-between; }
  .coin-chip { min-height: 38px; font-size: .92rem; padding-right: 12px; }
  .coin-chip .coin { width: 28px; height: 28px; font-size: 1rem; }
  .round-btn { width: 42px; height: 42px; font-size: 1.25rem; }
}

/* ---------- Avatar (Emoji oder Anfangsbuchstabe) */
.avatar { position: relative; }
.avatar.emoji { font-size: 1.6rem; text-shadow: none; background: radial-gradient(circle at 40% 30%, #4a3a6a, #1d1433 70%) padding-box, var(--gold-border) border-box; }
.avatar.s { width: 40px; height: 40px; font-size: 1.05rem; } .avatar.s.emoji { font-size: 1.35rem; }
.avatar.l { width: 104px; height: 104px; font-size: 2.6rem; border-width: 4px; } .avatar.l.emoji { font-size: 3.4rem; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: #6b6b6b; border: 2px solid #1a1208; }
.avatar.l .dot { width: 22px; height: 22px; border-width: 3px; right: 2px; bottom: 2px; }
.avatar .dot.on { background: #4bd12a; box-shadow: 0 0 8px #4bd12a; }

/* ---------- Kleine Knöpfe, blaue Knöpfe */
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .78rem; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--gold-edge); }
.btn.blue { border-color: #0c2766; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); background: linear-gradient(180deg, #9cc7ff 0%, #3d86ff 44%, #1d5fd6 56%, #123d8f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 5px 0 #0c2766, 0 9px 14px rgba(0, 0, 0, .5); }
.btn.green.sm, .btn.stone.sm { box-shadow: none; }
.pad.wide { max-width: 1100px; }
.invite-note { padding: 10px 12px; border-radius: 12px; background: rgba(75, 181, 47, .18); border: 1px solid rgba(110, 220, 80, .45); font-weight: 600; font-size: .9rem; }

/* ---------- Shop */
.shop-tabs { margin-bottom: 4px; }
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.scard { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.scard-art { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; font-size: 3.6rem; border-radius: calc(var(--r) - 4px) calc(var(--r) - 4px) 0 0;
  background: radial-gradient(circle at 50% 40%, rgba(255, 220, 140, .35), transparent 60%), linear-gradient(180deg, #3a2a5a, #1a1230); }
.scard-art .ic-img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.scard-art .ic-emoji { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.scard-qty { position: absolute; top: 8px; right: 10px; font-family: var(--font-display); font-weight: 700; color: var(--gold-hi); text-shadow: 0 2px 0 #000; }
.scard-tx { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 4px; }
.scard-tx b { font-family: var(--font-display); color: var(--gold-hi); }
.scard-tx small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.scard-tag { align-self: flex-start; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: rgba(242, 198, 80, .16); color: var(--gold); }
.scard .btn { margin: 10px 12px 14px; min-height: 42px; }
.scard.owned .scard-art { filter: saturate(.6); }

/* ---------- Profil */
.profile-head { align-items: center; text-align: center; }
.profile-ava { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.profile-ava:disabled { cursor: default; }
.profile-ava-edit { position: absolute; left: -2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid)); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.profile-name { font-family: var(--font-display); color: var(--gold-hi); font-size: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 6px 0; }
.stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; border-radius: 12px; background: rgba(0, 0, 0, .3); }
.stats b { font-family: var(--font-display); color: var(--gold-hi); font-size: 1rem; }
.stats small { color: var(--muted); font-size: .75rem; }
.profile-head > .btn { width: 100%; }
.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.ava-pick { aspect-ratio: 1; border-radius: 14px; border: 2px solid rgba(242, 198, 80, .25); background: rgba(0, 0, 0, .3); font-size: 1.8rem; cursor: pointer; }
.ava-pick:hover, .ava-pick.on { border-color: var(--gold); background: rgba(242, 198, 80, .15); }
.invite-code { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: #120a05; border: 2px dashed rgba(242, 198, 80, .5); }
.invite-code b { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .12em; color: var(--gold-hi); }
.list { display: flex; flex-direction: column; gap: 6px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .28); color: var(--text); text-align: left; }
button.list-row { cursor: pointer; } button.list-row:hover { background: rgba(242, 198, 80, .12); }
.list-row b { color: var(--gold-hi); }
.select { user-select: all; word-break: break-all; }

/* ---------- Freunde */
.add-row { display: flex; gap: 10px; } .add-row .input { flex: 1; } .add-row .btn { flex-shrink: 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.person:last-child { border-bottom: 0; }
.person-main { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 4px; border: 0; border-radius: 12px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.person-main:hover { background: rgba(255, 255, 255, .05); }
.person-tx { display: flex; flex-direction: column; min-width: 0; }
.person-tx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-tx .ok { color: #7ee05a; }
.person-acts { display: flex; gap: 6px; }

/* ---------- Chat */
.screen-chat .topbar { flex-shrink: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 14px 16px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 820px; margin: 0 auto; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.msg.mine { align-self: flex-end; }
.msg-ava { padding: 0; border: 0; background: none; cursor: pointer; flex-shrink: 0; }
.msg-b { padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: linear-gradient(180deg, #33231a, #22160d); border: 1px solid rgba(242, 198, 80, .25); min-width: 0; }
.msg.mine .msg-b { border-radius: 16px 16px 4px 16px; background: linear-gradient(180deg, #2a5a1c, #1a3d10); border-color: rgba(120, 220, 90, .35); }
.msg.admin .msg-b { background: linear-gradient(180deg, #6a1f18, #3d0f0b); border-color: rgba(255, 140, 110, .5); }
.msg-who { display: block; font-size: .8rem; color: var(--gold); margin-bottom: 2px; }
.msg.admin .msg-who { color: #ffb199; }
.msg-text { white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }
.msg-time { display: block; text-align: right; font-size: .68rem; color: var(--muted); margin-top: 2px; }
.chat-bar { flex-shrink: 0; padding: 10px 14px calc(12px + var(--safe-b)); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55) 30%); }
.chat-row { display: flex; gap: 10px; align-items: flex-end; max-width: 820px; margin: 0 auto; }
.chat-input { flex: 1; min-height: 50px; max-height: 120px; padding: 13px 14px; resize: none; line-height: 1.35; }
.chat-send { width: 54px; min-height: 50px; padding: 0; font-size: 1.3rem; }
.chat-note { max-width: 820px; margin: 0 auto 8px; color: #ffb3aa; font-weight: 600; font-size: .88rem; }
.chat-empty { margin-top: 30px; }

/* ---------- Rangliste */
.rank-tabs { justify-content: center; }
.rank-scope { max-width: 360px; margin: 0 auto; width: 100%; }
.rank-list, .rank-mine { display: flex; flex-direction: column; gap: 8px; }
.rank-mine { margin-top: 16px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-align: left; cursor: pointer; --r: 14px; }
.rank-row.frame::before { display: none; }
.rank-row.top { --fill: linear-gradient(90deg, rgba(242, 198, 80, .28), var(--wood-lo) 60%); }
.rank-row.me { --fill: linear-gradient(90deg, rgba(75, 181, 47, .35), var(--wood-lo) 60%); }
.rank-pos { width: 42px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--gold-hi); }
.rank-row.top .rank-pos { font-size: 1.6rem; }
.rank-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rank-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name small { color: var(--muted); font-size: .75rem; }
.rank-score { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--gold-hi); }

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