:root {
  --bg-top: #020202;
  --bg-bottom: #111111;
  --panel: rgba(8, 8, 8, 0.88);
  --panel-border: rgba(255, 255, 255, 0.18);
  --text: #f7f7f7;
  --muted: #b9b9b9;
  --accent: #ffffff;
  --accent-soft: #dedede;
  --grid-glow: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --amiga-cursor: url("amiga-workbench-cursor.png") 2 2, auto;
}

* {
  box-sizing: border-box;
  cursor: var(--amiga-cursor);
}

html,
body,
body *,
body *::before,
body *::after {
  cursor: var(--amiga-cursor) !important;
}

input,
textarea,
select,
button,
label,
img,
canvas {
  cursor: var(--amiga-cursor) !important;
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-webkit-slider-runnable-track {
  cursor: var(--amiga-cursor) !important;
}

input[type="range"]::-moz-range-thumb,
input[type="range"]::-moz-range-track {
  cursor: var(--amiga-cursor) !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Arial Narrow", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.06), transparent 25%),
    linear-gradient(90deg, transparent 0, transparent 47%, rgba(255, 255, 255, 0.03) 50%, transparent 53%, transparent 100%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.version-tag {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 6;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.52rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 6px rgba(255, 255, 255, 0.03),
    0 0 10px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  user-select: none;
}

.entry-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}

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

.entry-overlay::before,
.entry-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.entry-overlay::before {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 36%),
    url("portal-kickstart.gif") center center / cover no-repeat;
  image-rendering: pixelated;
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.03);
}

.entry-overlay::after {
  background:
    radial-gradient(circle at center, rgba(0, 0, 0, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(8, 4, 12, 0.58), rgba(0, 0, 0, 0.74));
}

.entry-corner-logo {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 0;
  width: clamp(38px, 4.2vw, 52px);
  height: auto;
  opacity: 0.24;
  pointer-events: none;
  mix-blend-mode: screen;
  filter:
    invert(1)
    brightness(1.42)
    contrast(1.1)
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.08));
}

.entry-card {
  position: relative;
  z-index: 2;
  width: min(490px, 100%);
  overflow: hidden;
  padding: 32px 28px 30px;
  text-align: center;
  transform: translateY(-18px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.entry-card > :not(.entry-corner-logo) {
  position: relative;
  z-index: 1;
}

.entry-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.entry-card h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.78rem, 3.5vw, 2.38rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.entry-title-word {
  display: inline;
}

.mobile-version-note {
  display: none;
}

.entry-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.layout {
  width: min(1450px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(270px, 320px) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
  padding: 28px 0;
}

.panel,
.game-shell {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 28px;
  min-width: 0;
}

.hero,
.sidebar,
.community-chat-panel,
.game-shell {
  align-self: start;
}

.hero {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 10px;
  width: 100%;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.brand-lockup.gameover-brand .brand-mark {
  filter:
    drop-shadow(0 0 18px rgba(255, 88, 88, 0.18))
    drop-shadow(0 0 34px rgba(124, 0, 0, 0.22));
}

.brand-lockup.gameover-brand .brand-logo-image {
  filter:
    brightness(0)
    saturate(100%)
    invert(13%)
    sepia(92%)
    saturate(3292%)
    hue-rotate(344deg)
    brightness(102%)
    contrast(109%)
    drop-shadow(0 0 12px rgba(255, 72, 72, 0.34))
    drop-shadow(0 0 28px rgba(118, 0, 0, 0.32));
}

.brand-mark {
  width: 150px;
  height: 150px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.04));
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter:
    invert(1)
    brightness(1.2)
    contrast(1.08);
}

.brand-type {
  display: grid;
  justify-items: center;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.brand-subtitle {
  margin-top: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.76rem;
  text-align: center;
  width: 100%;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 3.1vw, 2.8rem);
  line-height: 0.96;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: normal;
  position: relative;
}

.brand-artwork-title {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin: 8px 0 10px;
  padding: 5px 0;
  overflow: visible;
}

.brand-artwork-title::before {
  content: "";
  position: absolute;
  inset: 4px -4px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 56%),
    linear-gradient(90deg, transparent, rgba(116, 255, 226, 0.07), transparent);
  opacity: 0.85;
  pointer-events: none;
}

.brand-game-title-image {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 285px);
  max-height: 96px;
  object-fit: contain;
  border-radius: 14px;
  opacity: 0.96;
  filter:
    saturate(1.08)
    contrast(1.06)
    drop-shadow(0 0 10px rgba(116, 255, 226, 0.16))
    drop-shadow(0 0 18px rgba(255, 78, 206, 0.08));
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  transform: translateX(-3px);
}

.brand-type h1.gameover-brand {
  color: #ffbaba;
  text-shadow:
    0 0 8px rgba(255, 140, 140, 0.28),
    0 0 18px rgba(154, 24, 24, 0.45),
    0 0 34px rgba(84, 0, 0, 0.36);
}

.brand-type h1.gameover-brand .brand-game-title-image {
  filter:
    sepia(1)
    saturate(4)
    hue-rotate(300deg)
    brightness(0.88)
    drop-shadow(0 0 14px rgba(255, 50, 50, 0.32))
    drop-shadow(0 0 28px rgba(120, 0, 0, 0.34));
}

.brand-type h1.gameover-drip::before,
.brand-type h1.gameover-drip::after {
  position: absolute;
  left: 0;
  right: 0;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  color: rgba(255, 132, 132, 0.92);
  text-shadow:
    0 0 8px rgba(255, 125, 125, 0.42),
    0 0 18px rgba(126, 0, 0, 0.34);
  animation: sadDrip 2.2s ease-in forwards;
}

.brand-type h1.gameover-drip::before {
  content: "\2639  \2639     \2639";
  top: 6px;
  font-size: 1rem;
  letter-spacing: 0.26em;
}

.brand-type h1.gameover-drip::after {
  content: "   \2639      \2639";
  top: 18px;
  font-size: 0.9rem;
  letter-spacing: 0.34em;
  animation-delay: 0.18s;
}

.brand-type h1.demo-sparkle span {
  animation: brandSparkle 1.35s linear infinite;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.4),
    0 0 18px rgba(139, 210, 255, 0.3);
}

.brand-type h1.demo-sparkle span:last-child {
  animation-delay: 0.28s;
}

h1 span {
  display: block;
}

.intro,
.note {
  color: var(--muted);
  line-height: 1.6;
}

.controls-card {
  margin-top: 14px;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.controls-compact p {
  margin: 5px 0;
}

.controls-card h2 {
  margin-bottom: 10px;
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.controls-card p,
.stat {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.controls-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.controls-card p span:first-child {
  padding-right: 8px;
}

.controls-card p span:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.touch-only {
  display: none !important;
}

.jukebox-card {
  margin-top: 14px;
  padding: 15px 16px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.jukebox-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.jukebox-menu-button {
  min-width: 0;
  min-height: 22px;
  padding: 4px 5px;
  border: 1px solid rgba(141, 255, 156, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #8dff9c;
  font-size: 0.38rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 9px rgba(141, 255, 156, 0.06),
    0 0 13px rgba(141, 255, 156, 0.1);
}

.jukebox-kicker {
  min-width: 0;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-transform: uppercase;
  color: #f7fbff;
  margin-bottom: 0;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.58),
    0 0 18px rgba(124, 202, 255, 0.34);
}

.jukebox-kicker span {
  display: block;
  color: #8dff9c;
  font-size: 0.45rem;
  letter-spacing: 0.14em;
  text-shadow:
    0 0 8px rgba(141, 255, 156, 0.72),
    0 0 18px rgba(141, 255, 156, 0.32);
}

.jukebox-scope {
  width: 108px;
  height: 22px;
  padding: 2px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.56);
  border: 1px solid rgba(141, 255, 156, 0.18);
  box-shadow:
    inset 0 0 8px rgba(141, 255, 156, 0.08),
    0 0 10px rgba(61, 255, 106, 0.14);
  justify-self: end;
  transform: none;
}

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

.jukebox-track-menu {
  display: grid;
  gap: 4px;
  max-height: 112px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 5px;
  border: 1px solid rgba(141, 255, 156, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(141, 255, 156, 0.08), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.6);
  transition:
    max-height 180ms ease,
    opacity 180ms ease,
    padding 180ms ease;
}

.jukebox-track-menu::-webkit-scrollbar {
  width: 7px;
}

.jukebox-track-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.34);
  border-radius: 999px;
}

.jukebox-track-menu::-webkit-scrollbar-thumb {
  background: rgba(141, 255, 156, 0.42);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(141, 255, 156, 0.18);
}

.jukebox-track-menu.is-collapsed {
  max-height: 0;
  opacity: 0;
  padding-block: 0;
  border-width: 0;
}

.jukebox-track-button {
  min-height: 22px;
  padding: 4px 6px;
  border: 1px solid rgba(141, 255, 156, 0.15);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.48);
  color: #8dff9c;
  font-size: 0.43rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.jukebox-track-button[aria-pressed="true"] {
  color: #ffffff;
  border-color: rgba(141, 255, 156, 0.42);
  box-shadow: 0 0 14px rgba(141, 255, 156, 0.13);
}

.jukebox-display {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(230, 244, 255, 0.15), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f6fbff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.64rem;
  text-align: center;
  box-shadow:
    inset 0 0 16px rgba(130, 198, 255, 0.08),
    0 0 18px rgba(255, 255, 255, 0.04);
}

.jukebox-display-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.jukebox-eq {
  flex: 0 0 34px;
  height: 16px;
  padding: 0 1px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 1px;
}

.jukebox-eq span {
  display: block;
  min-height: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(177, 255, 166, 0.98), rgba(56, 255, 110, 0.9));
  box-shadow:
    0 0 6px rgba(86, 255, 123, 0.5),
    0 0 10px rgba(29, 178, 57, 0.24);
  animation: eqBounce 0.9s ease-in-out infinite;
  transform-origin: bottom center;
}

.jukebox-eq span:nth-child(2) { animation-delay: 0.08s; }
.jukebox-eq span:nth-child(3) { animation-delay: 0.16s; }
.jukebox-eq span:nth-child(4) { animation-delay: 0.24s; }
.jukebox-eq span:nth-child(5) { animation-delay: 0.32s; }
.jukebox-eq span:nth-child(6) { animation-delay: 0.4s; }
.jukebox-eq span:nth-child(7) { animation-delay: 0.48s; }
.jukebox-eq span:nth-child(8) { animation-delay: 0.56s; }

.jukebox-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.jukebox-transport {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.jukebox-transport .is-stopped {
  color: #ffca60;
  border-color: rgba(255, 202, 96, 0.42);
  background: rgba(255, 166, 0, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 202, 96, 0.08),
    0 0 16px rgba(255, 202, 96, 0.14);
}

.jukebox-transport button[aria-pressed="true"]:not(.is-stopped) {
  color: #8dff9c;
  border-color: rgba(141, 255, 156, 0.34);
  background: rgba(141, 255, 156, 0.08);
}

.jukebox-volume {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.jukebox-volume-display {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.34);
  color: var(--accent-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jukebox-volume-display strong {
  color: #8dff9c;
  font-size: 0.92rem;
}

.game-shell {
  padding: 20px;
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
    rgba(8, 8, 8, 0.92);
}

.tetris-game-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px clamp(14px, 3vw, 34px);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 225, 74, 0.08), transparent 42%, rgba(141, 255, 156, 0.08)),
    rgba(0, 0, 0, 0.54);
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.26),
    inset 0 0 18px rgba(255, 255, 255, 0.035);
}

.tetris-game-toolbar.is-hidden {
  display: none !important;
}

.tetris-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #ffe14a;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.tetris-game-toolbar h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 225, 74, 0.22),
    0 0 16px rgba(141, 255, 156, 0.14);
}

.tetris-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

body.tetris-game-active:not(.touch-device) {
  overflow: hidden;
}

body.tetris-game-active:not(.touch-device) .layout {
  width: min(1480px, calc(100% - 34px));
  min-height: 100vh;
  height: 100vh;
  padding: 82px 0 10px;
  grid-template-columns: minmax(300px, 360px) minmax(330px, 390px) minmax(300px, 360px);
  gap: clamp(14px, 1.6vw, 24px);
  align-items: start;
  align-content: start;
  justify-content: center;
}

body.tetris-game-active:not(.touch-device) .panel {
  padding: 15px;
}

body.tetris-game-active:not(.touch-device) .brand-lockup {
  gap: 12px;
}

body.tetris-game-active:not(.touch-device) .brand-mark {
  width: 76px;
  height: 76px;
}

body.tetris-game-active:not(.touch-device) .eyebrow {
  margin-bottom: 5px;
  font-size: 0.56rem;
  letter-spacing: 0.2em;
}

body.tetris-game-active:not(.touch-device) .brand-artwork-title {
  min-height: 56px;
  margin: 3px 0 5px;
  padding: 2px 0;
}

body.tetris-game-active:not(.touch-device) .brand-game-title-image {
  max-height: 58px;
}

body.tetris-game-active:not(.touch-device) .brand-subtitle {
  margin-top: 4px;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
}

body.tetris-game-active:not(.touch-device) .game-shell {
  max-width: 390px;
  padding: 14px;
  gap: 8px;
}

body.tetris-game-active:not(.touch-device) .sidebar {
  gap: 10px;
  min-width: 0;
}

body.tetris-game-active:not(.touch-device) .controls-card,
body.tetris-game-active:not(.touch-device) .score-card {
  padding: 11px 12px;
  border-radius: 14px;
}

body.tetris-game-active:not(.touch-device) .controls-card {
  margin-top: 9px;
}

body.tetris-game-active:not(.touch-device) .controls-card h2,
body.tetris-game-active:not(.touch-device) .score-card h2 {
  margin-bottom: 7px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

body.tetris-game-active:not(.touch-device) .controls-card p,
body.tetris-game-active:not(.touch-device) .stat {
  gap: 9px;
  font-size: 0.66rem;
  line-height: 1.12;
}

body.tetris-game-active:not(.touch-device) .stat {
  align-items: center;
  margin: 6px 0;
}

body.tetris-game-active:not(.touch-device) .stat span {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(247, 251, 255, 0.68);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

body.tetris-game-active:not(.touch-device) .stat strong {
  flex: 0 0 auto;
  color: #f7fbff;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

body.tetris-game-active:not(.touch-device) .controls-card p {
  margin: 4px 0;
}

body.tetris-game-active:not(.touch-device) .jukebox-card {
  margin-top: 9px;
  padding: 10px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(29, 224, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014)),
    rgba(2, 4, 8, 0.78);
  border-color: rgba(141, 255, 156, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 18px rgba(29, 224, 255, 0.07);
}

body.tetris-game-active:not(.touch-device) .jukebox-kicker {
  font-size: 0.48rem;
  letter-spacing: 0.1em;
}

body.tetris-game-active:not(.touch-device) .jukebox-kicker span {
  font-size: 0.42rem;
  letter-spacing: 0.12em;
}

body.tetris-game-active:not(.touch-device) .jukebox-display {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

body.tetris-game-active:not(.touch-device) .jukebox-eq {
  flex-basis: 28px;
  height: 12px;
}

body.tetris-game-active:not(.touch-device) .jukebox-header {
  grid-template-columns: 36px minmax(0, 1fr) 108px;
  gap: 5px;
  margin-bottom: 6px;
}

body.tetris-game-active:not(.touch-device) .jukebox-scope {
  width: 108px;
  height: 20px;
  justify-self: end;
  transform: none;
}

body.tetris-game-active:not(.touch-device) .jukebox-track-menu {
  max-height: 104px;
}

body.tetris-game-active:not(.touch-device) .jukebox-track-button {
  min-height: 20px;
  padding: 3px 6px;
  font-size: 0.39rem;
}

body.tetris-game-active:not(.touch-device) .jukebox-controls {
  gap: 6px;
  margin-top: 7px;
}

body.tetris-game-active:not(.touch-device) .jukebox-transport {
  gap: 6px;
  margin-top: 6px;
}

body.tetris-game-active:not(.touch-device) .jukebox-volume {
  grid-template-columns: 50px 1fr 50px;
  gap: 6px;
  margin-top: 6px;
}

body.tetris-game-active:not(.touch-device) .jukebox-volume-display {
  min-height: 28px;
  font-size: 0.48rem;
  letter-spacing: 0.1em;
}

body.tetris-game-active:not(.touch-device) .jukebox-volume-display strong {
  font-size: 0.72rem;
}

body.tetris-game-active:not(.touch-device) .jukebox-card button {
  min-height: 30px;
  padding-inline: 7px;
  font-size: 0.48rem;
}

body.tetris-game-active:not(.touch-device) #game {
  width: min(300px, calc((100vh - 148px) / 2));
}

body.tetris-game-active:not(.touch-device) .jukebox-scope canvas {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
}

body.silly-layout-active:not(.touch-device) .layout {
  width: min(1450px, calc(100% - 24px));
  grid-template-columns: minmax(250px, 1fr) minmax(340px, 390px) minmax(250px, 300px) minmax(270px, 330px);
  gap: 16px;
}

body.silly-layout-active:not(.touch-device) .game-shell {
  width: 100%;
  max-width: 390px;
  justify-self: center;
}

body.desktop-three-panel-layout:not(.touch-device):not(.silly-layout-active) .layout {
  width: min(1260px, calc(100% - 48px));
  grid-template-columns: minmax(285px, 340px) minmax(360px, 420px) minmax(285px, 340px);
  gap: clamp(22px, 2vw, 34px);
  justify-content: center;
}

body.desktop-three-panel-layout.silly-layout-active:not(.touch-device) .layout {
  width: min(1280px, calc(100% - 36px));
  grid-template-columns: minmax(270px, 330px) minmax(380px, 430px) minmax(270px, 330px);
  gap: clamp(18px, 1.8vw, 28px);
  justify-content: center;
}

body.desktop-three-panel-layout:not(.touch-device) .game-shell {
  width: 100%;
  justify-self: center;
}

body.desktop-three-panel-layout:not(.touch-device):not(.silly-layout-active) .game-shell {
  max-width: 420px;
  padding-inline: 24px;
}

body.desktop-three-panel-layout.silly-layout-active:not(.touch-device) .game-shell {
  max-width: 430px;
}

body.tetris-game-active.desktop-three-panel-layout:not(.touch-device) .layout {
  width: min(1480px, calc(100% - 34px));
  min-height: 100vh;
  height: 100vh;
  padding: 82px 0 10px;
  grid-template-columns: minmax(300px, 360px) minmax(330px, 390px) minmax(300px, 360px);
  gap: clamp(14px, 1.6vw, 24px);
  align-items: start;
  align-content: start;
  justify-content: center;
}

body.tetris-game-active.desktop-three-panel-layout:not(.touch-device):not(.silly-layout-active) .game-shell,
body.tetris-game-active.desktop-three-panel-layout.silly-layout-active:not(.touch-device) .game-shell {
  max-width: 390px;
  padding: 14px;
  gap: 8px;
}

.attract-screen {
  position: absolute;
  inset: 20px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at center 18%, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(18, 22, 34, 0.92), rgba(2, 2, 2, 0.98));
  opacity: 1;
  transition: opacity 220ms ease;
}

.attract-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.scanlines,
.demo-grid,
.demo-flash,
.demo-visual,
.demo-bottom-stack {
  position: absolute;
}

.scanlines {
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 2px,
    transparent 2px,
    transparent 6px
  );
  mix-blend-mode: screen;
  opacity: 0.22;
  pointer-events: none;
}

.demo-grid {
  left: -10%;
  right: -10%;
  bottom: -10%;
  height: 44%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(320px) rotateX(71deg);
  transform-origin: center top;
  opacity: 0.34;
}

.demo-flash {
  top: -6%;
  width: 56%;
  height: 78%;
  border-radius: 42% 58% 52% 48%;
  filter: blur(24px);
  opacity: 0.22;
  transform-origin: center;
  animation: demoGlowMorph 7.5s ease-in-out infinite;
}

.demo-flash-left {
  left: -16%;
  background:
    radial-gradient(circle at 38% 42%, rgba(56, 118, 255, 0.46), transparent 58%),
    radial-gradient(circle at 68% 66%, rgba(53, 255, 189, 0.2), transparent 48%);
}

.demo-flash-right {
  right: -16%;
  background:
    radial-gradient(circle at 62% 38%, rgba(255, 255, 255, 0.28), transparent 56%),
    radial-gradient(circle at 34% 72%, rgba(255, 77, 184, 0.16), transparent 48%);
  animation-delay: -3.2s;
}

.demo-jukebox-panel {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px 12px 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.64);
  box-shadow:
    inset 0 0 14px rgba(130, 198, 255, 0.07),
    0 0 18px rgba(255, 255, 255, 0.04);
}

.demo-jukebox-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 6px;
}

