:root {
  color-scheme: dark;
  --ink: #f7f2e8;
  --muted: #aeb8b5;
  --panel: rgba(8, 10, 14, 0.72);
  --panel-strong: rgba(14, 15, 20, 0.88);
  --edge: rgba(255, 255, 255, 0.22);
  --edge-hot: rgba(255, 186, 76, 0.66);
  --cyan: #4df2ff;
  --magenta: #ff4ca8;
  --amber: #ffb443;
  --green: #9bff75;
  --red: #ff5d5d;
  --blue: #6ea8ff;
  --shadow: rgba(0, 0, 0, 0.58);
  --home-vw: 100vw;
  --font-display: "Arial Black", "Segoe UI", "Trebuchet MS", sans-serif;
  --font-pixel: "Consolas", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: clip;
  scroll-behavior: auto;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 76, 168, 0.22), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(77, 242, 255, 0.16), transparent 24%),
    linear-gradient(145deg, #06070a 0%, #111013 44%, #080b0d 100%);
  font-family: "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

body.is-player-open {
  overflow: hidden;
}

body.is-message-open {
  overflow: hidden;
}

body.is-player-open .topbar,
body.is-player-open .site-footer {
  display: none;
}

.three-background {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -4;
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 76, 168, 0.16), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(77, 242, 255, 0.12), transparent 24%),
    linear-gradient(145deg, #06070a 0%, #111013 44%, #080b0d 100%);
}

body.three-fallback .three-background {
  display: none;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.background-plate {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    radial-gradient(circle at 16% 28%, rgba(255, 76, 168, 0.12), transparent 30%),
    radial-gradient(circle at 74% 14%, rgba(77, 242, 255, 0.1), transparent 27%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.82));
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.015);
}

body.three-fallback .background-plate {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.86)),
    url("assets/lost-games-hero.png");
}

body.three-ready .background-plate {
  background-image:
    radial-gradient(circle at 16% 28%, rgba(255, 76, 168, 0.16), transparent 30%),
    radial-gradient(circle at 74% 14%, rgba(77, 242, 255, 0.13), transparent 27%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.82));
  filter: none;
  transform: none;
}

.background-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 4, 6, 0.82), rgba(5, 8, 11, 0.24) 45%, rgba(0, 0, 0, 0.76)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 19px);
}

.scanline {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0.12;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.2) 0,
    rgba(255, 255, 255, 0.2) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 5, 8, 0.68);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.26);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.case-flip-button {
  position: relative;
  width: clamp(210px, 18vw, 280px);
  height: 54px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(5, 6, 9, 0.82);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.2),
    0 0 26px rgba(77, 242, 255, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.case-flip-button::before,
.case-flip-button::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
}

.case-flip-button::before {
  background:
    linear-gradient(105deg, transparent 0 34%, rgba(255, 255, 255, 0.64) 48%, transparent 62% 100%),
    radial-gradient(circle at 23% 48%, rgba(255, 76, 168, 0.36), transparent 36%),
    radial-gradient(circle at 78% 48%, rgba(77, 242, 255, 0.28), transparent 36%);
  mix-blend-mode: screen;
  transform: translateX(-120%);
}

.case-flip-button::after {
  border: 1px solid rgba(77, 242, 255, 0.78);
  border-radius: inherit;
  box-shadow:
    inset 0 0 28px rgba(77, 242, 255, 0.28),
    0 0 34px rgba(255, 76, 168, 0.35),
    0 0 52px rgba(77, 242, 255, 0.22);
}

.case-flip-button:hover,
.case-flip-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 180, 67, 0.58);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.25),
    0 0 30px rgba(77, 242, 255, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.32);
}

.case-flip-button.is-firing::before {
  animation: caseButtonSweep 620ms ease-out;
}

.case-flip-button.is-firing::after {
  animation: caseButtonPulse 620ms ease-out;
}

.case-flip-button-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  filter: saturate(1.08) contrast(1.08);
}

.brand-device {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(77, 242, 255, 0.16), rgba(255, 76, 168, 0.1)),
    rgba(6, 8, 11, 0.86);
  box-shadow:
    inset 0 0 18px rgba(77, 242, 255, 0.12),
    0 0 24px rgba(255, 76, 168, 0.16);
  overflow: hidden;
}

.brand-device::before,
.brand-device::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.brand-device::before {
  top: 8px;
}

.brand-device::after {
  bottom: 8px;
}

.brand-disc {
  position: absolute;
  width: 26px;
  height: 26px;
  left: 6px;
  top: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.82) 0 18%, rgba(255, 255, 255, 0.9) 19% 23%, transparent 24%),
    conic-gradient(from 30deg, #4df2ff, #ff4ca8, #ffb443, #f7f2e8, #4df2ff);
  box-shadow: 0 0 16px rgba(77, 242, 255, 0.28);
}

.brand-reel {
  position: absolute;
  bottom: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.72) 0 27%, rgba(255, 255, 255, 0.75) 28% 35%, rgba(50, 55, 64, 0.92) 36%),
    repeating-conic-gradient(rgba(255, 255, 255, 0.7) 0 12deg, rgba(255, 255, 255, 0.06) 12deg 28deg);
}

.brand-reel-a {
  right: 18px;
}

.brand-reel-b {
  right: 5px;
}

.brand-code {
  color: rgba(247, 242, 232, 0.8);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 180, 67, 0.28);
}

.brand-logo {
  display: block;
  width: clamp(176px, 23vw, 318px);
  height: auto;
  filter:
    drop-shadow(0 0 18px rgba(77, 242, 255, 0.24))
    drop-shadow(0 0 20px rgba(255, 76, 168, 0.18));
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03)),
    rgba(13, 15, 19, 0.82);
  box-shadow:
    inset 0 0 20px rgba(77, 242, 255, 0.14),
    0 0 28px rgba(255, 76, 168, 0.18);
  overflow: hidden;
}

.brand-mark .disc {
  position: absolute;
  width: 30px;
  height: 30px;
  left: 5px;
  top: 5px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 16%, rgba(255, 255, 255, 0.78) 17% 19%, transparent 20%),
    conic-gradient(from 10deg, #7df9ff, #ff4ca8, #ffb443, #f7f2e8, #7df9ff);
  opacity: 0.92;
}

.tape-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  bottom: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 25%, rgba(0, 0, 0, 0.55) 27% 34%, rgba(255, 255, 255, 0.72) 35% 39%, rgba(52, 56, 64, 0.95) 40%);
}

.tape-dot-a {
  right: 17px;
}

.tape-dot-b {
  right: 4px;
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.transport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 7, 10, 0.82);
}

.transport-button,
.exit-home,
.retro-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(15, 17, 22, 0.9);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.transport-button {
  width: 42px;
  height: 38px;
  border-radius: 6px;
}

.message-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  border-color: rgba(77, 242, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(77, 242, 255, 0.12), rgba(255, 76, 168, 0.06)),
    rgba(6, 9, 12, 0.94);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 12px rgba(77, 242, 255, 0.08),
    0 0 18px rgba(77, 242, 255, 0.12);
}

.message-trigger:hover,
.message-trigger:focus-visible {
  transform: translate(-50%, -50%);
  border-color: var(--cyan);
  background:
    linear-gradient(180deg, rgba(77, 242, 255, 0.2), rgba(255, 76, 168, 0.1)),
    rgba(6, 9, 12, 0.98);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.2),
    inset 0 0 14px rgba(77, 242, 255, 0.12),
    0 0 22px rgba(77, 242, 255, 0.3);
  outline: none;
}

.message-terminal-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 18px;
  border: 2px solid var(--cyan);
  border-radius: 3px;
  background:
    linear-gradient(90deg, var(--green) 0 36%, transparent 36%) 4px 5px / 12px 2px no-repeat,
    linear-gradient(90deg, rgba(77, 242, 255, 0.76) 0 72%, transparent 72%) 4px 10px / 15px 2px no-repeat,
    #071116;
  box-shadow:
    inset 0 0 7px rgba(77, 242, 255, 0.2),
    0 0 7px rgba(77, 242, 255, 0.32);
}

.message-terminal-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 4px;
  width: 2px;
  height: 4px;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
  animation: terminal-cursor 900ms steps(1, end) infinite;
}

.message-terminal-icon span {
  position: absolute;
  left: 6px;
  bottom: -5px;
  width: 10px;
  height: 3px;
  border: solid rgba(77, 242, 255, 0.82);
  border-width: 0 2px 2px;
}

@keyframes terminal-cursor {
  50% { opacity: 0; }
}

.language-switcher {
  position: relative;
}

.language-trigger {
  font-size: 0;
  line-height: 1;
}

.flag-icon,
[data-language-current] {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    0 0 8px rgba(0, 0, 0, 0.42);
  vertical-align: middle;
}

[data-language-current] {
  font-size: 0;
}

[data-language-current].flag-icon::before,
.language-menu .flag-icon::before {
  content: none;
}

