@font-face {
  font-family: Space;
  src: url("/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #101413;
  --panel: #1b211f;
  --line: #39423e;
  --text: #f0f4ef;
  --muted: #aab4ad;
  --lime: #c4f84e;
  font:
    16px Space,
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #76e0de;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
header {
  border-bottom: 1px solid var(--line);
}
.top,
main {
  width: min(1180px, calc(100% - 80px));
  margin: auto;
}
.top {
  height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
}
nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 30px;
}
nav a {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
nav [aria-current] {
  box-shadow: inset 0 -2px var(--lime);
  color: var(--lime);
}
main {
  padding: 46px 0 56px;
}
.title,
.package-head {
  display: flex;
  align-items: baseline;
  gap: 17px;
}
.title {
  margin-bottom: 26px;
}
.title h1 {
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  margin: 0;
}
.title span,
.card-label small,
.resource label,
#version {
  color: var(--muted);
  font-size: 14px;
}
.hall {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 30px;
  align-items: stretch;
}
.rack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px;
}
.cartridge {
  display: flex;
  position: relative;
  flex-direction: column;
  min-width: 0;
  padding: 13px 13px 0;
  text-align: left;
  color: var(--text);
  background: linear-gradient(145deg, #454d45, #262d28 72%);
  border: 2px solid #525d53;
  border-radius: 12px 12px 5px 5px;
  box-shadow:
    inset 0 3px 0 #ffffff18,
    inset 0 -4px 0 #141915,
    0 5px 0 #080a09;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.cartridge:hover {
  transform: translateY(-3px);
}
.cartridge[aria-pressed="true"] {
  border-color: var(--lime);
}
.ribs {
  height: 12px;
  margin: 0 3px 10px;
  background: repeating-linear-gradient(
    0deg,
    #0f151150 0 2px,
    transparent 2px 4px
  );
  border-radius: 3px;
}
.art {
  display: grid;
  place-items: center;
  aspect-ratio: 1.65;
  overflow: hidden;
  background: #343e32;
  border: 1px solid #111813;
  border-radius: 5px;
  isolation: isolate;
}
.art > * {
  grid-area: 1/1;
}
.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.fallback {
  color: var(--lime);
  font-size: 3rem;
  font-weight: 700;
}
.card-label {
  display: grid;
  gap: 4px;
  padding: 13px 2px 14px;
}
.card-label strong {
  font-size: clamp(17px, 2.1vw, 27px);
  letter-spacing: -0.045em;
}
.card-label small,
#version,
.resource input {
  font-family: ui-monospace, monospace;
}
.pins {
  align-self: center;
  width: 38%;
  height: 8px;
  margin-top: auto;
  background: repeating-linear-gradient(90deg, #ae9a5d 0 4px, #332f21 4px 7px);
  border: 1px solid #141a14;
  border-bottom: 0;
}
.deck {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 #ffffff16;
}
.hardware {
  height: 53px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #252c28;
  border-radius: 12px 12px 0 0;
}
.screw {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #171c19;
  border: 1px solid #566056;
}
.mouth {
  flex: 1;
  border-radius: 6px;
  padding: 4px;
  background: #39413a;
  box-shadow:
    0 1px 0 #ffffff24,
    inset 0 2px 3px #0008;
}
.mouth i {
  display: block;
  height: 7px;
  background: #090c0a;
  border-radius: 3px;
}
.deck-content {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 20px 23px 22px;
  flex: 1;
}
.selection {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}
.deck h2 {
  font-size: clamp(24px, 3vw, 39px);
  line-height: 1.14;
  letter-spacing: -0.055em;
  margin: 9px 0;
}
.deck p {
  margin: 0 0 17px;
  color: #bdc8c0;
  line-height: 1.6;
  font-size: 15px;
}
.play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-radius: 5px;
  padding: 12px 15px;
  background: var(--lime);
  color: #19200e;
  font-weight: 700;
  margin-top: auto;
}
.play:hover {
  background: #d7ff76;
}
.play span {
  font-size: 20px;
}
.package {
  margin-top: 38px;
}
.package-head {
  margin-bottom: 12px;
}
.package h2 {
  font-size: 23px;
  margin: 0;
  letter-spacing: -0.035em;
}
.resource {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 11px 0;
}
.resource:last-child {
  border-bottom: 1px solid var(--line);
}
.resource input {
  width: 100%;
  color: #d5ded6;
  background: transparent;
  border: 0;
  font-size: 13px;
  line-height: 1.8;
}
.resource button,
.resource a {
  padding: 7px 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #dae5d9;
  text-align: center;
  font-size: 13px;
}
.resource button:hover,
.resource a:hover {
  border-color: var(--lime);
}
.ghost {
  position: fixed !important;
  z-index: 3;
  pointer-events: none;
  transform-origin: center center;
  margin: 0;
}
#loading {
  color: var(--muted);
}
.deck.busy .led {
  box-shadow: 0 0 12px var(--lime);
}
@media (max-width: 850px) {
  .top,
  main {
    width: calc(100% - 40px);
  }
  .hall {
    gap: 18px;
    grid-template-columns: minmax(0, 1.38fr) minmax(234px, 1fr);
  }
  .rack {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .deck-content {
    padding: 16px;
  }
  .cartridge {
    padding: 9px 8px 0;
  }
}
@media (max-width: 650px) {
  main {
    padding-top: 30px;
  }
  .top,
  main {
    width: calc(100% - 32px);
  }
  .top {
    height: 56px;
  }
  nav {
    gap: 15px;
  }
  .hall {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .title {
    margin-bottom: 18px;
  }
  .art {
    aspect-ratio: 1.55;
  }
  .deck h2 {
    font-size: 25px;
  }
  .hardware {
    height: 33px;
  }
  .card-label {
    padding: 8px 1px 10px;
    gap: 3px;
  }
  .card-label small {
    font-size: 11px;
  }
  .ribs {
    height: 8px;
    margin-bottom: 6px;
  }
  .package {
    margin-top: 25px;
  }
  .resource {
    grid-template-columns: 1fr auto;
    gap: 3px 8px;
  }
  .resource input {
    grid-column: 1;
    grid-row: auto;
    font-size: 12px;
  }
  .resource :last-child {
    grid-column: 2;
    grid-row: 1/3;
  }
  .resource label {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