.demo-menu-toggle {
  min-width: 0;
  min-height: 22px;
  padding: 4px 5px;
  border: 1px solid rgba(141, 255, 156, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #8dff9c;
  font-size: 0.38rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 9px rgba(141, 255, 156, 0.06),
    0 0 13px rgba(141, 255, 156, 0.1);
}

.demo-jukebox-title {
  min-width: 0;
  color: #f7fbff;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-align: left;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.72),
    0 0 18px rgba(124, 202, 255, 0.46);
}

.demo-jukebox-title span {
  display: block;
  color: #8dff9c;
  font-size: 0.45rem;
  letter-spacing: 0.14em;
  text-shadow:
    0 0 8px rgba(141, 255, 156, 0.72),
    0 0 18px rgba(141, 255, 156, 0.32);
}

.mobile-mode-kicker {
  display: none;
}

body.touch-device .mobile-mode-kicker {
  display: inline;
}

.demo-jukebox-eq {
  width: 108px;
  height: 22px;
  padding: 2px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.56);
  border: 1px solid rgba(141, 255, 156, 0.18);
  box-shadow:
    inset 0 0 8px rgba(141, 255, 156, 0.08),
    0 0 10px rgba(61, 255, 106, 0.14);
  justify-self: end;
}

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

.demo-selection-menu {
  display: grid;
  gap: 4px;
  max-height: 92px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(141, 255, 156, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(141, 255, 156, 0.08), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.6);
  transition:
    max-height 180ms ease,
    opacity 180ms ease,
    padding 180ms ease;
}

.demo-selection-menu.is-collapsed {
  max-height: 0;
  opacity: 0;
  padding-block: 0;
  border-width: 0;
}

.demo-selection-button {
  min-height: 22px;
  padding: 4px 6px;
  border: 1px solid rgba(141, 255, 156, 0.15);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.48);
  color: #8dff9c;
  font-size: 0.43rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.demo-selection-button[aria-pressed="true"] {
  color: #ffffff;
  border-color: rgba(141, 255, 156, 0.42);
  box-shadow: 0 0 14px rgba(141, 255, 156, 0.13);
}

.demo-jukebox-controls {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 4px;
}

.demo-switch-controls,
.demo-sound-controls {
  min-width: 0;
  display: grid;
  align-items: center;
  gap: 4px;
}

.demo-switch-controls {
  grid-template-columns: 1fr 1fr;
}

.demo-sound-controls {
  grid-template-columns: minmax(0, 1fr) 76px 44px;
}

.demo-switch-controls .secondary-button,
.demo-sound-controls .secondary-button {
  min-width: 0;
}

.demo-volume {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 3px;
}

.demo-transport-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  min-width: 0;
}

.demo-mute-button,
.demo-play-pause-button,
.demo-stop-button {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 5px 4px;
  font-size: 0.35rem;
  letter-spacing: 0.025em;
}

.demo-mute-button {
  font-size: 0.31rem;
  letter-spacing: 0.005em;
}

.demo-jukebox-controls .secondary-button-small {
  min-height: 24px;
  padding: 5px 5px;
  font-size: 0.42rem;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.demo-mute-button[aria-pressed="true"] {
  color: #8dff9c;
  border-color: rgba(141, 255, 156, 0.34);
  background: rgba(141, 255, 156, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(141, 255, 156, 0.08),
    0 0 16px rgba(141, 255, 156, 0.08);
}

.demo-play-pause-button[aria-pressed="true"] {
  color: #ffdf7a;
  border-color: rgba(255, 214, 103, 0.36);
  background: rgba(255, 189, 73, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 214, 103, 0.08),
    0 0 16px rgba(255, 189, 73, 0.1);
}

.demo-stop-button {
  color: #ffc3a7;
  border-color: rgba(255, 118, 78, 0.26);
  background: rgba(255, 94, 68, 0.08);
}

.demo-play-pause-button.is-stopped,
.demo-stop-button.is-stopped {
  animation: demoTransportStoppedPulse 1.1s ease-in-out infinite;
  color: #ffd97a;
  border-color: rgba(255, 198, 82, 0.48);
  background: rgba(255, 166, 40, 0.12);
}

.demo-volume-display {
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent-soft);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.04),
    0 0 14px rgba(255, 255, 255, 0.04);
}

.demo-volume-display strong {
  color: #8dff9c;
  font-size: 0.68rem;
}

.demo-visual {
  left: 50%;
  top: 46px;
  width: 270px;
  height: 270px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: demoFloat 1.4s ease-in-out infinite;
  transition:
    width 240ms ease,
    height 240ms ease,
    top 240ms ease,
    transform 240ms ease,
    filter 240ms ease;
}

.attract-animation {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  mix-blend-mode: screen;
  transform-origin: center center;
  transition: transform 180ms ease;
  filter:
    contrast(1.05)
    brightness(0.98)
    saturate(1.08)
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.16))
    drop-shadow(0 0 34px rgba(92, 136, 255, 0.22));
}

.demo-emulator-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: #000;
  box-shadow:
    0 0 28px rgba(98, 255, 196, 0.18),
    inset 0 0 30px rgba(255, 255, 255, 0.025);
}

.demo-stopped-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  border-radius: 12px;
  box-shadow:
    0 0 28px rgba(98, 255, 196, 0.18),
    inset 0 0 30px rgba(255, 255, 255, 0.025);
}

.demo-emulator-frame.is-hidden {
  display: none !important;
}

.demo-stopped-image.is-hidden {
  display: none !important;
}

.demo-visual.is-emulator-mode .attract-animation {
  display: none !important;
}

.demo-visual.is-demo-stopped .attract-animation,
.demo-visual.is-demo-stopped .demo-emulator-frame {
  display: none !important;
}

.demo-visual.is-demo-stopped .demo-stopped-image {
  display: block !important;
}

.demo-visual.is-emulator-mode {
  width: min(334px, calc(100% - 28px));
  height: min(250px, calc(100% - 198px));
  top: 38px;
  animation: none;
  overflow: hidden;
}

.demo-visual.is-emulator-mode::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  cursor: inherit;
}

.attract-screen.is-emulator-popout {
  overflow: visible;
}

.demo-emulator-popout-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9980;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(47, 255, 177, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(4px) saturate(1.15);
}

.attract-screen.is-emulator-popout .demo-visual.is-emulator-mode {
  position: fixed;
  z-index: 9990;
  left: 50vw;
  top: 50vh;
  width: min(840px, calc(100vw - 48px));
  height: min(540px, calc(100vh - 74px));
  transform: translate(-50%, -50%);
  overflow: visible;
  filter:
    drop-shadow(0 0 24px rgba(141, 255, 156, 0.2))
    drop-shadow(0 24px 50px rgba(0, 0, 0, 0.58));
}

.demo-visual.is-emulator-mode:popover-open {
  position: fixed;
  inset: auto;
  left: 50vw;
  top: 50vh;
  z-index: 9990;
  width: min(840px, calc(100vw - 48px));
  height: min(540px, calc(100vh - 74px));
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  transform: translate(-50%, -50%);
  filter:
    drop-shadow(0 0 24px rgba(141, 255, 156, 0.2))
    drop-shadow(0 24px 50px rgba(0, 0, 0, 0.58));
}

.attract-screen.is-emulator-popout .demo-emulator-frame {
  border-radius: 18px;
  box-shadow:
    0 0 34px rgba(98, 255, 196, 0.24),
    0 28px 70px rgba(0, 0, 0, 0.64),
    inset 0 0 30px rgba(255, 255, 255, 0.025);
}

.attract-screen.is-emulator-popout .demo-stopped-image,
.demo-visual.is-emulator-mode:popover-open .demo-stopped-image {
  border-radius: 18px;
}

.attract-screen.is-emulator-demo .demo-bottom-stack {
  left: 16px;
  right: 16px;
  max-width: calc(100% - 32px);
  overflow: hidden;
}

.attract-screen.is-emulator-demo .demo-jukebox-panel,
.attract-screen.is-emulator-demo .attract-copy {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.attract-screen.is-emulator-demo .demo-sound-controls {
  grid-template-columns: minmax(0, 1fr) 70px 42px;
  gap: 3px;
}

.attract-screen.is-emulator-demo .demo-volume {
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 3px;
}

.attract-screen.is-emulator-demo .demo-jukebox-controls .secondary-button-small,
.attract-screen.is-emulator-demo .demo-mute-button,
.attract-screen.is-emulator-demo .demo-play-pause-button,
.attract-screen.is-emulator-demo .demo-stop-button {
  padding-inline: 4px;
  font-size: 0.35rem;
  letter-spacing: 0.025em;
}

.attract-animation-wide {
  transform: scale(1.34);
}

.demo-bottom-stack {
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.attract-copy {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px 8px 14px 14px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  text-align: center;
}

.attract-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #d3d7df;
}

.attract-copy h2 {
  margin: 7px 0 5px;
  min-height: 1.15em;
  overflow: hidden;
  font-size: clamp(0.92rem, 4.7vw, 1.18rem);
  letter-spacing: 0.16em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.attract-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

canvas {
  display: block;
  width: min(300px, 78vw);
  height: auto;
  border-radius: 16px;
  transform-origin: center center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(0, 0, 0, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 50px var(--grid-glow);
}

canvas.board-expand-bounce {
  animation: boardExpandBounce 720ms cubic-bezier(0.2, 0.86, 0.26, 1) both;
}

.touch-controls {
  width: min(300px, 78vw);
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.touch-controls-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.touch-control-button {
  appearance: none;
  min-height: 62px;
  padding: 8px 4px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(10, 14, 24, 0.9);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 18px rgba(0, 0, 0, 0.24);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.touch-control-button.is-pressed,
.touch-control-button:active {
  transform: translateY(1px) scale(0.985);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(14, 18, 30, 0.96);
}

.touch-control-glyph {
  font-size: 1.2rem;
  line-height: 1;
  color: #f8fbff;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.28),
    0 0 14px rgba(116, 192, 255, 0.2);
}

.touch-control-label {
  font-size: 0.56rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.rainbow-rain {
  position: absolute;
  inset: 20px;
  z-index: 1;
  overflow: hidden;
  border-radius: 16px;
  pointer-events: none;
  opacity: 0;
}

.rainbow-rain.visible {
  opacity: 1;
}

.rainbow-rain span {
  position: absolute;
  top: -30%;
  width: 12%;
  height: 150%;
  border-radius: 999px;
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(1px);
  animation: rainbowRainDrop 1.7s linear infinite;
}

.rainbow-rain span:nth-child(1) {
  left: 2%;
  background: linear-gradient(180deg, rgba(255, 84, 84, 0), rgba(255, 84, 84, 0.82), rgba(255, 203, 82, 0));
}

.rainbow-rain span:nth-child(2) {
  left: 15%;
  background: linear-gradient(180deg, rgba(255, 165, 64, 0), rgba(255, 165, 64, 0.82), rgba(255, 236, 140, 0));
  animation-delay: 0.16s;
}

.rainbow-rain span:nth-child(3) {
  left: 28%;
  background: linear-gradient(180deg, rgba(255, 238, 92, 0), rgba(255, 238, 92, 0.82), rgba(255, 255, 255, 0));
  animation-delay: 0.32s;
}

.rainbow-rain span:nth-child(4) {
  left: 41%;
  background: linear-gradient(180deg, rgba(103, 255, 112, 0), rgba(103, 255, 112, 0.82), rgba(195, 255, 217, 0));
  animation-delay: 0.08s;
}

.rainbow-rain span:nth-child(5) {
  left: 54%;
  background: linear-gradient(180deg, rgba(88, 220, 255, 0), rgba(88, 220, 255, 0.82), rgba(195, 245, 255, 0));
  animation-delay: 0.4s;
}

.rainbow-rain span:nth-child(6) {
  left: 67%;
  background: linear-gradient(180deg, rgba(92, 132, 255, 0), rgba(92, 132, 255, 0.82), rgba(207, 220, 255, 0));
  animation-delay: 0.24s;
}

.rainbow-rain span:nth-child(7) {
  left: 80%;
  background: linear-gradient(180deg, rgba(188, 102, 255, 0), rgba(188, 102, 255, 0.82), rgba(240, 208, 255, 0));
  animation-delay: 0.48s;
}

.rainbow-rain span:nth-child(8) {
  left: 90%;
  background: linear-gradient(180deg, rgba(255, 92, 181, 0), rgba(255, 92, 181, 0.82), rgba(255, 204, 236, 0));
  animation-delay: 0.12s;
}

.board-overlay {
  position: absolute;
  inset: 20px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 225, 74, 0.16), transparent 34%),
    rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px) brightness(0.58) saturate(1.1);
  opacity: 1;
  transition: opacity 180ms ease;
}

.board-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.board-overlay.visible {
  animation: overlayFlash 420ms ease 2;
}

.overlay-card {
  width: min(380px, 92%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 22px;
  text-align: center;
  color: #f7fbff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 225, 74, 0.18), transparent 46%),
    rgba(3, 4, 9, 0.96);
  background-size: 14px 14px, 14px 14px, auto, auto;
  border: 1px solid rgba(255, 225, 74, 0.48);
  box-shadow:
    0 0 32px rgba(255, 225, 74, 0.14),
    0 0 46px rgba(64, 231, 255, 0.1),
    inset 0 0 24px rgba(255, 255, 255, 0.045);
  overflow: hidden;
  position: relative;
}

.overlay-card::before {
  content: "ARCo. ARCADE";
  justify-self: center;
  width: min(100%, 220px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 225, 74, 0.08);
  border: 1px solid rgba(255, 225, 74, 0.22);
  color: #ffe14a;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 225, 74, 0.58),
    0 0 18px rgba(255, 225, 74, 0.18);
}

.overlay-card .primary-button,
.overlay-card .secondary-button {
  justify-self: center;
  width: min(100%, 230px);
  min-height: 36px;
  margin-top: 0;
  font-size: 0.64rem;
}

.overlay-card h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f7fbff;
  text-shadow: 0 0 12px rgba(255, 225, 74, 0.26);
}

.overlay-card p {
  margin: 0;
  color: rgba(247, 251, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.55;
}

.overlay-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  justify-self: stretch;
}

.overlay-card .high-score-entry {
  margin: 2px 0;
  padding: 13px;
  border-radius: 14px;
}

.overlay-card .high-score-entry label {
  margin-bottom: 9px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.overlay-card .high-score-entry input {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-color: rgba(141, 255, 156, 0.32);
  font-size: 1.24rem;
  letter-spacing: 0.36em;
}

.level-flash {
  position: absolute;
  left: 50%;
  top: 18%;
  z-index: 2;
  transform: translate(-50%, 12px) scale(0.88);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.2),
    0 0 44px rgba(117, 197, 255, 0.18);
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.8),
    0 0 16px rgba(117, 197, 255, 0.66),
    0 0 28px rgba(255, 98, 197, 0.44);
  max-width: calc(100% - 32px);
  text-align: center;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  white-space: normal;
}

.start-countdown {
  position: absolute;
  inset: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  background: rgba(6, 10, 20, 0.26);
  color: #f9fbff;
  font-size: clamp(2.3rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.92),
    0 0 22px rgba(110, 194, 255, 0.72),
    0 0 40px rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 26px rgba(120, 193, 255, 0.08);
  opacity: 0;
  pointer-events: none;
}

.start-countdown.visible {
  opacity: 1;
}

.tetris-intro-overlay {
  position: absolute;
  inset: 20px;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 225, 74, 0.12), transparent 32%),
    radial-gradient(circle at 22% 76%, rgba(29, 224, 255, 0.12), transparent 28%),
    rgba(1, 3, 9, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 40px rgba(29, 224, 255, 0.08);
}

.tetris-intro-overlay.hidden {
  display: none !important;
}

.tetris-intro-stars {
  position: absolute;
  inset: 0;
  opacity: 0.74;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(141, 255, 156, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(29, 224, 255, 0.8) 0 1px, transparent 1.5px);
  background-size: 42px 42px, 68px 68px, 94px 94px;
  animation: tetrisIntroStarDrift 5s linear infinite;
}

.tetris-intro-card {
  position: relative;
  width: min(280px, calc(100% - 26px));
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 16px;
  border: 1px solid rgba(255, 225, 74, 0.42);
  border-radius: 18px;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(0, 0, 0, 0.82);
  background-size: 12px 12px, 12px 12px, auto;
  box-shadow:
    0 0 28px rgba(255, 225, 74, 0.15),
    0 0 42px rgba(29, 224, 255, 0.1),
    inset 0 0 22px rgba(255, 255, 255, 0.045);
}

.tetris-intro-card span {
  color: #ffe14a;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.tetris-intro-card h2 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(1.45rem, 5vw, 2.25rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.72),
    0 0 22px rgba(255, 225, 74, 0.34),
    0 0 36px rgba(29, 224, 255, 0.18);
  animation: tetrisIntroTitlePulse 1.4s ease-in-out infinite;
}

.tetris-intro-card p {
  margin: 0;
  color: rgba(247, 251, 255, 0.72);
  font-size: 0.66rem;
  line-height: 1.45;
}

.tetris-intro-card button {
  min-height: 34px;
  padding-inline: 14px;
  font-size: 0.62rem;
  animation: tetrisIntroButtonBlink 1.1s ease-in-out infinite;
}

.tetris-intro-card em {
  color: rgba(141, 255, 156, 0.76);
  font-size: 0.5rem;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.countdown-ready {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: 0.22em;
  animation: readyMorph 1.2s linear infinite;
}

.countdown-number {
  font-size: clamp(3rem, 9vw, 5rem);
  letter-spacing: 0.12em;
  line-height: 1;
}

.level-flash.visible {
  animation: levelFlashPop 920ms ease forwards;
}

@keyframes overlayFlash {
  0%,
  100% {
    background: rgba(7, 13, 24, 0.68);
  }

  50% {
    background: rgba(255, 255, 255, 0.2);
  }
}

@keyframes tetrisIntroStarDrift {
  from {
    background-position: 0 0, 0 0, 0 0;
  }

  to {
    background-position: -42px 42px, 68px 68px, -94px 94px;
  }
}

@keyframes tetrisIntroTitlePulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  50% {
    transform: translateY(-1px) scale(1.025);
    filter: brightness(1.22);
  }
}

@keyframes tetrisIntroButtonBlink {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(255, 225, 74, 0.16),
      inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }

  50% {
    box-shadow:
      0 0 18px rgba(255, 225, 74, 0.34),
      0 0 28px rgba(29, 224, 255, 0.2),
      inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }
}

@keyframes rainbowRainDrop {
  0% {
    opacity: 0;
    transform: translateY(-14%) scaleY(0.78);
  }

  12% {
    opacity: 0.88;
  }

  100% {
    opacity: 0;
    transform: translateY(82%) scaleY(1.06);
  }
}

@keyframes levelFlashPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.82);
  }

  20% {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1.05);
  }

  48% {
    opacity: 1;
    transform: translate(-50%, -8px) scale(1.12);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -22px) scale(1.2);
  }
}

@keyframes brandSparkle {
  0%,
  100% {
    opacity: 0.94;
    filter: brightness(1);
  }

  20% {
    opacity: 1;
    filter: brightness(1.16);
  }

  22% {
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.95),
      0 0 20px rgba(122, 199, 255, 0.85),
      0 0 30px rgba(255, 116, 212, 0.5);
  }

  52% {
    opacity: 0.96;
    filter: brightness(1.04);
  }

  56% {
    text-shadow:
      0 0 12px rgba(255, 255, 255, 1),
      0 0 22px rgba(184, 232, 255, 0.8),
      0 0 34px rgba(255, 232, 122, 0.54);
  }
}

@keyframes sadDrip {
  0% {
    opacity: 0;
    transform: translateY(-6px);
  }

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

  72% {
    opacity: 0.95;
    transform: translateY(42px);
  }

  100% {
    opacity: 0;
    transform: translateY(58px);
  }
}

@keyframes readyMorph {
  0%,
  100% {
    color: #f9fbff;
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.92),
      0 0 22px rgba(110, 194, 255, 0.72),
      0 0 40px rgba(255, 255, 255, 0.3);
  }

  33% {
    color: #ffe7f7;
    text-shadow:
      0 0 10px rgba(255, 211, 243, 0.95),
      0 0 22px rgba(255, 96, 182, 0.7),
      0 0 40px rgba(255, 221, 244, 0.32);
  }

  66% {
    color: #fff7cf;
    text-shadow:
      0 0 10px rgba(255, 247, 204, 0.95),
      0 0 22px rgba(255, 214, 84, 0.72),
      0 0 40px rgba(255, 248, 219, 0.32);
  }
}

@keyframes comingSoonGlow {
  0%,
  100% {
    opacity: 0.78;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes eqBounce {
  0%,
  100% {
    height: 14%;
    opacity: 0.78;
  }

  20% {
    height: 74%;
    opacity: 1;
  }

  45% {
    height: 34%;
  }

  70% {
    height: 92%;
  }
}

@keyframes statBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-5px) scale(1.08);
  }
}

@keyframes statSpin {
  0% {
    transform: rotateX(0deg) rotateY(0deg) scale(0.96);
  }

  50% {
    transform: rotateX(180deg) rotateY(180deg) scale(1.08);
  }

  100% {
    transform: rotateX(360deg) rotateY(360deg) scale(0.96);
  }
}

@keyframes statGlow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
    opacity: 0.86;
  }

  50% {
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.7),
      0 0 18px rgba(120, 193, 255, 0.5);
    opacity: 1;
  }
}

@keyframes faceHappyPop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-2px) scale(1.06);
  }
}

