/* Elementalist – mobile-first, modern. */
:root {
  --bg: #0e1020;
  --bg-2: #161a33;
  --panel: rgba(28, 32, 60, 0.72);
  --panel-solid: #1c2240;
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef1fb;
  --muted: #97a0c4;
  --primary: #7b5cff;
  --primary-2: #9d7bff;
  --team0: #38d6c6;
  --team1: #ff7a7a;
  --gold: #ffd23f;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Das [hidden]-Attribut muss zuverlässig verstecken – sonst überschreiben eigene
   display-Regeln (z. B. .auth-gate{display:grid}) die UA-Regel [hidden]{display:none}. */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: radial-gradient(120% 100% at 50% -10%, #1b2147 0%, var(--bg) 55%);
  color: var(--text);
  overscroll-behavior: none;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: 'Baloo 2', sans-serif; font-weight: 800; margin: 0 0 .4em; }
.muted { color: var(--muted); font-size: .9rem; }

#bg-aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 30% at 15% 10%, rgba(123, 92, 255, .25), transparent 70%),
    radial-gradient(40% 30% at 85% 20%, rgba(56, 214, 198, .18), transparent 70%),
    radial-gradient(50% 40% at 50% 100%, rgba(255, 122, 122, .12), transparent 70%);
  filter: blur(8px);
}

/* ---- Buttons ---- */
.btn {
  appearance: none; border: 1px solid var(--border); background: rgba(255,255,255,.06);
  color: var(--text); font: inherit; font-weight: 700; padding: .7em 1.1em; border-radius: 12px;
  cursor: pointer; transition: transform .08s ease, background .15s ease; touch-action: manipulation;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; box-shadow: 0 6px 20px rgba(123,92,255,.35); }
