:root {
  --machine-width: 43rem;
  --machine-padding: clamp(0.9rem, 3vw, 1.5rem);
  --reel-height: 15.75rem;
  --reel-gap: clamp(0.45rem, 2vw, 1rem);
  --symbol-size: 3.2rem;
  --button-height: clamp(3.25rem, 9vw, 4.25rem);
  --marquee-title-slot: clamp(18rem, 55vw, 25rem);
  --language-control-width: 13.4rem;
  --portrait-caption-width: 6.5rem;
  --portrait-caption-height: 1.78rem;
  --paytable-header-width: 5.1rem;
  --paytable-item-height: 2.36rem;
  --color-background: #101010;
  --color-background-glow: #3a3a3a;
  --color-machine: #7d2730;
  --color-machine-dark: #202c2c;
  --color-reel: #fff8e7;
  --color-reel-edge: #263431;
  --color-accent: #c79c45;
  --color-accent-bright: #ffe8a3;
  --color-chrome: #d8d4ca;
  --color-text: #fff8e8;
  --color-ink: #1f241f;
  --color-muted: #dce9d2;
  --color-success: #76d18b;
  --color-near-miss: #9fc8ff;
  --color-loss: #d8d4ca;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-action: Impact, "Arial Black", ui-sans-serif, sans-serif;
  --page-background:
    radial-gradient(circle at 50% 8%, rgba(255, 232, 163, 0.14), transparent 24rem),
    radial-gradient(circle at 12% 72%, rgba(125, 39, 48, 0.18), transparent 18rem),
    linear-gradient(145deg, var(--color-background) 0%, var(--color-machine-dark) 47%, #090f0d 100%);
  --radius-large: 1.5rem;
  --radius-medium: 0.75rem;
  --radius-small: 0.45rem;
  --shadow-soft: 0 1.4rem 3rem rgba(0, 0, 0, 0.32);
  --shadow-strong: 0 2rem 5rem rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

.game-description {
  max-width: var(--machine-width);
  margin: 1rem auto 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

html {
  background: var(--color-background);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--color-text);
  font-family: var(--font-body);
  background: var(--page-background);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-top, 0px))
    max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-right, 0px))
    max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-bottom, 0px))
    max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-left, 0px));
}

.game-shell {
  width: min(100%, var(--machine-width));
  min-width: 0;
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 3.35rem;
  line-height: 1.08;
  white-space: nowrap;
}

.language-toggle {
  display: inline-grid;
  grid-template-columns: repeat(var(--language-option-count, 2), minmax(0, 1fr));
  width: min(100%, var(--language-control-width));
  min-inline-size: 0;
  justify-self: start;
  gap: 0.2rem;
  margin: 0;
  padding: 0.2rem;
  overflow: hidden;
  border: 0.12rem solid rgba(220, 166, 67, 0.68);
  border-radius: 99rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    #251719;
  box-shadow:
    inset 0 0.18rem 0.4rem rgba(0, 0, 0, 0.34),
    0 0.28rem 0.72rem rgba(0, 0, 0, 0.2);
}

.language-toggle__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-option {
  position: relative;
  display: grid;
  min-width: 0;
  min-inline-size: 0;
  min-height: 2rem;
  overflow: hidden;
  place-items: center;
  cursor: pointer;
}