@keyframes dogTongueBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scaleY(1);
  }

  50% {
    transform: translateX(-50%) translateY(2px) scale(1.06, 0.88);
  }
}

@keyframes faceAngryShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-2px) rotate(-2deg);
  }

  75% {
    transform: translateX(2px) rotate(2deg);
  }
}

@keyframes mouthHey {
  0%,
  100% {
    height: 7px;
    width: 22px;
    left: 26px;
  }

  50% {
    height: 15px;
    width: 18px;
    left: 28px;
  }
}

@keyframes mouthLove {
  0%,
  100% {
    height: 8px;
    width: 26px;
    left: 24px;
  }

  50% {
    height: 15px;
    width: 18px;
    left: 28px;
  }
}

@keyframes mouthGoodLuck {
  0%,
  100% {
    height: 7px;
    width: 25px;
    left: 24px;
  }

  34% {
    height: 15px;
    width: 17px;
    left: 28px;
  }

  68% {
    height: 10px;
    width: 30px;
    left: 22px;
  }
}

@keyframes mouthOhNo {
  0%,
  100% {
    transform: scale(0.82);
  }

  50% {
    transform: scale(1.1);
  }
}

@keyframes lovePop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.72);
  }

  24% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.08);
  }

  72% {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px) scale(0.9);
  }
}

@keyframes goodLuckPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(7px) scale(0.72);
  }

  24% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.08);
  }

  74% {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-14px) scale(0.88);
  }
}

@keyframes praisePop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(9px) scale(0.72) rotate(-2deg);
  }

  18% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.08) rotate(2deg);
  }

  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px) scale(1) rotate(-1deg);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.88) rotate(0deg);
  }
}

@keyframes heyPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(6px) scale(0.72);
  }

  28% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.12);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.9);
  }
}

@keyframes faceCryWobble {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(1px) rotate(-1.2deg);
  }
}

@keyframes tearDrop {
  0% {
    opacity: 0;
    transform: translateY(-2px) scale(0.6);
  }

  24% {
    opacity: 1;
  }

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-width: 300px;
}

.score-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.score-card.portal-scoreboard-hidden {
  display: none;
}

body.portal-dashboard-layout:not(.touch-device) .sidebar {
  gap: 12px;
}

body.portal-dashboard-layout:not(.touch-device) .high-scores-card {
  min-height: 174px;
}

body.portal-dashboard-layout:not(.touch-device) .controls-card {
  margin-top: 0;
  padding: 14px 15px;
}

body.portal-dashboard-layout:not(.touch-device) .portal-start-card {
  margin-top: 12px;
  width: 100%;
}

.score-card.demo-dance .score-stat,
.score-card.demo-dance .level-stat,
.score-card.demo-dance .lines-stat,
.score-card.demo-dance .next-level-stat {
  animation: statGlow 0.9s ease-in-out infinite;
}

.score-card.demo-dance .level-stat {
  animation-delay: 0.12s;
}

.score-card.demo-dance .lines-stat {
  animation-delay: 0.24s;
}

.score-card.demo-dance .next-level-stat {
  animation-delay: 0.36s;
}

.score-card.demo-dance .score-stat strong,
.score-card.demo-dance .level-stat strong,
.score-card.demo-dance .lines-stat strong,
.score-card.demo-dance .next-level-stat strong {
  animation: statSpin 0.34s linear infinite;
  display: inline-block;
  transform-origin: center center;
}

.score-card.demo-dance .score-stat strong {
  animation-delay: 0s;
}

.score-card.demo-dance .level-stat strong {
  animation-delay: 0.14s;
}

.score-card.demo-dance .lines-stat strong {
  animation-delay: 0.28s;
}

.score-card.demo-dance .next-level-stat strong {
  animation-delay: 0.42s;
}

.score-card h2 {
  margin-bottom: 12px;
}

.high-scores-card h2 {
  color: #f7fbff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.58),
    0 0 18px rgba(124, 202, 255, 0.34);
}

.high-scores-card h2 span {
  display: block;
  color: #8dff9c;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-shadow:
    0 0 8px rgba(141, 255, 156, 0.72),
    0 0 18px rgba(141, 255, 156, 0.32);
}

.reaction-face {
  position: relative;
  width: 74px;
  height: 58px;
  margin: 0 auto 12px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 46% 46% 44% 44%;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.16), transparent 34%),
    rgba(0, 0, 0, 0.34);
  box-shadow:
    inset 0 0 16px rgba(255, 255, 255, 0.08),
    0 0 16px rgba(255, 255, 255, 0.08);
  overflow: visible;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.face-ear,
.face-snout,
.face-nose,
.face-tongue,
.face-eye,
.face-brow,
.face-mouth,
.face-praise,
.face-good-luck,
.face-love,
.face-oh-no,
.face-hey,
.face-tear {
  position: absolute;
  transition: all 160ms ease;
}

.face-ear,
.face-snout,
.face-nose,
.face-tongue {
  opacity: 0;
  pointer-events: none;
}

.face-ear {
  top: -5px;
  width: 24px;
  height: 26px;
  border: 2px solid rgba(255, 236, 211, 0.58);
  border-radius: 70% 18% 64% 26%;
  background:
    linear-gradient(180deg, rgba(255, 223, 176, 0.92), rgba(154, 101, 47, 0.9));
  box-shadow:
    inset 0 0 8px rgba(255, 246, 232, 0.24),
    0 0 10px rgba(120, 77, 28, 0.2);
  z-index: 0;
}

.face-ear-left {
  left: -7px;
  transform: rotate(-28deg);
}

.face-ear-right {
  right: -7px;
  transform: scaleX(-1) rotate(-28deg);
}

.face-snout {
  left: 50%;
  bottom: 7px;
  width: 34px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 52% 52% 62% 62%;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.28), transparent 32%),
    linear-gradient(180deg, rgba(255, 228, 184, 0.96), rgba(214, 171, 114, 0.94));
  box-shadow:
    inset 0 -2px 6px rgba(113, 73, 31, 0.18),
    0 0 8px rgba(255, 220, 173, 0.18);
  z-index: 1;
}

.face-nose {
  left: 50%;
  bottom: 19px;
  width: 14px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50% 50% 65% 65%;
  background: linear-gradient(180deg, #342019, #110b08);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.24);
  z-index: 3;
}

.face-tongue {
  left: 50%;
  bottom: 4px;
  width: 13px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 0 0 999px 999px;
  background: linear-gradient(180deg, #ff9bb1, #ff6f8f);
  box-shadow: 0 0 8px rgba(255, 111, 143, 0.24);
  z-index: 2;
}

.face-eye {
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.42);
}

.face-eye-left {
  left: 22px;
}

.face-eye-right {
  right: 22px;
}

.face-brow {
  top: 14px;
  width: 17px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0);
}

.face-brow-left {
  left: 15px;
}

.face-brow-right {
  right: 15px;
}

.face-mouth {
  left: 23px;
  bottom: 15px;
  width: 28px;
  height: 8px;
  border-bottom: 3px solid #fff;
  border-radius: 0 0 999px 999px;
}

.face-praise,
.face-good-luck,
.face-love,
.face-oh-no,
.face-hey {
  left: 50%;
  top: -17px;
  opacity: 0;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  transform: translateX(-50%) scale(0.72);
  white-space: nowrap;
}

.face-praise {
  color: #ffffff;
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.72),
    0 0 16px rgba(120, 193, 255, 0.38);
}

.face-good-luck {
  color: #b8dcff;
  text-shadow:
    0 0 8px rgba(139, 215, 255, 0.7),
    0 0 16px rgba(89, 145, 255, 0.34);
}

.face-praise.is-popping {
  animation: praisePop 1.15s ease-out forwards;
}

.face-love {
  color: #9dffb5;
  text-shadow:
    0 0 8px rgba(94, 255, 139, 0.68),
    0 0 16px rgba(94, 255, 139, 0.32);
}

.face-oh-no {
  color: #ffb36a;
  text-shadow:
    0 0 8px rgba(255, 170, 76, 0.72),
    0 0 16px rgba(255, 121, 36, 0.34);
}

.face-hey {
  color: #ff7d7d;
  text-shadow:
    0 0 8px rgba(255, 76, 76, 0.68),
    0 0 16px rgba(255, 76, 76, 0.32);
}

.face-tear {
  top: 30px;
  width: 5px;
  height: 9px;
  opacity: 0;
  border-radius: 50% 50% 60% 60%;
  background: #8bd7ff;
  box-shadow: 0 0 10px rgba(83, 190, 255, 0.62);
}

.face-tear-left {
  left: 22px;
}

.face-tear-right {
  right: 22px;
}

.reaction-face.mood-neutral .face-mouth {
  bottom: 18px;
  height: 0;
  border-bottom-width: 3px;
  border-radius: 999px;
}

.reaction-face.silly-dog-face {
  width: 82px;
  height: 62px;
  border-color: rgba(255, 228, 173, 0.86);
  border-radius: 48% 48% 44% 44% / 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 244, 214, 0.34), transparent 28%),
    linear-gradient(180deg, rgba(245, 194, 124, 0.32), rgba(82, 46, 16, 0.34)),
    rgba(29, 18, 10, 0.5);
  box-shadow:
    inset 0 0 16px rgba(255, 235, 199, 0.12),
    0 0 18px rgba(255, 199, 125, 0.14);
}

.reaction-face.silly-dog-face .face-ear,
.reaction-face.silly-dog-face .face-snout,
.reaction-face.silly-dog-face .face-nose {
  opacity: 1;
}

.reaction-face.silly-dog-face .face-eye {
  top: 21px;
  width: 8px;
  height: 8px;
  background: #fff8ea;
  box-shadow:
    0 0 6px rgba(255, 234, 197, 0.34),
    0 0 0 2px rgba(39, 22, 11, 0.82);
}

.reaction-face.silly-dog-face .face-eye-left {
  left: 23px;
}

.reaction-face.silly-dog-face .face-eye-right {
  right: 23px;
}

.reaction-face.silly-dog-face .face-brow {
  top: 14px;
}

.reaction-face.silly-dog-face .face-mouth {
  left: 29px;
  bottom: 11px;
  width: 24px;
  height: 9px;
  border-bottom: 3px solid #3a2416;
  z-index: 2;
}

.reaction-face.silly-dog-face.mood-neutral .face-mouth {
  bottom: 13px;
  border-bottom-width: 2px;
}

.reaction-face.silly-dog-face.mood-happy .face-tongue,
.reaction-face.silly-dog-face.mood-love .face-tongue,
.reaction-face.silly-dog-face.mood-good-luck .face-tongue {
  opacity: 0.96;
  animation: dogTongueBounce 0.34s ease-in-out 3;
}

.reaction-face.silly-dog-face.mood-angry .face-ear-left {
  transform: rotate(-15deg) translateY(-1px);
}

.reaction-face.silly-dog-face.mood-angry .face-ear-right {
  transform: scaleX(-1) rotate(-15deg) translateY(-1px);
}

.reaction-face.silly-dog-face.mood-crying .face-tongue {
  opacity: 0.18;
}

.reaction-face.mood-happy,
.reaction-face.mood-love,
.reaction-face.mood-good-luck {
  border-color: rgba(94, 255, 139, 0.95);
  box-shadow:
    inset 0 0 16px rgba(94, 255, 139, 0.12),
    0 0 18px rgba(94, 255, 139, 0.3);
  animation: faceHappyPop 0.46s ease-in-out 2;
}

.reaction-face.mood-happy .face-eye,
.reaction-face.mood-love .face-eye,
.reaction-face.mood-good-luck .face-eye {
  background: #9dffb5;
  box-shadow: 0 0 10px rgba(94, 255, 139, 0.65);
}

.reaction-face.mood-happy .face-mouth,
.reaction-face.mood-love .face-mouth,
.reaction-face.mood-good-luck .face-mouth {
  bottom: 13px;
  height: 12px;
  border-color: #9dffb5;
}

.reaction-face.mood-good-luck .face-mouth {
  animation: mouthGoodLuck 0.14s steps(2, end) 5;
}

.reaction-face.mood-good-luck .face-good-luck {
  animation: goodLuckPop 0.78s ease-out forwards;
}

.reaction-face.mood-love .face-mouth {
  animation: mouthLove 0.18s steps(2, end) 8;
}

.reaction-face.mood-love .face-love {
  animation: lovePop 1.15s ease-out forwards;
}

.reaction-face.mood-oh-no {
  border-color: rgba(255, 154, 60, 0.96);
  box-shadow:
    inset 0 0 16px rgba(255, 154, 60, 0.12),
    0 0 18px rgba(255, 154, 60, 0.32);
  animation: faceHappyPop 0.38s ease-in-out 2;
}

.reaction-face.mood-oh-no .face-eye {
  background: #ffb36a;
  box-shadow: 0 0 10px rgba(255, 154, 60, 0.58);
}

.reaction-face.mood-oh-no .face-brow {
  background: #ffb36a;
  box-shadow: 0 0 8px rgba(255, 154, 60, 0.34);
}

.reaction-face.mood-oh-no .face-brow-left {
  transform: rotate(10deg);
}

.reaction-face.mood-oh-no .face-brow-right {
  transform: rotate(-10deg);
}

.reaction-face.mood-oh-no .face-mouth {
  bottom: 14px;
  width: 10px;
  height: 10px;
  left: 32px;
  border: 3px solid #ffb36a;
  border-radius: 50%;
  animation: mouthOhNo 0.22s ease-in-out 5;
}

.reaction-face.mood-oh-no .face-oh-no {
  animation: heyPop 1s ease-out forwards;
}

.reaction-face.mood-angry {
  border-color: rgba(255, 76, 76, 0.98);
  box-shadow:
    inset 0 0 16px rgba(255, 76, 76, 0.12),
    0 0 18px rgba(255, 76, 76, 0.36);
  animation: faceAngryShake 0.12s linear 7;
}

.reaction-face.mood-angry .face-eye {
  background: #ff6a6a;
  box-shadow: 0 0 12px rgba(255, 76, 76, 0.7);
}

.reaction-face.mood-angry .face-brow {
  background: #ff6a6a;
  box-shadow: 0 0 8px rgba(255, 76, 76, 0.42);
}

.reaction-face.mood-angry .face-brow-left {
  transform: rotate(22deg);
}

.reaction-face.mood-angry .face-brow-right {
  transform: rotate(-22deg);
}

.reaction-face.mood-angry .face-mouth {
  bottom: 10px;
  height: 12px;
  border-top: 3px solid #ff6a6a;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  animation: mouthHey 0.16s steps(2, end) 7;
}

.reaction-face.mood-angry .face-hey {
  animation: heyPop 0.9s ease-out forwards;
}

.reaction-face.mood-crying {
  border-color: rgba(94, 190, 255, 0.95);
  box-shadow:
    inset 0 0 16px rgba(94, 190, 255, 0.12),
    0 0 18px rgba(94, 190, 255, 0.28);
  animation: faceCryWobble 0.72s ease-in-out infinite;
}

.reaction-face.mood-crying .face-eye {
  width: 10px;
  height: 4px;
  border-radius: 999px;
  background: #bce9ff;
  box-shadow: 0 0 10px rgba(94, 190, 255, 0.62);
}

.reaction-face.mood-crying .face-brow {
  background: #bce9ff;
  box-shadow: 0 0 8px rgba(94, 190, 255, 0.36);
}

.reaction-face.mood-crying .face-brow-left {
  transform: rotate(-18deg);
}

.reaction-face.mood-crying .face-brow-right {
  transform: rotate(18deg);
}

.reaction-face.mood-crying .face-mouth {
  bottom: 10px;
  height: 12px;
  border-top: 3px solid #bce9ff;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.reaction-face.mood-crying .face-tear {
  animation: tearDrop 0.86s ease-in infinite;
}

.reaction-face.mood-crying .face-tear-right {
  animation-delay: 0.28s;
}

.high-scores-card {
  min-height: 188px;
}

.score-board-placeholder {
  min-height: 148px;
  display: grid;
  place-items: center;
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.22);
}

.high-scores-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.high-score-row,
.high-score-empty {
  display: grid;
  grid-template-columns: 30px 44px minmax(58px, 1fr) 36px 28px;
  align-items: center;
  gap: 5px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.64rem;
}

.high-score-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-score-row strong {
  color: var(--text);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.high-score-rank,
.high-score-platform,
.high-score-platform-heading {
  justify-self: center;
  text-align: center;
}

.high-score-name {
  justify-self: start;
  text-align: left;
}

.high-score-score,
.high-score-level {
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.high-score-level {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

.high-score-platform {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 16px;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.high-score-platform::before,
.high-score-platform::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.high-score-platform-mobile::before {
  width: 8px;
  height: 14px;
  border: 1px solid rgba(141, 255, 156, 0.9);
  border-radius: 2px;
  background:
    linear-gradient(rgba(141, 255, 156, 0.2), transparent 30%),
    rgba(0, 0, 0, 0.36);
  box-shadow: 0 0 7px rgba(141, 255, 156, 0.22);
}

.high-score-platform-mobile::after {
  bottom: 2px;
  width: 2px;
  height: 1px;
  background: rgba(141, 255, 156, 0.9);
}

.high-score-platform-desktop::before {
  top: 2px;
  width: 15px;
  height: 10px;
  border: 1px solid rgba(141, 255, 156, 0.9);
  border-radius: 1px;
  background:
    linear-gradient(rgba(141, 255, 156, 0.16), transparent 38%),
    rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 7px rgba(141, 255, 156, 0.22);
}

.high-score-platform-desktop::after {
  bottom: 1px;
  width: 10px;
  height: 4px;
  border-bottom: 1px solid rgba(141, 255, 156, 0.9);
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.high-score-heading {
  padding: 0 9px 2px;
  background: transparent;
  border: 0;
  color: var(--accent-soft);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.high-score-empty {
  grid-template-columns: 1fr;
  min-height: 120px;
  text-align: center;
  line-height: 1.5;
  place-items: center;
}

.high-score-entry {
  margin: 18px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(157, 255, 181, 0.36);
  background:
    radial-gradient(circle at top, rgba(157, 255, 181, 0.13), transparent 58%),
    rgba(0, 0, 0, 0.36);
  box-shadow:
    inset 0 0 16px rgba(157, 255, 181, 0.07),
    0 0 18px rgba(157, 255, 181, 0.12);
}

.high-score-entry label {
  display: block;
  margin-bottom: 12px;
  color: #baffc9;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(94, 255, 139, 0.42);
}

.high-score-entry input {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font: inherit;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.42em;
  text-align: center;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.06),
    0 0 14px rgba(255, 255, 255, 0.06);
}

.high-score-entry input:focus {
  outline: 2px solid rgba(157, 255, 181, 0.58);
  outline-offset: 2px;
}

.community-chat-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: min(720px, calc(100vh - 56px));
  max-height: calc(100vh - 56px);
  position: relative;
}

.community-chat-card {
  padding: 20px;
}

.community-chat-card h2 {
  margin-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chat-activation p,
.chat-status,
.chat-name-line {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.chat-activation p {
  margin: 0 0 10px;
}

.chat-rules-button {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 46, 182, 0.3), rgba(64, 255, 226, 0.28), rgba(255, 230, 67, 0.3)),
    rgba(0, 0, 0, 0.36);
  color: #ffffff;
  cursor: var(--amiga-cursor);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  padding: 7px 9px;
  text-transform: uppercase;
  animation: chatRulesGlow 1.6s linear infinite;
}

.chat-rules-button:hover,
.chat-rules-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.24),
    0 0 22px rgba(64, 255, 226, 0.24);
}

.chat-activate-form button:disabled {
  cursor: var(--amiga-cursor);
  opacity: 0.42;
}

.chat-activate-form,
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 7px;
  align-items: start;
}

.chat-activate-form input,
.chat-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  padding: 8px 10px;
  outline: none;
}

.chat-activate-form input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-weight: 800;
}

.chat-activate-form input:focus,
.chat-form input:focus {
  border-color: rgba(141, 255, 156, 0.5);
  box-shadow: 0 0 14px rgba(141, 255, 156, 0.08);
}

.chat-rules-agree {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.2;
}

.chat-rules-agree input {
  width: 13px;
  height: 13px;
  accent-color: #8dff9c;
}

.chat-rules-overlay {
  position: absolute;
  inset: 50px 12px 56px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(141, 255, 156, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 46, 182, 0.16), transparent 34%),
    radial-gradient(circle at 95% 15%, rgba(64, 255, 226, 0.15), transparent 34%),
    rgba(0, 0, 0, 0.92);
  box-shadow:
    0 0 22px rgba(141, 255, 156, 0.14),
    inset 0 0 18px rgba(255, 255, 255, 0.05);
}

.chat-rules-overlay h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.chat-rules-overlay ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 16px;
}

.chat-rules-overlay li {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.32;
}

.chat-rules-overlay .secondary-button {
  align-self: stretch;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 8px;
  min-height: 0;
  flex: 1;
}

