:root {
  color-scheme: dark;
  --bg: #0d1414;
  --panel: #141d1c;
  --ink: #eeeae0;
  --muted: #a6b2a9;
  --line: #34413d;
  --amber: #edb27f;
  --green: #9bc3aa;
  --sans: 'Inter', 'Segoe UI', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', Consolas, 'Courier New', monospace;
  --gutter: clamp(16px, 3.7vw, 66px);
  --mast: 72px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 15px;
}
body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
a {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid #f2c194;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  text-decoration: none;
}
.mono,
.navlink,
.sound,
.aboard-top button,
.aboard-bottom p,
.aboard-bottom button {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}
.mono b {
  color: var(--amber);
  font-weight: 400;
  margin: 0 0.38em;
}
.skip,
.sr {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  clip-path: none;
  width: auto;
  height: auto;
  z-index: 10;
  background: var(--bg);
  padding: 12px;
}
.mast {
  border-bottom: 1px solid var(--line);
}
.mast-inner,
main,
footer {
  max-width: 1760px;
  margin: auto;
}
.mast-inner {
  height: var(--mast);
  display: flex;
  align-items: center;
  gap: clamp(20px, 5vw, 80px);
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.37rem;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.11em;
}
.brand-period {
  color: var(--amber);
}
.mast nav {
  height: 100%;
  display: flex;
  gap: 27px;
  align-items: stretch;
}
.navlink {
  display: flex;
  align-items: center;
  position: relative;
  color: #a6afa9;
  font-size: 0.71rem;
  letter-spacing: 0.085em;
}
.navlink.selected,
.navlink:hover {
  color: var(--ink);
}
.navlink.selected:after {
  content: '';
  height: 2px;
  background: var(--amber);
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}
.sound {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #48514a;
  border-radius: 30px;
  padding: 9px 14px;
  color: #e0e3d9;
  background: transparent;
  font-size: 0.66rem;
}
.sound:hover,
#exit:hover {
  border-color: var(--amber);
}
.meter {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 13px;
}
.meter i {
  width: 2px;
  background: var(--amber);
  height: 4px;
}
.meter i:nth-child(2) {
  height: 9px;
}
.meter i:nth-child(3) {
  height: 13px;
}
.meter i:nth-child(4) {
  height: 7px;
}
.sound[aria-pressed='true'] .meter i {
  animation: levels 0.8s ease-in-out infinite alternate;
}
.meter i:nth-child(2n) {
  animation-delay: -0.3s !important;
}
main {
  padding: 22px var(--gutter) 0;
}
.viewport {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 450px;
  height: clamp(450px, 38.8vw, 648px);
  border: 1px solid #46514b;
  background: #070e0d;
}
.plate,
.shade,
#flight,
.viewmarks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.plate {
  background: url(assets/rocinante-flight.webp) 54% 50% / cover no-repeat;
  animation: drift 30s ease-in-out infinite alternate;
}
.shade {
  background:
    linear-gradient(
      90deg,
      rgba(3, 11, 11, 0.92),
      rgba(4, 13, 13, 0.69) 21%,
      rgba(3, 10, 10, 0.12) 45%,
      transparent 67%
    ),
    linear-gradient(0deg, rgba(3, 9, 9, 0.67), transparent 20%);
}
.scope-label,
.view-id,
.film-caption {
  position: absolute;
  color: #c7d2c9;
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.scope-label {
  left: 24px;
  top: 20px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #99cbae;
  box-shadow: 0 0 7px #81c39970;
}
.view-id {
  right: 24px;
  top: 20px;
}
.view-id b,
.film-caption b {
  margin: 0;
}
.film-caption {
  right: 24px;
  bottom: 18px;
}
.film-caption span {
  color: var(--amber);
  font-size: 1rem;
  margin-right: 1px;
}
.viewmarks {
  inset: 9px;
  width: auto;
  height: auto;
}
.viewmarks i {
  width: 9px;
  height: 9px;
  position: absolute;
  border: 0 solid #b8b8a075;
  z-index: 2;
}
.viewmarks i:first-child {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}
.viewmarks i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}
.viewmarks i:nth-child(3) {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}
.viewmarks i:last-child {
  bottom: 0;
  right: 0;
  border-width: 0 1px 1px 0;
}
.hero-copy {
  position: absolute;
  left: clamp(26px, 4vw, 78px);
  top: 50%;
  transform: translateY(-45%);
}
.shipname {
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.67rem;
  letter-spacing: 0.15em;
}
.shipname span {
  background: var(--amber);
  width: 22px;
  height: 1px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 6.9vw, 8.1rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.055em;
  margin: 20px 0 18px;
}
h1 em {
  font-weight: 400;
  color: #e5d8bb;
}
.hero-copy p {
  max-width: min(32ch, calc(100vw - 64px));
  font-family: var(--serif);
  font-size: clamp(1rem, 1.45vw, 1.42rem);
  line-height: 1.4;
  color: #d7dbce;
}
.primary {
  background: var(--amber);
  color: #1c211a;
  border: 1px solid #f4c69a;
  border-radius: 2px;
  font-weight: 650;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 21px;
  padding: 12px 17px;
  margin-top: 24px;
}
.primary:hover {
  background: #f6c99e;
}
.primary span {
  font-weight: 400;
  font-size: 1.23rem;
  line-height: 1;
}
#directory {
  padding: clamp(26px, 3vw, 48px) 0 32px;
}
.directory-head,
.directory-title {
  display: flex;
  align-items: center;
}
.directory-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.directory-title {
  gap: 12px;
}
h2 {
  font: 400 clamp(1.7rem, 2.6vw, 2.8rem) / 1.12 var(--serif);
  letter-spacing: -0.035em;
}
.section-mark {
  width: 12px;
  height: 12px;
  border: 1px solid var(--amber);
  position: relative;
  transform: rotate(45deg);
}
.section-mark:after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--amber);
}
.directory-note {
  font-size: 0.63rem;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 24px);
}
.room-card {
  padding: 0;
  text-align: left;
  background: #141d1c;
  border: 1px solid var(--line);
  border-radius: 2px;
  display: block;
  overflow: hidden;
}
.room-view {
  position: relative;
  display: block;
  overflow: hidden;
  height: clamp(135px, 13vw, 220px);
  background: #18201e;
}
.room-view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}
.room-view::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #08110f50, transparent 34%);
  pointer-events: none;
}
.plate-index {
  z-index: 1;
  background: #0c191ccc;
  padding: 3px 5px;
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.61rem;
  color: #bdc6b5;
  letter-spacing: 0.1em;
}
.room-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  font: 400 clamp(1.15rem, 1.6vw, 1.6rem) var(--serif);
  letter-spacing: -0.02em;
}
.entry-arrow {
  font: 400 1.08rem var(--sans);
  color: #b3c0ae;
}
.room-card:hover,
.room-card:focus-visible {
  border-color: #a48c6b;
}
.room-card:hover .entry-arrow {
  color: var(--amber);
}
footer {
  border-top: 1px solid var(--line);
  padding: 17px var(--gutter) 21px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.61rem;
}
body.aboard {
  overflow: hidden;
}
.aboard main,
.aboard footer,
.aboard .skip {
  display: none;
}
#interior {
  height: calc(100dvh - var(--mast) - 1px);
  position: relative;
  overflow: hidden;
  background: #152122;
}
#passage {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}
#passage:focus-visible {
  outline-offset: -2px;
}
.aboard-top {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  padding: 22px var(--gutter) 36px;
  background: linear-gradient(#071012be, transparent);
}
.room-readout .mono {
  color: #c1d2c5;
  font-size: 0.62rem;
  display: flex;
  align-items: center;
  gap: 9px;
}
.room-readout h2 {
  margin: 6px 0;
  color: #f6efdf;
  text-shadow: 0 1px 6px #000;
}
.aboard-top button,
.aboard-bottom button {
  pointer-events: auto;
  border: 1px solid #6f8278;
  background: #101b1be8;
  padding: 10px 14px;
  border-radius: 2px;
  color: #f2edde;
}
.aboard-top button span {
  color: var(--amber);
  margin-left: 6px;
}
.reticle {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e6dfc3bd;
  box-shadow: 0 0 0 1px #263431;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.inspecting .reticle {
  display: none;
}
.aboard-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px var(--gutter) 18px;
  background: linear-gradient(transparent, #050d10bb);
  pointer-events: none;
}
.aboard-bottom button {
  background: #eed0a9;
  color: #192220;
  border-color: #ac906e;
  font-weight: 650;
}
.aboard-tools {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}
.aboard-bottom #flyby,
.aboard-bottom #look-around {
  color: #f1dec0;
  background: #1d302cf5;
  border-color: #869986;
}
.aboard-bottom p {
  font-size: 0.65rem;
  color: #ece9d9;
  text-align: center;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px black;
}
#walk-pad {
  display: none;
  position: absolute;
  left: 18px;
  bottom: 24px;
  width: 80px;
  height: 80px;
  border: 1px solid #afbcaaa6;
  border-radius: 50%;
  background: #14252299;
  touch-action: none;
  pointer-events: auto;
  align-items: center;
  justify-content: center;
}
#walk-pad span {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid #bfc7b59a;
  background: #afc5b040;
  transform: translate(var(--dx, 0px), var(--dy, 0px));
}
#problem {
  position: fixed;
  z-index: 5;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #201c15;
  border: 1px solid var(--amber);
  padding: 13px 20px;
  max-width: 90vw;
}
@keyframes drift {
  from {
    transform: scale(1.006) translate(0, 0);
  }
  to {
    transform: scale(1.035) translate(-0.37%, 0.17%);
  }
}
@keyframes levels {
  to {
    transform: scaleY(0.45);
  }
}
@media (any-pointer: coarse) {
  #walk-pad {
    display: flex;
  }
  .inspecting #walk-pad {
    display: none;
  }
  .aboard-bottom {
    padding: 30px 14px 14px 109px;
    min-height: 95px;
  }
  .inspecting .aboard-bottom {
    padding-left: 14px;
  }
}
@media (max-width: 680px) {
  :root {
    --mast: 58px;
  }
  .mast-inner {
    gap: 20px;
  }
  .brand {
    gap: 6px;
    font-size: 1.06rem;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .mast nav {
    gap: 15px;
  }
  .navlink {
    font-size: 0.62rem;
  }
  .sound {
    padding: 7px 9px;
    font-size: 0.58rem;
    gap: 6px;
  }
  main {
    padding-top: 14px;
  }
  .viewport {
    height: clamp(445px, 125vw, 545px);
    min-height: 0;
  }
  .plate {
    top: 52px;
    bottom: auto;
    height: auto;
    aspect-ratio: 2 / 1;
    background-size: 122% auto;
    background-position: 83% center;
    mask-image: linear-gradient(0deg, transparent, #000 15%, #000 87%, transparent);
  }
  .shade {
    background: linear-gradient(0deg, #08100f 0%, #08100ff2 25%, #08100f4d 51%, transparent 72%);
  }
  .hero-copy {
    top: auto;
    bottom: 32px;
    left: 22px;
    transform: none;
  }
  .hero-copy h1 {
    font-size: clamp(3.1rem, 13vw, 5.2rem);
    line-height: 0.95;
    margin: 12px 0 9px;
  }
  .hero-copy h1 br {
    display: none;
  }
  .hero-copy h1 em:before {
    content: ' ';
  }
  .hero-copy p {
    font-size: 1.04rem;
  }
  .primary {
    padding: 10px 14px;
    margin-top: 15px;
  }
  .shipname,
  .scope-label,
  .view-id {
    font-size: 0.57rem;
  }
  .scope-label {
    left: 16px;
    top: 15px;
  }
  .view-id {
    right: 16px;
    top: 15px;
  }
  .film-caption {
    display: none;
  }
  .directory-note {
    font-size: 0.57rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .room-card {
    display: grid;
    grid-template-columns: 40% 1fr;
  }
  .room-view {
    height: 84px;
  }
  .room-label {
    border-top: none;
    border-left: 1px solid var(--line);
    font-size: 1.34rem;
    padding: 12px;
  }
  .plate-index {
    font-size: 0.5rem;
    left: 6px;
    top: 5px;
  }
  .directory-head {
    margin-bottom: 12px;
  }
  .aboard-top {
    padding-top: 14px;
  }
  .aboard-top button {
    font-size: 0.57rem;
  }
}
@media (max-width: 370px) {
  .mast-inner {
    gap: 12px;
  }
  .mast nav {
    gap: 10px;
  }
  .brand-period {
    display: none;
  }
  .sound {
    font-size: 0.54rem;
  }
  .directory-note {
    letter-spacing: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
.navlink,
.sound {
  white-space: nowrap;
}
@media (max-width: 420px) {
  .mast-inner {
    gap: 14px;
  }
  .mast nav {
    gap: 12px;
  }
  .sound {
    letter-spacing: 0.04em;
  }
}
@media (max-width: 350px) {
  .brand {
    font-size: 0.95rem;
  }
  .brand img {
    width: 22px;
  }
  .mast-inner {
    gap: 9px;
  }
  .mast nav {
    gap: 8px;
  }
}

#feedback {
  position: absolute;
  bottom: 19%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.7rem 1.1rem;
  background: #0d1a1ae8;
  color: #f4e7c9;
  border: 1px solid #796c50;
  border-radius: 3px;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}
#console-panel {
  inset: auto var(--gutter) 7% auto;
  margin: 0;
  width: min(390px, calc(100vw - 36px));
  max-height: 78dvh;
  overflow: auto;
  color: #e7ebe2;
  background: linear-gradient(145deg, #1a3131fa, #0f1b1cfb);
  border: 1px solid #977e56;
  border-radius: 5px;
  box-shadow: 0 12px 54px #0009;
  padding: 1.15rem 1.25rem 1.25rem;
}
#console-panel::backdrop {
  background: rgba(3, 10, 13, 0.25);
}
.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e5bd85;
  font-size: 0.78rem;
}
#console-panel h2 {
  font: normal 2rem/1.1 var(--serif);
  margin: 1rem 0;
}
#console-panel button {
  border: 1px solid #52716a;
  background: #1b3231;
  color: #e2e8df;
  padding: 0.48rem 0.72rem;
  font: inherit;
  cursor: pointer;
}
#console-panel button[aria-pressed='true'] {
  border-color: #c5ad78;
  color: #ffe1a6;
  background: #35423a;
}
#console-panel button:hover,
#console-panel button:focus-visible {
  border-color: #ecc48b;
}
.console-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.console-caption {
  color: #b3c6bd;
  margin: 0.5rem 0 0.8rem;
}
.console-value {
  color: #b2ddc8;
  font-size: 0.91rem;
  margin: 1rem 0 0;
}
#console-panel dl {
  margin: 0 0 1rem;
}
#console-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #394d47;
  padding: 0.48rem 0;
}
#console-panel dd {
  margin: 0;
  color: #a7d6be;
}
@media (max-width: 600px) {
  #console-panel {
    inset: auto 12px 14px 12px;
    width: auto;
  }
}
.deck-route {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
  margin: -0.2rem 0 1.3rem;
}
.aboard-actions {
  display: flex;
  gap: 0.45rem;
}
#deck-map {
  display: block;
  width: 100%;
  aspect-ratio: 540 / 243;
  height: auto;
  border: 1px solid #435751;
  border-radius: 2px;
}
#deck-map[hidden] {
  display: none;
}
#console-panel:has(#deck-map:not([hidden])) {
  width: min(550px, calc(100vw - 36px));
}
@media (max-width: 600px) {
  .aboard-actions button {
    padding: 8px 9px;
    font-size: 0.82rem;
  }
  .room-readout h2 {
    font-size: 1.22rem;
  }
}
.scope-image {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #556c64;
}
.scope-image + .console-value {
  margin: 0.65rem 0 1rem;
}
#helm {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  padding: 0.55rem 0.95rem;
  background: linear-gradient(180deg, #20312beb, #10201ff5);
  border: 1px solid #8a795a;
  border-radius: 4px;
  box-shadow: 0 3px 15px #07121170;
  pointer-events: auto;
  font-family: var(--mono);
}
#helm[hidden] {
  display: none;
}
#helm > div > span {
  display: block;
  color: #bac9bb;
  font-size: 0.67rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}
