:root {
    color-scheme: dark;
    --bg: #080d12;
    --panel: #0e171e;
    --raised: #14212a;
    --line: #29373f;
    --muted: #a6b5bc;
    --dim: #859aa4;
    --ink: #e6edf0;
    --amber: #ffc18a;
    --amber-dark: #412e21;
    --teal: #88e2cf;
    --red: #ff9c88;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", var(--sans);
    --mono: "IBM Plex Mono", Menlo, Consolas, monospace;
    font-family: var(--sans);
    font-size: 16px;
    color: var(--ink);
    background: var(--bg);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-width: 300px
}

button, a, input, select {
    font: inherit
}

button {
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer
}

button:disabled, input:disabled {
    cursor: not-allowed;
    opacity: .45
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px
}

button, a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent
}

[hidden], .defs {
    display: none !important
}

svg {
    display: block
}

button svg, .rail-heading svg, .account svg, .action-identity svg, .contact svg, .level-name svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0
}

.topbar {
    min-height: 66px;
    display: flex;
    gap: clamp(14px, 3.5vw, 70px);
    align-items: stretch;
    padding: 0 clamp(15px, 2.5vw, 46px);
    border-bottom: 1px solid #34424b;
    background: #0c1219;
    position: relative;
    z-index: 3
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0
}

.brandmark {
    width: 40px;
    height: 40px;
    color: var(--amber)
}

.brand > span {
    font: 800 15px/.98 var(--display);
    letter-spacing: .09em
}

.brand > span span {
    display: block;
    margin-top: 4px;
    letter-spacing: .21em;
    color: #cbd6d8;
    font-size: 13px
}

.navigation {
    display: flex;
    align-items: stretch;
    gap: 3px
}

.navigation button {
    position: relative;
    padding: 0 clamp(9px, 1.2vw, 22px);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 580;
    font-size: .9rem;
    color: var(--muted);
    white-space: nowrap
}

.navigation button[aria-current=page] {
    color: var(--amber);
    background: linear-gradient(0deg, #352b233f, transparent 85%)
}

.navigation button[aria-current=page]::after {
    position: absolute;
    content: "";
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 2px;
    background: var(--amber)
}

.navigation button:hover, .contact:hover, .select-card:hover {
    background-color: var(--raised)
}

.account {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    white-space: nowrap
}

.net, .balance {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .8rem
}

.net {
    color: var(--muted)
}

.net i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber)
}

.net i.live {
    background: var(--teal);
    box-shadow: 0 0 7px #83f5bc3b
}

.balance {
    border-left: 1px solid var(--line);
    padding-left: 18px;
    color: var(--amber);
    font-family: var(--mono)
}

.balance svg {
    width: 17px;
    height: 17px
}

.balance span {
    color: var(--muted)
}

.layout {
    display: grid;
    grid-template-columns:minmax(0, 1fr) clamp(260px, 23vw, 350px);
    min-height: calc(100svh - 67px);
    max-width: 2300px;
    margin: auto
}

.workspace {
    min-width: 0;
    background: #0b1117
}

.screen {
    min-width: 0
}

.flight {
    display: flex;
    flex-direction: column
}

.window {
    position: relative;
    width: 100%;
    height: clamp(340px, calc(100svh - 295px), 900px);
    isolation: isolate;
    overflow: hidden;
    background: #06101b
}

#space {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none
}