.chat-name-line strong {
  color: #8dff9c;
  letter-spacing: 0.14em;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 320px;
  max-height: min(54vh, 560px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-message,
.chat-empty {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 18px 8px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.28;
}

.chat-message-time {
  position: absolute;
  top: 5px;
  right: 7px;
  color: rgba(237, 242, 255, 0.36);
  font-size: 0.45rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.chat-message-main {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  align-items: baseline;
}

.chat-message strong {
  display: inline-block;
  margin-right: 6px;
  color: #8dff9c;
  letter-spacing: 0.12em;
}

.chat-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-reaction-button {
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(237, 242, 255, 0.68);
  cursor: var(--amiga-cursor);
  font: inherit;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-reaction-button:hover,
.chat-reaction-button:focus-visible,
.chat-reaction-button.is-active {
  border-color: rgba(141, 255, 156, 0.5);
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 10px rgba(141, 255, 156, 0.16);
}

.chat-reaction-button:disabled {
  cursor: var(--amiga-cursor);
  opacity: 0.35;
  box-shadow: none;
}

.chat-reaction-button span {
  color: #8dff9c;
}

.chat-reaction-summary {
  color: rgba(237, 242, 255, 0.52);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.chat-users {
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(141, 255, 156, 0.06);
  color: rgba(237, 242, 255, 0.62);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-users strong {
  color: #8dff9c;
  margin-left: 5px;
}

.chat-send-stack {
  display: grid;
  gap: 5px;
}

.chat-send-stack .secondary-button-small {
  min-height: 26px;
  padding: 5px 7px;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
}

.chat-exit-button {
  border-color: rgba(255, 157, 157, 0.22);
  color: rgba(255, 216, 216, 0.82);
}

.chat-emoji-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.chat-emoji-panel button {
  min-width: 0;
  min-height: 24px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.32);
  cursor: var(--amiga-cursor);
  font-size: 0.78rem;
  line-height: 1;
}

.chat-emoji-panel button:hover,
.chat-emoji-panel button:focus-visible {
  border-color: rgba(64, 255, 226, 0.48);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(64, 255, 226, 0.16);
}

.chat-status {
  margin-top: 8px;
  color: #8dff9c;
}

.chat-status-error {
  color: #ff9d9d;
}

@keyframes chatRulesGlow {
  0% {
    filter: hue-rotate(0deg);
    box-shadow: 0 0 10px rgba(255, 46, 182, 0.22);
  }

  50% {
    filter: hue-rotate(160deg);
    box-shadow: 0 0 16px rgba(64, 255, 226, 0.3);
  }

  100% {
    filter: hue-rotate(360deg);
    box-shadow: 0 0 10px rgba(255, 230, 67, 0.22);
  }
}

body.touch-device .community-chat-panel,
body.touch-device .community-chat-card,
body.touch-device .game-selector-open-button,
body.touch-device .game-selector-overlay,
body.touch-device .delta-game-overlay {
  display: none !important;
}

.portal-start-card {
  padding: 7px 8px 8px;
}

.portal-control-kicker {
  margin-bottom: 5px;
  color: rgba(247, 251, 255, 0.78);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(116, 255, 226, 0.2);
}

.portal-game-control-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.portal-control-button {
  position: relative;
  width: 100%;
  min-height: 24px !important;
  padding: 3px 5px !important;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(4, 12, 14, 0.58);
  font-size: 0.44rem !important;
  letter-spacing: 0.055em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 0 5px rgba(116, 255, 226, 0.045);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.portal-control-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.portal-control-button:hover,
.portal-control-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(116, 255, 226, 0.42);
  filter: saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 7px rgba(116, 255, 226, 0.1),
    0 0 10px rgba(255, 78, 206, 0.04);
}

.portal-start-button {
  min-width: 0;
  color: #06100f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(116, 255, 226, 0.84)),
    #74ffe2;
}

.portal-start-button.is-placeholder {
  filter: grayscale(0.35);
  opacity: 0.82;
}

.game-selector-open-button {
  min-width: 0;
  margin-top: 0;
  color: #f7fbff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 78, 206, 0.2)),
    rgba(12, 9, 24, 0.84);
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 8px rgba(255, 78, 206, 0.08);
}

.game-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: grayscale(1) brightness(0.46) blur(2px);
}

.game-selector-modal {
  width: min(420px, calc(100vw - 34px));
  padding: 22px 20px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 18% 8%, rgba(116, 255, 226, 0.16), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(255, 78, 206, 0.14), transparent 30%),
    linear-gradient(160deg, rgba(18, 18, 20, 0.98), rgba(0, 0, 0, 0.94));
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.64),
    0 0 30px rgba(116, 255, 226, 0.12);
}

.game-selector-kicker {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.game-selector-modal h2 {
  margin-bottom: 7px;
  font-size: 1.08rem;
  letter-spacing: 0.14em;
}

.game-selector-modal p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.game-selector-buttons {
  display: grid;
  gap: 7px;
}

.game-select-button {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.26);
  font-family: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.game-select-button:hover,
.game-select-button:focus-visible,
.game-select-button.is-active {
  transform: translateY(-1px);
  border-color: rgba(116, 255, 226, 0.7);
  box-shadow:
    0 0 12px rgba(116, 255, 226, 0.18),
    inset 0 0 12px rgba(255, 255, 255, 0.04);
}

.game-select-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.game-select-button em,
.game-select-icon {
  color: var(--muted);
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-select-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 10px rgba(116, 255, 226, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transform-origin: center center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-select-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.game-select-button:hover .game-select-icon,
.game-select-button:focus-visible .game-select-icon {
  animation: gameIconBounce 520ms cubic-bezier(0.2, 1.24, 0.34, 1) both;
  box-shadow:
    0 0 18px rgba(116, 255, 226, 0.28),
    0 0 26px rgba(255, 78, 206, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.game-selector-return-button {
  width: 100%;
  margin-top: 13px;
  min-height: 38px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.delta-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(29, 224, 255, 0.14), transparent 34%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(3px) brightness(0.58) saturate(0.9);
}

.delta-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background:
    radial-gradient(circle at 22% 18%, rgba(29, 224, 255, 0.16), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(255, 76, 168, 0.18), transparent 32%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px) brightness(0.56) saturate(0.9);
}

.delta-welcome-overlay.is-hidden {
  display: none !important;
}

.delta-welcome-card {
  width: min(610px, 92vw);
  padding: clamp(20px, 3.4vw, 34px);
  border: 1px solid rgba(116, 255, 226, 0.32);
  border-radius: 24px;
  color: rgba(255, 242, 207, 0.82);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(128, 255, 114, 0.13), transparent 32%),
    rgba(4, 7, 13, 0.94);
  background-size: 22px 22px, 22px 22px, auto, auto;
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.66),
    0 0 34px rgba(29, 224, 255, 0.12),
    inset 0 0 30px rgba(255, 255, 255, 0.035);
  text-align: center;
}

.delta-welcome-card > span {
  display: block;
  margin-bottom: 8px;
  color: #80ff72;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.delta-welcome-card h2 {
  margin: 0 0 12px;
  color: #f7fbff;
  font-size: clamp(1.05rem, 3vw, 1.62rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(29, 224, 255, 0.24),
    0 0 18px rgba(255, 76, 168, 0.16);
}

.delta-welcome-card p {
  margin: 0 auto 12px;
  max-width: 56ch;
  font-size: 0.76rem;
  line-height: 1.55;
}

.delta-welcome-card strong {
  color: #ffbf4c;
}

.delta-welcome-card button {
  margin-top: 8px;
  min-width: 150px;
  min-height: 42px;
}

.delta-game-overlay.is-hidden {
  display: none !important;
}

.delta-game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 78, 206, 0.16), transparent 30%),
    radial-gradient(circle at 18% 18%, rgba(29, 224, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(6, 6, 8, 0.98), rgba(17, 11, 28, 0.98) 52%, rgba(2, 3, 6, 0.98));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.72);
}

.delta-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.38);
}

.delta-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #ffe14a;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.delta-game-toolbar h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(116, 255, 226, 0.16);
}

.delta-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.cosmic-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 83;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 122, 37, 0.16), transparent 34%),
    radial-gradient(circle at 28% 72%, rgba(64, 231, 255, 0.16), transparent 30%),
    rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px) brightness(0.56) saturate(1.08);
}

.cosmic-game-overlay.is-hidden {
  display: none !important;
}

.cosmic-game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 78% 12%, rgba(255, 225, 74, 0.14), transparent 28%),
    radial-gradient(circle at 16% 24%, rgba(64, 231, 255, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(5, 6, 13, 0.98), rgba(24, 9, 30, 0.98) 52%, rgba(2, 3, 8, 0.98));
  background-size: 24px 24px, 24px 24px, auto, auto, auto;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.72);
}

.cosmic-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 122, 37, 0.12), transparent 38%, rgba(64, 231, 255, 0.1)),
    rgba(0, 0, 0, 0.42);
}

.cosmic-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #ffe14a;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cosmic-game-toolbar h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 0.94rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 122, 37, 0.32),
    0 0 18px rgba(64, 231, 255, 0.16);
}

.cosmic-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.cosmic-game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(12px, 2.4vw, 30px);
}

#cosmicInvadersCanvas {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.7222));
  max-width: 1500px;
  height: auto;
  aspect-ratio: 31 / 18;
  border: 1px solid rgba(255, 225, 74, 0.24);
  border-radius: 18px;
  background: #01030a;
  image-rendering: pixelated;
  box-shadow:
    0 0 28px rgba(255, 122, 37, 0.18),
    0 0 44px rgba(64, 231, 255, 0.12),
    inset 0 0 26px rgba(255, 255, 255, 0.035);
}

.cosmic-high-score-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 122, 37, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.42);
}

.cosmic-high-score-overlay.is-hidden {
  display: none !important;
}

.cosmic-high-score-card {
  display: grid;
  gap: 9px;
  width: min(340px, 86vw);
  padding: 18px;
  border: 1px solid rgba(255, 225, 74, 0.52);
  border-radius: 18px;
  color: #f7fbff;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 225, 74, 0.2), transparent 42%),
    rgba(3, 5, 13, 0.96);
  background-size: 14px 14px, 14px 14px, auto, auto;
  box-shadow:
    0 0 30px rgba(255, 122, 37, 0.24),
    0 0 42px rgba(64, 231, 255, 0.16),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
}

.cosmic-high-score-card span {
  color: #ffe14a;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cosmic-high-score-card h3 {
  margin: 0;
  color: #ff7a25;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 122, 37, 0.44);
}

.cosmic-high-score-card p {
  margin: 0;
  color: rgba(64, 231, 255, 0.86);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cosmic-high-score-card input {
  width: 118px;
  margin: 0 auto;
  padding: 8px 9px;
  border: 1px solid rgba(64, 231, 255, 0.42);
  border-radius: 11px;
  color: #8cff2a;
  background: rgba(0, 0, 0, 0.72);
  font-family: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 12px rgba(64, 231, 255, 0.14);
}

.cosmic-high-score-card button {
  justify-self: center;
  min-height: 34px;
  padding-inline: 18px;
  font-size: 0.62rem;
}

.cosmic-touch-controls {
  display: none;
}

body.touch-device .cosmic-game-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.touch-device .cosmic-game-toolbar {
  padding: 8px 10px;
}

body.touch-device .cosmic-game-toolbar h2 {
  font-size: 0.76rem;
}

body.touch-device .cosmic-game-stage {
  align-content: center;
  gap: 8px;
  padding: 8px 8px 12px;
}

body.touch-device #cosmicInvadersCanvas {
  width: min(100%, calc((100vh - 134px) * 1.7222));
  max-height: calc(100vh - 134px);
  border-radius: 12px;
}

body.touch-device .cosmic-touch-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 520px);
}

body.touch-device .cosmic-touch-controls button {
  min-height: 42px;
  border: 1px solid rgba(255, 225, 74, 0.34);
  border-radius: 12px;
  color: #07100c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 225, 74, 0.88)),
    #ffe14a;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  touch-action: none;
  box-shadow:
    0 0 14px rgba(255, 122, 37, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.defender-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 78, 20, 0.2), transparent 30%),
    radial-gradient(circle at 26% 72%, rgba(29, 121, 255, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(3px) brightness(0.56) saturate(1.12);
}

.defender-game-overlay.is-hidden {
  display: none !important;
}

.defender-game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    radial-gradient(circle at 80% 16%, rgba(255, 225, 74, 0.16), transparent 26%),
    radial-gradient(circle at 14% 24%, rgba(29, 121, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(4, 3, 10, 0.98), rgba(22, 5, 4, 0.98) 52%, rgba(1, 4, 13, 0.98));
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  box-shadow: inset 0 0 96px rgba(0, 0, 0, 0.78);
}

.defender-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 44, 31, 0.14), transparent 38%, rgba(29, 121, 255, 0.13)),
    rgba(0, 0, 0, 0.44);
}

.defender-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #ffe14a;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.defender-game-toolbar h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 0.94rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255, 44, 31, 0.36),
    0 0 18px rgba(64, 231, 255, 0.18);
}

.defender-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.defender-game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(12px, 2.4vw, 30px);
}

#defenderItCanvas {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.7778));
  max-width: 1540px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 225, 74, 0.28);
  border-radius: 18px;
  background: #01030a;
  image-rendering: pixelated;
  box-shadow:
    0 0 32px rgba(255, 44, 31, 0.2),
    0 0 48px rgba(29, 121, 255, 0.16),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.defender-loading-overlay {
  position: absolute;
  inset: clamp(12px, 2.4vw, 30px);
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.defender-loading-overlay.is-hidden {
  display: none !important;
}

.defender-loading-frame {
  position: relative;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.7778), 1540px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 225, 74, 0.32);
  border-radius: 18px;
  background: #000;
  box-shadow:
    0 0 34px rgba(255, 44, 31, 0.22),
    inset 0 0 34px rgba(255, 255, 255, 0.04);
}

.defender-loading-frame::before,
.defender-loading-frame::after {
  content: "";
  position: absolute;
  inset: 2.8%;
  z-index: 3;
  border: 3px solid rgba(247, 251, 255, 0.84);
  box-shadow:
    0 0 12px rgba(247, 251, 255, 0.22),
    inset 0 0 12px rgba(64, 231, 255, 0.18);
}

.defender-loading-frame::after {
  inset: 4.4%;
  border-width: 1px;
  border-color: rgba(64, 231, 255, 0.6);
}

.defender-loading-tape {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  opacity: 0.92;
}

.defender-loading-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(74%, 720px);
  max-height: 80%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 0 10px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 18px rgba(64, 231, 255, 0.22));
}

.defender-loading-frame span {
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 4;
  transform: translateX(-50%);
  color: #ffe14a;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(0.58rem, 1.2vw, 0.9rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow:
    0 0 9px rgba(255, 225, 74, 0.8),
    0 0 16px rgba(255, 44, 31, 0.52);
  animation: defenderLoadingBlink 0.72s steps(2, end) infinite;
}

@keyframes defenderLoadingBlink {
  50% {
    opacity: 0.42;
  }
}

.defender-high-score-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 44, 31, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.48);
}

.defender-high-score-overlay.is-hidden {
  display: none !important;
}

.defender-high-score-card {
  display: grid;
  gap: 9px;
  width: min(340px, 86vw);
  padding: 18px;
  border: 1px solid rgba(255, 225, 74, 0.56);
  border-radius: 18px;
  color: #f7fbff;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 44, 31, 0.22), transparent 42%),
    rgba(3, 4, 10, 0.96);
  background-size: 14px 14px, 14px 14px, auto, auto;
  box-shadow:
    0 0 30px rgba(255, 44, 31, 0.26),
    0 0 42px rgba(64, 231, 255, 0.16),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
}

.defender-high-score-card span {
  color: #ffe14a;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.defender-high-score-card h3 {
  margin: 0;
  color: #ff2c1f;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 44, 31, 0.48);
}

.defender-high-score-card p {
  margin: 0;
  color: rgba(64, 231, 255, 0.86);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.defender-high-score-card input {
  width: 118px;
  margin: 0 auto;
  padding: 8px 9px;
  border: 1px solid rgba(64, 231, 255, 0.42);
  border-radius: 11px;
  color: #8cff2a;
  background: rgba(0, 0, 0, 0.72);
  font-family: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 12px rgba(64, 231, 255, 0.14);
}

.defender-high-score-card button {
  justify-self: center;
  min-height: 34px;
  padding-inline: 18px;
  font-size: 0.62rem;
}

.defender-touch-controls {
  display: none;
}

body.touch-device .defender-game-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.touch-device .defender-game-toolbar {
  padding: 8px 10px;
}

body.touch-device .defender-game-toolbar h2 {
  font-size: 0.76rem;
}

body.touch-device .defender-game-stage {
  align-content: center;
  gap: 8px;
  padding: 8px 8px 12px;
}

body.touch-device #defenderItCanvas {
  width: min(100%, calc((100vh - 178px) * 1.7778));
  max-height: calc(100vh - 178px);
  border-radius: 12px;
}

body.touch-device .defender-touch-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 560px);
}

body.touch-device .defender-touch-controls button {
  min-height: 38px;
  border: 1px solid rgba(255, 225, 74, 0.34);
  border-radius: 12px;
  color: #0d0703;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 122, 37, 0.88)),
    #ff7a25;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  touch-action: none;
  box-shadow:
    0 0 14px rgba(255, 44, 31, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.fruity-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(35, 220, 82, 0.2), transparent 31%),
    radial-gradient(circle at 78% 74%, rgba(255, 67, 48, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(3px) brightness(0.58) saturate(1.18);
}

.fruity-game-overlay.is-hidden {
  display: none !important;
}

.fruity-game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.036) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 24% 20%, rgba(38, 255, 106, 0.16), transparent 30%),
    radial-gradient(circle at 78% 24%, rgba(255, 225, 74, 0.14), transparent 26%),
    linear-gradient(145deg, rgba(2, 8, 4, 0.98), rgba(25, 12, 6, 0.98) 54%, rgba(3, 4, 8, 0.98));
  background-size: 18px 18px, 18px 18px, auto, auto, auto;
  box-shadow: inset 0 0 96px rgba(0, 0, 0, 0.78);
}

.fruity-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(24, 205, 77, 0.14), transparent 38%, rgba(255, 75, 72, 0.12)),
    rgba(0, 0, 0, 0.44);
}

.fruity-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #ffe14a;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.fruity-game-toolbar h2 {
  margin: 0;
  color: #fff8be;
  font-size: 0.94rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(38, 255, 106, 0.34),
    0 0 18px rgba(255, 75, 72, 0.2);
}

.fruity-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.fruity-game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(12px, 2.4vw, 30px);
}

#fruityFrankCanvas {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.6));
  max-width: 1180px;
  height: auto;
  aspect-ratio: 8 / 5;
  border: 1px solid rgba(255, 225, 74, 0.3);
  border-radius: 18px;
  background: #010401;
  image-rendering: pixelated;
  box-shadow:
    0 0 32px rgba(38, 255, 106, 0.2),
    0 0 48px rgba(255, 75, 72, 0.14),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.fruity-cpc-frame {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.36));
  max-width: 1180px;
  height: min(calc(100vh - 96px), calc((100vw - 28px) * 0.74));
  border: 1px solid rgba(255, 225, 74, 0.3);
  border-radius: 18px;
  background: #010101;
  box-shadow:
    0 0 32px rgba(38, 255, 106, 0.2),
    0 0 48px rgba(255, 75, 72, 0.14),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.fruity-cpc-frame.is-hidden {
  display: none !important;
}

.fruity-game-overlay.is-cpc-mode #fruityFrankCanvas,
.fruity-game-overlay.is-cpc-mode .fruity-start-animation,
.fruity-game-overlay.is-cpc-mode .fruity-touch-controls,
.fruity-game-overlay.is-cpc-mode .fruity-high-score-overlay {
  display: none !important;
}

.fruity-start-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.6));
  max-width: 1180px;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: contain;
  object-position: center;
  padding: 0;
  border: 1px solid rgba(255, 225, 74, 0.3);
  border-radius: 18px;
  background: #000;
  image-rendering: pixelated;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 32px rgba(38, 255, 106, 0.2),
    0 0 48px rgba(255, 75, 72, 0.14),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.fruity-start-animation.is-hidden {
  display: none !important;
}

.fruity-high-score-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 44%, rgba(38, 255, 106, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.48);
}

.fruity-high-score-overlay.is-hidden {
  display: none !important;
}

.fruity-high-score-card {
  display: grid;
  gap: 9px;
  width: min(340px, 86vw);
  padding: 18px;
  border: 1px solid rgba(255, 225, 74, 0.56);
  border-radius: 18px;
  color: #f7fbff;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(38, 255, 106, 0.2), transparent 42%),
    rgba(3, 8, 4, 0.96);
  background-size: 14px 14px, 14px 14px, auto, auto;
  box-shadow:
    0 0 30px rgba(38, 255, 106, 0.24),
    0 0 42px rgba(255, 75, 72, 0.15),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
}

.fruity-high-score-card span {
  color: #ffe14a;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.fruity-high-score-card h3 {
  margin: 0;
  color: #35ff75;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(38, 255, 106, 0.48);
}

