*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

:root {
  --bg-deep: #0b0818;
  --glass: rgba(18, 14, 38, 0.72);
  --glass-strong: rgba(15, 11, 34, 0.88);
  --glass-border: rgba(255, 255, 255, 0.16);
  --text: #faf8ff;
  --muted: #b6aed8;
  --accent: #ffbe3b;
  --gold: #ffbe3b;
  --gold-dark: #b86c00;
  --emerald: #00e0a8;
  --emerald-dark: #00926e;
  --coral: #ff5478;
  --coral-dark: #b91c42;
  --violet: #8b5cf6;
  --violet-dark: #5b21b6;
  --cyan: #38d9ff;
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 12px);
  --safe-bot: env(safe-area-inset-bottom, 14px);
}

body[data-theme="crown"] { --accent: #ffbe3b; }
body[data-theme="vault"] { --accent: #38f9ff; }
body[data-theme="jungle"] { --accent: #ff9f1c; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #261a54 0%, #090714 72%);
  color: var(--text);
  font-family: var(--font-body);
  touch-action: manipulation;
}

#phone-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-deep);
}

.desktop-note { display: none; }
@media (min-width: 540px) and (pointer: fine) {
  body { display: flex; align-items: center; justify-content: center; }
  #phone-shell {
    width: 420px;
    height: min(880px, 94dvh);
    border-radius: 40px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 36px 95px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 190, 59, 0.16);
  }
  .desktop-note {
    display: block;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--muted);
    background: rgba(15, 12, 30, 0.88);
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    pointer-events: none;
    white-space: nowrap;
  }
}

#scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  z-index: 1;
}

.vignette-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, transparent 56%, rgba(7, 4, 18, 0.48) 100%);
}

#floating-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 42;
  overflow: hidden;
}

.dice-callout {
  position: absolute;
  top: calc(var(--safe-top) + 106px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 38;
  padding: 9px 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(22, 16, 48, 0.94), rgba(45, 24, 72, 0.94));
  border: 2px solid var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 190, 59, 0.35);
  pointer-events: none;
  animation: calloutPop 0.3s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.screen.active { opacity: 1; transform: translateY(0); }
.screen.active > * { pointer-events: auto; }
.screen:not(.active) { visibility: hidden; }
.hidden { display: none !important; }

.auth-top, .top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 8px) 14px 10px;
  gap: 8px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.8px;
  font-size: 14px;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.icon-btn.sm { width: 36px; height: 36px; border-radius: 12px; font-size: 15px; }
.icon-btn:active { transform: scale(0.9); }

.auth-spacer {
  flex: 1;
  pointer-events: none !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
}
.avatar-hint {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(15, 12, 32, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 13px;
  border-radius: 99px;
  backdrop-filter: blur(10px);
}

.glass-sheet {
  background: linear-gradient(180deg, rgba(24, 18, 52, 0.9) 0%, rgba(13, 10, 29, 0.96) 100%);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border-top: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px 30px 0 0;
  padding: 10px 18px calc(var(--safe-bot) + 14px);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.6);
}
.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 auto 12px;
}
.hero-title { font-family: var(--font-display); font-size: 25px; margin: 0; line-height: 1.1; }
.hero-sub { margin: 4px 0 12px; font-size: 12.5px; color: var(--muted); }

.input-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; margin-bottom: 12px; }
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
input:focus { border-color: var(--gold); background: rgba(255, 255, 255, 0.13); }

.studio-section { margin-bottom: 10px; }
.studio-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 6px;
}