.window::after {
    position: absolute;
    z-index: 0;
    content: "";
    inset: 0;
    background: linear-gradient(180deg, #03091188, transparent 30%, transparent 69%, #040a1099);
    pointer-events: none
}

.hud-edges {
    position: absolute;
    inset: 15px;
    z-index: 1;
    pointer-events: none;
    opacity: .65;
    background: linear-gradient(#96b4b8, #96b4b8) left top/16px 1px, linear-gradient(#96b4b8, #96b4b8) left top/1px 10px, linear-gradient(#96b4b8, #96b4b8) right top/16px 1px, linear-gradient(#96b4b8, #96b4b8) right top/1px 10px, linear-gradient(#96b4b8, #96b4b8) left bottom/16px 1px, linear-gradient(#96b4b8, #96b4b8) left bottom/1px 10px, linear-gradient(#96b4b8, #96b4b8) right bottom/16px 1px, linear-gradient(#96b4b8, #96b4b8) right bottom/1px 10px;
    background-repeat: no-repeat
}

.scene-heading, .window-tools, .scene-bottom {
    position: absolute;
    z-index: 1
}

.scene-heading {
    top: clamp(27px, 3.8vw, 49px);
    left: clamp(27px, 3.5vw, 62px);
    pointer-events: none;
    text-shadow: 0 2px 10px #071018
}

.eyebrow, .instrument-heading, .rail-heading, .map-label, .caps {
    font: 600 .73rem/1.3 var(--mono);
    text-transform: uppercase;
    letter-spacing: .095em
}

.eyebrow {
    color: var(--amber);
    display: flex;
    align-items: center;
    gap: 9px
}

.dash {
    width: 23px;
    height: 2px;
    background: var(--amber);
    display: inline-block
}

h1, h2, h3, p {
    margin: 0
}

h1 {
    font: 560 clamp(2.45rem, 5.3vw, 5.9rem)/.99 var(--display);
    letter-spacing: -.065em
}

.scene-heading h1 {
    margin: 9px 0 7px
}

.sector-status {
    color: #d1dedc;
    font-size: .83rem;
    line-height: 1.5
}

.window-tools {
    top: 23px;
    right: 24px
}

.icon-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #0c151aa8;
    border: 1px solid #8ea1a355;
    border-radius: 4px;
    color: #c9d8d8
}

.icon-button:hover {
    background: var(--raised)
}

.scene-bottom {
    bottom: clamp(28px, 3vw, 40px);
    left: clamp(27px, 3.5vw, 62px);
    right: clamp(27px, 3.5vw, 62px);
    display: flex;
    align-items: end;
    justify-content: space-between;
    pointer-events: none;
    text-shadow: 0 2px 8px #061016
}

.scene-bottom .eyebrow {
    font-size: .7rem;
    letter-spacing: .12em;
    color: var(--teal);
    margin-bottom: 5px
}

.location {
    font-size: clamp(.94rem, 1.65vw, 1.2rem);
    font-weight: 580
}

.velocity {
    font: 600 clamp(1.4rem, 3.7vw, 2.6rem)/1 var(--mono);
    letter-spacing: -.07em
}

.velocity small {
    font-size: .8rem;
    color: #bdcccd;
    letter-spacing: 0
}

.reticle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 30px;
    z-index: 1;
    transform: translate(-50%, -50%);
    background: linear-gradient(var(--teal), var(--teal)) left center/7px 1px, linear-gradient(var(--teal), var(--teal)) right center/7px 1px, linear-gradient(var(--teal), var(--teal)) center top/1px 7px, linear-gradient(var(--teal), var(--teal)) center bottom/1px 7px;
    background-repeat: no-repeat;
    opacity: .75;
    pointer-events: none
}

.reticle i {
    display: block;
    border: 1px solid var(--teal);
    position: absolute;
    inset: 12px;
    border-radius: 50%
}

.flight-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(100deg, #17232b, #101921);
    padding: 13px clamp(17px, 2.7vw, 50px);
    border-block: 1px solid #37464e
}

.action-identity, .action-buttons, .button-row {
    display: flex;
    gap: 10px;
    align-items: center
}

.action-identity {
    gap: 12px
}

.action-identity > svg {
    color: var(--amber);
    width: 26px;
    height: 26px
}

.action-identity .eyebrow {
    font-size: .64rem;
    color: var(--dim);
    margin-bottom: 3px
}

.action-identity strong {
    font-size: 1rem
}

.primary, .secondary, .fire, .select-card, .tab-button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 4px;
    font-size: .87rem;
    font-weight: 650;
    line-height: 1.25
}

.primary {
    color: #201910;
    background: var(--amber);
    border: 1px solid #ffd3a6
}

.primary:hover:enabled {
    background: #ffcf9e
}

.secondary, .tab-button {
    color: #e0e9eb;
    background: #18232c;
    border: 1px solid #354650
}

.secondary:hover:enabled, .tab-button:hover:enabled {
    border-color: #70838a;
    background: #202e37
}