#helm strong {
  display: block;
  color: #f6ddb0;
  font: 500 1.08rem/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cruise-setting > div,
#orbit-zoom > div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
#helm button {
  padding: 0;
  width: 2rem;
  height: 1.75rem;
  border-color: #697d6f;
  background: #1f3631;
  color: #eee3c8;
  font-size: 1rem;
}
#helm button:disabled {
  opacity: 0.38;
}
#helm button,
.aboard-tools button {
  touch-action: manipulation;
}
.at-helm .reticle {
  display: none;
}
@media (max-width: 600px) {
  #helm {
    gap: 0.85rem;
    padding: 0.38rem 0.7rem;
  }
  #helm strong {
    font-size: 0.95rem;
  }
  #helm button {
    width: 2.45rem;
    height: 2.15rem;
  }
  .at-helm .aboard-bottom {
    gap: 5px;
  }
  .at-helm #walk-pad {
    bottom: 9px;
    left: 8px;
  }
}
@media (any-pointer: coarse) and (max-width: 450px) {
  .at-helm .aboard-bottom {
    padding-inline: 12px;
  }
  .at-helm #walk-pad {
    width: 64px;
    height: 64px;
  }
  .at-helm .aboard-tools,
  .at-helm #controls-hint {
    margin-left: 58px;
  }
  .at-helm .aboard-tools {
    flex-wrap: wrap;
    gap: 4px;
  }
  .at-helm .aboard-tools button {
    padding: 7px 8px;
    font-size: .75rem;
  }
  .at-helm #helm {
    margin-bottom: 6px;
  }
  .exterior-view #helm {
    gap: 0.65rem;
  }
  #orbit-zoom > div {
    gap: 0.18rem;
  }
}
