/* Empire at War Remake: translucent ledgers, fine frames, a quiet galaxy chart.
   Keep this scoped to navigation and faction information, not the combat bar. */
body.sw48-ui #sw48-faction-status {
 --ledger-line:#748da46b;--ledger-tint:#172a4094;
 display:flex;flex-direction:column;align-items:stretch;gap:0;width:var(--hud-faction-width);
 padding:0;border:1px solid var(--ledger-line);border-radius:0;
 background:linear-gradient(120deg,var(--ledger-tint),#080d17ed);
 box-shadow:inset 0 0 0 1px #080e19,0 1px 4px #0005;
 color:#bed5ea;font-size:12px;line-height:1.35;
}
body.sw48-ui #sw48-faction-status[data-faction="rebellion"] {--ledger-line:#96757378;--ledger-tint:#3a202590;}
body.sw48-ui #sw48-faction-status .faction-identity {
 display:flex;flex-direction:row;justify-content:flex-start;gap:7px;
 padding:6px 9px;min-height:25px;border-bottom:1px solid var(--ledger-line);text-align:left;
}
body.sw48-ui #sw48-faction-status .faction-identity img {width:24px;height:24px;flex:none;}
body.sw48-ui #sw48-faction-status .faction-name {font-size:12px;line-height:1.25;}
.remake-activity-meter {
 display:block;position:relative;flex:none;width:80px;height:10px;overflow:hidden;
 border:1px solid #4f5f405e;background:repeating-linear-gradient(90deg,#12240c 0 6px,#050b08 6px 8px);
 box-shadow:0 0 0 1px #030704;pointer-events:auto;
}
.remake-activity-meter i {display:block;height:100%;background:repeating-linear-gradient(90deg,#69df35 0 6px,#071107 6px 8px);}
body.sw48-ui #sw48-faction-status .remake-activity-meter {margin-left:auto;width:56px;height:8px;}
body.sw48-ui #sw48-faction-status .faction-resources {display:grid;grid-template-columns:1fr 1fr;gap:0;}
body.sw48-ui #sw48-faction-status .faction-total {
 grid-column:1/-1;justify-content:flex-start;gap:7px;max-width:none;padding:6px 9px;
 color:#bfdcf1;border-bottom:1px solid var(--ledger-line);
}
body.sw48-ui #sw48-faction-status .faction-total img {width:15px;height:15px;filter:none;opacity:1;}
body.sw48-ui #sw48-faction-status .faction-total strong {font:500 21px/1 'Bahnschrift','Consolas',monospace;letter-spacing:.04em;}
body.sw48-ui #sw48-faction-status .faction-income {margin-left:auto;color:#b8cdde;font:13px/1.2 'Bahnschrift','Consolas',monospace;white-space:nowrap;}
body.sw48-ui #sw48-faction-status :is(.faction-owned,.faction-members) {
 display:flex;flex-wrap:wrap;justify-content:flex-start;gap:3px 7px;padding:6px 9px;color:#a7bece;font-size:11px;line-height:1.4;
}
body.sw48-ui #sw48-faction-status .faction-members {border-left:1px solid var(--ledger-line);}
body.sw48-ui #sw48-faction-status .faction-separator {display:none;}
body.sw48-ui #sw48-faction-status b {color:#d1e5f1;}

