/* SoloBet Blackjack — emerald glass + gold rim (mock) */

@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Heavy.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("fonts/Gilroy-Heavy.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Gilroy", "Segoe UI", sans-serif;
  --cream: #f7f4ef;
  --muted: rgba(247, 244, 239, 0.72);
  --ink: #1a1408;
  --gold: #c9a84a;
  --gold-bright: #e8d48a;
  --gold-deep: #8f6e28;
  --glass-tint: rgba(22, 110, 68, 0.28);
  --glass-tint-deep: rgba(6, 48, 32, 0.38);
  --rim: rgba(186, 168, 120, 0.55);
  --touch: 48px;
  --stage-max: 420px;
  --radius: 30px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: var(--font);
  color: var(--cream);
  background: #0a0c0e;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* —— Full-bleed casino photo (blurred for glass) —— */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.05);
}

.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 6, 4, 0.4) 0%, rgba(10, 6, 4, 0.18) 28%, rgba(10, 6, 4, 0.28) 62%, rgba(8, 5, 3, 0.68) 100%),
    radial-gradient(70% 50% at 50% 40%, transparent 30%, rgba(0, 0, 0, 0.32) 100%);
}

.stage {
  position: relative;
  z-index: 1;
  width: min(100%, var(--stage-max));
  margin: 0 auto;
  min-height: 100dvh;
  padding:
    max(0.75rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(0.85rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* —— Header —— */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
}

.brand { margin: 0; line-height: 0; }
.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.headline {
  margin: 0;
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.sub {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(200, 220, 210, 0.78);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* —— Liquid glass table (emerald, thin champagne rim — not yellow frame) —— */
.table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.table-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: calc(var(--radius) + 1px);
  background: transparent;
  box-shadow:
    var(--shadow),
    0 0 40px rgba(40, 140, 90, 0.12);
}

.table-felt {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius);
  /* translucent green liquid glass — background must show through */
  background:
    linear-gradient(
      155deg,
      rgba(90, 200, 150, 0.26) 0%,
      var(--glass-tint) 32%,
      var(--glass-tint-deep) 72%,
      rgba(4, 36, 24, 0.45) 100%
    );
  border: 1px solid var(--rim);
  outline: 1px solid rgba(255, 255, 255, 0.08);
  outline-offset: -2px;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    inset 1px 0 0 rgba(255, 255, 255, 0.12),
    inset -1px 0 0 rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(120, 100, 50, 0.22);
  backdrop-filter: blur(36px) saturate(1.85) brightness(1.08);
  -webkit-backdrop-filter: blur(36px) saturate(1.85) brightness(1.08);
  overflow: auto;
  overscroll-behavior: contain;
}

/* specular shine — liquid glass highlight */
.table-felt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(90% 55% at 18% -5%, rgba(220, 255, 240, 0.55), transparent 52%),
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.38) 0%,
      rgba(255, 255, 255, 0.08) 18%,
      transparent 42%,
      transparent 70%,
      rgba(180, 255, 220, 0.06) 100%
    );
  mix-blend-mode: soft-light;
  opacity: 0.95;
}

/* soft green depth wash */
.table-felt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(70% 50% at 80% 110%, rgba(0, 60, 40, 0.35), transparent 55%),
    radial-gradient(50% 40% at 50% 50%, rgba(40, 160, 100, 0.12), transparent 70%);
  mix-blend-mode: multiply;
  opacity: 0.85;
}

.table-felt > * {
  position: relative;
  z-index: 1;
}

/* —— Particle streak bar —— */
.streak {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem 0.65rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(6, 14, 12, 0.55), rgba(4, 10, 8, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 1px 3px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.streak-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.streak-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.88);
}

.streak-count {
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(246, 224, 138, 0.25);
}

.streak-particle {
  position: relative;
  width: 100%;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: #030504;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    inset 0 -1px 1px rgba(255, 255, 255, 0.04);
}

.streak-swarm {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.streak-swarm img {
  display: block;
  width: 118%;
  height: 160%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  position: absolute;
  left: -9%;
  top: -30%;
  mix-blend-mode: screen;
  user-select: none;
  -webkit-user-drag: none;
}

.streak-swarm--dim {
  opacity: 0.58;
  filter: brightness(0.82) contrast(1.05) saturate(0.9);
}

.streak-swarm--lit {
  /* soft leading edge so clip doesn't look like a hard crop */
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 max(0%, calc(var(--p, 0) * 100% - 3%)),
    rgba(0, 0, 0, 0.55) calc(var(--p, 0) * 100%),
    transparent calc(var(--p, 0) * 100% + 4%)
  );
  mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 max(0%, calc(var(--p, 0) * 100% - 3%)),
    rgba(0, 0, 0, 0.55) calc(var(--p, 0) * 100%),
    transparent calc(var(--p, 0) * 100% + 4%)
  );
  filter: brightness(1.4) contrast(1.14) saturate(1.1);
  transition: mask-image 420ms var(--ease), -webkit-mask-image 420ms var(--ease);
}