.console {
    display: grid;
    grid-template-columns:1.05fr 1.16fr .89fr;
    min-height: 150px;
    background: linear-gradient(135deg, #0d171e, #101b23);
    border-bottom: 1px solid var(--line)
}

.instrument {
    min-width: 0;
    padding: 17px clamp(14px, 1.7vw, 30px);
    border-right: 1px solid var(--line)
}

.instrument:last-child {
    border: 0
}

.instrument-heading, .rail-heading {
    color: #c4d1d3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 13px
}

.instrument-heading small, .rail-count {
    font: 500 .7rem var(--mono);
    color: var(--dim);
    letter-spacing: 0
}

#radar {
    display: block;
    width: 100%;
    height: 83px
}

.level {
    margin: 0 0 9px
}

.level:last-child {
    margin-bottom: 0
}

.level-head, .kv {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px
}

.level-head {
    margin-bottom: 4px
}

.level-name {
    color: #bfcbd0;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .77rem
}

.level-name svg {
    width: 13px;
    height: 13px
}

.level-value {
    font: .72rem var(--mono);
    color: var(--muted)
}

.track {
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    background: #293741
}

.track i {
    display: block;
    height: 100%;
    background: var(--teal)
}

.track i.amber {
    background: var(--amber)
}

input[type=range] {
    display: block;
    width: 100%;
    margin: 8px 0 14px;
    height: 6px;
    accent-color: var(--teal);
    cursor: pointer
}

.steer-pad {
    display: grid;
    gap: 4px;
    grid-template-columns:repeat(4, 1fr)
}

.steer-pad button {
    border: 1px solid #34454f;
    border-radius: 3px;
    background: #18242d;
    color: #b6cbcf;
    font: 700 .77rem var(--mono);
    height: 28px;
    touch-action: none
}

.steer-pad button:active, .steer-pad button.held {
    background: #345149;
    color: var(--teal)
}

.fire {
    min-height: 28px;
    margin-top: 6px;
    width: 100%;
    padding: 4px 8px;
    background: #2b2221;
    border: 1px solid #503a32;
    color: var(--amber);
    font-size: .76rem
}

.fire svg {
    width: 14px;
    height: 14px
}

.sidebar {
    border-left: 1px solid #32424b;
    background: linear-gradient(150deg, #101a22, #0c141b 70%);
    min-width: 0
}

.side-block {
    padding: 23px clamp(15px, 1.7vw, 31px);
    border-bottom: 1px solid var(--line)
}

.rail-heading {
    justify-content: flex-start;
    gap: 8px;
    font-size: .73rem
}

.rail-heading h2 {
    font: inherit
}

.rail-heading svg {
    width: 16px;
    height: 16px;
    color: var(--dim)
}

.rail-count {
    margin-left: auto;
    color: var(--teal)
}

.objective {
    position: relative
}

.objective-mark {
    position: absolute;
    right: clamp(15px, 1.7vw, 31px);
    top: 23px;
    color: var(--amber);
    font-size: .7rem
}

.objective h3 {
    font: 600 clamp(1.24rem, 1.7vw, 1.47rem)/1.15 var(--display);
    letter-spacing: -.03em;
    margin: 19px 0 8px
}

.objective p, .page-heading p, .muted, .note, .choice-note {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55
}

.mission-tail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 14px
}

.mission-tail > span {
    color: var(--amber);
    font: 500 .78rem var(--mono)
}

.mission-tail .secondary {
    min-height: 32px;
    font-size: .8rem;
    padding: 6px 10px
}

.contact {
    display: grid;
    grid-template-columns:26px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 8px 5px;
    border-left: 2px solid transparent;
    border-radius: 2px
}

.contact.sel {
    border-left-color: var(--teal);
    background: #15262b
}

.contact.sel.hostile {
    border-left-color: var(--red)
}

.contact-icon {
    color: var(--teal);
    font: 500 1.05rem var(--mono);
    text-align: center
}

.hostile .contact-icon {
    color: var(--red)
}

.contact strong, .contact small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.contact strong {
    font-size: .84rem;
    font-weight: 580
}

.contact small {
    font-size: .72rem;
    color: var(--dim);
    margin-top: 2px
}

.contact .range {
    color: var(--muted);
    font: .72rem var(--mono);
    white-space: nowrap
}

.target-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px
}

.target-row button {
    min-height: 31px;
    padding: 5px 9px;
    font-size: .78rem
}

