:root {
  color-scheme: dark;
  --ink: #f8f2dc;
  --panel: #262334;
  --panel-dark: #12111c;
  --red: #e14d43;
  --gold: #f6c453;
  --mint: #79d9af;
  --sky: #5ba7d8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 20% 18%, #303857 0 12%, transparent 32%),
    radial-gradient(circle at 82% 78%, #5a2939 0 10%, transparent 30%),
    #111018;
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  overflow-x: hidden;
}

.shell {
  min-height: 100svh;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 22px;
  padding: clamp(12px, 3vw, 32px);
}

.cabinet {
  width: min(100%, 1040px);
  display: grid;
  gap: 12px;
  padding: clamp(10px, 2.4vw, 18px);
  background: linear-gradient(180deg, #39364b, var(--panel));
  border: 4px solid #0d0c14;
  box-shadow:
    0 18px 0 #0a0910,
    0 24px 48px rgba(0, 0, 0, 0.45);
}

.marquee {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #090812;
  border: 3px solid #56516c;
  box-shadow: inset 0 0 0 3px #151424;
}

.marquee span:first-child {
  color: var(--gold);
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 5.2rem);
  line-height: 0.9;
  text-shadow:
    4px 0 #b32942,
    0 4px #2e6d9e,
    4px 4px #0a0910;
}

.light {
  width: clamp(20px, 4vw, 34px);
  aspect-ratio: 1;
  background: var(--red);
  border: 4px solid #0a0910;
  box-shadow: 0 0 18px rgba(225, 77, 67, 0.8);
}

.screen-wrap {
  position: relative;
  width: 100%;
  background: #05050a;
  border: 5px solid #090812;
  box-shadow:
    inset 0 0 0 4px #4a465e,
    inset 0 0 60px rgba(0, 0, 0, 0.7);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.screen-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, rgba(0, 0, 0, 0.08) 50%) 0 0 / 100% 4px,
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.38));
  mix-blend-mode: screen;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #121a2b;
}

.panel {
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(3, minmax(54px, 1fr)) minmax(64px, 0.8fr);
  gap: 10px;
  padding: 10px;
  background: var(--panel-dark);
  border: 3px solid #56516c;
}

button {
  appearance: none;
  border: 3px solid #08070e;
  border-radius: 0;
  color: #0a0910;
  background: var(--mint);
  font: 900 clamp(1.2rem, 4vw, 2rem) / 1 "Courier New", Courier, monospace;
  box-shadow: 0 6px 0 #08070e;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:active,
button.is-down {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #08070e;
}

.jump {
  background: var(--gold);
}

.coin-btn {
  background: var(--red);
  display: grid;
  place-items: center;
  font-size: clamp(0.66rem, 2.5vw, 1rem);
}

.coin-btn span {
  display: block;
  padding-top: 2px;
  letter-spacing: 0;
}

@media (min-width: 820px) {
  .panel {
    width: min(460px, 60%);
    justify-self: center;
  }
}

.gallery {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 4px solid #0a0910;
  box-shadow: 0 8px 0 #0a0910;
  image-rendering: pixelated;
  background: #111018;
}

@media (max-width: 720px) {
  .shell {
    align-content: start;
  }

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