/* The details screen reads as a resource ledger, with real activity as the bars. */
body.sw48-ui #dialog_frame.sw48-faction-dialog {border-radius:0!important;border:1px solid #708b9d!important;background:#090f18f5!important;box-shadow:inset 0 0 0 2px #172231,0 8px 32px #0006;}
#sw48-faction-details {--ledger-line:#637f936b;--ledger-tint:#14283b85;color:#c0d0df;}
#sw48-faction-details[data-faction="rebellion"] {--ledger-line:#8b6b706b;--ledger-tint:#31202a85;}
#sw48-faction-details .faction-details-heading {gap:12px;margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid var(--ledger-line);}
#sw48-faction-details .faction-details-heading>img {width:42px;height:42px;}
#sw48-faction-details .faction-details-heading h1 {font-size:23px;font-weight:500;letter-spacing:.04em;}
#sw48-faction-details .faction-finances {
 gap:0;padding:0;border:1px solid var(--ledger-line);grid-template-columns:1fr 1.4fr;
 background:linear-gradient(110deg,var(--ledger-tint),#090e17ab);
}
#sw48-faction-details .faction-finance-main {padding:14px 18px;gap:6px;border-right:1px solid var(--ledger-line);}
#sw48-faction-details .faction-finance-main strong {font-size:30px;letter-spacing:.07em;color:#bfdef4;}
#sw48-faction-details .faction-finance-stats {gap:0;}
#sw48-faction-details .faction-finance-stats>div {padding:10px 14px;min-width:0;}
#sw48-faction-details .faction-finance-stats>div:nth-child(odd) {border-right:1px solid var(--ledger-line);}
#sw48-faction-details .faction-finance-stats>div:nth-child(n+3) {border-top:1px solid var(--ledger-line);}
#sw48-faction-details dd {font-size:18px;color:#c0def4;overflow-wrap:anywhere;}
#sw48-faction-details .faction-personal {gap:0;margin:14px 0;padding:0;border:1px solid var(--ledger-line);background:#0c1823a8;}
#sw48-faction-details .faction-personal>div {padding:12px 14px;min-width:0;gap:5px;}
#sw48-faction-details .faction-personal>div+div {border-left:1px solid var(--ledger-line);}
#sw48-faction-details .faction-personal strong {font-size:22px;color:#c0def4;overflow-wrap:anywhere;}
#sw48-faction-details .faction-activity .remake-activity-meter {width:min(120px,100%);margin:2px 0 3px;}
#sw48-faction-details .faction-objectives {gap:0;margin-bottom:22px;border:1px solid var(--ledger-line);background:linear-gradient(110deg,var(--ledger-tint),#080e17a8);}
#sw48-faction-details .faction-objectives>div {padding:10px 14px;border:0;background:none;}
#sw48-faction-details .faction-objectives>div+div {border-left:1px solid var(--ledger-line);}
#sw48-faction-details .faction-objectives span {color:#b1c7d8;}
#sw48-faction-details .faction-objectives strong {color:#c0def4;font-size:22px;}
#sw48-faction-details .faction-contribution-section {border:1px solid var(--ledger-line);background:#0a121cab;}
#sw48-faction-details h2 {margin:0;padding:9px 12px;background:var(--ledger-tint);border-bottom:1px solid var(--ledger-line);font-size:15px;}
#sw48-faction-details .faction-contribution-table th {white-space:normal;line-height:1.4;padding:9px 10px;}
#sw48-faction-details .faction-contribution-table td {padding:9px 10px;}
#sw48-faction-details .faction-contribution-table .self {background:#34546b40;}
#sw48-faction-details .faction-allocation-note {margin:12px 0;line-height:1.65;font-size:11px;}
#sw48-faction-details .faction-details-footer {margin-top:18px;padding-top:14px;}

