@font-face {
  font-family: "PressStart2P";
  src: url("fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: block;
}
@font-face {
  font-family: "Galmuri7";
  src: url("fonts/Galmuri7.woff2") format("woff2");
  font-display: block;
}
@font-face {
  font-family: "Galmuri9";
  src: url("fonts/Galmuri9.woff2") format("woff2");
  font-display: block;
}
@font-face {
  font-family: "Galmuri11";
  src: url("fonts/Galmuri11.woff2") format("woff2");
  font-display: block;
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --ink: #f2f2f2;
  --mid: #8a8a8a;
  --dim: #4a4a4a;
  --line: #242424;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  font-family: "PressStart2P", "Galmuri11", "Galmuri9", "Apple SD Gothic Neo", monospace;
  user-select: none;
  -webkit-user-select: none;
}

.cabinet {
  width: 964px;
  max-width: 100vw;
  padding: 0;
}

.screen {
  position: relative;
  width: 964px;
  height: 544px;
  overflow: hidden;
  background: #070707;
  border: 2px solid #2a2a2a;
  border-radius: 0;
  box-shadow:
    0 0 0 6px #0c0c0c,
    0 0 0 7px #1a1a1a,
    0 24px 80px rgba(0, 0, 0, 0.85);
}

canvas {
  display: block;
  cursor: none;
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  touch-action: none;
}

.under {
  display: flex;
  justify-content: center;
  padding: 10px 4px 0;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hot-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 18px;
  height: 18px;
  padding: 2px;
  display: grid;
  place-items: center;
  color: #d8d8d8;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid #333333;
  border-radius: 50%;
  cursor: pointer;
}

.hot-toggle svg {
  width: 12px;
  height: 12px;
  display: block;
}

.hot-toggle:hover { border-color: #8a8a8a; }
.hot-toggle.off { color: #4a4a4a; }

.hot-toggle.off::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 1px;
  background: #8a8a8a;
  transform: rotate(-45deg);
}

@media (max-width: 980px) {
  .cabinet { width: 100vw; }
  .screen {
    width: calc(100vw - 4px);
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  .under { font-size: 8px; letter-spacing: 0.08em; }
  .cabinet { width: 100vw; padding: 6px; }
}