[data-language-current]::before,
.language-menu button::before {
  content: "";
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.flag-us,
[data-language-current][data-flag="us"]::before,
.language-menu button[data-language-option="en"]::before {
  background:
    linear-gradient(90deg, #254a9b 0 42%, transparent 42%),
    repeating-linear-gradient(180deg, #c83d3d 0 7.69%, #f8f8f4 7.69% 15.38%);
}

.flag-mx,
[data-language-current][data-flag="mx"]::before,
.language-menu button[data-language-option="es"]::before {
  background:
    radial-gradient(circle at 50% 50%, #b57f2a 0 9%, transparent 10%),
    linear-gradient(90deg, #138a45 0 33.33%, #f8f8f4 33.33% 66.66%, #c73535 66.66%);
}

.flag-fr,
[data-language-current][data-flag="fr"]::before,
.language-menu button[data-language-option="fr"]::before {
  background: linear-gradient(90deg, #244aa5 0 33.33%, #f8f8f4 33.33% 66.66%, #d63b3b 66.66%);
}

.flag-br,
[data-language-current][data-flag="br"]::before,
.language-menu button[data-language-option="pt"]::before {
  background:
    radial-gradient(circle at 50% 50%, #254a9b 0 18%, transparent 19%),
    linear-gradient(35deg, transparent 39%, #ffd84a 40% 60%, transparent 61%),
    linear-gradient(145deg, transparent 39%, #ffd84a 40% 60%, transparent 61%),
    #18964f;
}

.flag-jp,
[data-language-current][data-flag="jp"]::before,
.language-menu button[data-language-option="ja"]::before {
  background:
    radial-gradient(circle at 50% 50%, #c73535 0 28%, transparent 29%),
    #f8f8f4;
}

.flag-cn {
  background:
    radial-gradient(circle at 24% 28%, #ffd54d 0 9%, transparent 10%),
    radial-gradient(circle at 38% 17%, #ffd54d 0 3%, transparent 4%),
    radial-gradient(circle at 44% 29%, #ffd54d 0 3%, transparent 4%),
    radial-gradient(circle at 42% 43%, #ffd54d 0 3%, transparent 4%),
    #d9252e;
}

.flag-cz {
  background:
    linear-gradient(146deg, #244aa5 0 39%, transparent 40%),
    linear-gradient(180deg, #f8f8f4 0 50%, #d63b3b 50%);
}

.flag-vg {
  background:
    radial-gradient(circle at 73% 52%, #f8f8f4 0 10%, #ffd54d 11% 15%, transparent 16%),
    linear-gradient(135deg, transparent 0 29%, #f8f8f4 30% 35%, #c73535 36% 43%, #f8f8f4 44% 49%, transparent 50%),
    linear-gradient(45deg, transparent 0 29%, #f8f8f4 30% 35%, #c73535 36% 43%, #f8f8f4 44% 49%, transparent 50%),
    linear-gradient(90deg, #142b69 0 44%, #244aa5 44%);
}

.flag-in {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 10%, #244aa5 11% 14%, transparent 15%),
    linear-gradient(180deg, #f19532 0 33.33%, #f8f8f4 33.33% 66.66%, #18894b 66.66%);
}

.flag-ru {
  background: linear-gradient(180deg, #f8f8f4 0 33.33%, #244aa5 33.33% 66.66%, #c73535 66.66%);
}

.flag-ca {
  background:
    radial-gradient(circle at 50% 50%, #d12f35 0 11%, transparent 12%),
    linear-gradient(90deg, #d12f35 0 25%, #f8f8f4 25% 75%, #d12f35 75%);
}

.flag-gb {
  background:
    linear-gradient(33deg, transparent 0 42%, #f8f8f4 43% 48%, #c73535 49% 53%, #f8f8f4 54% 59%, transparent 60%),
    linear-gradient(147deg, transparent 0 42%, #f8f8f4 43% 48%, #c73535 49% 53%, #f8f8f4 54% 59%, transparent 60%),
    linear-gradient(90deg, transparent 0 41%, #f8f8f4 42% 45%, #c73535 46% 54%, #f8f8f4 55% 58%, transparent 59%),
    linear-gradient(180deg, transparent 0 35%, #f8f8f4 36% 41%, #c73535 42% 58%, #f8f8f4 59% 64%, transparent 65%),
    #142b69;
}

.flag-sc {
  background:
    linear-gradient(146deg, transparent 0 58%, #18894b 59%),
    linear-gradient(128deg, transparent 0 50%, #f8f8f4 51%),
    linear-gradient(108deg, transparent 0 43%, #d9252e 44%),
    linear-gradient(86deg, transparent 0 36%, #ffd54d 37%),
    #244aa5;
}

.flag-se {
  background:
    linear-gradient(90deg, transparent 0 30%, #ffd54d 31% 43%, transparent 44%),
    linear-gradient(180deg, transparent 0 40%, #ffd54d 41% 57%, transparent 58%),
    #24589b;
}

.flag-nl {
  background: linear-gradient(180deg, #b52635 0 33.33%, #f8f8f4 33.33% 66.66%, #244aa5 66.66%);
}

.flag-de {
  background: linear-gradient(180deg, #111111 0 33.33%, #d9252e 33.33% 66.66%, #ffd54d 66.66%);
}

.flag-ro {
  background: linear-gradient(90deg, #244aa5 0 33.33%, #ffd54d 33.33% 66.66%, #d9252e 66.66%);
}

[data-language-current].flag-icon::before,
.language-menu button:has(.flag-icon)::before {
  content: none;
  display: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)),
    rgba(5, 6, 9, 0.94);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 16px 32px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(77, 242, 255, 0.16);
  backdrop-filter: blur(14px);
}

.language-menu[hidden] {
  display: none;
}

.language-menu button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0;
}

.language-menu button:hover,
.language-menu button:focus-visible {
  border-color: rgba(255, 180, 67, 0.62);
  background: rgba(255, 180, 67, 0.14);
  outline: none;
}

.case-flip-button {
  width: 42px;
  height: 38px;
  border-radius: 6px;
}

.case-flip-button-image {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  object-position: left center;
  opacity: 0.95;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 12px rgba(77, 242, 255, 0.14);
}

.transport-button-hot {
  border-color: rgba(255, 180, 67, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 180, 67, 0.24), rgba(255, 76, 168, 0.12)),
    rgba(24, 17, 16, 0.94);
}

.transport-button:not(.message-trigger):hover,
.transport-button:not(.message-trigger):focus-visible,
.exit-home:hover,
.exit-home:focus-visible,
.retro-button:hover,
.retro-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--edge-hot);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(255, 180, 67, 0.18);
  outline: none;
}

.icon-play,
.icon-stop,
.icon-grid {
  display: inline-block;
  width: 16px;
  height: 16px;
  position: relative;
}

.icon-play::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.icon-stop::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: currentColor;
}

.icon-grid::before {
  content: "";
  position: absolute;
  inset: 2px;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 6px 6px no-repeat,
    linear-gradient(currentColor 0 0) 10px 0 / 6px 6px no-repeat,
    linear-gradient(currentColor 0 0) 0 10px / 6px 6px no-repeat,
    linear-gradient(currentColor 0 0) 10px 10px / 6px 6px no-repeat;
}

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 54px;
}

.hero {
  position: relative;
  min-height: 216px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 18px;
  padding: 34px 0 28px;
  text-align: center;
}

.hero-copy {
  width: min(100%, 760px);
  max-width: 760px;
}

.hero-logo-title {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  width: min(100%, 720px);
  margin: 0;
  line-height: 0;
}

.hero-logo-title::before,
.hero-logo-title::after {
  content: "";
  pointer-events: none;
  position: absolute;
}

.hero-logo-title::before {
  z-index: -1;
  inset: -28% -10%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 31% 52%, rgba(255, 76, 168, 0.42), transparent 42%),
    radial-gradient(ellipse at 70% 45%, rgba(77, 242, 255, 0.42), transparent 44%),
    linear-gradient(90deg, rgba(255, 180, 67, 0.12), rgba(255, 76, 168, 0.18), rgba(77, 242, 255, 0.16));
  filter: blur(18px) saturate(1.2);
  opacity: 0.72;
  transform: scaleX(0.96);
  mix-blend-mode: screen;
  animation: logoAuraPulse 4.8s ease-in-out infinite;
}

.hero-logo-title::after {
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(
      104deg,
      transparent 0 34%,
      rgba(255, 255, 255, 0.1) 40%,
      rgba(255, 255, 255, 0.92) 47%,
      rgba(77, 242, 255, 0.62) 51%,
      rgba(255, 76, 168, 0.48) 55%,
      transparent 64% 100%
    );
  filter: blur(0.2px);
  mix-blend-mode: screen;
  opacity: 0;
  background-size: 260% 100%;
  background-position: -150% 0;
  animation: logoGlistenSweep 4.6s cubic-bezier(0.34, 0.02, 0.2, 1) infinite;
}

.hero-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  margin: 0 auto;
  height: auto;
  filter:
    drop-shadow(0 8px 34px rgba(255, 76, 168, 0.28))
    drop-shadow(0 0 34px rgba(77, 242, 255, 0.2));
  animation: logoNeonEmission 4.8s ease-in-out infinite;
}

.kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.7;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 180, 67, 0.42);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.8),
    0 8px 40px rgba(255, 76, 168, 0.28),
    0 0 34px rgba(77, 242, 255, 0.14);
}

.hero-line {
  max-width: 630px;
  margin: 22px 0 0;
  color: #d7ddd8;
  font-size: 18px;
  line-height: 1.65;
}

.deck-meter {
  position: absolute;
  right: 0;
  top: 50%;
  display: grid;
  gap: 7px;
  width: 46px;
  transform: translateY(-50%);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 7, 10, 0.72);
  box-shadow: inset 0 0 24px rgba(77, 242, 255, 0.1);
}

.deck-meter span {
  display: block;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(155, 255, 117, 0.5);
  animation: meterPulse 1.8s infinite ease-in-out;
}

.deck-meter span:nth-child(2) {
  animation-delay: 120ms;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(77, 242, 255, 0.48);
}

.deck-meter span:nth-child(3) {
  animation-delay: 240ms;
  background: var(--blue);
}

.deck-meter span:nth-child(4) {
  animation-delay: 360ms;
  background: var(--amber);
}

.deck-meter span:nth-child(5) {
  animation-delay: 480ms;
  background: var(--magenta);
}

.deck-meter span:nth-child(6) {
  animation-delay: 600ms;
  background: var(--red);
}

@keyframes meterPulse {
  0%, 100% {
    opacity: 0.38;
    transform: scaleX(0.72);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes logoAuraPulse {
  0%,
  100% {
    opacity: 0.58;
    transform: scaleX(0.94) scaleY(0.9);
    filter: blur(18px) saturate(1.05);
  }

  42% {
    opacity: 0.92;
    transform: scaleX(1.04) scaleY(1);
    filter: blur(23px) saturate(1.32);
  }

  64% {
    opacity: 0.74;
    transform: scaleX(0.99) scaleY(0.96);
  }
}

@keyframes logoNeonEmission {
  0%,
  100% {
    filter:
      drop-shadow(0 8px 34px rgba(255, 76, 168, 0.3))
      drop-shadow(0 0 34px rgba(77, 242, 255, 0.2))
      brightness(1)
      saturate(1.02);
  }

  44% {
    filter:
      drop-shadow(0 10px 42px rgba(255, 76, 168, 0.48))
      drop-shadow(0 0 48px rgba(77, 242, 255, 0.42))
      drop-shadow(0 0 14px rgba(255, 255, 255, 0.18))
      brightness(1.12)
      saturate(1.22);
  }

  58% {
    filter:
      drop-shadow(0 9px 36px rgba(255, 76, 168, 0.38))
      drop-shadow(0 0 40px rgba(77, 242, 255, 0.3))
      brightness(1.06)
      saturate(1.14);
  }
}

@keyframes logoGlistenSweep {
  0%,
  54% {
    opacity: 0;
    background-position: -150% 0;
  }

  61% {
    opacity: 0.68;
  }

  76% {
    opacity: 0.44;
    background-position: 150% 0;
  }

  84%,
  100% {
    opacity: 0;
    background-position: 150% 0;
  }
}

@keyframes caseButtonSweep {
  0% {
    opacity: 0;
    transform: translateX(-120%);
  }

  34% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes caseButtonPulse {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes caseShelfFlash {
  0% {
    opacity: 0;
    transform: translateX(-34%) skewX(-10deg);
  }

  32% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translateX(34%) skewX(-10deg);
  }
}

.game-selection {
  padding: 14px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  perspective: 1200px;
}

.game-grid::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 8;
  inset: -16px;
  border-radius: 10px;
  background:
    linear-gradient(105deg, transparent 0 24%, rgba(255, 255, 255, 0.5) 39%, rgba(77, 242, 255, 0.26) 45%, rgba(255, 76, 168, 0.18) 52%, transparent 68% 100%);
  opacity: 0;
  mix-blend-mode: screen;
  transform: translateX(-28%) skewX(-10deg);
}

.game-grid.is-flip-fx::before {
  animation: caseShelfFlash 760ms ease-out;
}

.game-card {
  position: relative;
  min-width: 0;
  padding: 12px 12px 14px 22px;
  --case-a: rgba(77, 242, 255, 0.28);
  --case-b: rgba(255, 76, 168, 0.2);
  --case-c: rgba(255, 180, 67, 0.18);
  --shell-line: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 9% 16%, var(--case-a), transparent 23%),
    radial-gradient(circle at 88% 82%, var(--case-b), transparent 26%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 30%, rgba(77, 242, 255, 0.08) 61%, rgba(0, 0, 0, 0.24)),
    repeating-linear-gradient(90deg, var(--shell-line) 0 1px, transparent 1px 20px),
    rgba(9, 10, 14, 0.76);
  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 0 0 4px rgba(255, 255, 255, 0.025),
    inset -12px 0 rgba(255, 255, 255, 0.035),
    0 24px 70px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
  perspective: 980px;
  contain: layout paint style;
}

.game-card[data-game-id="bubblebat"] {
  order: 7;
  --case-a: rgba(65, 214, 255, 0.36);
  --case-b: rgba(42, 129, 255, 0.16);
  --case-c: rgba(155, 255, 117, 0.12);
}

.game-card[data-game-id="plash"] {
  order: 2;
  --case-a: rgba(255, 76, 168, 0.28);
  --case-b: rgba(111, 86, 255, 0.2);
  --case-c: rgba(77, 242, 255, 0.12);
}

.game-card[data-game-id="match-race"] {
  order: 3;
  --case-a: rgba(255, 180, 67, 0.28);
  --case-b: rgba(255, 93, 93, 0.18);
  --case-c: rgba(77, 242, 255, 0.12);
}

.game-card[data-game-id="sticker-hex"] {
  order: 4;
  --case-a: rgba(111, 168, 255, 0.3);
  --case-b: rgba(255, 118, 178, 0.18);
  --case-c: rgba(155, 255, 117, 0.13);
}

.game-card[data-game-id="uski"] {
  order: 5;
  --case-a: rgba(77, 242, 255, 0.25);
  --case-b: rgba(255, 255, 255, 0.15);
  --case-c: rgba(255, 180, 67, 0.12);
}

.game-card[data-game-id="zippa"] {
  order: 6;
  --case-a: rgba(77, 242, 255, 0.36);
  --case-b: rgba(255, 76, 168, 0.2);
  --case-c: rgba(111, 86, 255, 0.14);
}

.game-card[data-game-id="bytefall-protocol-demo"] {
  order: 1;
  --case-a: rgba(53, 217, 255, 0.34);
  --case-b: rgba(248, 120, 248, 0.2);
  --case-c: rgba(248, 184, 0, 0.12);
}

.game-card[data-game-id="gauntlet-blitz"] {
  order: 8;
  --case-a: rgba(66, 239, 255, 0.36);
  --case-b: rgba(255, 56, 184, 0.24);
  --case-c: rgba(255, 231, 74, 0.16);
}

.game-card[data-game-id="wordventure"] {
  order: 9;
  --case-a: rgba(255, 169, 194, 0.34);
  --case-b: rgba(154, 188, 224, 0.24);
  --case-c: rgba(255, 219, 132, 0.2);
}

.game-card[data-game-id="desktop-demolition"] {
  order: 10;
  --case-a: rgba(39, 151, 255, 0.38);
  --case-b: rgba(255, 151, 22, 0.28);
  --case-c: rgba(95, 255, 112, 0.16);
}

.game-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 7px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px calc(100% - 1px), rgba(0, 0, 0, 0.34) calc(100% - 1px)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px calc(100% - 1px), rgba(0, 0, 0, 0.36) calc(100% - 1px)),
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(255, 255, 255, 0.028) 12px 13px),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(0, 0, 0, 0.16) 28px 29px);
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.035),
    inset 0 0 70px rgba(0, 0, 0, 0.28);
}

.game-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 8%, rgba(255, 255, 255, 0.19) 9%, transparent 11%),
    linear-gradient(75deg, transparent 58%, rgba(77, 242, 255, 0.13) 60%, transparent 64%);
  opacity: 0.55;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(77, 242, 255, 0.48);
  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.22),
    inset -12px 0 rgba(255, 255, 255, 0.04),
    0 28px 80px rgba(0, 0, 0, 0.44),
    0 0 34px rgba(77, 242, 255, 0.12);
}

.game-grid.layout-display {
  width: min(920px, 100%);
  margin-inline: auto;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 22px;
}

.game-grid.layout-rack {
  width: min(780px, 100%);
  margin-inline: auto;
  grid-template-columns: 1fr;
  gap: 12px;
}

.game-grid.layout-rack .game-card {
  padding: 10px 12px 10px 22px;
}

.game-grid.layout-rack .game-card-front {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr);
  grid-template-areas:
    "preview label"
    "tape label";
  gap: 12px 16px;
  align-items: stretch;
}

.game-grid.layout-rack .preview-window {
  grid-area: preview;
}

.game-grid.layout-rack .cassette-face {
  grid-area: tape;
  height: 68px;
  margin: 0 2px;
  align-self: end;
}

.game-grid.layout-rack .label-strip {
  grid-area: label;
  min-height: 100%;
  align-content: end;
}

.game-grid.is-layout-fx .game-card {
  animation: layoutCasePop 320ms ease-out;
}

.game-card-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  transform-style: preserve-3d;
  transition: transform 980ms cubic-bezier(0.18, 0.72, 0.12, 1);
}

.case-backs-visible .game-card-inner {
  transform: rotateY(180deg) rotateZ(1turn);
}

.game-card-face {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.game-card-front {
  position: relative;
}

.case-backs-visible .game-card-front {
  pointer-events: none;
}

.game-card-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 34%, rgba(77, 242, 255, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 16px),
    rgba(3, 5, 8, 0.9);
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.08),
    inset 0 0 70px rgba(77, 242, 255, 0.08);
  overflow: hidden;
  transform: rotateY(180deg);
}

.game-card-back::before,
.game-card-back::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.game-card-back::before {
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.22), transparent 19%, transparent 74%, rgba(255, 255, 255, 0.12)),
    linear-gradient(90deg, rgba(77, 242, 255, 0.12), transparent 18%, transparent 82%, rgba(255, 76, 168, 0.1));
  mix-blend-mode: screen;
}

.game-card-back::after {
  z-index: 3;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 6px),
    linear-gradient(100deg, transparent 0 42%, rgba(255, 255, 255, 0.22) 48%, transparent 55% 100%);
  opacity: 0.28;
}

.case-back-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(77, 242, 255, 0.1);
}

.zippa-bonus-back {
  padding: 8px;
}

.zippa-snakenspace-button {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 10px 10px 10px 24px;
  border: 1px solid rgba(255, 214, 72, 0.52);
  border-radius: 6px;
  color: rgba(247, 242, 232, 0.96);
  background:
    linear-gradient(140deg, rgba(255, 214, 72, 0.16), rgba(77, 242, 255, 0.07) 44%, rgba(255, 76, 168, 0.08)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 20px),
    rgba(8, 9, 14, 0.92);
  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.16),
    inset -10px 0 rgba(255, 255, 255, 0.035),
    inset 0 0 34px rgba(255, 214, 72, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.zippa-bonus-cassette {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 64px auto;
  gap: 10px;
  align-items: stretch;
  overflow: hidden;
}

.zippa-bonus-cassette .case-spine {
  left: 0;
}

.zippa-bonus-cassette .preview-window {
  min-height: 0;
}

.zippa-bonus-cassette .preview-video,
.zippa-bonus-cassette .preview-window video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.18) contrast(1.1) brightness(1.02);
}

.zippa-bonus-cassette .cassette-face {
  height: 64px;
  margin: 0 2px;
}

.zippa-bonus-cassette .label-strip {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: end;
  min-height: 92px;
  gap: 5px;
}

.zippa-bonus-stamp {
  position: relative;
  z-index: 2;
  justify-self: start;
  padding: 4px 7px 3px;
  border: 1px solid rgba(255, 214, 72, 0.72);
  border-radius: 3px;
  color: rgba(255, 214, 72, 0.96);
  font-family: var(--font-pixel);
  font-size: clamp(7px, 0.78vw, 9px);
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-2deg);
  background:
    linear-gradient(90deg, rgba(255, 214, 72, 0.16), rgba(255, 76, 168, 0.12)),
    rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 0 10px rgba(255, 214, 72, 0.08),
    0 0 12px rgba(255, 214, 72, 0.14);
}

.zippa-bonus-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1;
  letter-spacing: 0;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(255, 214, 72, 0.3),
    0 2px rgba(0, 0, 0, 0.7);
}

.zippa-bonus-genre {
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.zippa-bonus-cassette .zippa-bonus-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(0.86);
}

.zippa-snakenspace-button:hover,
.zippa-snakenspace-button:focus-visible {
  border-color: rgba(255, 214, 72, 0.86);
  outline: none;
  box-shadow:
    inset 1px 1px rgba(255, 255, 255, 0.18),
    inset -10px 0 rgba(255, 255, 255, 0.045),
    inset 0 0 34px rgba(255, 214, 72, 0.14),
    0 0 30px rgba(255, 214, 72, 0.18),
    0 14px 30px rgba(0, 0, 0, 0.44);
}

.game-grid.layout-rack .zippa-bonus-cassette {
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr);
  grid-template-rows: auto 68px;
  grid-template-areas:
    "preview label"
    "tape label";
  gap: 12px 16px;
}

.game-grid.layout-rack .zippa-bonus-cassette .preview-window {
  grid-area: preview;
}

.game-grid.layout-rack .zippa-bonus-cassette .cassette-face {
  grid-area: tape;
  height: 68px;
  align-self: end;
}

.game-grid.layout-rack .zippa-bonus-cassette .label-strip {
  grid-area: label;
  min-height: 100%;
  grid-template-rows: 1fr auto auto auto;
}

.game-grid.layout-rack .zippa-bonus-cassette .cassette-tips > span {
  position: relative;
  display: block;
  padding-left: 14px;
}

.game-grid.layout-rack .zippa-bonus-cassette .cassette-tips > span::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--cyan);
}

.game-card.is-reserved {
  filter: saturate(0.78);
}

.case-spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-pixel);
  font-size: 7px;
  background:
    radial-gradient(circle at 50% 16px, rgba(255, 255, 255, 0.34) 0 2px, transparent 3px),
    radial-gradient(circle at 50% calc(100% - 16px), rgba(255, 255, 255, 0.24) 0 2px, transparent 3px),
    linear-gradient(180deg, var(--case-a), var(--case-b)),
    repeating-linear-gradient(180deg, transparent 0 9px, rgba(255, 255, 255, 0.14) 9px 10px),
    rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 1px 0 rgba(255, 255, 255, 0.18),
    inset -1px 0 rgba(0, 0, 0, 0.42);
}

.case-spine span {
  writing-mode: vertical-rl;
}

.preview-window {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0 7px, transparent 7px calc(100% - 7px), rgba(0, 0, 0, 0.38) calc(100% - 7px)),
    radial-gradient(circle at 50% 50%, rgba(77, 242, 255, 0.12), transparent 42%),
    linear-gradient(180deg, #06080b, #101015);
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.34),
    inset 0 0 0 6px rgba(255, 255, 255, 0.025),
    inset 0 0 24px rgba(0, 0, 0, 0.62),
    0 12px 30px rgba(0, 0, 0, 0.32),
    0 0 22px rgba(77, 242, 255, 0.08);
}

.preview-window::before,
.preview-window::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.preview-window::before {
  inset: 7px;
  border: 1px solid rgba(77, 242, 255, 0.18);
  border-radius: 4px;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.58),
    inset 0 0 26px rgba(77, 242, 255, 0.08);
}

.preview-window::after {
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 4px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 50%, rgba(255, 93, 93, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 12px 50%, rgba(155, 255, 117, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 2px) 50%, var(--case-a) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 0 30px, rgba(255, 255, 255, 0.28) 30px 58%, transparent 58%);
  opacity: 0.78;
}

.asciline-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.preview-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.18) contrast(1.12) brightness(0.96);
  transform: scale(1.035);
  transition: opacity 120ms ease;
}

.preview-still {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.08);
}

.game-card[data-game-id="sticker-hex"] .preview-still,
.game-card[data-game-id="sticker-hex"] .case-back-image {
  object-fit: contain;
  object-position: center;
}

.game-card[data-game-id="uski"] .preview-video {
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 242, 255, 0.12), transparent 48%),
    linear-gradient(180deg, #05070a, #111116);
}

.has-video .asciline-canvas {
  display: block;
}

body.use-video-previews .preview-video {
  display: block;
}

body.use-video-previews .preview-video.is-preview-ready {
  opacity: 1;
}

body.use-video-previews .has-video .asciline-canvas {
  display: none;
}

body.use-asciline-previews .preview-video {
  display: none;
}

body.use-asciline-previews .has-video .asciline-canvas {
  display: block;
}

.preview-glass {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 9%, transparent 91%, rgba(0, 0, 0, 0.28)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 20%, transparent 68%, rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: 0.46;
}

.play-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.32),
    0 0 32px rgba(77, 242, 255, 0.22),
    0 14px 32px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
  z-index: 2;
}