.swatch-row { display: flex; gap: 9px; overflow-x: auto; padding: 3px 2px; scrollbar-width: none; }
.swatch-row::-webkit-scrollbar { display: none; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.swatch.active {
  border-color: #fff;
  transform: scale(1.14);
  box-shadow: 0 0 0 3px rgba(255, 190, 59, 0.55);
}

.pill-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.opt-pill {
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.opt-pill.active {
  background: linear-gradient(135deg, #ffe066, #ff9d1c);
  color: #1b1000;
  border-color: #fff1b8;
}

.err-msg {
  background: rgba(255, 84, 120, 0.22);
  border: 1px solid var(--coral);
  color: #ffc5d2;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* TACTILE AAA 3D PUSH BUTTONS WITH TOP GLOSS SHEEN */
.btn-3d {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn-3d::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  border-radius: 14px;
  pointer-events: none;
}
.btn-3d.sm { padding: 10px 12px; font-size: 13px; border-radius: 14px; flex: 1; }
.btn-3d.full-w { width: 100%; }
.btn-3d:active:not(:disabled) { transform: translateY(3px); }
.btn-3d:disabled { opacity: 0.52; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, #ffda66 0%, #ff981a 100%);
  color: #211000;
  box-shadow: 0 5px 0 #b85f00, 0 12px 28px rgba(255, 168, 28, 0.38);
}
.btn-primary:active:not(:disabled) { box-shadow: 0 2px 0 #b85f00; }

.btn-gold { background: linear-gradient(180deg, #ffe270 0%, #ffb703 100%); color: #211000; box-shadow: 0 4px 0 #b37400; }
.btn-emerald { background: linear-gradient(180deg, #34f5c5 0%, #00c492 100%); color: #03261d; box-shadow: 0 4px 0 var(--emerald-dark); }
.btn-coral { background: linear-gradient(180deg, #ff7d97 0%, #ff3e64 100%); color: #fff; box-shadow: 0 4px 0 var(--coral-dark); }
.btn-violet { background: linear-gradient(180deg, #b094ff 0%, #7c3aed 100%); color: #fff; box-shadow: 0 4px 0 var(--violet-dark); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.btn-mini {
  padding: 7px 12px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* CLUBHOUSE */
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 99px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  color: var(--text);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}
.avatar-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; display: inline-block; }
.edit-tag { font-size: 11px; color: var(--muted); }

.top-right-btns { display: flex; align-items: center; gap: 6px; }
.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.conn-pill.online .conn-dot { background: var(--emerald); box-shadow: 0 0 12px var(--emerald); }
.conn-pill.offline .conn-dot { background: #ffb830; }

.club-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px calc(var(--safe-bot) + 22px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.club-scroll::-webkit-scrollbar { display: none; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 8px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.count-badge { background: rgba(255, 255, 255, 0.16); font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.link-btn {
  background: rgba(18, 14, 38, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.tiny-tag { font-size: 11px; color: #dcd5f7; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }

.online-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.online-strip::-webkit-scrollbar { display: none; }
.online-card {
  flex-shrink: 0;
  min-width: 128px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.oc-top { display: flex; align-items: center; gap: 7px; }
.oc-name { font-weight: 800; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.oc-status { font-size: 10.5px; color: var(--emerald); font-weight: 700; }

.empty-chip, .empty-card {
  background: rgba(16, 12, 36, 0.74);
  backdrop-filter: blur(14px);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 12px;
  color: #d1c9f0;
  line-height: 1.45;
  width: 100%;
}

.rooms-list { display: flex; flex-direction: column; gap: 8px; }
.room-row {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.room-meta-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.room-meta-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 3 ILLUSTRATED GLASS GAME CARDS */
.games-deck { display: flex; flex-direction: column; gap: 13px; }
.game-card {
  position: relative;
  border-radius: 26px;
  padding: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}
.card-glow {
  position: absolute;
  top: -40px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.42;
  pointer-events: none;
}
.card-crown { background: linear-gradient(145deg, rgba(16, 134, 114, 0.82), rgba(20, 34, 74, 0.92)); }
.card-crown .card-glow { background: #34f5c5; }
.card-vault { background: linear-gradient(145deg, rgba(168, 42, 92, 0.82), rgba(34, 16, 62, 0.92)); }
.card-vault .card-glow { background: #ff6b9d; }
.card-jungle { background: linear-gradient(145deg, rgba(132, 68, 18, 0.85), rgba(22, 52, 42, 0.92)); }
.card-jungle .card-glow { background: #ffbe3b; }

.game-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.75px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.36);
  color: #ffe89e;
  margin-bottom: 6px;
}
.game-title-row { display: flex; align-items: center; justify-content: space-between; }
.game-title { font-family: var(--font-display); font-size: 23px; font-weight: 700; margin-bottom: 4px; }
.game-emblem { font-size: 28px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); }
.game-desc { margin: 0 0 13px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.game-card-btns { display: flex; gap: 9px; }

/* LOBBY */
.room-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}
.tiny-lbl { font-size: 10px; color: var(--muted); font-weight: 800; }
.lobby-spacer { flex: 1; pointer-events: none !important; }
.lobby-sheet { max-height: 70dvh; display: flex; flex-direction: column; }
.lobby-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tiny-accent { font-size: 10.5px; font-weight: 800; color: var(--accent); letter-spacing: 0.8px; }
.lobby-h2 { font-family: var(--font-display); font-size: 21px; margin: 2px 0 0; }

.toggle-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.seg-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 14px;
  gap: 4px;
}
.seg-btn {
  padding: 8px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.seg-btn.active { background: #fff; color: #16102b; }

.roast-pill {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 190, 59, 0.4);
  background: rgba(255, 190, 59, 0.14);
  color: #ffe299;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.roast-pill:not(.on) { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: var(--muted); }

.lobby-players-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.lobby-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  max-height: 205px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.lp-slot {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.lp-left { display: flex; align-items: center; gap: 7px; min-width: 0; }
.lp-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-sub { font-size: 10px; color: var(--muted); }
.team-chip { font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 8px; border: none; cursor: pointer; color: #fff; }

/* ACTIVE GAME HUD */
.game-top-hud { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 6px) 10px 6px; }
.scoreboard-strip { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.scoreboard-strip::-webkit-scrollbar { display: none; }
.score-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.score-pill.turn {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(255, 190, 59, 0.45);
  transform: scale(1.05);
}
.score-val { color: var(--gold); font-family: var(--font-display); font-size: 13px; }
.game-top-right { display: flex; gap: 5px; }

.roast-banner {
  margin: 2px 12px 0;
  padding: 9px 14px;
  border-radius: 16px;
  background: rgba(18, 14, 38, 0.86);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 190, 59, 0.48);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.32;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
  animation: popIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.roast-banner.spicy { border-color: var(--coral); background: rgba(78, 14, 36, 0.9); }
.roast-banner.gold { border-color: var(--gold); background: rgba(72, 46, 8, 0.9); }
.roast-banner.good { border-color: var(--emerald); background: rgba(8, 58, 44, 0.9); }

.game-bottom-hud {
  margin-top: auto;
  padding: 0 12px calc(var(--safe-bot) + 12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.context-bar {
  background: var(--glass-strong);
  backdrop-filter: blur(22px);
  border: 1.5px solid rgba(255, 190, 59, 0.42);
  border-radius: 22px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: popIn 0.22s ease;
}
.ctx-title { font-size: 12.5px; font-weight: 800; text-align: center; color: #ffe69e; }
.ctx-btns { display: flex; gap: 8px; }

.react-drawer {
  background: var(--glass-strong);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 10px;
  animation: popIn 0.18s ease;
}
.react-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.rtab {
  padding: 6px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.rtab.active { background: var(--gold); color: #1b1000; }
.react-items { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.react-chip {
  padding: 7px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.react-chip.emoji { font-size: 20px; padding: 6px 11px; }
.react-chip:active { transform: scale(0.9); }

.thumb-bar { display: flex; align-items: center; gap: 10px; }
.thumb-side-btn {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.btn-roll {
  flex: 1;
  flex-direction: column;
  gap: 1px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #ffe26a 0%, #ff9914 100%);
  color: #1f1000;
  box-shadow: 0 6px 0 #b85d00, 0 12px 32px rgba(255, 166, 26, 0.45);
}
.btn-roll:not(.waiting) { animation: pulseReady 2.2s ease-in-out infinite; }
.btn-roll:active:not(:disabled) { box-shadow: 0 2px 0 #b85d00; }
.btn-roll.waiting {
  background: linear-gradient(180deg, #3c3461 0%, #262044 100%);
  color: #c8bfe8;
  box-shadow: 0 4px 0 #141028;
}
.roll-sub { font-family: var(--font-body); font-size: 11px; font-weight: 700; opacity: 0.85; }

.float-bubble {
  position: absolute;
  left: 50%;
  bottom: 132px;
  transform: translateX(-50%);
  background: rgba(16, 12, 36, 0.92);
  border: 1.5px solid var(--gold);
  border-radius: 99px;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  animation: floatUp 2.4s ease-out forwards;
}
.float-bubble.emoji { font-size: 34px; background: transparent; border: none; box-shadow: none; }

.invite-toast {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: 12px;
  right: 12px;
  z-index: 60;
  background: rgba(24, 18, 52, 0.96);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  animation: popIn 0.25s ease;
}
.invite-left { display: flex; align-items: center; gap: 10px; }
.invite-pulse { font-size: 24px; }
.invite-title { font-family: var(--font-display); font-size: 15px; }
.invite-sub { font-size: 11.5px; color: var(--muted); }
.invite-actions { display: flex; gap: 6px; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(6, 4, 16, 0.74);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 18px;
}
.glass-card {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, rgba(28, 22, 58, 0.96), rgba(16, 12, 36, 0.98));
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.7);
}
.glass-card h3 { font-family: var(--font-display); font-size: 20px; margin: 0 0 8px; }
.modal-p { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0 0 12px; }
.modal-btns { display: flex; gap: 8px; margin-top: 12px; }
.modal-btns .btn-3d { flex: 1; padding: 12px; font-size: 14px; }
.tiny-status { font-size: 12px; margin-top: 8px; color: var(--emerald); font-weight: 700; min-height: 16px; }

.victory-card, .snooze-card { text-align: center; }
.victory-trophy, .snooze-ico { font-size: 56px; margin-bottom: 4px; }
.victory-title { font-family: var(--font-display); font-size: 24px; margin: 0 0 4px; color: var(--gold); }
.victory-sub { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.victory-standings, .ranks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 220px;
  overflow-y: auto;
}
.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.victory-btns { display: flex; flex-direction: column; gap: 8px; }
.rules-body { font-size: 13px; color: #e2dcf8; line-height: 1.55; margin-bottom: 14px; }
.rules-body ul { padding-left: 18px; margin: 8px 0; }
.rules-body li { margin-bottom: 6px; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes calloutPop {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.75); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes pulseReady {
  0%, 100% { box-shadow: 0 6px 0 #b85d00, 0 12px 30px rgba(255, 166, 26, 0.42); }
  50% { box-shadow: 0 6px 0 #b85d00, 0 12px 38px rgba(255, 206, 64, 0.72); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -18px) scale(1.06); }
  80% { opacity: 1; transform: translate(-50%, -120px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -170px) scale(0.92); }
}