.log-line {
    font-size: .79rem;
    line-height: 1.45;
    color: #bdcace;
    display: flex;
    gap: 9px;
    margin: 0 0 10px
}

.log-line time {
    color: var(--dim);
    font: .67rem/1.7 var(--mono);
    white-space: nowrap
}

.panel-screen {
    padding: clamp(23px, 4vw, 62px);
    min-height: calc(100svh - 67px);
    background: radial-gradient(ellipse at 85% 4%, #18313b66, transparent 40%), #0c141b
}

.page-heading {
    margin: 0 0 24px
}

.page-heading h1 {
    font-size: clamp(2.3rem, 4.3vw, 4.4rem);
    margin: 10px 0
}

.group-title {
    font: 600 1.15rem var(--display);
    margin: 24px 0 12px
}

.map-chart, .detail-box, .trade-box, .yard-card, .prefs {
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #101c24
}

.detail-box, .trade-box, .prefs {
    padding: clamp(15px, 2.3vw, 27px)
}

.map-chart {
    position: relative;
    overflow: hidden;
    background-color: #0d1c26;
    background-image: radial-gradient(#71869852 .8px, transparent 1px);
    background-size: 16px 16px;
    margin-bottom: 14px
}

#sector-map {
    width: 100%;
    max-height: 340px;
    min-height: 195px;
    display: block
}

#sector-map line {
    stroke: #629099;
    stroke-width: 1;
    stroke-dasharray: 5 6
}

#sector-map .route-line {
    stroke: var(--amber);
    stroke-dasharray: 0;
    stroke-width: 2
}

#sector-map .node {
    cursor: pointer
}

#sector-map .node text {
    fill: #d8e5e7;
    font: 600 16px var(--sans);
    pointer-events: none
}

#sector-map .node circle.core {
    fill: #8de1cd
}

#sector-map .node.risk circle.core {
    fill: var(--red)
}

#sector-map .node .halo {
    fill: #233945;
    stroke: #81b7b7;
    stroke-width: 1
}

#sector-map .node.selected .halo {
    fill: #4c3827;
    stroke: var(--amber);
    stroke-width: 2
}

.detail-head, .total-row, .trade-title, .yard-card-head, .pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.detail-head h2, .trade-title h2, .yard-card h3, .prefs h2 {
    font: 600 1.35rem/1.2 var(--display);
    letter-spacing: -.025em
}

.detail-head .pill, .pill {
    color: var(--teal);
    border: 1px solid #42615d;
    border-radius: 20px;
    display: inline-block;
    padding: 4px 9px;
    font: .7rem var(--mono)
}

.pill.danger {
    color: var(--red);
    border-color: #69443f
}

.detail-stats, .ship-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 27px;
    margin: 18px 0
}

.detail-stats span, .ship-stats span {
    color: var(--dim);
    font-size: .76rem;
    display: grid;
    gap: 5px
}

.detail-stats b, .ship-stats b {
    color: var(--ink);
    font: 600 .9rem var(--mono)
}

.button-row {
    flex-wrap: wrap
}

.choice-note {
    margin: 10px 0 0
}

.amber-text {
    color: var(--amber)
}

.market-layout {
    display: grid;
    grid-template-columns:minmax(150px, .9fr) minmax(190px, 1.5fr);
    gap: 12px
}

.good-select {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.select-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    min-height: 65px;
    border: 1px solid var(--line);
    background: #101b23
}

.select-card[aria-pressed=true], .tab-button[aria-pressed=true] {
    color: var(--amber);
    border-color: #806447;
    background: #2a2521
}

.select-card small {
    color: var(--muted);
    font-size: .74rem
}

.trade-title {
    align-items: start
}

.segmented {
    display: flex;
    gap: 4px;
    margin: 17px 0
}

.tab-button {
    flex: 1;
    min-height: 34px;
    padding: 6px 9px
}

.qty {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px
}

.qty input, .prefs input {
    border: 1px solid #41525c;
    border-radius: 4px;
    background: #0c151c;
    padding: 8px 10px;
    color: var(--ink);
    min-width: 0;
    font-family: var(--mono)
}

.qty input {
    width: 75px
}

.qty button {
    min-height: 34px;
    padding: 6px 11px
}

