/* ============================================================
   Golden Reels — base, lobby, shared chrome
   ============================================================ */

:root {
  --bg: #06080d;
  --bg-2: #0b101a;
  --panel: #131a27;
  --panel-2: #0d121b;
  --line: rgba(247, 201, 72, 0.24);
  --gold: #f7c948;
  --gold-hi: #ffe08a;
  --gold-deep: #a9791a;
  --cream: #f3e8d2;
  --muted: #8b93a5;
  --muted-2: #5f6777;
  --red: #ff4d5e;
  --green: #3ddc84;
  --blue: #5aa9ff;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(120% 55% at 50% -10%, #241a0c 0%, transparent 60%),
    radial-gradient(100% 50% at 50% 110%, #101d2c 0%, transparent 62%),
    var(--bg);
  overflow-x: hidden;
  overscroll-behavior: none;
  user-select: none;
  touch-action: manipulation;
}

body.game-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 35% at 50% 30%, rgba(247, 201, 72, 0.05), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 90px);
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 500px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

/* ---------------- Lobby ---------------- */

.lobby {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 14px calc(86px + var(--safe-bottom));
}

.lobby-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 -14px 12px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0.98) 62%, rgba(6, 8, 13, 0.8));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(247, 201, 72, 0.55);
  background: linear-gradient(160deg, #2a1a06, #120b03);
  color: var(--gold);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  transform: rotate(-6deg);
  text-shadow: 0 0 14px rgba(247, 201, 72, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 14px rgba(0, 0, 0, 0.55);
}

.brand-text h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff6cf, var(--gold) 55%, #d9a11f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7));
  white-space: nowrap;
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--muted);
  white-space: nowrap;
}

.lobby-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--cream);
  font-size: 17px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.09);
  transform: scale(0.94);
}

.balance-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(247, 201, 72, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.balance-chip span {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.balance-chip b {
  font-size: 18px;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.balance-chip.small b {
  font-size: 16px;
}

.balance-chip.pulse {
  animation: balance-pulse 0.65s ease;
}

@keyframes balance-pulse {
  50% {
    border-color: var(--gold);
    box-shadow: 0 0 26px rgba(247, 201, 72, 0.5);
  }
}

.lobby-main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.play-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: rgba(243, 232, 210, 0.55);
}

.play-badge i {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 201, 72, 0.5));
}

.play-badge i:last-child {
  background: linear-gradient(90deg, rgba(247, 201, 72, 0.5), transparent);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  min-height: 188px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 209, 102, 0.38);
  background:
    radial-gradient(120% 90% at 85% 15%, rgba(124, 92, 255, 0.5), transparent 55%),
    radial-gradient(120% 110% at 10% 100%, rgba(247, 201, 72, 0.22), transparent 55%),
    linear-gradient(150deg, #221646, #0e0b24 62%, #070a16);
  box-shadow:
    0 22px 46px -18px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 26px);
  opacity: 0.5;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-bg span {
  position: absolute;
  filter: drop-shadow(0 0 22px rgba(255, 209, 102, 0.45));
  opacity: 0.95;
}

.hero-bolt {
  top: 18px;
  right: 20px;
  font-size: 86px;
  transform: rotate(8deg);
  animation: floaty 5s ease-in-out infinite;
}

.hero-gem {
  bottom: 12px;
  right: 92px;
  font-size: 36px;
  opacity: 0.75;
  transform: rotate(-12deg);
}

.hero-crown {
  bottom: 34px;
  right: 30px;
  font-size: 32px;
  opacity: 0.7;
  transform: rotate(10deg);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(8deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

.hero-kicker {
  margin: 0 0 5px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--gold-hi);
}

.hero h2 {
  margin: 0;
  max-width: 78%;
  font-family: var(--display);
  font-size: clamp(27px, 8vw, 35px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #fff8da, var(--gold) 58%, #d9a11f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45));
}

.hero-sub {
  margin: 7px 0 14px;
  max-width: 72%;
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(243, 232, 210, 0.72);
}

.hero-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, #d99f1f);
  color: #2a1a00;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  box-shadow: 0 4px 0 #8a5f0d, 0 10px 22px -10px rgba(247, 201, 72, 0.8);
  transition: transform 0.08s, box-shadow 0.08s;
}

.hero-play:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #8a5f0d, 0 6px 16px -10px rgba(247, 201, 72, 0.7);
}

.hero-play:disabled {
  cursor: default;
  filter: saturate(0.35) brightness(0.72);
  box-shadow: none;
  transform: none;
}