.language-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.language-option__label {
  display: grid;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  place-items: center;
  padding: 0.32rem 0.34rem;
  border: 0.1rem solid transparent;
  border-radius: 99rem;
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.language-option__input:checked + .language-option__label {
  border-color: #ffe28a;
  color: #221314;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(135deg, #ffe28a, #f3bf45);
}

.language-option__input:focus-visible + .language-option__label {
  outline: 0.18rem solid #ffffff;
  outline-offset: 0.14rem;
}

.portrait-strip {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: clamp(0.85rem, 3vw, 1.35rem);
  margin: 0 auto clamp(0.75rem, 2.5vw, 1rem);
}

.portrait-card {
  display: grid;
  min-width: 0;
  justify-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
}

.portrait-card__image {
  display: block;
  width: clamp(4.4rem, 11vw, 5.8rem);
  height: clamp(4.4rem, 11vw, 5.8rem);
  object-fit: cover;
  border: 0.08rem solid var(--symbol-accent-color, rgba(220, 166, 67, 0.7));
  border-radius: 50%;
  background: #132823;
  box-shadow:
    0 0.12rem 0.38rem rgba(0, 0, 0, 0.28),
    0 0 0.5rem rgba(255, 232, 163, 0.22);
}

.portrait-card__caption {
  display: grid;
  width: var(--portrait-caption-width);
  min-height: var(--portrait-caption-height);
  margin-top: 0.32rem;
  place-items: start center;
  color: var(--color-accent-bright);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
}

.machine {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-width: 0;
  padding: var(--machine-padding);
  border: clamp(0.28rem, 1vw, 0.48rem) solid #451116;
  border-radius: var(--radius-large);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(145deg, var(--color-machine), #6c1f38 45%, var(--color-machine-dark));
  box-shadow:
    inset 0 0.28rem 0 rgba(255, 255, 255, 0.2),
    inset 0 -0.5rem 1rem rgba(0, 0, 0, 0.22),
    var(--shadow-strong);
}

.machine::before,
.machine::after {
  position: absolute;
  z-index: 0;
  top: 12%;
  bottom: clamp(10rem, 18vw, 15rem);
  width: clamp(0.4rem, 1.5vw, 0.7rem);
  border-radius: 99rem;
  background: linear-gradient(180deg, #f6e7bd, #908a80 48%, #fff5d8);
  box-shadow: inset 0 0 0.2rem rgba(0, 0, 0, 0.4);
  pointer-events: none;
  content: "";
}

.machine > :not(.celebration-layer) {
  position: relative;
  z-index: 1;
}

.machine::before {
  left: 0.45rem;
}

.machine::after {
  right: 0.45rem;
}

.celebration-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.celebration-token {
  position: absolute;
  top: var(--token-y);
  left: var(--token-x);
  width: 0.72rem;
  height: 0.72rem;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  animation: token-burst 920ms ease-out var(--token-delay) both;
}

.celebration-token--coin {
  border: 0.08rem solid #a86f17;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #fff4ba, transparent 31%),
    linear-gradient(135deg, #ffe28a, #dca643);
  box-shadow: 0 0 0.45rem rgba(255, 226, 138, 0.45);
}

.celebration-token--sparkle {
  border-radius: 50%;
  background: #fff8dc;
  box-shadow:
    0 0 0.5rem #ffe28a,
    0 0 1rem rgba(255, 226, 138, 0.5);
  animation-name: token-sparkle;
}

.machine.celebration-level-2 .reel-window.is-winning-reel,
.machine.celebration-level-3 .reel-window.is-winning-reel,
.machine.celebration-level-4 .reel-window.is-winning-reel {
  animation: win-reel-bounce 620ms cubic-bezier(0.22, 0.9, 0.22, 1);
}

.machine.celebration-level-1 .reel-window.is-winning-reel {
  border-color: #ffe28a;
  box-shadow:
    inset 0 0.8rem 1rem rgba(0, 0, 0, 0.14),
    inset 0 -0.8rem 1rem rgba(0, 0, 0, 0.12),
    0 0 0 0.1rem rgba(255, 226, 138, 0.58),
    0 0 1.2rem rgba(255, 226, 138, 0.45);
}

.machine.celebration-level-2 .reel-window.is-winning-reel {
  border-color: #fff4ba;
  box-shadow:
    inset 0 0.8rem 1rem rgba(0, 0, 0, 0.12),
    inset 0 -0.8rem 1rem rgba(0, 0, 0, 0.1),
    0 0 0 0.12rem rgba(118, 209, 139, 0.65),
    0 0 1.6rem rgba(255, 226, 138, 0.62);
}

.machine.celebration-level-3,
.machine.celebration-level-4 {
  animation: machine-win-pulse 860ms ease-out;
}

.machine.celebration-level-3 .reel-panel,
.machine.celebration-level-4 .reel-panel {
  box-shadow:
    inset 0 0.45rem 0.9rem rgba(0, 0, 0, 0.42),
    0 0 0 0.12rem rgba(255, 226, 138, 0.44),
    0 0.45rem 0 rgba(255, 222, 133, 0.18),
    0 0 1.8rem rgba(255, 226, 138, 0.35);
}

.machine.celebration-level-3 .reel-window.is-winning-reel {
  border-color: #ffe28a;
  box-shadow:
    inset 0 0.8rem 1rem rgba(0, 0, 0, 0.1),
    inset 0 -0.8rem 1rem rgba(0, 0, 0, 0.1),
    0 0 0 0.13rem rgba(255, 226, 138, 0.72),
    0 0 2rem rgba(255, 226, 138, 0.75);
}

.machine.celebration-level-4 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 22%),
    radial-gradient(circle at 50% 8%, rgba(255, 226, 138, 0.24), transparent 18rem),
    linear-gradient(145deg, #bd2d39, #7a1f3d 45%, var(--color-machine-dark));
}

.machine.celebration-level-4 .machine-top {
  animation: marquee-shine 980ms ease-out;
}

.machine.celebration-level-4 .reel-window.is-winning-reel {
  border-color: #fff8dc;
  box-shadow:
    inset 0 0.8rem 1rem rgba(0, 0, 0, 0.08),
    inset 0 -0.8rem 1rem rgba(0, 0, 0, 0.08),
    0 0 0 0.14rem rgba(255, 248, 220, 0.82),
    0 0 2.35rem rgba(255, 226, 138, 0.95);
}

.machine-top {
  display: grid;
  grid-template-columns: minmax(2.5rem, 1fr) minmax(0, var(--marquee-title-slot)) minmax(2.5rem, 1fr);
  align-items: center;
  gap: clamp(0.45rem, 2vw, 0.85rem);
  min-width: 0;
  margin-bottom: clamp(0.75rem, 3vw, 1rem);
  padding: clamp(0.55rem, 2.5vw, 0.85rem) clamp(0.8rem, 3vw, 1.2rem);
  border: 0.18rem solid #3f1216;
  border-radius: var(--radius-medium);
  color: var(--color-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 44%),
    linear-gradient(135deg, var(--color-accent-bright), var(--color-accent) 58%, #b83d45);
  box-shadow:
    inset 0 -0.24rem 0 rgba(0, 0, 0, 0.12),
    0 0.6rem 1.2rem rgba(0, 0, 0, 0.18);
}

.marquee-title {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  text-align: center;
  text-transform: none;
  text-overflow: clip;
  white-space: nowrap;
}

.marquee-light {
  display: block;
  width: 100%;
  height: 0.45rem;
  border-radius: 99rem;
  background: repeating-linear-gradient(
    90deg,
    #fff7d5 0 0.55rem,
    #9f2431 0.55rem 1.1rem,
    #17372f 1.1rem 1.65rem
  );
  box-shadow: inset 0 0.1rem 0 rgba(255, 255, 255, 0.45);
}

.reel-panel {
  position: relative;
  min-width: 0;
  padding: clamp(0.55rem, 2.8vw, 1rem);
  border: 0.28rem solid #2a1b1d;
  border-radius: var(--radius-medium);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
    #132823;
  box-shadow:
    inset 0 0.45rem 0.9rem rgba(0, 0, 0, 0.5),
    0 0.45rem 0 rgba(255, 222, 133, 0.18);
}

.reel-panel::before {
  position: absolute;
  top: 50%;
  right: clamp(0.8rem, 3vw, 1.35rem);
  left: clamp(0.8rem, 3vw, 1.35rem);
  z-index: 1;
  height: 0.18rem;
  border-radius: 99rem;
  background: rgba(255, 226, 138, 0.72);
  box-shadow: 0 0 0.65rem rgba(255, 226, 138, 0.45);
  content: "";
  transform: translateY(-50%);
}

.reels {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--reel-gap);
  width: 100%;
}

.reel-window {
  position: relative;
  min-width: 0;
  height: var(--reel-height);
  overflow: hidden;
  border: clamp(0.18rem, 1vw, 0.3rem) solid var(--color-reel-edge);
  border-radius: var(--radius-small);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 24%, rgba(0, 0, 0, 0.08) 74%),
    linear-gradient(90deg, rgba(255, 232, 163, 0.22), transparent 20%, transparent 80%, rgba(255, 232, 163, 0.2)),
    var(--color-reel);
  box-shadow:
    inset 0 0.8rem 1rem rgba(0, 0, 0, 0.18),
    inset 0 -0.8rem 1rem rgba(0, 0, 0, 0.16),
    0 0.55rem 0.95rem rgba(0, 0, 0, 0.25);
}

.reel-window::before,
.reel-window::after {
  position: absolute;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 28%;
  pointer-events: none;
  content: "";
}

.reel-window::before {
  top: 0;
  background: linear-gradient(180deg, rgba(41, 25, 23, 0.28), transparent);
}

.reel-window::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(41, 25, 23, 0.22), transparent);
}