/* One small static texture is shared by all charts; no new render loop. */
.remake-galaxy {opacity:.60;pointer-events:none;}
.remake-chart-frame {fill:none;stroke:#b0c8d9;stroke-opacity:.68;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none;}
body.sw48-ui #sw48-minimap {border-radius:0;border:1px solid #96afc3;background:#090f1e;box-shadow:inset 0 0 0 1px #26394a;}
body.sw48-ui #sw48-minimap .remake-galaxy {opacity:.16;}
body.sw48-ui #sw48-minimap .map-background {fill:#050d17;}
#sw48-minimap .map-sector polygon {stroke:#6d899c;stroke-opacity:.48;stroke-width:.6px;vector-effect:non-scaling-stroke;}
#sw48-minimap .map-small-triangle,#sw48-minimap .mini-resource {paint-order:stroke fill;stroke:#050d17;stroke-width:1.2px;stroke-linejoin:round;vector-effect:non-scaling-stroke;}
#sw48-minimap .map-contact:not([data-faction="neutral"]) .map-small-triangle {stroke:currentColor;stroke-width:1px;}
#sw48-minimap .mini-station {fill:currentColor;fill-opacity:.3;stroke:currentColor;stroke-width:1px;vector-effect:non-scaling-stroke;}
#sw48-minimap .mini-station-wreck {stroke:#8294a1;stroke-dasharray:2 2;stroke-width:.8px;vector-effect:non-scaling-stroke;}
#sw48-minimap .mini-station-core {stroke:currentColor;stroke-width:1px;vector-effect:non-scaling-stroke;}
#sw48-minimap .mini-player-locator {fill:none;stroke:#f1fcff;stroke-opacity:.85;stroke-width:1px;vector-effect:non-scaling-stroke;}
body.sw48-ui #sw48-minimap .map-cardinals {fill:#e0e9f2;paint-order:stroke;stroke:#060c18;stroke-width:1.5px;stroke-linejoin:round;}
#sw48-tactical-map {border-radius:0;border-color:#859eaf;background:#0a101a;}
#sw48-tactical-map header {background:linear-gradient(90deg,#203245b5,#0b111de0);border-bottom-color:#7c98ae80;letter-spacing:.05em;}
#sw48-tactical-map .map-background,#sw48-hyperspace-map .hyperspace-world {fill:#040a16;fill-opacity:.30;}
#sw48-tactical-map .map-boundary,#sw48-hyperspace-map .hyperspace-world-border {stroke:#a4bed0;stroke-width:.25;stroke-opacity:.55;}
#sw48-tactical-map .map-sector text,#sw48-hyperspace-map .map-sector text {paint-order:stroke;stroke:#07101de6;stroke-width:1px;stroke-linejoin:round;}
#sw48-tactical-map .tactical-contact {paint-order:stroke;}
.air-deployment-actions { gap: 6px 10px; }
.air-deployment-actions select {
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    padding: 4px 8px;
    color: #d9ebf7;
    background: #101d2b;
    border: 1px solid #5b7184;
    font: inherit;
}
.air-deployment-actions label { white-space: nowrap; }
@media (max-width: 600px) {
    .air-deployment-actions select { flex: 1 1 11rem; }
}
.map-hologram {pointer-events:none;}
.map-gravity-well circle {fill:none;stroke:#ed625b;stroke-width:.65;vector-effect:non-scaling-stroke;pointer-events:none;}
.map-gravity-well .gravity-boundary {stroke-opacity:.9;stroke-width:1;}
.map-gravity-well .gravity-interference {stroke-opacity:.4;stroke-dasharray:4 3;}
.map-gravity-well .gravity-wave {stroke-opacity:.12;}
#sw48-minimap .map-gravity-well circle {stroke-width:.6;}
.map-hologram-hull {opacity:.96;}
.map-hologram-own .map-hologram-hull {opacity:1;}
#tactical-target-info:not([hidden]) {display:flex;align-items:center;gap:10px;max-width:calc(100% - 24px);}
#tactical-target-info[hidden] {display:none;}
#tactical-target-info .tactical-hull-preview {flex:0 0 76px;width:76px;height:76px;overflow:visible;}
#tactical-target-info span {min-width:0;overflow-wrap:anywhere;}
@media(max-width:600px),(max-height:500px) {
 #tactical-target-info .tactical-hull-preview {flex-basis:48px;width:48px;height:48px;}
 #tactical-target-info:not([hidden]) {gap:6px;padding:4px 7px;font-size:10px;line-height:1.5;}
}
#sw48-hyperspace-map {background:#080f19;}
#sw48-hyperspace-map header {padding:12px 24px;background:linear-gradient(90deg,#213448ae,#0a111c);border-bottom-color:#748fa36b;}
#sw48-hyperspace-map h1 {font-size:20px;letter-spacing:.04em;}
#sw48-hyperspace-map .hyperspace-information {background:linear-gradient(150deg,#192b3b7a,#080f19);border-right-color:#748fa355;}
#sw48-hyperspace-map .hyperspace-current-ship {border-bottom:1px solid #748fa355;padding-bottom:16px;}
#sw48-hyperspace-map .hyperspace-envelope {fill-opacity:.035;stroke:#cae5f2;stroke-width:.35;}
#sw48-hyperspace-map footer {border-top-color:#748fa36b;background:#0d1925;}

/* Like the Remake jump warning: white lettering over the world, no HUD card. */
#hyperspace-countdown {
 width:auto;max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
 display:flex;align-items:baseline;flex-wrap:wrap;gap:0 .35em;padding:0;border:0;border-radius:0;
 color:#fff;background:none;box-shadow:none;font:400 clamp(17px,2vw,28px)/1.35 Arial,'Microsoft YaHei',sans-serif;
 text-shadow:0 1px 3px #000,0 0 5px #0008;pointer-events:none;
}
#hyperspace-countdown .hyperspace-phase {letter-spacing:0;align-self:auto;}
#hyperspace-countdown #hyperspace-seconds {font:inherit;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap;}

@media(max-width:1000px) {
 body.sw48-ui #sw48-faction-status .faction-identity {padding:5px;gap:4px;}
 body.sw48-ui #sw48-faction-status .faction-name {font-size:10px;}
 body.sw48-ui #sw48-faction-status .faction-identity img {width:19px;height:19px;}
 body.sw48-ui #sw48-faction-status .remake-activity-meter {width:clamp(24px,5vw,48px);}
 body.sw48-ui #sw48-faction-status .faction-total {flex-wrap:wrap;justify-content:space-between;gap:4px;padding:5px;}
 body.sw48-ui #sw48-faction-status .faction-total strong {font-size:17px;margin-right:auto;letter-spacing:0;}
 body.sw48-ui #sw48-faction-status .faction-total img {width:12px;height:12px;}
 body.sw48-ui #sw48-faction-status .faction-income {font-size:10px;}
 body.sw48-ui #sw48-faction-status :is(.faction-owned,.faction-members) {justify-content:flex-start;padding:4px 5px;font-size:10px;gap:2px 6px;}
}
@media(max-width:600px) {
 body.sw48-ui #sw48-faction-status .faction-resources {grid-template-columns:minmax(0,1fr);}
 body.sw48-ui #sw48-faction-status .faction-members {border-left:0;border-top:1px solid var(--ledger-line);}
}
@media(max-width:600px) {
 #sw48-faction-details .faction-details-heading {margin-bottom:12px;gap:10px;}
 #sw48-faction-details .faction-details-heading h1 {font-size:20px;}
 #sw48-faction-details .faction-finances {grid-template-columns:1fr;}
 #sw48-faction-details .faction-finance-main {padding:12px;border-right:0;border-bottom:1px solid var(--ledger-line);}
 #sw48-faction-details .faction-finance-main strong {font-size:27px;}
 #sw48-faction-details .faction-finance-stats>div {padding:8px 10px;}
 #sw48-faction-details .faction-personal {grid-template-columns:repeat(2,minmax(0,1fr));}
 #sw48-faction-details .faction-personal>div {padding:10px;}
 #sw48-faction-details .faction-personal>div:nth-child(3) {border-left:0;}
 #sw48-faction-details .faction-personal>div:nth-child(n+3) {border-top:1px solid var(--ledger-line);}
 #sw48-faction-details .faction-objectives>div {padding:8px;}
 #sw48-faction-details .faction-contribution-table {min-width:490px;}
 #sw48-hyperspace-map header {padding:5px 12px;}
 #sw48-hyperspace-map h1 {font-size:17px;}
 #hyperspace-countdown {font-size:17px;}
}
@media(max-height:500px) {#hyperspace-countdown {font-size:17px;}}

/* Compact faction roster: only personal contribution and player ranking. */
body.sw48-ui #dialog_frame.sw48-menu-dialog.sw48-faction-dialog {
 width:min(420px,calc(100vw - 24px));height:auto;min-height:0;
 max-height:min(560px,calc(75dvh - 24px));overflow:hidden;
}
body.sw48-ui #dialog_frame.sw48-menu-dialog.sw48-faction-dialog #dialog_content {
 position:relative;inset:auto;box-sizing:border-box;height:auto;min-height:0;
 max-height:min(558px,calc(75dvh - 26px));padding:16px;overflow:auto;
}
body.sw48-ui #dialog_frame.sw48-menu-dialog.sw48-faction-dialog #x {
 top:6px;right:6px;width:36px;height:36px;
}
#sw48-faction-details .faction-contribution-table thead th:last-child {padding-right:32px;}
#sw48-faction-details .faction-contribution-table tfoot :is(th,td) {border-top:1px solid #819db2;}
#sw48-faction-details .faction-contribution-table {table-layout:fixed;min-width:0;}
#sw48-faction-details .rank-column {width:42px;}
#sw48-faction-details .contribution-column {width:32%;}
#sw48-faction-details .faction-contribution-table td:last-child {overflow-wrap:anywhere;}
@media(max-width:600px) {
 #sw48-faction-details .faction-contribution-table :is(th,td) {padding:9px 6px;}
}

