:root.initializing-active,
:root.initializing-active body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

:root.initializing-active body {
  position: fixed;
  inset: 0;
}

:root.initializing-active #root {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}


.initializing-screen {
  --init-cyan: #70e9ff;
  --init-blue: #2f9cff;
  --init-violet: #8f7cff;
  --init-warm: #ffc83a;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #e9fbff;
  background: #01050c;
  opacity: 1;
  transition: opacity 650ms cubic-bezier(.22, .72, .22, 1), filter 650ms ease;
}

.initializing-screen.is-complete {
  opacity: 0;
  filter: saturate(.7) brightness(1.35);
  pointer-events: none;
}

.initializing-screen::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 47%, rgba(47, 156, 255, .13) 0 7%, transparent 34%),
    radial-gradient(circle at 42% 51%, rgba(112, 233, 255, .08), transparent 29%),
    radial-gradient(circle at 61% 45%, rgba(143, 124, 255, .08), transparent 31%),
    linear-gradient(180deg, #01040a 0%, #010711 48%, #01040b 100%);
}

.initializing-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .34;
  background:
    linear-gradient(rgba(112, 233, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 156, 255, .028) 1px, transparent 1px),
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, .18) 3px 4px);
  background-size: 64px 64px, 64px 64px, 100% 4px;
  -webkit-mask-image: radial-gradient(ellipse 46% 48% at 50% 49%, #000 0%, rgba(0,0,0,.46) 54%, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 48% at 50% 49%, #000 0%, rgba(0,0,0,.46) 54%, transparent 100%);
}

.initializing-ambient {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(620px, 70vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
}

.initializing-ambient i {
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(112, 233, 255, .055);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(47, 156, 255, .055), inset 0 0 70px rgba(143, 124, 255, .025);
  animation: initAmbientBreathe 3s ease-in-out infinite;
}

.initializing-ambient i:last-child {
  inset: 29%;
  border-color: rgba(143, 124, 255, .07);
  animation-delay: -1.5s;
  animation-duration: 2.5s;
}

.initializing-panel {
  position: relative;
  z-index: 4;
  width: min(520px, calc(100% - 48px));
  padding: 24px 26px;
  text-align: center;
}

.initializing-brand,
.initializing-title,
.initializing-meta,
.initializing-percent {
  font-family: "Share Tech Mono", "Courier New", monospace;
  text-transform: uppercase;
}

.initializing-brand {
  margin: 0 0 26px;
  color: rgba(112, 233, 255, .48);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .36em;
  text-shadow: 0 0 14px rgba(112, 233, 255, .24);
}

.initializing-glyphs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(17px, 3.1vw, 32px);
  margin: 0 auto 28px;
}

.initializing-glyph {
  width: clamp(62px, 6.1vw, 82px);
  height: auto;
  overflow: visible;
  color: var(--init-cyan);
  filter: drop-shadow(0 0 7px rgba(112, 233, 255, .3));
  transform-origin: 50% 60%;
  animation: initGlyphHover 2.4s ease-in-out infinite;
}

.initializing-glyph:nth-child(2) {
  color: #86d8ff;
  animation-name: initPulseHover;
  animation-delay: -.6s;
  animation-duration: 2.05s;
}

.initializing-glyph:nth-child(3) {
  color: #9af0e8;
  animation-name: initCubeHover;
  animation-delay: -1.15s;
  animation-duration: 2.6s;
}

.initializing-glyph__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.initializing-glyph__hex-outline {
  stroke-dasharray: 94 16;
  transform-origin: 40px 40px;
  animation: initHexTurn 3.4s linear infinite, initLineGlow 1.25s ease-in-out infinite;
}

.initializing-glyph__hex-inner {
  stroke: var(--init-violet);
  stroke-width: 2.15;
  stroke-dasharray: 18 7;
  transform-origin: 40px 40px;
  animation: initHexCounterTurn 2.25s linear infinite;
}

.initializing-glyph__pulse-line {
  stroke-dasharray: 68 18;
  animation: initPulseFlow 1.55s linear infinite, initLineGlow 1s ease-in-out infinite;
}

.initializing-glyph__pulse-node {
  fill: var(--init-blue);
  filter: drop-shadow(0 0 5px rgba(47, 156, 255, .95));
  transform-box: fill-box;
  transform-origin: center;
  animation: initPulseNode 1.05s ease-in-out infinite;
}

.initializing-glyph__pulse-node--right { animation-delay: -.52s; }

.initializing-glyph__dot {
  fill: var(--init-warm);
  stroke: rgba(255, 246, 205, .82);
  stroke-width: .7;
  filter: drop-shadow(0 0 5px rgba(255, 200, 58, .95));
  transform-box: fill-box;
  transform-origin: center;
}

.initializing-glyph__hex-dot {
  animation: initHexCore 1.05s ease-in-out infinite;
}

.initializing-glyph__pulse-dot {
  animation: initPulseDot .92s cubic-bezier(.34, 1.56, .64, 1) infinite;
}

.initializing-glyph__cube-outline {
  stroke-dasharray: 126 20;
  animation: initCubeTrace 2.35s linear infinite, initLineGlow 1.45s ease-in-out infinite;
}

.initializing-glyph__cube-inner {
  stroke: var(--init-violet);
  stroke-width: 1.85;
  opacity: .62;
  stroke-dasharray: 64 13;
  animation: initCubeInner 1.85s linear infinite;
}

