@font-face {
  font-family: Console;
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f3f1e9;
  --ink: #202322;
  --muted: #646860;
  --line: #d6d8cc;
  --accent: #c5fb63;
  --purple: #c8baf5;
  --dark: #171c1b;
  --mono: Console, "IBM Plex Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 3px solid #876bbf;
  outline-offset: 4px;
}
header {
  max-width: 1320px;
  margin: auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-mark {
  width: 29px;
  height: 29px;
  background: var(--ink);
  display: grid;
  place-content: center;
  color: var(--accent);
  font-size: 22px;
  font-weight: bold;
}
.brand-name {
  font-weight: bold;
  font-size: 16px;
  letter-spacing: -0.6px;
}
.brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 25px;
}
nav a {
  text-decoration: none;
  font-size: 12px;
}
nav a:hover {
  text-decoration: underline;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -2px;
  margin: 0 0 12px;
}
h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.intro {
  color: var(--muted);
  max-width: 620px;
  margin: 0;
}
.machine-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 5px;
}
.console-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.console {
  background: var(--dark);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 12px 25px #20232212;
}
.console-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px 12px;
  color: #a4ada7;
  font-size: 10px;
  letter-spacing: 1px;
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #738177;
}
.status[data-state="running"]:before {
  background: var(--accent);
}
.status[data-state="error"]:before {
  background: #fa9b87;
}
.screen {
  position: relative;
  background: #020119;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid #343c34;
}
.screen canvas,
.screen .poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.screen canvas {
  position: absolute;
  inset: 0;
}
.screen canvas[hidden] {
  display: none;
}
.screen-overlay {
  position: absolute;
  inset: 0;
  background: #06091bb8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 36px;
  backdrop-filter: blur(1px);
}
.screen-overlay[hidden] {
  display: none;
}
.screen-overlay strong {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 10px;
}
.screen-overlay p {
  font-size: 12px;
  max-width: 330px;
  color: #c5cbd4;
}
.boot-glyph {
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid #a3a8b8;
  transform: rotate(45deg);
  margin-bottom: 25px;
  background: #c8baf518;
}
.progress {
  height: 3px;
  background: #525a65;
  width: min(280px, 100%);
  margin-top: 15px;
  overflow: hidden;
}
.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}
.console-toolbar {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  align-items: center;
}
.console-toolbar button {
  color: #d8dfd9;
  border: 1px solid #424b43;
  background: transparent;
  min-height: 35px;
  padding: 6px 12px;
  border-radius: 4px;
}
.console-toolbar button:hover:not(:disabled) {
  background: #2d382e;
}
.console-toolbar button:disabled {
  cursor: default;
}
.console-toolbar .spacer {
  flex: 1;
}
.focus-hint {
  color: #89958c;
  font-size: 10px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.panel-title {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin: 0 0 16px;
}
.games {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
}
.game-option:has(input:checked) {
  border-color: #68764c;
  background: #eef4de;
}
.game-option input {
  accent-color: var(--ink);
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.game-option img {
  width: 53px;
  height: 40px;
  image-rendering: pixelated;
  object-fit: cover;
  border: 1px solid #d0d0c4;
}
.game-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.game-description {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 3px;
}
.upload-label {
  display: block;
  margin-top: 16px;
}
.upload-label input {
  display: block;
  width: 100%;
  font-size: 10px;
  margin-top: 6px;
}
.upload-note {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 0;
}
.primary {
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 12px 15px;
  min-height: 44px;
  margin-top: 18px;
  text-align: center;
}
.primary:hover:not(:disabled) {
  background: #354333;
}
.primary:active {
  transform: translateY(1px);
}
.footnote {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
}
.key-rows {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  font-size: 11px;
  align-items: center;
}
.key-rows dt {
  color: var(--muted);
}
.key-rows dd {
  margin: 0;
}
.key {
  display: inline-block;
  font-size: 10px;
  min-width: 20px;
  padding: 0 5px;
  border: 1px solid #cccec3;
  border-bottom-width: 2px;
  border-radius: 3px;
  text-align: center;
  background: #f8f8f0;
  margin-left: 2px;
}
.below-console {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  margin: 16px 2px;
}
.below-console a {
  white-space: nowrap;
}
details {
  margin-top: 25px;
}
summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
}
.boot-log {
  background: #e5e7dd;
  max-height: 230px;
  overflow: auto;
  padding: 15px;
  font-size: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 4px;
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 42px 0 12px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.details-grid p {
  color: var(--muted);
  font-size: 12px;
}
.license-links {
  display: flex;
  gap: 18px;
  font-size: 11px;
  flex-wrap: wrap;
}
.footer {
  max-width: 1320px;
  margin: 20px auto 0;
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}
.footer-links {
  display: flex;
  gap: 18px;
}
.content {
  max-width: 800px;
}
.content p,
.content li {
  color: var(--muted);
}
.content h2 {
  margin-top: 30px;
}
.content code {
  background: #e8e8df;
  padding: 2px 4px;
}
.content pre {
  background: #202822;
  color: #eef6e9;
  padding: 18px;
  border-radius: 5px;
  overflow: auto;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}
.notice {
  padding: 16px;
  background: #e6eadc;
  border-left: 3px solid #7d8e61;
  margin: 25px 0;
}
.error {
  color: #a03020;
}
.form-grid {
  display: grid;
  gap: 16px;
}
.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c7ccbd;
  border-radius: 4px;
  background: #fffefa;
  color: var(--ink);
}
.form-grid textarea {
  min-height: 170px;
  resize: vertical;
}
.form-grid .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
}
.form-grid .check input {
  width: auto;
  margin: 5px 0;
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  min-height: 24px;
  margin: 12px 0;
}
.admin-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-toolbar select {
  padding: 8px;
  border: 1px solid var(--line);
  background: #fffdf7;
}
.admin-record {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf7;
  padding: 18px;
  margin-top: 16px;
  word-break: break-word;
}
.admin-record dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  font-size: 11px;
  gap: 6px;
}
.admin-record dt {
  color: var(--muted);
}
.admin-record dd {
  margin: 0;
  white-space: pre-wrap;
}
.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
}
.admin-actions button,
.secondary {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdf7;
  color: var(--ink);
}
.admin-actions input {
  flex: 1;
  min-width: 80px;
  padding: 8px;
  border: 1px solid var(--line);
}
.count {
  font-size: 11px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  header,
  main {
    padding-left: 24px;
    padding-right: 24px;
  }
  .console-layout {
    grid-template-columns: minmax(0, 1fr) 265px;
    gap: 18px;
  }
  .panel {
    padding: 16px;
  }
  .machine-label {
    display: none;
  }
  .focus-hint {
    display: none;
  }
}
@media (max-width: 760px) {
  header {
    padding: 20px;
    align-items: flex-start;
  }
  nav {
    gap: 15px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-sub {
    font-size: 8px;
  }
  main {
    padding: 28px 18px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .console-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .panel {
    min-width: 0;
  }
  .games .game-option {
    padding: 8px;
    gap: 7px;
  }
  .game-option img {
    display: none;
  }
  .console {
    padding: 9px;
    border-radius: 10px;
  }
  .console-toolbar button {
    padding: 6px 9px;
    font-size: 11px;
  }
  .details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 30px;
  }
  .footer {
    padding: 20px;
    flex-direction: column;
    gap: 12px;
  }
  .below-console {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .content h1 {
    font-size: 32px;
  }
  .admin-record dl {
    grid-template-columns: 85px 1fr;
  }
}
@media (max-width: 420px) {
  nav a:first-child {
    display: none;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .key-rows {
    grid-template-columns: 1fr auto;
  }
  .screen-overlay {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.construction {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.construction .details-grid {
  margin-top: 22px;
  padding-top: 20px;
}
.construction p,
.local-callout p {
  color: var(--muted);
  font-size: 12px;
}
.architecture-flow {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.architecture-flow li {
  padding: 16px;
  background: #e6eadc;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.architecture-flow strong,
.architecture-flow span {
  display: block;
}
.architecture-flow span {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.local-callout {
  margin-top: 32px;
  background: #e6eadc;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.local-callout h2 {
  margin-top: 0;
}
.content pre {
  max-width: 100%;
  overflow-wrap: anywhere;
}
nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.content li {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  nav {
    max-width: 185px;
    gap: 8px 14px;
  }
  .architecture-flow {
    grid-template-columns: 1fr 1fr;
  }
  .local-callout {
    padding: 18px;
  }
}