.symbol-stack {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  transform: translateY(0);
  will-change: transform;
}

.symbol {
  display: grid;
  height: calc(var(--reel-height) / 3);
  min-height: calc(var(--reel-height) / 3);
  min-width: 0;
  flex: 0 0 calc(var(--reel-height) / 3);
  place-items: center;
  color: var(--color-ink);
  font-family: var(--font-action);
  font-size: var(--symbol-size);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0.08rem 0 #fff4cf,
    0 0.18rem 0 rgba(0, 0, 0, 0.12);
}

.symbol + .symbol {
  border-top: 1px solid rgba(48, 36, 38, 0.18);
}

.symbol--payline {
  color: #1c1112;
}

.symbol__image {
  display: block;
  width: min(82%, calc((var(--reel-height) / 3) - 0.55rem));
  height: min(82%, calc((var(--reel-height) / 3) - 0.55rem));
  border: 0.08rem solid var(--symbol-accent-color, rgba(220, 166, 67, 0.7));
  border-radius: 50%;
  object-fit: cover;
  background: #132823;
  box-shadow:
    0 0.12rem 0.38rem rgba(0, 0, 0, 0.28),
    0 0 0.5rem rgba(255, 232, 163, 0.22);
}

.reel-window.is-settled .symbol {
  animation: settle-pop 180ms ease-out;
}

.reel-window.is-spinning .symbol {
  text-shadow: none;
}

.payline-guide {
  position: absolute;
  top: 33.333%;
  right: 0;
  left: 0;
  z-index: 3;
  height: 33.333%;
  border-top: 1px solid rgba(95, 64, 15, 0.28);
  border-bottom: 1px solid rgba(95, 64, 15, 0.28);
  background:
    linear-gradient(90deg, rgba(243, 191, 69, 0.12), rgba(255, 247, 213, 0.34), rgba(243, 191, 69, 0.12));
  pointer-events: none;
}

.paytable {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
  margin-top: 0.68rem;
  padding: 0.42rem 0.5rem;
  border: 0.12rem solid rgba(220, 166, 67, 0.38);
  border-radius: var(--radius-small);
  color: var(--color-muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(16, 11, 12, 0.38);
  box-shadow: inset 0 0.18rem 0.38rem rgba(0, 0, 0, 0.22);
}

.paytable__header {
  display: grid;
  width: var(--paytable-header-width);
  min-width: var(--paytable-header-width);
  align-content: center;
  justify-items: start;
  gap: 0.16rem;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(255, 232, 163, 0.16);
}

.paytable__title {
  color: var(--color-accent-bright);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.paytable__bet {
  color: var(--color-muted);
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.paytable__list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.28rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paytable__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  min-height: var(--paytable-item-height);
  padding: 0.18rem 0.28rem;
  border: 0.08rem solid rgba(93, 58, 9, 0.74);
  border-radius: 0.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(55, 34, 38, 0.82);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.paytable__item > * {
  position: relative;
  z-index: 1;
}

.paytable__item::after {
  position: absolute;
  inset: -50% -70%;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 248, 220, 0.46), transparent 62%);
  transform: translateX(-48%) rotate(7deg);
  content: "";
  pointer-events: none;
}

.paytable__item--active {
  color: #fff8dc;
  animation: payout-card-pop 720ms cubic-bezier(0.2, 0.9, 0.22, 1);
}

.paytable__item--active::after {
  animation: payout-card-sheen 980ms ease-out both;
}

.paytable__item--celebration-1 {
  border-color: rgba(255, 226, 138, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 226, 138, 0.18), transparent),
    rgba(76, 48, 22, 0.86);
  box-shadow:
    0 0 0 0.08rem rgba(255, 226, 138, 0.28),
    0 0 0.88rem rgba(255, 226, 138, 0.34);
}

.paytable__item--celebration-2 {
  border-color: rgba(118, 209, 139, 0.78);
  background:
    linear-gradient(180deg, rgba(118, 209, 139, 0.18), transparent),
    rgba(30, 66, 44, 0.88);
  box-shadow:
    0 0 0 0.1rem rgba(118, 209, 139, 0.3),
    0 0 1.05rem rgba(118, 209, 139, 0.38),
    0 0 1.28rem rgba(255, 226, 138, 0.22);
}

.paytable__item--celebration-3 {
  border-color: rgba(255, 226, 138, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 226, 138, 0.26), transparent),
    rgba(90, 46, 17, 0.92);
  box-shadow:
    0 0 0 0.11rem rgba(255, 226, 138, 0.38),
    0 0 1.32rem rgba(255, 226, 138, 0.5);
}

.paytable__item--celebration-4 {
  border-color: rgba(255, 248, 220, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.3), transparent 58%),
    linear-gradient(135deg, rgba(160, 31, 44, 0.98), rgba(83, 29, 43, 0.94));
  box-shadow:
    0 0 0 0.12rem rgba(255, 248, 220, 0.34),
    0 0 1.55rem rgba(255, 226, 138, 0.58),
    0 0 2.15rem rgba(189, 45, 57, 0.34);
}

.paytable__item--active .paytable__symbol {
  border-color: rgba(255, 248, 220, 0.96);
  box-shadow: 0 0 0.55rem rgba(255, 226, 138, 0.46);
}

.paytable__marker {
  display: grid;
  width: 1.05rem;
  height: 1.05rem;
  place-items: center;
  color: var(--color-accent-bright);
  font-size: 0.48rem;
  font-weight: 900;
  line-height: 1;
}

.paytable__symbol {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  border: 0.04rem solid var(--symbol-accent-color, rgba(220, 166, 67, 0.62));
  border-radius: 50%;
  object-fit: cover;
  background: #132823;
}

.paytable__combo {
  display: grid;
  min-height: 1.58rem;
  min-width: 0;
  align-items: center;
  color: rgba(255, 248, 232, 0.9);
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1.04;
  text-align: left;
  text-wrap: balance;
}