.initializing-glyph__cube-node {
  fill: var(--init-warm);
  filter: drop-shadow(0 0 5px rgba(255, 200, 58, .9));
  transform-box: fill-box;
  transform-origin: center;
  animation: initCubeNode 1.35s ease-in-out infinite;
}

.initializing-glyph__cube-node--two { animation-delay: -.45s; }
.initializing-glyph__cube-node--three { animation-delay: -.9s; }

.initializing-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 20px;
  margin: 0;
  color: var(--init-cyan);
  font-size: clamp(12px, 1.25vw, 15px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .24em;
  text-shadow: 0 0 15px rgba(112, 233, 255, .46);
}

.initializing-dots {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  width: 20px;
  height: 12px;
}

.initializing-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--init-cyan);
  box-shadow: 0 0 7px rgba(112, 233, 255, .85);
  animation: initDotWave .84s ease-in-out infinite;
}

.initializing-dots i:nth-child(2) { animation-delay: .12s; }
.initializing-dots i:nth-child(3) { animation-delay: .24s; }

.initializing-track {
  position: relative;
  width: min(390px, 100%);
  height: 2px;
  margin: 22px auto 0;
  overflow: visible;
  background: linear-gradient(90deg, rgba(47, 156, 255, .12), rgba(112, 233, 255, .25), rgba(143, 124, 255, .12));
  box-shadow: 0 0 13px rgba(47, 156, 255, .1);
}

.initializing-track::before,
.initializing-track::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 3px;
  height: 3px;
  border: 1px solid rgba(112, 233, 255, .45);
  transform: translateY(-50%) rotate(45deg);
}

.initializing-track::before { left: -9px; }
.initializing-track::after { right: -9px; }

.initializing-fill {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  overflow: visible;
  background: linear-gradient(90deg, var(--init-blue), var(--init-cyan) 68%, var(--init-violet));
  box-shadow: 0 0 12px rgba(112, 233, 255, .82), 0 0 24px rgba(47, 156, 255, .28);
  transition: width 80ms linear;
}

.initializing-fill i {
  position: absolute;
  top: 50%;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e6fdff;
  box-shadow: 0 0 6px #70e9ff, 0 0 14px rgba(47, 156, 255, .95);
  transform: translateY(-50%);
}

.initializing-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(390px, 100%);
  margin: 10px auto 0;
}

.initializing-meta {
  color: rgba(220, 247, 255, .38);
  font-size: 8px;
  letter-spacing: .17em;
}

.initializing-percent {
  min-width: 45px;
  color: rgba(255, 200, 58, .9);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: right;
  text-shadow: 0 0 10px rgba(255, 200, 58, .35);
}

.initializing-corners {
  position: absolute;
  inset: 22px;
  z-index: 3;
  pointer-events: none;
  opacity: .42;
}

.initializing-corners i {
  position: absolute;
  width: 31px;
  height: 31px;
  border-color: rgba(112, 233, 255, .28);
  border-style: solid;
}

.initializing-corners i:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
.initializing-corners i:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
.initializing-corners i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
.initializing-corners i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }

@keyframes initAmbientBreathe {
  0%, 100% { opacity: .2; transform: scale(.93); }
  50% { opacity: .9; transform: scale(1.04); }
}

@keyframes initGlyphHover {
  0%, 100% { transform: translate3d(0, 1px, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -6px, 0) rotate(2deg); }
}

@keyframes initPulseHover {
  0%, 100% { transform: translate3d(0, -2px, 0) scale(.98); }
  50% { transform: translate3d(0, 5px, 0) scale(1.035); }
}

@keyframes initCubeHover {
  0%, 100% { transform: translate3d(0, 2px, 0) rotate(-1.5deg); }
  50% { transform: translate3d(0, -5px, 0) rotate(2.3deg); }
}

@keyframes initHexTurn { to { transform: rotate(360deg); } }
@keyframes initHexCounterTurn { to { transform: rotate(-360deg); } }
@keyframes initPulseFlow { to { stroke-dashoffset: -86; } }
@keyframes initCubeTrace { to { stroke-dashoffset: -146; } }
@keyframes initCubeInner { to { stroke-dashoffset: 77; } }

@keyframes initLineGlow {
  0%, 100% { opacity: .68; }
  50% { opacity: 1; }
}

@keyframes initHexCore {
  0%, 100% { opacity: .45; transform: scale(.65); }
  50% { opacity: 1; transform: scale(1.35); }
}

@keyframes initPulseDot {
  0%, 100% { opacity: .56; transform: translateY(2px) scale(.72); }
  48% { opacity: 1; transform: translateY(-7px) scale(1.18); }
}

@keyframes initPulseNode {
  0%, 100% { opacity: .35; transform: scale(.62); }
  50% { opacity: 1; transform: scale(1.28); }
}