.preview-window:hover .play-overlay,
.play-overlay:focus-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.play-overlay:hover {
  background: rgba(255, 180, 67, 0.28);
}

.play-triangle {
  position: absolute;
  left: 29px;
  top: 22px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 20px solid currentColor;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.44));
}

.preview-window.is-locked {
  cursor: default;
}

.preview-window.is-locked .preview-video {
  filter: saturate(1.28) contrast(1.16) brightness(0.9);
}

.coming-soon-sticker {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  min-width: min(78%, 245px);
  padding: 10px 18px 9px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(255, 76, 168, 0.96), rgba(77, 242, 255, 0.92)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.16) 0 8px, transparent 8px 16px);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.56),
    0 3px 0 rgba(5, 8, 14, 0.86),
    0 0 22px rgba(255, 76, 168, 0.36);
  font-family: var(--font-display);
  font-size: clamp(16px, 2.1vw, 26px);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 10px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -50%) rotate(-8deg);
  pointer-events: none;
}

.coming-soon-sticker::before,
.coming-soon-sticker::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(6, 8, 14, 0.8);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.36);
  transform: translateY(-50%);
}

.coming-soon-sticker::before {
  left: 7px;
}

.coming-soon-sticker::after {
  right: 7px;
}

.cassette-face {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  height: 82px;
  margin: 12px 4px 10px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background:
    radial-gradient(circle at 13% 18%, rgba(255, 255, 255, 0.16) 0 4px, transparent 5px),
    radial-gradient(circle at 87% 18%, rgba(255, 255, 255, 0.12) 0 4px, transparent 5px),
    radial-gradient(circle at 13% 82%, rgba(0, 0, 0, 0.28) 0 4px, transparent 5px),
    radial-gradient(circle at 87% 82%, rgba(0, 0, 0, 0.28) 0 4px, transparent 5px),
    linear-gradient(90deg, transparent 0 8%, rgba(0, 0, 0, 0.24) 8% 9%, transparent 9% 91%, rgba(0, 0, 0, 0.24) 91% 92%, transparent 92%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 42%, rgba(0, 0, 0, 0.22)),
    linear-gradient(120deg, var(--case-a), transparent 24%, transparent 74%, var(--case-b)),
    linear-gradient(90deg, transparent 0 14%, rgba(255, 255, 255, 0.1) 14% 15%, transparent 15% 85%, rgba(255, 255, 255, 0.1) 85% 86%, transparent 86%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 9px),
    rgba(0, 0, 0, 0.36);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    inset 0 0 0 3px rgba(255, 255, 255, 0.028),
    inset 0 -16px rgba(0, 0, 0, 0.2),
    0 9px 18px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.cassette-face::before,
.cassette-face::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 38%, rgba(0, 0, 0, 0.55) 39% 47%, transparent 48%),
    radial-gradient(circle, rgba(255, 255, 255, 0.88) 0 18%, rgba(150, 160, 170, 0.8) 20% 58%, rgba(0, 0, 0, 0.48) 60%);
  box-shadow:
    0 50px 0 rgba(215, 225, 224, 0.2),
    0 50px 0 1px rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(0, 0, 0, 0.18);
}

.cassette-face::before {
  left: 11px;
  top: 8px;
}

.cassette-face::after {
  right: 11px;
  top: 8px;
}

.spool {
  position: relative;
  align-self: center;
  justify-self: center;
  z-index: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.82) 0 13%, rgba(255, 255, 255, 0.88) 14% 17%, transparent 18% 31%, rgba(0, 0, 0, 0.58) 32% 35%, transparent 36%),
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.82) 0 7deg, rgba(255, 255, 255, 0.08) 7deg 15deg, rgba(0, 0, 0, 0.22) 15deg 19deg),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.22), transparent 32%),
    rgba(12, 13, 17, 0.9);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.5),
    inset 0 0 0 3px rgba(255, 255, 255, 0.05),
    0 0 0 4px rgba(0, 0, 0, 0.25),
    0 0 14px rgba(255, 255, 255, 0.08);
  animation: spoolSpin 8s linear infinite;
}

.spool::before,
.spool::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.spool::after {
  inset: 18px;
  border-style: solid;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 58%),
    rgba(0, 0, 0, 0.42);
}

.spool-right {
  animation-duration: 7.2s;
  animation-direction: reverse;
}

@keyframes spoolSpin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes layoutCasePop {
  0% {
    opacity: 0.72;
    transform: translateY(6px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tape-window {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 50%;
  height: 22px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(255, 255, 255, 0.16) 0 12%, transparent 13%),
    radial-gradient(ellipse at 82% 50%, rgba(255, 255, 255, 0.12) 0 12%, transparent 13%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(255, 180, 67, 0.45) 42%, rgba(255, 76, 168, 0.42) 57%, rgba(0, 0, 0, 0.7)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 8px),
    rgba(6, 7, 10, 0.72);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.62),
    inset 0 1px rgba(255, 255, 255, 0.2),
    0 1px rgba(255, 255, 255, 0.08);
}

.tape-window::before,
.tape-window::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 32%;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(20, 12, 8, 0.8);
  box-shadow: 0 3px rgba(255, 255, 255, 0.08);
}

.tape-window::before {
  left: -18%;
}

.tape-window::after {
  right: -18%;
}

.label-strip {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07)),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(255, 255, 255, 0.12) 17px 18px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 13px),
    rgba(8, 9, 12, 0.74);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    inset 0 -10px rgba(0, 0, 0, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.cassette-tips {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-grid.layout-rack .label-strip {
  grid-template-rows: 1fr auto auto;
  align-content: stretch;
}

.game-grid.layout-rack .cassette-tips {
  align-self: start;
  display: grid;
  gap: clamp(8px, 1vw, 12px);
  margin: clamp(20px, 3vw, 34px) 0 auto;
  color: rgba(246, 249, 244, 0.88);
  font-family: var(--font-pixel);
  font-size: clamp(9px, 0.95vw, 12px);
  line-height: 1.3;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.82),
    0 0 10px rgba(77, 242, 255, 0.18);
}

.game-grid.layout-rack .cassette-tips li {
  position: relative;
  padding-left: 14px;
}

.game-grid.layout-rack .cassette-tips li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: rgba(255, 180, 67, 0.95);
}

.label-strip::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  top: 8px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--case-a), var(--magenta) 44%, var(--amber));
  opacity: 0.86;
  box-shadow: 0 0 12px var(--case-b);
}

.label-strip::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 10px 12px 8px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.09) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 42%, rgba(0, 0, 0, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 84%, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px),
    linear-gradient(110deg, transparent 0 48%, rgba(255, 255, 255, 0.07) 52%, transparent 57% 100%);
  opacity: 0.86;
}

.label-strip h3,
.label-strip p,
.cassette-new-badge,
.label-strip .cassette-tips {
  position: relative;
  z-index: 2;
}

.label-strip h3 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 0 14px var(--case-a);
}

.label-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.cassette-new-badge {
  display: block;
  width: 92px;
  max-width: 58%;
  height: auto;
  margin-top: -2px;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 10px rgba(255, 76, 168, 0.28));
}

.game-grid.layout-rack .cassette-new-badge {
  width: 104px;
  max-width: 46%;
  margin-top: 3px;
}

.embedded-game-view,
.player-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 28px;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 76, 168, 0.16), transparent 30%),
    radial-gradient(circle at 78% 8%, rgba(77, 242, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.86));
}

.embedded-game-view[hidden],
.player-view[hidden] {
  display: none;
}

.embedded-topline,
.player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.exit-home,
.retro-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 6px;
  text-transform: uppercase;
}

.now-playing {
  text-align: right;
  display: grid;
  justify-items: end;
  gap: 4px;
  max-width: min(34vw, 420px);
}

.now-playing h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.embedded-game-logo {
  display: block;
  width: clamp(180px, 24vw, 360px);
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  object-position: right center;
  filter:
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 18px rgba(77, 242, 255, 0.16));
}

.embedded-stage {
  align-self: center;
  justify-self: center;
  width: min(1040px, 100%);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(4, 5, 8, 0.82);
  box-shadow:
    inset 0 0 60px rgba(77, 242, 255, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.embedded-canvas,
.embedded-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: #020308;
  image-rendering: pixelated;
  outline: none;
  touch-action: none;
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.72);
}

.embedded-frame {
  height: min(58vw, 585px);
  max-height: calc(100vh - 188px);
}

.embedded-frame.is-square-frame {
  justify-self: center;
  width: min(100%, 640px, calc(100vh - 188px));
  height: auto;
  max-height: none;
  aspect-ratio: 1;
}

.embedded-canvas[hidden],
.embedded-frame[hidden] {
  display: none;
}

.embedded-canvas.is-paper-canvas {
  justify-self: center;
  width: min(100%, 860px);
  aspect-ratio: 4 / 3;
  background: #f8f7f4;
  image-rendering: auto;
}

.embedded-canvas.is-portrait-canvas {
  justify-self: center;
  width: min(100%, 480px);
  aspect-ratio: 2 / 3;
}

body[data-active-game="uski"] .embedded-game-view {
  grid-template-rows: 1fr;
  gap: 0;
  padding: 16px 24px;
  overflow: hidden;
}

body[data-active-game="uski"] .embedded-topline {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 24px;
  left: 24px;
  pointer-events: none;
}

body[data-active-game="uski"] .exit-home {
  pointer-events: auto;
}

body[data-active-game="uski"] .now-playing {
  max-width: min(24vw, 230px);
}

body[data-active-game="uski"] .embedded-game-logo {
  width: min(24vw, 230px);
  max-height: 74px;
}

body[data-active-game="uski"] .embedded-stage {
  width: min(100%, 720px);
  max-height: calc(100svh - 28px);
  padding: 10px;
}

body[data-active-game="uski"] .embedded-canvas.is-portrait-canvas {
  width: auto;
  max-width: 100%;
  height: min(880px, calc(100svh - 92px));
}

body[data-active-game="snakenspace"] .embedded-stage {
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  body[data-active-game="snakenspace"] .embedded-game-view {
    grid-template-rows: 1fr;
    padding: 16px 24px;
    overflow: hidden;
  }

  body[data-active-game="snakenspace"] .embedded-topline {
    position: absolute;
    z-index: 4;
    top: 16px;
    right: 24px;
    left: 24px;
    pointer-events: none;
  }

  body[data-active-game="snakenspace"] .exit-home {
    pointer-events: auto;
  }

  body[data-active-game="snakenspace"] .now-playing {
    max-width: min(24vw, 230px);
  }

  body[data-active-game="snakenspace"] .embedded-game-logo {
    width: min(28vw, 260px);
    max-height: 88px;
  }

  body[data-active-game="snakenspace"] .embedded-stage {
    width: min(100%, 800px);
    max-height: calc(100svh - 20px);
  }

  body[data-active-game="snakenspace"] .embedded-frame.is-square-frame {
    width: min(100%, 724px, calc(100svh - 48px));
  }
}

.embedded-canvas:focus-visible {
  border-color: rgba(255, 180, 67, 0.72);
  box-shadow:
    inset 0 0 36px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(255, 180, 67, 0.22);
}

.embedded-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.embedded-controls span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: rgba(247, 242, 232, 0.82);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.4;
  text-transform: uppercase;
}

.mobile-controls {
  display: none;
  width: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.mobile-controls[hidden] {
  display: none;
}

.mobile-control-pad,
.mobile-course-wheel,
.mobile-action-bank {
  touch-action: none;
}

.mobile-control-pad {
  display: grid;
  grid-template-columns: repeat(3, clamp(44px, 12vw, 58px));
  grid-template-rows: repeat(3, clamp(44px, 12vw, 58px));
  gap: 6px;
  place-content: center;
  justify-self: start;
}

.mobile-pad-button,
.mobile-action-button {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(247, 242, 232, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)),
    rgba(2, 5, 8, 0.78);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(77, 242, 255, 0.1);
  -webkit-tap-highlight-color: transparent;
}

.mobile-pad-button {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
}

.mobile-pad-button::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  filter: drop-shadow(0 0 8px rgba(77, 242, 255, 0.5));
}

.mobile-pad-up {
  grid-column: 2;
  grid-row: 1;
}

.mobile-pad-up::before {
  transform: rotate(-90deg);
}

.mobile-pad-left {
  grid-column: 1;
  grid-row: 2;
}

.mobile-pad-left::before {
  transform: rotate(180deg);
}

.mobile-pad-right {
  grid-column: 3;
  grid-row: 2;
}

.mobile-pad-down {
  grid-column: 2;
  grid-row: 3;
}

.mobile-pad-down::before {
  transform: rotate(90deg);
}

.mobile-course-wheel {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: clamp(150px, 38vw, 190px);
  aspect-ratio: 1;
  border: 1px solid rgba(77, 242, 255, 0.38);
  border-radius: 50%;
  color: rgba(247, 242, 232, 0.94);
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 242, 255, 0.22) 0 20%, transparent 21%),
    radial-gradient(circle at 50% 50%, transparent 0 46%, rgba(77, 242, 255, 0.16) 47% 49%, transparent 50%),
    conic-gradient(from -45deg, rgba(77, 242, 255, 0.18), rgba(255, 76, 168, 0.14), rgba(255, 180, 67, 0.16), rgba(77, 242, 255, 0.18)),
    rgba(2, 5, 12, 0.78);
  box-shadow:
    inset 0 0 34px rgba(77, 242, 255, 0.1),
    inset 0 0 0 10px rgba(255, 255, 255, 0.025),
    0 16px 32px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(77, 242, 255, 0.14);
  -webkit-tap-highlight-color: transparent;
}

.mobile-course-wheel::before,
.mobile-course-wheel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.mobile-course-wheel::before {
  inset: 12%;
  border: 1px dashed rgba(247, 242, 232, 0.22);
}

.mobile-course-wheel::after {
  inset: 4px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(77, 242, 255, 0.18) 50%, transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(77, 242, 255, 0.18) 50%, transparent calc(50% + 1px));
  opacity: 0.82;
}

.mobile-course-core {
  position: relative;
  z-index: 2;
  width: 42%;
  aspect-ratio: 1;
  border: 1px solid rgba(247, 242, 232, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86) 0 8%, transparent 9%),
    radial-gradient(circle at 50% 50%, rgba(77, 242, 255, 0.58), rgba(17, 42, 92, 0.86) 58%, rgba(3, 7, 16, 0.96));
  box-shadow:
    inset -7px -8px 14px rgba(0, 0, 0, 0.34),
    inset 5px 5px 12px rgba(255, 255, 255, 0.12),
    0 0 18px rgba(77, 242, 255, 0.44);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.mobile-course-marker {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(247, 242, 232, 0.9);
  background: rgba(0, 7, 18, 0.44);
  box-shadow: inset 0 0 0 1px rgba(77, 242, 255, 0.18);
  transition: color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.mobile-course-marker::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  filter: drop-shadow(0 0 8px rgba(77, 242, 255, 0.48));
}

.mobile-course-up {
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
}

.mobile-course-up::before {
  transform: rotate(-90deg);
}

.mobile-course-right {
  right: 7%;
  top: 50%;
  transform: translateY(-50%);
}

.mobile-course-down {
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
}

.mobile-course-down::before {
  transform: rotate(90deg);
}

.mobile-course-left {
  left: 7%;
  top: 50%;
  transform: translateY(-50%);
}

.mobile-course-left::before {
  transform: rotate(180deg);
}

.mobile-course-wheel[data-course="up"] .mobile-course-up,
.mobile-course-wheel[data-course="right"] .mobile-course-right,
.mobile-course-wheel[data-course="down"] .mobile-course-down,
.mobile-course-wheel[data-course="left"] .mobile-course-left {
  color: #ffffff;
  background: rgba(255, 180, 67, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 180, 67, 0.68),
    0 0 18px rgba(255, 180, 67, 0.32);
}

.mobile-course-wheel.is-active .mobile-course-core {
  transform: scale(0.92);
  box-shadow:
    inset -7px -8px 14px rgba(0, 0, 0, 0.34),
    inset 5px 5px 12px rgba(255, 255, 255, 0.12),
    0 0 24px rgba(255, 180, 67, 0.42);
}

.mobile-action-bank {
  display: grid;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  gap: 8px;
  justify-self: end;
  align-self: center;
  width: min(232px, 100%);
}

.mobile-action-button {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.15;
  text-transform: uppercase;
}

.mobile-action-button span {
  pointer-events: none;
}

.mobile-action-button[data-mobile-icon] span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mobile-action-button[data-mobile-icon]::before {
  content: "";
  pointer-events: none;
  display: block;
}

.mobile-action-button[data-mobile-icon="bubble"]::before {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(180, 252, 255, 0.82);
  background:
    radial-gradient(circle at 33% 26%, rgba(255, 255, 255, 0.95) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 66%, rgba(255, 255, 255, 0.24) 0 14%, transparent 15%),
    radial-gradient(circle at 48% 48%, rgba(77, 242, 255, 0.34), rgba(48, 148, 255, 0.44) 56%, rgba(17, 38, 82, 0.52));
  box-shadow:
    inset -5px -6px 10px rgba(3, 16, 50, 0.4),
    inset 5px 5px 12px rgba(255, 255, 255, 0.22),
    0 0 16px rgba(77, 242, 255, 0.48);
}

.mobile-action-button[data-mobile-icon="carve"]::before {
  width: 34px;
  height: 28px;
  border: 4px solid transparent;
  border-left-color: rgba(247, 242, 232, 0.94);
  border-bottom-color: rgba(77, 242, 255, 0.92);
  border-radius: 50%;
  transform: rotate(-32deg);
  box-shadow: -4px 5px 0 -2px rgba(255, 180, 67, 0.72);
  filter: drop-shadow(0 0 8px rgba(77, 242, 255, 0.42));
}