.paytable__value {
  color: var(--color-accent-bright);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.money-panel {
  display: grid;
  grid-template-areas: "utility status play";
  grid-template-columns: minmax(12.2rem, 0.88fr) minmax(12.5rem, 1fr) minmax(13.2rem, 1fr);
  align-items: center;
  gap: clamp(0.65rem, 2vw, 1rem);
  min-width: 0;
  margin-top: 0.9rem;
  padding: clamp(0.68rem, 2vw, 0.9rem);
  border: 0.16rem solid #3c1115;
  border-radius: var(--radius-small);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    radial-gradient(circle at 72% 18%, rgba(255, 226, 138, 0.09), transparent 11rem),
    linear-gradient(135deg, #2a181b, #171112 62%, #112923);
  box-shadow:
    inset 0 0.24rem 0.55rem rgba(0, 0, 0, 0.34),
    inset 0 0 0 0.08rem rgba(255, 232, 163, 0.05);
}

.utility-controls,
.money-status,
.play-controls {
  display: grid;
  min-width: 0;
  align-content: center;
}

.utility-controls {
  grid-area: utility;
  justify-items: stretch;
  gap: 0.5rem;
}

.money-status {
  grid-area: status;
  justify-items: center;
  gap: 0.5rem;
}

.play-controls {
  grid-area: play;
  gap: 0.46rem;
  justify-items: stretch;
}

.bankroll {
  display: grid;
  min-height: 0;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 0;
  color: var(--color-text);
}

.bankroll__label {
  min-width: 4.8rem;
  color: var(--color-muted);
  font-size: clamp(0.58rem, 1.4vw, 0.68rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.bankroll__amount {
  color: var(--color-accent-bright);
  font-family: var(--font-display);
  font-size: clamp(1.44rem, 2.8vw, 1.9rem);
  font-weight: 900;
  line-height: 1.08;
}

.bankroll__values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  margin-top: 0.14rem;
}

.bankroll__bet {
  display: inline-grid;
  min-height: 1.35rem;
  place-items: center;
  padding: 0.18rem 0.48rem;
  border: 0.1rem solid #5d3a09;
  border-radius: 99rem;
  color: #221314;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(135deg, #ffe28a, #f3bf45);
}

.bankroll__bet[hidden] {
  display: none;
}

.bet-selector {
  display: grid;
  grid-template-columns: repeat(var(--fixed-bet-option-count, 3), minmax(2.68rem, 0.9fr)) minmax(4rem, 1.3fr);
  gap: 0.36rem;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
  border: 0;
}

.bet-selector__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bet-option {
  position: relative;
  display: grid;
  min-height: 2.08rem;
  min-width: 0;
  place-items: center;
  cursor: pointer;
}

.bet-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bet-option__label {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 2.08rem;
  min-width: 0;
  place-items: center;
  border: 0.13rem solid #5d3a09;
  border-radius: 0.58rem;
  color: var(--color-muted);
  font-size: clamp(0.82rem, 1.9vw, 0.98rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    #372226;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.bet-option__input:checked + .bet-option__label {
  border-color: #ffe28a;
  color: #221314;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(135deg, #ffe28a, #f3bf45);
}

.bet-option__label--all {
  font-size: clamp(0.66rem, 1.5vw, 0.86rem);
}

.bet-option__input:focus-visible + .bet-option__label {
  outline: 0.18rem solid #ffffff;
  outline-offset: 0.16rem;
}

.bet-option__input:disabled + .bet-option__label {
  cursor: not-allowed;
  filter: grayscale(0.45) brightness(0.75);
  opacity: 0.58;
}

.spin-button {
  width: 100%;
  min-width: 0;
  min-height: clamp(2.65rem, 5.2vw, 3rem);
  padding: 0 clamp(0.45rem, 2vw, 1rem);
  border: 0.13rem solid #5d3a09;
  border-radius: 0.68rem;
  color: #221314;
  cursor: pointer;
  font-family: var(--font-action);
  font-size: clamp(1.38rem, 3.4vw, 1.84rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(135deg, #ffe28a, #f3bf45 58%, #d69042);
  box-shadow:
    inset 0 0.12rem 0 rgba(255, 255, 255, 0.34),
    inset 0 -0.14rem 0 rgba(0, 0, 0, 0.12);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.spin-button:hover:not(:disabled) {
  border-color: #ffe28a;
  filter: brightness(1.03) saturate(1.04);
}

.spin-button:active:not(:disabled) {
  filter: brightness(0.96);
  box-shadow:
    inset 0 0.14rem 0.32rem rgba(0, 0, 0, 0.18),
    inset 0 -0.08rem 0 rgba(255, 255, 255, 0.18);
}

.spin-button:focus-visible {
  outline: 0.18rem solid #ffffff;
  outline-offset: 0.16rem;
}

.spin-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45) brightness(0.78);
  opacity: 0.78;
}

.sound-toggle {
  display: inline-grid;
  width: min(100%, var(--language-control-width));
  min-height: 2.36rem;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  padding: 0.18rem 0.32rem 0.18rem 0.58rem;
  border: 0.1rem solid rgba(220, 166, 67, 0.42);
  border-radius: 99rem;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    rgba(0, 0, 0, 0.17);
}

.sound-toggle__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  white-space: nowrap;
}

.sound-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sound-toggle__track {
  position: relative;
  display: block;
  width: 2.5rem;
  height: 1.4rem;
  border: 0.14rem solid #421114;
  border-radius: 99rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    #251719;
  box-shadow:
    inset 0 0.18rem 0.42rem rgba(0, 0, 0, 0.42),
    0 0.2rem 0.45rem rgba(0, 0, 0, 0.18);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.sound-toggle__thumb {
  position: absolute;
  top: 50%;
  left: 0.22rem;
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #ffffff, #d8d4ca);
  box-shadow:
    inset 0 -0.08rem 0 rgba(0, 0, 0, 0.16),
    0 0.18rem 0.34rem rgba(0, 0, 0, 0.32);
  transform: translate(0, -50%);
  transition: transform 180ms ease;
}

.sound-toggle__input:checked + .sound-toggle__track {
  border-color: #5d3a09;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 46%),
    linear-gradient(135deg, #ffe28a, #f3bf45);
}

.sound-toggle__input:checked + .sound-toggle__track .sound-toggle__thumb {
  transform: translate(1rem, -50%);
}

.sound-toggle__input:focus-visible + .sound-toggle__track {
  outline: 0.18rem solid #ffffff;
  outline-offset: 0.18rem;
}

.sound-toggle--disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.result-message {
  display: grid;
  width: min(100%, 14.5rem);
  block-size: clamp(2.5rem, 7vw, 3.55rem);
  place-items: center;
  min-width: 0;
  padding: 0.32rem 0.65rem;
  border: 0.08rem solid rgba(255, 232, 163, 0.18);
  border-radius: 0.48rem;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(0.74rem, 1.4vw, 0.88rem);
  font-weight: 900;
  line-height: 1.14;
  text-wrap: balance;
  overflow-wrap: anywhere;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0.16rem 0.38rem rgba(0, 0, 0, 0.18);
}

.result-message--celebration-1 {
  border-color: rgba(255, 226, 138, 0.48);
  color: #fff2b0;
  background:
    linear-gradient(180deg, rgba(255, 226, 138, 0.12), transparent),
    rgba(78, 45, 12, 0.24);
  box-shadow:
    inset 0 0.16rem 0.38rem rgba(0, 0, 0, 0.16),
    0 0 0.8rem rgba(255, 226, 138, 0.22);
}

.result-message--celebration-2 {
  border-color: rgba(118, 209, 139, 0.68);
  color: #dfffdc;
  background:
    linear-gradient(180deg, rgba(118, 209, 139, 0.18), transparent),
    rgba(23, 64, 41, 0.3);
  box-shadow:
    inset 0 0.16rem 0.38rem rgba(0, 0, 0, 0.16),
    0 0 1rem rgba(118, 209, 139, 0.26);
  animation: result-celebration-pop 420ms ease-out;
}

.result-message--celebration-3 {
  border-color: rgba(255, 226, 138, 0.78);
  color: #fff8dc;
  background:
    linear-gradient(180deg, rgba(255, 226, 138, 0.24), transparent),
    rgba(88, 42, 12, 0.38);
  box-shadow:
    inset 0 0.16rem 0.38rem rgba(0, 0, 0, 0.14),
    0 0 1.35rem rgba(255, 226, 138, 0.36);
  animation: result-celebration-pop 520ms ease-out;
}

.result-message--celebration-4 {
  border-color: rgba(255, 248, 220, 0.9);
  color: #fff8dc;
  font-size: clamp(0.84rem, 1.55vw, 1rem);
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.26), transparent),
    rgba(137, 34, 51, 0.44);
  box-shadow:
    inset 0 0.16rem 0.38rem rgba(0, 0, 0, 0.12),
    0 0 1.6rem rgba(255, 226, 138, 0.42);
  animation: result-celebration-pop 620ms ease-out;
}

.result-message--jackpot {
  color: #fff8dc;
  text-shadow: 0 0 0.75rem rgba(255, 226, 138, 0.55);
}

.result-message--small-win {
  color: var(--color-success);
}

.result-message--tiny-win {
  color: var(--color-accent-bright);
}

.result-message--near-miss {
  color: var(--color-near-miss);
}

.result-message--none {
  color: var(--color-loss);
}

.result-message--spinning {
  color: #bce6ff;
}

.result-message--refill {
  border-color: rgba(255, 226, 138, 0.54);
  color: #fff2b0;
  background:
    linear-gradient(180deg, rgba(255, 226, 138, 0.14), transparent),
    rgba(66, 36, 10, 0.24);
  box-shadow:
    inset 0 0.16rem 0.38rem rgba(0, 0, 0, 0.16),
    0 0 0.85rem rgba(255, 226, 138, 0.2);
}

.result-message--choice {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.18rem;
  padding-block: 0.22rem;
  place-items: center;
}

.result-message__text {
  display: block;
  max-width: 100%;
  min-width: 0;
  line-height: 1.06;
}

.result-message__actions {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.28rem;
  min-width: 0;
}

.result-message__button {
  min-width: 2.25rem;
  min-height: 1.02rem;
  padding: 0.12rem 0.42rem;
  border: 0.08rem solid rgba(255, 232, 163, 0.64);
  border-radius: 0.42rem;
  color: #211214;
  font: inherit;
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 48%),
    linear-gradient(135deg, #ffe28a, #f1b342);
  box-shadow: inset 0 -0.08rem 0 rgba(75, 41, 8, 0.22);
  cursor: pointer;
}

.result-message__button:hover {
  filter: brightness(1.05);
}

.result-message__button:focus-visible {
  outline: 0.16rem solid #ffffff;
  outline-offset: 0.12rem;
}

.legal-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.55rem;
  margin: clamp(0.8rem, 3vw, 1rem) auto 0;
  color: rgba(255, 248, 232, 0.76);
  font-size: 0.84rem;
  line-height: 1.4;
}

.copyright-notice,
.terms-notice {
  margin: 0;
}

.copyright-notice a,
.terms-notice a,
.site-credit a {
  color: inherit;
  font-weight: 800;
  text-underline-offset: 0.18em;
}

.copyright-notice a:hover,
.copyright-notice a:focus-visible,
.terms-notice a:hover,
.terms-notice a:focus-visible,
.site-credit a:hover,
.site-credit a:focus-visible {
  color: var(--color-accent-bright);
}

.copyright-notice a:focus-visible,
.terms-notice a:focus-visible,
.site-credit a:focus-visible {
  outline: 0.14rem solid rgba(255, 255, 255, 0.92);
  outline-offset: 0.16rem;
  border-radius: 0.18rem;
}

.legal-document {
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 4vw, 3rem);
}

.legal-document__body {
  width: min(100%, 50rem);
  margin: 0 auto;
  padding: clamp(1.1rem, 4vw, 2rem);
  border: 0.16rem solid rgba(220, 166, 67, 0.52);
  border-radius: var(--radius-medium);
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 16rem),
    rgba(20, 17, 18, 0.88);
}

.legal-document h1 {
  white-space: normal;
}

.legal-document h2 {
  margin: 1.6rem 0 0.45rem;
  color: var(--color-accent-bright);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  line-height: 1.15;
}

.legal-document p,
.legal-document li {
  color: rgba(255, 248, 232, 0.84);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.58;
}

.legal-document ul {
  padding-left: 1.25rem;
}

.legal-document a {
  color: var(--color-accent-bright);
  font-weight: 800;
  text-underline-offset: 0.18em;
}

.legal-document__eyebrow,
.legal-document__updated {
  margin: 0 0 0.35rem;
  color: rgba(255, 248, 232, 0.68);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.legal-document__summary {
  margin-top: 0.8rem;
  color: rgba(255, 248, 232, 0.9);
  font-size: clamp(0.98rem, 2.8vw, 1.08rem);
}

.legal-document__notice {
  margin: 1.2rem 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 232, 163, 0.34);
  border-radius: var(--radius-small);
  background: rgba(255, 232, 163, 0.08);
}

.legal-document__footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 232, 163, 0.2);
}

