/* SpaceWard app styles. Palette, planets and galaxies come from retro.css (design/tokens). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/* Touch: no double-tap zoom, no rubber-band pull, no sideways drift; an app, not a document. */
html { touch-action: manipulation; overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; overscroll-behavior: none; }
/* Long-press on a control must not select its label or open the iOS callout ("Copy · Look Up"). */
button, .btn, a, nav, svg, img, canvas, .mg, .map, .globe, [role="button"] {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
input, textarea, [contenteditable="true"], .selectable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* iOS zooms into any field whose text is under 16px; keep phones at 16px. */
@media (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }
body {
  background: #1B2A41;
  color: var(--sw-ink);
  font-family: var(--sw-font-body);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sw-ink); }
a:hover { color: var(--sw-orange); }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.dis { font-family: var(--sw-font-display); letter-spacing: 1px; font-weight: 400; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.small { font-size: 11px; line-height: 1.45; }
.muted { color: #5c6578; }
.orange-text { color: var(--sw-orange-text); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sw-mustard); outline-offset: 2px; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.boot h1 { font-size: 64px; }
.boot-bar { width: 180px; height: 10px; border: 2px solid var(--sw-ink); margin-top: 10px; overflow: hidden; }
.boot-bar div { height: 100%; width: 40%; background: var(--sw-orange); animation: boot 1.2s ease-in-out infinite alternate; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 12px 16px; background: var(--sw-orange); color: var(--sw-paper); font-weight: 700; }
#blazor-error-ui .dismiss { float: right; background: none; border: 0; color: inherit; font-size: 20px; cursor: pointer; }
#blazor-error-ui a { color: inherit; margin-left: 8px; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; justify-content: center; background: #1B2A41 radial-gradient(rgba(242,230,207,.06) 1px, transparent 1.4px) 0 0 / 8px 8px; }
.phone {
  position: relative; width: 100%; max-width: 440px; min-height: 100vh;
  background-color: var(--sw-paper);
  background-image: radial-gradient(rgba(27,42,65,.07) 1px, rgba(0,0,0,0) 1.4px);
  background-size: 6px 6px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  box-shadow: 0 0 0 4px var(--sw-ink);
}
.phone.dark { background: #05070d; color: #F2E6CF; }
.side-pane { display: none; }
@media (min-width: 960px) {
  .shell { gap: 28px; padding: 24px; align-items: flex-start; }
  .phone { min-height: calc(100vh - 48px); box-shadow: 10px 10px 0 #0b1220, 0 0 0 4px var(--sw-ink); }
  .side-pane { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 24px; width: min(760px, calc(100vw - 540px)); }
  .bottom-nav { width: 440px !important; left: auto !important; }
}
.screen { padding: 34px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.screen-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.screen-header h1 { font-size: 46px; line-height: .95; margin-top: 2px; }
.screen-header .tag-day { font-family: var(--sw-font-display); font-size: 18px; padding: 4px 8px; background: var(--sw-orange); color: var(--sw-paper); white-space: nowrap; letter-spacing: 1px; }
.back-btn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); color: var(--sw-ink); cursor: pointer; text-decoration: none; }
.header-with-back { display: flex; gap: 12px; align-items: flex-end; }
.header-with-back h1 { font-size: 40px; line-height: .95; }

/* ---------- resources ticker ---------- */
.res-strip { display: flex; gap: 0; border: 3px solid var(--sw-ink); background: var(--sw-ink); color: var(--sw-paper); font-size: 10px; font-weight: 700; overflow-x: auto; scrollbar-width: none; }
.res-strip::-webkit-scrollbar { display: none; }
.res-strip .r { flex: 1 0 auto; padding: 5px 8px; display: flex; flex-direction: column; gap: 1px; border-right: 1px solid rgba(242,230,207,.15); min-width: 64px; }
.res-strip .r:last-child { border-right: 0; }
.res-strip .r span:first-child { color: #B7AE9C; letter-spacing: 1px; font-size: 9px; }
.res-strip .r b { font-family: var(--sw-font-display); font-size: 17px; font-weight: 400; letter-spacing: 1px; }
.res-strip .r i { font-style: normal; color: var(--sw-teal-light); font-size: 9px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); color: var(--sw-ink); font-family: var(--sw-font-display); font-size: 20px; letter-spacing: 1px; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { color: var(--sw-ink); background: #fff7e6; }
.btn:active { transform: translate(2px, 2px); }
.btn.primary { background: var(--sw-ink); color: var(--sw-paper); }
.btn.primary:hover { background: #24375a; color: var(--sw-paper); }
.btn.orange { background: var(--sw-orange); color: var(--sw-paper); }
.btn.orange:hover { background: #ee6838; color: var(--sw-paper); }
.btn.teal { background: var(--sw-teal); color: var(--sw-paper); }
.btn.mustard { background: var(--sw-mustard); color: var(--sw-ink); }
.btn.locked, .btn:disabled { background: var(--sw-locked); color: #e9e2d2; border-color: var(--sw-locked); cursor: not-allowed; transform: none; }
.btn.block { width: 100%; min-height: 52px; font-size: 24px; }
.btn.small { min-height: 34px; font-size: 16px; padding: 0 10px; border-width: 2px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.link-btn { background: none; border: 0; padding: 0; font-weight: 700; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

.tag { display: inline-block; align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 2px 6px; text-transform: uppercase; white-space: nowrap; }
.tag.teal { background: var(--sw-teal); color: var(--sw-paper); }
.tag.orange { background: var(--sw-orange); color: var(--sw-paper); }
.tag.mustard { background: var(--sw-mustard); color: var(--sw-ink); }
.tag.ink { background: var(--sw-ink); color: var(--sw-paper); }
.tag.locked { background: var(--sw-locked); color: var(--sw-paper); }
.tag.outline { border: 2px solid var(--sw-ink); }

.bar { height: 10px; border: 2px solid var(--sw-ink); background: var(--sw-paper-light); }
.bar > div { height: 100%; background: var(--sw-orange); transition: width .6s; }
.bar.teal > div { background: var(--sw-teal); }
.bar.mustard > div { background: var(--sw-mustard); }

/* ---------- framed windows ---------- */
.window { position: relative; overflow: hidden; background: var(--sw-space); border: 4px solid var(--sw-ink); }
.window .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 12px; background: var(--sw-orange); color: var(--sw-paper); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.window .caption .dis { font-size: 20px; }
.window .caption small { font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.window .stamp-corner { position: absolute; left: 10px; bottom: 10px; }
.window .note { position: absolute; left: 12px; bottom: 8px; font-size: 9px; color: #B7AE9C; letter-spacing: 1px; }
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- base / population ---------- */
.base-switch { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.base-switch a { flex: none; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 6px 10px; border: 2px solid var(--sw-ink); text-decoration: none; text-transform: uppercase; background: var(--sw-paper-light); min-height: 32px; display: inline-flex; align-items: center; }
.base-switch a.active { background: var(--sw-ink); color: var(--sw-paper); }
.pop-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.pop-row .big { font-size: 66px; line-height: .85; }
.pop-row .sub { margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.next-cycle { text-align: right; background: var(--sw-ink); color: var(--sw-paper); padding: 8px 10px; }
.next-cycle .dis { font-size: 26px; line-height: 1; }
.next-cycle p:last-child { margin-top: 2px; font-size: 10px; }
.gauges { display: flex; justify-content: space-between; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .5px; min-width: 56px; background: none; border: 0; padding: 0; cursor: default; }
.gauge .gt { width: 26px; height: 70px; border: 2px solid var(--sw-ink); display: flex; align-items: flex-end; background: var(--sw-paper-light); }
.gauge .gt div { width: 100%; transition: height .8s; }
.gauge.alert { color: var(--sw-orange-text); }
.gauge.alert .gt { border-color: var(--sw-orange); }
.advisory { border: 3px solid var(--sw-ink); background: var(--sw-paper-light); display: flex; align-items: stretch; }
.advisory p { flex: 1; padding: 8px 10px; font-size: 11px; line-height: 1.4; }
.advisory button { border: 0; border-left: 3px solid var(--sw-ink); background: var(--sw-orange); color: var(--sw-paper); font-family: var(--sw-font-display); font-size: 18px; letter-spacing: 1px; padding: 0 12px; cursor: pointer; min-height: 44px; min-width: 110px; }
.advisory.ok button { background: var(--sw-teal); }

.section-title { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--sw-ink); padding-bottom: 4px; margin-top: 6px; }
.section-title h2 { font-size: 22px; }
.section-title span { font-size: 10px; font-weight: 700; letter-spacing: 1px; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(27,42,65,.25); }
.list-row .name { font-weight: 700; font-size: 13px; }
.list-row .meta { font-size: 10px; color: #4a5468; margin-top: 2px; }
.list-row.alert .name { color: var(--sw-orange-text); }

.jobs { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px 8px; align-items: center; font-size: 12px; }
.jobs .stepper { width: 34px; height: 34px; border: 2px solid var(--sw-ink); background: var(--sw-paper-light); cursor: pointer; font-weight: 700; }
.jobs b { font-family: var(--sw-font-display); font-size: 20px; min-width: 52px; text-align: right; font-weight: 400; }

.tickets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ticket { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px 8px; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); text-decoration: none; min-height: 84px; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--sw-paper); border: 3px solid var(--sw-ink); transform: translateY(-50%); }
.ticket::before { left: -8px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -8px; clip-path: inset(0 50% 0 0); }
.ticket .dis { font-size: 19px; line-height: 1; }
.ticket small { font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.ticket.cool { opacity: .75; }

/* ---------- bottom nav ---------- */
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 440px; height: calc(80px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 3px solid var(--sw-ink); background: var(--sw-paper); display: flex; justify-content: space-around; padding-top: 10px; z-index: 50; }
@media (min-width: 960px) { .bottom-nav { transform: none; position: fixed; } }
.navi { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; min-height: 48px; text-decoration: none; color: var(--sw-ink); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.navi.active { color: var(--sw-orange-text); }
.navi .badge { position: absolute; margin-left: 22px; margin-top: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--sw-orange); color: var(--sw-paper); font-size: 9px; display: inline-flex; align-items: center; justify-content: center; }
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- system / departures ---------- */
.seg { display: flex; border: 3px solid var(--sw-ink); }
.seg a { flex: 1; text-align: center; font-family: var(--sw-font-display); font-size: 18px; letter-spacing: 1px; padding: 6px 4px; text-decoration: none; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.seg a + a { border-left: 3px solid var(--sw-ink); }
.seg a.active { background: var(--sw-ink); color: var(--sw-paper); }
.departures { background: var(--sw-ink); color: var(--sw-paper); border: 4px solid var(--sw-ink); }
.departures .head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--sw-orange); }
.departures .head h2 { font-size: 22px; }
.departures .head span { font-size: 10px; font-weight: 700; }
.dep { display: grid; grid-template-columns: 1fr 74px 104px; gap: 8px; align-items: center; padding: 9px 12px; border-top: 1px solid rgba(242,230,207,.15); font-size: 13px; color: inherit; text-decoration: none; }
a.dep:hover { background: rgba(242,230,207,.07); color: inherit; }
.dep.hdr { font-size: 10px; color: #B7AE9C; border-top: 0; padding-top: 6px; padding-bottom: 6px; }
.dep.hl { background: rgba(226,87,43,.18); }
.dep .flap { font-family: var(--sw-font-display); font-size: 19px; letter-spacing: 2px; }
.dep.dim .flap, .dep.dim span { color: #B7AE9C; }
.dep .st { font-weight: 700; font-size: 12px; }
.dep .st.go { color: var(--sw-teal-light); }
.dep .st.warn { color: #FFB08F; }
.flap-anim { display: inline-block; animation: flap .5s steps(4); }
@keyframes flap { 0% { transform: scaleY(.2); } 50% { transform: scaleY(-.6); } 100% { transform: scaleY(1); } }
.card-link { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); text-decoration: none; }
.card-link .dis { font-size: 20px; }
.card-link span:last-child { font-size: 12px; font-weight: 700; }

/* ---------- maps ---------- */
.map-wrap { position: relative; }
.map { position: relative; width: 100%; aspect-ratio: 1 / 1.08; overflow: hidden; background: var(--sw-space); border: 4px solid var(--sw-ink); touch-action: none; cursor: grab; user-select: none; }
.map.wide { aspect-ratio: 16 / 11; }
.map svg.layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .hud { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.map .hud > * { pointer-events: auto; }
.map .hud .chip { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: #F2E6CF; background: rgba(7,11,20,.7); border: 1px solid rgba(242,230,207,.3); padding: 4px 7px; text-transform: uppercase; }
.map .hud .chip.live { color: #8FE3DE; border-color: rgba(143,227,222,.6); }
.map .hud .chip.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8FE3DE; margin-right: 5px; animation: pulse 1.2s infinite; }
.map .zoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.map .zoom button { width: 36px; height: 36px; border: 2px solid rgba(242,230,207,.6); background: rgba(7,11,20,.75); color: #F2E6CF; font-weight: 700; font-size: 16px; cursor: pointer; }
.map-label { font-family: var(--sw-font-display); letter-spacing: 1px; fill: #F2E6CF; paint-order: stroke; stroke: rgba(7,11,20,.85); stroke-width: 3px; }
.map-label.dim { fill: #B7AE9C; }
.map-label.teal { fill: #8FE3DE; }
.map-label.orange { fill: #FFB08F; }
.map-mono { font-family: var(--sw-font-body); font-weight: 700; paint-order: stroke; stroke: rgba(7,11,20,.9); stroke-width: 3px; }
.orbit { fill: none; stroke: rgba(242,230,207,.16); }
.route-done { fill: none; stroke-linecap: round; }
.route-left { fill: none; stroke-dasharray: 3 5; stroke-linecap: round; animation: march 1.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -16; } }
.clickable { cursor: pointer; }
.ship-marker .halo { animation: pulse 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
.timewarp { display: flex; align-items: center; gap: 8px; background: var(--sw-ink); color: var(--sw-paper); padding: 6px 8px; border: 4px solid var(--sw-ink); border-top: 0; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.timewarp button { min-height: 32px; min-width: 44px; border: 2px solid rgba(242,230,207,.5); background: transparent; color: var(--sw-paper); font-family: var(--sw-font-display); font-size: 15px; letter-spacing: 1px; cursor: pointer; padding: 0 8px; }
.timewarp button.on { background: var(--sw-orange); border-color: var(--sw-orange); }
.timewarp .clock { margin-left: auto; font-family: var(--sw-font-display); font-size: 16px; color: var(--sw-teal-light); white-space: nowrap; }
.traffic { display: flex; flex-direction: column; gap: 8px; }
.traffic-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); text-decoration: none; }
.traffic-row .thumb { height: 34px; background: var(--sw-space); display: flex; align-items: center; justify-content: center; border: 2px solid var(--sw-ink); }
.traffic-row .dis { font-size: 19px; line-height: 1; }
.traffic-row .eta { font-family: var(--sw-font-display); font-size: 20px; text-align: right; }
.traffic-row .eta small { display: block; font-family: var(--sw-font-body); font-size: 9px; font-weight: 700; }

/* ---------- ships ---------- */
.ship-art .plume.v { transform-box: fill-box; transform-origin: 50% 0%; }
.ship-art .plume.h { transform-box: fill-box; transform-origin: 100% 50%; }
.ship-art.animate .plume { animation: flicker .12s steps(2) infinite alternate; }
.ship-art.animate .plume.h { animation-name: flickerH; }
@keyframes flicker { from { transform: scaleY(.94); opacity: .92; } to { transform: scaleY(1.05); opacity: 1; } }
@keyframes flickerH { from { transform: scaleX(.93); opacity: .92; } to { transform: scaleX(1.06); opacity: 1; } }
.ship-art.animate .nav-light { animation: navblink 1.6s steps(1) infinite; }
@keyframes navblink { 0%, 70% { opacity: 0; } 72%, 100% { opacity: 1; } }
.ship-art .nav-light { opacity: .9; }
.ship-art.animate .ring-spin { animation: ringspin 3s linear infinite; }
@keyframes ringspin { to { stroke-dashoffset: -60; } }
.ship-art.animate .warp-ring { animation: pulse 2.4s ease-in-out infinite; }
.classified { filter: brightness(0) invert(.3); opacity: .9; }
.classified .plume { display: none; }

.fleet { display: flex; flex-direction: column; gap: 10px; }
.fleet-row { display: flex; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); min-height: 118px; text-decoration: none; color: inherit; }
.fleet-row:hover { color: inherit; box-shadow: 4px 4px 0 var(--sw-ink); }
.fleet-row .win { position: relative; width: 104px; flex: none; background: var(--sw-space); border-right: 3px solid var(--sw-ink); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fleet-row .info { flex: 1; min-width: 0; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.fleet-row h2 { font-size: 26px; }
.fleet-row .info p { font-size: 11px; }
.next-class { display: block; border: 3px dashed var(--sw-ink); text-decoration: none; background: var(--sw-paper-light); }
.next-class .win { position: relative; height: 128px; background: var(--sw-space); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.next-class .label { position: absolute; left: 10px; top: 8px; font-size: 14px; padding: 2px 6px; border: 2px solid var(--sw-orange); color: var(--sw-orange); font-family: var(--sw-font-display); letter-spacing: 1px; }
.next-class .foot { padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 3px solid var(--sw-ink); background: var(--sw-paper-light); }
.stats > div { padding: 8px 10px; border-right: 2px solid var(--sw-ink); min-width: 0; }
.stats > div:last-child { border-right: 0; }
.stats small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.stats b { font-family: var(--sw-font-display); font-weight: 400; font-size: 22px; letter-spacing: 1px; line-height: 1.1; display: block; margin-top: 2px; }
.module { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 2px solid var(--sw-ink); }
.module:last-child { border-bottom: 2px solid var(--sw-ink); }
.module .n { font-weight: 700; font-size: 13px; }
.module .m { font-size: 10px; margin-top: 2px; }
.module.empty .n { color: var(--sw-orange-text); }
.liveries { display: flex; gap: 10px; }
.livery { width: 52px; height: 52px; border: 3px solid var(--sw-ink); cursor: pointer; padding: 0; }
.livery.on { outline: 3px solid var(--sw-ink); outline-offset: 3px; }
.input { width: 100%; min-height: 48px; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); padding: 6px 12px; font-family: var(--sw-font-display); font-size: 24px; letter-spacing: 1px; color: var(--sw-ink); }
.input.mono { font-family: var(--sw-font-body); font-size: 15px; letter-spacing: 0; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.materials .list-row { padding: 6px 0; font-size: 11px; }
.materials .ok { color: var(--sw-teal); font-weight: 700; }
.materials .no { color: var(--sw-orange-text); font-weight: 700; }
.class-picker { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.class-pick { flex: none; width: 96px; border: 3px solid var(--sw-ink); background: var(--sw-paper-light); padding: 0 0 6px; cursor: pointer; text-align: center; }
.class-pick .w { height: 64px; background: var(--sw-space); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; overflow: hidden; }
.class-pick.on { background: var(--sw-ink); color: var(--sw-paper); }
.class-pick:disabled { opacity: .5; cursor: not-allowed; }
.class-pick .dis { font-size: 15px; }
.yard-grid { position: absolute; left: 4%; right: 4%; top: 12%; bottom: 26%; border: 2px solid rgba(232,178,58,.85); background-image: linear-gradient(rgba(232,178,58,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(232,178,58,.35) 1px, transparent 1px); background-size: 12% 25%; }

/* ---------- research ---------- */
.patches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
.patch-item { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; text-align: center; }
.patch-item.locked { filter: grayscale(1); opacity: .55; }
.patch { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 5px solid var(--sw-ink); background: var(--sw-space); box-shadow: 0 0 0 3px var(--sw-paper), 0 0 0 6px var(--sw-mustard); overflow: hidden; }
.patch-item.active .patch { box-shadow: 0 0 0 3px var(--sw-paper), 0 0 0 6px var(--sw-orange); animation: patchpulse 2s ease-in-out infinite; }
@keyframes patchpulse { 50% { box-shadow: 0 0 0 3px var(--sw-paper), 0 0 0 6px var(--sw-orange), 0 0 18px 6px rgba(226,87,43,.45); } }
.patch .code { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-family: var(--sw-font-display); font-size: 11px; letter-spacing: 1px; color: var(--sw-paper); }
.patch-item .dis { font-size: 18px; line-height: 1; }
.patch-item .status { font-size: 10px; font-weight: 700; padding: 2px 8px; }
.era-title { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--sw-ink); padding-bottom: 4px; }
.era-title h2 { font-size: 24px; }
.era-title span { font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(7,11,20,.55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 440px; background: var(--sw-paper); border: 4px solid var(--sw-ink); border-bottom: 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 86vh; overflow-y: auto; animation: sheetup .2s ease-out; }
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { font-size: 30px; line-height: 1; }

/* ---------- cards ---------- */
.album { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--sw-ink); border: 4px solid var(--sw-ink); box-shadow: 6px 6px 0 var(--sw-ink); text-decoration: none; color: var(--sw-paper); }
.pcard:hover { color: var(--sw-paper); transform: translate(-1px, -1px); }
.pcard.legendary { outline: 3px solid var(--sw-mustard); outline-offset: 0; }
.pcard .top { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 8px 4px; }
.pcard .top .dis { font-size: 22px; line-height: 1; }
.pcard .top small { font-size: 9px; font-weight: 700; color: var(--sw-mustard); }
.pcard .art { position: relative; aspect-ratio: 1 / .9; background: var(--sw-space); overflow: hidden; }
.pcard .kind { background: var(--sw-paper-light); color: var(--sw-orange-text); font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 6px 8px; text-transform: uppercase; }
.pcard .foot { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; font-size: 9px; font-weight: 700; }
.pcard .foot .dis { font-size: 15px; }
.pcard .foot.rare { background: var(--sw-orange); }
.pcard .foot.legendary { background: var(--sw-mustard); color: var(--sw-ink); }
.pcard.missing { background: #2a3550; border-style: dashed; box-shadow: none; opacity: .75; }
.pcard.missing .art { filter: grayscale(1) brightness(.35); }
.label-stamp { position: absolute; right: 8px; bottom: 8px; font-family: var(--sw-font-display); font-size: 13px; letter-spacing: 1px; padding: 1px 7px; border: 2px solid currentColor; background: rgba(242,230,207,.92); transform: rotate(-8deg); }
.label-stamp.teal { color: var(--sw-teal); }
.label-stamp.orange { color: var(--sw-orange-text); }
.label-stamp.ink { color: var(--sw-ink); }
.bigcard { background: var(--sw-ink); border: 4px solid var(--sw-ink); box-shadow: 8px 8px 0 var(--sw-ink); color: var(--sw-paper); }
.bigcard .title { padding: 10px 14px 8px; display: flex; justify-content: space-between; align-items: flex-end; }
.bigcard .title h1 { font-size: 56px; line-height: .9; color: var(--sw-paper); }
.bigcard .title p { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--sw-mustard); margin-top: 4px; text-transform: uppercase; }
.bigcard .rarity { font-family: var(--sw-font-display); font-size: 18px; border: 2px solid var(--sw-mustard); color: var(--sw-mustard); padding: 2px 8px; letter-spacing: 1px; }
.bigcard .art { position: relative; aspect-ratio: 1 / .66; overflow: hidden; background: var(--sw-space); }
.bigcard .facts { display: grid; grid-template-columns: 1fr 1fr; background: var(--sw-paper-light); color: var(--sw-ink); }
.bigcard .facts > div { padding: 8px 10px; border-top: 2px solid var(--sw-ink); }
.bigcard .facts > div:nth-child(odd) { border-right: 2px solid var(--sw-ink); }
.bigcard .facts small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.bigcard .facts b { font-family: var(--sw-font-display); font-weight: 400; font-size: 24px; letter-spacing: 1px; }
.bigcard .flav { background: var(--sw-paper-light); color: var(--sw-ink); padding: 10px 14px 12px; font-size: 11px; line-height: 1.55; border-top: 2px solid var(--sw-ink); }
.round-stamp { position: absolute; right: 12px; bottom: 12px; width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--sw-orange); background: rgba(242,230,207,.92); color: var(--sw-orange-text); display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-14deg); font-family: var(--sw-font-display); text-align: center; line-height: 1; font-size: 17px; letter-spacing: 1px; box-shadow: inset 0 0 0 3px rgba(242,230,207,.9), inset 0 0 0 4px var(--sw-orange); }
.round-stamp small { font-size: 10px; margin-top: 3px; }
.round-stamp.teal { border-color: var(--sw-teal); color: var(--sw-teal); box-shadow: inset 0 0 0 3px rgba(242,230,207,.9), inset 0 0 0 4px var(--sw-teal); }
.round-stamp.ink { border-color: var(--sw-ink); color: var(--sw-ink); box-shadow: inset 0 0 0 3px rgba(242,230,207,.9), inset 0 0 0 4px var(--sw-ink); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { min-height: 32px; padding: 0 10px; border: 2px solid var(--sw-ink); background: var(--sw-paper-light); font-size: 10px; font-weight: 700; letter-spacing: 1px; cursor: pointer; text-transform: uppercase; }
.filters button.on { background: var(--sw-ink); color: var(--sw-paper); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); top: 12px; width: min(420px, calc(100% - 24px)); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--sw-ink); color: var(--sw-paper); border: 3px solid var(--sw-ink); box-shadow: 5px 5px 0 rgba(7,11,20,.6); padding: 10px 12px; font-size: 12px; line-height: 1.4; display: flex; gap: 10px; align-items: flex-start; animation: toastin .25s ease-out; }
.toast.error { background: var(--sw-orange); }
.toast.good { background: var(--sw-teal); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
@keyframes toastin { from { transform: translateY(-16px); opacity: 0; } }

/* ---------- log ---------- */
.log { display: flex; flex-direction: column; }
.log-item { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(27,42,65,.2); font-size: 11px; line-height: 1.45; }
.log-item time { font-weight: 700; font-size: 10px; color: #4a5468; }
.log-item .k { display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--sw-teal); }
.log-item .k.base-founded, .log-item .k.card { background: var(--sw-mustard); }
.log-item .k.research-complete { background: var(--sw-orange); }
.log-item .k.cycle { background: var(--sw-ink); }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; display: flex; flex-direction: column; }
.welcome .hero { position: relative; height: 380px; border-bottom: 4px solid var(--sw-ink); overflow: hidden; background: var(--sw-space); }
.welcome .title-block { padding: 22px 18px 0; }
.welcome h1 { font-size: 76px; line-height: .85; }
.form { display: flex; flex-direction: column; gap: 12px; }
.error-text { color: var(--sw-orange-text); font-size: 12px; font-weight: 700; }

/* ---------- mini-games ---------- */
.mg { min-height: 100vh; background: #05070d; color: #F2E6CF; display: flex; flex-direction: column; }
.mg .hdr { padding: 30px 16px 10px; display: flex; gap: 12px; align-items: center; }
.mg .hdr .back-btn { background: transparent; color: #F2E6CF; border-color: rgba(242,230,207,.6); }
.mg .hdr .eyebrow { color: var(--sw-mustard); }
.mg .hdr h1 { font-size: 34px; line-height: 1; color: #F2E6CF; }
.mg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.mg-stats > div { border: 2px solid rgba(242,230,207,.35); padding: 6px 10px; }
.mg-stats small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: #B7AE9C; }
.mg-stats b { font-family: var(--sw-font-display); font-weight: 400; font-size: 24px; letter-spacing: 1px; }
.mg-stats b.teal { color: var(--sw-teal-light); }
.mg-panel { margin: 0 16px; border: 2px solid rgba(242,230,207,.3); padding: 12px 14px; font-size: 12px; line-height: 1.5; }
.mg-panel h2 { font-size: 22px; margin-bottom: 4px; }
.mg .actions { padding: 12px 16px 24px; display: flex; gap: 10px; margin-top: auto; }
.mg .actions .btn { flex: 1; background: transparent; color: #F2E6CF; border-color: rgba(242,230,207,.7); }
.mg .actions .btn.mustard { background: var(--sw-mustard); color: var(--sw-ink); border-color: var(--sw-mustard); }
.pipes { position: relative; margin: 14px auto; display: grid; gap: 4px; width: min(340px, calc(100% - 64px)); }
.pipe { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: linear-gradient(145deg, #222a3a, #121722); border-radius: 6px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.pipe.rock { background: radial-gradient(circle at 70% 30%, #4a4036 0 14%, transparent 15%), radial-gradient(circle at 30% 70%, #3c342c 0 12%, transparent 13%), #241f1a; cursor: default; }
.pipe svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .16s; }
.pipe.hint { box-shadow: inset 0 0 0 2px var(--sw-mustard), 0 0 12px rgba(232,178,58,.6); }
.pipe-port { position: absolute; width: 30px; border-radius: 8px; display: flex; align-items: flex-end; justify-content: center; font-size: 9px; font-weight: 700; }
.pipe-port.ice { left: -34px; background: linear-gradient(90deg, #eaf8ff, #8FE3DE); color: #1B2A41; }
.pipe-port.hab { right: -34px; background: var(--sw-teal); color: #F2E6CF; }
.stars { display: flex; gap: 6px; align-items: center; }
.stars svg { width: 20px; height: 20px; }
.survey-map { position: relative; margin: 10px 0; aspect-ratio: 1; width: 100%; overflow: hidden; cursor: crosshair; touch-action: manipulation; }
.survey-map svg { width: 100%; height: 100%; display: block; }
.survey-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 0 16px; font-size: 12px; }
.survey-list span { display: flex; align-items: center; gap: 8px; }
.survey-list .done { text-decoration: line-through; color: #8FE3DE; }
.lander-field { position: relative; flex: 1; min-height: 420px; overflow: hidden; touch-action: none; user-select: none; }
.lander-field > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lander-hud { position: absolute; left: 12px; right: 12px; top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: rgba(7,11,20,.7); border: 1px solid rgba(242,230,207,.25); padding: 6px 10px; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: #B7AE9C; }
.lander-hud b { display: block; font-size: 16px; color: #F2E6CF; font-family: var(--sw-font-body); }
.lander-hud b.warn { color: #FFB08F; }
.lander-hud b.ok { color: #8FE3DE; }
.lander-controls { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; align-items: center; gap: 18px; }
.lander-controls button { width: 62px; height: 62px; border-radius: 50%; border: 2px solid rgba(242,230,207,.4); background: rgba(27,42,65,.85); color: #F2E6CF; font-size: 22px; touch-action: none; cursor: pointer; }
.lander-controls button.thrust { width: 150px; border-radius: 34px; background: var(--sw-mustard); color: var(--sw-ink); font-family: var(--sw-font-display); font-size: 30px; letter-spacing: 3px; border: 0; }
.lander-controls button.held { filter: brightness(1.25); transform: scale(.97); }
.result-card { margin: 0 16px; border: 3px solid var(--sw-mustard); padding: 14px; background: rgba(232,178,58,.08); }
.result-card h2 { font-size: 30px; color: var(--sw-mustard); }
.result-card.bad { border-color: var(--sw-orange); background: rgba(226,87,43,.1); }
.result-card.bad h2 { color: #FFB08F; }

/* ---------- poster ---------- */
.poster { display: flex; flex-direction: column; gap: 14px; }
.lineage { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lineage > div { border-top: 3px solid var(--sw-ink); padding-top: 6px; }
.lineage .dis { font-size: 22px; }
.lineage p { font-size: 10px; line-height: 1.5; }
.lineage .era { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 5px; background: var(--sw-ink); color: var(--sw-paper); }
.lineage .era.locked { background: var(--sw-locked); }

.side-pane .panel { background: var(--sw-paper); border: 4px solid var(--sw-ink); padding: 14px; box-shadow: 8px 8px 0 #0b1220; }
.side-pane .panel h2 { font-size: 26px; }

/* ---------- live maps (HTML world + SVG routes) ---------- */
.map-world { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .25s ease-out; will-change: transform; }
.map.uni .map-world { transition: none; }
.map-star { position: absolute; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, #fffbe8 0%, var(--star, #ffe08a) 34%, #ffab3d 66%, #e8641c 100%); box-shadow: 0 0 30px 10px rgba(255,170,60,.45), 0 0 90px 40px rgba(255,120,30,.16); }
.map-star.blackhole { background: radial-gradient(circle, #000 0 46%, #ffb05c 50%, rgba(255,120,40,.65) 57%, rgba(180,60,20,.25) 66%, rgba(0,0,0,0) 72%); box-shadow: 0 0 40px 14px rgba(255,140,60,.25); animation: bhspin 9s linear infinite; }
@keyframes bhspin { to { filter: hue-rotate(20deg); } }
.map-body { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.map-body .pl { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-body.locked { filter: grayscale(.85) brightness(.7); }
.map-body.sel::before { content: ""; position: absolute; inset: -35%; border-radius: 50%; border: 2px solid #E8B23A; animation: pulse 1.6s infinite; }
.map-body .map-ring { position: absolute; left: -45%; top: 25%; width: 190%; height: 50%; border-radius: 50%; border: 2px solid rgba(225,203,150,.8); border-top-color: rgba(225,203,150,.25); transform: rotate(-14deg); pointer-events: none; }
.map-body .map-base { position: absolute; inset: -40%; border-radius: 50%; border: 2px solid #E2572B; pointer-events: none; }
.map-tag { position: absolute; display: flex; flex-direction: column; align-items: center; pointer-events: none; white-space: nowrap; }
.map-name { font-family: var(--sw-font-display); font-size: 13px; letter-spacing: 1px; color: #F2E6CF; text-shadow: 0 0 3px #070B14, 0 0 6px #070B14; }
.map-name.dim { color: #8d8676; }
.map-name.teal { color: #8FE3DE; }
.map-eta { font-size: 9px; font-weight: 700; letter-spacing: .5px; color: #FFB08F; text-shadow: 0 0 3px #070B14, 0 0 6px #070B14; }
.map-eta.teal { color: #8FE3DE; }
.map-ship { position: absolute; cursor: pointer; transform-origin: 50% 50%; line-height: 0; z-index: 3; }
.map-ship.docked { z-index: 2; opacity: .95; }
.map-ship .ship-halo { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent) 0%, transparent 70%); animation: pulse 2s ease-in-out infinite; }
.map-ship .ship-halo.warp { width: 70px; height: 70px; }
.map-ship.sel .ship-halo { width: 46px; height: 46px; box-shadow: 0 0 0 2px #E8B23A; }
.ship-tag { z-index: 4; }
.uni-gal { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; padding: 0; background: none; cursor: pointer; }
.uni-gal .gal { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.uni-gal.locked { filter: saturate(.4) brightness(.65); }
.uni-gal.sel::after { content: ""; position: absolute; inset: -12%; border: 2px dashed #8FE3DE; border-radius: 50%; animation: pulse 1.6s infinite; }
.uni-home { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%; background: #8FE3DE; box-shadow: 0 0 10px #8FE3DE; }
.uni-tag { transform: translate(-50%, 0); }
.map.uni { aspect-ratio: 1 / 1.15; cursor: default; }
.info-panel { border: 3px solid var(--sw-ink); background: var(--sw-paper-light); padding: 12px; display: flex; gap: 12px; align-items: center; }
.info-panel .thumb { position: relative; width: 64px; height: 64px; flex: none; background: var(--sw-space); border: 2px solid var(--sw-ink); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.info-panel h2 { font-size: 26px; line-height: 1; }
.info-panel p { font-size: 11px; line-height: 1.45; }

/* ---------- chase camera ---------- */
.cam { background: #04060c; }
.cam .streaks { position: absolute; inset: -10% -50%; background-repeat: repeat; pointer-events: none; }
.cam .streaks.s1 { background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 90px 120px, rgba(255,255,255,.8), transparent), radial-gradient(1.4px 1.4px at 160px 60px, #fff, transparent); background-size: 200px 160px; opacity: .55; }
.cam .streaks.s2 { background-image: radial-gradient(1px 1px at 40px 80px, rgba(255,255,255,.7), transparent), radial-gradient(1px 1px at 130px 20px, rgba(255,255,255,.6), transparent); background-size: 170px 110px; opacity: .45; }
.cam .streaks.s3 { background-image: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.55)); background-size: 60px 1px; background-repeat: no-repeat; opacity: 0; }
.cam.flying .streaks.s1 { animation: drift 7s linear infinite; }
.cam.flying .streaks.s2 { animation: drift 3.5s linear infinite; }
.cam.warp .streaks.s1, .cam.warp .streaks.s2 { filter: blur(.4px); transform: scaleX(6); animation-duration: .8s; }
.cam.warp { background: radial-gradient(ellipse at 80% 50%, rgba(92,225,230,.18), transparent 60%), #04060c; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-200px); } }
.cam .pl { position: absolute; }
.cam .gal { position: absolute; border-radius: 50%; }
.cam-ship { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.cam.flying .cam-ship { animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translate(-50%, -50%) rotate(-.6deg); } 50% { transform: translate(-50%, -54%) rotate(.6deg); } }
.cam-hud { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; align-items: flex-start; }
.cam-clock { font-family: var(--sw-font-display); font-size: 24px; letter-spacing: 1px; color: #8FE3DE; text-shadow: 0 0 8px rgba(143,227,222,.6); }
.window-light { position: absolute; width: 8px; height: 8px; border-radius: 4px; background: #FFD27A; box-shadow: 0 0 8px #FFB347; animation: pulse 3.2s ease-in-out infinite; }
.lineup .lineup-ship { position: absolute; line-height: 0; }
.lineup .lineup-ship svg { display: block; }
.poster-page { min-height: 100vh; padding: 40px 32px; display: flex; flex-direction: column; gap: 20px; max-width: 1440px; margin: 0 auto; }
.poster-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.poster-head h1 { font-size: 64px; line-height: .9; }
.poster-page .lineup { height: min(56vw, 560px) !important; }
.poster-page .lineage { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 700px) { .poster-page .lineage { grid-template-columns: repeat(2, 1fr); } .poster-head h1 { font-size: 44px; } }
.welcome .hero .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 12px; background: var(--sw-orange); color: var(--sw-paper); display: flex; justify-content: space-between; align-items: center; }
.welcome .hero .caption .dis { font-size: 19px; }
.welcome .hero .caption small { font-size: 9px; font-weight: 700; }
.lbl { position: absolute; font-family: var(--sw-font-display); font-size: 14px; letter-spacing: 1px; color: #F2E6CF; transform: translateX(-50%); white-space: nowrap; }
.dep-from { background: transparent; border: 0; color: var(--sw-paper); font: 700 10px var(--sw-font-body); letter-spacing: 1px; min-height: 32px; cursor: pointer; }
.dep-from option { color: var(--sw-ink); }
h1:focus { outline: none; }
select.input { appearance: auto; }
input[type=range] { width: 100%; accent-color: var(--sw-orange); min-height: 32px; }

/* mini-games restyled to the retro print look: paper HUD, framed realistic play field */
.mg { background-color: var(--sw-paper); color: var(--sw-ink); padding-bottom: 24px; gap: 12px; }
.mg .hdr { padding-bottom: 0; }
.mg .hdr .back-btn { background: var(--sw-paper-light); color: var(--sw-ink); border-color: var(--sw-ink); }
.mg .hdr .eyebrow { color: var(--sw-orange-text); }
.mg .hdr h1 { color: var(--sw-ink); font-size: 36px; }
.mg-stats > div { border: 3px solid var(--sw-ink); background: var(--sw-paper-light); }
.mg-stats small { color: var(--sw-ink); }
.mg-stats b.teal { color: var(--sw-teal); }
.mg-panel { border: 3px solid var(--sw-ink); background: var(--sw-paper-light); }
.mg .actions { padding: 0 16px; margin-top: 0; }
.mg .actions .btn { background: var(--sw-paper-light); color: var(--sw-ink); border-color: var(--sw-ink); }
.mg .actions .btn.mustard { background: var(--sw-mustard); border-color: var(--sw-ink); }
.mg-field { margin: 0 16px; padding: 14px 0; background: radial-gradient(ellipse at 50% 0%, #10203a, #05070d 70%); }
.mg-field .pipes { margin: 0 auto; }
.result-card { border: 4px solid var(--sw-ink); background: var(--sw-paper-light); box-shadow: 8px 8px 0 var(--sw-ink); }
.result-card h2 { color: var(--sw-ink); }
.result-card.bad h2 { color: var(--sw-orange-text); }
.survey-list .done { color: var(--sw-teal); }
.lander-field { padding: 0; min-height: 520px; }
.pulse-ring { animation: pulse 1s ease-in-out infinite; }
.phone.dark:has(.mg), .phone.dark:has(.welcome) { background: var(--sw-paper); }
.map-ship.sel .ship-halo { width: 54px; height: 54px; box-shadow: none; border: 1.5px dashed #E8B23A; background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent) 0%, transparent 65%); }
.map-ship.docked { opacity: .8; }
.ship-tag .map-name { font-size: 14px; }
.ship-tag .map-eta { font-size: 10px; }

/* ---------- story transmissions ---------- */
.transmission-backdrop { align-items: center; z-index: 120; }
.transmission { border-bottom: 4px solid var(--sw-ink); box-shadow: 10px 10px 0 rgba(7,11,20,.7); max-width: 400px; margin: 0 16px; background: var(--sw-paper) repeating-linear-gradient(0deg, rgba(27,42,65,.035) 0 2px, transparent 2px 4px); }
.tx-head { color: var(--sw-orange-text); display: flex; align-items: center; gap: 8px; }
.tx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sw-orange); animation: pulse 1s infinite; flex: none; }
.tx-text { font-size: 13px; line-height: 1.6; border-left: 3px solid var(--sw-ink); padding-left: 10px; animation: txin 1.6s steps(24) both; }
@keyframes txin { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.tx-item { border-bottom: 1px solid rgba(27,42,65,.25); }
.tx-item summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; list-style: none; min-height: 44px; align-items: center; }
.tx-item summary::-webkit-details-marker { display: none; }
.tx-item .name { font-weight: 700; font-size: 13px; }
.tx-item .meta { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: #4a5468; text-align: right; }
.tx-item.redacted .name { color: var(--sw-locked); letter-spacing: -1px; }
.log-item .k.story { background: var(--sw-orange); border-radius: 50%; }
.log-item .k.naming { background: var(--sw-teal); border-radius: 50%; }