@keyframes initCubeNode {
  0%, 100% { opacity: .38; transform: scale(.68); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes initDotWave {
  0%, 100% { opacity: .25; transform: translateY(0) scale(.75); }
  50% { opacity: 1; transform: translateY(-4px) scale(1); }
}

@media (max-width: 600px) {
  .initializing-panel {
    width: calc(100% - 32px);
    padding-inline: 12px;
  }

  .initializing-brand { letter-spacing: .22em; }
  .initializing-corners { inset: 12px; }
}

@media (max-height: 620px) {
  .initializing-panel { padding-block: 12px; }
  .initializing-brand { margin-bottom: 13px; }
  .initializing-glyphs { margin-bottom: 15px; }
  .initializing-glyph { width: 58px; }
  .initializing-track { margin-top: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .initializing-ambient i,
  .initializing-glyph,
  .initializing-glyph__hex-outline,
  .initializing-glyph__hex-inner,
  .initializing-glyph__pulse-line,
  .initializing-glyph__pulse-node,
  .initializing-glyph__dot,
  .initializing-glyph__cube-outline,
  .initializing-glyph__cube-inner,
  .initializing-glyph__cube-node,
  .initializing-dots i {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== Arcade power sequence: supplied OFF/ON cabinet art ===== */
.home-page--no-scroll > .home-energy-off-background,
.home-page--no-scroll > .home-energy-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
  user-select: none;
}

.home-page--no-scroll > .home-energy-background {
  z-index: 0;
  opacity: 1;
  transition: opacity .78s ease, filter .78s ease;
}

.home-page--no-scroll > .home-energy-off-background {
  z-index: 1;
  opacity: 0;
  transition: opacity .78s ease;
}

.home-page--no-scroll.arcade-power-off > .home-energy-background {
  opacity: 0;
}

.home-page--no-scroll.arcade-power-off > .home-energy-off-background {
  opacity: 1;
}

/* Match the supplied reference: center the cabinet under the ceiling ring and
   lower its transparent canvas so the visible base sits directly on the floor. */
.home-page--no-scroll .home-arcade-centered {
  left: 50%;
  bottom: 0;
  width: min(58vw, 1280px);
  width: min(58vw, 1280px, calc(92dvh * 1.09375));
  transform: translate(-50%, 2.4%);
}

.home-page--no-scroll .home-machine-layer .home-arcade-live {
  width: 100%;
  aspect-ratio: 35 / 32;
  object-fit: contain;
  filter:
    drop-shadow(0 25px 20px rgba(0, 0, 0, .8))
    drop-shadow(0 0 15px rgba(255, 196, 42, .16));
  transition: opacity .25s ease, filter .78s ease;
  animation: none;
  transform: none;
}

.home-page--no-scroll.arcade-power-off .home-machine-layer .home-arcade-live {
  filter: drop-shadow(0 25px 20px rgba(0, 0, 0, .84));
}

/* Exact inner CRT opening measured from the normalized supplied cabinets. */
.machine-screen {
  position: absolute;
  left: 13.95%;
  top: 31.1%;
  z-index: 9;
  width: 73.25%;
  height: 37.95%;
  display: grid;
  place-items: center;
  overflow: hidden;
  clip-path: polygon(8% .5%, 92.2% 1.3%, 99.6% 99.1%, .1% 98.9%);
  background:
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, .3) 3px 4px),
    radial-gradient(ellipse at 50% 42%, rgba(16, 73, 118, .3), transparent 68%),
    #010712;
  box-shadow:
    inset 0 0 0 1px rgba(112, 233, 255, .09),
    inset 0 0 42px rgba(0, 0, 0, .84);
  color: #f3fbff;
  font-family: "Share Tech Mono", "Courier New", monospace;
  text-align: center;
  pointer-events: none;
  transition: opacity .18s ease;
}

.machine-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .28;
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgba(112, 233, 255, .045) 50%, transparent 50.2%),
    repeating-linear-gradient(to bottom, transparent 0 5px, rgba(112, 233, 255, .045) 5px 6px);
}

.machine-screen[data-phase="off"] {
  background: #02040a;
  box-shadow: inset 0 0 45px rgba(0, 0, 0, .96);
  opacity: 0;
}

.machine-screen[data-phase="off"]::before {
  display: none;
}

.machine-screen-content {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 11px;
  width: 84%;
  height: 78%;
  padding-top: 3%;
}

.machine-screen[data-phase="off"] .machine-screen-content,
.machine-screen[data-phase="boot"] .machine-screen-content {
  display: none;
}

.machine-screen[data-phase="boot"]::before {
  display: block;
  left: 7%;
  right: 7%;
  top: 50%;
  bottom: auto;
  height: 2px;
  background: #effcff;
  box-shadow: 0 0 20px rgba(112, 233, 255, .95), 0 0 45px rgba(112, 233, 255, .55);
  opacity: 1;
  transform: scaleX(0);
  animation: crtPowerLine 300ms ease-out 60ms both;
}

.machine-screen[data-phase="boot"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(240, 253, 255, .92), rgba(112, 233, 255, .25) 45%, transparent 78%);
  opacity: 0;
  transform: scaleY(.018);
  animation: crtPowerOpen 620ms cubic-bezier(.2, .8, .2, 1) 280ms both;
}