.site-credit,
.legal-document .site-credit {
  margin: 0;
  color: rgba(255, 248, 232, 0.76);
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: center;
}

.legal-line .site-credit {
  flex-basis: 100%;
  padding-top: 0.2rem;
}

.legal-document__footer .site-credit {
  margin-top: 0.6rem;
}

.legal-document .site-credit a {
  color: inherit;
}

.legal-document .site-credit a:hover,
.legal-document .site-credit a:focus-visible {
  color: var(--color-accent-bright);
}

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 4;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 0.15rem solid var(--color-accent);
  border-radius: var(--radius-small);
  color: var(--color-text);
  text-align: center;
  background: #251719;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes settle-pop {
  0% {
    transform: scale(0.92);
  }

  60% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes win-reel-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  36% {
    transform: translateY(-0.18rem);
  }

  68% {
    transform: translateY(0.08rem);
  }
}

@keyframes machine-win-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.012);
  }
}

@keyframes result-celebration-pop {
  0% {
    transform: scale(0.98);
  }

  58% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes payout-card-pop {
  0% {
    transform: scale(0.985);
  }

  44% {
    transform: scale(1.035);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes payout-card-sheen {
  0% {
    opacity: 0;
    transform: translateX(-48%) rotate(7deg);
  }

  28% {
    opacity: 0.86;
  }

  100% {
    opacity: 0;
    transform: translateX(48%) rotate(7deg);
  }
}

@keyframes marquee-shine {
  0%,
  100% {
    filter: brightness(1);
  }

  45% {
    filter: brightness(1.14) saturate(1.12);
  }
}

@keyframes token-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -10%) scale(0.45);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -155%) scale(1) rotate(28deg);
  }
}

