:root {
  --ink: #1b2237;
  --paper: #f4f1e8;
  --rule: #b8b8ae;
  --orange: #fa693b;
  --blue: #3d59ab;
  font:
    16px Arial,
    Helvetica,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
#home {
  width: min(1440px, 100%);
  padding: 0 clamp(20px, 4.6vw, 78px);
  margin: auto;
}
.mast {
  display: flex;
  align-items: center;
  gap: 22px;
  height: clamp(68px, 10vh, 98px);
  border-bottom: 2px solid var(--ink);
}
.brand {
  font-size: clamp(17px, 1.7vw, 25px);
  font-weight: 950;
  font-style: italic;
  letter-spacing: -1.2px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand svg {
  width: 38px;
  height: 28px;
  color: var(--orange);
}
.edition,
.discipline,
small,
.venue,
.plate,
.print-code,
footer,
.utility,
.eyebrow,
.choice label {
  font:
    700 10px/1.3 ui-monospace,
    "Courier New",
    monospace;
  letter-spacing: 1.2px;
}
.edition {
  border-left: 1px solid var(--rule);
  padding-left: 20px;
  color: #555b65;
}
.utility {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.utility svg,
nav svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
  width: 19px;
  height: 19px;
}
#lobby {
  display: grid;
  grid-template-columns: minmax(245px, 0.72fr) minmax(0, 1.6fr);
  gap: clamp(22px, 4.7vw, 82px);
  padding: clamp(27px, 5vh, 60px) 0;
  align-items: stretch;
}
.menu {
  align-self: center;
}
.discipline {
  font-size: clamp(9px, 0.88vw, 12px);
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 1.5px;
}
.discipline i {
  width: 25px;
  height: 8px;
  background: repeating-linear-gradient(
    120deg,
    var(--orange) 0 4px,
    transparent 4px 6px
  );
}
h1 {
  margin: 18px 0 0;
  line-height: 0;
}
h1 svg {
  width: 100%;
  height: auto;
  max-height: 200px;
}
.tagline {
  font-size: clamp(15px, 1.45vw, 21px);
  margin: 8px 0 clamp(23px, 3.5vh, 44px);
  color: #555963;
  font-style: italic;
}
.menu nav {
  display: grid;
  gap: 0;
}
nav button,
.action {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 13px;
  font-weight: 700;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: none;
  padding: 12px 5px;
  font-size: clamp(15px, 1.35vw, 20px);
}
nav button span {
  margin-left: auto;
  font: 18px Arial;
}
nav button.primary,
.action.primary {
  border: 1.5px solid var(--ink);
  background: var(--orange);
  color: #171d30;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 13px 16px;
  margin-bottom: 8px;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 850;
}
nav button.primary svg {
  stroke: none;
}
button:hover {
  filter: brightness(0.94);
}
nav button:not(.primary):hover,
.action:not(.primary):hover {
  background: #e8e5d9;
}
button:focus-visible,
select:focus-visible {
  outline: 3px solid #435bb4;
  outline-offset: 3px;
}
.jacket {
  margin: 0;
  border: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  background: #819ad1;
  box-shadow: 4px 4px 0 #20263a;
  min-height: clamp(380px, 68vh, 670px);
}
.art {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 280px;
}
.art img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
}
.plate,
.print-code {
  position: absolute;
  color: #202943;
}
.plate {
  top: 15px;
  left: 17px;
  font-size: 12px;
  letter-spacing: -0.4px;
  border: 1px solid currentColor;
  padding: 3px 7px;
  font-style: italic;
  background: #aec4e5;
}
.plate span {
  color: #4e6292;
}
.print-code {
  bottom: 12px;
  right: 13px;
  font-size: 9px;
}
.jacket figcaption {
  background: var(--ink);
  color: var(--paper);
  padding: 15px 19px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.checks {
  width: 34px;
  height: 29px;
  background: repeating-conic-gradient(var(--paper) 0 25%, transparent 0 50%) 0
    0/12px 12px;
  transform: skewX(-12deg);
}
figcaption small {
  font-size: 8px;
  color: #c3c7ce;
  display: block;
}
figcaption strong {
  font-size: clamp(17px, 1.5vw, 23px);
  letter-spacing: -0.5px;
}
.venue {
  margin-left: auto;
  text-align: right;
  color: #c0c4cf;
  font-size: 9px;
}
footer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--ink);
  padding: 17px 0 72px;
  text-transform: uppercase;
  color: #535964;
  letter-spacing: 0.6px;
  font-size: 10px;
}
.signal {
  font-size: 16px;
  color: var(--orange);
  letter-spacing: -3px;
  transform: skew(-16deg);
}
.version {
  margin-left: auto;
  font-size: 9px;
}
dialog {
  width: min(460px, calc(100% - 30px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
dialog::backdrop {
  background: #131b39ab;
}
#panelBody {
  padding: 27px;
}
.modalHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eyebrow {
  color: #6a6970;
}
.close {
  background: none;
  border: 0;
  font-size: 25px;
  padding: 0 5px;
}
h2 {
  font-size: clamp(28px, 5vw, 40px);
  font-style: italic;
  letter-spacing: -2px;
  margin: 6px 0 20px;
}
.choice {
  padding: 13px 0;
  border-top: 1px solid var(--rule);
}
.choice label {
  display: block;
  text-transform: uppercase;
  font-size: 10px;
  margin-bottom: 8px;
}
.options {
  display: flex;
  gap: 5px;
}
.options button {
  flex: 1;
  padding: 8px 2px;
  border: 1px solid #a7a7a1;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}
.options button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.swatch {
  display: inline-block;
  border: 1px solid #7779;
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-right: 5px;
}
.action {
  padding: 11px 8px;
}
.action.primary {
  margin: 14px 0 4px;
  font-size: 17px;
  justify-content: space-between;
}
.keys {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px 16px;
  align-items: center;
  font-size: 14px;
}
.keys b {
  font: 700 12px monospace;
  background: #e2e0d6;
  padding: 4px 6px;
  border: 1px solid #bdbdb4;
  border-radius: 3px;
  text-align: center;
}
.fine {
  font-size: 13px;
  line-height: 1.5;
  color: #4b505b;
}
.resultScore {
  font: bold 50px/1 monospace;
  letter-spacing: -4px;
}
.garagePreview {
  height: 90px;
  background: #bbcbea;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--ink);
}
.garagePreview canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#arena,
#pitch,
#hud {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#pitch {
  display: block;
  background: #92b9df;
}
#hud {
  pointer-events: none;
  color: white;
  text-shadow: 0 1px 3px #13223a99;
}
#hud button {
  pointer-events: auto;
}
.score {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  font:
    900 28px/1 ui-monospace,
    monospace;
  align-items: stretch;
  border: 2px solid #18253c;
  box-shadow: 3px 3px 0 #17243d66;
}
.score > * {
  padding: 8px 15px;
}
.score b:first-child {
  background: #315fc4;
}
.score b:last-child {
  background: #dc5b2e;
}
.score strong {
  background: #18243a;
  font-size: 24px;
  align-content: center;
}
#pauseBtn {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid white;
  background: #17253e;
  color: white;
  padding: 7px 12px;
  font-weight: bold;
  font-size: 18px;
}
.gameInfo,
.telemetry {
  position: absolute;
  bottom: 84px;
  background: #17243ae8;
  color: #fff;
  padding: 10px 14px;
}
.gameInfo {
  left: 14px;
  border-left: 4px solid #819cf2;
}
.gameInfo span,
.fuel label {
  font: bold 12px monospace;
  letter-spacing: 1px;
}
.gameInfo small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: #cbd2de;
}
.telemetry {
  right: 16px;
  min-width: 132px;
}
.telemetry > strong {
  font-size: 30px;
  font-style: italic;
}
.telemetry > small {
  margin-left: 6px;
}
.fuel label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin: 6px 0;
}
.fuel > div {
  height: 6px;
  background: #5b626e;
}
.fuel i {
  display: block;
  background: #ff9b44;
  height: 100%;
}
#notice {
  position: absolute;
  top: 31%;
  left: 0;
  width: 100%;
  text-align: center;
  color: white;
  font-size: clamp(30px, 5.5vw, 84px);
  font-style: italic;
  font-weight: 950;
  letter-spacing: -2px;
  text-shadow: 3px 4px 0 #1c2742;
}
#notice small {
  display: block;
  letter-spacing: 1.6px;
  text-shadow: 1px 1px 0 #192136;
  font-size: 12px;
}
#touch {
  display: none;
  position: absolute;
  bottom: 24px;
  left: 8px;
  right: 32px;
  justify-content: space-between;
}
#touch button {
  border: 1px solid #ffffffe0;
  color: #fff;
  background: #192944cf;
  padding: 12px 8px;
  touch-action: none;
  user-select: none;
  font-size: 12px;
}
#touch > div {
  display: flex;
  gap: 3px;
}
@media (pointer: coarse) {
  #touch {
    display: flex;
  }
}
@media (max-width: 660px) {
  #home {
    padding: 0 18px;
  }
  .mast {
    height: 56px;
  }
  .edition {
    display: none;
  }
  #lobby {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 0;
  }
  .menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    align-items: center;
  }
  .discipline {
    grid-column: 1;
    font-size: 8px;
    gap: 5px;
    letter-spacing: 0.6px;
  }
  .discipline i {
    width: 14px;
  }
  .menu h1 {
    grid-column: 1;
    margin: 8px 0 0;
  }
  .tagline {
    grid-column: 1;
    font-size: 13px;
    margin: 0;
  }
  .menu nav {
    grid-column: 2;
    grid-row: 1/4;
  }
  nav button {
    padding: 8px 2px;
    font-size: 13px;
    gap: 5px;
  }
  nav button.primary {
    font-size: 15px;
    padding: 9px;
  }
  nav button svg {
    width: 15px;
    height: 15px;
  }
  .jacket {
    min-height: 0;
  }
  .art {
    min-height: 0;
    aspect-ratio: 1.62;
  }
  .jacket figcaption {
    padding: 10px 14px;
  }
  .version {
    display: none;
  }
  footer {
    padding: 10px 0 42px;
    font-size: 9px;
  }
  .plate {
    top: 8px;
    left: 8px;
  }
  .print-code {
    font-size: 7px;
    bottom: 7px;
  }
  .checks {
    height: 24px;
  }
  .score {
    top: 10px;
  }
  .gameInfo,
  .telemetry {
    bottom: 72px;
  }
}
@media (max-height: 480px) and (min-width: 661px) {
  .mast {
    height: 45px;
  }
  #lobby {
    padding: 14px 0;
    gap: 32px;
    grid-template-columns: minmax(200px, 0.65fr) 1.6fr;
  }
  .jacket {
    min-height: 240px;
  }
  .art {
    min-height: 150px;
  }
  h1 {
    margin: 5px 0;
  }
  h1 svg {
    height: 80px;
  }
  .tagline {
    margin: 3px 0 9px;
  }
  nav button,
  nav button.primary {
    padding: 5px 8px;
    font-size: 14px;
  }
  footer {
    padding: 8px 0;
  }
}
