:root {
  color-scheme: dark;
  --ink: #080208;
  --wine: #160614;
  --wine-raised: #230a1f;
  --paper: #fff7fb;
  --soft-pink: #f4d9e6;
  --muted-rose: #c895ad;
  --dusty-rose: #8f6276;
  --electric-pink: #ff8bbc;
  --hot-pink: #ff6fad;
  --orchid: #d7a2ff;
  --display: "Arial Black", "Helvetica Neue", Impact, ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --quick: 160ms;
  --enter: 360ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-height: 100svh;
  margin: 0;
  padding: clamp(8px, 1.5vw, 20px);
  overflow-x: hidden;
  color: var(--soft-pink);
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 247, 251, 0.1) 1px, transparent 1.2px) 0 0 / 9px 9px,
    var(--ink);
  font-family: var(--mono);
}

button,
a {
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 139, 188, 0.22);
}

button {
  appearance: none;
}

.launchpad {
  position: relative;
  isolation: isolate;
  width: min(1520px, 100%);
  min-height: calc(100svh - clamp(16px, 3vw, 40px));
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 2px solid var(--paper);
  background: var(--wine);
  box-shadow: clamp(5px, 0.7vw, 10px) clamp(5px, 0.7vw, 10px) 0 var(--electric-pink);
}

.launchpad::before,
.launchpad::after {
  position: absolute;
  z-index: 5;
  width: 20px;
  height: 20px;
  content: "";
  pointer-events: none;
}

.launchpad::before {
  top: -7px;
  left: -7px;
  border-top: 3px solid var(--hot-pink);
  border-left: 3px solid var(--hot-pink);
}

.launchpad::after {
  right: -7px;
  bottom: -7px;
  border-right: 3px solid var(--hot-pink);
  border-bottom: 3px solid var(--hot-pink);
}

.poster-head,
.poster-foot {
  display: grid;
  align-items: center;
  gap: 16px;
  padding-inline: clamp(14px, 2vw, 30px);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.poster-head {
  min-height: clamp(68px, 7vw, 88px);
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  border-bottom: 2px solid var(--paper);
}

.poster-head p,
.poster-head h1,
.poster-foot p {
  margin: 0;
}

.poster-head h1 {
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.6vw, 2.8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  text-wrap: balance;
}

.poster-head h1 span {
  display: block;
  margin-top: 3px;
  color: var(--electric-pink);
  font-family: var(--mono);
  font-size: 0.35em;
  line-height: 1;
  letter-spacing: 0.24em;
}

.system-state {
  justify-self: end;
}

.system-state span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  background: var(--orchid);
  box-shadow: 2px 2px 0 var(--dusty-rose);
}

.poster-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(620px, 1.22fr);
  animation: print-in var(--enter) var(--ease-out) both;
}

.identity-panel {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border-right: 2px solid var(--paper);
  color: var(--wine);
  background:
    linear-gradient(rgba(22, 6, 20, 0.09) 1px, transparent 1px) 0 0 / 100% 12px,
    var(--electric-pink);
}

.plate-head,
.plate-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.plate-head {
  border-bottom: 2px solid var(--wine);
}

.plate-foot {
  border-top: 2px solid var(--wine);
}

.plate-foot p {
  margin: 0;
  line-height: 1.45;
}

.hex-stamp {
  flex: none;
  border: 2px solid var(--wine);
  padding: 7px 9px 6px;
  color: var(--electric-pink);
  background: var(--wine);
  box-shadow: 3px 3px 0 var(--paper);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  transform: rotate(-2deg);
}

.landmark {
  position: relative;
  z-index: 1;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: clamp(8px, 1.6vw, 24px);
}

.dotcut {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: crosshair;
}

.signal-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto repeat(5, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 16px 13px;
  border-block: 1px solid var(--wine);
  padding-block: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

.signal-strip i {
  height: 8px;
  background: var(--wine);
}

.signal-strip i:nth-of-type(even) {
  opacity: 0.46;
}

.dock {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.8fr);
  grid-template-rows: repeat(4, minmax(104px, 1fr));
  background: var(--paper);
}

.door {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: center;
  gap: clamp(5px, 0.8vh, 9px);
  border: 0;
  border-bottom: 1px solid var(--muted-rose);
  padding: clamp(16px, 2vw, 28px);
  overflow: hidden;
  color: var(--wine);
  text-align: left;
  text-decoration: none;
  background: var(--paper);
  cursor: pointer;
  transition:
    color var(--quick) var(--ease-out),
    background-color var(--quick) var(--ease-out),
    transform var(--quick) var(--ease-out);
}