.mobile-action-button[data-mobile-icon="shield"]::before {
  width: 34px;
  height: 38px;
  clip-path: polygon(50% 0, 88% 12%, 84% 60%, 50% 100%, 16% 60%, 12% 12%);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.9) 0 7%, transparent 8%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.76) 0 14%, transparent 15%),
    linear-gradient(180deg, rgba(101, 240, 255, 0.95), rgba(65, 116, 255, 0.88) 50%, rgba(24, 38, 124, 0.95));
  box-shadow:
    inset 0 0 0 3px rgba(247, 242, 232, 0.92),
    inset 0 -8px 12px rgba(0, 0, 0, 0.28),
    0 0 14px rgba(77, 242, 255, 0.5);
  filter: drop-shadow(0 0 8px rgba(77, 242, 255, 0.48));
}

.mobile-action-button[data-mobile-icon="dash"]::before {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(77, 242, 255, 0.18), transparent 62%),
    url("web-games/zippa-silk-circuit/assets/zippa-dash.png") center / 122% 122% no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(77, 242, 255, 0.22),
    0 0 14px rgba(77, 242, 255, 0.25);
  filter:
    drop-shadow(0 0 10px rgba(77, 242, 255, 0.52))
    drop-shadow(0 0 14px rgba(255, 76, 168, 0.28));
}

.mobile-action-button[data-mobile-icon="detonate"]::before {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: url("assets/zippa-detonate-icon.png?v=1") center / contain no-repeat;
  filter:
    drop-shadow(0 0 10px rgba(77, 242, 255, 0.5))
    drop-shadow(0 0 14px rgba(255, 76, 168, 0.34));
}

.mobile-action-button[data-mobile-icon="detonate"]::after {
  content: none;
}

.mobile-action-button[data-mobile-action="cycleDensity"]::after {
  content: attr(data-step);
  position: absolute;
  right: 6px;
  top: 5px;
  min-width: 12px;
  color: var(--amber);
  font-size: 8px;
}

.mobile-pad-button.is-active,
.mobile-action-button.is-active {
  border-color: rgba(255, 180, 67, 0.72);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 180, 67, 0.38), rgba(255, 76, 168, 0.18)),
    rgba(10, 8, 12, 0.86);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.26),
    0 0 28px rgba(255, 180, 67, 0.28),
    0 10px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(1px) scale(0.98);
}

.player-stage {
  align-self: center;
  justify-self: center;
  width: min(760px, 100%);
  min-height: 420px;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(4, 5, 8, 0.76);
  box-shadow:
    inset 0 0 60px rgba(77, 242, 255, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.launch-disc {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.88) 0 13%, rgba(255, 255, 255, 0.95) 14% 16%, rgba(0, 0, 0, 0.18) 17% 21%, transparent 22%),
    conic-gradient(from 20deg, #55f1ff, #ff4ca8, #ffb443, #f7f2e8, #7cffe4, #55f1ff);
  box-shadow:
    inset 0 0 45px rgba(0, 0, 0, 0.36),
    0 0 60px rgba(77, 242, 255, 0.18),
    0 0 90px rgba(255, 76, 168, 0.12);
  animation: discTurn 5s linear infinite;
}

.launch-disc span {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.46), transparent 18%);
  mix-blend-mode: screen;
}

@keyframes discTurn {
  to {
    transform: rotate(1turn);
  }
}

.launch-copy {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.launch-status {
  min-height: 24px;
  margin: 0;
  color: #fdf8ed;
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
  text-transform: uppercase;
}

.file-fallback {
  color: var(--cyan);
  font-size: 13px;
  text-transform: uppercase;
}

.launch-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 25;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 180, 67, 0.42);
  border-radius: 6px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)),
    rgba(9, 10, 14, 0.92);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 16px 38px rgba(0, 0, 0, 0.42),
    0 0 26px rgba(255, 180, 67, 0.16);
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.55;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.launch-toast[hidden] {
  display: none;
}

.donation-slot {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(100%, 840px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 180, 67, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 180, 67, 0.14), rgba(77, 242, 255, 0.08)),
    rgba(5, 6, 9, 0.72);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 16px 42px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.donation-slot::before {
  content: "TLG-CREDIT";
  position: absolute;
  right: 14px;
  bottom: 6px;
  color: rgba(247, 242, 232, 0.2);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0;
}

.coin-return {
  display: grid;
  place-items: center;
  width: 74px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(2, 3, 8, 0.88);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.54);
}

.coin-return span {
  display: block;
  width: 52px;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.84), rgba(255, 255, 255, 0.08)),
    #06070a;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.76),
    0 0 12px rgba(255, 180, 67, 0.18);
}

.donation-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.donation-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1;
  text-transform: uppercase;
}

.donation-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.donate-button,
.donation-checkout {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255, 180, 67, 0.62);
  border-radius: 6px;
  color: #fff8e6;
  background:
    linear-gradient(180deg, rgba(255, 180, 67, 0.34), rgba(255, 76, 168, 0.14)),
    rgba(22, 13, 8, 0.92);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 0 24px rgba(255, 180, 67, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.32);
  font-family: var(--font-pixel);
  font-size: clamp(8px, 1.1vw, 11px);
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: normal;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.donate-button:hover,
.donate-button:focus-visible,
.donation-checkout:hover,
.donation-checkout:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(77, 242, 255, 0.74);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.2),
    0 0 28px rgba(77, 242, 255, 0.22),
    0 14px 30px rgba(0, 0, 0, 0.38);
  outline: none;
}

.coin-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.9) 0 10%, transparent 11%),
    radial-gradient(circle, rgba(0, 0, 0, 0.34) 0 18%, transparent 19%),
    conic-gradient(from 18deg, #ffb443, #f7f2e8, #cf7d24, #ffdb74, #ffb443);
  box-shadow:
    inset 0 0 0 1px rgba(50, 25, 4, 0.48),
    0 0 12px rgba(255, 180, 67, 0.36);
}

.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 180, 67, 0.18), transparent 32%),
    rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(12px);
}

.recovery-message-modal {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100dvh;
  z-index: 46;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: rgba(0, 2, 4, 0.78);
  backdrop-filter: blur(12px) saturate(0.9);
}

.recovery-message-modal[hidden] {
  display: none;
}

.recovery-message-panel {
  position: relative;
  box-sizing: border-box;
  width: min(620px, calc(100vw - 48px));
  max-width: 100%;
  min-width: 0;
  max-height: min(720px, calc(100dvh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 30px 34px 34px;
  border: 1px solid rgba(77, 242, 255, 0.72);
  border-radius: 6px;
  color: #dfffe0;
  background:
    repeating-linear-gradient(180deg, rgba(155, 255, 117, 0.035) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, rgba(8, 26, 25, 0.98), rgba(4, 9, 14, 0.99));
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.5),
    inset 0 0 38px rgba(77, 242, 255, 0.08),
    0 0 0 1px rgba(255, 76, 168, 0.28),
    0 24px 80px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(77, 242, 255, 0.18);
  font-family: var(--font-pixel);
}

.recovery-message-panel::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(155, 255, 117, 0.13);
  border-radius: 3px;
}

.recovery-terminal-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 24px;
  margin: 0 42px 24px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(77, 242, 255, 0.26);
  color: rgba(155, 255, 117, 0.74);
  font: 700 11px/1 var(--font-pixel);
}

.recovery-terminal-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: terminal-cursor 1.2s steps(1, end) infinite;
}

.recovery-message-panel .kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-family: var(--font-pixel);
  letter-spacing: 0;
}

.recovery-message-panel h2 {
  margin: 0 46px 22px 0;
  color: #ffffff;
  font: 900 clamp(25px, 5vw, 42px)/1.08 var(--font-display);
  letter-spacing: 0;
  text-shadow: 2px 2px 0 rgba(255, 76, 168, 0.55), 0 0 15px rgba(77, 242, 255, 0.2);
}

.recovery-message-copy {
  position: relative;
  padding: 20px;
  border-left: 3px solid var(--green);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 18px rgba(155, 255, 117, 0.035);
}

.recovery-message-copy p {
  margin: 0 0 16px;
  color: #e2f9e2;
  font: 700 clamp(15px, 2.3vw, 18px)/1.6 var(--font-pixel);
  letter-spacing: 0;
}

.recovery-message-copy p:last-child {
  margin-bottom: 0;
}

.recovery-message-signature {
  padding-top: 6px;
  color: var(--cyan) !important;
}

body.is-message-open {
  overflow: hidden;
}

.recovery-email-form {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(77, 242, 255, 0.42);
  border-radius: 5px;
  background:
    repeating-linear-gradient(180deg, rgba(77, 242, 255, 0.025) 0 1px, transparent 1px 4px),
    rgba(0, 5, 9, 0.74);
  box-shadow: inset 0 0 18px rgba(77, 242, 255, 0.045);
}

.recovery-email-heading {
  display: grid;
  gap: 6px;
}

.recovery-email-heading > span {
  color: var(--cyan);
  font: 900 11px/1.2 var(--font-pixel);
}

.recovery-email-heading p {
  margin: 0;
  color: rgba(226, 249, 226, 0.82);
  font: 700 12px/1.45 var(--font-pixel);
}

.recovery-email-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.recovery-email-entry input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(155, 255, 117, 0.48);
  border-radius: 4px;
  color: #eaffea;
  background: rgba(0, 10, 8, 0.9);
  font: 700 16px/1 var(--font-pixel);
  letter-spacing: 0;
  outline: none;
}

.recovery-email-entry input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(155, 255, 117, 0.12), 0 0 14px rgba(155, 255, 117, 0.12);
}

.recovery-email-entry button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(77, 242, 255, 0.72);
  border-radius: 4px;
  color: #03100d;
  background: var(--cyan);
  font: 900 10px/1.2 var(--font-pixel);
  text-transform: uppercase;
}

.recovery-email-entry button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.recovery-email-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: rgba(226, 249, 226, 0.76);
  font: 700 10px/1.45 var(--font-pixel);
}

.recovery-email-consent input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.recovery-email-status {
  min-height: 15px;
  margin: 0;
  color: var(--cyan);
  font: 700 10px/1.5 var(--font-pixel);
}

.recovery-email-status.is-error {
  color: #ff8b8b;
}

.recovery-email-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.recovery-poll-form {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.recovery-poll-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.recovery-poll-grid label {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 54px;
  cursor: pointer;
}

.recovery-poll-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.recovery-poll-grid span {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid rgba(77, 242, 255, 0.34);
  border-radius: 4px;
  color: rgba(226, 249, 226, 0.84);
  background:
    repeating-linear-gradient(180deg, rgba(77, 242, 255, 0.025) 0 1px, transparent 1px 4px),
    rgba(0, 7, 10, 0.82);
  font: 800 10px/1.35 var(--font-pixel);
  text-align: center;
  overflow-wrap: anywhere;
}

.recovery-poll-grid input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.recovery-poll-grid input:checked + span {
  border-color: var(--green);
  color: #061009;
  background: var(--green);
  box-shadow: 0 0 16px rgba(155, 255, 117, 0.28);
}

.recovery-poll-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  align-items: center;
  justify-content: start;
  gap: 12px;
}

.recovery-poll-actions button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(77, 242, 255, 0.78);
  border-radius: 4px;
  color: #03100d;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(77, 242, 255, 0.18);
  font: 900 10px/1.2 var(--font-pixel);
  text-transform: uppercase;
}

.recovery-poll-actions button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.recovery-poll-status {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  color: var(--cyan);
  font: 700 10px/1.45 var(--font-pixel);
}

.recovery-poll-actions .recovery-coin-button {
  min-height: 44px;
  margin: 0;
  color: rgba(255, 236, 174, 0.9);
  border-color: rgba(255, 207, 80, 0.58);
  background: rgba(31, 24, 8, 0.62);
  box-shadow:
    inset 0 0 12px rgba(255, 198, 54, 0.08),
    0 0 16px rgba(255, 198, 54, 0.08);
}

.recovery-poll-actions .recovery-coin-button:hover,
.recovery-poll-actions .recovery-coin-button:focus-visible {
  color: #fff1bd;
  border-color: rgba(255, 220, 112, 0.82);
  background: rgba(55, 39, 7, 0.72);
}

.recovery-poll-status.is-error {
  color: #ff8b8b;
}

.recovery-message-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 93, 93, 0.68);
  border-radius: 4px;
  color: #fff;
  background: rgba(90, 12, 18, 0.76);
  box-shadow: inset 0 0 10px rgba(255, 93, 93, 0.12);
  font: 900 25px/1 var(--font-pixel);
}

.recovery-message-close:hover,
.recovery-message-close:focus-visible {
  border-color: var(--red);
  background: rgba(145, 18, 28, 0.9);
  box-shadow: 0 0 16px rgba(255, 93, 93, 0.3);
  outline: none;
}

.donation-modal[hidden] {
  display: none;
}

.donation-panel {
  position: relative;
  width: min(440px, calc(100vw - 56px));
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 180, 67, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(6, 7, 10, 0.96);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.16),
    0 26px 70px rgba(0, 0, 0, 0.62),
    0 0 38px rgba(255, 180, 67, 0.14);
}

.donation-panel h2 {
  margin: 0 36px 10px 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 7vw, 36px);
  line-height: 1;
  text-transform: uppercase;
}

.donation-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.donation-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font-size: 24px;
  line-height: 1;
}

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.donation-amounts button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--font-pixel);
}

.donation-amounts button.is-selected,
.donation-amounts button:hover,
.donation-amounts button:focus-visible {
  border-color: rgba(255, 180, 67, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 180, 67, 0.24), rgba(255, 76, 168, 0.1)),
    rgba(255, 255, 255, 0.08);
  outline: none;
}

.donation-custom {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  color: rgba(247, 242, 232, 0.78);
  font-family: var(--font-pixel);
  font-size: 10px;
  text-transform: uppercase;
}

.donation-custom input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(2, 3, 8, 0.84);
  font: 700 16px var(--font-pixel);
  outline: none;
}

.donation-custom input:focus {
  border-color: rgba(77, 242, 255, 0.74);
  box-shadow: 0 0 0 2px rgba(77, 242, 255, 0.14);
}

.donation-checkout {
  width: 100%;
  margin-bottom: 10px;
}

.donation-checkout[data-ready="false"] {
  opacity: 0.72;
}

.paypal-button-container {
  min-height: 46px;
  margin-top: 10px;
}

.paypal-button-container[data-state="loading"],
.paypal-button-container[data-state="missing"] {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px dashed rgba(255, 180, 67, 0.42);
  border-radius: 6px;
  color: rgba(255, 180, 67, 0.86);
  background: rgba(255, 180, 67, 0.07);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.paypal-button-container[data-state="loading"]::before {
  content: "Warming payment terminal...";
}

.purchase-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin-left: 8px;
  padding: 0 11px;
  border: 1px solid rgba(104, 246, 175, 0.65);
  border-radius: 4px;
  color: #d9ffe9;
  background: rgba(4, 28, 20, 0.88);
  box-shadow: inset 0 0 12px rgba(44, 255, 150, 0.1);
  font: 700 9px/1 var(--font-pixel);
  letter-spacing: 0;
  text-transform: uppercase;
  pointer-events: auto;
}

.purchase-open[hidden] {
  display: none;
}

.purchase-open:hover,
.purchase-open:focus-visible {
  border-color: #73ffba;
  color: #fff;
  background: rgba(7, 48, 34, 0.96);
}

.purchase-open-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
}

.purchase-modal {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(0, 3, 5, 0.88);
  backdrop-filter: blur(8px);
}

.purchase-modal[hidden] {
  display: none;
}

.purchase-panel {
  position: relative;
  width: min(100%, 700px);
  max-height: min(92vh, 760px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(77, 242, 255, 0.55);
  border-radius: 6px;
  color: #e9fbff;
  background:
    repeating-linear-gradient(0deg, rgba(90, 255, 190, 0.025) 0 1px, transparent 1px 4px),
    #071015;
  box-shadow:
    inset 0 0 40px rgba(25, 255, 169, 0.04),
    0 24px 70px rgba(0, 0, 0, 0.66);
  font-family: var(--font-pixel);
}

.purchase-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 4px;
  color: #fff;
  background: #101c22;
  font: 700 24px/1 Arial, sans-serif;
}

.purchase-terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 46px;
  color: #70ffb8;
  font-size: 8px;
}

.purchase-terminal-status i {
  flex: 1;
  height: 1px;
  background: rgba(112, 255, 184, 0.4);
}

.purchase-panel h2 {
  margin: 8px 0;
  color: #fff;
  font: 900 clamp(22px, 4vw, 34px)/1.1 var(--font-display);
  letter-spacing: 0;
}

.purchase-copy {
  margin: 0 0 16px;
  color: rgba(233, 251, 255, 0.72);
  font-size: 10px;
  line-height: 1.6;
}

.purchase-customer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.purchase-customer label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: rgba(233, 251, 255, 0.72);
  font-size: 8px;
}

.purchase-customer input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(77, 242, 255, 0.34);
  border-radius: 4px;
  color: #fff;
  background: rgba(4, 14, 19, 0.92);
  font: 700 14px/1.2 var(--font-pixel);
  outline: none;
}

.purchase-customer input:focus {
  border-color: #70ffb8;
  box-shadow: 0 0 0 2px rgba(112, 255, 184, 0.12);
}

.purchase-customer input:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 131, 158, 0.78);
}