@keyframes token-sparkle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -95%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -130%) scale(0.65);
  }
}

@media (max-width: 480px) {
  :root {
    --machine-padding: 0.74rem;
    --reel-height: 9.15rem;
    --symbol-size: 1.96rem;
    --marquee-title-slot: clamp(12rem, 66vw, 14.4rem);
    --portrait-caption-width: 4.6rem;
    --portrait-caption-height: 1.45rem;
    --paytable-item-height: 3.05rem;
  }

  .page-shell {
    align-items: start;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding:
      max(0.62rem, env(safe-area-inset-top, 0px))
      max(0.55rem, env(safe-area-inset-right, 0px))
      max(0.8rem, env(safe-area-inset-bottom, 0px))
      max(0.55rem, env(safe-area-inset-left, 0px));
  }

  h1 {
    font-size: 1.72rem;
  }

  .portrait-strip {
    grid-area: portraits;
    grid-template-columns: repeat(3, minmax(0, auto));
    align-items: center;
    justify-content: end;
    gap: 0.24rem;
    margin: 0;
  }

  .portrait-card__image {
    width: clamp(2.48rem, 10.8vw, 2.95rem);
    height: clamp(2.48rem, 10.8vw, 2.95rem);
  }

  .portrait-card__caption {
    display: none;
  }

  .marquee-title {
    font-size: 1.12rem;
    line-height: 1.08;
  }

  html[lang="vi"] .marquee-title {
    font-size: 0.94rem;
  }

  .machine-top {
    grid-area: top;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 0;
    padding: 0.48rem 0.6rem;
    border-width: 0.14rem;
  }

  .marquee-light {
    display: none;
  }

  .machine::before,
  .machine::after {
    display: none;
  }

  .machine {
    display: grid;
    grid-template-areas:
      "top portraits"
      "reels reels"
      "paytable paytable"
      "money money";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.52rem;
    row-gap: 0.72rem;
    border-width: 0.24rem;
  }

  .reel-panel {
    grid-area: reels;
    padding: 0.68rem;
    border-width: 0.22rem;
  }

  .spin-button {
    font-size: 1.45rem;
  }

  .paytable {
    grid-area: paytable;
    grid-template-columns: 1fr;
    gap: 0.46rem;
    margin-top: 0;
    padding: 0.48rem;
  }

  .paytable__header {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    padding-right: 0;
    padding-bottom: 0.42rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 232, 163, 0.16);
  }

  .paytable__list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(9.35rem, 11rem);
    grid-template-columns: none;
    grid-template-rows: repeat(1, minmax(var(--paytable-item-height), auto));
    gap: 0.3rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 0.06rem;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
  }

  .paytable__list::-webkit-scrollbar {
    display: none;
  }

  .paytable__item {
    min-height: var(--paytable-item-height);
    padding: 0.24rem 0.34rem;
    scroll-snap-align: start;
  }

  .paytable__combo {
    min-height: 1.45rem;
    font-size: 0.66rem;
    line-height: 1.08;
  }

  .paytable__marker,
  .paytable__symbol {
    width: 1.08rem;
    height: 1.08rem;
  }

  .paytable__value {
    font-size: 0.78rem;
  }

  .money-panel {
    grid-area: money;
    grid-template-areas:
      "status"
      "play"
      "utility";
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 0;
    padding: 0.62rem;
    border-width: 0.14rem;
  }

  .utility-controls {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: 0.44rem;
  }

  .language-toggle {
    width: 100%;
    min-height: 3.05rem;
    justify-self: stretch;
  }

  .language-option {
    min-height: 2.4rem;
  }

  .language-option__label {
    font-size: 0.72rem;
  }

  .sound-toggle {
    width: 100%;
    min-width: 0;
    min-height: 3.05rem;
    justify-self: stretch;
    gap: 0.34rem;
    padding: 0.2rem 0.34rem 0.2rem 0.5rem;
    font-size: 0.72rem;
  }

  .money-status {
    grid-template-columns: minmax(5.85rem, 0.72fr) minmax(0, 1.28fr);
    align-items: center;
    gap: 0.48rem;
    justify-items: stretch;
  }

  .bankroll {
    justify-items: center;
  }

  .bankroll__label {
    font-size: 0.72rem;
  }

  .bankroll__amount {
    font-size: 1.72rem;
  }

  .bankroll__bet {
    font-size: 0.68rem;
    padding: 0.16rem 0.36rem;
  }

  .bet-selector {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
  }

  .bet-option,
  .bet-option__label {
    min-height: 3.05rem;
  }

  .bet-option__label {
    border-width: 0.1rem;
    border-radius: 0.42rem;
    font-size: clamp(0.98rem, 4.8vw, 1.1rem);
  }

  .bet-option__label--all {
    font-size: clamp(0.78rem, 3.9vw, 0.9rem);
  }

  .spin-button {
    min-height: 3.25rem;
    border-radius: 0.5rem;
    font-size: 1.72rem;
  }

  .result-message {
    width: 100%;
    block-size: 3.15rem;
    padding: 0.32rem 0.52rem;
    font-size: 1rem;
  }

  .result-message--choice {
    block-size: 4rem;
    grid-template-rows: minmax(1.68rem, auto) auto;
    gap: 0.16rem;
    padding: 0.28rem 0.44rem;
    font-size: 0.88rem;
  }

  .sound-toggle__track {
    width: 2.34rem;
    height: 1.34rem;
    border-width: 0.12rem;
  }

  .sound-toggle__thumb {
    width: 0.84rem;
    height: 0.84rem;
  }

  .sound-toggle__input:checked + .sound-toggle__track .sound-toggle__thumb {
    transform: translate(0.96rem, -50%);
  }

  .result-message__button {
    min-height: 1.08rem;
    padding-inline: 0.42rem;
    font-size: 0.52rem;
  }

  .legal-line {
    max-width: 21rem;
    margin-top: 0.9rem;
    font-size: 0.78rem;
    line-height: 1.32;
  }
}