.fruity-high-score-card p {
  margin: 0;
  color: rgba(255, 225, 74, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.fruity-high-score-card input {
  width: 118px;
  margin: 0 auto;
  padding: 8px 9px;
  border: 1px solid rgba(255, 225, 74, 0.42);
  border-radius: 11px;
  color: #35ff75;
  background: rgba(0, 0, 0, 0.72);
  font-family: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 12px rgba(38, 255, 106, 0.14);
}

.fruity-high-score-card button {
  justify-self: center;
  min-height: 34px;
  padding-inline: 18px;
  font-size: 0.62rem;
}

.fruity-version-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 32% 24%, rgba(38, 255, 106, 0.2), transparent 32%),
    radial-gradient(circle at 74% 72%, rgba(255, 75, 72, 0.18), transparent 36%),
    rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(5px) brightness(0.62) saturate(1.3);
}

.fruity-version-overlay.is-hidden {
  display: none !important;
}

.fruity-version-card {
  width: min(540px, 92vw);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 225, 74, 0.5);
  border-radius: 24px;
  color: #fff8be;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(38, 255, 106, 0.2), transparent 42%),
    rgba(3, 8, 4, 0.97);
  background-size: 14px 14px, 14px 14px, auto, auto;
  box-shadow:
    0 0 34px rgba(38, 255, 106, 0.25),
    0 0 50px rgba(255, 75, 72, 0.16),
    inset 0 0 28px rgba(255, 255, 255, 0.045);
}

.fruity-version-card span {
  color: #35ff75;
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.fruity-version-card h2 {
  margin: 0;
  color: #ffe14a;
  font-size: clamp(1.15rem, 4vw, 1.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 225, 74, 0.36);
}

.fruity-version-card p {
  margin: 0;
  color: rgba(247, 251, 255, 0.8);
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.fruity-version-actions button {
  min-height: 78px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px;
  font-size: 0.66rem;
  line-height: 1.3;
}

.fruity-version-actions strong {
  color: #ffe14a;
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.fruity-version-card > button {
  justify-self: center;
}

.fruity-touch-controls {
  display: none;
}

body.touch-device .fruity-game-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.touch-device .fruity-game-toolbar {
  padding: 8px 10px;
}

body.touch-device .fruity-game-toolbar h2 {
  font-size: 0.76rem;
}

body.touch-device .fruity-game-stage {
  align-content: center;
  gap: 8px;
  padding: 8px 8px 12px;
}

body.touch-device #fruityFrankCanvas {
  width: min(100%, calc((100vh - 178px) * 1.6));
  max-height: calc(100vh - 178px);
  border-radius: 12px;
}

body.touch-device .fruity-cpc-frame {
  width: min(100%, calc((100vh - 120px) * 1.36));
  height: min(calc(100vh - 120px), calc(100vw * 0.74));
  border-radius: 12px;
}

body.touch-device .fruity-start-animation {
  width: min(100%, calc((100vh - 178px) * 1.6));
  max-height: calc(100vh - 178px);
  border-radius: 12px;
}

body.touch-device .fruity-touch-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 560px);
}

body.touch-device .fruity-touch-controls button {
  min-height: 38px;
  border: 1px solid rgba(255, 225, 74, 0.34);
  border-radius: 12px;
  color: #07100c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(38, 255, 106, 0.88)),
    #35ff75;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  touch-action: none;
  box-shadow:
    0 0 14px rgba(38, 255, 106, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.minors-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(135deg, rgba(4, 9, 12, 0.96), rgba(8, 7, 4, 0.96) 52%, rgba(12, 4, 6, 0.96));
  background-size: 18px 18px, 18px 18px, auto;
  backdrop-filter: blur(3px) brightness(0.62) saturate(1.16);
}

.minors-game-overlay.is-hidden {
  display: none !important;
}

.minors-game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(160deg, rgba(1, 10, 15, 0.99), rgba(13, 10, 4, 0.99) 50%, rgba(15, 2, 7, 0.99));
  background-size: 16px 16px, 16px 16px, auto;
  box-shadow: inset 0 0 98px rgba(0, 0, 0, 0.82);
}

.minors-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(61, 224, 255, 0.13), transparent 42%, rgba(255, 49, 90, 0.12)),
    rgba(0, 0, 0, 0.46);
}

.minors-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #fff45b;
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.minors-game-toolbar h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 0.94rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(61, 224, 255, 0.34),
    0 0 18px rgba(255, 49, 90, 0.2);
}

.minors-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.minors-game-toolbar > div:first-child {
  flex: 0 0 auto;
  min-width: 0;
}

#closeMinorsGameButton {
  flex: 1 1 0;
  width: 100%;
  min-width: 138px;
}

body.admin-game-cheats-enabled .minors-debug-panel {
  flex: 0 0 auto;
}

body.admin-game-cheats-enabled .minors-debug-toggle-button {
  width: auto;
  min-width: 128px;
  padding-inline: 12px;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

@media (max-width: 560px) {
  body.admin-game-cheats-enabled .minors-game-toolbar {
    justify-content: flex-start;
  }

  body.admin-game-cheats-enabled .minors-game-toolbar > div:first-child {
    flex: 0 0 100%;
    order: 1;
  }

  body.admin-game-cheats-enabled #closeMinorsGameButton {
    flex: 1 1 calc(50% - 7px);
    order: 2;
    width: auto;
    padding-inline: 8px;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
  }

  body.admin-game-cheats-enabled .minors-debug-panel {
    flex: 1 1 calc(50% - 7px);
    order: 3;
    margin-left: auto;
  }

  body.admin-game-cheats-enabled .minors-debug-toggle-button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
  }
}

.minors-game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(12px, 2.4vw, 30px);
}

#minorsManicCanvas {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.333));
  max-width: 1180px;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(61, 224, 255, 0.34);
  border-radius: 8px;
  background: #010101;
  image-rendering: pixelated;
  box-shadow:
    0 0 32px rgba(61, 224, 255, 0.18),
    0 0 48px rgba(255, 49, 90, 0.13),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.minors-cpc-frame {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 94px) * 1.36));
  max-width: 1180px;
  height: min(calc(100vh - 96px), calc((100vw - 28px) * 0.74));
  border: 1px solid rgba(61, 224, 255, 0.34);
  border-radius: 8px;
  background: #010101;
  box-shadow:
    0 0 32px rgba(61, 224, 255, 0.18),
    0 0 48px rgba(255, 49, 90, 0.13),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.minors-cpc-frame.is-hidden {
  display: none !important;
}

.minors-game-overlay.is-cpc-mode #minorsManicCanvas,
.minors-game-overlay.is-cpc-mode .minors-touch-controls,
.minors-game-overlay.is-cpc-mode .minors-high-score-overlay,
.minors-game-overlay.is-cpc-mode .minors-debug-panel {
  display: none !important;
}

.minors-debug-panel {
  position: relative;
  flex: 0 0 auto;
  color: #f7fbff;
  z-index: 8;
}

.minors-debug-toggle-button {
  border: 1px solid rgba(255, 244, 91, 0.52);
  border-radius: 8px;
  color: #fff45b;
  background:
    linear-gradient(180deg, rgba(255, 244, 91, 0.12), rgba(0, 0, 0, 0.78)),
    #040506;
  box-shadow:
    0 0 18px rgba(255, 244, 91, 0.12),
    inset 0 0 18px rgba(61, 224, 255, 0.05);
}

.minors-debug-body {
  position: fixed;
  top: 72px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 9;
  display: grid;
  gap: 7px;
  width: min(470px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgba(255, 244, 91, 0.52);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.92);
  box-shadow:
    0 0 18px rgba(255, 244, 91, 0.16),
    0 14px 30px rgba(0, 0, 0, 0.4),
    inset 0 0 18px rgba(61, 224, 255, 0.06);
}

.minors-debug-panel.is-collapsed .minors-debug-body {
  display: none;
}

@media (max-width: 560px) {
  .minors-debug-body {
    top: 104px;
  }
}

.minors-debug-body label {
  color: #fff45b;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.minors-debug-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.minors-debug-controls select,
.minors-debug-controls button {
  min-height: 30px;
  border: 1px solid rgba(61, 224, 255, 0.36);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.minors-debug-controls select {
  min-width: 0;
  padding: 0 8px;
  color: #f7fbff;
  background: #05080a;
}

.minors-debug-controls button {
  padding: 0 9px;
  color: #061117;
  background: #fff45b;
}

.minors-debug-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  color: #f7fbff !important;
  font-size: 0.52rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.minors-debug-toggle input {
  width: 15px;
  height: 15px;
  accent-color: #fff45b;
}

.minors-high-score-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(0, 0, 0, 0.66);
  background-size: 14px 14px, 14px 14px, auto;
}

.minors-high-score-overlay.is-hidden {
  display: none !important;
}

.dizzyness-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(124, 255, 212, 0.18), transparent 31%),
    radial-gradient(circle at 78% 74%, rgba(255, 230, 109, 0.14), transparent 34%),
    rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(3px) brightness(0.58) saturate(1.14);
}

.dizzyness-game-overlay.is-hidden {
  display: none !important;
}

.dizzyness-game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 24% 20%, rgba(124, 255, 212, 0.15), transparent 30%),
    radial-gradient(circle at 78% 24%, rgba(255, 230, 109, 0.13), transparent 26%),
    linear-gradient(145deg, rgba(3, 7, 18, 0.99), rgba(13, 21, 8, 0.99) 54%, rgba(17, 8, 3, 0.99));
  background-size: 16px 16px, 16px 16px, auto, auto, auto;
  box-shadow: inset 0 0 98px rgba(0, 0, 0, 0.82);
}

.dizzyness-game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(124, 255, 212, 0.13), transparent 42%, rgba(255, 230, 109, 0.12)),
    rgba(0, 0, 0, 0.46);
}

.dizzyness-game-kicker {
  display: block;
  margin-bottom: 3px;
  color: #7cffd4;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.dizzyness-game-toolbar h2 {
  margin: 0;
  color: #ffe66d;
  font-size: 0.94rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dizzyness-game-toolbar button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.dizzyness-game-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: clamp(12px, 2.4vw, 30px);
}

.dizzyness-game-frame {
  display: block;
  width: min(calc(100vw - 28px), calc((100vh - 96px) * 1.333));
  max-width: 1180px;
  height: min(calc(100vh - 98px), calc((100vw - 28px) * 0.75));
  border: 1px solid rgba(124, 255, 212, 0.34);
  border-radius: 8px;
  background: #010101;
  box-shadow:
    0 0 32px rgba(124, 255, 212, 0.18),
    0 0 48px rgba(255, 230, 109, 0.13),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.minors-high-score-card {
  display: grid;
  gap: 9px;
  width: min(340px, 86vw);
  padding: 18px;
  border: 1px solid rgba(61, 224, 255, 0.56);
  border-radius: 8px;
  color: #f7fbff;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.044) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px),
    rgba(2, 9, 12, 0.97);
  background-size: 14px 14px, 14px 14px, auto;
  box-shadow:
    0 0 30px rgba(61, 224, 255, 0.24),
    0 0 42px rgba(255, 49, 90, 0.15),
    inset 0 0 22px rgba(255, 255, 255, 0.04);
}

.minors-high-score-card span {
  color: #fff45b;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.minors-high-score-card h3 {
  margin: 0;
  color: #3de0ff;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(61, 224, 255, 0.42);
}

.minors-high-score-card p {
  margin: 0;
  color: rgba(255, 244, 91, 0.9);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.minors-high-score-card input {
  width: 118px;
  margin: 0 auto;
  padding: 8px 9px;
  border: 1px solid rgba(61, 224, 255, 0.42);
  border-radius: 8px;
  color: #fff45b;
  background: rgba(0, 0, 0, 0.72);
  font-family: inherit;
  font-size: 1.25rem;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 12px rgba(61, 224, 255, 0.14);
}

.minors-high-score-card button {
  justify-self: center;
  min-height: 34px;
  padding-inline: 18px;
  font-size: 0.62rem;
}

.minors-touch-controls {
  display: none;
}

body.touch-device .minors-game-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.touch-device .minors-game-toolbar {
  padding: 8px 10px;
}

body.touch-device .minors-game-toolbar h2 {
  font-size: 0.76rem;
}

body.touch-device .minors-debug-panel {
  margin-left: auto;
}

body.touch-device .minors-debug-body {
  top: 86px;
  left: 50%;
  right: auto;
  width: min(360px, calc(100vw - 20px));
}

body.touch-device .minors-game-stage {
  align-content: center;
  gap: 8px;
  padding: 8px 8px 12px;
}

body.touch-device #minorsManicCanvas {
  width: min(100%, calc((100vh - 128px) * 1.333));
  max-height: calc(100vh - 128px);
  border-radius: 8px;
}

body.touch-device .minors-cpc-frame {
  width: min(100%, calc((100vh - 128px) * 1.36));
  max-height: calc(100vh - 128px);
}

body.touch-device .dizzyness-game-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

body.touch-device .dizzyness-game-toolbar {
  padding: 8px 10px;
}

body.touch-device .dizzyness-game-toolbar h2 {
  font-size: 0.76rem;
}

body.touch-device .dizzyness-game-stage {
  align-content: center;
  gap: 8px;
  padding: 8px 8px 12px;
}

body.touch-device .dizzyness-game-frame {
  width: min(100%, calc((100vh - 128px) * 1.333));
  max-height: calc(100vh - 128px);
}

body.touch-device .minors-touch-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 620px);
}

body.touch-device .minors-touch-controls button {
  min-height: 38px;
  border: 1px solid rgba(61, 224, 255, 0.34);
  border-radius: 8px;
  color: #061117;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(61, 224, 255, 0.88)),
    #3de0ff;
  font-family: inherit;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  touch-action: none;
  box-shadow:
    0 0 14px rgba(61, 224, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.app-return-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 225, 74, 0.16), transparent 34%),
    rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px) brightness(0.52) saturate(1.1);
}

.app-return-confirm-overlay.is-hidden {
  display: none !important;
}

.app-return-confirm-card {
  width: min(380px, 92vw);
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(255, 225, 74, 0.48);
  border-radius: 22px;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 225, 74, 0.18), transparent 46%),
    rgba(3, 4, 9, 0.96);
  background-size: 14px 14px, 14px 14px, auto, auto;
  box-shadow:
    0 0 32px rgba(255, 225, 74, 0.14),
    0 0 46px rgba(64, 231, 255, 0.1),
    inset 0 0 24px rgba(255, 255, 255, 0.045);
}

.app-return-confirm-card span {
  color: #ffe14a;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.app-return-confirm-card h2 {
  margin: 0;
  color: #f7fbff;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 225, 74, 0.26);
}

.app-return-confirm-card p {
  margin: 0;
  color: rgba(247, 251, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.55;
}

.app-return-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.app-return-confirm-actions button {
  min-width: 94px;
  min-height: 36px;
  font-size: 0.64rem;
}

.delta-native-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(205px, 1fr) auto auto auto;
  gap: clamp(5px, 0.85vh, 10px);
  min-height: 0;
  padding: clamp(14px, 2.6vw, 34px);
  overflow: hidden;
}

.delta-instructions-button {
  position: absolute;
  top: clamp(9px, 1.3vw, 16px);
  left: clamp(9px, 1.3vw, 16px);
  z-index: 8;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #07080d;
  background:
    linear-gradient(90deg, #1de0ff, #80ff72, #ffbf4c, #ff4ca8, #1de0ff);
  background-size: 220% 100%;
  box-shadow:
    0 0 14px rgba(128, 255, 114, 0.22),
    0 0 28px rgba(255, 76, 168, 0.14);
  font-family: inherit;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: deltaInstructionGlow 3.4s linear infinite;
}

.delta-click-bleep-button {
  top: clamp(42px, 4.1vw, 52px);
  left: clamp(9px, 1.3vw, 16px);
  min-width: 78px;
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(3, 8, 8, 0.82);
  box-shadow:
    0 0 14px rgba(29, 224, 255, 0.18),
    inset 0 0 16px rgba(255, 255, 255, 0.04);
  animation: none;
}

.delta-click-bleep-button.is-off {
  color: rgba(255, 242, 207, 0.62);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.62);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.42);
}

.delta-instructions-button:hover,
.delta-instructions-button:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(128, 255, 114, 0.34),
    0 0 36px rgba(255, 76, 168, 0.22);
}

.delta-instructions-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
  background:
    radial-gradient(circle at 20% 16%, rgba(29, 224, 255, 0.12), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(255, 76, 168, 0.14), transparent 30%),
    rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px) brightness(0.62);
}

.delta-instructions-overlay.is-hidden {
  display: none !important;
}

.delta-instructions-card {
  width: min(900px, 94vw);
  max-height: min(82vh, 680px);
  overflow-y: auto;
  padding: clamp(16px, 2.8vw, 28px);
  border: 1px solid rgba(116, 255, 226, 0.28);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(128, 255, 114, 0.12), transparent 32%),
    rgba(4, 7, 13, 0.94);
  background-size: 22px 22px, 22px 22px, auto, auto;
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.62),
    inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.delta-instructions-heading {
  margin-bottom: 14px;
}

.delta-instructions-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.delta-instructions-heading h3 {
  margin: 0;
  color: #fff2cf;
  font-size: clamp(1rem, 2vw, 1.42rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 191, 76, 0.18);
}

.delta-instructions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delta-instructions-grid section {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.delta-instructions-grid h4 {
  margin: 0 0 8px;
  color: #80ff72;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.delta-instructions-grid p {
  margin: 0 0 7px;
  color: rgba(255, 242, 207, 0.76);
  font-size: 0.68rem;
  line-height: 1.45;
}

.delta-instructions-grid p:last-child {
  margin-bottom: 0;
}

.delta-instructions-grid strong {
  color: #ffbf4c;
  font-weight: 700;
}

.delta-instructions-card > button {
  display: block;
  margin: 16px auto 0;
}

@keyframes deltaInstructionGlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 220% 50%;
  }
}

.delta-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(620px, 1.18fr);
  gap: clamp(9px, 1.4vw, 18px);
  min-height: 0;
}

.delta-left-deck {
  display: grid;
  grid-template-rows: minmax(96px, auto) minmax(88px, 27%);
  align-content: space-between;
  gap: clamp(4px, 0.7vh, 8px);
  min-width: 0;
  min-height: 0;
}

.delta-native-hero {
  position: relative;
  z-index: 5;
  display: grid;
  align-items: start;
  justify-items: center;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  transform: translateY(clamp(-76px, -7vh, -48px));
}

.delta-native-logo {
  display: block;
  width: min(82%, 395px);
  height: auto;
  max-height: 96%;
  object-fit: contain;
  object-position: center top;
  opacity: 0.88;
  mix-blend-mode: normal;
  pointer-events: none;
  filter:
    saturate(0.96)
    drop-shadow(0 0 18px rgba(29, 224, 255, 0.2))
    drop-shadow(0 0 30px rgba(255, 76, 168, 0.14));
}

.delta-scope-surface {
  position: relative;
  z-index: 1;
  align-self: end;
  transform: translateY(clamp(-15px, -1.4vh, -7px));
  min-height: 0;
  border: 1px solid rgba(116, 255, 226, 0.2);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, rgba(29, 224, 255, 0.1), rgba(255, 76, 168, 0.07) 44%, rgba(128, 255, 114, 0.06)),
    #07080d;
  background-size: 28px 28px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 0 30px rgba(255, 255, 255, 0.035);
}

.delta-scope-surface canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 88px;
}

.delta-visualizer-switch {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(116, 255, 226, 0.24);
  border-radius: 10px;
  color: rgba(255, 242, 207, 0.76);
  background: rgba(0, 0, 0, 0.56);
  box-shadow:
    0 0 16px rgba(29, 224, 255, 0.08),
    inset 0 0 10px rgba(255, 255, 255, 0.035);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.delta-visualizer-switch select {
  min-height: 22px;
  max-width: 112px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.64);
  font: inherit;
  font-size: 0.48rem;
}

.delta-sample-panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: clamp(12px, 1.6vw, 18px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 10%, rgba(128, 255, 114, 0.1), transparent 34%),
    linear-gradient(135deg, rgba(255, 76, 168, 0.08), transparent 42%),
    rgba(4, 6, 12, 0.82);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.34),
    inset 0 0 30px rgba(255, 255, 255, 0.03);
}