.qty label, .field-label {
    color: var(--muted);
    font-size: .8rem
}

.total-row {
    padding: 14px 0;
    margin-top: 11px;
    border-top: 1px solid var(--line);
    font-size: .89rem
}

.total-row b {
    color: var(--amber);
    font: 600 1.1rem var(--mono)
}

.trade-box > .primary {
    width: 100%
}

.yard-grid {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap: 10px
}

.yard-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch
}

.yard-card.active {
    border-color: #587b70;
    background: #14252a
}

.yard-card h3 {
    font-size: 1.1rem
}

.yard-card .ship-stats {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 11px 4px;
    margin: 10px 0 17px
}

.yard-card .ship-stats b {
    font-size: .76rem
}

.yard-card button {
    margin-top: auto;
    font-size: .8rem;
    padding: 8px 4px
}

.ship-art {
    width: 100%;
    height: 64px;
    color: #8ac4c5;
    margin: 6px 0 8px
}

.yard-card.active .ship-art {
    color: var(--amber)
}

.service-list {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 10px
}

.service-list .yard-card p {
    font-size: .82rem;
    line-height: 1.45;
    color: var(--muted);
    margin: 7px 0 14px
}

.prefs {
    margin: 0 0 12px
}

.prefs h2 {
    margin-bottom: 14px
}

.pref-row {
    margin: 10px 0
}

.prefs input {
    font-size: .9rem;
    flex: 1;
    max-width: 320px
}

.pref-command {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    color: var(--muted);
    font-size: .88rem
}

.pref-command:last-child {
    border: 0
}

kbd {
    font: .75rem var(--mono);
    border: 1px solid #41515a;
    color: #dbe8e8;
    background: #1a2730;
    border-radius: 3px;
    padding: 2px 4px;
    white-space: nowrap
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 8;
    padding: 11px 17px;
    max-width: min(560px, 90vw);
    width: max-content;
    background: #18302f;
    color: #e5f3ec;
    border: 1px solid #567c70;
    border-radius: 5px;
    box-shadow: 0 6px 30px #0009;
    font-size: .88rem;
    line-height: 1.4
}

.toast.err {
    background: #372826;
    border-color: #94685a;
    color: #ffe1ce
}

.window:fullscreen {
    width: 100vw;
    height: 100dvh;
    max-height: none
}

.window:fullscreen .window-tools {
    right: 32px
}

@media (min-width: 1450px) {
    .side-block {
        padding-block: 28px
    }

    .console {
        min-height: 170px
    }

    #radar {
        height: 100px
    }
}

@media (max-width: 1050px) {
    .topbar {
        gap: 10px
    }

    .navigation {
        margin-left: 6px
    }

    .navigation button {
        padding-inline: 10px
    }

    .account {
        gap: 8px
    }

    .balance {
        padding-left: 8px
    }

    .layout {
        grid-template-columns:minmax(0, 1fr) 248px
    }

    .side-block {
        padding: 19px 15px
    }

    .window {
        height: clamp(340px, calc(100svh - 285px), 750px)
    }
}

@media (max-width: 820px) {
    .layout {
        grid-template-columns:minmax(0, 1fr) 215px
    }

    .navigation button {
        gap: 4px;
        padding-inline: 7px
    }

    .topbar {
        padding-inline: 12px
    }

    .brandmark {
        width: 32px
    }

    .brand {
        gap: 6px
    }

    .brand > span {
        font-size: 13px
    }

    .brand > span span {
        font-size: 11px
    }

    .net span {
        display: none
    }

    .account {
        gap: 7px
    }

    .instrument {
        padding: 13px 10px
    }

    .side-block {
        padding: 16px 12px
    }

    .yard-grid {
        grid-template-columns:1fr
    }

    .yard-card .ship-stats {
        display: flex
    }

    .yard-card .ship-art {
        height: 50px
    }

    .panel-screen {
        padding: 23px 17px
    }
}