@media (max-width: 430px) {
  .utility-controls {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    justify-items: stretch;
  }

  .language-toggle,
  .sound-toggle {
    width: 100%;
  }

  .language-option__label {
    font-size: 0.66rem;
  }

  html[lang="vi"] .marquee-title {
    font-size: 0.88rem;
  }
}

@media (max-width: 360px) {
  :root {
    --portrait-caption-width: 4.15rem;
    --portrait-caption-height: 1.35rem;
    --paytable-item-height: 2.78rem;
  }

  h1 {
    font-size: 1.54rem;
  }

  .money-panel {
    gap: 0.48rem;
    padding: 0.48rem;
  }

  .language-option {
    min-width: 0;
    min-height: 2.18rem;
  }

  .language-option__label {
    padding: 0.24rem 0.18rem;
    font-size: 0.6rem;
  }

  .sound-toggle {
    width: 100%;
    min-width: 0;
    gap: 0.24rem;
    padding-left: 0.34rem;
    font-size: 0.6rem;
  }

  .sound-toggle__track {
    width: 2.04rem;
    height: 1.2rem;
  }

  .sound-toggle__thumb {
    width: 0.74rem;
    height: 0.74rem;
  }

  .sound-toggle__input:checked + .sound-toggle__track .sound-toggle__thumb {
    transform: translate(0.78rem, -50%);
  }

  .bet-option,
  .bet-option__label {
    min-height: 2.75rem;
  }

  .paytable__list {
    gap: 0.24rem;
    grid-auto-columns: minmax(8.4rem, 9.8rem);
  }

  .paytable__item {
    padding: 0.22rem 0.28rem;
  }

  .paytable__combo {
    font-size: 0.62rem;
  }

  .paytable__value {
    font-size: 0.74rem;
  }

  .result-message {
    font-size: 0.9rem;
  }

  .result-message--choice {
    block-size: 3.95rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 320px) {
  :root {
    --machine-padding: 0.52rem;
    --reel-height: 7.65rem;
    --reel-gap: 0.26rem;
    --symbol-size: 1.5rem;
    --marquee-title-slot: clamp(10.2rem, 70vw, 12.4rem);
    --portrait-caption-width: 3.9rem;
    --portrait-caption-height: 1.24rem;
    --paytable-item-height: 2.42rem;
    --radius-large: 1rem;
    --radius-medium: 0.58rem;
    --radius-small: 0.36rem;
  }

  .page-shell {
    padding: 0.52rem;
  }

  .machine {
    border-width: 0.22rem;
    column-gap: 0.32rem;
    row-gap: 0.42rem;
  }

  .machine-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 0;
    padding: 0.32rem 0.34rem;
    border-width: 0.14rem;
  }

  .marquee-title {
    font-size: 0.86rem;
  }

  html[lang="vi"] .marquee-title {
    font-size: 0.74rem;
  }

  .portrait-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.12rem;
    margin: 0;
  }

  .portrait-card__image {
    width: 2.02rem;
    height: 2.02rem;
  }

  .portrait-card__caption {
    display: none;
  }

  .reel-panel {
    padding: 0.42rem;
    border-width: 0.2rem;
  }

  .reel-panel::before {
    right: 0.52rem;
    left: 0.52rem;
    height: 0.12rem;
  }

  .symbol__image {
    width: min(84%, calc((var(--reel-height) / 3) - 0.34rem));
    height: min(84%, calc((var(--reel-height) / 3) - 0.34rem));
  }

  .paytable {
    gap: 0.3rem;
    margin-top: 0;
    padding: 0.32rem;
  }

  .paytable__header {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding-right: 0;
    padding-bottom: 0.34rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 232, 163, 0.16);
  }

  .paytable__title {
    font-size: 0.62rem;
  }

  .paytable__bet {
    font-size: 0.54rem;
  }

  .paytable__list {
    grid-auto-columns: minmax(6.8rem, 8rem);
    gap: 0.2rem;
  }

  .paytable__item {
    gap: 0.14rem;
    padding: 0.16rem 0.18rem;
  }

  .paytable__marker,
  .paytable__symbol {
    width: 0.92rem;
    height: 0.92rem;
  }

  .paytable__marker {
    font-size: 0.42rem;
  }

  .paytable__combo {
    min-height: 1.18rem;
    font-size: 0.58rem;
    line-height: 1.02;
  }

  .paytable__value {
    font-size: 0.68rem;
  }

  .money-panel {
    margin-top: 0;
    padding: 0.3rem;
    border-width: 0.12rem;
  }

  .money-status {
    grid-template-columns: minmax(4.75rem, 0.68fr) minmax(0, 1.32fr);
    gap: 0.26rem;
  }

  .bankroll__label {
    min-width: 0;
    font-size: 0.58rem;
  }

  .bankroll__amount {
    font-size: 1.34rem;
  }

  .language-toggle {
    padding: 0.16rem;
  }

  .language-option {
    min-width: 0;
    min-height: 2.18rem;
  }

  .language-option__label {
    padding: 0.22rem 0.16rem;
    font-size: 0.52rem;
  }

  .sound-toggle {
    min-height: 2.55rem;
    font-size: 0.52rem;
  }

  .bet-option,
  .bet-option__label {
    min-height: 2.55rem;
  }

  .bet-option__label {
    font-size: 0.78rem;
  }

  .bet-option__label--all {
    font-size: 0.6rem;
  }

  .spin-button {
    min-height: 2.7rem;
    font-size: 1.22rem;
  }

  .result-message {
    block-size: 2.8rem;
    padding: 0.28rem 0.42rem;
    font-size: 0.74rem;
  }

  .result-message--choice {
    block-size: 3.9rem;
    gap: 0.14rem;
    padding-block: 0.2rem;
    font-size: 0.66rem;
  }

  .result-message__button {
    min-width: 2.35rem;
    min-height: 1.2rem;
    padding-inline: 0.3rem;
    font-size: 0.54rem;
  }

  .legal-line {
    max-width: 16rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) and (min-height: 900px) {
  .page-shell {
    align-items: start;
    padding:
      max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.55rem, env(safe-area-inset-right, 0px))
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(0.55rem, env(safe-area-inset-left, 0px));
  }
}

