/* The directory belongs to the hangar on a handheld station terminal. */
.station-phone-label, .station-list-back, .station-phone-context, .assignment-index { display:none; }
.station-handset:has(.panel-screen:not([hidden])) { grid-template-rows:minmax(0,1fr); }
.station-handset:has(.panel-screen:not([hidden])) > .topbar { display:none; }
.station-handset .layout { min-width:0; }
.station-handset :is(#map,.panel-screen).terminal-deck:not([hidden]) {
    --rim:8px;
    display:flex; flex-direction:column; gap:0;
    padding:max(0px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right))
        max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    background:#081b22;
}
.station-handset :is(#map,.panel-screen).terminal-deck::before {
    background:linear-gradient(100deg,#0c2028fa,#08191fed),var(--compact-plate) center/cover;
}
.station-handset :is(#map,.panel-screen).terminal-deck::after,
.station-handset .panel-screen > .station-room { display:none; }
.station-handset dialog[open] > .station-board-head:has(.balance),
.station-handset :is(#map,.panel-screen).terminal-deck > .page-heading {
    position:static; align-self:stretch; display:flex; align-items:center; flex-wrap:wrap;
    gap:4px 8px; padding:2px 0; min-height:48px; margin:0;
    border-bottom:1px solid #39545d; background:transparent;
}
.station-handset :is(#map,.panel-screen).terminal-deck > .page-heading h1 {
    order:1; flex:1; min-width:4ch; margin:0; padding:0;
    font:650 clamp(1rem,3.5vw,1.24rem)/1.12 var(--display); overflow-wrap:anywhere;
}
.station-handset :is(#map,.panel-screen).terminal-deck .page-heading :is(.eyebrow,p,.atlas-census) {display:none}
.station-handset :is(#pilot-board,#bounty-board,#squad-board,#recovery-dialog)[open] > .station-board-head:has(.balance) [data-window-close],
.station-handset :is(#map,.panel-screen).terminal-deck .page-heading :is(.room-return,.station-list-back) {
    position:static; order:0; width:auto; min-width:44px; max-width:39%; min-height:44px; height:auto;
    align-items:center; justify-content:center; gap:6px; padding:5px 9px; margin:0;
    font:600 .86rem/1.15 var(--sans); color:#bcf5e9; background:#102e36;
    border:1px solid #42656d; border-radius:3px; overflow-wrap:anywhere;
}
.station-handset .page-heading .room-return {display:inline-flex}
.station-handset :is(.page-heading :is(.room-return,.station-list-back),.station-board-head:has(.balance) [data-window-close])::before {
    content:''; flex:none; width:.46em; height:.46em; border:solid currentColor; border-width:0 0 2px 2px;
    transform:rotate(45deg);
}
:root[dir=rtl] .station-handset :is(.page-heading :is(.room-return,.station-list-back),.station-board-head:has(.balance) [data-window-close])::before { transform:rotate(225deg); }
.station-handset :is(.page-heading,.station-board-head) .balance {order:2; display:flex; flex:none; margin:0; white-space:nowrap}
.station-handset :is(.page-heading,.station-board-head) .balance svg {stroke:currentColor;fill:none;stroke-width:1.5}
.station-handset #pilot-account-toggle:not([hidden]) {order:3; min-height:44px}
.station-handset .panel-screen.terminal-deck > .terminal-pager {margin:0; padding:3px 0; gap:4px}
.station-handset .panel-screen.terminal-deck > .terminal-pager select {min-height:44px}
.station-handset .panel-screen.terminal-deck > .terminal-pager[data-sections=true] select {display:block;max-width:100%}
.station-handset .panel-screen.terminal-deck > .terminal-pager[data-sections=true] .terminal-tabs {display:none}
.station-handset :is(#map,.panel-screen).terminal-deck > .terminal-viewport {
    flex:1 1 0; min-height:0; margin:4px 0 0; overscroll-behavior:contain;
}
.station-handset :is(.panel-screen:not(.sector-atlas[data-sheet-open=chart]),#squad-board,#pilot-board,#bounty-board,#recovery-dialog:not([data-stage=impact])) > .terminal-viewport {
    overflow:auto; scrollbar-color:#547880 #0a2028;
}
.station-handset :is(.panel-screen:not(.sector-atlas[data-sheet-open=chart]),#squad-board,#pilot-board,#bounty-board,#recovery-dialog:not([data-stage=impact])) > .terminal-viewport > .terminal-flow {
    height:auto; min-height:100%; columns:auto; column-gap:0;
}
.station-handset .terminal-deck :is(.select-card,.tab-button,.secondary,.primary,.qty input) {min-height:44px}
.station-handset .panel-screen .good-select, .station-handset .assignment-index {
    display:flex; flex-direction:column; gap:4px; margin:0;
}
.station-handset .panel-screen .good-select .select-card, .station-handset .assignment-index button {
    display:grid; grid-template:auto / auto minmax(0,1fr) auto; flex:none; align-items:center; gap:8px; text-align:start;
    padding:6px 10px; background:#102b33; border:0; border-inline-start:3px solid #45676d;
}
.station-handset .panel-screen .good-select .select-card svg {grid-row:auto}
.station-handset .assignment-index button {grid-template-columns:minmax(0,1fr) auto}
.station-handset .assignment-index button[aria-pressed=true],
.station-handset .panel-screen .good-select [aria-pressed=true] {background:#322b21; border-color:#e5b978;color:#ffcf8d}
.station-handset :is(.good-select,.assignment-index) .select-card small {margin-inline-start:auto; text-align:end}
.station-handset .assignment-details :is(article:not([data-selected]),.group-title) {display:none}
.station-handset .assignment-details section:not(:has([data-selected])) {display:none}
.station-handset .assignment-details .job-list {display:block}
.station-handset .assignment-index .group-title {margin:5px 0 3px}
.station-handset #market-checkout {flex:none;margin:0;padding:4px 0 0}
.station-handset .trade-box .trade-title {gap:6px; flex-wrap:wrap}
.station-handset .trade-box .trade-title svg {width:28px;height:28px;padding:3px}
.station-handset .trade-box .trade-title h2 {font-size:1.2rem}
.station-handset .trade-box .detail-stats {display:flex;flex-wrap:wrap;gap:4px 14px;padding:5px 0;margin:4px 0}
.station-handset .trade-box .segmented {margin:6px 0}
.station-handset .qty button {min-width:44px}
.station-handset #jobs-bounties {margin:0; margin-inline-start:auto;max-width:46%}
.station-handset #jobs > .terminal-pager select {flex:0 1 auto}
.station-handset .station-phone-context {display:block; color:var(--muted); font-size:.8rem;margin:8px 0 0}
.station-handset :is(#pilot-board,#bounty-board,#squad-board,#recovery-dialog:not([data-stage=impact]))[open] {
    inset:0; margin:0; width:100%; height:100dvh; max-width:none; max-height:none;
    padding:max(7px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right))
        max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); border:0;
}
@media (orientation:portrait) {
    .station-handset #market[data-sheet-open=trade]:not([data-item-open]) :is(.trade-box,#market-checkout),
    .station-handset #jobs:not([data-item-open]) .assignment-details,
    .station-handset #market[data-item-open] .good-select,
    .station-handset #jobs[data-sheet-open=jobs][data-item-open] :is(.assignment-index,#jobs-bounties) {display:none}
    .station-handset :is(#market[data-sheet-open=trade],#jobs[data-sheet-open=jobs])[data-item-open] .page-heading .room-return {display:none}
    .station-handset :is(#market[data-sheet-open=trade],#jobs[data-sheet-open=jobs])[data-item-open] .page-heading .station-list-back {display:inline-flex}
}
@media (orientation:landscape) {
    .station-handset #market[data-sheet-open=trade] :is(.terminal-flow,#market-body,.market-layout) {height:100%}
    .station-handset #jobs[data-sheet-open=jobs]:has(.assignment-browser) .terminal-flow {height:100%;display:flex;flex-direction:column}
    .station-handset #jobs[data-sheet-open=jobs] #jobs-body:has(.assignment-browser) {min-height:0;flex:1}
    .station-handset #market .market-layout, .station-handset #jobs .assignment-browser {
        display:grid; height:100%; grid-template-columns:minmax(0, .85fr) minmax(0,1.4fr); gap:8px;
    }
    .station-handset :is(#market .market-layout,#jobs .assignment-browser) > div {overflow:auto;min-height:0;overscroll-behavior:contain}
    .station-handset #market-checkout {margin-inline-start:calc(37.78% + 5px)}
}

.station-handset dialog[open] .station-board-head:has(.balance) {
    display:grid; grid-template-columns:auto minmax(0,1fr) auto; flex:none;
}
.station-handset .station-board-head:has(.balance) #recovery-kicker,
.station-handset .station-board-head:has(.balance) > svg {display:none}
.station-handset dialog[open] .station-board-head:has(.balance) h2 {
    grid-column:2;grid-row:1; margin:0; font-size:1.1rem; overflow-wrap:anywhere;
}
.station-handset :is(#pilot-board,#bounty-board,#squad-board,#recovery-dialog)[open] > .station-board-head:has(.balance) :is(form,button) {
    grid-column:1; grid-row:1; margin:0;
}
.station-handset :is(#pilot-board,#bounty-board,#squad-board,#recovery-dialog)[open] > .station-board-head:has(.balance) [data-window-close] {
    display:inline-flex; max-width:min(34vw, 11rem);
}
.station-handset :is(.room-return,.station-board-head:has(.balance) [data-window-close]) .station-phone-label:not(:empty) {display:inline}
.station-handset :is(.room-return,.station-board-head:has(.balance) [data-window-close]):has(.station-phone-label:not(:empty)) .room-cross {display:none}