.delta-sample-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.delta-sample-heading span {
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.delta-sample-heading strong {
  color: #80ff72;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(128, 255, 114, 0.2);
}

.delta-sample-panel p {
  margin: 0;
  color: rgba(255, 242, 207, 0.66);
  font-size: 0.68rem;
  line-height: 1.35;
}

.delta-sample-grid {
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.delta-sample-slot {
  display: grid;
  grid-template-columns:
    minmax(50px, 0.32fr)
    minmax(82px, 0.72fr)
    30px
    minmax(76px, 0.54fr)
    29px
    29px
    31px
    minmax(78px, 0.6fr)
    minmax(78px, 0.54fr)
    32px
    34px
    34px
    minmax(70px, 0.5fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.delta-sample-slot.is-queued,
.delta-sample-slot.is-stopping {
  border-color: rgba(255, 191, 76, 0.58);
  box-shadow: 0 0 14px rgba(255, 191, 76, 0.14);
}

.delta-sample-slot.is-playing,
.delta-sample-slot.is-stopped {
  border-color: rgba(128, 255, 114, 0.58);
  box-shadow: 0 0 14px rgba(128, 255, 114, 0.14);
}

.delta-sample-toggle {
  width: 100%;
  min-height: 28px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f7fbff;
  background: rgba(10, 12, 20, 0.9);
  font-size: 0.43rem;
  letter-spacing: 0.025em;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.delta-sample-slot.is-queued .delta-sample-toggle,
.delta-sample-slot.is-stopping .delta-sample-toggle {
  color: #1d1100;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), #ffbf4c);
  animation: deltaQueuedPulse 0.68s steps(2, end) infinite;
}

.delta-sample-slot.is-playing .delta-sample-toggle,
.delta-sample-slot.is-stopped .delta-sample-toggle {
  color: #07120e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), #80ff72);
  animation: none;
}

.delta-sample-slot.is-reverse-playing .delta-sample-toggle {
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 76, 168, 0.86)),
    #ff4ca8;
  box-shadow:
    inset 0 0 9px rgba(255, 255, 255, 0.16),
    0 0 14px rgba(255, 76, 168, 0.28);
}

.delta-sample-slot strong {
  min-width: 0;
  overflow: hidden;
  color: #fff2cf;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.delta-sample-slot select {
  min-width: 0;
  width: 100%;
  min-height: 30px;
  box-sizing: border-box;
  padding: 0 20px 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.56);
  font: inherit;
  font-size: 0.48rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delta-sample-slot .delta-variation-select {
  padding-right: 16px;
  font-size: 0.43rem;
  letter-spacing: 0.01em;
}

.delta-sample-slot .delta-reentry-select {
  color: #d7f7ff;
}

.delta-sample-slot .delta-genre-select {
  color: #80ff72;
}

.delta-sample-slot .delta-loop-bars-select {
  color: #ffbf4c;
  padding-right: 14px;
  font-size: 0.44rem;
}

.delta-sample-eq-button,
.delta-sample-fx-button,
.delta-sample-cfg-button {
  width: 100%;
  min-height: 28px;
  padding: 0 3px;
  border: 1px solid rgba(29, 224, 255, 0.35);
  border-radius: 8px;
  color: #061014;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(29, 224, 255, 0.88)),
    #1de0ff;
  box-shadow:
    inset 0 0 9px rgba(255, 255, 255, 0.18),
    0 0 10px rgba(29, 224, 255, 0.12);
  font-family: inherit;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.delta-sample-fx-button {
  border-color: rgba(255, 191, 76, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 191, 76, 0.9)),
    #ffbf4c;
}

.delta-sample-cfg-button {
  border-color: rgba(255, 76, 168, 0.42);
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 76, 168, 0.25)),
    rgba(0, 0, 0, 0.6);
  box-shadow:
    inset 0 0 9px rgba(255, 255, 255, 0.08),
    0 0 10px rgba(255, 76, 168, 0.1);
  font-size: 0.42rem;
}

.delta-sample-eq-button:hover,
.delta-sample-eq-button:focus-visible,
.delta-sample-fx-button:hover,
.delta-sample-fx-button:focus-visible,
.delta-sample-cfg-button:hover,
.delta-sample-cfg-button:focus-visible {
  border-color: rgba(128, 255, 114, 0.72);
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.24),
    0 0 14px rgba(128, 255, 114, 0.26);
}

.delta-sample-slot label {
  grid-column: 2 / 14;
  display: grid;
  grid-template-columns: auto 1fr 4ch;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.51rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delta-sample-slot label em {
  color: #ffbf4c;
  font-style: normal;
  text-align: right;
}

.delta-filter-knob,
.delta-speed-knob,
.delta-pitch-knob,
.delta-fine-pitch-knob {
  --pitch-angle: 0deg;
  --fine-pitch-angle: 0deg;
  --filter-angle: 0deg;
  --speed-angle: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 28px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.58);
  cursor: ew-resize;
  touch-action: none;
}

.delta-filter-knob {
  color: #d7f7ff;
  border-color: rgba(29, 224, 255, 0.22);
  background:
    radial-gradient(circle at 50% 36%, rgba(29, 224, 255, 0.12), transparent 48%),
    rgba(0, 0, 0, 0.62);
}

.delta-speed-knob {
  color: #fff2cf;
  border-color: rgba(255, 191, 76, 0.24);
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 191, 76, 0.12), transparent 48%),
    rgba(0, 0, 0, 0.62);
}

.delta-fine-pitch-knob {
  color: #d7f7ff;
  border-color: rgba(255, 76, 168, 0.28);
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 76, 168, 0.13), transparent 48%),
    rgba(0, 0, 0, 0.62);
}

.delta-speed-knob.is-double {
  border-color: rgba(128, 255, 114, 0.38);
  box-shadow: 0 0 10px rgba(128, 255, 114, 0.12);
}

.delta-speed-knob.is-half {
  border-color: rgba(255, 191, 76, 0.38);
  box-shadow: 0 0 10px rgba(255, 191, 76, 0.12);
}

.delta-speed-knob.is-reverse {
  border-color: rgba(255, 76, 168, 0.5);
  box-shadow:
    0 0 10px rgba(255, 76, 168, 0.16),
    inset 0 0 10px rgba(255, 76, 168, 0.08);
}

.delta-speed-knob.is-armed {
  animation: deltaReverseArmFlash 0.58s steps(2, end) 2;
}

.delta-filter-knob.is-lowpass {
  border-color: rgba(255, 191, 76, 0.34);
  box-shadow: 0 0 10px rgba(255, 191, 76, 0.1);
}

.delta-filter-knob.is-highpass {
  border-color: rgba(29, 224, 255, 0.36);
  box-shadow: 0 0 10px rgba(29, 224, 255, 0.12);
}

.delta-filter-knob:focus-visible,
.delta-speed-knob:focus-visible,
.delta-pitch-knob:focus-visible,
.delta-fine-pitch-knob:focus-visible {
  outline: 2px solid rgba(128, 255, 114, 0.72);
  outline-offset: 2px;
}

.delta-filter-knob::after,
.delta-speed-knob::after,
.delta-pitch-knob::after,
.delta-fine-pitch-knob::after {
  content: "st";
  position: absolute;
  left: 4px;
  bottom: 1px;
  color: rgba(255, 242, 207, 0.64);
  font-size: 0.42rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.delta-filter-knob::after {
  content: "flt";
}

.delta-speed-knob::after {
  content: "spd";
}

.delta-fine-pitch-knob::after {
  content: "ct";
}

.delta-filter-knob em,
.delta-speed-knob em,
.delta-pitch-knob em,
.delta-fine-pitch-knob em {
  position: absolute;
  right: 3px;
  bottom: 1px;
  color: #ffbf4c;
  font-size: 0.36rem;
  font-style: normal;
  line-height: 1;
}

.delta-filter-knob em {
  color: #d7f7ff;
}

.delta-speed-knob em {
  color: #ffbf4c;
}

.delta-fine-pitch-knob em {
  color: #ff4ca8;
}

.delta-filter-dial,
.delta-speed-dial,
.delta-pitch-dial,
.delta-fine-pitch-dial {
  position: relative;
  width: 23px;
  height: 23px;
  border: 3px solid rgba(255, 242, 207, 0.34);
  border-top-color: rgba(255, 242, 207, 0.76);
  border-radius: 50%;
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, 0.7),
    0 0 8px rgba(128, 255, 114, 0.08);
}

.delta-filter-dial {
  border-color: rgba(29, 224, 255, 0.3);
  border-top-color: rgba(255, 191, 76, 0.82);
}

.delta-speed-dial {
  border-color: rgba(255, 191, 76, 0.32);
  border-top-color: rgba(128, 255, 114, 0.82);
}

.delta-fine-pitch-dial {
  border-color: rgba(255, 76, 168, 0.32);
  border-top-color: rgba(29, 224, 255, 0.82);
}

.delta-filter-dial::before,
.delta-speed-dial::before,
.delta-pitch-dial::before,
.delta-fine-pitch-dial::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: #fff2cf;
  box-shadow: 0 0 6px rgba(255, 191, 76, 0.45);
  transform: translateX(-50%) rotate(var(--pitch-angle));
  transform-origin: 50% 9px;
}

.delta-filter-dial::before {
  background: #1de0ff;
  box-shadow: 0 0 6px rgba(29, 224, 255, 0.5);
  transform: translateX(-50%) rotate(var(--filter-angle));
}

.delta-speed-dial::before {
  background: #ffbf4c;
  box-shadow: 0 0 6px rgba(255, 191, 76, 0.5);
  transform: translateX(-50%) rotate(var(--speed-angle));
}

.delta-fine-pitch-dial::before {
  background: #ff4ca8;
  box-shadow: 0 0 6px rgba(255, 76, 168, 0.5);
  transform: translateX(-50%) rotate(var(--fine-pitch-angle));
}

.delta-context-tip {
  display: none;
}

.delta-context-tip.is-hidden {
  display: none;
}

.delta-sample-status {
  min-height: 24px;
  padding: 6px 8px;
  border-radius: 9px;
  color: rgba(128, 255, 114, 0.92);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delta-sample-status.is-tooltip {
  color: rgba(128, 255, 114, 0.92);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: none;
}

.delta-sample-eq-panel,
.delta-sample-fx-panel,
.delta-one-shot-panel,
.delta-advanced-tempo-panel,
.delta-sample-cfg-panel {
  position: absolute;
  right: clamp(16px, 3vw, 38px);
  bottom: clamp(88px, 12vh, 118px);
  z-index: 24;
  width: min(330px, calc(100vw - 34px));
  padding: 12px;
  border: 1px solid rgba(116, 255, 226, 0.32);
  border-radius: 17px;
  color: #fff2cf;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(29, 224, 255, 0.14), transparent 36%),
    rgba(3, 7, 12, 0.96);
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.56),
    0 0 30px rgba(29, 224, 255, 0.12),
    inset 0 0 22px rgba(255, 255, 255, 0.035);
}

.delta-sample-fx-panel {
  width: min(520px, calc(100vw - 34px));
  max-height: min(74vh, 680px);
  overflow: auto;
  scrollbar-color: rgba(128, 255, 114, 0.55) rgba(0, 0, 0, 0.35);
}

.delta-sample-eq-panel.is-hidden,
.delta-sample-fx-panel.is-hidden,
.delta-one-shot-panel.is-hidden,
.delta-advanced-tempo-panel.is-hidden,
.delta-sample-cfg-panel.is-hidden {
  display: none !important;
}

.delta-advanced-tempo-panel,
.delta-sample-cfg-panel {
  bottom: clamp(70px, 9vh, 116px);
  width: min(520px, calc(100vw - 34px));
  border-color: rgba(29, 224, 255, 0.28);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(29, 224, 255, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(128, 255, 114, 0.07), rgba(255, 76, 168, 0.06)),
    rgba(3, 7, 12, 0.96);
}

.delta-sample-cfg-panel {
  width: min(390px, calc(100vw - 34px));
  border-color: rgba(255, 76, 168, 0.3);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(255, 76, 168, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(29, 224, 255, 0.07), rgba(255, 191, 76, 0.05)),
    rgba(3, 7, 12, 0.96);
}

.delta-one-shot-panel {
  bottom: clamp(72px, 10vh, 120px);
  width: min(430px, calc(100vw - 34px));
  border-color: rgba(255, 191, 76, 0.36);
}

.delta-one-shot-panel.is-dragged {
  right: auto;
  bottom: auto;
}

.delta-one-shot-panel .delta-sample-eq-heading {
  cursor: grab;
  user-select: none;
}

.delta-one-shot-panel.is-moving .delta-sample-eq-heading {
  cursor: grabbing;
}

.delta-one-shot-panel p {
  margin: 8px 0 10px;
  color: rgba(255, 242, 207, 0.72);
  font-size: 0.58rem;
  line-height: 1.55;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.delta-one-shot-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.delta-one-shot-config-grid label {
  display: grid;
  gap: 5px;
  color: rgba(128, 255, 114, 0.82);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delta-one-shot-config-grid select {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-size: 0.56rem;
}

.delta-advanced-tempo-panel p,
.delta-sample-cfg-panel p {
  margin: 0 0 9px;
  color: rgba(255, 242, 207, 0.68);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.delta-advanced-tempo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.delta-sample-cfg-grid {
  display: grid;
  gap: 8px;
}

.delta-advanced-tempo-grid label {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: rgba(255, 242, 207, 0.7);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.delta-sample-cfg-grid label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 242, 207, 0.7);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.delta-sample-cfg-grid label.is-disabled {
  opacity: 0.46;
}

.delta-sample-cfg-grid label.is-disabled select {
  cursor: not-allowed;
}

.delta-advanced-tempo-grid select {
  min-width: 0;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-size: 0.5rem;
}

.delta-sample-cfg-grid select {
  min-width: 0;
  min-height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-size: 0.5rem;
}

.delta-sample-eq-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.delta-sample-eq-heading span {
  color: rgba(128, 255, 114, 0.86);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.delta-sample-eq-heading button {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.58);
  font-family: inherit;
  font-size: 0.62rem;
  line-height: 1;
  text-transform: uppercase;
}

.delta-sample-eq-panel h3,
.delta-sample-fx-panel h3 {
  margin: 0 0 10px;
  overflow: hidden;
  color: #f7fbff;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.delta-sample-eq-bands {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
  min-height: 172px;
  padding: 9px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(0, 255, 102, 0.055), transparent 34%),
    rgba(0, 0, 0, 0.42);
}

.delta-sample-eq-band {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  color: rgba(255, 242, 207, 0.68);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delta-sample-eq-band input[type="range"] {
  width: 24px;
  height: 118px;
  writing-mode: vertical-lr;
  direction: rtl;
  accent-color: #80ff72;
}

.delta-sample-eq-band em {
  color: #ffbf4c;
  font-style: normal;
}

.delta-sample-eq-reset {
  display: block;
  width: 100%;
  min-height: 28px;
  margin-top: 9px;
  border: 1px solid rgba(255, 191, 76, 0.28);
  border-radius: 10px;
  color: #07120e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), #ffbf4c);
  font-family: inherit;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.delta-sample-fx-grid {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 191, 76, 0.055), transparent 34%),
    rgba(0, 0, 0, 0.42);
}

.delta-sample-fx-section {
  display: grid;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  background:
    linear-gradient(90deg, rgba(128, 255, 114, 0.07), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.delta-sample-fx-section[open] {
  padding-bottom: 9px;
}

.delta-sample-fx-section summary {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: space-between;
  min-height: 24px;
  cursor: pointer;
  list-style: none;
  color: rgba(128, 255, 114, 0.9);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  user-select: none;
}

.delta-sample-fx-section summary span {
  margin-right: auto;
}

.delta-sample-fx-section summary::-webkit-details-marker {
  display: none;
}

.delta-sample-fx-section summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(128, 255, 114, 0.28);
  border-radius: 7px;
  color: #ffbf4c;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.58rem;
  line-height: 1;
}

.delta-sample-fx-section[open] summary {
  margin-bottom: 3px;
}

.delta-sample-fx-section[open] summary::after {
  content: "-";
}

.delta-fx-enable-toggle {
  min-width: 34px;
  min-height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(128, 255, 114, 0.42);
  border-radius: 999px;
  color: #06120c;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), #80ff72);
  box-shadow: 0 0 9px rgba(128, 255, 114, 0.18);
  font-family: inherit;
  font-size: 0.42rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delta-fx-enable-toggle.is-off {
  border-color: rgba(255, 76, 76, 0.48);
  color: #fff2cf;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 76, 76, 0.78));
  box-shadow: 0 0 9px rgba(255, 76, 76, 0.16);
}

.delta-sample-fx-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 1px;
  color: rgba(255, 242, 207, 0.7);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.delta-sample-fx-section-title select {
  min-width: 126px;
  min-height: 26px;
  border: 1px solid rgba(128, 255, 114, 0.2);
  border-radius: 9px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.58);
  font: inherit;
  font-size: 0.48rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.delta-sample-fx-grid label {
  display: grid;
  grid-template-columns: 78px 1fr 46px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 242, 207, 0.72);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.delta-sample-fx-grid em {
  color: #ffbf4c;
  font-style: normal;
  text-align: right;
}

.delta-sample-fx-select-row {
  grid-template-columns: 78px 1fr !important;
}

.delta-sample-fx-select-row select {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.56);
  font: inherit;
  font-size: 0.56rem;
}

.delta-sound-fx-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 191, 76, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 191, 76, 0.14), transparent 42%),
    linear-gradient(90deg, rgba(29, 224, 255, 0.08), rgba(255, 76, 168, 0.07)),
    rgba(3, 5, 10, 0.78);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.26),
    inset 0 0 18px rgba(255, 255, 255, 0.03);
}

.delta-sound-fx-heading {
  min-width: 0;
}

.delta-sound-fx-heading span {
  display: block;
  color: #ffbf4c;
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.delta-sound-fx-heading strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 242, 207, 0.72);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.delta-sound-fx-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.delta-sound-fx-grid > button,
.delta-one-shot-button {
  min-width: 0;
  min-height: 36px;
  padding: 5px 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: rgba(255, 242, 207, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  opacity: 1;
}

.delta-one-shot-delay-label {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.delta-one-shot-delay-label span {
  grid-column: 1 / -1;
}

.delta-one-shot-delay-label input {
  width: 100%;
  accent-color: #80ff72;
}

.delta-one-shot-delay-label em {
  min-width: 34px;
  color: #ffbf4c;
  font-style: normal;
  text-align: right;
}

.delta-one-shot-config-grid label.is-disabled {
  opacity: 0.44;
}

.delta-one-shot-config-grid label.is-disabled select {
  cursor: not-allowed;
}

.delta-one-shot-cell {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 34px 34px;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255, 191, 76, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 191, 76, 0.055), rgba(29, 224, 255, 0.025)),
    rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.025);
}

.delta-one-shot-cell + .delta-one-shot-cell::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -6px;
  width: 1px;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(128, 255, 114, 0.28),
      rgba(255, 191, 76, 0.34),
      transparent
    );
  box-shadow: 0 0 8px rgba(128, 255, 114, 0.14);
}

.delta-one-shot-config-button,
.delta-one-shot-pitch-knob,
.delta-one-shot-volume-knob {
  min-width: 0;
  min-height: 36px;
  border: 1px solid rgba(255, 191, 76, 0.28);
  border-radius: 11px;
  color: #fff2cf;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 191, 76, 0.2), transparent 42%),
    rgba(0, 0, 0, 0.62);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.46rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.delta-one-shot-config-button:hover,
.delta-one-shot-config-button:focus-visible,
.delta-one-shot-pitch-knob:hover,
.delta-one-shot-pitch-knob:focus-visible,
.delta-one-shot-volume-knob:hover,
.delta-one-shot-volume-knob:focus-visible {
  border-color: rgba(128, 255, 114, 0.78);
  box-shadow: 0 0 14px rgba(128, 255, 114, 0.18);
}

.delta-one-shot-pitch-knob,
.delta-one-shot-volume-knob {
  position: relative;
  display: grid;
  place-items: center;
  color: #ffbf4c;
  font-size: 0.38rem;
}

.delta-one-shot-pitch-knob span,
.delta-one-shot-volume-knob span {
  width: 21px;
  height: 21px;
  border: 2px solid rgba(255, 242, 207, 0.72);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255, 191, 76, 0.9) 48% 52%, transparent 54%),
    rgba(255, 255, 255, 0.05);
  transform: rotate(26deg);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.62);
}

.delta-one-shot-pitch-knob span {
  border-color: rgba(128, 255, 114, 0.78);
  background:
    linear-gradient(90deg, transparent 46%, rgba(128, 255, 114, 0.96) 48% 52%, transparent 54%),
    rgba(255, 255, 255, 0.05);
  transform: rotate(var(--one-shot-pitch-angle, 0deg));
}

.delta-one-shot-pitch-knob em,
.delta-one-shot-volume-knob em {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-style: normal;
}

.delta-one-shot-button {
  cursor: pointer;
  opacity: 1;
}

.delta-one-shot-button.is-due {
  border-color: rgba(255, 191, 76, 0.82);
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 191, 76, 0.22), rgba(255, 138, 32, 0.08)),
    rgba(20, 10, 0, 0.74);
  box-shadow: 0 0 14px rgba(255, 191, 76, 0.22);
}

.delta-one-shot-button.is-playing {
  border-color: rgba(128, 255, 114, 0.82);
  color: #ecffe9;
  background:
    linear-gradient(180deg, rgba(128, 255, 114, 0.24), rgba(24, 120, 42, 0.1)),
    rgba(0, 20, 10, 0.72);
  box-shadow: 0 0 16px rgba(128, 255, 114, 0.24);
}

.delta-sound-fx-grid > button span,
.delta-sound-fx-grid > button em,
.delta-one-shot-button span,
.delta-one-shot-button em,
.delta-one-shot-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delta-sound-fx-grid > button span,
.delta-one-shot-button span {
  color: rgba(128, 255, 114, 0.78);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
}

.delta-sound-fx-grid > button em,
.delta-one-shot-button em {
  margin-top: 3px;
  color: rgba(29, 224, 255, 0.66);
  font-size: 0.42rem;
  font-style: normal;
  letter-spacing: 0.12em;
}