.purchase-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.purchase-platforms > div {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(77, 242, 255, 0.34);
  border-radius: 5px;
  color: #e9fbff;
  background: rgba(10, 28, 36, 0.9);
  text-align: left;
}

.purchase-platforms > div.is-ready {
  border-color: #70ffb8;
  box-shadow: inset 0 0 18px rgba(112, 255, 184, 0.12);
}

.purchase-platforms > div:not(.is-ready) {
  opacity: 0.52;
}

.platform-mark {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: #70ffb8;
  font-size: 8px;
}

.purchase-platforms strong {
  font-size: 11px;
}

.purchase-platforms small {
  color: rgba(233, 251, 255, 0.56);
  font-size: 8px;
}

.purchase-price-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 10px;
  padding: 11px 0;
  border-top: 1px solid rgba(77, 242, 255, 0.18);
  border-bottom: 1px solid rgba(77, 242, 255, 0.18);
  color: rgba(233, 251, 255, 0.7);
  font-size: 10px;
}

.purchase-price-row strong {
  color: #70ffb8;
  font-size: 12px;
}

.purchase-methods {
  display: grid;
  gap: 8px;
}

.purchase-method {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 9px;
}

.purchase-provider-slot {
  min-height: 34px;
}

.purchase-provider-slot[data-state="disabled"],
.purchase-provider-slot[data-state="unavailable"],
.purchase-provider-slot[data-state="loading"] {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: rgba(233, 251, 255, 0.48);
  font-size: 8px;
}

.purchase-provider-slot[data-state="disabled"]::before {
  content: "Complete receipt details";
}

.purchase-provider-slot[data-state="loading"]:empty::before {
  content: "Connecting...";
}

.purchase-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: #ffd978;
  font-size: 9px;
  line-height: 1.5;
}

.purchase-status[data-state="success"] {
  color: #70ffb8;
}

.purchase-status[data-state="error"] {
  color: #ff839e;
}

.purchase-download {
  display: grid;
  place-items: center;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid #70ffb8;
  border-radius: 4px;
  color: #06130d;
  background: #70ffb8;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.purchase-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.purchase-downloads[hidden] {
  display: none;
}

.purchase-download[hidden] {
  display: none;
}

body.is-purchase-open {
  overflow: hidden;
}

.donation-note {
  margin: 12px 0 0;
  color: rgba(255, 180, 67, 0.84);
  font-family: var(--font-pixel);
  font-size: 10px;
  text-transform: uppercase;
}

.site-footer {
  display: grid;
  align-items: center;
  justify-items: center;
  justify-content: center;
  gap: 14px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 32px;
  color: rgba(247, 242, 232, 0.62);
  font-size: 12px;
  text-transform: uppercase;
}

.footer-logo {
  display: block;
  width: clamp(128px, 17vw, 230px);
  height: auto;
  opacity: 0.82;
  filter: drop-shadow(0 0 14px rgba(77, 242, 255, 0.16));
}

