.play-shell {
  display: grid;
  gap: 1.35rem;
  padding-top: 0.5rem;
}

.play-shell > header {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.play-shell > header .compliance-bar {
  margin-top: 1rem;
  animation: none;
}

.play-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(199, 228, 245, 0.06);
}

.credits-pill {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ice-100);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.credits-pill strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(94, 200, 240, 0.35);
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem 0;
}

.game-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(7, 14, 24, 0.45);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.62rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.game-tab:hover {
  color: var(--ice-200);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.game-tab[aria-selected="true"] {
  color: var(--navy-950);
  background: linear-gradient(180deg, var(--ice-300), var(--accent-deep));
  border-color: transparent;
  box-shadow: 0 0 22px rgba(94, 200, 240, 0.22);
}

.game-panel {
  display: none;
  padding: 1.4rem 1.25rem 1.5rem;
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(165deg, rgba(94, 200, 240, 0.05), transparent 42%),
    var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-glow);
  animation: rise 0.4s var(--ease-out) both;
  position: relative;
}

.game-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent 70%);
  opacity: 0.85;
}

.game-panel.active {
  display: block;
}

.game-panel h2 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--ice-50);
}

.game-panel > .blurb {
  color: var(--text-muted);
  margin: 0 0 1.35rem;
  max-width: 60ch;
}

.game-status {
  min-height: 1.4em;
  margin: 0.95rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ice-200);
}

.game-status.win { color: var(--win); }
.game-status.loss { color: var(--loss); }

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.95rem 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field input,
.field select {
  appearance: none;
  background: rgba(4, 8, 15, 0.65);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  min-width: 7rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(94, 200, 240, 0.35);
}

/* Scratch */
.scratch-stage {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 3 / 2;
  margin-top: 0.35rem;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 30% 20%, rgba(94, 200, 240, 0.12), transparent 50%),
    var(--navy-800);
  box-shadow:
    inset 0 0 0 1px rgba(199, 228, 245, 0.06),
    0 16px 40px rgba(0, 4, 12, 0.35);
  touch-action: none;
  user-select: none;
}

.scratch-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

#scratch-base {
  z-index: 1;
}

#scratch-foil {
  z-index: 2;
}

/* Keno */
.keno-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.4rem;
  max-width: 540px;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(4, 8, 15, 0.4);
}

@media (max-width: 560px) {
  .keno-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.keno-cell {
  appearance: none;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: rgba(7, 14, 24, 0.55);
  color: var(--silver-200);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.keno-cell:hover {
  border-color: var(--ice-400);
  box-shadow: 0 0 12px rgba(94, 200, 240, 0.12);
}

.keno-cell.picked {
  background: rgba(94, 200, 240, 0.2);
  border-color: var(--accent);
  color: var(--ice-50);
  box-shadow: inset 0 0 0 1px rgba(94, 200, 240, 0.25);
}

.keno-cell.drawn {
  box-shadow: inset 0 0 0 1px var(--silver-300);
}

.keno-cell.hit {
  background: linear-gradient(180deg, rgba(110, 214, 168, 0.4), rgba(110, 214, 168, 0.12));
  border-color: var(--win);
  color: var(--ice-50);
}

.keno-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.keno-meta strong {
  color: var(--ice-200);
  font-variant-numeric: tabular-nums;
}

.drawn-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 2rem;
  margin-bottom: 0.85rem;
}

.drawn-chip {
  width: 2.05rem;
  height: 2.05rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ice-200);
  background: rgba(15, 28, 46, 0.9);
}

.drawn-chip.hit {
  border-color: var(--win);
  color: var(--win);
  box-shadow: 0 0 12px rgba(110, 214, 168, 0.2);
}

/* Dice */
.dice-table {
  display: grid;
  gap: 1.1rem;
  max-width: 440px;
  padding: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(4, 8, 15, 0.4);
}

.dice-faces {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.die {
  width: 76px;
  height: 76px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(155deg, rgba(94, 200, 240, 0.12), transparent 45%),
    linear-gradient(160deg, #16304a, #070e18);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ice-50);
  box-shadow:
    inset 0 0 0 1px rgba(158, 197, 222, 0.08),
    0 10px 24px rgba(0, 4, 12, 0.35);
  transition: transform 0.2s ease;
}

.die.rolling {
  animation: tumble 0.45s ease;
}

@keyframes tumble {
  0% { transform: rotate(0deg) scale(1); }
  40% { transform: rotate(-12deg) scale(1.06); }
  70% { transform: rotate(8deg) scale(0.98); }
  100% { transform: rotate(0deg) scale(1); }
}

.dice-total {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--silver-200);
  letter-spacing: -0.02em;
}

.choice-group {
  display: flex;
  gap: 0.5rem;
}

.choice-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(7, 14, 24, 0.35);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.choice-group input {
  accent-color: var(--accent);
}

.choice-group label:has(input:checked) {
  border-color: var(--accent);
  color: var(--ice-50);
  background: rgba(94, 200, 240, 0.12);
  box-shadow: 0 0 16px rgba(94, 200, 240, 0.1);
}

.pay-note {
  font-size: 0.82rem;
  color: var(--silver-400);
  margin: 0.55rem 0 0;
  max-width: 52ch;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .game-panel {
    padding: 1.15rem 1rem 1.25rem;
  }

  .die {
    width: 64px;
    height: 64px;
    font-size: 1.55rem;
  }
}