@media (max-width: 690px) {
    .topbar {
        display: grid;
        grid-template-columns:1fr auto;
        gap: 0;
        min-height: 0;
        padding: 0 12px
    }

    .brand, .account {
        min-height: 47px
    }

    .brand {
        gap: 6px
    }

    .brandmark {
        height: 31px;
        width: 31px
    }

    .brand > span {
        display: flex;
        gap: 6px;
        align-items: center;
        font-size: .77rem;
        letter-spacing: .065em
    }

    .brand > span span {
        margin: 0;
        font: inherit;
        letter-spacing: inherit
    }

    .navigation {
        grid-column: 1/-1;
        grid-row: 2;
        justify-content: space-between;
        margin: 0;
        gap: 0;
        border-top: 1px solid var(--line)
    }

    .navigation button {
        min-height: 39px;
        padding: 0 4px;
        gap: 4px;
        font-size: .76rem
    }

    .navigation svg {
        width: 15px;
        height: 15px
    }

    .navigation button[aria-current=page]::after {
        left: 0;
        right: 0
    }

    .balance {
        font-size: .75rem
    }

    .net span {
        display: inline
    }

    .net {
        font-size: .7rem
    }

    .layout {
        display: block
    }

    .sidebar {
        border-left: 0;
        display: grid;
        grid-template-columns:1fr 1fr
    }

    .side-block {
        border-right: 1px solid var(--line);
        padding: 17px 13px
    }

    .comms {
        grid-column: 1/-1
    }

    .window {
        height: clamp(300px, 49svh, 560px)
    }

    .hud-edges {
        inset: 10px
    }

    .scene-heading {
        top: 24px;
        left: 23px
    }

    .scene-bottom {
        left: 23px;
        right: 23px;
        bottom: 24px
    }

    .window-tools {
        top: 17px;
        right: 16px
    }

    .flight-actions {
        padding: 10px 14px;
        gap: 6px
    }

    .action-identity {
        gap: 5px
    }

    .action-identity > svg {
        width: 22px;
        height: 22px
    }

    .action-buttons {
        gap: 5px
    }

    .action-buttons button {
        padding: 8px 10px;
        min-height: 36px;
        font-size: .8rem
    }

    .panel-screen {
        min-height: 0
    }

    .instrument {
        padding: 12px 9px
    }

    .instrument-heading {
        font-size: .62rem;
        letter-spacing: .025em;
        margin-bottom: 10px
    }

    .console {
        grid-template-columns:1fr 1.1fr 1.1fr;
        min-height: 145px
    }

    .steer-pad {
        gap: 2px
    }

    .steer-pad button {
        font-size: .6rem;
        height: 29px;
        padding: 0
    }

    .rail-heading {
        font-size: .65rem;
        gap: 5px
    }

    .objective h3 {
        margin-top: 12px
    }

    .objective p {
        font-size: .81rem
    }

    .mission-tail {
        flex-wrap: wrap
    }

    .instrument-heading small {
        font-size: .58rem
    }

    .yard-grid {
        grid-template-columns:repeat(3, minmax(0, 1fr))
    }

    .yard-card .ship-stats {
        display: grid
    }

    .yard-card {
        padding: 10px
    }

    .contact {
        grid-template-columns:16px minmax(0, 1fr) auto;
        gap: 3px;
        padding: 6px 2px
    }

    .contact strong {
        font-size: .76rem
    }

    .contact small, .contact .range {
        font-size: .65rem
    }

    .toast {
        bottom: max(9px, env(safe-area-inset-bottom))
    }
}

@media (max-width: 425px) {
    .net span {
        display: none
    }

    .brand > span {
        font-size: .72rem
    }

    .action-identity strong {
        font-size: .84rem
    }

    .action-identity .eyebrow {
        font-size: .57rem
    }

    .radar-line {
        padding-inline: 6px
    }

    #radar {
        height: 74px
    }

    .level-name, .level-value {
        font-size: .64rem
    }

    .level-name svg {
        width: 11px;
        height: 11px
    }

    .scene-heading h1 {
        font-size: 2.7rem
    }

    .market-layout {
        grid-template-columns:1fr
    }

    .good-select {
        display: grid;
        grid-template-columns:1fr 1fr
    }

    .select-card {
        min-height: 48px;
        padding: 7px 9px
    }

    .yard-grid {
        grid-template-columns:1fr
    }

    .yard-card .ship-stats {
        display: flex
    }

    .ship-art {
        display: none
    }

    .mission-tail .secondary {
        font-size: .73rem
    }

    .sidebar {
        grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)
    }

    .nav-credits {
        font-size: .7rem
    }

    .action-buttons {
        gap: 3px
    }

    .button-row {
        gap: 5px
    }
}