@media (max-width: 480px) and (max-height: 820px) {
  :root {
    --machine-padding: 0.62rem;
    --reel-height: 8.55rem;
    --symbol-size: 1.82rem;
    --paytable-item-height: 2.82rem;
  }

  .page-shell {
    padding:
      max(0.24rem, env(safe-area-inset-top, 0px))
      max(0.42rem, env(safe-area-inset-right, 0px))
      max(0.42rem, env(safe-area-inset-bottom, 0px))
      max(0.42rem, env(safe-area-inset-left, 0px));
  }

  .machine {
    row-gap: 0.52rem;
  }

  .language-toggle,
  .sound-toggle,
  .bet-option,
  .bet-option__label,
  .spin-button {
    min-height: 2.8rem;
  }

  .language-option {
    min-height: 2.18rem;
  }

  .result-message {
    block-size: 2.85rem;
  }

  .result-message--choice {
    block-size: 3.78rem;
  }
}

@media (max-width: 480px) and (max-height: 740px) {
  :root {
    --machine-padding: 0.42rem;
    --reel-height: 7.35rem;
    --symbol-size: 1.54rem;
    --paytable-item-height: 2.52rem;
  }

  .page-shell {
    padding:
      max(0.18rem, env(safe-area-inset-top, 0px))
      max(0.34rem, env(safe-area-inset-right, 0px))
      max(0.34rem, env(safe-area-inset-bottom, 0px))
      max(0.34rem, env(safe-area-inset-left, 0px));
  }

  .machine {
    row-gap: 0.4rem;
  }

  .paytable__list {
    grid-template-rows: repeat(1, minmax(var(--paytable-item-height), auto));
    grid-auto-columns: minmax(7.75rem, 9rem);
  }

  .language-toggle,
  .sound-toggle,
  .bet-option,
  .bet-option__label,
  .spin-button {
    min-height: 2.58rem;
  }

  .language-option {
    min-height: 2rem;
  }

  .result-message {
    block-size: 2.62rem;
  }

  .result-message--choice {
    block-size: 3.72rem;
  }
}

@media (max-width: 480px) and (max-height: 660px) {
  :root {
    --machine-padding: 0.34rem;
    --reel-height: 6.72rem;
    --symbol-size: 1.34rem;
    --paytable-item-height: 2.32rem;
  }

  .page-shell {
    padding:
      max(0.12rem, env(safe-area-inset-top, 0px))
      max(0.28rem, env(safe-area-inset-right, 0px))
      max(0.28rem, env(safe-area-inset-bottom, 0px))
      max(0.28rem, env(safe-area-inset-left, 0px));
  }

  .machine {
    row-gap: 0.32rem;
  }

  .language-toggle,
  .sound-toggle,
  .bet-option,
  .bet-option__label,
  .spin-button {
    min-height: 2.36rem;
  }

  .language-option {
    min-height: 1.7rem;
  }

  .result-message {
    block-size: 2.42rem;
  }

  .result-message--choice {
    block-size: 3.6rem;
    font-size: 0.62rem;
  }
}

@media (min-width: 481px) and (max-width: 760px) {
  :root {
    --reel-height: 12.5rem;
    --symbol-size: 2.55rem;
    --marquee-title-slot: clamp(14rem, 55vw, 18rem);
    --portrait-caption-width: 5.7rem;
    --portrait-caption-height: 1.6rem;
    --paytable-item-height: 2.28rem;
  }

  h1 {
    font-size: 2.55rem;
  }

  .portrait-card__caption {
    font-size: 0.76rem;
  }

  .marquee-title {
    font-size: 1.55rem;
  }

  .spin-button {
    min-height: 2.75rem;
    font-size: 1.75rem;
  }

  .bet-option,
  .bet-option__label,
  .language-toggle,
  .sound-toggle {
    min-height: 2.75rem;
  }

  .language-option {
    min-height: 2.18rem;
  }

  .paytable {
    grid-template-columns: 1fr;
  }

  .paytable__header {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    padding-right: 0;
    padding-bottom: 0.36rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 232, 163, 0.16);
  }

  .paytable__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .money-panel {
    grid-template-areas:
      "status"
      "play"
      "utility";
    grid-template-columns: 1fr;
    gap: 0.68rem;
  }

  .utility-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 0.55rem;
  }

  .language-toggle,
  .sound-toggle {
    width: 100%;
    justify-self: stretch;
  }

  .result-message {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .spin-button,
  .reel-window.is-settled .symbol,
  .machine.is-celebrating,
  .machine.is-celebrating .machine-top,
  .machine.is-celebrating .reel-window,
  .result-message,
  .paytable__item--active,
  .paytable__item--active::after,
  .celebration-token {
    transition-duration: 1ms;
    animation-duration: 1ms;
  }

  .reel-window.is-spinning .symbol-stack {
    opacity: 0.88;
  }

  .machine.is-celebrating,
  .machine.is-celebrating .reel-window,
  .result-message,
  .paytable__item--active {
    transform: none;
  }

  .paytable__item--active::after {
    opacity: 0.2;
    transform: none;
  }

  .celebration-token {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(0.75);
  }
}