.ms-title {
  color: #f3fbff;
  font-size: clamp(12px, 2vw, 34px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
  white-space: nowrap;
  text-shadow: 0 0 13px rgba(112, 233, 255, .62), 0 0 34px rgba(47, 156, 255, .32);
}

.ms-sub {
  min-height: 1em;
  color: #70e9ff;
  font-size: clamp(8px, .86vw, 14px);
  line-height: 1;
  letter-spacing: .27em;
  white-space: nowrap;
  opacity: .92;
}

.ms-extra {
  min-height: 1em;
  color: rgba(220, 247, 255, .68);
  font-size: clamp(8px, .8vw, 13px);
  letter-spacing: .18em;
}

.machine-screen[data-phase="ready"] .ms-title {
  color: #eafff6;
  text-shadow: 0 0 14px rgba(114, 255, 194, .65), 0 0 34px rgba(114, 255, 194, .3);
}

.ms-dots i {
  font-style: normal;
  animation: msDot 1.2s ease-in-out infinite;
}

.ms-dots i:nth-child(2) { animation-delay: .18s; }
.ms-dots i:nth-child(3) { animation-delay: .36s; }

.ms-arrows {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #72ffc2;
  font-size: clamp(12px, 1.35vw, 22px);
  line-height: 1;
  text-shadow: 0 0 13px rgba(114, 255, 194, .68);
}

.ms-arrows i {
  font-style: normal;
  animation: arrowDrop .95s ease-in-out infinite;
}

.ms-arrows i:nth-child(2) { animation-delay: .16s; }

/* Physical control label, centered in the supplied cabinet's lower slot. */
.machine-power-label {
  position: absolute;
  left: 50%;
  top: 84.5%;
  z-index: 12;
  width: 38%;
  height: 9%;
  transform: translate(-50%, -50%) skewX(-7deg) scaleY(1.05);
  display: grid;
  place-items: center;
  color: #ffda63;
  font-family: Impact, "Arial Black", "Trebuchet MS", sans-serif;
  font-size: clamp(14px, 2vw, 28px);
  font-weight: 900;
  font-style: italic;
  line-height: .9;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-rendering: geometricPrecision;
  -webkit-text-stroke: .35px rgba(57, 28, 0, .92);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-shadow:
    0 1px 0 #8b5300,
    0 2px 0 #2c1700,
    0 0 5px rgba(255, 247, 193, .8),
    0 0 13px rgba(255, 179, 35, .82),
    0 0 26px rgba(255, 112, 16, .36);
  filter: saturate(1.08) contrast(1.08);
  transition: color .25s ease, text-shadow .25s ease, filter .25s ease;
}

.arcade-power-off .machine-power-label {
  left: 50%;
  top: 83.6%;
  width: 37%;
  height: 9%;
  color: #ffdc67;
  -webkit-text-stroke: .35px rgba(57, 28, 0, .95);
  text-shadow:
    0 1px 0 #985d00,
    0 2px 0 #2c1700,
    0 0 5px rgba(255, 249, 205, .9),
    0 0 14px rgba(255, 186, 48, .78),
    0 0 28px rgba(255, 119, 18, .34);
}

.arcade-ready .machine-power-label {
  color: #82ffd0;
  -webkit-text-stroke: .35px rgba(0, 62, 43, .95);
  text-shadow:
    0 1px 0 #08734f,
    0 2px 0 #001d14,
    0 0 6px rgba(220, 255, 241, .9),
    0 0 15px rgba(114, 255, 194, .78),
    0 0 30px rgba(49, 255, 173, .38);
  animation: controlPulse 1.15s ease-in-out infinite;
}

.machine-power-label.is-heartbeat {
  transform: translate(-50%, -50%);
  font-size: 0;
  letter-spacing: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
  filter: none;
  animation: none;
}

.power-heartbeat {
  position: relative;
  display: block;
  width: 82%;
  height: 58%;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 4px rgba(255, 246, 188, .9)) drop-shadow(0 0 11px rgba(255, 181, 38, .72));
  animation: heartbeatThrob 1.05s cubic-bezier(.45, 0, .25, 1) infinite;
}

.power-heartbeat svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.power-heartbeat__rail,
.power-heartbeat__trace {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.power-heartbeat__rail {
  stroke: rgba(255, 203, 91, .19);
  stroke-width: 2.2;
}

.power-heartbeat__trace {
  stroke: #ffdb68;
  stroke-width: 3;
  stroke-dasharray: 23 77;
  stroke-dashoffset: 100;
  animation: heartbeatTrace 1.05s linear infinite;
}

.home-machine-layer .arcade-start-button {
  position: absolute;
  z-index: 13;
  left: 29%;
  top: 76.5%;
  bottom: auto;
  width: 42%;
  height: 15%;
  transform: none;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  opacity: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.arcade-powered .home-machine-layer .arcade-start-button {
  left: 29%;
  top: 77%;
  width: 42%;
  height: 14%;
}

.arcade-power-off .home-machine-layer::after,
.arcade-powered .home-machine-layer::after,
.arcade-ready .home-machine-layer::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  box-shadow: none !important;
}


/* Three-part keychain: fixed attachment + swinging chain behind the cabinet + swinging lightning above it. */
.machine-keychain-wrap {
  position: absolute;
  z-index: auto;
  top: 28%;
  right: -7.8%;
  width: 21.5%;
  aspect-ratio: 512 / 1100;
  cursor: grab;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
}

.machine-keychain-wrap:active { cursor: grabbing; }

.machine-keychain-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.machine-keychain-fixed {
  z-index: 2;
  clip-path: inset(0 0 82% 0);
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, .68));
}

.machine-keychain-swing {
  transform-origin: 22% 18%;
  animation: keychainIdle 4.4s ease-in-out infinite;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .7));
  will-change: transform;
}

/* The chain can swing, but any overlap with the cabinet stays physically behind it. */
.machine-keychain-chain {
  z-index: 2;
  clip-path: inset(18% 0 44% 0);
}