@media (hover: none), (pointer: coarse) {
  .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    background: rgba(255, 255, 255, 0.2);
  }

  .mobile-controls.is-visible {
    display: grid;
    grid-template-columns: minmax(148px, 1fr) minmax(142px, 0.92fr);
    align-items: center;
    gap: clamp(14px, 5vw, 32px);
    max-width: 620px;
    margin: 0 auto;
  }

  body[data-active-game="bubblebat"] .mobile-controls.is-visible {
    --bubblebat-button-size: clamp(58px, 15vw, 72px);
    width: min(100%, 330px);
    max-width: 94vw;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-content: center;
    justify-items: center;
    gap: 9px;
    padding-inline: 0;
  }

  body[data-active-game="bubblebat"] .mobile-control-pad {
    width: min(100%, calc((var(--bubblebat-button-size) * 3) + 28px));
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(3, var(--bubblebat-button-size));
    grid-template-rows: var(--bubblebat-button-size);
    gap: clamp(8px, 2.4vw, 14px);
    justify-self: center;
    align-items: center;
  }

  body[data-active-game="bubblebat"] .mobile-pad-up {
    grid-column: 2;
  }

  body[data-active-game="bubblebat"] .mobile-pad-down {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-active-game="bubblebat"] .mobile-pad-down::before {
    content: none;
  }

  body[data-active-game="bubblebat"] .mobile-pad-down span {
    pointer-events: none;
    font-family: var(--font-pixel);
    font-size: clamp(8px, 2.3vw, 10px);
    line-height: 1;
    text-transform: uppercase;
    color: rgba(247, 242, 232, 0.96);
    text-shadow: 0 0 8px rgba(77, 242, 255, 0.5);
  }

  body[data-active-game="bubblebat"] .mobile-pad-down.is-active {
    transform: translateY(1px) scale(0.98);
  }

  body[data-active-game="bubblebat"] .mobile-pad-left {
    grid-column: 1;
    grid-row: 1;
  }

  body[data-active-game="bubblebat"] .mobile-pad-left.is-active {
    transform: translateY(1px) scale(0.98);
  }

  body[data-active-game="bubblebat"] .mobile-pad-right {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
  }

  body[data-active-game="bubblebat"] .mobile-pad-right.is-active {
    transform: translateY(1px) scale(0.98);
  }

  body[data-active-game="bubblebat"] .mobile-action-bank {
    grid-column: 1;
    grid-row: 2;
    width: min(190px, 54vw);
    grid-template-columns: repeat(2, minmax(58px, 1fr));
    gap: 7px;
    justify-self: center;
    align-self: center;
  }

  body[data-active-game="bubblebat"] .mobile-action-button {
    min-height: var(--bubblebat-button-size);
    border-radius: 999px;
  }

  body[data-active-game="plash"] .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    max-width: min(520px, 92vw);
  }

  body[data-active-game="plash"] .mobile-control-pad {
    display: none;
  }

  body[data-active-game="plash"] .mobile-action-bank {
    justify-self: center;
    width: min(100%, 460px);
    grid-template-columns: repeat(5, minmax(54px, 1fr));
  }

  body[data-active-game="uski"] .embedded-game-view {
    grid-template-rows: auto 1fr;
    gap: 10px;
    overflow-y: auto;
  }

  body[data-active-game="uski"] .embedded-topline {
    position: static;
    pointer-events: auto;
  }

  body[data-active-game="uski"] .embedded-stage {
    max-height: none;
  }

  body[data-active-game="uski"] .embedded-canvas.is-portrait-canvas {
    width: auto;
    max-width: 100%;
    height: min(52svh, 520px);
  }

  body[data-active-game="snakenspace"] .embedded-controls {
    display: none;
  }

  body[data-active-game="snakenspace"] .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    max-width: 240px;
  }

  body[data-active-game="snakenspace"] .mobile-control-pad {
    justify-self: center;
  }

  body[data-active-game="snakenspace"] .embedded-game-view {
    padding: 10px 12px 12px;
    overflow: hidden;
  }

  body[data-active-game="snakenspace"] .embedded-stage {
    width: min(100%, 700px);
    max-height: calc(100svh - 112px);
    padding: 8px;
  }

  body[data-active-game="snakenspace"] .embedded-frame.is-square-frame {
    width: min(100%, 640px, calc(100svh - 178px));
  }

  body[data-active-game="sticker-hex"] .embedded-controls {
    display: none;
  }

  body[data-active-game="zippa"] .embedded-controls {
    display: none;
  }

  body[data-active-game="zippa"].is-player-open {
    background: #020308;
    overflow: hidden;
  }

  body[data-active-game="zippa"] .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    max-width: min(300px, 82vw);
  }

  body[data-active-game="zippa"] .mobile-action-bank {
    grid-template-columns: repeat(2, minmax(72px, 1fr));
    justify-self: center;
    width: min(270px, 82vw);
  }

  body[data-active-game="zippa"] .mobile-action-button {
    min-height: 54px;
  }

  body[data-active-game="zippa"] .mobile-action-button[data-mobile-icon] {
    border-radius: 999px;
  }

  body[data-active-game="sticker-hex"] .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    max-width: min(280px, 82vw);
  }

  body[data-active-game="sticker-hex"] .mobile-action-bank {
    width: min(240px, 76vw);
    grid-template-columns: 1fr;
    justify-self: center;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button {
    min-height: 62px;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button[data-mobile-icon="shield"]::before {
    justify-self: center;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button[data-mobile-icon] span {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  body[data-active-game="sticker-hex"].is-player-open {
    background: #020308;
    overflow: hidden;
  }

  body[data-active-game="sticker-hex"] .embedded-game-view {
    grid-template-rows: 1fr;
    gap: 0;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow: hidden;
    align-content: center;
    background:
      radial-gradient(circle at 18% 16%, rgba(77, 242, 255, 0.14), transparent 28%),
      radial-gradient(circle at 82% 84%, rgba(245, 76, 62, 0.14), transparent 30%),
      #03050a;
  }

  body[data-active-game="sticker-hex"] .embedded-topline {
    position: absolute;
    z-index: 4;
    top: max(6px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    align-items: flex-start;
    pointer-events: none;
  }

  body[data-active-game="sticker-hex"] .exit-home {
    pointer-events: auto;
    min-height: 32px;
    padding-inline: 12px;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(2, 3, 8, 0.78);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
  }

  body[data-active-game="sticker-hex"] .now-playing {
    pointer-events: none;
    max-width: min(18vw, 112px);
    justify-items: end;
  }

  body[data-active-game="sticker-hex"] .embedded-game-logo {
    width: min(18vw, 112px);
    max-height: 42px;
    object-position: right top;
  }

  body[data-active-game="sticker-hex"] .embedded-stage {
    align-self: center;
    justify-self: center;
    width: min(calc(100svw - 16px), 177.78svh);
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: none;
    max-height: calc(100svh - 16px);
    gap: 0;
    padding: 34px 6px 6px;
    border: 2px solid rgba(247, 242, 232, 0.64);
    border-radius: 8px;
    background: rgba(2, 3, 8, 0.94);
  }

  body[data-active-game="sticker-hex"] .embedded-frame {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 4px;
  }

  body[data-active-game="match-race"] .embedded-controls {
    display: none;
  }

  body[data-active-game="match-race"].is-player-open {
    background: #020308;
    overflow: hidden;
  }

  body[data-active-game="match-race"] .embedded-game-view,
  body[data-active-game="sticker-hex"] .embedded-game-view {
    grid-template-rows: 1fr;
    gap: 0;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow: hidden;
    align-content: center;
    background:
      radial-gradient(circle at 16% 14%, rgba(77, 242, 255, 0.18), transparent 26%),
      radial-gradient(circle at 84% 84%, rgba(245, 76, 62, 0.18), transparent 30%),
      #03050a;
  }

  body[data-active-game="match-race"] .embedded-topline {
    position: absolute;
    z-index: 4;
    top: max(6px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    align-items: flex-start;
    pointer-events: none;
  }

  body[data-active-game="match-race"] .exit-home {
    pointer-events: auto;
    min-height: 32px;
    padding-inline: 12px;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(2, 3, 8, 0.78);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
  }

  body[data-active-game="match-race"] .now-playing {
    pointer-events: none;
    max-width: min(16vw, 86px);
    justify-items: end;
  }

  body[data-active-game="match-race"] .embedded-game-logo {
    width: min(16vw, 86px);
    max-height: 28px;
    object-position: right top;
    filter:
      drop-shadow(0 5px 10px rgba(0, 0, 0, 0.8))
      drop-shadow(0 0 12px rgba(77, 242, 255, 0.22));
  }

  body[data-active-game="match-race"] .embedded-stage,
  body[data-active-game="sticker-hex"] .embedded-stage {
    align-self: center;
    justify-self: center;
    width: min(calc(100svw - 16px), 177.78svh);
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: none;
    max-height: calc(100svh - 16px);
    gap: 0;
    padding: 34px 6px 6px;
    border: 2px solid rgba(247, 242, 232, 0.78);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(77, 242, 255, 0.24), rgba(245, 76, 62, 0.18)),
      rgba(2, 3, 8, 0.94);
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.82),
      0 0 0 1px rgba(77, 242, 255, 0.18),
      0 18px 48px rgba(0, 0, 0, 0.62);
  }

  body[data-active-game="match-race"] .embedded-frame,
  body[data-active-game="sticker-hex"] .embedded-frame {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 4px;
  }

  body[data-active-game="sticker-hex"] .embedded-stage {
    position: relative;
  }

  body[data-active-game="sticker-hex"] .embedded-frame {
    position: absolute;
    inset: 34px auto auto 6px;
    width: calc(100% - 12px);
    height: calc(100% - 40px);
  }
}

@media (max-width: 1080px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-grid.layout-display {
    width: 100%;
  }

  .game-grid.layout-rack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .three-background,
  .background-plate,
  .scanline {
    right: auto;
    width: 100dvw;
    max-width: 100dvw;
  }

  .topbar {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy span {
    display: none;
  }

  .brand-device {
    width: 48px;
    height: 38px;
  }

  .brand-code {
    display: none;
  }

  .transport {
    gap: 6px;
    padding: 6px;
  }

  .transport-button {
    width: 36px;
    height: 34px;
  }

  .message-trigger {
    width: 36px;
    height: 34px;
  }

  .message-terminal-icon {
    transform: scale(0.88);
  }

  .language-menu {
    grid-template-columns: repeat(5, 30px);
    gap: 5px;
    right: -4px;
  }

  .language-menu button {
    width: 30px;
    height: 28px;
    font-size: 17px;
  }

  .case-flip-button {
    width: 36px;
    height: 34px;
  }

  .case-flip-button-image {
    width: 20px;
    height: 20px;
  }

  .recovery-message-modal {
    inset: auto;
    top: var(--recovery-vv-top, 0px);
    left: var(--recovery-vv-left, 0px);
    width: min(var(--recovery-vv-width, 100dvw), 100dvw);
    height: min(var(--recovery-vv-height, 100dvh), 100dvh);
    place-items: center;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .recovery-message-panel {
    align-self: center;
    justify-self: center;
    width: min(calc(100% - 2px), 560px);
    max-width: 100%;
    max-height: calc(100% - 2px);
    margin: 0;
    padding: 14px 12px 18px;
    scrollbar-gutter: stable;
  }

  .recovery-terminal-status {
    margin-bottom: 18px;
  }

  .recovery-message-panel h2 {
    margin-right: 34px;
    margin-bottom: 16px;
    font-size: 24px;
  }

  .recovery-message-copy {
    padding: 13px;
  }

  .recovery-message-copy p {
    margin-bottom: 11px;
    font-size: 13px;
    line-height: 1.45;
  }

  .recovery-message-close {
    position: sticky;
    z-index: 10;
    top: 2px;
    width: 44px;
    height: 44px;
    margin: 0 0 -44px auto;
    border-width: 2px;
    background: #6d0d16;
    box-shadow:
      inset 0 0 10px rgba(255, 93, 93, 0.2),
      0 0 0 3px rgba(0, 0, 0, 0.75),
      0 0 18px rgba(255, 93, 93, 0.32);
    touch-action: manipulation;
  }

  .recovery-poll-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .recovery-poll-grid label {
    min-height: 48px;
  }

  .recovery-poll-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .recovery-poll-actions button {
    width: 100%;
  }

  .recovery-email-form {
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
  }

  .recovery-email-entry {
    grid-template-columns: 1fr;
  }

  .recovery-email-entry button {
    width: 100%;
  }

  .page-shell {
    width: calc(100dvw - 20px);
    max-width: calc(100dvw - 20px);
    margin-left: 10px;
    margin-right: 10px;
    padding-top: 14px;
  }

  .hero {
    min-height: 178px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 22px 0 26px;
  }

  .hero-logo-title {
    width: calc(100% - 12px);
  }

  h1 {
    font-size: 46px;
  }

  .hero-line {
    font-size: 16px;
  }

  .deck-meter {
    display: none;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .game-grid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 1fr;
  }

  .game-grid.layout-display,
  .game-grid.layout-rack {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .game-grid.layout-rack .game-card-front {
    display: block;
  }

  .game-card {
    padding-right: 10px;
  }

  .game-card-back {
    padding: 7px;
  }

  .play-overlay {
    width: 64px;
    height: 64px;
  }

  .play-triangle {
    left: 26px;
    top: 20px;
    border-top-width: 12px;
    border-bottom-width: 12px;
    border-left-width: 18px;
  }

  .embedded-game-view,
  .player-view {
    gap: 10px;
    padding: 10px 12px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
    overflow-y: auto;
    align-content: start;
  }

  .embedded-topline,
  .player-topline {
    align-items: flex-start;
    gap: 10px;
  }

  .exit-home,
  .retro-button {
    min-height: 40px;
    padding: 0 11px;
    font-size: 11px;
  }

  .now-playing h2 {
    font-size: 28px;
  }

  .now-playing {
    max-width: 42vw;
  }

  .embedded-game-logo {
    width: clamp(118px, 36vw, 190px);
    max-height: 92px;
  }

  .embedded-stage {
    align-self: start;
    width: 100%;
    gap: 8px;
    padding: 8px;
  }

  body[data-active-game="match-race"] .embedded-game-view,
  body[data-active-game="sticker-hex"] .embedded-game-view {
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: max(4px, env(safe-area-inset-right));
    padding-left: max(4px, env(safe-area-inset-left));
  }

  body[data-active-game="match-race"] .embedded-stage,
  body[data-active-game="sticker-hex"] .embedded-stage {
    position: relative;
    left: auto;
    width: min(calc(100svw - 16px), 177.78svh);
    max-width: none;
    max-height: calc(100svh - 16px);
    aspect-ratio: 16 / 9;
    justify-self: center;
    gap: 0;
    padding: 34px 6px 6px;
    transform: none;
  }

  .embedded-canvas,
  .embedded-frame {
    max-height: calc(100svh - 286px);
    object-fit: contain;
  }

  .embedded-frame {
    height: auto;
  }

  .embedded-frame.is-square-frame {
    width: min(100%, 640px, calc(100svh - 260px));
    height: auto;
    max-height: none;
  }

  body[data-active-game="match-race"] .embedded-frame {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: none;
  }

  .embedded-canvas.is-paper-canvas {
    max-height: calc(100svh - 286px);
  }

  .embedded-canvas.is-portrait-canvas {
    width: auto;
    max-width: 100%;
    height: min(48svh, 520px);
  }

  body[data-active-game="uski"] .embedded-game-view {
    grid-template-rows: auto 1fr;
    gap: 10px;
    padding: 10px 12px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
    overflow-y: auto;
  }

  body[data-active-game="uski"] .embedded-topline {
    position: static;
    pointer-events: auto;
  }

  body[data-active-game="uski"] .now-playing {
    max-width: 42vw;
  }

  body[data-active-game="uski"] .embedded-game-logo {
    width: clamp(118px, 36vw, 190px);
    max-height: 92px;
  }

  body[data-active-game="uski"] .embedded-stage {
    width: 100%;
    max-height: none;
    padding: 8px;
  }

  body[data-active-game="uski"] .embedded-canvas.is-portrait-canvas {
    width: auto;
    max-width: 100%;
    height: min(48svh, 520px);
  }

  .embedded-controls {
    gap: 5px;
  }

  .embedded-controls span {
    padding: 4px 6px;
    font-size: 8px;
  }

  .mobile-control-pad {
    grid-template-columns: repeat(3, clamp(40px, 12vw, 54px));
    grid-template-rows: repeat(3, clamp(40px, 12vw, 54px));
    gap: 5px;
  }

  .mobile-action-bank {
    grid-template-columns: repeat(2, minmax(58px, 1fr));
    gap: 6px;
  }

  .mobile-action-button {
    min-height: 44px;
    padding: 7px 8px;
    font-size: 8px;
  }

  .mobile-action-button[data-mobile-icon="bubble"]::before {
    width: 36px;
    height: 36px;
  }

  .mobile-action-button[data-mobile-icon="carve"]::before {
    width: 36px;
    height: 30px;
  }

  .mobile-action-button[data-mobile-icon="shield"]::before {
    width: 36px;
    height: 40px;
  }

  .mobile-action-button[data-mobile-icon="dash"]::before {
    width: 40px;
    height: 40px;
  }

  .mobile-action-button[data-mobile-icon="detonate"]::before {
    width: 42px;
    height: 42px;
  }

  .player-stage {
    min-height: 360px;
    padding: 20px;
  }

  .launch-disc {
    width: 170px;
    height: 170px;
  }

  .launch-toast {
    right: 12px;
    bottom: 12px;
  }

  .site-footer {
    width: min(100% - 24px, 1180px);
    display: grid;
  }

  .donation-slot {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 16px 14px;
  }

  .coin-return {
    width: 82px;
  }

  .donate-button {
    width: min(100%, 260px);
    min-height: 54px;
  }

  .donation-panel {
    padding: 18px;
  }

  .donation-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .transport {
    gap: 4px;
    padding: 4px;
  }

  .transport-button,
  .case-flip-button,
  .message-trigger {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .message-terminal-icon::after,
  .recovery-terminal-status i {
    animation: none;
  }
}

/* Final phone-player placement rules. Keep these after the legacy mobile passes. */
@media (hover: none), (pointer: coarse) {
  body.is-game-fullscreen[data-active-game="uski"] .mobile-controls.is-visible {
    right: max(5px, env(safe-area-inset-right));
    bottom: max(5px, env(safe-area-inset-bottom));
    left: max(5px, env(safe-area-inset-left));
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    width: auto;
    max-width: none;
    padding: 5px;
    overflow: hidden;
  }

  body.is-game-fullscreen[data-active-game="uski"] .mobile-control-pad {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 1fr !important;
    gap: 4px;
    width: min(100%, 184px);
    min-width: 0;
  }

  body.is-game-fullscreen[data-active-game="uski"] .mobile-action-bank {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px;
    width: min(100%, 220px);
    min-width: 0;
  }

  body.is-game-fullscreen[data-active-game="uski"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="uski"] .mobile-action-button {
    width: 100%;
    min-width: 0;
    min-height: clamp(48px, 13vw, 60px);
    padding: 5px 3px;
  }

  body[data-active-game="wordventure"] .mobile-action-button,
  body[data-active-game="wordventure"] .mobile-action-button span {
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-weight: 800;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-key="KeyT"] {
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-weight: 800;
  }
}

@media (orientation: landscape) and (hover: none),
  (orientation: landscape) and (pointer: coarse) {
  body[data-active-game="zippa"] .mobile-controls.is-visible {
    position: absolute;
    z-index: 100;
    top: 50%;
    right: max(8px, env(safe-area-inset-right));
    bottom: auto;
    left: auto;
    grid-template-columns: 1fr;
    width: min(224px, 29vw);
    max-width: 224px;
    max-height: none;
    transform: translateY(-50%);
  }

  body[data-active-game="zippa"] .mobile-action-bank {
    grid-template-columns: repeat(2, minmax(64px, 1fr)) !important;
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse) {
  body.is-player-open[data-active-game="gauntlet-blitz"] .embedded-stage {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body.is-player-open[data-active-game="gauntlet-blitz"] #gauntlet-blitz-frame {
    position: absolute !important;
    z-index: 1 !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.is-player-open[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible {
    position: absolute !important;
    z-index: 80 !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    left: max(8px, env(safe-area-inset-left)) !important;
  }

  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-control-pad,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-action-button {
    border-color: rgba(239, 229, 202, 0.46) !important;
    background: rgba(14, 11, 10, 0.48) !important;
    opacity: 0.9 !important;
  }
}

@media (hover: none), (pointer: coarse) {
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-controls.is-visible,
  body.is-game-fullscreen[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-controls.is-visible {
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-control-pad,
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-action-button {
    border-color: rgba(77, 242, 255, 0.24);
    background: rgba(3, 12, 22, 0.2);
    box-shadow: none;
    opacity: 0.72;
  }

  body.is-game-fullscreen[data-active-game="gauntlet-blitz"] .mobile-action-button,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-control-pad,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-action-button {
    background: rgba(5, 8, 14, 0.2);
    box-shadow: none;
    opacity: 0.76;
  }

  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-pad-button:active,
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-action-button:active,
  body.is-game-fullscreen[data-active-game="gauntlet-blitz"] .mobile-action-button:active,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-pad-button:active,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-action-button:active {
    background: rgba(77, 242, 255, 0.38);
    opacity: 1;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-topline {
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    max-width: calc(100vw - 16px);
    gap: 5px;
  }

  body[data-active-game="gauntlet-blitz"] .now-playing {
    display: none;
  }

  body[data-active-game="gauntlet-blitz"] .exit-home,
  body[data-active-game="gauntlet-blitz"] .fullscreen-toggle,
  body[data-active-game="gauntlet-blitz"] .purchase-open {
    min-height: 34px;
    height: 34px;
    margin: 0;
  }

  body[data-active-game="gauntlet-blitz"] .exit-home,
  body[data-active-game="gauntlet-blitz"] .purchase-open {
    padding-inline: 9px;
    font-size: 8px;
  }

  body[data-active-game="gauntlet-blitz"] .fullscreen-toggle {
    flex-basis: 34px;
    width: 34px;
    min-width: 34px;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible {
    grid-template-columns: minmax(180px, 26vw) minmax(330px, 58vw);
    gap: clamp(14px, 3vw, 36px);
    max-height: 88px;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-move-slider {
    --slider-position: 50%;
    position: relative;
    width: min(230px, 27vw);
    min-width: 180px;
    height: 66px;
    border: 1px solid rgba(66, 239, 255, 0.34);
    border-radius: 999px;
    background: rgba(2, 8, 17, 0.18);
    box-shadow: inset 0 0 16px rgba(66, 239, 255, 0.08);
    touch-action: none;
    pointer-events: auto;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-move-slider-track {
    position: absolute;
    top: 50%;
    right: 22px;
    left: 22px;
    height: 5px;
    border-radius: 999px;
    background:
      linear-gradient(90deg, rgba(66, 239, 255, 0.42), rgba(255, 255, 255, 0.18) 50%, rgba(255, 79, 193, 0.42));
    transform: translateY(-50%);
  }

  body[data-active-game="gauntlet-blitz"] .mobile-move-slider-thumb {
    position: absolute;
    top: 50%;
    left: var(--slider-position);
    width: 48px;
    height: 48px;
    border: 2px solid rgba(238, 252, 255, 0.74);
    border-radius: 50%;
    background: rgba(20, 36, 52, 0.32);
    box-shadow:
      0 0 0 4px rgba(66, 239, 255, 0.08),
      0 0 18px rgba(66, 239, 255, 0.22);
    transform: translate(-50%, -50%);
    transition: left 70ms linear;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-move-slider.is-active .mobile-move-slider-thumb {
    background: rgba(66, 239, 255, 0.42);
    transition: none;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-action-bank {
    grid-template-columns: repeat(5, minmax(48px, 1fr)) !important;
    max-width: 430px;
  }

  body[data-active-game="wordventure"] .mobile-controls.is-visible {
    border: 0;
  }

  body[data-active-game="wordventure"] .mobile-action-button {
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
  }

  .embedded-game-view:fullscreen .purchase-modal,
  .embedded-game-view:-webkit-full-screen .purchase-modal {
    z-index: 2147483647;
    display: grid;
  }

  .embedded-game-view:fullscreen .purchase-panel,
  .embedded-game-view:-webkit-full-screen .purchase-panel {
    max-height: calc(100dvh - 20px);
  }
}

@media (max-width: 760px) and (max-height: 540px) and (hover: none),
  (max-width: 760px) and (max-height: 540px) and (pointer: coarse) {
  .embedded-controls {
    display: none;
  }

  .embedded-canvas,
  .embedded-frame {
    max-height: calc(100svh - 186px);
  }

  .embedded-canvas.is-portrait-canvas {
    height: min(43svh, 300px);
  }

  .embedded-frame.is-square-frame {
    width: min(100%, clamp(180px, calc(100svh - 152px), 420px));
  }

  body[data-active-game="snakenspace"] .embedded-stage {
    grid-template-columns: minmax(0, auto) auto;
    align-items: center;
    justify-content: center;
    width: min(100%, 760px);
    max-height: none;
  }

  body[data-active-game="snakenspace"] .embedded-frame.is-square-frame {
    width: min(calc(100svh - 96px), calc(100svw - 280px), 520px);
  }

  body[data-active-game="snakenspace"] .mobile-controls.is-visible {
    max-width: 164px;
  }

  .mobile-controls.is-visible {
    max-width: 460px;
    gap: 10px;
  }

  body[data-active-game="bubblebat"] .mobile-controls.is-visible {
    --bubblebat-button-size: 50px;
    width: min(100%, 292px);
    max-width: 94vw;
    gap: 6px;
  }

  .mobile-control-pad {
    grid-template-columns: repeat(3, 38px);
    grid-template-rows: repeat(3, 38px);
  }

  .mobile-action-button {
    min-height: 38px;
    padding: 5px 7px;
    font-size: 7px;
  }

  body[data-active-game="bubblebat"] .mobile-action-bank {
    width: min(178px, 50vw);
  }

  body[data-active-game="plash"] .mobile-action-bank {
    grid-template-columns: repeat(3, minmax(52px, 1fr));
  }

  body[data-active-game="sticker-hex"] .mobile-controls.is-visible {
    max-width: 240px;
  }

  body[data-active-game="sticker-hex"] .mobile-action-bank {
    width: min(220px, 70vw);
  }

  body[data-active-game="sticker-hex"] .mobile-action-button {
    min-height: 48px;
    grid-template-columns: 32px 1fr;
  }

  body[data-active-game="sticker-hex"] .embedded-frame {
    position: absolute;
    inset: 34px auto auto 6px;
    width: calc(100% - 12px);
    max-width: 100%;
    height: calc(100% - 40px);
    max-height: none;
  }

  body[data-active-game="uski"] .embedded-canvas.is-portrait-canvas {
    height: min(43svh, 300px);
  }
}

@media (orientation: landscape) and (hover: none),
  (orientation: landscape) and (pointer: coarse) {
  body[data-active-game="zippa"] .embedded-game-view,
  body[data-active-game="snakenspace"] .embedded-game-view {
    grid-template-rows: 1fr;
    gap: 0;
    padding: 8px 10px;
    overflow: hidden;
  }

  body[data-active-game="zippa"] .embedded-topline,
  body[data-active-game="snakenspace"] .embedded-topline {
    position: absolute;
    z-index: 5;
    top: 8px;
    right: 10px;
    left: 10px;
    pointer-events: none;
  }

  body[data-active-game="zippa"] .exit-home,
  body[data-active-game="snakenspace"] .exit-home {
    pointer-events: auto;
  }

  body[data-active-game="zippa"] .now-playing,
  body[data-active-game="snakenspace"] .now-playing {
    max-width: 26vw;
  }

  body[data-active-game="zippa"] .embedded-game-logo,
  body[data-active-game="snakenspace"] .embedded-game-logo {
    width: clamp(96px, 18vw, 150px);
    max-height: 62px;
  }

  body[data-active-game="zippa"] .embedded-stage,
  body[data-active-game="snakenspace"] .embedded-stage {
    align-self: center;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    padding: 52px 10px 8px;
  }

  body[data-active-game="snakenspace"] .embedded-stage {
    grid-template-columns: 1fr;
  }

  body[data-active-game="zippa"] .embedded-frame {
    width: min(100%, calc((100svh - 72px) * 1.7778));
    max-width: 100%;
    max-height: calc(100svh - 72px);
    height: auto;
  }

  body[data-active-game="zippa"] .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(230px, 28vw);
    max-width: 230px;
  }

  body[data-active-game="zippa"] .mobile-action-bank {
    width: 100%;
    grid-template-columns: repeat(2, minmax(72px, 1fr));
  }

  body[data-active-game="snakenspace"] .embedded-frame.is-square-frame {
    justify-self: center;
    width: min(calc(100svh - 70px), calc(100svw - 24px), 560px);
    max-width: 100%;
  }

  body[data-active-game="snakenspace"] .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    width: min(190px, 26vw);
    max-width: 190px;
  }
}

/* Desktop Demolition is a remote desktop, so its iframe should use the whole
   fullscreen surface instead of inheriting the compact canvas-game limits. */
@media (hover: none), (pointer: coarse) {
  body.is-game-fullscreen[data-active-game="desktop-demolition"] .embedded-game-view {
    display: block;
    padding: 0;
    overflow: hidden;
    background: #000;
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] .embedded-topline {
    position: fixed;
    z-index: 100;
    top: max(4px, env(safe-area-inset-top));
    right: auto;
    left: max(190px, calc(env(safe-area-inset-left) + 190px));
    width: auto;
    pointer-events: none;
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] .exit-home {
    width: auto;
    min-width: 0;
    min-height: 28px;
    height: 28px;
    gap: 4px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: 9px;
    line-height: 1;
    opacity: 0.82;
    pointer-events: auto;
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] .exit-home .icon-stop {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] .now-playing {
    display: none !important;
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] .embedded-stage {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #000;
    box-shadow: none;
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] #desktop-demolition-frame {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
  }
}

@media (orientation: portrait) and (hover: none),
  (orientation: portrait) and (pointer: coarse) {
  body.is-game-fullscreen[data-active-game="desktop-demolition"] .embedded-stage {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 100svh !important;
    height: 100svw !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center !important;
  }

  body[data-active-game="match-race"] .embedded-game-view {
    display: block;
  }

  body[data-active-game="match-race"] .embedded-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(calc(100svh - 16px), 177.78svw);
    max-height: calc(100svw - 16px);
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
  }
}

@media (hover: none), (pointer: coarse) {
  body[data-active-game="sticker-hex"] .mobile-controls.is-visible {
    position: absolute;
    z-index: 6;
    top: auto;
    left: 8px;
    bottom: 6px;
    display: grid;
    width: min(150px, calc(100% - 16px));
    min-width: 0;
    max-width: 150px;
    height: 42px;
    max-height: 42px;
    margin: 0;
    gap: 0;
    transform: none;
    pointer-events: auto;
  }

  body[data-active-game="sticker-hex"] .mobile-action-bank {
    width: 100%;
    height: 100%;
    grid-template-columns: 1fr;
    gap: 0;
    justify-self: stretch;
    align-self: stretch;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button {
    min-height: 42px;
    height: 42px;
    padding: 4px 8px;
    border-radius: 999px;
    grid-template-columns: 28px 1fr;
    gap: 6px;
    justify-items: center;
    text-align: center;
    font-size: 7px;
    line-height: 1;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button[data-mobile-icon="shield"]::before {
    width: 25px;
    height: 29px;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button[data-mobile-icon] span {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
.game-card[data-game-id="bytefall-protocol-demo"] .preview-video,
.game-card[data-game-id="bytefall-protocol-demo"] .case-back-image {
  object-fit: contain;
  object-position: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(53, 217, 255, 0.16), transparent 44%),
    #02020a;
}

.game-card[data-game-id="bytefall-protocol-demo"] .label-strip h3 {
  max-width: 100%;
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

body[data-active-game="bytefall-protocol-demo"] .embedded-game-view {
  display: block;
  padding: 0;
  overflow: hidden;
  background: #02020a;
}

body[data-active-game="bytefall-protocol-demo"] .embedded-topline {
  position: absolute;
  z-index: 40;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: auto;
  width: auto;
  pointer-events: none;
}

body[data-active-game="bytefall-protocol-demo"] .embedded-topline .exit-home {
  pointer-events: auto;
}

@media (max-width: 900px), (hover: none), (pointer: coarse) {
  body[data-active-game="bytefall-protocol-demo"] .embedded-topline,
  body[data-active-game="bytefall-protocol-demo"] .embedded-game-view:fullscreen .embedded-topline,
  body[data-active-game="bytefall-protocol-demo"] .embedded-game-view:-webkit-full-screen .embedded-topline {
    position: fixed;
    z-index: 2147483647;
    top: max(8px, env(safe-area-inset-top));
    right: auto;
    left: max(8px, env(safe-area-inset-left));
    display: flex;
    width: auto;
    visibility: visible;
    opacity: 1;
    pointer-events: none;
  }

  body[data-active-game="bytefall-protocol-demo"] .embedded-topline .exit-home {
    min-height: 36px;
    padding: 0 12px;
    border-color: rgba(77, 242, 255, 0.78);
    background: rgba(2, 5, 10, 0.9);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.9),
      0 0 16px rgba(77, 242, 255, 0.3);
    font-size: 10px;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
}

body[data-active-game="bytefall-protocol-demo"] .now-playing,
body[data-active-game="bytefall-protocol-demo"] .embedded-controls,
body[data-active-game="bytefall-protocol-demo"] .mobile-controls {
  display: none;
}

body[data-active-game="bytefall-protocol-demo"] .embedded-stage {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #02020a;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-active-game="bytefall-protocol-demo"] .embedded-frame {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-active-game="bytefall-protocol-demo"] .embedded-frame[hidden] {
  display: none;
}

.game-card[data-game-id="gauntlet-blitz"] .preview-video {
  object-fit: cover;
  object-position: center;
  background: #05040d;
}

.game-card[data-game-id="gauntlet-blitz"] .label-strip h3 {
  max-width: 100%;
  font-size: clamp(17px, 2.1vw, 23px);
  overflow-wrap: anywhere;
}

.game-card[data-game-id="wordventure"] .preview-still {
  object-fit: cover;
  object-position: center;
  background: #d3a16c;
}

.game-card[data-game-id="wordventure"] .label-strip h3 {
  max-width: 100%;
  font-size: clamp(14px, 1.7vw, 20px);
  white-space: nowrap;
  overflow-wrap: normal;
}

.wordventure-card-back .case-back-image {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: #d3c8b7;
  filter: saturate(0.98) contrast(1.03) brightness(0.98);
}

.wordventure-cover-logo {
  position: relative;
  z-index: 4;
  display: block;
  width: min(88%, 560px);
  height: auto;
  max-height: 56%;
  object-fit: contain;
  border: 3px solid rgba(35, 31, 29, 0.76);
  box-shadow:
    0 8px 0 rgba(35, 31, 29, 0.38),
    0 18px 34px rgba(0, 0, 0, 0.58);
}

body[data-active-game="wordventure"] .embedded-frame {
  background: #b98d5e;
}

.gauntlet-card-back .case-back-image {
  object-fit: contain;
  object-position: center;
  background: #03020a;
  filter: saturate(1.04) contrast(1.04) brightness(0.96);
}

.desktop-demolition-card-back .case-back-image {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: #020407;
  filter: saturate(1.04) contrast(1.03);
}

.game-card[data-game-id="desktop-demolition"] .label-strip h3 {
  max-width: 100%;
  font-size: 16px;
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

body[data-active-game="desktop-demolition"] .embedded-controls {
  display: none;
}

body[data-active-game="desktop-demolition"] .embedded-frame {
  background: #000;
}

.gauntlet-cover-logo {
  position: relative;
  z-index: 4;
  display: block;
  width: min(88%, 520px);
  height: auto;
  max-height: 70%;
  object-fit: contain;
  filter:
    drop-shadow(0 5px 2px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 18px rgba(66, 239, 255, 0.58))
    drop-shadow(0 0 24px rgba(255, 56, 184, 0.38));
}

body[data-active-game="gauntlet-blitz"] .embedded-controls {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  body[data-active-game="gauntlet-blitz"].is-player-open {
    overflow: hidden;
    background: #03030a;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-game-view,
  body[data-active-game="gauntlet-blitz"] .embedded-game-view:fullscreen,
  body[data-active-game="gauntlet-blitz"] .embedded-game-view:-webkit-full-screen {
    display: block;
    padding: 0;
    overflow: hidden;
    background: #03030a;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-topline {
    position: fixed;
    z-index: 2147483647;
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    display: flex;
    width: auto;
    pointer-events: none;
  }

  body[data-active-game="gauntlet-blitz"] .exit-home {
    min-height: 34px;
    padding: 0 10px;
    border-color: rgba(66, 239, 255, 0.8);
    background: rgba(3, 3, 10, 0.9);
    font-size: 9px;
    pointer-events: auto;
  }

  body[data-active-game="gauntlet-blitz"] .now-playing {
    margin-left: auto;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-game-logo {
    width: min(25vw, 150px);
    max-height: 48px;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-stage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #03030a;
    box-shadow: none;
    backdrop-filter: none;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-frame {
    display: block;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-frame[hidden] {
    display: none;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible {
    position: relative;
    z-index: 70;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(250px, 360px);
    justify-content: space-between;
    align-items: center;
    gap: clamp(20px, 5vw, 64px);
    width: 100%;
    max-width: none;
    margin: 0;
    padding:
      7px max(14px, env(safe-area-inset-right))
      max(7px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    border-top: 1px solid rgba(66, 239, 255, 0.3);
    background: rgba(3, 3, 10, 0.96);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.34);
    pointer-events: auto;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-control-pad {
    position: relative;
    grid-template-columns: repeat(3, clamp(46px, 10vh, 56px));
    grid-template-rows: repeat(2, clamp(46px, 10vh, 56px));
    justify-self: start;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(66, 239, 255, 0.38);
    border-radius: 8px;
    background: rgba(5, 12, 22, 0.92);
    pointer-events: auto;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-pad-left {
    grid-column: 1;
    grid-row: 1;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-pad-down {
    grid-column: 2;
    grid-row: 2;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-pad-right {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-pad-button {
    border-radius: 7px;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-action-bank {
    grid-template-columns: repeat(4, minmax(48px, 1fr));
    justify-self: end;
    gap: 7px;
    width: min(100%, 360px);
    pointer-events: auto;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-action-button {
    min-height: clamp(50px, 11vh, 62px);
    padding: 5px;
    border-radius: 6px;
    font-size: 9px;
  }

  body[data-active-game="wordventure"].is-player-open {
    overflow: hidden;
    background: #2d2118;
  }

  body[data-active-game="wordventure"] .embedded-game-view,
  body[data-active-game="wordventure"] .embedded-game-view:fullscreen,
  body[data-active-game="wordventure"] .embedded-game-view:-webkit-full-screen {
    display: block;
    padding: 0;
    overflow: hidden;
    background: #2d2118;
  }

  body[data-active-game="wordventure"] .embedded-topline {
    position: fixed;
    z-index: 2147483647;
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    display: flex;
    width: auto;
    pointer-events: none;
  }

  body[data-active-game="wordventure"] .exit-home {
    min-height: 34px;
    padding: 0 10px;
    border-color: rgba(255, 219, 132, 0.88);
    color: #fff8e8;
    background: rgba(45, 33, 24, 0.9);
    font-size: 9px;
    pointer-events: auto;
  }

  body[data-active-game="wordventure"] .now-playing {
    margin-left: auto;
    max-width: min(30vw, 180px);
  }

  body[data-active-game="wordventure"] .embedded-game-logo {
    width: min(30vw, 180px);
    max-height: 42px;
    object-position: right top;
  }

  body[data-active-game="wordventure"] .embedded-stage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #2d2118;
    box-shadow: none;
    backdrop-filter: none;
  }

  body[data-active-game="wordventure"] .embedded-frame {
    display: block;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-active-game="wordventure"] .embedded-frame[hidden] {
    display: none;
  }

  body[data-active-game="wordventure"] .embedded-controls {
    display: none;
  }

  body[data-active-game="wordventure"] .mobile-controls.is-visible {
    position: relative;
    z-index: 70;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(330px, 460px);
    justify-content: space-between;
    align-items: center;
    gap: clamp(20px, 6vw, 72px);
    width: 100%;
    max-width: none;
    margin: 0;
    padding:
      7px max(14px, env(safe-area-inset-right))
      max(7px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    border-top: 1px solid rgba(255, 219, 132, 0.34);
    background: rgba(45, 33, 24, 0.96);
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.34);
    pointer-events: auto;
  }

  body[data-active-game="wordventure"] .mobile-control-pad {
    position: relative;
    grid-template-columns: repeat(2, clamp(50px, 11vh, 62px));
    grid-template-rows: clamp(50px, 11vh, 62px);
    justify-self: start;
    gap: 14px;
    padding: 4px;
    border: 1px solid rgba(255, 219, 132, 0.42);
    border-radius: 8px;
    background: rgba(20, 13, 9, 0.8);
    box-shadow:
      inset 0 1px rgba(255, 248, 232, 0.12),
      0 5px 12px rgba(0, 0, 0, 0.28);
  }

  body[data-active-game="wordventure"] .mobile-control-pad--side-scroller::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 219, 132, 0.32);
    border-radius: 50%;
    background: #241710;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.58);
    transform: translate(-50%, -50%);
  }

  body[data-active-game="wordventure"] .mobile-pad-left {
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
  }

  body[data-active-game="wordventure"] .mobile-pad-right {
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
  }

  body[data-active-game="wordventure"] .mobile-pad-button {
    border-color: rgba(255, 219, 132, 0.58);
    border-radius: 6px;
    color: #fff3d1;
    background:
      linear-gradient(180deg, rgba(255, 239, 190, 0.2), rgba(83, 54, 32, 0.12)),
      #352217;
    box-shadow:
      inset 0 1px rgba(255, 248, 232, 0.22),
      0 3px 0 #160e09,
      0 6px 12px rgba(0, 0, 0, 0.28);
  }

  body[data-active-game="wordventure"] .mobile-action-bank {
    grid-template-columns: repeat(5, minmax(46px, 1fr));
    justify-self: end;
    gap: 6px;
    width: 100%;
    max-width: 460px;
  }

  body[data-active-game="wordventure"] .mobile-action-button {
    min-height: clamp(50px, 11vh, 62px);
    padding: 5px;
    border-color: rgba(255, 219, 132, 0.48);
    border-radius: 6px;
    color: #fff3d1;
    background:
      linear-gradient(180deg, rgba(255, 239, 190, 0.18), rgba(83, 54, 32, 0.1)),
      #352217;
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: none;
  }
}

@media (max-width: 620px) {
  .purchase-panel {
    max-height: calc(100dvh - 20px);
    padding: 18px 14px 14px;
  }

  .purchase-method {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .purchase-customer {
    grid-template-columns: 1fr;
  }

  .purchase-downloads {
    grid-template-columns: 1fr;
  }
}

/* Universal phone landscape player */
.fullscreen-toggle {
  display: none;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(77, 242, 255, 0.62);
  border-radius: 4px;
  color: #effcff;
  background: rgba(2, 7, 13, 0.82);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.fullscreen-toggle[hidden] {
  display: none !important;
}

.icon-fullscreen {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  background:
    linear-gradient(currentColor, currentColor) left top / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left top / 2px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 2px 7px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 2px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 2px 7px no-repeat;
}

.fullscreen-toggle.is-fullscreen .icon-fullscreen {
  transform: rotate(180deg);
  background:
    linear-gradient(currentColor, currentColor) left 4px top 4px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left 4px top 4px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) right 4px top 4px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right 4px top 4px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) left 4px bottom 4px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left 4px bottom 4px / 2px 6px no-repeat,
    linear-gradient(currentColor, currentColor) right 4px bottom 4px / 6px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right 4px bottom 4px / 2px 6px no-repeat;
}

@media (hover: none), (pointer: coarse) {
  body.is-player-open .embedded-game-view,
  body.is-player-open .embedded-game-view:fullscreen,
  body.is-player-open .embedded-game-view:-webkit-full-screen {
    width: 100%;
    height: 100%;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: #02040a;
  }

  body.is-player-open .embedded-topline,
  body.is-player-open .embedded-game-view:fullscreen .embedded-topline,
  body.is-player-open .embedded-game-view:-webkit-full-screen .embedded-topline {
    position: fixed;
    z-index: 2147483647;
    top: max(7px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    left: max(8px, env(safe-area-inset-left));
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 7px;
    width: auto;
    pointer-events: none;
  }

  body.is-player-open .exit-home {
    order: 0;
    min-height: 38px;
    pointer-events: auto;
  }

  body.is-player-open .fullscreen-toggle {
    order: 1;
    display: grid;
    flex: 0 0 38px;
  }

  body.is-player-open .purchase-open {
    order: 2;
    pointer-events: auto;
  }

  body.is-player-open .now-playing {
    order: 3;
    margin-left: auto;
  }

  body.is-player-open .embedded-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }

  body.is-player-open .embedded-canvas {
    align-self: center;
    justify-self: center;
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }

  body[data-active-game="bubblebat"] .embedded-stage,
  body[data-active-game="plash"] .embedded-stage,
  body[data-active-game="uski"] .embedded-stage {
    display: grid !important;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr) !important;
    place-items: center;
    padding: 0 !important;
    overflow: hidden;
  }

  body[data-active-game="bubblebat"] .embedded-controls,
  body[data-active-game="plash"] .embedded-controls,
  body[data-active-game="uski"] .embedded-controls {
    display: none;
  }

  body.is-player-open .mobile-controls.is-visible {
    position: absolute;
    z-index: 100;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, auto);
    justify-content: space-between;
    align-items: end;
    gap: clamp(12px, 4vw, 42px);
    width: auto;
    max-width: none;
    min-height: 0;
    max-height: min(24svh, 118px);
    margin: 0;
    padding: 6px 8px;
    border: 1px solid rgba(77, 242, 255, 0.22);
    border-radius: 7px;
    background: rgba(2, 8, 15, 0.46);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
  }

  body.is-player-open .mobile-control-pad,
  body.is-player-open .mobile-action-bank {
    pointer-events: auto;
  }

  body.is-player-open .mobile-control-pad {
    background-color: rgba(3, 10, 18, 0.54);
  }

  body.is-player-open .mobile-pad-button,
  body.is-player-open .mobile-action-button {
    min-width: 46px;
    min-height: 46px;
    background-color: rgba(7, 17, 28, 0.68);
    opacity: 0.88;
    pointer-events: auto;
  }

  body.is-player-open .mobile-action-bank {
    justify-self: end;
  }

  body[data-active-game="plash"] .mobile-controls.is-visible,
  body[data-active-game="zippa"] .mobile-controls.is-visible,
  body[data-active-game="sticker-hex"] .mobile-controls.is-visible {
    left: auto;
    grid-template-columns: 1fr;
    width: min(58vw, 360px);
  }

  body[data-active-game="sticker-hex"] .mobile-controls.is-visible {
    width: min(170px, 42vw);
    height: auto;
    max-height: none;
  }

  body[data-active-game="bubblebat"] .mobile-controls.is-visible {
    --bubblebat-button-size: 58px;
    grid-template-columns: auto minmax(126px, 164px) !important;
    grid-template-rows: 1fr !important;
    justify-content: space-between;
    justify-items: stretch;
    width: auto;
    max-width: none;
    gap: clamp(18px, 7vw, 72px);
    padding-inline: 8px;
  }

  body[data-active-game="bubblebat"] .mobile-control-pad {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start;
  }

  body[data-active-game="bubblebat"] .mobile-action-bank {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center;
    justify-self: end;
    width: 100%;
  }

  body[data-active-game="bubblebat"] .mobile-action-button {
    min-height: 54px;
  }

  body[data-active-game="uski"] .mobile-control-pad {
    grid-template-columns: repeat(3, 52px) !important;
    grid-template-rows: 52px !important;
    gap: 7px;
  }

  body[data-active-game="uski"] .mobile-pad-left {
    grid-column: 1;
    grid-row: 1;
  }

  body[data-active-game="uski"] .mobile-pad-down {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-active-game="uski"] .mobile-pad-right {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-active-game="uski"] .mobile-pad-button,
  body[data-active-game="uski"] .mobile-action-button {
    min-width: 52px;
    min-height: 52px;
  }

  body[data-active-game="uski"] .mobile-action-bank {
    grid-template-columns: repeat(3, minmax(58px, 76px));
    width: auto;
  }

  body[data-active-game="zippa"] .mobile-controls.is-visible {
    width: min(52vw, 430px);
    max-height: 74px;
  }

  body[data-active-game="zippa"] .mobile-action-bank {
    grid-template-columns: repeat(4, minmax(58px, 1fr)) !important;
  }

  body[data-active-game="zippa"] .mobile-action-button {
    min-height: 54px;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-stage,
  body[data-active-game="wordventure"] .embedded-stage {
    display: block;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible,
  body[data-active-game="wordventure"] .mobile-controls.is-visible {
    grid-template-columns: minmax(150px, auto) minmax(280px, 52vw);
    background: rgba(3, 7, 13, 0.48);
  }

  body[data-active-game="gauntlet-blitz"] .mobile-control-pad {
    grid-template-columns: repeat(3, 38px) !important;
    grid-template-rows: repeat(2, 38px) !important;
    gap: 4px;
    padding: 3px;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-pad-button {
    min-width: 38px;
    min-height: 38px;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-action-button {
    min-height: 48px;
  }
}

@media (hover: none), (pointer: coarse) {
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-controls.is-visible,
  body.is-game-fullscreen[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-controls.is-visible {
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-control-pad,
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-action-button,
  body.is-game-fullscreen[data-active-game="gauntlet-blitz"] .mobile-action-button,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-control-pad,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="wordventure"] .mobile-action-button {
    background-color: rgba(3, 10, 18, 0.18);
    box-shadow: none;
    opacity: 0.72;
  }

  body[data-active-game="gauntlet-blitz"] .embedded-topline {
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    gap: 5px;
  }

  body[data-active-game="gauntlet-blitz"] .exit-home,
  body[data-active-game="gauntlet-blitz"] .fullscreen-toggle,
  body[data-active-game="gauntlet-blitz"] .purchase-open {
    min-height: 34px;
    height: 34px;
    margin: 0;
  }

  body[data-active-game="gauntlet-blitz"] .fullscreen-toggle {
    width: 34px;
    min-width: 34px;
    flex-basis: 34px;
  }

  body[data-active-game="gauntlet-blitz"] .mobile-controls.is-visible {
    grid-template-columns: minmax(180px, 26vw) minmax(330px, 58vw);
    gap: clamp(14px, 3vw, 36px);
    max-height: 88px;
  }
}

@media (orientation: portrait) and (hover: none),
  (orientation: portrait) and (pointer: coarse) {
  body.is-game-fullscreen:not([data-active-game="uski"]) .embedded-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    inset: auto;
    width: 100svh;
    height: 100svw;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
  }
}

@media (hover: none), (pointer: coarse) {
  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .embedded-game-view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 100svh;
    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    overflow: auto;
    background:
      radial-gradient(circle at 16% 20%, rgba(255, 76, 168, 0.12), transparent 30%),
      radial-gradient(circle at 78% 8%, rgba(77, 242, 255, 0.12), transparent 26%),
      #03050a;
  }

  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .embedded-topline {
    position: relative;
    inset: auto;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    pointer-events: auto;
  }

  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .now-playing {
    display: grid !important;
    margin-left: auto;
    max-width: min(34vw, 180px);
  }

  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .embedded-game-logo {
    width: min(34vw, 180px);
    max-height: 54px;
  }

  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .embedded-stage {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    align-self: center;
    justify-self: center;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 10px;
    width: min(1040px, 100%) !important;
    height: auto !important;
    min-height: 0;
    max-height: none;
    padding: 10px !important;
    overflow: visible;
    border: 1px solid rgba(77, 242, 255, 0.42);
    border-radius: 7px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
      rgba(3, 8, 14, 0.92);
    box-shadow:
      inset 0 0 32px rgba(77, 242, 255, 0.06),
      0 16px 38px rgba(0, 0, 0, 0.48);
    transform: none !important;
  }

  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .embedded-canvas,
  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .embedded-frame {
    position: relative !important;
    inset: auto !important;
    grid-row: 1;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    max-width: 100% !important;
    max-height: calc(100dvh - 230px) !important;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 5px;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.62);
    transform: none !important;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="uski"] .embedded-canvas.is-portrait-canvas {
    justify-self: center;
    width: auto !important;
    height: min(62dvh, 620px) !important;
    max-width: 100% !important;
  }

  body.is-player-open:not(.is-game-fullscreen):not([data-active-game="match-race"]):not([data-active-game="bytefall-protocol-demo"]) .mobile-controls.is-visible {
    position: relative !important;
    inset: auto !important;
    grid-row: 2;
    display: grid;
    width: 100% !important;
    max-width: 620px !important;
    min-height: 0;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 8px 6px 4px;
    border: 0;
    border-top: 1px solid rgba(77, 242, 255, 0.25);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none !important;
    pointer-events: none;
  }
}

/* Keep off-screen cassettes out of the paint pipeline while preserving rack size. */
.game-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

@media (hover: none), (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }

  /* BubbleBat and Plash retain the framed portrait player shown in the mobile design. */
  body.is-player-open:not(.is-game-fullscreen)[data-active-game="bubblebat"] .embedded-stage,
  body.is-player-open:not(.is-game-fullscreen)[data-active-game="plash"] .embedded-stage {
    width: min(100%, 720px) !important;
    grid-template-rows: auto auto !important;
  }

  /* Restore Match Race's dedicated mobile player after the shared fullscreen layer. */
  body[data-active-game="match-race"] .embedded-game-view {
    display: grid;
    grid-template-rows: 1fr;
    gap: 0;
    min-height: 100svh;
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    overflow: hidden;
  }

  body[data-active-game="match-race"] .embedded-stage {
    position: relative;
    inset: auto;
    align-self: center;
    justify-self: center;
    width: min(calc(100svw - 16px), 177.78svh);
    height: auto;
    max-width: none;
    max-height: calc(100svh - 16px);
    aspect-ratio: 16 / 9;
    gap: 0;
    padding: 34px 6px 6px;
    border: 2px solid rgba(247, 242, 232, 0.78);
    border-radius: 8px;
    transform: none;
  }

  body[data-active-game="match-race"] .embedded-frame {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    aspect-ratio: auto;
    transform: none;
  }

  /* Stack Wordventure's compact store button below Exit Home, clear of the game HUD. */
  body[data-active-game="wordventure"] .embedded-topline {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    justify-content: stretch;
    gap: 4px 8px;
  }

  body[data-active-game="wordventure"] .exit-home {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  body[data-active-game="wordventure"] .purchase-open {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    width: 92px;
    min-height: 27px;
    height: 27px;
    margin: 0;
    padding: 0 6px;
    gap: 4px;
    font-size: 7px;
  }

  body[data-active-game="wordventure"] .purchase-open-icon {
    width: 15px;
    height: 15px;
    font-size: 8px;
  }

  body[data-active-game="wordventure"] .now-playing {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    margin-left: 0;
  }
}

@media (orientation: portrait) and (hover: none),
  (orientation: portrait) and (pointer: coarse) {
  body.is-player-open:not(.is-game-fullscreen)[data-active-game="bubblebat"] .embedded-game-view,
  body.is-player-open:not(.is-game-fullscreen)[data-active-game="plash"] .embedded-game-view {
    grid-template-rows: auto auto 1fr !important;
    align-content: start !important;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="bubblebat"] .embedded-stage,
  body.is-player-open:not(.is-game-fullscreen)[data-active-game="plash"] .embedded-stage {
    align-self: start !important;
    margin-top: 96px !important;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="bubblebat"] .mobile-controls.is-visible {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 12px;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="bubblebat"] .mobile-control-pad {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="bubblebat"] .mobile-action-bank {
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: center;
    width: min(100%, 330px);
  }

  body[data-active-game="match-race"] .embedded-game-view,
  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] #embedded-game-view {
    display: block;
  }

  body[data-active-game="match-race"] .embedded-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(calc(100svh - 16px), 177.78svw);
    height: auto;
    max-height: calc(100svw - 16px);
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
  }

  /* Zippa remains a landscape game even when orientation lock is unavailable. */
  body[data-active-game="zippa"] .embedded-game-view {
    overflow: hidden;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] .embedded-topline {
    position: absolute;
    z-index: 5;
    top: max(8px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    pointer-events: none;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] .exit-home {
    pointer-events: auto;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] .now-playing {
    max-width: 28vw;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] .embedded-game-logo {
    width: clamp(88px, 24vw, 116px);
    max-height: 48px;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] #embedded-game-view .embedded-stage {
    position: absolute !important;
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    width: min(calc(100svh - 16px), 177.78svw) !important;
    height: auto !important;
    max-height: calc(100svw - 16px);
    grid-template-columns: minmax(0, 1fr) minmax(150px, 26svh) !important;
    grid-template-rows: 1fr !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 8px 8px !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center;
    overflow: hidden;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] #zippa-frame {
    width: 100% !important;
    height: auto !important;
    max-height: calc(100svw - 72px) !important;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] #embedded-game-view .mobile-controls.is-visible {
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(190px, 28svh) !important;
    max-width: 190px !important;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] #embedded-game-view .mobile-action-bank {
    width: 100%;
    grid-template-columns: repeat(2, minmax(64px, 1fr)) !important;
  }

  body.is-player-open:not(.is-game-fullscreen)[data-active-game="zippa"] #embedded-game-view .mobile-action-button {
    min-height: 46px;
  }
}

/* Final phone-player overrides. These must remain after the legacy mobile rules. */
@media (hover: none), (pointer: coarse) {
  body.is-game-fullscreen[data-active-game="uski"] .mobile-controls.is-visible {
    right: max(5px, env(safe-area-inset-right)) !important;
    bottom: max(5px, env(safe-area-inset-bottom)) !important;
    left: max(5px, env(safe-area-inset-left)) !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    padding: 5px !important;
    overflow: hidden;
  }

  body.is-game-fullscreen[data-active-game="uski"] .mobile-control-pad {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 1fr !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.is-game-fullscreen[data-active-game="uski"] .mobile-action-bank {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.is-game-fullscreen[data-active-game="uski"] .mobile-pad-button,
  body.is-game-fullscreen[data-active-game="uski"] .mobile-action-button {
    width: 100% !important;
    height: clamp(50px, 13vw, 62px) !important;
    min-width: 0 !important;
    min-height: clamp(50px, 13vw, 62px) !important;
    aspect-ratio: auto !important;
    padding: 5px 3px !important;
  }

  body[data-active-game="wordventure"] .mobile-action-button,
  body[data-active-game="wordventure"] .mobile-action-button span,
  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-key="KeyT"] {
    font-family: "Segoe Print", "Comic Sans MS", Arial, sans-serif !important;
    font-weight: 800 !important;
  }
}

@media (orientation: landscape) and (hover: none),
  (orientation: landscape) and (pointer: coarse) {
  body[data-active-game="zippa"] .mobile-controls.is-visible,
  body.is-game-fullscreen[data-active-game="zippa"] .mobile-controls.is-visible {
    position: absolute !important;
    z-index: 100 !important;
    top: 50% !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    left: auto !important;
    grid-template-columns: 1fr !important;
    width: min(224px, 29vw) !important;
    max-width: 224px !important;
    max-height: none !important;
    transform: translateY(-50%) !important;
  }

  body[data-active-game="zippa"] .mobile-action-bank {
    grid-template-columns: repeat(2, minmax(64px, 1fr)) !important;
    width: 100% !important;
  }
}

.recovery-coin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  margin: 10px auto 0;
  padding: 7px 13px;
  border: 1px solid rgba(255, 207, 80, 0.42);
  border-radius: 4px;
  color: rgba(255, 236, 174, 0.88);
  background: rgba(31, 24, 8, 0.48);
  box-shadow: inset 0 0 12px rgba(255, 198, 54, 0.08);
  font: 700 9px/1 "IBM Plex Mono", "Courier New", monospace;
  text-transform: uppercase;
  cursor: pointer;
}

.recovery-coin-button:hover,
.recovery-coin-button:focus-visible {
  border-color: rgba(255, 220, 112, 0.82);
  color: #fff1bd;
  background: rgba(55, 39, 7, 0.66);
}

.recovery-coin-button .coin-icon {
  width: 16px;
  height: 16px;
}

@media (hover: hover) and (pointer: fine) {
  body.is-player-open[data-active-game="gauntlet-blitz"] #gauntlet-blitz-frame,
  body.is-player-open[data-active-game="wordventure"] #wordventure-frame {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media (hover: none), (pointer: coarse) {
  body[data-active-game="wordventure"] .mobile-pad-button,
  body[data-active-game="wordventure"] .mobile-action-button,
  body[data-active-game="wordventure"] .mobile-action-button span {
    font-family: Arial, sans-serif !important;
  }

  .recovery-coin-button {
    flex: 0 0 auto;
    min-height: 38px;
    margin-top: 8px;
    padding: 8px 14px;
    font-size: 10px;
  }
}

@media (orientation: landscape) and (hover: none),
  (orientation: landscape) and (pointer: coarse) {
  body[data-active-game="bubblebat"] .mobile-action-bank {
    grid-template-columns: repeat(3, minmax(68px, 1fr)) !important;
  }

  body[data-active-game="bubblebat"] .mobile-action-button[data-mobile-key="ArrowUp"] {
    order: 0;
  }

  body[data-active-game="bubblebat"] .mobile-action-button[data-mobile-key="Space"] {
    order: 1;
  }

  body[data-active-game="bubblebat"] .mobile-action-button[data-mobile-key="Enter"] {
    order: 2;
  }

  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-controls.is-visible {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    grid-template-columns: auto minmax(192px, 234px) !important;
    gap: clamp(12px, 3vw, 36px);
    overflow: visible;
  }

  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-action-bank {
    width: min(234px, 40vw);
    grid-template-columns: repeat(3, minmax(54px, 1fr)) !important;
    gap: 6px;
    padding-right: 2px;
  }

  body.is-game-fullscreen[data-active-game="bubblebat"] .mobile-action-button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }
}

body.is-game-fullscreen[data-active-game="bubblebat"] .embedded-game-logo {
  display: none !important;
}

@media (hover: none), (pointer: coarse) {
  body[data-active-game="sticker-hex"] .mobile-controls.is-visible {
    right: auto;
    bottom: max(4px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    width: min(160px, 42vw);
    max-width: 160px;
    height: 42px;
    max-height: 42px;
    padding: 0;
  }

  body[data-active-game="sticker-hex"] .mobile-action-button {
    min-height: 42px;
    height: 42px;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon] {
    display: grid;
    place-items: center;
    padding: 4px;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon]::before {
    width: clamp(32px, 8.5vh, 42px);
    height: clamp(32px, 8.5vh, 42px);
    filter:
      drop-shadow(2px 3px 0 rgba(45, 33, 24, 0.7))
      drop-shadow(0 0 4px rgba(255, 248, 232, 0.22));
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon="word-kick"]::before {
    background: url("assets/wordventure-mobile-actions.png?v=1") 50% 50% / 300% 100% no-repeat;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon="word-punch"]::before {
    background: url("assets/wordventure-mobile-actions.png?v=1") 0 50% / 300% 100% no-repeat;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon="word-jump"]::before {
    background: url("assets/wordventure-mobile-actions.png?v=1") 100% 50% / 300% 100% no-repeat;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon="word-slow"]::before {
    border: 4px solid #33291f;
    border-radius: 50%;
    background:
      linear-gradient(90deg, transparent 45%, #33291f 46% 54%, transparent 55%) center 24% / 50% 44% no-repeat,
      linear-gradient(35deg, transparent 46%, #33291f 47% 54%, transparent 55%) 62% 59% / 48% 48% no-repeat,
      radial-gradient(circle, #c9b4f2 0 62%, #fdfaf1 63% 74%, #33291f 75% 100%);
    box-sizing: border-box;
  }

  body[data-active-game="wordventure"] .mobile-action-button[data-mobile-icon="word-notebook"]::before {
    border: 3px solid #33291f;
    border-radius: 3px;
    background:
      linear-gradient(90deg, transparent 0 20%, #ef7979 21% 25%, transparent 26%),
      repeating-linear-gradient(180deg, #fdfaf1 0 7px, #9fc8ef 8px 9px);
    box-sizing: border-box;
    transform: rotate(-3deg);
  }
}

@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.is-player-open[data-active-game="gauntlet-blitz"] .embedded-game-view {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  body.is-player-open[data-active-game="gauntlet-blitz"] .embedded-topline {
    position: fixed;
    z-index: 50;
    top: 20px;
    right: 24px;
    left: 24px;
    width: auto;
    pointer-events: none;
  }

  body.is-player-open[data-active-game="gauntlet-blitz"] .exit-home {
    pointer-events: auto;
  }

  body.is-player-open[data-active-game="gauntlet-blitz"] .embedded-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1280px, calc(100vw - 48px));
    height: min(806px, calc(100vh - 28px));
    max-width: none;
    max-height: none;
    padding: 0;
    gap: 0;
    border: 0;
    transform: translate(-50%, -50%);
  }

  body.is-player-open[data-active-game="gauntlet-blitz"] #gauntlet-blitz-frame {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.is-player-open[data-active-game="desktop-demolition"] .embedded-game-view {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  body.is-player-open[data-active-game="desktop-demolition"] .embedded-topline {
    position: fixed;
    z-index: 50;
    top: 18px;
    right: 22px;
    left: 22px;
    width: auto;
    pointer-events: none;
  }

  body.is-player-open[data-active-game="desktop-demolition"] .exit-home {
    pointer-events: auto;
  }

  body.is-player-open[data-active-game="desktop-demolition"] .embedded-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: min(1500px, calc(100vw - 32px));
    height: min(940px, calc(100vh - 28px));
    max-width: none;
    max-height: none;
    padding: 8px;
    overflow: hidden;
    transform: translate(-50%, -50%);
  }

  body.is-player-open[data-active-game="desktop-demolition"] #desktop-demolition-frame {
    display: block !important;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }
}

@media (max-width: 900px), (hover: none), (pointer: coarse) {
  body.is-player-open[data-active-game="desktop-demolition"] .embedded-topline {
    padding-left: max(44px, calc(env(safe-area-inset-left) + 44px));
  }

  body.is-game-fullscreen[data-active-game="desktop-demolition"] .embedded-topline {
    padding-left: 0;
  }
}