.streak-swarm--lit img {
  animation: swarm-drift 8s ease-in-out infinite alternate;
}

.streak-swarm--dim img {
  animation: swarm-drift 11s ease-in-out infinite alternate-reverse;
}

@keyframes swarm-drift {
  from { transform: translate3d(0, 0, 0) scale(1.02); }
  to { transform: translate3d(-4%, 5%, 0) scale(1.1); }
}

/* —— Hands —— */
.hand {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
}

.hand-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hand-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.8);
}

.hand-score {
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.55rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
  background: linear-gradient(160deg, #ffe56a, #f0c230 55%, #d9a018);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.felt-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0.15rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.felt-divider::before,
.felt-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 6.6rem;
  align-items: center;
  justify-content: center;
}

.player-hands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.player-hand-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.35rem;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.player-hand-slot.is-active {
  border-color: rgba(246, 224, 138, 0.45);
  background: rgba(0, 0, 0, 0.18);
}

.player-hand-tag {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 224, 138, 0.8);
}

.player-hand-slot .cards {
  min-height: 0;
}

.card {
  width: 4.55rem;
  height: 6.3rem;
  border-radius: 12px;
  background: linear-gradient(165deg, #fff, #f1f1f1);
  color: #1a1a1a;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0.36rem 0.4rem;
  font-weight: 500;
  line-height: 1;
  animation: deal-in 480ms var(--ease) both;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card.red { color: #c43b35; }
.card-corner { font-size: 1rem; }
.card-corner.bl { transform: rotate(180deg); justify-self: end; }
.card-suit { place-self: center; font-size: 1.85rem; }

.card.back {
  background:
    linear-gradient(135deg, rgba(246, 224, 138, 0.28), transparent 40%),
    repeating-linear-gradient(45deg, #0f3d2c 0 6px, #155239 6px 12px);
  border: 2px solid rgba(246, 224, 138, 0.4);
  color: transparent;
}
.card.back .card-corner,
.card.back .card-suit { visibility: hidden; }

@keyframes deal-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.status {
  margin-top: auto;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(230, 235, 232, 0.78);
  min-height: 1.35em;
  padding: 0.55rem 0.35rem 0.15rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* —— Controls (frosted dark glass) —— */
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(22, 26, 28, 0.72), rgba(10, 12, 14, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border-radius: 16px;
  padding: 0.85rem 0.5rem;
  min-height: var(--touch);
  transition: transform 160ms var(--ease), opacity 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:focus-visible {
  outline: 3px solid rgba(246, 224, 138, 0.9);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  box-shadow: none !important;
}

.btn:not(:disabled):active { transform: scale(0.97); }

.btn-deal {
  background: linear-gradient(180deg, #ffe98a 0%, #f0c84a 42%, #c9951e 100%);
  color: var(--ink);
  box-shadow:
    0 8px 22px rgba(201, 149, 30, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-hit,
.btn-stand,
.btn-split {
  background: linear-gradient(180deg, rgba(48, 52, 56, 0.95), rgba(28, 30, 34, 0.98));
  color: rgba(230, 230, 235, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-hit:not(:disabled),
.btn-stand:not(:disabled),
.btn-split:not(:disabled) {
  opacity: 1;
  color: #fff;
  border-color: rgba(246, 224, 138, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 16px rgba(232, 197, 71, 0.12);
}

.btn-split:not(:disabled) {
  background: linear-gradient(180deg, #5b7cfa, #3d5bd9 70%, #3149b8);
  color: #f4f7ff;
  border-color: transparent;
}

.btn-stand:not(:disabled) {
  background: linear-gradient(180deg, #3ddc97, #22b875 70%, #1a9a62);
  color: #06261a;
  border-color: transparent;
}

.legal {
  margin: 0;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.4;
  color: rgba(220, 210, 195, 0.7);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  max-width: 38ch;
  align-self: center;
}

/* —— Bonus overlay (glass + gold) —— */
.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1.1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(4, 12, 10, 0.62);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  pointer-events: none;
  visibility: hidden;
}

.win-overlay.is-open {
  display: grid;
  pointer-events: auto;
  visibility: visible;
  animation: fade-in 240ms ease;
}

.win-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.win-card {
  position: relative;
  width: min(100%, 300px);
  min-height: 300px;
  text-align: center;
  padding: 1.55rem 1.25rem 1.2rem;
  border-radius: 28px;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #f3efe6;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(90, 180, 160, 0.22), transparent 55%),
    radial-gradient(100% 80% at 90% 100%, rgba(20, 80, 70, 0.35), transparent 50%),
    linear-gradient(160deg, rgba(18, 42, 40, 0.78), rgba(6, 16, 18, 0.88) 55%, rgba(8, 22, 24, 0.9));
  border: 1.5px solid rgba(232, 197, 71, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 236, 170, 0.28) inset,
    0 0 0 4px rgba(201, 149, 30, 0.18),
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(232, 197, 71, 0.12);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  animation: win-pop 320ms var(--ease) both;
}

.win-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background:
    radial-gradient(ellipse 80% 40% at 30% 20%, rgba(180, 255, 230, 0.18), transparent 60%),
    repeating-linear-gradient(
      -18deg,
      transparent 0 10px,
      rgba(120, 220, 200, 0.04) 10px 11px
    );
  mix-blend-mode: soft-light;
}

.win-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 22px;
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(246, 224, 138, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.win-card > * {
  position: relative;
  z-index: 1;
}

@keyframes win-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.win-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 224, 138, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.win-amount {
  margin: 0.1rem 0 0.15rem;
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff4b0 0%, #f6e08a 35%, #d4a017 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(201, 149, 30, 0.35));
}

.win-code-label {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(236, 240, 238, 0.78);
}

.win-code {
  margin: 0.15rem 0 0.35rem;
  width: 100%;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(220, 228, 224, 0.88);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 197, 71, 0.55);
  background: rgba(4, 12, 14, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

.btn-copy,
.btn-claim,
.btn-again {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none;
  display: grid;
  place-items: center;
  border: 0;
}

.btn-copy[hidden],
.btn-claim[hidden],
.btn-again[hidden] {
  display: none !important;
}

.btn-copy {
  background: rgba(8, 18, 20, 0.5);
  color: rgba(246, 224, 138, 0.95);
  border: 1px solid rgba(232, 197, 71, 0.5);
}

.btn-claim {
  margin-top: 0.15rem;
  color: #1a1208;
  border: 0;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.55), transparent 45%),
    radial-gradient(90% 70% at 85% 100%, rgba(160, 90, 10, 0.55), transparent 50%),
    linear-gradient(180deg, #ffe9a0 0%, #f0c84a 28%, #d4a017 62%, #a87412 100%);
  box-shadow:
    0 10px 24px rgba(201, 149, 30, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 8px rgba(120, 70, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 240, 180, 0.35);
}

.btn-claim:hover {
  filter: brightness(1.05);
}

.btn-again {
  background: rgba(6, 14, 16, 0.42);
  color: rgba(247, 244, 239, 0.92);
  border: 1px solid rgba(232, 197, 71, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-copy:focus-visible,
.btn-claim:focus-visible,
.btn-again:focus-visible {
  outline: 3px solid rgba(246, 224, 138, 0.9);
  outline-offset: 2px;
}

/* —— Responsive —— */
@media (max-height: 700px) {
  .brand-logo { width: 46px; height: 46px; }
  .headline { font-size: 1.3rem; }
  .card { width: 3.9rem; height: 5.4rem; }
  .cards { min-height: 5.7rem; }
  .streak-particle { height: 20px; }
  .table-felt { padding: 0.8rem; gap: 0.65rem; }
}

@media (max-height: 600px) {
  .sub { display: none; }
  .felt-divider span { letter-spacing: 0.12em; }
  .legal { font-size: 0.62rem; }
}

@media (min-width: 640px) {
  :root { --stage-max: 460px; }

  .brand-logo { width: 64px; height: 64px; }
  .card { width: 5rem; height: 6.95rem; }
  .cards { min-height: 7.2rem; gap: 14px; }

  .btn:not(:disabled):hover { filter: brightness(1.05); }
}

@media (min-width: 900px) {
  :root { --stage-max: 480px; }

  .stage {
    min-height: min(100dvh, 880px);
    margin: 1.25rem auto;
  }

  .scene-bg { object-position: center 35%; }
}

@media (prefers-reduced-motion: reduce) {
  .card.deal-in,
  .card.flip-in,
  .card.hit-in {
    animation: none;
  }

  .streak-swarm img {
    animation: none !important;
  }
}

body.tg-miniapp .stage {
  padding-top: max(0.55rem, env(safe-area-inset-top));
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
}