.btn-ghost { background: transparent; }
.btn-lg { padding: .9em 1.4em; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: .5em .8em; font-size: .85rem; border-radius: 10px; }
.btn-danger { color: var(--team1); border-color: rgba(255,122,122,.4); }
.btn-danger.btn-primary, .overlay-actions .btn-danger { background: linear-gradient(135deg, #ff6b6b, #ff8f8f); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(255,122,122,.35); }
.overlay-actions { display: flex; gap: 10px; margin-top: 18px; }
.overlay-actions .btn { flex: 1; }

/* ---- Auth gate ---- */
.auth-gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(8,9,20,.85); backdrop-filter: blur(8px); }
.auth-gate-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 32px 26px; max-width: 360px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.auth-logo-img { display: block; width: min(340px, 82%); height: auto; margin: 4px auto 14px; filter: drop-shadow(0 8px 28px rgba(120,120,255,.28)); }
.auth-text { color: var(--muted); margin-bottom: 20px; }
.auth-error { color: var(--team1); margin-top: 12px; }

/* ---- Topbar ---- */
/* Spiel-HUD (Wallet, Kampflog, Aufgeben, Settings) sitzt als kontextuelle
   Sekundaerzeile UNTER der globalen Navigationsleiste (ninenine-nav).
   Identitaet (Username/Logout) liefert jetzt die globale Leiste. */
.topbar {
  position: sticky; top: var(--ng-nav-h, 56px); z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: calc(8px + var(--safe-top)) 16px 8px; background: rgba(14,16,32,.7); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
#auth-username, #auth-logout { display: none !important; }
.topbar-logo { display: block; height: 30px; width: auto; filter: drop-shadow(0 2px 8px rgba(120,120,255,.25)); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; font-size: 1.15rem; border-radius: 11px; line-height: 1; }
.icon-btn.muted { opacity: .55; }

/* ---- Einstellungen ---- */
.settings-panel { max-width: 360px; text-align: left; }
.settings-list { list-style: none; margin: 16px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.settings-label { font-weight: 700; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider { position: absolute; inset: 0; background: rgba(255,255,255,.16); border-radius: 999px; transition: background .15s ease; }
.switch .slider::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.switch input:checked + .slider { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.wallet-badge { background: rgba(255,210,63,.14); color: var(--gold); border: 1px solid rgba(255,210,63,.3); padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .9rem; }
/* Nash-Münze – aus account.nine-nine.net (.nashcoin): gespiegeltes ₦ via ::before.
   Gleiche Höhe wie die Ziffern dahinter (1em, auf der Grundlinie). */
.nashcoin { display: inline-block; line-height: 1; transform: scale(-1, 1); color: var(--gold); }
.nashcoin::before { content: "₦"; font-style: normal; }
.auth-username { font-weight: 700; font-size: .9rem; }
.auth-logout { color: var(--muted); text-decoration: none; font-size: 1.2rem; }

/* ---- Screens ---- */
#app { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 16px 16px calc(24px + var(--safe-bottom)); }
.screen { display: none; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.back-btn { background: none; border: none; color: var(--muted); font: inherit; font-weight: 700; padding: 6px 0; margin-bottom: 6px; cursor: pointer; }
.offline-notice { background: rgba(255,122,122,.15); border: 1px solid rgba(255,122,122,.4); color: #ffd2d2; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; text-align: center; }

/* ---- Home ---- */
.home-hero { text-align: center; margin: 14px 0 18px; }
.diff-row { display: inline-flex; gap: 6px; align-items: stretch; margin-top: 8px; }
.diff-pill { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted); border-radius: 14px; padding: 5px 14px; font: inherit; font-size: .82rem; line-height: 1.15; cursor: pointer; }
.diff-pill.active { background: var(--primary); color: #fff; border-color: transparent; }
.diff-name { font-weight: 700; }
.diff-reward { font-size: .68rem; opacity: .85; }
.diff-pill .diff-reward .nashcoin { font-size: .8em; }
.diff-row > .muted { align-self: center; }
.diff-hint { font-size: .72rem; margin-top: 6px; }

.vis-row { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.vis-row > .muted { align-self: center; }
.vis-pill { background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--muted); border-radius: 14px; padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600; line-height: 1.15; cursor: pointer; }
.vis-pill.active { background: var(--primary); color: #fff; border-color: transparent; }
.room-vis { font-size: .95em; }
.room-host { font-size: .8rem; margin-left: 4px; }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card {
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: transform .1s ease, border-color .15s ease; color: var(--text);
}
.mode-card:active { transform: scale(.97); }
.mode-card:hover { border-color: var(--primary); }
.mode-ico { font-size: 28px; }
.mode-name { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; font-size: 1.1rem; }
.mode-sub { color: var(--muted); font-size: .78rem; }

.home-actions { margin: 18px 0; display: grid; gap: 12px; }
.join-row { display: flex; gap: 8px; }
.join-row input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 12px; color: var(--text); padding: .7em 1em; font: inherit; text-transform: uppercase; letter-spacing: .15em; }
.nav-row { display: flex; gap: 8px; justify-content: space-between; }
.nav-row .btn { flex: 1; }

.rooms-block h3 { margin-top: 18px; }
.rooms-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.room-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.room-row .btn { margin-left: auto; }
.pill { background: rgba(123,92,255,.2); border: 1px solid rgba(123,92,255,.4); color: #cfc2ff; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }

/* ---- Room ---- */
.room-code-line { color: var(--muted); }
.room-code { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; letter-spacing: .2em; color: var(--text); font-size: 1.1rem; }
.seats-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.seat { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: 12px; padding: 12px 14px; }
.seat.team0 { border-left-color: var(--team0); }
.seat.team1 { border-left-color: var(--team1); }
.seat.filled { background: rgba(255,255,255,.08); }
.seat-team { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.seat-name { font-weight: 700; }
.seat-status { font-size: .82rem; color: var(--muted); }
.room-controls { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

/* ---- Match ---- */
.match-screen { display: none; }
.match-screen.active { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 70px); }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-pill { display: flex; align-items: center; gap: 8px; font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; font-size: 1.4rem; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px; min-width: 64px; justify-content: center; }
.score-dot { width: 12px; height: 12px; border-radius: 50%; }
.score-pill.team0 .score-dot { background: var(--team0); }
.score-pill.team1 .score-dot { background: var(--team1); }
.turn-indicator { flex: 1; text-align: center; font-weight: 800; padding: 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); font-size: .95rem; }
.turn-indicator.team0 { color: var(--team0); }
.turn-indicator.team1 { color: var(--team1); }

.hand { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 70px; }
.opp-hand { opacity: .9; }
.board-wrap { display: grid; place-items: center; flex: 1; }
.board { display: grid; grid-template-columns: repeat(var(--size), 1fr); gap: 6px; width: min(94vw, 460px); }
.cell { aspect-ratio: 1/1; background: rgba(255,255,255,.04); border: 1.5px dashed rgba(255,255,255,.12); border-radius: 12px; display: grid; place-items: center; }
.cell.blocked { background: repeating-linear-gradient(45deg, rgba(255,255,255,.05), rgba(255,255,255,.05) 6px, transparent 6px, transparent 12px); border-style: solid; }
.cell.placeable { border-color: var(--primary); border-style: solid; box-shadow: inset 0 0 14px rgba(123,92,255,.35); cursor: pointer; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 0 22px rgba(123,92,255,.6); } }

/* ---- Drag & Drop ---- */
.board.dragging .cell:not(.blocked):empty { border-color: rgba(123,92,255,.55); border-style: solid; }
.cell.drop-hover { border-color: var(--primary); background: rgba(123,92,255,.22); box-shadow: inset 0 0 18px rgba(123,92,255,.55); transform: scale(1.03); transition: transform .08s ease; }
.card.drag-source { opacity: .3; }
.card.card-ghost { position: fixed; left: 0; top: 0; z-index: 60; margin: 0; pointer-events: none; transform: translate(-50%, -50%) scale(1.08) rotate(-3deg); filter: drop-shadow(0 12px 22px rgba(0,0,0,.5)); }
body.dragging-card { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* ---- Card ---- */
.card { position: relative; width: 100%; }
.card-sm { width: 64px; }
/* Karte ist quadratisch; Pentagons ragen über den Rand (overflow sichtbar). */
.card-frame {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px;
  container-type: inline-size;
  --rarity-color: #8b8f99;
}
/* Rahmen: zeigt am Rand die Seltenheit (bzw. den Besitzer im Match) */
.card-frame::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px; pointer-events: none; z-index: 3;
  border: 3px solid var(--rarity-color);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 0 8px color-mix(in srgb, var(--rarity-color) 60%, transparent), 0 4px 10px rgba(0,0,0,.4);
}
.team0 > .card-frame::before { border-color: var(--team0); box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 0 10px var(--team0), 0 4px 10px rgba(0,0,0,.4); }
.team1 > .card-frame::before { border-color: var(--team1); box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 0 10px var(--team1), 0 4px 10px rgba(0,0,0,.4); }

.card-art { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, #2a2f55, #1a1d38); z-index: 1; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-art.art-fallback::after { content: attr(data-icon); font-size: 2.2em; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.card-sm .card-art.art-fallback::after { font-size: 1.6em; }

/* Werte-Pentagons: Element bestimmt Farbe/Bild, Spitze zeigt nach außen. Kein Kartentext. */
.vbadge { position: absolute; width: 28cqw; height: 28cqw; display: grid; place-items: center; z-index: 4; }
.vbadge .pent { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.vbadge .num { position: relative; z-index: 1; font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; font-size: 13cqw; line-height: 1; color: #2b2410; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.vt { top: -1%; left: 50%; transform: translateX(-50%); }
.vb { bottom: -3%; left: 50%; transform: translateX(-50%); }
.vl { left: -3%; top: 50%; transform: translateY(-50%); }
.vr { right: -3%; top: 50%; transform: translateY(-50%); }
.vt .pent { transform: rotate(180deg); }
.vr .pent { transform: rotate(270deg); }
.vl .pent { transform: rotate(90deg); }
/* Zahl in den breiten Teil des Pentagons (zum Kartenrand) rücken */
.vt .num { transform: translateY(-12%); }
.vb .num { transform: translateY(12%); }
.vl .num { transform: translateX(-12%); }
.vr .num { transform: translateX(12%); }

.card-back { position: absolute; inset: 0; border-radius: 14px; background: #1a1d38 url('/assets/card-back.webp?v=9') center/cover no-repeat; z-index: 1; }
.facedown::before { border-color: #44496f; box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.4); }

.card.actionable { cursor: pointer; }
.my-hand .card.actionable { touch-action: none; cursor: grab; }
/* Natives Bild-/Text-Ziehen auf dem PC unterbinden, sonst kapert es die Drag-Geste. */
.card, .card * { -webkit-user-drag: none; -khtml-user-drag: none; user-select: none; -webkit-user-select: none; }
.card img { pointer-events: none; }
.card.selected .card-frame { outline: 3px solid var(--gold); outline-offset: 1px; transform: translateY(-6px); transition: transform .12s; }
.card.just-moved .card-frame { animation: flip .4s ease; }
@keyframes flip { from { transform: rotateY(80deg) scale(.9); } to { transform: none; } }
.count-badge { position: absolute; bottom: 2px; right: 2px; background: var(--primary); color: #fff; font-size: .6rem; font-weight: 800; border-radius: 6px; padding: 1px 4px; z-index: 5; }
/* Deck-Builder: ausgewählte Kopien + Entfernen-Button (Ecken sind frei von Pentagons) */
.sel-badge { position: absolute; top: 2px; left: 2px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; background: var(--gold); color: #1c1500; font-size: .72rem; font-weight: 800; border-radius: 9px; z-index: 6; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.sel-minus { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; padding: 0; display: grid; place-items: center; border: none; border-radius: 50%; background: linear-gradient(135deg, #ff6b6b, #ff8f8f); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; cursor: pointer; z-index: 7; box-shadow: 0 1px 4px rgba(0,0,0,.55); }
.sel-minus:hover { filter: brightness(1.08); }

.match-log-bar { display: flex; align-items: center; gap: 8px; }
.match-log { flex: 1; text-align: center; min-height: 20px; color: var(--gold); font-weight: 700; font-size: .9rem; }
.match-log-bar .btn-sm { flex: none; white-space: nowrap; }

/* ---- Kampflog ---- */
.log-panel { max-width: 460px; text-align: left; }
.log-list { list-style: none; margin: 12px 0 16px; padding: 0; max-height: min(55vh, 460px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.log-item { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.04); border-left: 3px solid var(--border); font-size: .85rem; }
.log-item.team0 { border-left-color: var(--team0); }
.log-item.team1 { border-left-color: var(--team1); }
.log-n { color: var(--muted); font-size: .75rem; min-width: 18px; text-align: right; }
.log-el { font-size: 1.1rem; }
.log-txt { line-height: 1.3; }
.log-cap { color: var(--gold); font-weight: 800; }

/* ---- Element-Erklärung ---- */
.info-panel { max-width: 380px; text-align: left; }
.info-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.info-pent { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.info-head-text h2 { margin: 0; }
.info-desc { color: var(--text); font-size: .95rem; line-height: 1.45; margin: 0 0 14px; }
.info-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.info-val { background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; text-align: center; display: grid; gap: 2px; }
.info-val .muted { font-size: .7rem; }
.info-val b { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 1.1rem; }

/* ---- Overlay ---- */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(8,9,20,.8); backdrop-filter: blur(6px); }
.overlay-panel { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 22px; padding: 28px; text-align: center; max-width: 420px; width: 100%; }
.result-score { color: var(--muted); font-size: 1.1rem; margin: 8px 0; }
.result-reward { color: var(--gold); font-weight: 800; font-size: 1.05rem; margin-bottom: 14px; }

/* ---- Card grids / shop / deck ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 12px; }
.card-grid .card { width: 100%; }
.deck-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 calc(8px + var(--safe-bottom)); background: linear-gradient(transparent, var(--bg) 30%); margin-top: 12px; }

/* Deck-Builder: zentrierte, luftige Kartenanordnung in einem Panel */
#screen-deck .deck-builder { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 14px; margin-top: 14px; }
#deck-pool { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 16px 14px; margin-top: 0; }
#deck-pool .card { width: 84px; }
#screen-deck .deck-bar { justify-content: center; gap: 18px; }
#screen-deck .deck-bar #deck-count { font-size: .95rem; }
.packs-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pack-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.pack-ico { font-size: 40px; display: flex; align-items: center; justify-content: center; height: 84px; }
.pack-ico img { height: 84px; width: auto; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.pack-name { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; }
.pack-meta { color: var(--muted); font-size: .8rem; }
.pack-price { color: var(--gold); font-weight: 800; }
/* Seltenheits-Chancen je Pack */
.pack-odds { width: 100%; display: grid; gap: 3px; margin: 4px 0 2px; }
.odds-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; font-size: .76rem; }
.odds-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.odds-label { text-align: left; color: var(--text); }
.odds-pct { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.pack-guarantee { font-size: .72rem; color: var(--muted); background: rgba(123,92,255,.14); border: 1px solid rgba(123,92,255,.3); border-radius: 999px; padding: 2px 8px; }
.pack-legacy { border-color: rgba(255,205,90,.4); background: linear-gradient(180deg, rgba(255,205,90,.06), var(--panel)); }
.pack-card.unavailable { opacity: .75; }
.pack-unavailable { font-size: .8rem; color: var(--muted); font-style: italic; padding: 8px 0; }
.pack-hint { font-size: .68rem; line-height: 1.25; color: var(--muted); max-width: 88%; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.reveal-pop { animation: pop .4s both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Pack-Reveal ---- */
.pack-reveal-panel { max-width: 460px; }
.pack-reveal-title {
  margin-bottom: 4px;
  background: linear-gradient(135deg, #ffd76b, #ff8f8f 45%, #7b5cff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.pack-reveal-sub { color: var(--muted); font-size: .9rem; margin: 0 0 20px; }
#pack-cards {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: 14px; margin: 4px 0 26px; padding: 6px 0;
}
#pack-cards .card { width: 96px; max-width: 28%; }
#pack-reveal #btn-pack-close { min-width: 180px; }
.pack-reveal-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* Verdeckte Karten zum Antippen (Überraschungseffekt) */
.pack-card-reveal { perspective: 600px; }
.pack-card-reveal:not(.revealed) .vbadge { visibility: hidden; }
/* Nur Deckkraft animieren – die Pentagons behalten ihre Zentrierung (translateX/Y). */
.pack-card-reveal.revealed .vbadge { animation: badgeIn .3s both; }
@keyframes badgeIn { from { opacity: 0; } to { opacity: 1; } }
.pack-cover {
  position: absolute; inset: -5%; z-index: 6; border-radius: 18px; cursor: pointer;
  background: #1a1d38 url('/assets/card-back.webp?v=9') center/cover no-repeat;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.45);
  display: grid; place-items: center;
  transform-origin: center; backface-visibility: hidden;
  transition: transform .4s ease, opacity .35s ease;
}
.pack-cover-hint {
  font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; font-size: 26px;
  color: rgba(255,255,255,.85); text-shadow: 0 1px 3px rgba(0,0,0,.6);
  animation: hintPulse 1.8s ease-in-out infinite;
}
@keyframes hintPulse { 50% { opacity: .4; transform: scale(.88); } }
.pack-card-reveal.revealed .pack-cover { transform: rotateY(90deg); opacity: 0; pointer-events: none; }
.pack-card-reveal.rare-reveal .card-frame { animation: rareGlow 1.1s ease both; }
@keyframes rareGlow {
  0%   { box-shadow: 0 0 0 rgba(255,205,90,0); }
  30%  { box-shadow: 0 0 26px 8px rgba(255,205,90,.85); }
  100% { box-shadow: 0 0 12px 2px rgba(255,205,90,.4); }
}

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%); z-index: 60; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 90vw; text-align: center; }

@media (min-width: 560px) {
  .mode-grid { grid-template-columns: repeat(4, 1fr); }
  /* Max. 4 Packs -> sauberes 2x2 (Bambushain oben, Old-Stars darunter). */
  .packs-list { grid-template-columns: repeat(2, 1fr); max-width: 720px; margin-left: auto; margin-right: auto; }
}