.door-primary {
  grid-row: 1 / -1;
  align-content: end;
  border-right: 2px solid var(--wine);
  border-bottom: 0;
  padding: clamp(24px, 3.4vw, 52px);
  padding-right: clamp(74px, 8vw, 116px);
  color: var(--paper);
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 139, 188, 0.19) 1px, transparent 1.2px) 0 0 / 8px 8px,
    var(--wine-raised);
  box-shadow: inset -12px 0 0 var(--electric-pink);
}

.door-primary::before {
  position: absolute;
  top: clamp(18px, 2vw, 30px);
  left: clamp(20px, 2.5vw, 38px);
  color: rgba(255, 139, 188, 0.15);
  content: "01";
  font-family: var(--display);
  font-size: clamp(6rem, 13vw, 13rem);
  line-height: 0.8;
  letter-spacing: -0.12em;
}

.door:last-child {
  border-bottom: 0;
}

.door:hover,
.door:focus-visible {
  z-index: 2;
  color: var(--wine);
  background-color: var(--hot-pink);
  transform: translate(-4px, -4px);
}

.door-primary:hover,
.door-primary:focus-visible {
  background-color: var(--hot-pink);
  background-image: none;
}

.door:active {
  transform: translate(0, 0);
}

.door:focus-visible {
  outline: 3px solid var(--orchid);
  outline-offset: -7px;
  box-shadow: inset 0 0 0 2px var(--wine);
}

.door-key,
.door-action,
.door small {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.door-key {
  color: var(--dusty-rose);
}

.door-primary .door-key {
  color: var(--electric-pink);
}

.door:hover .door-key,
.door:focus-visible .door-key {
  color: var(--wine);
}

.door strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 2.15rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.door-primary strong {
  overflow-wrap: normal;
  font-size: clamp(3rem, 5vw, 5.5rem);
  line-height: 0.82;
}

.door:nth-child(5) strong {
  font-size: clamp(1rem, 1.35vw, 1.55rem);
}

.door small {
  color: var(--dusty-rose);
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.door-primary small {
  color: var(--muted-rose);
}

.door:hover small,
.door:focus-visible small {
  color: var(--wine);
}

.door-action {
  position: absolute;
  right: 16px;
  bottom: 14px;
  border: 1px solid currentColor;
  padding: 5px 7px;
}

.poster-foot {
  min-height: 40px;
  grid-template-columns: 1fr auto;
  border-top: 2px solid var(--paper);
  color: var(--muted-rose);
}

.poster-foot p:last-child {
  color: var(--electric-pink);
  text-align: right;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  margin: 0;
  border: 2px solid var(--paper);
  padding: 12px 16px;
  color: var(--wine);
  background: var(--orchid);
  box-shadow: 5px 5px 0 var(--hot-pink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition:
    opacity var(--quick) var(--ease-out),
    transform var(--quick) var(--ease-out),
    visibility 0s linear var(--quick);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

@keyframes print-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 980px) {
  .poster-body {
    grid-template-columns: minmax(280px, 0.7fr) minmax(470px, 1.3fr);
  }

  .dock {
    grid-template-columns: minmax(250px, 1fr) minmax(220px, 0.9fr);
  }
}

@media (max-width: 820px) {
  body {
    padding: 8px 13px 15px 8px;
  }

  .launchpad {
    min-height: calc(100svh - 23px);
  }

  .poster-head {
    min-height: 62px;
    grid-template-columns: 1fr auto;
  }

  .edition {
    display: none;
  }

  .poster-body {
    grid-template-columns: 1fr;
  }

  .identity-panel {
    min-height: 310px;
    border-right: 0;
    border-bottom: 2px solid var(--paper);
  }

  .landmark {
    height: 220px;
  }

  .dock {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .door {
    min-height: 112px;
    grid-row: auto;
    border: 0;
    border-bottom: 1px solid var(--muted-rose);
    padding: 18px 82px 18px 18px;
  }

  .door-primary {
    min-height: 190px;
    border-bottom: 2px solid var(--wine);
    box-shadow: inset -8px 0 0 var(--electric-pink);
  }

  .door-primary::before {
    top: 16px;
    left: auto;
    right: 48px;
    font-size: clamp(6rem, 28vw, 9rem);
  }

  .door:last-child {
    border-bottom: 0;
  }

  .door strong {
    font-size: clamp(1.45rem, 8vw, 2.3rem);
  }

  .door-primary strong {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .poster-foot {
    min-height: 46px;
  }

  .poster-foot p:last-child {
    display: none;
  }
}

@media (max-width: 430px) {
  .poster-head {
    padding-inline: 12px;
  }

  .poster-head h1 {
    font-size: 1.22rem;
  }

  .identity-panel {
    min-height: 270px;
  }

  .landmark {
    height: 180px;
    padding: 0 10px;
  }

  .plate-foot {
    padding-block: 10px;
  }
}

@media (hover: none) {
  .dotcut {
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