.hero-play span {
  font-size: 14px;
  line-height: 1;
}

.hero-stars {
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(247, 201, 72, 0.6);
}

/* ---------------- Promo carousel ---------------- */

.hero-carousel {
  position: relative;
  margin-bottom: 11px;
}

.hero-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-track .hero {
  flex: 0 0 100%;
  margin-bottom: 0;
  scroll-snap-align: center;
}

.hero-welcome {
  border-color: rgba(247, 201, 72, 0.45);
  background:
    radial-gradient(120% 90% at 85% 15%, rgba(247, 201, 72, 0.42), transparent 55%),
    radial-gradient(120% 110% at 10% 100%, rgba(255, 159, 67, 0.2), transparent 55%),
    linear-gradient(150deg, #2a1a06, #160d04 62%, #070a16);
}

.hero-race {
  border-color: rgba(90, 169, 255, 0.4);
  background:
    radial-gradient(120% 90% at 85% 15%, rgba(90, 169, 255, 0.42), transparent 55%),
    radial-gradient(120% 110% at 10% 100%, rgba(139, 92, 246, 0.24), transparent 55%),
    linear-gradient(150deg, #0d1b3a, #080d1e 62%, #05070c);
}

.hero-welcome h2,
.hero-race h2 {
  max-width: 82%;
}

.hero-promo-art {
  top: 8px;
  right: 14px;
  font-size: 78px;
  animation: floaty 6s ease-in-out infinite;
}

.hero-coin {
  bottom: 20px;
  right: 98px;
  font-size: 30px;
  opacity: 0.75;
  transform: rotate(-10deg);
}

.hero-welcome .hero-play {
  background: linear-gradient(180deg, #fff6cf, #f7c948 52%, #d99f1f);
}

.hero-race .hero-play {
  background: linear-gradient(180deg, #d8e9ff, #5aa9ff 52%, #2f6fc4);
  color: #06101f;
  box-shadow: 0 4px 0 #1c4a86, 0 10px 22px -10px rgba(90, 169, 255, 0.8);
}

.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.hero-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.2s, background 0.2s;
}

.hero-dots button.active {
  width: 18px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(247, 201, 72, 0.7);
}

/* ---------------- Quick actions ---------------- */

.lobby-quick {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px;
  margin-bottom: 9px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, #141b28, #0c1119);
  color: var(--cream);
  text-align: left;
  transition: transform 0.1s, border-color 0.15s;
}

button.quick-card:active {
  transform: scale(0.975);
  border-color: var(--line);
}

.quick-card:disabled {
  opacity: 0.55;
  cursor: default;
}

.quick-icon {
  font-family: var(--emoji);
  font-size: 19px;
  line-height: 1;
  flex: 0 0 auto;
}

.quick-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.quick-text b {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.quick-text small {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jackpot-card {
  border-color: rgba(247, 201, 72, 0.28);
  background:
    radial-gradient(120% 120% at 90% 0%, rgba(247, 201, 72, 0.18), transparent 62%),
    linear-gradient(180deg, #171f2c, #0c1119);
}

.jackpot-value {
  color: var(--gold-hi) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.quick-arrow {
  margin-left: auto;
  color: var(--gold);
  font-size: 13px;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  50% {
    opacity: 0.3;
  }
}

/* ---------------- VIP strip ---------------- */

.vip-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 10px;
}

.vip-badge {
  padding: 3px 7px;
  border: 1px solid rgba(247, 201, 72, 0.38);
  border-radius: 999px;
  background: rgba(247, 201, 72, 0.09);
  color: var(--gold);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.vip-track {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.vip-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi));
  box-shadow: 0 0 10px rgba(247, 201, 72, 0.5);
  transition: width 0.45s ease;
}

.vip-xp {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------------- Category tabs ---------------- */

.lobby-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 9px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.lobby-tabs button {
  flex: 1;
  padding: 8px 2px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.lobby-tabs button.active {
  background: linear-gradient(180deg, rgba(247, 201, 72, 0.2), rgba(247, 201, 72, 0.07));
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(247, 201, 72, 0.3);
}

/* ---------------- Lobby section / live feed ---------------- */

.lobby-section {
  display: flex;
  flex-direction: column;
}

.lobby-count {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.empty-note {
  margin: 6px 0 0;
  padding: 18px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.live-feed {
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.025);
}

.live-feed-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.live-feed-head .live-dot {
  margin-left: 0;
}

.live-feed-note {
  margin-left: auto;
  font-size: 6.5px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.live-feed-list {
  display: flex;
  flex-direction: column;
}

.live-win {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 10px;
  color: var(--muted);
}

.live-win:last-child {
  border-bottom: 0;
}

.live-win b {
  overflow: hidden;
  color: var(--cream);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-win .lw-game {
  overflow: hidden;
  color: var(--muted-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-win .lw-amount {
  margin-left: auto;
  color: var(--gold);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-win.you b,
.live-win.you .lw-game {
  color: var(--gold-hi);
}

.live-win.enter {
  animation: live-in 0.4s ease-out;
}

@keyframes live-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------------- Lobby game grid ---------------- */

.lobby-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 9px;
}

.lobby-heading h2 {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.bonus-btn {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247, 201, 72, 0.08);
  color: var(--gold);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  transition: background 0.15s, transform 0.1s;
}

.bonus-btn:active {
  background: rgba(247, 201, 72, 0.16);
  transform: scale(0.96);
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lobby-group-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 2px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lobby-group-head:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.lobby-group-head span {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cream);
}

.lobby-group-head i {
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: linear-gradient(180deg, #141b28, #0c1119);
  color: var(--cream);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
}

.game-card:active {
  transform: scale(0.975);
  border-color: var(--line);
}

.game-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.card-art.candy {
  background:
    radial-gradient(90% 80% at 20% 20%, rgba(255, 95, 162, 0.5), transparent 60%),
    linear-gradient(150deg, #4a1740, #1c1030);
}

.card-art.classic {
  background:
    radial-gradient(90% 80% at 50% 25%, rgba(247, 201, 72, 0.32), transparent 62%),
    linear-gradient(150deg, #3a2610, #120d08);
}

.card-art.anubis {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(232, 182, 76, 0.4), transparent 62%),
    linear-gradient(150deg, #3d2a12, #160f1f 62%, #0a0710);
}

.card-art.catch {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(79, 209, 197, 0.4), transparent 62%),
    linear-gradient(150deg, #073b4c, #061a2a 62%, #040a12);
}

.card-art.plunder {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(46, 196, 182, 0.42), transparent 62%),
    linear-gradient(150deg, #123a38, #2b1608 62%, #0a0705);
}

.card-art.mines {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(52, 211, 153, 0.45), transparent 62%),
    linear-gradient(150deg, #06382c, #06170f 62%, #030a07);
}

.card-art.plinko {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(56, 189, 248, 0.45), transparent 62%),
    linear-gradient(150deg, #062a4a, #061627 62%, #030a12);
}

.card-art.dice {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(167, 139, 250, 0.45), transparent 62%),
    linear-gradient(150deg, #241543, #120b24 62%, #07040f);
}

.card-art.crash {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(251, 146, 60, 0.5), transparent 62%),
    linear-gradient(150deg, #3a1a05, #1d0c04 62%, #0a0402);
}

.card-art.keno {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(45, 212, 191, 0.45), transparent 62%),
    linear-gradient(150deg, #062e2a, #04181f 62%, #020a0c);
}

.card-art.limbo {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(163, 230, 53, 0.42), transparent 62%),
    linear-gradient(150deg, #1d2f06, #0e1a04 62%, #050a02);
}

.card-art.wheel {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(251, 113, 133, 0.45), transparent 62%),
    linear-gradient(150deg, #3a0f1c, #1d0710 62%, #0a0206);
}

.card-art.hilo {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(74, 222, 128, 0.42), transparent 62%),
    linear-gradient(150deg, #0d3b26, #061d13 62%, #020a06);
}

.card-art.tower {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(245, 158, 11, 0.45), transparent 62%),
    linear-gradient(150deg, #3b2206, #1d1003 62%, #0a0501);
}

.card-art.blackjack {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(220, 38, 38, 0.42), transparent 62%),
    linear-gradient(150deg, #2a0b0e, #150607 62%, #050102);
}

.card-art.roulette {
  background:
    radial-gradient(90% 80% at 25% 20%, rgba(52, 211, 153, 0.42), transparent 62%),
    linear-gradient(150deg, #06301f, #04150d 62%, #010603);
}

.card-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold-hi);
  backdrop-filter: blur(4px);
}

.card-fav {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: var(--gold-hi);
  font-size: 14px;
  line-height: 1;
  backdrop-filter: blur(4px);
  transition: transform 0.1s, background 0.15s;
}

.card-fav:active {
  transform: scale(0.88);
}

.card-fav.on {
  background: rgba(247, 201, 72, 0.2);
  border-color: rgba(247, 201, 72, 0.55);
  box-shadow: 0 0 12px rgba(247, 201, 72, 0.35);
}

.card-rtp {
  position: absolute;
  bottom: 8px;
  left: 9px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(243, 232, 210, 0.8);
  backdrop-filter: blur(4px);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px 10px;
}

.card-title {
  display: block;
  margin: 0;
  font-family: var(--display);
  font-size: 15.5px;
  line-height: 1.15;
  color: var(--cream);
}

.card-body p {
  margin: 0;
  overflow: hidden;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.card-play {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.card-play i {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
}

.card-info {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.card-info:active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
}

/* coming-soon filler tile */
.coming-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 150px;
  padding: 16px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(247, 201, 72, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.coming-card .coming-icon {
  font-family: var(--emoji);
  font-size: 34px;
  opacity: 0.7;
  filter: grayscale(0.4);
}

.coming-card b {
  font-family: var(--display);
  font-size: 14px;
  color: var(--cream);
}

.coming-card span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.card-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(150deg, #2a1c4a, #101126);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 70% at 50% 35%, rgba(255, 255, 255, 0.16), transparent 65%);
}

.card-art .art-main {
  position: relative;
  z-index: 1;
  font-size: clamp(42px, 13vw, 56px);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  transform: rotate(-4deg);
}

.card-art .art-main.seven {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(52px, 16vw, 68px);
  color: #e0384a;
  -webkit-text-stroke: 2px #7d0d1c;
  text-shadow: 0 4px 0 #6b0a18, 0 0 24px rgba(224, 56, 74, 0.4);
  transform: rotate(-6deg);
}

.card-art .art-side {
  position: absolute;
  z-index: 1;
  font-size: 20px;
  opacity: 0.8;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.card-art .art-side.left {
  left: 14px;
  bottom: 12px;
  transform: rotate(-14deg);
}

.card-art .art-side.right {
  right: 14px;
  top: 12px;
  transform: rotate(12deg);
}

/* ---------------- Lobby footer ---------------- */

.lobby-footer {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
}

.lobby-footer p {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.lobby-footer p strong {
  color: var(--muted);
}

.lobby-footer .tiny {
  margin-top: 4px;
  font-size: 8px;
  opacity: 0.8;
}

/* ---------------- Game chrome ---------------- */

.game-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  animation: view-in 0.28s ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.game-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: calc(9px + var(--safe-top)) 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.96), rgba(10, 14, 22, 0.7));
  backdrop-filter: blur(10px);
  z-index: 20;
}

.back-btn {
  font-size: 20px;
  line-height: 1;
}

.info-btn {
  font-family: var(--display);
  font-size: 15px;
  font-style: italic;
  font-weight: 700;
}

.game-heading {
  flex: 1;
  min-width: 0;
}

.game-heading h1 {
  margin: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--gold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-heading p {
  margin: 1px 0 0;
  overflow: hidden;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-stage {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 8px 12px calc(8px + var(--safe-bottom));
}

/* ---------------- Dialogs ---------------- */

.sheet {
  width: min(92vw, 410px);
  max-height: 84dvh;
  padding: 20px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #1a2231, #0e141e);
  color: var(--cream);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.85),
    0 0 0 1px var(--line),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sheet[open] {
  animation: sheet-in 0.22s ease-out;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sheet::backdrop {
  background: rgba(3, 5, 9, 0.74);
  backdrop-filter: blur(5px);
}

.sheet h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
}

.close:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}

.sheet-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.sheet-text {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.fine {
  margin: 14px 0 0;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

.primary {
  width: 100%;
  margin-top: 12px;
  padding: 15px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #d9a11f);
  color: #241600;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 5px 0 #8a5f0d, inset 0 1px 0 #fff6cf;
  transition: transform 0.08s, box-shadow 0.08s;
}

.primary:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #8a5f0d, inset 0 1px 0 #fff6cf;
}

.primary:disabled {
  filter: saturate(0.4) brightness(0.7);
  transform: none;
  box-shadow: 0 5px 0 #5c3f0a, inset 0 1px 0 rgba(255, 246, 207, 0.4);
  cursor: default;
}

.secondary {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dialog-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
  margin-top: 14px;
}

.dialog-row .primary {
  margin-top: 0;
}

/* ---------------- Promo / info dialogs ---------------- */

.daily-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 4px 0 12px;
  padding: 18px;
  border: 1px solid rgba(247, 201, 72, 0.3);
  border-radius: 18px;
  background:
    radial-gradient(80% 80% at 50% 0%, rgba(247, 201, 72, 0.16), transparent 70%),
    rgba(255, 255, 255, 0.03);
}

.daily-day {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.daily-reward b {
  font-family: var(--display);
  font-size: 38px;
  line-height: 1;
  color: var(--gold-hi);
  text-shadow: 0 0 20px rgba(247, 201, 72, 0.4);
}

.daily-unit {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.daily-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.daily-dots i {
  width: 22px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.daily-dots i.on {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi));
  box-shadow: 0 0 8px rgba(247, 201, 72, 0.4);
}

.daily-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 6px;
}

.daily-calendar-head span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.daily-calendar-head b {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--gold);
  white-space: nowrap;
}

.daily-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 12px;
}

.dc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.dc-top {
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.dc b {
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.dc.done {
  border-color: rgba(247, 201, 72, 0.24);
  background: rgba(247, 201, 72, 0.07);
}

.dc.done .dc-top,
.dc.done b {
  color: var(--gold);
}

.dc.today {
  border-color: rgba(247, 201, 72, 0.9);
  background: rgba(247, 201, 72, 0.16);
  box-shadow: 0 0 16px -6px rgba(247, 201, 72, 0.8);
  animation: dailyPulse 2.4s ease-in-out infinite;
}

.dc.today .dc-top,
.dc.today b {
  color: #fff6cf;
}

.dc.claimed {
  border-color: rgba(247, 201, 72, 0.45);
  box-shadow: 0 0 14px -8px rgba(247, 201, 72, 0.8);
}

.dc.finale:not(.done):not(.today) b {
  color: rgba(247, 201, 72, 0.7);
}

@keyframes dailyPulse {
  0%,
  100% {
    box-shadow: 0 0 16px -6px rgba(247, 201, 72, 0.8);
  }
  50% {
    box-shadow: 0 0 20px -4px rgba(247, 201, 72, 0.95);
  }
}

@media (max-width: 360px) {
  .daily-calendar {
    gap: 3px;
  }

  .dc {
    padding: 5px 0 4px;
    border-radius: 8px;
  }

  .dc b {
    font-size: 7px;
  }
}

.leader-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

.leader-row .lr-rank {
  width: 22px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.leader-row .lr-name {
  flex: 1;
  overflow: hidden;
  color: var(--cream);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-row .lr-score {
  color: var(--gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.leader-row.you {
  border: 1px solid rgba(247, 201, 72, 0.35);
  background: rgba(247, 201, 72, 0.1);
}

.leader-row.top1 .lr-rank {
  color: var(--gold-hi);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.info-cell {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.info-cell span {
  display: block;
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.info-cell b {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--cream);
}

.info-mech {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.info-mech p {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--muted);
}

.info-mech p b {
  color: var(--gold);
}

.info-stats {
  margin-top: 14px;
}

.info-stats-head {
  margin-bottom: 8px;
}

.info-sub-head {
  margin: 12px 0 6px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.info-recent {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ir-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 9.5px;
  color: var(--muted);
}

.ir-row b {
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}

.ir-row b.win {
  color: var(--green);
}

.info-empty {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}

/* ---------------- Toast & confetti ---------------- */

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  max-width: 86vw;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 32, 0.95);
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -8vh;
  display: block;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  from {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translateY(118vh) rotate(720deg);
    opacity: 0.85;
  }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 360px) {
  .lobby-top {
    gap: 6px;
  }

  .brand {
    gap: 7px;
  }

  .brand-text h1 {
    font-size: 14px;
    letter-spacing: 0.03em;
  }

  .brand-text p {
    font-size: 6px;
    letter-spacing: 0.18em;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }

  .lobby-actions {
    gap: 5px;
  }

  .lobby-actions .icon-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .lobby-actions .balance-chip {
    padding: 5px 8px;
  }

  .balance-chip b {
    font-size: 16px;
  }

  .lobby-actions .balance-chip b {
    font-size: 14px;
  }

  .hero {
    min-height: 172px;
  }

  .game-top {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .game-heading h1 {
    font-size: 14px;
  }

  .game-heading p {
    font-size: 6.5px;
    letter-spacing: 0.12em;
  }

  .game-top .icon-btn {
    width: 36px;
    height: 36px;
  }

  .balance-chip.small {
    padding: 5px 8px;
  }

  .balance-chip.small b {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bolt {
    animation: none;
  }

  .confetti-piece {
    display: none;
  }

  .game-view {
    animation: none;
  }
}