/* Only the lower pendant/lightning is brought forward so its full silhouette stays visible. */
.machine-keychain-pendant {
  z-index: 4;
  clip-path: inset(56% 0 0 0);
}

.machine-keychain-wrap.is-engaging .machine-keychain-swing {
  animation: keychainEngage .32s cubic-bezier(.22, .8, .25, 1) 1 both;
}

.machine-keychain-wrap.is-swinging .machine-keychain-swing {
  animation: keychainSwing 1.05s ease-in-out infinite alternate;
}

.machine-keychain-wrap.is-settling .machine-keychain-swing {
  animation: keychainSettle 2.6s ease-in-out 1 both;
}

.machine-keychain-wrap.is-resting .machine-keychain-swing {
  animation: none;
  transform: rotate(-2.5deg);
}

@keyframes keychainEngage {
  0% { transform: rotate(var(--keychain-engage-start, -2.5deg)); }
  100% { transform: rotate(-8.5deg); }
}

@keyframes keychainIdle {
  0%, 100% { transform: rotate(-2.4deg); }
  50% { transform: rotate(-3.8deg); }
}

/* Smaller outward arc keeps the motion light and clear of the cabinet. */
@keyframes keychainSwing {
  0% { transform: rotate(-8.5deg); }
  100% { transform: rotate(-1.8deg); }
}

/* Preserve release position, then shed smaller arcs until fully at rest. */
@keyframes keychainSettle {
  0% { transform: rotate(var(--keychain-settle-start, -2.5deg)); }
  20% { transform: rotate(var(--keychain-settle-1, -7.8deg)); }
  42% { transform: rotate(var(--keychain-settle-2, -1.9deg)); }
  62% { transform: rotate(var(--keychain-settle-3, -5deg)); }
  78% { transform: rotate(var(--keychain-settle-4, -2.2deg)); }
  91% { transform: rotate(var(--keychain-settle-5, -3.2deg)); }
  100% { transform: rotate(-2.5deg); }
}

.arc-door-overlay {
  position: fixed; inset: 0; z-index: 99998; display: grid; place-items: center;
  overflow: hidden; perspective: 1600px; pointer-events: auto; background: #01040a;
  transition: background-color .72s ease;
}
.arc-door-overlay::before { content: ''; position: absolute; inset: 0; z-index: 0; opacity: 1;
  background: radial-gradient(circle, rgba(19,132,255,.2), transparent 35%), #01040a; transition: opacity .72s ease; }
.arc-door-overlay::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: .24;
  background: repeating-linear-gradient(180deg,transparent 0 3px,rgba(0,0,0,.38) 3px 4px); }
.arc-door-portal { position: relative; z-index: 2; width: min(100vw,177.78vh); aspect-ratio: 16/9; transform: scale(.96);
  filter: drop-shadow(0 0 18px rgba(17,128,255,.48)) drop-shadow(0 0 24px rgba(255,92,8,.22));
  transition: transform .76s cubic-bezier(.2,.8,.2,1); }
.arc-door-trail { position: absolute; z-index: 0; width: 62vw; pointer-events: none; border-radius: 999px;
  transition: opacity .45s ease; }