/* Station blockade follows the exact shared sector boundary. */
.map-gravity-sector .gravity-sector-boundary {fill:none;stroke:#b4a176;stroke-opacity:.55;stroke-width:.75;stroke-dasharray:4 6;vector-effect:non-scaling-stroke;stroke-linejoin:round;}
.hyperspace-blockade-hint {color:#b4a176;line-height:1.5;}

.map-blockade-key {color:#b4a176;}
.map-blockade-key::before {content:"";display:inline-block;width:14px;margin-right:5px;border-top:1px dashed #b4a176;vertical-align:middle;opacity:.65;}

.hyperlane-modes{display:flex;gap:8px;margin-bottom:12px}.hyperlane-modes button{background:#101d2a;color:#a7bbca;border:1px solid #496477;padding:8px 12px;cursor:pointer}.hyperlane-modes button.selected{border-color:#94dce3;color:#d4f8fa;background:#203e4b}.hyperlane-help{font-size:12px;line-height:1.6;color:#9ebac8}.hyperlane-network path{fill:none;stroke:#5d9cae;stroke-width:.45;stroke-opacity:.35}.hyperlane-network path.available{stroke:#a0edf3;stroke-width:.7;stroke-opacity:.85}

.hyperlane-waiting{position:absolute;bottom:18%;left:10%;right:10%;text-align:center;color:#c7ecf3;font-size:16px;text-shadow:0 2px 4px #000}