.delta-one-shot-button small {
  margin-top: 3px;
  color: rgba(255, 191, 76, 0.86);
  font-size: 0.34rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.delta-one-shot-button.is-playing small {
  color: rgba(128, 255, 114, 0.95);
}

.delta-one-shot-button.is-due small {
  animation: oneShotStatusScroll 1.7s ease-in-out infinite alternate;
}

@keyframes oneShotStatusScroll {
  from { transform: translateX(-5%); }
  to { transform: translateX(5%); }
}

.delta-native-controls {
  display: grid;
  grid-template-columns: minmax(150px, 0.82fr) minmax(112px, 0.58fr) minmax(275px, 1.45fr) minmax(160px, 1fr);
  gap: 7px;
}

.delta-transport-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.delta-record-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.delta-native-controls button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff2cf;
  background: linear-gradient(180deg, rgba(41, 27, 54, 0.94), rgba(12, 20, 29, 0.94));
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delta-native-controls button:hover,
.delta-native-controls button:focus-visible {
  border-color: rgba(255, 191, 76, 0.78);
  box-shadow: 0 0 14px rgba(255, 191, 76, 0.14);
}

.delta-native-controls .delta-record-live-button {
  color: rgba(255, 242, 207, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(11, 12, 18, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  cursor: help;
  opacity: 0.66;
}

.delta-native-controls .delta-record-live-button:hover,
.delta-native-controls .delta-record-live-button:focus-visible {
  border-color: rgba(29, 224, 255, 0.34);
  box-shadow: 0 0 12px rgba(29, 224, 255, 0.1);
}

.delta-tempo-control {
  display: grid;
  grid-template-columns: auto 28px minmax(64px, 1fr) 28px minmax(72px, 0.84fr) 34px 42px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(128, 255, 114, 0.08), transparent 48%),
    rgba(6, 8, 14, 0.72);
}

.delta-tempo-control span,
.delta-tempo-control strong {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delta-tempo-control span {
  color: var(--muted);
}

.delta-tempo-control strong {
  min-height: 22px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #80ff72;
  text-align: center;
  white-space: nowrap;
}

.delta-tempo-control strong.is-editing {
  border-color: rgba(128, 255, 114, 0.5);
  color: #fff2cf;
  background: rgba(0, 0, 0, 0.62);
  box-shadow:
    inset 0 0 8px rgba(128, 255, 114, 0.12),
    0 0 10px rgba(128, 255, 114, 0.18);
  outline: none;
}

.delta-tempo-control button {
  min-height: 28px;
  padding: 0;
  color: #07120e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), #80ff72);
}

.delta-tempo-control .delta-tempo-mode-button {
  min-height: 24px;
  padding: 0 6px;
  border-color: rgba(255, 191, 76, 0.42);
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.56);
  box-shadow: inset 0 0 10px rgba(255, 191, 76, 0.08);
  font-size: 0.46rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.delta-tempo-control .delta-tempo-mode-button.is-old-bpm {
  color: #07120e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), #ffbf4c);
}

.delta-tempo-control .delta-tempo-mode-button.is-advanced-lock {
  border-color: rgba(29, 224, 255, 0.52);
  color: #07120e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), #1de0ff);
  box-shadow:
    0 0 12px rgba(29, 224, 255, 0.2),
    inset 0 0 10px rgba(255, 255, 255, 0.14);
}

.delta-tempo-control .delta-advanced-tempo-config-button {
  min-height: 24px;
  border-color: rgba(29, 224, 255, 0.32);
  color: rgba(255, 242, 207, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(29, 224, 255, 0.08)),
    rgba(0, 0, 0, 0.62);
  font-size: 0.44rem;
  letter-spacing: 0.06em;
}

.delta-tempo-control .delta-panic-button {
  min-height: 24px;
  border-color: rgba(255, 76, 168, 0.42);
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 76, 168, 0.22)),
    rgba(0, 0, 0, 0.64);
  font-size: 0.38rem;
  letter-spacing: 0.04em;
}

.delta-tempo-control .delta-panic-button:hover,
.delta-tempo-control .delta-panic-button:focus-visible {
  border-color: rgba(255, 76, 168, 0.78);
  box-shadow: 0 0 14px rgba(255, 76, 168, 0.18);
}

.delta-tempo-control .delta-advanced-tempo-config-button.is-active {
  color: #061014;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), #80ff72);
  box-shadow: 0 0 12px rgba(128, 255, 114, 0.18);
}

.delta-slider-row {
  grid-column: span 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delta-native-stage input[type="range"] {
  width: 100%;
  accent-color: #ff4ca8;
}

.delta-native-stage .delta-sample-eq-band input[type="range"] {
  -webkit-appearance: slider-vertical;
  width: 24px;
  height: 118px;
  writing-mode: vertical-lr;
  direction: rtl;
  accent-color: #80ff72;
}

.delta-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.delta-readout div {
  min-width: 0;
  padding: 10px 12px;
  background: rgba(6, 7, 12, 0.86);
}

.delta-readout span {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.delta-readout strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #ffbf4c;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes deltaQueuedPulse {
  0%,
  100% {
    filter: brightness(0.8);
    box-shadow: 0 0 5px rgba(255, 191, 76, 0.18);
  }

  50% {
    filter: brightness(1.32);
    box-shadow: 0 0 14px rgba(255, 191, 76, 0.58);
  }
}

@keyframes deltaReverseArmFlash {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }

  50% {
    filter: brightness(1.8);
    transform: scale(1.07);
    box-shadow:
      0 0 16px rgba(255, 76, 168, 0.52),
      inset 0 0 12px rgba(255, 76, 168, 0.16);
  }
}

@keyframes gameIconBounce {
  0% {
    transform: scale(1);
  }

  48% {
    transform: scale(1.72) rotate(-2deg);
  }

  68% {
    transform: scale(1.42) rotate(1deg);
  }

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

.secret-admin-trigger {
  position: fixed;
  left: 13px;
  bottom: 12px;
  z-index: 8;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
  opacity: 0.16;
  mix-blend-mode: screen;
  filter: grayscale(1) contrast(1.08) brightness(0.9);
  transform: rotate(-1deg);
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease;
}

.secret-admin-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.secret-admin-trigger:hover,
.secret-admin-trigger:focus-visible {
  opacity: 0.42;
  filter: grayscale(0.55) contrast(1.2) brightness(1.16) drop-shadow(0 0 8px rgba(255, 255, 255, 0.18));
  transform: rotate(-1deg) scale(1.08);
}

.admin-fuzz-overlay,
.admin-panel-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

.admin-fuzz-overlay {
  z-index: 120;
  overflow: hidden;
  background: #000;
}

.admin-fuzz-overlay::before,
.admin-fuzz-overlay::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
}

.admin-fuzz-overlay::before {
  z-index: 3;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0, 255, 170, 0.12) 0 2px, rgba(255, 0, 140, 0.09) 2px 4px, transparent 4px 9px);
  mix-blend-mode: screen;
  animation: adminStatic 110ms steps(2, end) infinite;
}

.admin-fuzz-overlay::after {
  z-index: 4;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(255, 0, 80, 0.2), transparent 28%, rgba(0, 255, 220, 0.18) 72%, transparent);
  mix-blend-mode: hard-light;
  animation: adminColourTear 180ms steps(2, end) infinite;
}

.admin-fuzz-screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  opacity: 0.86;
  filter: grayscale(1) contrast(1.7) brightness(1.18);
  animation: adminScreenRoll 220ms steps(2, end) infinite;
}

.admin-fuzz-symbol {
  position: relative;
  z-index: 5;
  width: min(58vw, 520px);
  max-height: 70vh;
  object-fit: contain;
  opacity: 0.86;
  mix-blend-mode: screen;
  filter:
    grayscale(1)
    contrast(1.6)
    brightness(1.28)
    drop-shadow(0 0 20px rgba(255, 255, 255, 0.28));
  animation: adminPiBlast 430ms steps(2, end) infinite;
}

.admin-fuzz-code {
  position: absolute;
  left: 7vw;
  bottom: 8vh;
  z-index: 6;
  color: rgba(140, 255, 160, 0.78);
  font-family: "Courier New", monospace;
  font-size: clamp(0.62rem, 1.3vw, 1rem);
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px rgba(141, 255, 156, 0.5);
  animation: adminCodeBlink 360ms steps(2, end) infinite;
}

.admin-panel-overlay {
  z-index: 110;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.06), transparent 24%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: grayscale(1) brightness(0.34) blur(3px);
}

.admin-panel-overlay::before,
.admin-panel-overlay::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
}

.admin-panel-overlay::before {
  z-index: 0;
  background:
    repeating-radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(141, 255, 156, 0.035) 0 2px, rgba(255, 0, 0, 0.035) 2px 4px, transparent 4px 9px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: adminLowLightStatic 170ms steps(2, end) infinite;
}

.admin-panel-overlay::after {
  z-index: 0;
  background:
    radial-gradient(ellipse at center, transparent 0 38%, rgba(0, 0, 0, 0.5) 74%),
    linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.06) 48%, transparent 52%);
  opacity: 0.78;
  animation: adminLowLightRoll 2.4s linear infinite;
}

.admin-login-card {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 34px));
  display: grid;
  gap: 12px;
  padding: 24px 22px 21px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(141, 255, 156, 0.14), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(15, 16, 15, 0.98), rgba(0, 0, 0, 0.96));
  box-shadow:
    0 28px 84px rgba(0, 0, 0, 0.68),
    0 0 24px rgba(141, 255, 156, 0.08),
    inset 0 0 18px rgba(255, 255, 255, 0.03);
}

.admin-login-kicker {
  color: #8b0000;
  font-size: 0.54rem;
  line-height: 1.25;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.22);
}

.admin-login-card h2 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 1.08rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.12),
    0 0 20px rgba(141, 255, 156, 0.08);
}

.admin-login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-login-card input {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  padding: 9px 11px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.64);
  caret-color: rgba(141, 255, 156, 0.96);
  font: inherit;
  letter-spacing: 0.1em;
  outline: none;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.03);
}

.admin-login-card input:focus {
  border-color: rgba(141, 255, 156, 0.64);
  box-shadow:
    0 0 12px rgba(141, 255, 156, 0.18),
    inset 0 0 12px rgba(255, 255, 255, 0.04);
}

.admin-password-mask {
  -webkit-text-security: disc;
}

.admin-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 3px;
}

.admin-login-actions .primary-button,
.admin-login-actions .secondary-button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.admin-login-status {
  min-height: 1.1em;
  margin: 0;
  color: rgba(141, 255, 156, 0.78);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.admin-login-status.admin-login-checking {
  color: rgba(255, 255, 255, 0.82);
}

.admin-login-status.admin-login-error {
  color: rgba(255, 80, 80, 0.9);
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.28);
}

.admin-mainframe-overlay {
  z-index: 111;
}

.admin-action-overlay {
  z-index: 112;
}

.admin-mainframe-card,
.admin-action-card {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 38px));
  display: grid;
  gap: 13px;
  padding: 24px 22px 21px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 18% 4%, rgba(139, 0, 0, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(141, 255, 156, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(14, 14, 14, 0.98), rgba(0, 0, 0, 0.96));
  box-shadow:
    0 30px 92px rgba(0, 0, 0, 0.72),
    0 0 26px rgba(139, 0, 0, 0.16),
    inset 0 0 18px rgba(255, 255, 255, 0.035);
}

.admin-mainframe-card h2,
.admin-action-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.14),
    0 0 24px rgba(139, 0, 0, 0.34);
}

.admin-mainframe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.admin-action-button {
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 10px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.46);
  font-family: inherit;
  text-align: center;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.03),
    0 0 12px rgba(0, 0, 0, 0.26);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.admin-action-button:hover,
.admin-action-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(141, 255, 156, 0.52);
  box-shadow:
    0 0 16px rgba(141, 255, 156, 0.12),
    inset 0 0 12px rgba(255, 255, 255, 0.055);
}

.admin-action-button.admin-action-active {
  border-color: rgba(255, 244, 91, 0.74);
  color: #fff45b;
  background:
    linear-gradient(145deg, rgba(255, 244, 91, 0.22), rgba(61, 224, 255, 0.08)),
    rgba(0, 0, 0, 0.62);
  box-shadow:
    0 0 20px rgba(255, 244, 91, 0.18),
    inset 0 0 16px rgba(255, 244, 91, 0.08);
}

.admin-action-button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: rgba(141, 255, 156, 0.9);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  line-height: 1;
  box-shadow:
    0 0 10px rgba(141, 255, 156, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.admin-action-button strong {
  font-size: 0.5rem;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-action-danger span {
  color: rgba(255, 84, 84, 0.96);
  box-shadow:
    0 0 10px rgba(255, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.admin-mainframe-exit-button {
  width: min(260px, 100%);
  justify-self: center;
  min-height: 38px;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.admin-action-card {
  width: min(360px, calc(100vw - 38px));
  text-align: center;
}

.admin-action-card p {
  margin: 0;
  color: rgba(141, 255, 156, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-action-card .primary-button {
  justify-self: center;
  min-height: 38px;
  padding-inline: 16px;
  font-size: 0.66rem;
}

.admin-lockout-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(10, 20, 80, 0.4), transparent 46%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px),
    #02030b;
  backdrop-filter: grayscale(1) contrast(1.2) brightness(0.7);
}

.admin-lockout-overlay.is-hidden {
  display: none !important;
}

.admin-lockout-overlay::before,
.admin-lockout-overlay::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
}

.admin-lockout-overlay::before {
  background:
    repeating-linear-gradient(90deg, rgba(50, 110, 255, 0.08) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 6px);
  mix-blend-mode: screen;
  opacity: 0.4;
  animation: adminLowLightStatic 140ms steps(2, end) infinite;
}

.admin-lockout-overlay::after {
  background:
    radial-gradient(ellipse at center, transparent 0 46%, rgba(0, 0, 0, 0.58) 78%),
    linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.08) 50%, transparent 56%);
  opacity: 0.82;
  animation: adminLowLightRoll 1.8s linear infinite;
}

.admin-magic-word-image {
  position: relative;
  z-index: 1;
  width: min(86vw, 760px);
  max-height: 78vh;
  object-fit: contain;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  image-rendering: pixelated;
  box-shadow:
    0 0 26px rgba(60, 110, 255, 0.28),
    0 24px 70px rgba(0, 0, 0, 0.74);
}

.admin-nedry-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(94vw, 920px);
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.admin-nedry-frame video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88vh;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  pointer-events: none;
}

body.touch-device .secret-admin-trigger,
body.touch-device .admin-fuzz-overlay,
body.touch-device .admin-panel-overlay,
body.touch-device .admin-lockout-overlay {
  display: none !important;
}

@keyframes adminStatic {
  0% {
    transform: translate3d(-2%, -1%, 0) skewX(-1deg);
    opacity: 0.72;
  }

  50% {
    transform: translate3d(2%, 1%, 0) skewX(2deg);
    opacity: 0.92;
  }

  100% {
    transform: translate3d(-1%, 2%, 0) skewX(-2deg);
    opacity: 0.8;
  }
}

@keyframes adminColourTear {
  0% {
    transform: translateX(-3%);
    opacity: 0.24;
  }

  50% {
    transform: translateX(4%);
    opacity: 0.42;
  }

  100% {
    transform: translateX(-1%);
    opacity: 0.28;
  }
}

@keyframes adminLowLightStatic {
  0% {
    transform: translate3d(-1.2%, -0.8%, 0) scale(1.01);
    opacity: 0.3;
  }

  50% {
    transform: translate3d(1.4%, 0.8%, 0) scale(1.02);
    opacity: 0.48;
  }

  100% {
    transform: translate3d(-0.4%, 1.2%, 0) scale(1.01);
    opacity: 0.38;
  }
}

@keyframes adminLowLightRoll {
  0% {
    transform: translateY(-12%);
  }

  100% {
    transform: translateY(12%);
  }
}

@keyframes adminScreenRoll {
  0% {
    transform: scale(1.03) translateY(-1%);
  }

  50% {
    transform: scale(1.08) translateY(2%);
  }

  100% {
    transform: scale(1.04) translateY(-2%);
  }
}

@keyframes adminPiBlast {
  0% {
    transform: scale(0.86) rotate(-1deg);
    opacity: 0.42;
  }

  34% {
    transform: scale(1.16) rotate(1deg);
    opacity: 0.96;
  }

  68% {
    transform: scale(0.98) rotate(-2deg);
    opacity: 0.58;
  }

  100% {
    transform: scale(1.26) rotate(1deg);
    opacity: 0.88;
  }
}

@keyframes adminCodeBlink {
  0%,
  42% {
    opacity: 0.16;
  }

  43%,
  100% {
    opacity: 0.82;
  }
}

.control-panel-card {
  padding: 10px 10px 9px;
}

.control-panel-card h2 {
  margin-bottom: 7px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.control-tile {
  position: relative;
  min-height: 58px;
  padding: 24px 4px 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  text-align: center;
  overflow: hidden;
}

.control-tile-label,
.control-tile-state {
  display: block;
  width: 100%;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-tile-label {
  font-size: 0.38rem;
  line-height: 1;
  letter-spacing: 0.12em;
  opacity: 0.78;
}

.control-tile-state {
  font-size: 0.48rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.control-tile::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  opacity: 0.92;
}

.control-grid .primary-button,
.control-grid .secondary-button {
  min-height: 58px;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.control-grid .primary-button:hover,
.control-grid .primary-button:focus-visible,
.control-grid .secondary-button:hover,
.control-grid .secondary-button:focus-visible {
  transform: none;
}

body.tetris-game-active:not(.touch-device) .control-panel-card {
  padding: 9px;
}

body.tetris-game-active:not(.touch-device) .control-panel-card h2 {
  margin-bottom: 6px;
  font-size: 0.66rem;
}

body.tetris-game-active:not(.touch-device) .control-grid {
  gap: 5px;
}

body.tetris-game-active:not(.touch-device) .control-tile,
body.tetris-game-active:not(.touch-device) .control-grid .primary-button,
body.tetris-game-active:not(.touch-device) .control-grid .secondary-button {
  min-height: 48px;
  border-radius: 10px;
}

body.tetris-game-active:not(.touch-device) .control-tile {
  padding: 20px 4px 5px;
  gap: 1px;
}

body.tetris-game-active:not(.touch-device) .control-tile::before {
  top: 5px;
  width: 12px;
  height: 12px;
}

body.tetris-game-active:not(.touch-device) .control-tile-label {
  font-size: 0.33rem;
  letter-spacing: 0.1em;
}

body.tetris-game-active:not(.touch-device) .control-tile-state {
  font-size: 0.42rem;
  letter-spacing: 0.07em;
}

#startButton::before {
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.9), rgba(58, 58, 58, 0.65));
  clip-path: polygon(18% 10%, 18% 90%, 88% 50%);
}

#stopButton::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(173, 190, 214, 0.72));
  clip-path: polygon(8% 52%, 44% 16%, 44% 34%, 92% 34%, 92% 70%, 44% 70%, 44% 88%);
}

#colorModeButton::before {
  background: conic-gradient(
    from 0deg,
    #ff6d6d,
    #ffd84d,
    #7eff88,
    #69d8ff,
    #9b7dff,
    #ff77cf,
    #ff6d6d
  );
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

#musicToggleButton::before {
  width: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 30%, rgba(255, 255, 255, 0.9) 30% 100%) left 1px bottom / 2px 9px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 10%, rgba(255, 255, 255, 0.9) 10% 100%) center bottom / 2px 12px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 45%, rgba(255, 255, 255, 0.9) 45% 100%) right 1px bottom / 2px 8px no-repeat;
}

#glowModeButton::before {
  background: linear-gradient(180deg, rgba(255, 245, 161, 0.96), rgba(255, 198, 84, 0.92));
  clip-path: polygon(50% 0%, 61% 31%, 96% 31%, 68% 51%, 79% 84%, 50% 63%, 21% 84%, 32% 51%, 4% 31%, 39% 31%);
  box-shadow: 0 0 8px rgba(255, 214, 84, 0.24);
}

#sillyModeButton::before {
  background:
    radial-gradient(circle at 32% 34%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96) 16%, transparent 18%),
    radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96) 16%, transparent 18%),
    linear-gradient(180deg, #ff68bb, #9b7dff);
  clip-path: polygon(10% 10%, 90% 10%, 100% 55%, 78% 100%, 22% 100%, 0% 55%);
  box-shadow: 0 0 10px rgba(255, 120, 204, 0.28);
}

.stat {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.stat strong {
  color: var(--text);
  font-size: 1.18rem;
}

#modeLabel.mode-silly,
#mobileModeLabel.mode-silly {
  color: #ffd659;
  text-shadow:
    0 0 8px rgba(255, 214, 89, 0.28),
    0 0 18px rgba(255, 110, 220, 0.24);
}

.primary-button,
.secondary-button {
  appearance: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  padding: 15px 20px;
  cursor: var(--amiga-cursor);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  width: 100%;
  min-height: 52px;
  white-space: normal;
  line-height: 1.2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, #ffffff, #d8d8d8);
  color: #050505;
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(255, 255, 255, 0.18);
}

.portal-button {
  position: relative;
  overflow: hidden;
}

