@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@700;800;900&display=swap');

:root {
  --bg0: #2a1050;
  --bg1: #4a1d7a;
  --panel: rgba(255, 255, 255, 0.12);
  --panel-border: rgba(255, 255, 255, 0.22);
  --text: #fff8ff;
  --muted: rgba(255, 248, 255, 0.7);
  --win: #ffe566;
  --gold: #ffd24d;
  --font: 'Nunito', system-ui, sans-serif;
  --display: 'Lilita One', 'Nunito', system-ui, sans-serif;
  --gold-text: linear-gradient(180deg, #fffbe6 0%, #ffe27a 40%, #ffb020 70%, #d97706 100%);
  --outline-dark:
    drop-shadow(1.5px 0 0 #2a0845) drop-shadow(-1.5px 0 0 #2a0845)
    drop-shadow(0 1.5px 0 #2a0845) drop-shadow(0 -1.5px 0 #2a0845)
    drop-shadow(0 3px 0 #16022b);
  --outline-big:
    drop-shadow(3px 0 0 #2a0845) drop-shadow(-3px 0 0 #2a0845)
    drop-shadow(0 3px 0 #2a0845) drop-shadow(0 -3px 0 #2a0845)
    drop-shadow(0 7px 0 #16022b) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #ff7ab8 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, #7c5cff 0%, transparent 50%),
    linear-gradient(165deg, var(--bg1), var(--bg0));
}

/* ——— Animated backdrop ——— */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body::before {
  left: 50%;
  top: 30%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.045) 0deg 7deg, transparent 7deg 20deg);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: bgRays 90s linear infinite;
}

body::after {
  left: 0;
  right: 0;
  top: 0;
  height: calc(100vh + 1020px);
  background-image:
    radial-gradient(2px 2px at 40px 60px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 130px 190px, rgba(255, 220, 150, 0.8), transparent),
    radial-gradient(2.5px 2.5px at 210px 90px, rgba(255, 170, 230, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 290px 250px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 80px 300px, rgba(190, 170, 255, 0.8), transparent);
  background-size: 340px 340px;
  opacity: 0.55;
  animation: bgDrift 40s linear infinite;
}

body.fs-mode::before {
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 90, 0.07) 0deg 7deg, transparent 7deg 20deg);
  animation-duration: 30s;
}

body.fs-mode::after {
  opacity: 0.85;
  animation-duration: 18s;
}

body.fs-super::before {
  background: repeating-conic-gradient(from 0deg, rgba(255, 120, 60, 0.1) 0deg 7deg, rgba(255, 210, 90, 0.04) 7deg 20deg);
  animation-duration: 16s;
}

@keyframes bgRays {
  to { transform: rotate(360deg); }
}

@keyframes bgDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-1020px); }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding:
    max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100vh;
  height: 100dvh;
}

/* The board is the flexible part: it takes whatever height is left and stays square */
.stage-outer {
  flex: 1 1 auto;
  min-height: 200px;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-outer .stage-wrap {
  width: min(100cqw, 100cqh);
  height: auto;
}

.win-info {
  bottom: max(-16px, calc((100cqh - min(100cqw, 100cqh)) / 2 - 16px));
}

.topbar,
.toast {
  flex: none;
}

.toast {
  margin: 0;
  min-height: 0 !important;
  position: fixed;
  left: 50%;
  bottom: calc(var(--pp-bar-h) + 70px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(20, 6, 44, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 210, 77, 0.5), 0 8px 18px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.brand {
  text-align: center;
  font-weight: 900;
}

.logo {
  font-family: var(--display);
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #fff;
  -webkit-text-stroke: 1px rgba(60, 10, 90, 0.6);
  text-shadow: 0 3px 0 #3b0f6b, 0 6px 14px rgba(0, 0, 0, 0.35);
}

.logo b {
  font-weight: 400;
  margin-left: 0.2em;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 #6b2a00);
}

.stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid transparent;
  background:
    linear-gradient(#2a0f52, #2a0f52) padding-box,
    linear-gradient(160deg, #fff1b8, #f5b73a 30%, #8a4b00 55%, #ffd76a 80%, #a86200) border-box;
  box-shadow:
    0 0 0 3px rgba(30, 8, 60, 0.9),
    0 0 30px rgba(255, 190, 70, 0.25),
    0 22px 44px rgba(20, 4, 40, 0.6);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

body.fs-mode {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #c084fc 0%, transparent 55%),
    linear-gradient(165deg, #2e1065, #0f0524);
}

.fs-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(
    180deg,
    rgba(15, 5, 36, 0.55),
    transparent 28%,
    transparent 72%,
    rgba(15, 5, 36, 0.5)
  );
}

.fs-overlay.hidden {
  display: none;
}

.fs-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

.fs-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #f5d0fe;
  font-weight: 800;
}

.fs-num {
  font-family: var(--display);
  font-size: clamp(48px, 14vw, 88px);
  line-height: 0.95;
  color: #fff;
  -webkit-text-stroke: 2px rgba(60, 10, 90, 0.7);
}

.pp-auto small {
  margin-left: 4px;
  font-size: 0.85em;
  opacity: 0.85;
}

.spin-btn {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #4a1c00;
  background: radial-gradient(circle at 38% 28%, #fff6c8 0%, #ffd24d 38%, #f59e0b 72%, #b45309 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    inset 0 -6px 0 rgba(120, 50, 0, 0.45),
    0 0 0 4px #5b1fa0,
    0 0 0 6px rgba(255, 210, 77, 0.8),
    0 0 28px rgba(255, 190, 60, 0.55),
    0 10px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, filter 0.15s ease, opacity 0.15s ease;
}

.spin-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.spin-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.spin-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.6) brightness(0.85);
}

.spin-icon {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.spin-btn.spinning .spin-icon {
  animation: spinIcon 0.7s linear infinite;
}

.spin-label {
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.spin-btn.fs {
  color: #3b0764;
  background: radial-gradient(circle at 38% 28%, #fdf4ff 0%, #f0abfc 38%, #c026d3 78%, #701a75 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    inset 0 -6px 0 rgba(80, 0, 90, 0.45),
    0 0 0 4px #3b0f6b,
    0 0 0 6px rgba(240, 171, 252, 0.9),
    0 0 30px rgba(232, 121, 249, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.4);
}

@keyframes spinIcon {
  to { transform: rotate(360deg); }
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  color: #2a1050;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.12s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: none;
}

.btn-spin {
  background: linear-gradient(180deg, #ffe566, #ff9f1c);
  min-width: 140px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: #4a1c00;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
}

.btn-secondary.active {
  background: #60a5fa;
  color: #0b1b33;
}

.toast {
  text-align: center;
  color: var(--win);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  min-height: 1.4rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.toast.hidden {
  visibility: hidden;
}

/* ——— Top bar / tools ——— */
#fx-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 40;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-badge {
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--muted);
}

.mode-badge.server {
  background: #22c55e;
  color: #052e16;
}

/* ——— Controls theme (layout lives in src/shared/controls.css) ——— */
:root {
  --pp-accent: #ffd24d;
  --pp-buy-bg:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(180deg, #a21caf, #3b0a6e);
}

.pp-buy-art {
  background:
    radial-gradient(circle at 35% 28%, #fff 0 8%, transparent 22%),
    conic-gradient(from 45deg, #f0abfc, #a855f7, #7c3aed, #c026d3, #f0abfc);
}

#win-label {
  text-transform: uppercase;
}

.fs-num.bump {
  animation: bump 0.5s ease;
}

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); color: #ffd24d; }
  100% { transform: scale(1); }
}

/* ——— In-board scenes (FS intro / outro) ——— */
.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(80, 20, 140, 0.85), rgba(10, 2, 26, 0.92));
  z-index: 5;
  animation: fadeIn 0.3s ease;
}

.scene.hidden {
  display: none;
}

.scene-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: popIn 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.scene-kicker {
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #f5d0fe;
}

.scene-num {
  font-size: clamp(80px, 26vw, 150px);
  font-weight: 900;
  line-height: 0.9;
  background: linear-gradient(180deg, #fff 10%, #ffd24d 55%, #e08a00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 rgba(90, 30, 0, 0.6));
}

.scene-title {
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 4px 16px rgba(255, 200, 80, 0.5);
}

.scene-amount {
  font-size: clamp(44px, 13vw, 76px);
  font-weight: 900;
  color: #ffe566;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 18px rgba(255, 200, 80, 0.55);
}

.scene-sub {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 800;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

@keyframes popIn {
  from { transform: scale(0.4); opacity: 0; }
}

/* ——— Big win ——— */
.bigwin {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(60, 10, 110, 0.7), rgba(5, 0, 15, 0.88));
  cursor: pointer;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}

.bigwin.hidden {
  display: none;
}

.bw-rays {
  position: absolute;
  width: 180vmax;
  height: 180vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 77, 0.14) 0deg 8deg, transparent 8deg 20deg);
  animation: spinRays 14s linear infinite;
  mask-image: radial-gradient(circle, #000 10%, transparent 60%);
}

.bigwin[data-level='2'] .bw-rays {
  background: repeating-conic-gradient(from 0deg, rgba(120, 220, 255, 0.16) 0deg 8deg, transparent 8deg 20deg);
  animation-duration: 9s;
}

.bigwin[data-level='3'] .bw-rays {
  background: repeating-conic-gradient(from 0deg, rgba(255, 90, 160, 0.2) 0deg 8deg, rgba(255, 210, 77, 0.12) 8deg 20deg);
  animation-duration: 5s;
}

@keyframes spinRays {
  to { transform: rotate(360deg); }
}

.bw-content {
  position: relative;
  text-align: center;
}

.bw-title {
  font-size: clamp(54px, 15vw, 120px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fffbe6 0%, #ffd24d 45%, #e07a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 0 rgba(90, 30, 0, 0.7)) drop-shadow(0 0 30px rgba(255, 200, 80, 0.5));
  animation: popIn 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.bigwin[data-level='2'] .bw-title {
  background-image: linear-gradient(180deg, #ffffff 0%, #8ee8ff 45%, #2f6bff 100%);
}

.bigwin[data-level='3'] .bw-title {
  background-image: linear-gradient(180deg, #ffffff 0%, #ff9ad5 40%, #c026d3 100%);
}

.bw-title.pop {
  animation: popIn 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.bw-amount {
  margin-top: 10px;
  font-size: clamp(40px, 11vw, 84px);
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 220, 120, 0.6);
}

.bw-hint {
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

/* ——— Modals ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 4, 24, 0.72);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(420px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #1c1033;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: popIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.modal-card.wide {
  width: min(560px, 100%);
}

.modal-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-actions .btn {
  padding: 12px 20px;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.chips button.sel {
  background: #ffd24d;
  border-color: #ffd24d;
  color: #2a1050;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: #ffd24d;
}

/* ——— Paytable ——— */
.pt-gems {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pt-table,
.history {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.pt-table th,
.pt-table td,
.history th,
.history td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pt-table th,
.history th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pt-table td:last-child {
  color: var(--win);
  font-weight: 900;
}

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

.pt-special {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.rules h3 {
  margin: 14px 0 6px;
  font-size: 0.95rem;
  color: #f5d0fe;
}

.rules ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
  color: rgba(255, 248, 255, 0.85);
}

.muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.history-wrap {
  max-height: 55vh;
  overflow-y: auto;
}

.history tr.won td:nth-child(4) {
  color: var(--win);
  font-weight: 900;
}

.scene-num,
.scene-title,
.scene-amount,
.scene-kicker,
.bw-title,
.bw-amount,
.modal-card h2 {
  font-family: var(--display);
  font-weight: 400;
}

/* ——— Win info plaque ——— */
.stage-outer {
  position: relative;
}

.win-info {
  position: absolute;
  left: 50%;
  bottom: -16px;
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
  background: linear-gradient(180deg, #3b0f6b, #1a0636);
  box-shadow: 0 0 0 2px #ffd24d, 0 0 16px rgba(255, 200, 80, 0.45), 0 6px 12px rgba(0, 0, 0, 0.45);
  animation: plaqueIn 0.25s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.win-info.hidden {
  display: none;
}

.wi-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--display);
  font-size: 1rem;
  color: #fff;
}

.wi-item canvas {
  width: 24px;
  height: 24px;
}

.wi-item b {
  font-weight: 400;
  margin-left: 4px;
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wi-mult {
  font-family: var(--display);
  color: #ffd24d;
  font-size: 1rem;
}

@keyframes plaqueIn {
  from { transform: translateX(-50%) scale(0.5); opacity: 0; }
}

/* ——— Retrigger banner ——— */
.retrigger {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(60, 10, 110, 0.55), transparent 65%);
  animation: fadeIn 0.2s ease;
}

.retrigger.hidden {
  display: none;
}

.rt-num,
.rt-text {
  font-family: var(--display);
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: var(--outline-big);
  animation: popIn 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.rt-num {
  font-size: clamp(90px, 28vw, 160px);
  line-height: 0.9;
}

.rt-text {
  font-size: clamp(30px, 9vw, 52px);
  background-image: linear-gradient(180deg, #ffffff 0%, #fbcfe8 45%, #e879f9 75%, #a21caf 100%);
}

/* ——— Super free spins theme ——— */
body.fs-super {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #f59e0b 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, #dc2626 0%, transparent 50%),
    linear-gradient(165deg, #4c0519, #12020a);
}

body.fs-super .stage-wrap {
  box-shadow:
    0 0 0 3px rgba(60, 8, 20, 0.9),
    0 0 40px rgba(255, 150, 40, 0.5),
    0 22px 44px rgba(20, 4, 10, 0.6);
}

#fs-intro.super {
  background: radial-gradient(circle at 50% 45%, rgba(180, 60, 20, 0.88), rgba(30, 2, 10, 0.94));
}

#fs-intro.super .scene-title {
  background-image: var(--gold-text);
}

/* ——— Premium outlined type ——— */
.logo,
.scene-kicker {
  text-shadow: none;
  -webkit-text-stroke: 0;
  filter: var(--outline-dark);
}

.logo b {
  filter: var(--outline-dark);
}

.scene-num,
.scene-title,
.scene-amount,
.bw-title,
.bw-amount,
.fs-num {
  -webkit-text-stroke: 0;
  text-shadow: none;
  filter: var(--outline-big);
}

.scene-title,
.bw-amount,
.scene-amount {
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scene-title {
  background-image: linear-gradient(180deg, #ffffff 0%, #fbcfe8 45%, #e879f9 75%, #a21caf 100%);
}

.bw-title {
  letter-spacing: 0.03em;
}

.bw-title.pop,
.bw-title {
  filter: var(--outline-big) drop-shadow(0 0 36px rgba(255, 200, 80, 0.45));
}

/* ——— Info header: language + responsible gaming ——— */
.info-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.info-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-chips button {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.btn.rg-open {
  padding: 7px 12px;
  font-size: 0.8rem;
}

/* ——— History replay ——— */
.replay-btn {
  border: 1px solid rgba(255, 210, 77, 0.55);
  background: rgba(255, 210, 77, 0.12);
  color: #ffd24d;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.replay-btn:hover {
  background: #ffd24d;
  color: #2a1050;
}

.replay-bar {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef4444, #991b1b);
  border: 2px solid #fecaca;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  font-family: var(--display);
  letter-spacing: 0.06em;
  color: #fff;
  white-space: nowrap;
  animation: replayPulse 1.6s ease-in-out infinite;
}

.replay-bar.hidden {
  display: none;
}

.replay-bar button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

@keyframes replayPulse {
  50% {
    box-shadow: 0 6px 26px rgba(239, 68, 68, 0.7);
  }
}

body.replaying .pp-side,
body.replaying .pp-spin {
  opacity: 0.45;
  pointer-events: none;
}

/* ——— Responsible gaming ——— */
.rg-stats {
  margin: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rg-lock {
  position: fixed;
  inset: 0;
  z-index: 44;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 4, 24, 0.86);
  backdrop-filter: blur(8px);
}

.rg-lock.hidden {
  display: none;
}

.rg-lock-card {
  max-width: 380px;
  text-align: center;
  background: #1c1033;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 24px;
}

.rg-lock-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.rg-lock-card p {
  margin: 0;
  font-weight: 800;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* ——— Controls layout ——— */
#app .pp-bar {
  margin-inline: -14px;
}

.pp-spin .spin-icon {
  width: 44%;
  height: 44%;
}

.pp-spin .spin-label {
  font-size: calc(var(--pp-spin) * 0.13);
}

/* Wide screens: the app spans the window so the buy panel and spin cluster sit beside the board */
@media (min-width: 700px) and (min-aspect-ratio: 5/4) {
  #app {
    position: relative;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .logo {
    font-size: 1.3rem;
  }
}

@media (max-width: 560px) {
  .pt-specials {
    grid-template-columns: 1fr;
  }
}

/* Short portrait screens (small phones): tighten the chrome so the board keeps its size */
@media (orientation: portrait) and (max-height: 740px) {
  #app {
    gap: 8px;
  }
}