@media (max-width: 355px) {
    .navigation svg {
        display: none
    }

    .console {
        grid-template-columns:1fr 1fr
    }

    .throttle {
        grid-column: 1/-1;
        display: flex;
        align-items: center;
        gap: 7px
    }

    .throttle .instrument-heading {
        display: none
    }

    .throttle input {
        width: 22%;
        margin: 0
    }

    .throttle .steer-pad {
        flex: 1
    }

    .throttle .fire {
        width: auto;
        margin: 0
    }

    .sidebar {
        display: block
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto
    }
}

.ship-overview {
    display: grid;
    grid-template-columns:minmax(100px, .55fr) minmax(0, 1.45fr);
    gap: 12px;
    align-items: center
}

.ship-overview .ship-art {
    display: block;
    height: 85px
}

.ship-overview h2 {
    margin: 4px 0;
    font: 600 1.65rem var(--display)
}

.ship-overview .ship-stats {
    margin: 9px 0 0
}

.yard-card .module-state, .work-price, .role-xp, .job-meta {
    font: .72rem/1.55 var(--mono);
    color: var(--dim)
}

.yard-card .module-state {
    color: var(--teal);
    margin-top: 5px
}

.work-price {
    margin-bottom: 7px
}

.module-actions {
    display: grid;
    gap: 6px
}

.yard-away {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    background: #28231e;
    border: 1px solid #524537;
    border-radius: 4px;
    padding: 12px 15px;
    margin-top: 12px
}

.yard-away p {
    font-size: .84rem;
    line-height: 1.4;
    color: #e5d4c0
}

.yard-away button {
    flex-shrink: 0
}

.job-list, .role-list {
    display: grid;
    gap: 10px
}

.job-list article h2 {
    font: 600 1.25rem var(--display);
    margin: 5px 0
}

.job-list .button-row, .detail-box .button-row, .quote-dialog .button-row {
    margin-top: 12px
}