.portal-button::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(
    circle,
    rgba(145, 213, 255, 0.34) 0,
    rgba(145, 213, 255, 0.14) 34%,
    rgba(145, 213, 255, 0) 66%
  );
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.portal-button:hover,
.portal-button:focus-visible {
  animation: portalHoverPulse 1.15s ease-in-out infinite;
  box-shadow:
    0 0 18px rgba(173, 230, 255, 0.32),
    0 0 34px rgba(114, 192, 255, 0.22),
    0 18px 34px rgba(255, 255, 255, 0.18);
}

.portal-button:hover::before,
.portal-button:focus-visible::before {
  opacity: 1;
  transform: scale(1.02);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 28px rgba(255, 255, 255, 0.06);
}

.secondary-button-small {
  font-size: 0.7rem;
  min-height: 38px;
  padding: 10px 12px;
  letter-spacing: 0.12em;
}

.game-shell.glow-off canvas {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 16px rgba(255, 255, 255, 0.04);
}

.is-hidden {
  display: none;
}

body.touch-device .touch-only {
  display: flex !important;
}

body.touch-device .touch-only.is-hidden,
body.touch-device .mobile-game-hud.is-hidden {
  display: none !important;
}

body.touch-device {
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

body.touch-device .game-shell,
body.touch-device canvas,
body.touch-device .mobile-game-hud,
body.touch-device .mobile-board-options-overlay,
body.touch-device .mobile-instructions-overlay,
body.touch-device .attract-screen,
body.touch-device .entry-overlay {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

body.touch-device img,
body.touch-device canvas {
  -webkit-user-drag: none;
  user-select: none;
}

body.touch-device input,
body.touch-device textarea {
  -webkit-user-select: text;
  user-select: text;
}

body.touch-device .entry-overlay {
  align-items: flex-end;
  padding: 14px;
  padding-bottom: max(28px, 7svh);
}

body.touch-device .entry-overlay::before {
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 42%),
    linear-gradient(180deg, rgba(80, 23, 83, 0.22), rgba(80, 23, 83, 0.22)),
    url("portal-kickstart.gif") center 12svh / min(100vw, 82svh) auto no-repeat,
    linear-gradient(180deg, #501752 0%, #501752 62%, #130316 100%);
  background-blend-mode: screen, color, normal, normal;
  transform: none;
  filter: saturate(1.04) contrast(1.04);
}

body.touch-device .entry-overlay::after {
  background:
    linear-gradient(180deg, rgba(80, 23, 83, 0.08), rgba(0, 0, 0, 0.42)),
    radial-gradient(circle at center, transparent 18%, rgba(0, 0, 0, 0.2) 72%);
}

body.touch-device .entry-card {
  width: min(374px, 94vw);
  padding: 28px 16px 17px;
  border-radius: 17px;
  transform: none;
}

body.touch-device .entry-corner-logo {
  top: 8px;
  left: 8px;
  width: clamp(30px, 9vw, 40px);
  opacity: 0.24;
}

body.touch-device .entry-card h2 {
  margin: 8px 0 7px;
  font-size: clamp(1.46rem, 7vw, 1.95rem);
  letter-spacing: 0.08em;
  line-height: 0.96;
}

body.touch-device .entry-title-word {
  display: block;
}

body.touch-device .entry-card p {
  margin-bottom: 14px;
  font-size: 0.86rem;
  line-height: 1.35;
}

body.touch-device .mobile-version-note {
  display: block;
  margin: 4px auto 0;
  color: #8dff9c;
  font-size: 0.28em;
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px rgba(141, 255, 156, 0.36);
  white-space: nowrap;
}

body.touch-device .layout {
  width: 100%;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  padding: 0;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
}

body.touch-device .hero,
body.touch-device .sidebar {
  display: none;
}

body.touch-device .game-shell {
  width: 100vw;
  height: 100dvh;
  min-height: 100svh;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding: 0;
  gap: 0;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: hidden;
  align-content: center;
  justify-content: center;
  place-items: center;
}

body.touch-device .mobile-demo-start {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  min-height: 30px;
  padding: 7px 6px;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
  white-space: nowrap;
}

body.touch-device .mobile-start-music-picker {
  width: 100%;
  display: grid !important;
  gap: 6px;
  margin-top: 10px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
}

body.touch-device .mobile-start-music-picker.is-hidden {
  display: none !important;
}

body.touch-device .mobile-portal-brand {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.02),
    0 0 14px rgba(0, 0, 0, 0.18);
}

body.touch-device .mobile-portal-brand img {
  width: 58px;
  height: 58px;
  border-radius: 0;
  object-fit: contain;
  filter:
    invert(1)
    brightness(1.18)
    contrast(1.12)
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.08));
}

body.touch-device .mobile-portal-brand strong,
body.touch-device .mobile-portal-brand span,
body.touch-device .mobile-portal-brand em {
  display: block;
  text-transform: uppercase;
}

body.touch-device .mobile-portal-brand strong {
  color: #ffffff;
  font-size: clamp(0.88rem, 4.2vw, 1.08rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 0.98;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.12),
    0 0 20px rgba(255, 255, 255, 0.05);
}

body.touch-device .mobile-portal-brand span {
  margin-top: 5px;
  color: var(--accent-soft);
  font-size: clamp(0.42rem, 2vw, 0.52rem);
  letter-spacing: 0.24em;
  line-height: 1.2;
  font-style: normal;
}

body.touch-device .mobile-portal-brand em {
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(0.42rem, 1.9vw, 0.5rem);
  letter-spacing: 0.28em;
  line-height: 1.15;
  font-style: normal;
}

body.touch-device .mobile-start-music-picker span {
  color: var(--muted);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
}

body.touch-device .mobile-start-music-picker strong {
  color: #8dff9c;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

body.touch-device .mobile-start-track-controls,
body.touch-device .mobile-options-track-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

body.touch-device .mobile-options-track-controls {
  grid-template-columns: 0.8fr 1.2fr 0.8fr;
}

body.touch-device .attract-screen,
body.touch-device .board-overlay,
body.touch-device .rainbow-rain,
body.touch-device .orientation-overlay {
  inset: 14px;
}

body.touch-device .demo-jukebox-panel {
  gap: 6px;
  padding: 7px;
}

body.touch-device .demo-bottom-stack {
  left: 10px;
  right: 10px;
  bottom: 10px;
  gap: 5px;
}

body.touch-device .demo-jukebox-title {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
}

body.touch-device .demo-jukebox-controls {
  grid-template-columns: 1fr;
  gap: 4px;
}

body.touch-device .demo-sound-controls {
  grid-template-columns: minmax(0, 1fr) 70px 42px;
}

body.touch-device .demo-volume {
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 3px;
}

body.touch-device .demo-jukebox-controls .secondary-button-small {
  min-height: 22px;
  padding: 4px 4px;
  font-size: 0.4rem;
  letter-spacing: 0.04em;
}

body.touch-device .demo-volume-display {
  min-height: 22px;
  font-size: 0.4rem;
  letter-spacing: 0.04em;
}

body.touch-device .demo-volume-display strong {
  font-size: 0.58rem;
}

body.touch-device .demo-visual {
  left: 0;
  right: 0;
  width: min(86vw, 360px, 45svh);
  height: min(86vw, 360px, 45svh);
  margin-inline: auto;
  top: max(8px, 1svh);
  transform: translateY(0) scale(1);
  animation: mobileDemoFloat 1.4s ease-in-out infinite;
}

body.touch-device .attract-copy {
  left: 14px;
  right: 14px;
  bottom: 10px;
  padding: 12px;
}

body.touch-device .attract-copy h2 {
  font-size: clamp(0.78rem, 4.2vw, 0.96rem);
  letter-spacing: 0.1em;
}

body.touch-device .attract-copy p {
  font-size: 0.78rem;
}

body.touch-device .mobile-portal-action-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

body.touch-device .mobile-portal-game-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 7px;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

body.touch-device .mobile-portal-instructions-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 5px 4px;
  font-size: 0.38rem;
  letter-spacing: 0.04em;
  text-align: center;
  width: 100%;
  pointer-events: auto;
  touch-action: manipulation;
  white-space: nowrap;
}

body.touch-device .mobile-portal-instructions-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

body.touch-device .mobile-portal-instructions-overlay.is-hidden {
  display: none !important;
}

body.touch-device .mobile-portal-instructions-card {
  width: min(90vw, 360px);
  display: grid;
  gap: 8px;
  padding: 15px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.86);
  box-shadow:
    0 0 20px rgba(141, 255, 156, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.56);
  pointer-events: auto;
}

body.touch-device .mobile-portal-instructions-card p {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  line-height: 1.25;
}

body.touch-device .mobile-portal-instructions-card p strong {
  color: #ffffff;
  text-transform: uppercase;
}

body.touch-device .mobile-portal-instructions-card p span {
  text-align: right;
}

body.touch-device .mobile-portal-high-scores-card {
  gap: 10px;
}

body.touch-device .mobile-portal-high-scores-list {
  display: grid;
  gap: 7px;
}

body.touch-device .mobile-portal-high-scores-list .high-score-row,
body.touch-device .mobile-portal-high-scores-list .high-score-empty {
  grid-template-columns: 28px 40px minmax(0, 1fr) 30px 34px;
  gap: 4px;
  padding: 8px 7px;
  font-size: 0.56rem;
}

body.touch-device .mobile-portal-high-scores-list .high-score-heading {
  padding: 0 7px 1px;
  font-size: 0.42rem;
  letter-spacing: 0.05em;
}

body.touch-device .mobile-portal-high-scores-list .high-score-row strong {
  font-size: 0.7rem;
}

body.touch-device .mobile-portal-high-scores-list .high-score-platform {
  font-size: 0.38rem;
  letter-spacing: 0.01em;
}

body.touch-device .mobile-portal-high-scores-list .high-score-empty {
  grid-template-columns: 1fr;
  min-height: 86px;
}

body.touch-device .mobile-portal-coming-soon-card {
  border-color: rgba(141, 255, 156, 0.26);
  box-shadow:
    0 0 24px rgba(141, 255, 156, 0.14),
    0 18px 42px rgba(0, 0, 0, 0.58);
}

body.touch-device .mobile-portal-coming-soon-card p {
  grid-template-columns: 1fr;
  text-align: center;
}

body.touch-device .mobile-portal-coming-soon-card p span {
  text-align: center;
}

body.touch-device .mobile-game-hud,
body.touch-device .mobile-jukebox-panel,
body.touch-device .mobile-options-panel,
body.touch-device canvas,
body.touch-device .touch-controls {
  width: min(100%, 860px);
  max-width: 100%;
}

body.touch-device canvas {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  object-fit: fill;
  touch-action: none;
  border-radius: 0;
}

body.touch-device .mobile-game-hud {
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  z-index: 4;
  display: block;
  pointer-events: none;
}

body.touch-device .mobile-stat {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  display: block;
  text-align: center;
  min-width: 72px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0.84;
  text-shadow:
    0 0 7px rgba(255, 255, 255, 0.34),
    0 0 18px rgba(0, 0, 0, 0.72);
}

body.touch-device .mobile-stat:nth-child(1) {
  top: 5svh;
  left: 3vw;
}

body.touch-device .mobile-stat:nth-child(2) {
  top: 5svh;
  right: 3vw;
}

body.touch-device .mobile-stat:nth-child(3) {
  top: 18svh;
  left: 3vw;
}

body.touch-device .mobile-stat:nth-child(4) {
  top: 18svh;
  right: 3vw;
}

body.touch-device .mobile-stat:nth-child(5) {
  top: 29svh;
  left: 3vw;
  transform: none;
}

body.touch-device .mobile-stat:nth-child(6) {
  top: 29svh;
  right: 3vw;
  transform: none;
}

body.touch-device .mobile-stat span {
  display: block;
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

body.touch-device .mobile-stat strong {
  display: block;
  margin-top: 1px;
  font-size: clamp(0.78rem, 4.6vw, 1.22rem);
  color: var(--text);
}

body.touch-device .mobile-stat-wide {
  grid-column: auto;
}

body.touch-device .mobile-jukebox-panel,
body.touch-device .mobile-options-panel {
  display: none !important;
}

body.touch-device .mobile-jukebox-heading {
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 8px;
}

body.touch-device .mobile-jukebox-display {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.66rem;
  text-align: center;
}

body.touch-device .mobile-jukebox-controls,
body.touch-device .mobile-options-panel {
  display: grid;
  gap: 8px;
}

body.touch-device .mobile-jukebox-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

body.touch-device .mobile-jukebox-volume {
  margin-top: 8px;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

body.touch-device .mobile-jukebox-volume strong {
  color: #8dff9c;
  font-size: 0.86rem;
}

body.touch-device .mobile-options-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.touch-device .mobile-option-button,
body.touch-device .mobile-jukebox-controls .secondary-button-small {
  min-height: 40px;
  padding: 9px 8px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

body.touch-device .mobile-board-menu-button {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background:
    linear-gradient(90deg, rgba(255, 77, 77, 0.18), rgba(255, 230, 80, 0.18), rgba(72, 255, 111, 0.18), rgba(78, 185, 255, 0.18), rgba(255, 82, 235, 0.18)),
    rgba(0, 0, 0, 0.34);
  color: #ffffff;
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.28),
    0 0 16px rgba(77, 255, 127, 0.22),
    0 0 24px rgba(82, 172, 255, 0.22),
    0 0 34px rgba(255, 77, 221, 0.2);
  animation: mobileOptionsRainbow 1.8s linear infinite;
  touch-action: manipulation;
}

body.touch-device .mobile-board-menu-button.is-hidden,
body.touch-device .mobile-board-options-overlay.is-hidden {
  display: none !important;
}

body.touch-device .mobile-reaction-face {
  position: absolute;
  top: 22%;
  left: 50%;
  z-index: 7;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 220ms ease, transform 220ms ease;
}

body.touch-device .mobile-reaction-face:not(.mood-neutral) {
  opacity: 0.94;
  transform: translate(-50%, -50%) scale(1.24);
}

body.touch-device .mobile-reaction-face.is-game-over {
  top: 84px;
  left: 58px;
  transform: translate(-50%, -50%) scale(0.92);
}

body.touch-device .mobile-reaction-face.is-game-over:not(.mood-neutral) {
  opacity: 0.96;
  transform: translate(-50%, -50%) scale(1.08);
}

body:not(.touch-device) .mobile-reaction-face {
  display: none;
}

body.touch-device .mobile-board-options-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(5px);
}

body.touch-device .mobile-instructions-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(5px);
}

body.touch-device .mobile-instructions-overlay.is-hidden {
  display: none !important;
}

body.touch-device .mobile-instructions-card {
  width: min(92vw, 360px);
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.84);
  box-shadow:
    0 0 18px rgba(141, 255, 156, 0.1),
    0 18px 40px rgba(0, 0, 0, 0.5);
}

body.touch-device .mobile-instructions-heading {
  color: #f7fbff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

body.touch-device .mobile-instructions-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.touch-device .mobile-instructions-card p strong {
  color: #ffffff;
  white-space: nowrap;
}

body.touch-device .mobile-instructions-card p span {
  text-align: right;
}

body.touch-device .mobile-board-options-card {
  width: min(94vw, 360px);
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

body.touch-device .mobile-board-options-heading {
  color: #f7fbff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

body.touch-device .mobile-options-track {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(141, 255, 156, 0.16);
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
}

body.touch-device .mobile-options-track span {
  color: var(--muted);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.touch-device .mobile-options-track strong {
  color: #8dff9c;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.touch-device .mobile-board-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.touch-device .mobile-board-options-grid .mobile-option-button,
body.touch-device .mobile-options-track-controls .secondary-button-small,
body.touch-device .mobile-start-track-controls .secondary-button-small {
  min-height: 36px;
  padding: 8px 7px;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

body.touch-device .mobile-options-track-controls .mobile-track-preview-button {
  font-size: 0.48rem;
  letter-spacing: 0.05em;
}

body.touch-device .touch-controls {
  display: none !important;
}

body.touch-device .touch-control-button {
  min-height: 56px;
}

body.touch-device .touch-control-glyph {
  font-size: 1rem;
}

body.touch-device .touch-control-label {
  font-size: 0.5rem;
}

.orientation-overlay {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(4, 7, 14, 0.9);
}

.orientation-card {
  width: min(90%, 260px);
  padding: 20px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 10, 0.94);
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.orientation-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #a8e0ff;
}

.orientation-card h2 {
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.orientation-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

@keyframes strobePulse {
  0%,
  100% {
    opacity: 0.14;
  }

  50% {
    opacity: 0.42;
  }
}

@keyframes demoGlowMorph {
  0%,
  100% {
    opacity: 0.12;
    transform: translate3d(0, 0, 0) scale(0.92) rotate(0deg);
    border-radius: 42% 58% 52% 48%;
  }

  35% {
    opacity: 0.26;
    transform: translate3d(5%, 4%, 0) scale(1.08) rotate(7deg);
    border-radius: 58% 42% 46% 54%;
  }

  70% {
    opacity: 0.19;
    transform: translate3d(-4%, 2%, 0) scale(1.02) rotate(-5deg);
    border-radius: 48% 52% 60% 40%;
  }
}

@keyframes demoTransportStoppedPulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 214, 103, 0.08),
      0 0 8px rgba(255, 179, 57, 0.12);
  }

  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 214, 103, 0.22),
      0 0 20px rgba(255, 179, 57, 0.38);
  }
}

@keyframes portalHoverPulse {
  0%,
  100% {
    transform: translateY(-2px) scale(1);
  }

  50% {
    transform: translateY(-3px) scale(1.025);
  }
}

@keyframes mobileOptionsRainbow {
  0% {
    filter: hue-rotate(0deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

@keyframes demoFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-10px) scale(1.03);
  }
}

@keyframes mobileDemoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.03);
  }
}

@keyframes demoVolumeFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes boardExpandBounce {
  0% {
    transform: scale(1, 1);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 50px var(--grid-glow);
  }

  18% {
    transform: scale(1.16, 0.84) translateY(2px);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.12),
      0 0 64px rgba(255, 255, 255, 0.16);
  }

  38% {
    transform: scale(0.92, 1.12) translateY(-7px);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      0 0 76px rgba(141, 224, 255, 0.2);
  }

  56% {
    transform: scale(1.08, 0.95) translateY(1px);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.09),
      0 0 62px rgba(255, 255, 255, 0.14);
  }

  74% {
    transform: scale(0.98, 1.03) translateY(-2px);
  }

  100% {
    transform: scale(1, 1) translateY(0);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 50px var(--grid-glow);
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 24px 0 36px;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-mark {
    width: 126px;
    height: 126px;
  }

  .demo-visual {
    width: 228px;
    height: 228px;
    top: 72px;
  }

  .panel,
  .sidebar,
  .community-chat-panel {
    width: min(680px, 100%);
  }

  .game-shell {
    order: -1;
  }
}

@media (max-width: 1160px) and (min-width: 981px) {
  body.silly-layout-active:not(.touch-device) .layout {
    width: min(1450px, calc(100% - 18px));
    grid-template-columns: minmax(230px, 1fr) minmax(320px, 368px) minmax(220px, 270px) minmax(230px, 300px);
    gap: 12px;
  }

  body.silly-layout-active:not(.touch-device) .panel {
    padding: 22px;
  }

  body.silly-layout-active:not(.touch-device) .game-shell {
    max-width: 368px;
    padding: 18px;
  }

  body.silly-layout-active:not(.touch-device) .brand-lockup {
    gap: 16px;
    align-items: flex-start;
  }

  body.silly-layout-active:not(.touch-device) .brand-mark {
    width: 122px;
    height: 122px;
  }

  body.silly-layout-active:not(.touch-device) h1 {
    font-size: clamp(1.45rem, 2.7vw, 2.25rem);
    margin-bottom: 14px;
  }

  body.silly-layout-active:not(.touch-device) .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
  }

  body.silly-layout-active:not(.touch-device) .brand-subtitle {
    margin-top: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
  }

  body.silly-layout-active:not(.touch-device) .controls-card,
  body.silly-layout-active:not(.touch-device) .jukebox-card {
    padding: 13px 14px;
  }
}

@media (max-width: 560px) {
  body.touch-device .game-shell {
    padding: 0;
  }

  body.touch-device .attract-screen,
  body.touch-device .board-overlay,
  body.touch-device .rainbow-rain,
  body.touch-device .orientation-overlay {
    inset: 12px;
  }

  body.touch-device .demo-jukebox-panel {
    padding: 6px;
  }

  body.touch-device .demo-bottom-stack {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  body.touch-device .demo-jukebox-controls {
    grid-template-columns: 1fr;
  }

  body.touch-device .demo-sound-controls {
    grid-template-columns: minmax(0, 1fr) 38px 34px;
  }

  body.touch-device .demo-visual {
    left: 0;
    right: 0;
    width: min(88vw, 350px, 44svh);
    height: min(88vw, 350px, 44svh);
    margin-inline: auto;
    top: max(6px, 1svh);
    transform: translateY(0) scale(1);
  }

  body.touch-device .mobile-game-hud {
    display: block;
  }

  body.touch-device .mobile-options-panel {
    grid-template-columns: 1fr;
  }

  body.touch-device canvas {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.touch-device .touch-controls {
    display: none !important;
  }

  body.touch-device .touch-control-button {
    min-height: 54px;
  }
}
