:root, :host, .arcade-viewport {
  color-scheme: dark;
  font: 16px/normal 'Avenir Next', 'Trebuchet MS', sans-serif;
  letter-spacing: normal;
  text-align: start;
  text-transform: none;
  color: #fff6e4;
  background: #18161d;
}
/* The phone shell is sized by Framer. Standalone uses its own viewport. */
.arcade-viewport {
  container: arcade / size;
  width: 100%;
  height: 100svh;
}
:host .arcade-viewport { height: 100%; }
* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible {
  outline: 3px solid #fff4a1;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.arcade {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  overflow: clip;
  min-height: 100cqh;
  padding: clamp(25px,5cqh,56px) 0;
}
.backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.layout {
  width: min(89%, 1120px);
  margin-inline: auto;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0,.67fr) minmax(0,1.33fr);
  grid-template-areas: 'brand cabinet' '. selection' 'shelf shelf' 'footer footer';
  column-gap: clamp(18px, 3cqw, 48px);
  row-gap: 10px;
}
.brand {
  grid-area: brand;
  z-index: 1;
  align-self: center;
  margin: 0 -1% 8%;
}
.brand img { width: 100%; }
.cabinet {
  grid-area: cabinet;
  position: relative;
  width: 100%;
  /* The illustrated bezel opening is 79.5% wide and 68.7% tall. */
  aspect-ratio: 1.5363;
}
.cabinet-art { width: 100%; height: 100%; animation: cabinet-light 7s ease-in-out infinite; }
@keyframes cabinet-light { 0%, 40%, 100% {filter:brightness(1)} 72% {filter:brightness(1.06)} }
.screen {
  position: absolute;
  left: 10.1%;
  top: 10.9%;
  width: 79.5%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #060709;
}
.screen img { width: 100%; height: 100%; object-fit: contain; }
.screen .outgoing { position: absolute; inset: 0; }
.screen .channel-switch { position: absolute; left: 0; top: 0; width: 100%; height: auto; opacity: 0; z-index: 2; pointer-events: none; }
.lamp {
  position: absolute;
  left: 46.0%;
  bottom: 6.4%;
  width: 3.4%;
  animation: signal 3.8s ease-in-out infinite;
}
@keyframes signal { 0%,42%,100% {opacity:.24;} 65%,77% {opacity:1;} }
.selection {
  grid-area: selection;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: -2px 5% 0;
  min-height: 75px;
}
.copy { max-width: 39ch; }
h2 { font-size: clamp(22px, 2.35cqw, 34px); line-height: 1.08; letter-spacing: -.035em; }
#summary, #availability { margin-top: 4px; font-size: clamp(14px, 1.22cqw, 17px); font-weight: 520; line-height: 1.36; }
#availability { color: #ffe69a; font-size: 13px; }
.control, .cart {
  position: relative;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
.control img { grid-area: 1 / 1; width: 100%; }
.control img, .screen img, .cart > * { pointer-events: none; }
.control .down { visibility: hidden; transform: translateY(4%); }
.control:active .up, .control.pressed .up { visibility: hidden; }
.control:active .down, .control.pressed .down { visibility: visible; }
.play { width: clamp(94px, 10.5cqw, 145px); flex: none; min-height: 48px; }
.play[aria-disabled=true] { opacity: .46; cursor: default; }
.shelf {
  grid-area: shelf;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(46px,6.5%) minmax(0,1fr) minmax(46px,6.5%);
  gap: 15px;
  width: 97%;
  margin: clamp(4px,1cqw,14px) auto 0;
}
.arrow { width: 100%; min-height: 46px; }
#cartridges {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(6px,1.1cqw,18px);
}
.cart {
  width: min(19%, 165px);
  min-width: 0;
  flex: 1 1 0;
  aspect-ratio: 1.3;
  transition: transform 180ms ease;
}
.cart .shell { position: absolute; inset: auto 0 0; width: 100%; height: 85.7%; }
.cart[aria-pressed=true] .shell { height: 100%; }
.cart .label {
  position: absolute;
  left: 18%;
  bottom: 14.8%;
  width: 64%;
  aspect-ratio: 16 / 9;
  background: #100e16;
}
.cart .dev-sticker {
  position: absolute;
  left: 6%;
  width: 88%;
  bottom: 64%;
  height: auto;
  pointer-events: none;
}
.browser-note {
  grid-area: footer;
  justify-self: center;
  color: #faf4e7;
  background: rgb(19 15 24 / 86%);
  padding: 3px 8px;
  max-width: 100%;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
}
@media (pointer:coarse) {
  .arcade { touch-action: pan-y pinch-zoom; }
}
.cart .label img { width: 100%; height: 100%; object-fit: contain; }
.cart[aria-pressed=true] { transform: translateY(-4%) rotate(-3deg); }
@media (hover:hover) {
  .cart:hover { transform: translateY(-6%); }
  .control:hover:not([aria-disabled=true]) { transform: translateY(-2px); }
}
@container arcade (min-width:721px) and (max-height:750px) {
  .layout { width: min(88%,137cqh,1060px); }
  .arcade { padding-block: 10px; }
}
@container arcade (max-width:720px) {
  .arcade { padding: 4px 0; }
  .backdrop { object-position: 53% center; }
  .layout {
    width: min(94%,520px);
    grid-template-columns: minmax(0,1fr);
    grid-template-areas: 'brand' 'cabinet' 'selection' 'shelf' 'footer';
    gap: 8px;
  }
  .brand { width: clamp(140px,46cqw,215px); margin: 0 auto; }
  .selection { gap: 10px; margin: 0 2%; min-height: 72px; }
  h2 { font-size: clamp(21px,5.2cqw,29px); }
  #summary { font-size: 14px; }
  .play { width: clamp(74px,22cqw,105px); }
  .shelf {
    width: 100%;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    gap: 0;
    margin: 0;
  }
  #cartridges {
    grid-area: 1 / 1 / 2 / -1;
    flex-wrap: wrap;
    gap: 3px 5px;
  }
  .cart { flex: 0 0 calc((100% - 10px) / 3); min-height: 44px; }
  .shelf .arrow {
    grid-row: 1;
    align-self: end;
    z-index: 1;
    margin-bottom: 15%;
  }
  #previous {grid-column: 1;}
  #next {grid-column: 3;}
  .browser-note {font-size: 12px;}
}
@container arcade (max-width:720px) and (max-height:610px) {
  .arcade { padding-block: 4px; }
  .layout { row-gap: 4px; }
  .brand { width: min(41cqw,160px); }
  .selection { min-height: 62px; }
  #summary {font-size: 13px;}
}
@container arcade (max-width:360px) and (max-height:610px) {
  /* Reserve room for a wrapped game title and summary so the TV stays put. */
  .selection { min-height: 86px; }
}
@container arcade (min-width:550px) and (max-height:480px) {
  .arcade { padding-block: 5px; }
  .layout {
    width: min(95%,168cqh);
    grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr);
    grid-template-areas: 'brand cabinet' 'selection cabinet' 'shelf shelf' 'footer footer';
    gap: 3px 14px;
  }
  .brand { width: min(71%,185px); margin: 0 auto; }
  .selection { min-height: 52px; gap: 8px; margin: 0; }
  h2 {font-size: 20px;}
  #summary {font-size: 13px;}
  .play {width: 70px;}
  .shelf { width: 100%; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 6px; margin: 1px auto 0; }
  #cartridges {grid-area: 1 / 2; flex-wrap: nowrap; gap: 6px;}
  .cart {flex: 1 1 0;}
  .shelf .arrow {grid-row: 1; align-self: center; margin: 0;}
  #previous {grid-column: 1;}
  #next {grid-column: 3;}
  .browser-note {font-size: 12px;}
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