.job-meta {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.job-meta span {
    color: var(--amber)
}

.role-list {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    margin-top: 12px
}

.role-list .yard-card p {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 8px 0 0
}

.role-xp {
    color: var(--teal);
    white-space: nowrap
}

.quote-dialog {
    padding: 23px;
    color: var(--ink);
    border: 1px solid #516066;
    border-radius: 6px;
    background: #15212a;
    max-width: min(410px, 93vw)
}

.quote-dialog::backdrop {
    background: #000a
}

.quote-dialog h2 {
    font: 600 1.4rem var(--display);
    margin: 12px 0
}

.quote-dialog p {
    margin-top: 12px
}

.quote-dialog .button-row {
    justify-content: end
}

@media (max-width: 1000px) and (min-width: 691px) {
    .navigation button {
        padding-inline: 6px
    }

    .navigation {
        gap: 0
    }

    .navigation button svg {
        width: 16px
    }

    .topbar {
        gap: 5px
    }
}

@media (max-width: 460px) {
    .navigation svg {
        display: none
    }

    .navigation button {
        font-size: .77rem
    }

    .role-list {
        grid-template-columns:1fr
    }

    .service-list {
        grid-template-columns:1fr
    }

    .yard-away {
        display: block
    }

    .yard-away button {
        margin-top: 9px
    }
}

.people {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 12px 0
}

.people span {
    border: 1px solid #365249;
    border-radius: 3px;
    padding: 3px 7px;
    color: var(--teal);
    font-size: .76rem
}

.hub-scroll {
    overflow: auto;
    max-height: 210px;
    min-height: 60px;
    border-block: 1px solid var(--line);
    padding: 9px 0;
    margin: 10px 0
}

.hub-message {
    display: flex;
    gap: 9px;
    font-size: .84rem;
    line-height: 1.45;
    margin: 5px 0
}

.hub-message time {
    color: var(--dim);
    font: .69rem/1.8 var(--mono)
}

.hub-message span {
    overflow-wrap: anywhere
}

.hub-message strong {
    color: var(--teal)
}

.hub input {
    flex: 1;
    min-width: 0;
    max-width: unset;
    background: #0b151d;
    border: 1px solid #41525c;
    color: var(--ink);
    border-radius: 4px;
    padding: 9px 12px
}

@media (max-width: 500px) {
    .hub-shortcut {
        font-size: 0 !important;
        position: relative;
        min-width: 32px
    }

    .hub-shortcut::after {
        content: "⌾";
        font: 1.15rem var(--mono)
    }
}

.module-effect {
    font-size: .76rem;
    line-height: 1.4;
    color: var(--teal);
    margin-bottom: 9px
}

.sector-status {
    width: max-content;
    max-width: 100%;
    background: #08131b99;
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: -5px
}

.locale-picker{color:var(--ink);font:600 .75rem var(--mono);border:1px solid #3b4c57;border-radius:3px;min-width:48px;height:30px;background:#14212a;padding:0 6px}
.navigation [data-view=radio].has-incoming::before{content:"";position:absolute;right:5px;top:14px;border-radius:50%;width:6px;height:6px;background:var(--amber)}
.radio-layout{display:grid;grid-template-columns:minmax(130px,.74fr) minmax(230px,1.7fr);gap:12px}
.radio-contacts,.radio-chat{padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:5px;min-width:0}
.radio-contacts h2,.radio-chat h2{font:600 1.19rem var(--display);margin:0 0 12px}
.radio-peer{display:block;width:100%;min-height:46px;padding:8px;text-align:left;border-left:2px solid transparent}
.radio-peer[aria-pressed=true]{color:var(--teal);background:#182a2d;border-color:var(--teal)}
.radio-peer span,.radio-peer small{display:block;overflow-wrap:anywhere}.radio-peer small{font-size:.72rem;color:var(--dim);margin-top:4px}
.radio-scroll{max-height:min(44vh,430px);min-height:145px;overflow:auto;border-block:1px solid var(--line);margin:13px 0;padding:9px 0}
.chat-line{padding:7px 0;font-size:.85rem;overflow-wrap:anywhere}.chat-line p{line-height:1.45;white-space:pre-wrap}.chat-meta{display:flex;align-items:center;gap:10px}.chat-meta strong{color:var(--teal)}.chat-meta time,.chat-line small,.chat-original summary{color:var(--dim);font-size:.73rem}
.chat-original summary{cursor:pointer;margin:4px 0}.chat-original p{color:var(--muted)}.radio-status{padding:8px;background:#29241d;color:var(--amber);font-size:.83rem;line-height:1.45;margin-bottom:8px}
.radio-chat input{min-width:0;flex:1;background:#0b151d;border:1px solid #41525c;color:var(--ink);border-radius:4px;padding:9px 12px}
@media(min-width:691px) and (max-width:1170px){.topbar{gap:8px}.navigation button{padding-inline:6px;font-size:.8rem}.navigation button svg{width:15px}.account{gap:6px}.net span{display:none}}
@media(max-width:690px){.navigation{overflow-x:auto;gap:8px}.navigation button{flex:1 0 auto}.navigation svg{display:none}.radio-layout{grid-template-columns:1fr}.radio-contacts{display:flex;align-items:stretch;gap:4px;overflow:auto}.radio-contacts h2{display:none}.radio-peer{width:auto;min-width:90px}.locale-picker{min-width:40px;padding:0 3px}.radio-status{font-size:.77rem}}
@media(min-width:691px) and (max-width:850px){.navigation svg{display:none}.topbar{gap:3px}}

.flight-guide {
    padding: 10px clamp(15px, 2.7vw, 50px);
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #405356;
    background: #112128;
    color: #e1e9e7;
}
.flight-guide > svg { width: 21px; height: 21px; flex: none; color: var(--teal); }
.flight-guide strong { display: block; color: var(--teal); font: 600 .72rem/1.35 var(--mono); }
.flight-guide p { margin: 2px 0 0; font-size: .93rem; line-height: 1.4; }
.flight-guide button { margin-inline-start: auto; }
.window:fullscreen .flight-guide { position: absolute; z-index: 2; bottom: 90px; left: 3%; max-width: min(560px,94%); border: 1px solid #405356; }
@media(max-width:560px) {
    .flight-guide { gap: 8px; flex-wrap: wrap; padding: 8px 13px; }
    .flight-guide > div { flex: 1 1 180px; }
}
