/* Clear instrument text over pixel artwork. No downloaded fonts required. */
:root { --muted:#bdc7ce; }
#chart-window { width:min(1140px,calc(100vw - 32px)); height:min(680px,calc(100dvh - 48px)); min-width:min(520px,calc(100vw - 32px)); min-height:min(360px,calc(100dvh - 48px)); max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); padding:0; margin:auto; overflow:hidden; resize:both; border:3px solid #8996a3; box-shadow:inset 2px 2px #e2e6e8,inset -2px -2px #162331,8px 8px #0008; }
#chart-window::backdrop { background:#040b124d; }
body:has(#chart-window[open]) { overflow:hidden; }
.chart-shell { display:flex; flex-direction:column; height:100%; padding:3px; }
#chart-titlebar { display:flex; align-items:center; gap:10px; padding:4px 5px 4px 10px; color:#f7f3ec; background:linear-gradient(90deg,#244a69,#162b40); border:1px solid #0c1c2c; font:600 12px Consolas,monospace; cursor:move; touch-action:none; user-select:none; }
#chart-titlebar span { margin-left:auto; color:#c8d1d7; font-size:10px; }
#chart-titlebar button { font:bold 20px/20px Arial; padding:0; width:26px; height:26px; color:#101d29; background:#c4cbd0; border:2px outset #e6e9ec; }
#chart-frame { width:100%; flex:1; min-height:0; border:0; background:#0b1118; }
@media(max-width:600px) { #chart-titlebar span { display:none; } #chart-titlebar button { margin-left:auto; } }
.system-location { padding:12px; border-bottom:2px solid #52606c; background:#14232d; }
.system-location h2 { color:#f4c978; margin:5px 0; font-size:18px; }
.system-location p { font-size:12px; line-height:1.5; margin:4px 0; }
.system-actions { display:grid; gap:6px; margin-top:8px; }
.system-actions button { font-size:12px; padding:7px; }
#voyage-result:empty { display:none; }
.station-tools { display:grid; gap:6px; padding:10px; }
.station-tools button { font-size:12px; }
.station-tools p,.crew-station { color:#e2c987; font-size:11px; line-height:1.5; margin-top:5px; }
.room-inspector .station-summary { font-size:11px; color:#e2c987; }
.room-inspector button { margin-left:0; }
.module-levels { display:flex; gap:3px; }
.module-levels i { font-style:normal; color:#8de1c0; }
.power-pips i.damaged,.module-levels i.damaged { background:#512b30; color:#ffb2a1; border-color:#d87865; font:11px/11px Consolas; text-align:center; }
.jumping .deck-tag,.jumping .deck-scale,.jumping #deck-tooltip { visibility:hidden; }
@media(max-width:950px) { .contact-panel { display:block; } }
#run-link-value { display:block; width:100%; padding:12px; margin:8px 0; border:1px solid #7f8b9a; background:#0b1118; color:#f7f3ec; font:13px/1.5 Consolas,monospace; }
#run-link-dialog label { display:block; margin-top:18px; color:#f4c978; }
body { font-family:'Segoe UI',Arial,sans-serif; font-size:14px; }
button { font-family:inherit; font-weight:600; }
button:disabled { opacity:1; color:#88949f; background:#18222d; border-color:#37434f; box-shadow:none; }
.panel-heading h2,.panel-heading>span,.eyebrow { font:600 11px/1.35 Consolas,monospace; letter-spacing:1px; }
.masthead nav button,#motion { font-size:12px; color:#d8d2c7; }
.masthead { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); column-gap:12px; height:auto; }
.masthead .wordmark { grid-column:1; justify-self:start; }
.masthead .edition { grid-column:2; display:flex; align-items:center; justify-self:center; gap:9px; color:#d8d2c7; font:600 11px/1.4 Consolas,monospace; letter-spacing:1.5px; text-decoration:none; white-space:nowrap; }
.edition img { width:36px; height:36px; object-fit:contain; }
.edition:hover { color:#f4c978; }
.masthead nav { grid-column:3; justify-self:end; margin-left:0; gap:3px; }
.masthead nav button { padding:6px 7px; white-space:nowrap; }
@media(max-width:1200px) {
 .masthead { row-gap:4px; }
 .masthead nav { grid-column:1/-1; grid-row:2; justify-self:center; flex-wrap:wrap; justify-content:center; }
}
@media(max-width:600px) {
 .masthead { grid-template-columns:1fr; }
 .masthead .wordmark { grid-column:1; justify-self:center; }
 .masthead .edition { grid-column:1; grid-row:2; }
 .masthead nav { grid-column:1; grid-row:3; }
}
.overview .eyebrow,.readouts span { font-size:11px; letter-spacing:1px; }
.readouts strong { font-size:24px; }
.readouts small { font-size:12px; }
.readouts>div { min-width:110px; }
.hint { font-size:12px; line-height:1.5; color:#bdc7ce; padding:8px 10px; }
.crew-name { font-size:15px; font-weight:600; }
.crew-meta,.crew-task { font-size:12px; color:#d5dde0; line-height:1.4; }
.crew-card { padding:9px 7px; }
#crew-detail { font-size:12px; line-height:1.55; color:#bdc7ce; }
#crew-detail .hint { padding:8px 0; }
#selection-status { font:600 11px/1.5 'Segoe UI',sans-serif; margin:0 10px 10px; }
.view-tabs button,.view-buttons button { font-size:12px; padding:6px 8px; }
.room-shortcuts { gap:4px; }
.room-shortcuts button { font-size:12px; padding:5px 7px; }
.room-inspector,.room-inspector strong,.room-inspector button { font-size:12px; }
.ship-panel { container-type:inline-size; }
.room-inspector { display:grid; grid-template-columns:minmax(0,1fr) 222px; align-items:center; gap:8px; height:44px; min-height:44px; padding:4px 9px; }
.room-readout { min-width:0; }
.room-condition { display:flex; align-items:center; gap:7px; height:18px; white-space:nowrap; }
.room-condition strong { flex-shrink:0; }
.room-condition .module-levels { flex-shrink:1; min-width:0; overflow:hidden; }
.room-condition .module-levels i { min-width:0; }
.room-readout .station-summary { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; line-height:17px; }
.room-actions { display:grid; grid-template-columns:126px 90px; gap:6px; align-items:center; }
.room-inspector .room-actions button { height:26px; min-height:0; padding:0 5px; margin:0; line-height:24px; font-size:11px; white-space:nowrap; box-shadow:none; }
@container (max-width:660px) {
 .room-inspector { height:76px; min-height:76px; grid-template-columns:minmax(0,1fr); grid-template-rows:35px 26px; gap:5px; }
 .room-actions { justify-self:end; }
}
.transport>span,#save-state { font:11px/1.4 Consolas,monospace; color:#bdc7ce; }
.pause-button { font-size:13px; }
#pause-overlay { font:bold 12px/1.35 Consolas,monospace; letter-spacing:1px; background:#0b1118ed; }
#deck-tooltip { font:13px/1.4 'Segoe UI',sans-serif; background:#0b1118; }
.deck-tag,.deck-scale { font-size:9px; color:#bec8ce; letter-spacing:.6px; text-shadow:0 1px 3px #000; }
#enemy-type { font-size:10px; letter-spacing:.5px; color:#d8d2c7; }
.enemy-name { font-size:16px; }
.enemy-hull { font:11px/1.4 Consolas,monospace; }
.empty-contact { font-size:13px; }
.target-buttons button { font-size:12px; padding:6px 3px; }
.weapon-name { font-size:14px; }
.weapon-actions button,.escape-button,.encounter-actions button,.encounter-actions button span { font-size:12px; }
.power-name { font-size:13px; font-weight:600; }
.power-name span { font-size:11px; }
.power-status { font-size:10px; letter-spacing:0; }
.power-control button { width:26px; height:25px; font-size:17px; }
#log { max-height:85px; }
#log li { font-size:12px; line-height:1.5; color:#d0d8df; }
#log time { font-size:11px; color:#aab8c3; }
#log .bad { color:#ffb4a6; } #log .good { color:#b2dfcb; }
footer,footer button { font-size:10px; color:#b1bec8; }
dialog p,dialog li { font:14px/1.75 'Segoe UI',sans-serif; color:#d1d9df; }
.chart-heading h2 { font-size:19px; }
.chart-heading .eyebrow { font-size:11px; color:#d8d2c7; }
#voyage-resources { font-size:12px; }
#destination-copy { font-size:13px; }
#destination-copy strong { font-size:17px; }
.travel-actions button,#voyage-result { font-size:12px; }
.map-legend { font-size:10px; }
.galaxy-screen { overflow-y:auto; scrollbar-width:thin; scrollbar-color:#627087 #0b1118; }
.chart-heading { flex-shrink:0; }
.star-map { flex-shrink:0; min-height:200px; }
@media(min-width:901px) {
 main { grid-template-rows:64px minmax(0,1fr) 126px 24px; }
 .command-grid { grid-template-columns:210px minmax(0,1fr) 250px; }
 .lower-grid { grid-template-columns:minmax(0,1fr) 330px; }
 .lower-grid .panel-heading { min-height:30px; }
 .power-item { padding:0 8px; }
 .power-control { gap:5px; }
 .contact-visual { height:85px; } #enemy { height:80px; }
}
@media(min-width:901px) and (max-width:1100px) {
 .command-grid { grid-template-columns:180px minmax(0,1fr) 220px; }
 .lower-grid { grid-template-columns:minmax(0,1fr) 250px; }
 .view-tabs button,.view-buttons button { padding:5px; }
 .ship-panel>.panel-heading { flex-wrap:wrap; gap:4px; }
 .power-item { padding:0 4px; }
}
@media(max-width:900px) {
 .command-grid { grid-template-columns:190px minmax(0,1fr); }
 .ship-panel { height:620px; }
 .crew-panel { max-height:620px; }
 .readouts>div { min-width:75px; }
 .readouts span { font-size:10px; }
 .view-tabs button,.view-buttons button { font-size:12px; }
 .ship-panel>.panel-heading { flex-wrap:wrap; }
 .lower-grid .panel-heading { min-height:32px; }
 .systems-panel { min-height:140px; }
}
@media(max-width:600px) {
 .masthead nav button,#motion { font-size:12px; }
 .readouts>div { min-width:0; }
 .room-shortcuts button { font-size:12px; }
 .transport>span { font-size:11px; }
 .crew-panel { max-height:320px; }
 .systems-panel { min-height:210px; }
 .chart-heading h2 { font-size:16px; }
 #voyage-resources { font-size:11px; }
}
#story-event{padding:12px;background:#172933;border-bottom:2px solid #a88a51}#story-event h2{font:600 18px/1.3 'Segoe UI',sans-serif;color:#f4cf8b;margin:8px 0}#story-text{font:13px/1.6 'Segoe UI',sans-serif;white-space:pre-line}#story-choices{display:grid;gap:7px}#story-choices button{padding:9px;text-align:left;font-size:12px}#story-choices small{display:block;margin-top:4px;font-size:11px;color:#d6bf91}#content-status{font-size:11px;color:#f1c57e;padding:0 12px}#content-status:empty{display:none}

.contact-visual{height:142px}#enemy{height:128px}#enemy-type{font-size:8px;letter-spacing:.2px;right:8px;line-height:1.4}#recruit-options{grid-template-columns:1fr}
@media(max-width:600px){.contact-panel .contact-visual{display:block}}

.crew-perk{border-left:2px solid #d3b66c;padding:6px 8px;margin-bottom:13px;background:#172332}.crew-perk strong{display:block;color:#f0d598;font-size:12px;margin-top:5px}.crew-perk p{font-size:11px;line-height:1.5;margin:6px 0 0;color:#c5d5df}.crew-background{font-size:10px;line-height:1.5;color:#b4c8d5;margin:5px 0 9px}.skill{align-items:center;padding:4px 0}.skill small{display:block;color:#93afc2;font-size:10px;margin-top:3px}.skill b{color:#e8c680}.recruit-option small{line-height:1.5}
