:root {
  color-scheme: dark;
  --ink: #110e15;
  --panel: #211921;
  --border: #40313b;
  --paper: #fff1db;
  --muted: #c1acb5;
  --amber: #ffb742;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  color: var(--paper);
  background: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:where(button, a):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

main { position: relative; }

#splash {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 100svh;
  background: #1d111b;
}

#artwork, #splash::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#artwork {
  z-index: -2;
  object-fit: cover;
  object-position: 68% center;
}

#splash::after {
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgb(12 8 16 / 91%), rgb(15 10 20 / 65%) 35%, transparent 71%);
}

.splash-content {
  width: 100%;
  padding: 64px clamp(24px, 7vw, 130px) 126px;
}

.intro { width: min(100%, 535px); }
.intro h1 { margin: 0 0 4px; }
.intro h1 img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 0 rgb(12 7 13 / 80%));
}

.intro p {
  margin: 0;
  font-size: clamp(12px, 1.35vw, 16px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .13em;
}

#start {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin: 34px 0 18px;
  padding: 0 24px;
  border: 1px solid #ffe7a7;
  background: var(--amber);
  color: #24100e;
  box-shadow: 5px 5px 0 #8d3c22;
  font-size: 17px;
  font-weight: 700;
}

#start:hover { background: #ffcc70; }
#start span { font-size: 14px; }

.intro .credit {
  color: #e2cbbd;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: none;
}

.support {
  position: absolute;
  inset: auto auto 32px clamp(24px, 7vw, 130px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #66505a;
  background: #1c131b;
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.support a:hover { border-color: var(--amber); }
.patreon-mark, .star { font-size: 16px; line-height: 1; }
.patreon-mark { color: #ff8b7b; font-weight: 900; }
.star { color: var(--amber); }

.playing .support {
  position: static;
  justify-content: center;
  padding: 0 12px 32px;
}

#arcade { padding: 28px 0 24px; }
.cabinet {
  padding-inline: 12px;
  display: grid;
  justify-content: center;
  grid-template-columns: minmax(0, 820px);
  align-items: start;
  gap: 16px;
}

.game {
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--panel);
}

.game-header, .game-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 14px;
}

.game-header h2 {
  margin: 0;
  color: var(--amber);
  font-size: 21px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.game-header p { margin: 0; color: var(--muted); font-size: 12px; }
#screen { position: relative; background: #000; }
#dos { width: 100%; aspect-ratio: 4 / 3; position: relative; background: #000; }
#screen:fullscreen { display: grid; place-items: center; }
#screen:fullscreen #dos { width: min(100vw, calc(100vh * 4 / 3)); }

#fullscreen, #exit-fullscreen {
  padding: 8px 12px;
  border: 1px solid #6c5463;
  background: var(--ink);
  font-size: 12px;
}

#fullscreen:hover, #exit-fullscreen:hover { border-color: var(--amber); }
#exit-fullscreen { display: none; }

#screen:fullscreen #exit-fullscreen {
  display: block;
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
}

.game-controls ul {
  display: flex;
  flex: 1 1 250px;
  flex-wrap: wrap;
  gap: 9px 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

.game-controls li { white-space: nowrap; }

kbd {
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
}

#game-status { margin: 0 14px 12px; font-size: 12px; }
#game-status:empty { display: none; }

.ad {
  display: block;
  overflow: hidden;
}

.ad > iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ad-left, .ad-right, .ad-wide { display: none; }
.ad-mobile { width: min(320px, 100%); height: 50px; margin: 20px auto 0; }

@media (min-width: 760px) {
  .ad-mobile { display: none; }
  .ad-wide { display: block; width: 728px; height: 90px; margin: 20px auto 0; }
}

@media (min-width: 1080px) {
  .cabinet { grid-template-columns: 160px minmax(0, 820px) 160px; }
  .ad-left, .ad-right { display: block; height: 600px; }
}

@media (max-width: 720px), (max-aspect-ratio: 1/1) {
  #splash { align-items: end; }
  #artwork { object-position: 81% center; }
  #splash::after {
    background: linear-gradient(0deg, #100b16 2%, rgb(16 11 22 / 87%) 24%, transparent 63%);
  }
  .splash-content { padding-top: 38svh; padding-bottom: 104px; }
  .intro { width: min(100%, 410px); }
  #start { margin-top: 22px; }
  .support { bottom: 24px; }
}

@media (max-width: 350px) {
  .splash-content { padding-bottom: 155px; }
  .support { right: 24px; }
}