.arc-door-trail::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  border-radius: 999px; }
.arc-door-trail--lt,.arc-door-trail--lb { right: 97.5%; }
.arc-door-trail--rt,.arc-door-trail--rb { left: 97.5%; }
.arc-door-trail--lt { top: 15.16%; height: 3.9%; background: #07203a; }
.arc-door-trail--lt::after { height: 30%; background: #138cff; box-shadow: 0 0 14px #138cff,0 0 34px rgba(19,140,255,.75); }
.arc-door-trail--lb { top: 82.84%; height: 3.2%; background: #071d33; }
.arc-door-trail--lb::after { height: 30%; background: #21bfff; box-shadow: 0 0 12px #21bfff,0 0 30px rgba(33,191,255,.7); }
.arc-door-trail--rt { top: 12.72%; height: 3.9%; background: #321405; }
.arc-door-trail--rt::after { height: 30%; background: #ff6b0b; box-shadow: 0 0 14px #ff6b0b,0 0 34px rgba(255,107,11,.75); }
.arc-door-trail--rb { top: 81.07%; height: 3.2%; background: #321405; }
.arc-door-trail--rb::after { height: 30%; background: #ff9a24; box-shadow: 0 0 12px #ff9a24,0 0 30px rgba(255,154,36,.7); }
.arc-door-overlay.is-opening .arc-door-trail { opacity: 0; transition-delay: 0s; }
.arc-door { position: absolute; top: 0; width: 50.05%; height: 100%; background-image: url('/arc-gateway-door.svg');
  background-repeat: no-repeat; background-size: 200% 100%; will-change: transform; transition: transform .92s cubic-bezier(.18,.72,.18,1),filter .5s ease; }
.arc-door--left { left: 0; background-position: left center; transform: translateX(-118%) rotateY(7deg); transform-origin: 100% 50%; }
.arc-door--right { right: 0; background-position: right center; transform: translateX(118%) rotateY(-7deg); transform-origin: 0 50%; }
.arc-door-energy-core { position: absolute; left: 50%; top: 13%; bottom: 13%; z-index: 6; width: 3px;
  transform: translateX(-50%) scaleY(.05); opacity: 0; background: linear-gradient(transparent,#138cff 15%,#bffbff 50%,#ff7914 85%,transparent);
  box-shadow: 0 0 10px #168fff,0 0 28px rgba(35,145,255,.9),0 0 42px rgba(255,94,9,.42);
  transition: opacity .25s .4s,transform .5s .24s; }
.arc-door-energy-core i { position: absolute; left: 50%; top: 50%; width: 46px; aspect-ratio: 1; border: 2px solid #72eaff;
  border-radius: 50%; transform: translate(-50%,-50%) scale(.3); opacity: 0; box-shadow: 0 0 18px #188fff,inset 0 0 14px #ff7415;
  transition: opacity .25s .48s,transform .45s cubic-bezier(.17,.9,.22,1.4) .4s; }
.arc-door-status { position: absolute; left: 50%; bottom: clamp(20px,6vh,62px); z-index: 8; display: flex; gap: 12px;
  transform: translate(-50%,12px); opacity: 0; white-space: nowrap; transition: opacity .24s .4s,transform .35s .36s; }
.arc-door-status span,.arc-door-status b { font: 9px "Share Tech Mono","Courier New",monospace; letter-spacing: .24em; }
.arc-door-status span { color: #5ddfff; text-shadow: 0 0 11px #168fff; }
.arc-door-status b { color: #ff8a2b; text-shadow: 0 0 12px #ff670f; }
.arc-door-overlay.is-closed .arc-door-portal { transform: scale(1); }
.arc-door-overlay.is-closed .arc-door { transform: translateX(0) rotateY(0); }
.arc-door-overlay.is-closed .arc-door-energy-core { opacity: 1; transform: translateX(-50%) scaleY(1); }
.arc-door-overlay.is-closed .arc-door-energy-core i { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.arc-door-overlay.is-closed .arc-door-status { opacity: 1; transform: translate(-50%,0); }
.arc-door-overlay.is-opening { background-color: transparent; }
.arc-door-overlay.is-opening::before { opacity: 0; }
.arc-door-overlay.is-opening .arc-door--left { transform: translateX(-124%) rotateY(-8deg); filter: brightness(1.1); }
.arc-door-overlay.is-opening .arc-door--right { transform: translateX(124%) rotateY(8deg); filter: brightness(1.1); }
.arc-door-overlay.is-opening .arc-door-energy-core,.arc-door-overlay.is-opening .arc-door-status { opacity: 0; transition-delay: 0s; }
@media(max-height:620px){.arc-door-status{bottom:12px}.arc-door-status span,.arc-door-status b{font-size:7px}}

@keyframes crtPowerLine {
  to { transform: scaleX(1); }
}

@keyframes crtPowerOpen {
  18% { opacity: 1; }
  100% { opacity: 0; transform: scaleY(1); }
}

@keyframes msDot {
  50% { opacity: .1; }
}

@keyframes arrowDrop {
  0%, 100% { transform: translateY(-3px); opacity: .45; }
  50% { transform: translateY(4px); opacity: 1; }
}

@keyframes powerHint {
  0%, 100% { box-shadow: 0 0 0 1px rgba(235, 235, 235, .1), 0 0 10px rgba(255, 255, 255, .05), inset 0 0 10px rgba(255, 255, 255, .025); }
  50% { box-shadow: 0 0 0 1px rgba(235, 235, 235, .3), 0 0 20px rgba(255, 255, 255, .12), inset 0 0 16px rgba(255, 255, 255, .07); }
}

@keyframes powerOnHint {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 213, 104, .18), 0 0 12px rgba(255, 196, 42, .09), inset 0 0 10px rgba(255, 196, 42, .04); }
  50% { box-shadow: 0 0 0 1px rgba(255, 213, 104, .42), 0 0 25px rgba(255, 196, 42, .22), inset 0 0 18px rgba(255, 196, 42, .1); }
}

@keyframes startHintReady {
  0%, 100% { box-shadow: 0 0 0 1px rgba(114, 255, 194, .25), 0 0 16px rgba(114, 255, 194, .14), inset 0 0 12px rgba(114, 255, 194, .07); }
  50% { box-shadow: 0 0 0 1px rgba(114, 255, 194, .62), 0 0 34px rgba(114, 255, 194, .4), inset 0 0 24px rgba(114, 255, 194, .18); }
}

@keyframes controlPulse {
  50% { opacity: .8; filter: saturate(1.2) brightness(1.16); }
}

@keyframes heartbeatTrace {
  to { stroke-dashoffset: 0; }
}

@keyframes heartbeatThrob {
  0%, 100% { transform: scaleY(.92); opacity: .72; }
  12% { transform: scaleY(1.16); opacity: 1; }
  22% { transform: scaleY(.97); opacity: .82; }
  34% { transform: scaleY(1.08); opacity: 1; }
  48%, 82% { transform: scaleY(.94); opacity: .76; }
}

@media (max-width: 1080px) {
  .home-page--no-scroll .home-arcade-centered {
    width: min(68vw, 900px);
    width: min(68vw, 900px, calc(92dvh * 1.09375));
  }
}

@media (max-width: 720px) {
  .home-page--no-scroll .home-arcade-centered {
    width: min(86vw, 620px);
    width: min(86vw, 620px, calc(92dvh * 1.09375));
  }

  .machine-power-label {
    font-size: clamp(12px, 3vw, 17px);
    letter-spacing: .12em;
  }

  .ms-title {
    font-size: clamp(10px, 4vw, 16px);
  }

  .ms-sub {
    font-size: clamp(7px, 2vw, 10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .initializing-screen { transition-duration: 1ms; }
  .initializing-fill { transition: none; }

  .machine-screen[data-phase="boot"]::before,
  .machine-screen[data-phase="boot"]::after,
  .ms-dots i,
  .ms-arrows i,
  .machine-power-label,
  .power-heartbeat,
  .power-heartbeat__trace,
  .machine-keychain-swing,
  .home-machine-layer::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .arc-door,
  .home-page--no-scroll > .home-energy-background,
  .home-page--no-scroll > .home-energy-off-background,
  .home-machine-layer .home-arcade-live {
    transition-duration: 1ms !important;
  }
}

/* Keep the complete cabinet, controls, and keychain visible in short or narrow
   desktop browser windows without changing their shared geometry. */
@media (hover: hover) and (pointer: fine) and (max-height: 620px) {
  .home-page--no-scroll .home-arcade-centered {
    width: min(86vw, 900px);
    width: min(86vw, 900px, calc(94dvh * 1.09375));
  }
}

/* Phones and touch-first mobile devices receive a dedicated desktop-only gate. */
.desktop-only-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  place-items: center;
  overflow: hidden;
  color: #eafaff;
  background: #01050c;
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  text-align: center;
  isolation: isolate;
  touch-action: none;
}

.desktop-only-gate::before {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: -3;
  background: linear-gradient(rgba(1, 5, 12, .78), rgba(1, 5, 12, .9)), url('/arc-power-off-bg.jpg') center / cover no-repeat;
  filter: saturate(.75) contrast(1.12);
}

.desktop-only-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(106, 236, 255, .035) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 44%, rgba(0, 176, 255, .16), transparent 47%),
    linear-gradient(90deg, rgba(0, 216, 255, .08), transparent 18% 82%, rgba(255, 171, 34, .08));
}

.desktop-only-gate__panel {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(28px, 8vw, 48px) clamp(18px, 7vw, 42px);
  border: 1px solid rgba(99, 230, 255, .58);
  background: linear-gradient(145deg, rgba(3, 13, 29, .92), rgba(1, 6, 15, .86));
  box-shadow: 0 0 0 1px rgba(255, 174, 50, .14), 0 0 42px rgba(0, 189, 255, .18), inset 0 0 38px rgba(0, 149, 255, .08);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}

.desktop-only-gate__panel::before,
.desktop-only-gate__panel::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 30px;
  height: 2px;
  background: #ffae32;
  box-shadow: 0 0 12px #ff8b18;
}

.desktop-only-gate__panel::before { left: 14px; }
.desktop-only-gate__panel::after { right: 14px; }

.desktop-only-gate__eyebrow {
  margin: 0 0 26px;
  color: #6feaff;
  font: 700 clamp(8px, 2.5vw, 11px)/1.4 "Courier New", monospace;
  letter-spacing: clamp(.13em, .8vw, .24em);
}

.desktop-only-gate__monitor {
  position: relative;
  width: 78px;
  height: 52px;
  margin: 0 auto 28px;
  border: 2px solid #70e9ff;
  border-radius: 5px;
  box-shadow: 0 0 22px rgba(72, 220, 255, .48), inset 0 0 18px rgba(0, 179, 255, .12);
}

.desktop-only-gate__monitor::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 22px;
  height: 11px;
  border-bottom: 2px solid #ffae32;
  border-left: 2px solid #ffae32;
  border-right: 2px solid #ffae32;
  transform: translateX(-50%);
}

.desktop-only-gate__monitor span {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 174, 50, .72);
  background: linear-gradient(90deg, transparent 0 42%, #70e9ff 42% 48%, transparent 48% 55%, #ffae32 55% 61%, transparent 61%);
  animation: desktopGateSignal 1.8s ease-in-out infinite;
}

.desktop-only-gate h1 {
  margin: 0;
  color: #f2fbff;
  font-size: clamp(28px, 9.5vw, 52px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: .045em;
  text-shadow: 0 0 16px rgba(94, 226, 255, .35);
}

.desktop-only-gate h1 strong {
  display: inline-block;
  margin-top: 8px;
  color: #ffb13c;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 145, 26, .38);
}

.desktop-only-gate__copy {
  max-width: 330px;
  margin: 24px auto 0;
  color: rgba(224, 247, 255, .76);
  font: 700 clamp(9px, 3vw, 12px)/1.55 "Courier New", monospace;
  letter-spacing: .13em;
}

.desktop-only-gate__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 174, 50, .34);
  color: rgba(255, 197, 103, .92);
  background: rgba(255, 151, 24, .06);
  font: 700 8px/1 "Courier New", monospace;
  letter-spacing: .14em;
}

.desktop-only-gate__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff9c25;
  box-shadow: 0 0 10px #ff7b00;
  animation: desktopGatePulse 1.2s ease-in-out infinite;
}

html.desktop-only-device,
html.desktop-only-device body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  background: #01050c;
}

html.desktop-only-device #root,
html.desktop-only-device #initializing-screen {
  display: none !important;
}

html.desktop-only-device .desktop-only-gate {
  display: grid;
}

@media (hover: none) and (pointer: coarse) and (max-width: 1100px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    background: #01050c;
  }

  #root,
  #initializing-screen {
    display: none !important;
  }

  .desktop-only-gate {
    display: grid;
  }
}

/* Compact horizontal phone layout: keep the full notice inside short screens. */
@media (max-width: 1100px) and (max-height: 480px) {
  .desktop-only-gate {
    padding: 12px 18px;
  }

  .desktop-only-gate .desktop-only-gate__panel {
    width: min(94vw, 680px);
    max-height: calc(100svh - 24px);
    padding: 14px 26px 16px;
  }

  .desktop-only-gate .desktop-only-gate__eyebrow {
    margin-bottom: 8px;
    font-size: 8px;
  }

  .desktop-only-gate .desktop-only-gate__monitor {
    width: 48px;
    height: 30px;
    margin-bottom: 10px;
  }

  .desktop-only-gate .desktop-only-gate__monitor::before {
    bottom: -7px;
    height: 5px;
  }

  .desktop-only-gate h1 {
    font-size: clamp(23px, 5vw, 30px);
    line-height: .94;
  }

  .desktop-only-gate h1 strong {
    margin-top: 4px;
  }

  .desktop-only-gate .desktop-only-gate__copy {
    max-width: none;
    margin-top: 8px;
    font-size: 8px;
    line-height: 1.35;
  }

  .desktop-only-gate .desktop-only-gate__status {
    margin-top: 8px;
    padding: 6px 9px;
  }
}

@keyframes desktopGateSignal {
  0%, 100% { opacity: .45; transform: scaleX(.72); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes desktopGatePulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-only-gate__monitor span,
  .desktop-only-gate__status i {
    animation: none;
  }
}



/* Legacy injected robots removed; powered companions are owned by React. */


/* =====================================================================
   FINAL RESPONSIVE SCENE LOCK
   - One background layer fills the whole page: no duplicate and no seam.
   - The background and cabinet share one virtual 16:9 stage.
   - The complete stage scales as one unit at every viewport size.
   ===================================================================== */
.home-page--no-scroll {
  --scene-ar: 1.7777778;
  --machine-share: .58;
  /* cover-sized 16:9 stage: always fills the complete viewport */
  --scene-w: max(100vw, 177.7778vh);
  --scene-w: max(100vw, calc(100dvh * var(--scene-ar)));
  --scene-h: calc(var(--scene-w) / var(--scene-ar));
  --machine-w: calc(var(--scene-w) * var(--machine-share));
  --machine-unit: calc(var(--machine-w) / 1000);
}

/* The only background layer fills the virtual stage without distortion. */
.home-page--no-scroll > .home-energy-background,
.home-page--no-scroll > .home-energy-off-background {
  position: absolute !important;
  inset: auto !important;
  left: 50% !important;
  top: 50% !important;
  width: var(--scene-w) !important;
  height: var(--scene-h) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  animation: none !important;
}

/* Cabinet follows the same 16:9 scene. */
.home-page--no-scroll .home-arcade-centered {
  left: 50% !important;
  right: auto !important;
  top: calc(50vh + (var(--scene-h) / 2)) !important;
  top: calc(50dvh + (var(--scene-h) / 2)) !important;
  bottom: auto !important;
  width: var(--machine-w) !important;
  min-width: 0 !important;
  max-width: none !important;
  transform: translate(-50%, -97.6%) !important;
}

.home-page--no-scroll .home-machine-layer {
  transform: none !important;
}

/* Internal cabinet elements scale with the cabinet. */
.home-page--no-scroll .machine-screen-content {
  gap: calc(var(--machine-unit) * 9.9);
}

.home-page--no-scroll .ms-title {
  font-size: calc(var(--machine-unit) * 30.5);
}

.home-page--no-scroll .ms-sub {
  font-size: calc(var(--machine-unit) * 12.6);
}

.home-page--no-scroll .ms-extra {
  font-size: calc(var(--machine-unit) * 11.7);
}

.home-page--no-scroll .ms-arrows {
  gap: calc(var(--machine-unit) * 16.2);
  font-size: calc(var(--machine-unit) * 19.8);
}

.home-page--no-scroll .machine-power-label {
  font-size: calc(var(--machine-unit) * 25.1);
}


/* Final START target alignment; !important prevents later bundle rules from shifting it left. */
.home-page--no-scroll .home-machine-layer .arcade-start-button,
.home-page--no-scroll.arcade-power-off .home-machine-layer .arcade-start-button,
.home-page--no-scroll.arcade-powered .home-machine-layer .arcade-start-button,
.home-page--no-scroll.arcade-ready .home-machine-layer .arcade-start-button {
  left: 31% !important;
  top: 78.25% !important;
  right: auto !important;
  bottom: auto !important;
  width: 38% !important;
  height: 13.5% !important;
  transform: none !important;
  z-index: 30 !important;
  pointer-events: auto !important;
}

.home-page--no-scroll .home-machine-layer .home-arcade-live {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}


/* Mobile access is enabled: keep the normal initializer and React app visible. */
html.desktop-only-device,
html.desktop-only-device body {
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html.desktop-only-device #root,
html.desktop-only-device #initializing-screen {
  display: block !important;
}

.desktop-only-gate {
  display: none !important;
}

@media (hover: none) and (pointer: coarse) and (max-width: 1100px) {
  html,
  body {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  #root {
    display: block !important;
  }

  #initializing-screen {
    display: grid !important;
  }

  .desktop-only-gate {
    display: none !important;
  }
}
