:root {
    color-scheme: dark;
    --bg-dark: #0d0d0f;
    --bg-panel: #151518;
    --bg-panel-header: #1a1a1e;
    --border: #2a2a30;
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #4a9eff;
    --c1: #c45c26;
    --c2: #d4a017;
    --wormhole: #6b5b95;
    --combat: #c44;
    --relic: #4a9;
    --ore: #a84;
    --gas: #4a8;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    background: var(--bg-dark);
    color: var(--text);
    overflow: hidden;
    color-scheme: dark;
}

#app {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

* {
    box-sizing: border-box;
}

/* Native controls default to the OS light theme unless we opt the document in.
   color-scheme covers pickers/scrollbars; these rules catch unclassed fields. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=button]):not([type=submit]):not([type=reset]):not([type=image]):not([type=color]),
select,
textarea {
    background-color: #141418;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
    color-scheme: dark;
}
input::placeholder,
textarea::placeholder {
    color: #6a6a74;
    opacity: 1;
}
select option,
select optgroup {
    background-color: #141418;
    color: var(--text);
}
input[type=checkbox],
input[type=radio] {
    accent-color: #c9a227;
    color-scheme: dark;
}

/* FocusOnNavigate focuses h1 after each SPA route. Keep the move for a11y; hide the box. */
h1:focus, h1:focus-visible { outline: none; }

.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
}
.page-root > .app-shell,
.page-root > .home-page,
.page-root > .ops-page,
.page-root > .account-page {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    width: 100%;
}

.top-bar {
    height: 42px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 10px 0 12px;
    gap: 10px;
    flex-shrink: 0;
}

.top-bar .brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: .06em;
    color: #e8e0c8;
    text-decoration: none;
}
.top-bar .brand img {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    flex-shrink: 0;
}
.top-bar .brand:hover { color: #f3d27a; }
.header-map-name {
    color: #c8b88a;
    font-size: 13px;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
    border-right: 1px solid #2a2a30;
}
.header-map-switch { position: relative; flex-shrink: 1; min-width: 0; }
.header-map-switch .header-map-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    border-right: 1px solid #2a2a30;
    cursor: pointer;
    font: inherit;
    color: #c8b88a;
    padding: 4px 10px 4px 4px;
    max-width: 260px;
}
.header-map-switch .header-map-name:hover,
.header-map-switch .header-map-name.open { color: #f3d27a; }
.header-map-caret { font-size: 10px; opacity: 0.7; }
.header-map-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 10040;
    min-width: 240px;
    max-width: 320px;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    background: #15151c;
    border: 1px solid #34344a;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.55);
    padding: 6px;
}
.header-map-empty { color: #888; font-size: 12px; padding: 8px; }
.header-map-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #e8e8ef;
    padding: 7px 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}
.header-map-item:hover { background: #1e1e28; }
.header-map-item.on { background: #241c10; color: #f3d27a; cursor: default; }
.header-map-item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-map-item-meta { font-size: 11px; color: #888; }
.header-map-links {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #2a2a34;
}
.header-map-item.link { color: #c8b88a; font-weight: 600; }

.top-bar .status {
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-shrink: 0;
}

.header-chars {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}
.header-char {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 8px 0 3px;
    border: 1px solid #2a2a32;
    border-radius: 14px;
    background: #141418;
    color: #d8d4c8;
    font: inherit;
    font-size: 12px;
    max-width: 220px;
    cursor: pointer;
    flex-shrink: 1;
}
.header-char.primary { border-color: #5a4a20; }
.header-char.online { color: #e8e0c8; }
.header-char.offline { opacity: .45; cursor: default; }
.header-char.overflow.offline { opacity: 1; }
.header-char.overflow.offline .header-char-focus { opacity: .45; }
.header-char-track {
    flex-shrink: 0;
    height: 22px;
    padding: 0 8px;
    border: 1px solid #2a2a32;
    border-radius: 11px;
    background: #101014;
    color: #888;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}
.header-char:hover:not(:disabled) { border-color: #e6a817; color: #fff; }
.header-char-por {
    width: 22px; height: 22px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.header-char-ship {
    width: 18px; height: 18px; border-radius: 3px;
    background: #1c1c22; flex-shrink: 0;
}
.header-char-ship.empty {
    display: inline-block; opacity: .35;
    background: repeating-linear-gradient(135deg, #222 0 4px, #1a1a1e 4px 8px);
}
.header-char-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.header-char-more-wrap { position: relative; flex-shrink: 0; }
.header-char-more {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #2a2a32;
    border-radius: 14px;
    background: #141418;
    color: #c8c8c8;
    font: inherit; font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.header-char-more.active, .header-char-more:hover { border-color: #e6a817; color: #f3d27a; }
.header-char-overflow {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 10040;
    min-width: 280px;
    max-height: min(70vh, 480px);
    overflow-y: auto;
    padding: 6px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0,0,0,.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.header-char.overflow {
    max-width: none;
    height: auto;
    padding: 4px 6px 4px 4px;
    border-radius: 6px;
    justify-content: flex-start;
    gap: 4px;
    cursor: default;
}
.header-char.overflow.untracked { opacity: .7; }
.header-char-focus {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 0;
    text-align: left;
}
.header-char-focus:disabled { cursor: default; }
.header-char-track.on {
    border-color: #5a4a20;
    color: #e6c86a;
}
.header-char-track:hover:not(:disabled) { border-color: #e6a817; color: #f3d27a; }
.header-char-overflow-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 6px 6px;
    font-size: 11px;
    color: #c8c4b8;
}
.header-char-overflow-hint { color: #666; }
.header-char-overflow-err {
    padding: 4px 6px 6px;
    color: #c66;
    font-size: 11px;
}
.header-char-overflow-link {
    display: block;
    padding: 6px 8px 2px;
    color: #e6c86a;
    font-size: 11px;
    text-decoration: none;
}
.header-char-overflow-link:hover { color: #f3d27a; }
.header-char-sys {
    margin-left: auto;
    color: #888;
    font-size: 11px;
    padding-left: 10px;
}
@media (max-width: 1100px) {
    .header-char-name { display: none; }
    .header-char { padding-right: 4px; max-width: none; }
}
@media (max-width: 780px) {
    .header-char-ship { display: none; }
}

.live-panel { top: 46px; }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
}

.live-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #c8c8c8;
    font: inherit;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.live-toggle:hover, .live-toggle.active {
    border-color: #2a2a30;
    background: #1a1a22;
    color: #fff;
}
.alerts-bell {
    width: 15px;
    height: 15px;
    display: block;
    flex-shrink: 0;
}
.live-counts {
    color: #888;
    font-size: 11px;
    font-weight: 500;
}
.live-ping {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    min-width: 3.2em;
}
.sig-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.sig-bar {
    display: block;
    width: 3px;
    border-radius: 1px;
    background: #3a3a44;
}
.sig-bar:nth-child(1) { height: 4px; }
.sig-bar:nth-child(2) { height: 7px; }
.sig-bar:nth-child(3) { height: 10px; }
.sig-bar:nth-child(4) { height: 12px; }
.sig-bar.on { box-shadow: 0 0 6px currentColor; }
.live-panel {
    position: absolute;
    top: 40px;
    right: 12px;
    z-index: 120;
    width: 320px;
    max-height: min(70vh, 520px);
    overflow: auto;
    padding: 10px 12px 12px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    font-size: 12px;
}
.notify-panel {
    width: 360px;
    max-height: min(78vh, 640px);
    right: 12px;
}
.notify-panel .hook-flags { margin: 4px 0; }
.live-sec-head {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 4px;
    font-weight: 600;
    color: #c8c0a8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.live-empty { color: #666; padding: 4px 0 6px; }
.live-roster { display: flex; flex-direction: column; gap: 3px; }
.live-person {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    text-align: left;
}
.live-person.click { cursor: pointer; }
.live-person.click:hover { background: #1e1e24; }
.live-person img { border-radius: 3px; flex-shrink: 0; }
.live-person-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-person-tag { color: #888; font-size: 11px; flex-shrink: 0; }

.live-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e8e0c8;
}
.live-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
}
.live-row .label { color: #888; }
.live-state.ok { color: #2ecc71; }
.live-state.warn { color: #f3d27a; }
.live-state.bad { color: #e07070; }
.esi-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 0 5px;
    border-radius: 3px;
    line-height: 16px;
}
.esi-badge.degraded { background: #3a3010; color: #f3d27a; }
.esi-badge.down { background: #3a1010; color: #e07070; }
.live-reconnect {
    width: 100%;
    margin-top: 10px;
    padding: 6px 8px;
    border: 1px solid #5a4a20;
    border-radius: 4px;
    background: #1a1610;
    color: #f3d27a;
    cursor: pointer;
}

.workspace {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.center-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.map-area {
    flex: 1;
    position: relative;
    background: #0a0a0c;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.map-area input,
.map-area textarea {
    user-select: text;
    -webkit-user-select: text;
}

.map-area.panning {
    cursor: grabbing;
}

.map-viewport {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-origin: 0 0;
    z-index: 1;
}

.map-grid {
    display: none; /* SVG point grid used instead */
}

.system-node {
    position: absolute;
    min-width: 110px;
    background: #1e1e24;
    border: 1px solid #3a3a45;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: move;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    z-index: 10;
    transition: border-color 0.15s;
}

.system-node:hover {
    border-color: var(--accent);
}



.system-node .sys-name {
    font-weight: 600;
    font-size: 13px;
}

.system-node .sys-class {
    display: inline-block;
    background: var(--c1);
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
}

.system-node .sys-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.connection-line {
    stroke: #5a5a70;
    stroke-width: 2;
    fill: none;
}

.connection-line.eol {
    stroke: #c44;
    stroke-dasharray: 6 4;
}

/* Full-height right sidebar (resizable / collapsible sections) */
.right-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    user-select: none;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-section.is-collapsed {
    flex: 0 0 auto !important;
}

.sidebar-section-header {
    background: var(--bg-panel-header);
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border-bottom: 1px solid transparent;
}

.sidebar-section-header:hover {
    color: #c8c8d0;
    background: #1a1a22;
}

.sidebar-chevron {
    width: 12px;
    color: #6a6a78;
    font-size: 10px;
}

.sidebar-title { flex: 1; }
.sidebar-meta {
    font-weight: 500;
    font-size: 10px;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
}

.sidebar-section-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    font-size: 11px;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #3a3a48 transparent;
}

.sidebar-section-body::-webkit-scrollbar { width: 8px; }
.sidebar-section-body::-webkit-scrollbar-thumb {
    background: #3a3a48;
    border-radius: 4px;
}
.sidebar-section-body::-webkit-scrollbar-thumb:hover { background: #4a4a5a; }
.sidebar-section-body::-webkit-scrollbar-track { background: transparent; }

.sidebar-section-body .empty-state {
    padding: 12px;
}

.sidebar-resize-handle {
    height: 5px;
    flex-shrink: 0;
    cursor: row-resize;
    background: transparent;
    position: relative;
    z-index: 2;
}
.sidebar-resize-handle::after {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    top: 1px;
    height: 2px;
    border-radius: 1px;
    background: #2a2a34;
}
.sidebar-resize-handle:hover::after,
.sidebar-resize-handle:active::after {
    background: #4a9eff;
}

/* Bottom panels (System Info / Signatures) — under map only */
.panel {
    border-bottom: 1px solid var(--border);
}

.panel-header {
    background: var(--bg-panel-header);
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.panel-body {
    padding: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a48 transparent;
}

.bottom-panels {
    height: 240px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    display: flex;
    flex-shrink: 0;
    min-height: 120px;
    overflow: hidden;
}

.bottom-left {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.bottom-center {
    flex: 1 1 0;
    min-width: 180px;
    max-width: none;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.bottom-kills {
    flex: 0 0 36%;
    width: 36%;
    max-width: 560px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-left: 1px solid var(--border);
}

.panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a48 transparent;
}
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-thumb {
    background: #3a3a48;
    border-radius: 4px;
}

.bottom-left .panel-body {
    scrollbar-width: thin;
    scrollbar-color: #3a3a48 transparent;
}

/* Killboard list (Pathfinder-style rows → zKillboard) */
.kill-list { padding: 0; }
.kill-row {
    /* L→R: victim trio | ship | name/time/att | ISK+badges | final-blow trio */
    display: grid;
    grid-template-columns: auto 44px minmax(0, 1fr) 7.5rem auto;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border: 0;
    border-bottom: 1px solid #1a1a22;
    color: #ccc;
    text-decoration: none;
    font-size: 11px;
    width: 100%;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.kill-row:hover { background: #1e1e28; color: #eee; }
.kill-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 400;
}
.kill-chip {
    border: 1px solid #2e2e3a;
    background: #16161c;
    color: #9a9aa6;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    cursor: pointer;
}
.kill-chip.is-on {
    border-color: #c4a35a;
    color: #f0d78c;
    background: #2a2314;
}
.kill-sep { width: 1px; height: 12px; background: #2e2e3a; margin: 0 2px; }
.kill-npc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #8a8a96;
    font-size: 10px;
    cursor: pointer;
}
.kill-sub {
    padding: 2px 10px 4px;
    font-size: 10px;
    color: #6a6a74;
}
.kill-sys {
    color: #b8c4d4;
    font-size: 11px;
    margin-right: 4px;
}
.kill-drawer {
    position: absolute;
    right: 0;
    bottom: 0;
    top: auto;
    height: 50%;
    max-height: none;
    width: min(560px, 36%);
    min-width: min(380px, 100%);
    background: #121218;
    border: 1px solid #2a2a34;
    border-right: 0;
    border-bottom: 0;
    border-radius: 8px 0 0 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: -10px -8px 28px rgba(0,0,0,.5);
    overflow: hidden;
}
.kill-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #e8e8ef;
    border-bottom: 1px solid #1e1e28;
}
.kill-drawer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
    padding: 10px 12px 8px;
}
.kill-drawer-age {
    font-size: 18px;
    font-weight: 700;
    color: #e8e8ef;
    letter-spacing: .01em;
}
.kill-drawer-isk {
    font-size: 20px;
    font-weight: 700;
    color: #f0c040;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(240, 192, 64, 0.25);
}
.kill-drawer-victim {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 8px;
}
.kill-drawer-fb {
    border-top: 1px solid #2a2a32;
    padding-top: 8px;
}
.kill-drawer-victim .kill-ship {
    width: 36px;
    height: 36px;
}
.kill-drawer-vname {
    font-size: 13px;
    font-weight: 600;
    color: #e8e8ef;
}
.kill-drawer-vsub {
    font-size: 11px;
    color: #8a8a96;
}
.kill-drawer-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 12px 8px;
}
.kill-agg-label {
    padding: 10px 10px 4px;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6a6a74;
}
.kill-agg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 8px;
    row-gap: 1px;
    padding: 0 8px 4px;
}
.kill-agg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px;
    font-size: 12px;
    color: #d0d0d8;
    min-width: 0;
}
.kill-agg-grid .kill-agg-row {
    padding: 3px 4px;
    gap: 5px;
}
.kill-agg-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kill-agg-n {
    min-width: 1.6rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #f0d78c;
}
.kill-agg-kind {
    margin-left: auto;
    font-size: 10px;
    color: #6a6a74;
}
.kill-drawer-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.kill-drawer-zkill {
    margin: 12px 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #3a3428;
    background: #1a1814;
    color: #c4b08a;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
}
.kill-drawer-zkill img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}
.kill-drawer-zkill:hover {
    border-color: #6a5a38;
    color: #e6d4a8;
    background: #221e18;
}
.kill-ship {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: #121218;
    object-fit: contain;
    display: block;
}
.kill-col-text {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}
.kill-col-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    width: 7.5rem;
    flex-shrink: 0;
    overflow: hidden;
}
.kill-ship-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #e8e8ef;
    line-height: 1.25;
    max-width: 100%;
}
.kill-value {
    color: #f0c040;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(240, 192, 64, 0.25);
    white-space: nowrap;
    line-height: 1.25;
    text-align: right;
}
.kill-info {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-height: 14px;
    white-space: nowrap;
    overflow: hidden;
}
.kill-time, .kill-att {
    color: #8a8a96;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}
.kill-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 4px;
    justify-content: flex-end;
    align-items: center;
    max-width: 100%;
}
.kill-entities {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    /* portrait 36 + gap 4 + corp 28 + gap 4 + alliance 28 = fixed trio width */
    width: 100px;
    min-width: 100px;
}
.kill-portrait {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #2a2a34;
    background: #0c0c10;
    object-fit: cover;
    display: block;
}
.kill-portrait-empty {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px dashed #2a2a34;
    background: #121218;
}
.kill-logo-empty {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    border: 1px dashed #2a2a34;
    background: #121218;
    flex-shrink: 0;
    box-sizing: border-box;
}
.kill-logo {
    width: 28px;
    height: 28px;
    border-radius: 3px;
    background: #121218;
    object-fit: contain;
    border: 1px solid #2a2a34;
    display: block;
}
.kill-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.3;
}
.kill-badge.solo { background: #2a3a4a; color: #7ec8ff; }
.kill-badge.npc { background: #2a2a34; color: #999; }
.kill-badge.gate { background: #3a2a10; color: #f0a030; }
.kill-badge.sb { background: #3a1020; color: #f06080; }
.kill-badge.hic { background: #20103a; color: #c080ff; }
.kill-badge.dic { background: #10302a; color: #40d0a0; }
.kill-badge.bubble { background: #102030; color: #60b0f0; }
.system-node.kill-pulse > rect:first-of-type,
.system-node.kill-pulse {
    animation: killPulse 1.2s ease-in-out infinite;
}
@keyframes killPulse {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50% { filter: drop-shadow(0 0 6px #e74c3c); }
}

.sig-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.sig-table th {
    text-align: left;
    padding: 4px 8px;
    background: var(--bg-panel-header);
    color: var(--text-muted);
    font-weight: 500;
    position: sticky;
    top: 0;
}
.sig-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.sig-th-sort:hover { color: #def; }
.sig-th-sort.on { color: #d8e4f0; }

.sig-table td {
    padding: 3px 8px;
    border-bottom: 1px solid #1f1f24;
}

.sig-table tr:hover {
    background: #1a1a20;
}

.sig-type-combat { color: #e66; }
.sig-type-relic { color: #6c9; }
.sig-type-ore { color: #c96; }
.sig-type-gas { color: #6ac; }
.sig-type-wormhole { color: #a8a; }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 12px;
}

.info-row .label {
    color: var(--text-muted);
}
.adm-val {
    color: #d4c4a0;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.feat-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.feat-chip {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid var(--border);
}
.feat-chip.a0 { color: #2a2208; background: #f4d35e; border-color: #c9a227; }
.feat-chip.ice { color: #c5e8ff; background: #142028; border-color: #7eb8d8; }

.sys-ext-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}
.sys-ext-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #2a2a30;
    border-radius: 6px;
    background: #121218;
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none;
}
.sys-ext-links a img,
.sys-ext-links a .sys-ext-mark {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: contain;
    display: block;
}
.sys-ext-links a:first-child {
    border-color: #2a5a66;
}
.sys-ext-links a:hover {
    border-color: #4a9eff;
}
.sys-ext-links a:first-child:hover {
    border-color: #3db8d3;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.zoom-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: #25252c;
    border-color: var(--accent);
}

.toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 20;
}

.tool-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.tool-btn:hover, .tool-btn.active {
    background: #25252c;
    border-color: var(--accent);
}

.empty-state {
    color: var(--text-muted);
    font-size: 12px;
    padding: 12px;
    text-align: center;
}

.login-shell {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; background: #0d0d0f; color: #e0e0e0;
}
.login-card {
    background: #151518; border: 1px solid #2a2a30; border-radius: 10px;
    padding: 40px 48px; width: 380px; text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #e8e0c8;
    margin-bottom: 6px;
}
.login-brand img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
}
.login-subtitle { color: #888; font-size: 14px; margin-bottom: 28px; }
.login-note { font-size: 13px; color: #aaa; line-height: 1.5; margin-bottom: 28px; }
.login-actions { display: flex; flex-direction: column; gap: 10px; }
.login-btn {
    display: block; padding: 10px 16px; border-radius: 6px; font-size: 14px;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.login-btn.primary { background: #4a9eff; color: #0d0d0f; font-weight: 600; }
.login-btn.secondary { background: #1e1e24; color: #888; border-color: #2a2a30; cursor: not-allowed; }
.login-footer { margin-top: 28px; font-size: 11px; color: #555; }

.map-svg { display: block; width: 100%; height: 100%; }
.connection-line { stroke: #6b5b95; stroke-width: 2; }
.connection-label { fill: #888; font-size: 11px; text-anchor: middle; }
.system-circle { fill: #1a1a24; stroke: #4a9eff; stroke-width: 2; cursor: pointer; }
.system-label { fill: #e0e0e0; font-size: 11px; pointer-events: none; }
.map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 80;
    display: flex;
    gap: 6px;
    pointer-events: auto;
}
.map-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid #2a2a30;
    background: #151518;
    color: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    pointer-events: auto;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.map-controls button:hover {
    background: #2a2a34;
    border-color: #4a9eff;
}

.map-area:focus { outline: none; }
.map-area.connecting { cursor: crosshair; }
.map-area.connecting .system-node { cursor: pointer; }
.system-node.selected {
    filter: drop-shadow(0 0 7px rgba(243, 210, 122, 0.7)) drop-shadow(0 0 16px rgba(230, 168, 23, 0.35));
}
.system-node.multi-sel > rect:first-of-type {
    stroke: #3db8d3;
    stroke-width: 3;
}
.system-node.multi-sel:not(.selected) {
    filter: drop-shadow(0 0 6px rgba(61, 184, 211, 0.55));
}
.system-node.stand-excellent { filter: drop-shadow(0 0 6px rgba(74, 158, 255, 0.75)); }
.system-node.stand-good { filter: drop-shadow(0 0 5px rgba(80, 180, 140, 0.65)); }
.system-node.stand-bad { filter: drop-shadow(0 0 5px rgba(220, 140, 60, 0.7)); }
.system-node.stand-terrible { filter: drop-shadow(0 0 6px rgba(200, 60, 60, 0.75)); }
.system-node.selected.stand-excellent,
.system-node.selected.stand-good,
.system-node.selected.stand-bad,
.system-node.selected.stand-terrible {
    filter: drop-shadow(0 0 7px rgba(243, 210, 122, 0.7)) drop-shadow(0 0 16px rgba(230, 168, 23, 0.35));
}
.kill-row.stand-excellent { box-shadow: inset 3px 0 0 #4a9eff; }
.kill-row.stand-good { box-shadow: inset 3px 0 0 #50b48c; }
.kill-row.stand-bad { box-shadow: inset 3px 0 0 #dc8c3c; }
.kill-row.stand-terrible { box-shadow: inset 3px 0 0 #c83c3c; }
.system-node.connect-target { cursor: crosshair; }

.connect-banner {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 85;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(720px, calc(100% - 160px));
    padding: 8px 12px;
    background: #1a1a22;
    border: 1px solid #e6a817;
    border-radius: 6px;
    color: #e8e0c8;
    font-size: 13px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.connect-banner strong { color: #f3d27a; }
.connect-hint { color: #f07070; }
.connect-banner button {
    border: 1px solid #4a4a58;
    background: #121218;
    color: #e0e0e0;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
}
.connect-banner button:hover { border-color: #e6a817; }


.map-name-input {
  flex: 1;
  background: #12121a;
  border: 1px solid #333;
  color: #e0e0e0;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 14px;
}
.map-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  text-align: left;
}
.map-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #222;
}
.map-list a {
  color: #4a9eff;
  text-decoration: none;
  font-weight: 500;
}
.map-list a:hover { text-decoration: underline; }
.map-meta { color: #666; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.map-role {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  background: #1e2a22;
  color: #8fdfb0;
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.map-reason { color: #888; font-size: 10px; }
.map-delete-dialog {
  position: fixed;
  z-index: 9401;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, 92vw);
  padding: 16px 18px;
  background: #1e1e26;
  border: 1px solid #5a3030;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.65);
  text-align: left;
  color: #ddd;
}


.connection-wormhole {
  stroke: #5b8def;
  stroke-width: 2;
  opacity: 0.9;
}
.connection-wormhole.eol {
  stroke: #c44;
  stroke-dasharray: 6 4;
  opacity: 1;
}
.connection-wormhole.mass-reduced {
  stroke: #e6a817;
}
.connection-wormhole.mass-crit {
  stroke: #e74c3c;
}
.connection-stargate {
  stroke: #3de7c9;
  stroke-width: 2.5;
  stroke-linejoin: miter;
  stroke-linecap: square;
  opacity: 0.95;
  filter: drop-shadow(0 0 3px rgba(61, 231, 201, 0.55));
}
.connection-stargate.constellation {
  stroke: #6af0d8;
  filter: drop-shadow(0 0 4px rgba(90, 239, 212, 0.75));
}
.connection-stargate.constellation-halo {
  stroke: #3de7c9;
  opacity: 0.2;
  filter: none;
  pointer-events: none;
}
.connection-stargate.regional {
  stroke: #b8fff2;
  filter: drop-shadow(0 0 6px rgba(180, 255, 240, 0.9));
}
.connection-stargate.regional-halo {
  stroke: #3de7c9;
  opacity: 0.28;
  filter: none;
  pointer-events: none;
}
.connection-jumpbridge {
  stroke: #e6a817;
  stroke-width: 2.25;
  stroke-linecap: round;
  opacity: 0.95;
  filter: drop-shadow(0 0 3px rgba(230, 168, 23, 0.45));
}
.connection-line {
  stroke: #5b8def;
  stroke-width: 2;
}


.map-context-menu {
  position: fixed;
  z-index: 10000;
  background: #1a1a24;
  border: 1px solid #3a3a4a;
  border-radius: 6px;
  min-width: 180px;
  padding: 4px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.65);
  pointer-events: auto;
}
.map-context-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #e0e0e8;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  gap: 12px;
}
.map-context-menu button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: #888;
}
.map-context-menu button:disabled:hover {
  background: transparent;
}
.map-context-menu button:hover,
.map-context-menu .menu-item:hover > button {
  background: #2a2a38;
}
.map-context-menu button.menu-cancel:hover {
  color: #aaa;
}
.map-context-menu button.danger { color: #ff6b6b; }
.map-context-menu .menu-item {
  position: relative;
}
.map-context-menu .submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 2px;
  background: #1a1a24;
  border: 1px solid #3a3a4a;
  border-radius: 6px;
  min-width: 150px;
  padding: 4px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.65);
  z-index: 10001;
}
.map-context-menu .menu-item:hover > .submenu,
.map-context-menu .menu-item.open > .submenu {
  display: block;
}
.map-context-menu .submenu.left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 2px;
}
.map-context-menu .chevron {
  color: #666;
  font-size: 11px;
}
.map-context-menu .menu-section {
  font-size: 10px;
  text-transform: uppercase;
  color: #666;
  padding: 6px 12px 2px;
  letter-spacing: 0.04em;
}
.map-context-menu .menu-divider {
  height: 1px;
  background: #2a2a34;
  margin: 4px 0;
}
.map-context-menu button.active { color: #4a9eff; }
.map-context-menu button.danger { color: #ff6b6b; }
.map-context-menu button:disabled { color: #666; cursor: default; }
.route-chip-scrim {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: transparent;
}

.anomaly-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #3a2a10;
  border-bottom: 1px solid #c90;
  color: #f5e6c8;
  font-size: 13px;
  z-index: 10045;
  pointer-events: auto;
}
}
.anomaly-banner button {
  background: #222;
  border: 1px solid #666;
  color: #eee;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.location-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px;
  background: #1a2430;
  border-bottom: 1px solid #2a4a6a;
  color: #c8d8e8;
  font-size: 12px;
  z-index: 10045;
  pointer-events: auto;
}
.location-banner button {
  background: transparent;
  border: 0;
  color: #8aa;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10040;
}
.add-system-modal {
  position: fixed;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  width: min(420px, 92vw);
  background: #1a1a22;
  border: 1px solid #333;
  border-radius: 8px;
  z-index: 10050;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  color: #e8e8ef;
}
.add-system-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a34;
  font-weight: 600;
}
.modal-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: #fff; }
.add-system-body { padding: 16px; }
.add-system-input {
  width: 100%;
  background: #0e0e12;
  border: 1px solid #3a6ea5;
  border-radius: 6px;
  color: #eee;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.add-system-input:focus { border-color: #4a9eff; }
.add-system-hint {
  font-size: 11px;
  color: #777;
  margin-top: 6px;
}
.add-system-results {
  margin-top: 10px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #2a2a34;
  border-radius: 6px;
}
.add-system-result {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid #222;
  color: #ddd;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.add-system-result:last-child { border-bottom: none; }
.add-system-result:hover:not(.disabled) { background: #252530; }
.add-system-result.selected { background: #1e2a3a; }
.add-system-result.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.add-system-result .sec { font-weight: 600; }
.add-system-result .name { color: #eee; }
.add-system-result .region { color: #888; text-align: right; }
.add-system-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 16px;
}
.btn-submit {
  background: #222;
  border: 1px solid #4a6a8a;
  color: #cde;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-submit:hover:not(:disabled) { background: #2a3a4a; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.alias-modal {
  position: fixed;
  z-index: 10050;
  left: 50%;
  top: 28%;
  transform: translate(-50%, 0);
  width: min(360px, 92vw);
  background: #16161c;
  border: 1px solid #2a2a34;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.notes-modal {
  position: fixed;
  z-index: 10050;
  left: 50%;
  top: 18%;
  transform: translate(-50%, 0);
  width: min(480px, 92vw);
  background: #16161c;
  border: 1px solid #2a2a34;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.notes-textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  background: #0e0e12;
  border: 1px solid #3a6ea5;
  border-radius: 6px;
  color: #eee;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  font-family: "Segoe UI", system-ui, sans-serif;
  outline: none;
  box-sizing: border-box;
}
.notes-textarea:focus { border-color: #4a9eff; }
.sys-note-tip {
  position: fixed;
  z-index: 10031;
  min-width: 220px;
  max-width: 360px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 10px;
  background: #14141c;
  border: 1px solid #8a7040;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
  pointer-events: auto;
  font-size: 12px;
  color: #d8d8e0;
  scrollbar-width: thin;
  scrollbar-color: #3a3a48 transparent;
}
.sys-note-tip-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: #e6d4a8;
}
.sys-note-tip-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  color: #d8d8e0;
}
.sys-note-tip-hint {
  font-size: 10px;
  color: #777;
  margin-top: 8px;
}
.alias-footer {
  justify-content: space-between;
  align-items: center;
}
.btn-ghost {
  background: transparent;
  border: 1px solid #3a3a48;
  color: #9a9aa6;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: #6a5a38; color: #e6d4a8; }


/* ---- Wanderer-style connection panel ---- */
.conn-panel {
  position: fixed;
  z-index: 10020;
  width: min(320px, 92vw);
  max-height: min(92vh, 640px);
  overflow-y: auto;
  background: #15151c;
  border: 1px solid #34344a;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  color: #e8e8ef;
  padding: 10px 12px 12px;
  pointer-events: auto;
  font-size: 13px;
}
.conn-panel-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.conn-ep {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.conn-ep.stub-ep .conn-name { font-style: italic; }
.conn-sec {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.conn-sec.muted, .conn-name.muted { color: #8a8498; }
.conn-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f0f0f6;
}
.conn-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.conn-kind-icon {
  font-size: 16px;
  line-height: 1;
  color: #7aa2ff;
}
.conn-kind-icon.gate { color: #3de7c9; }
.conn-kind-icon.bridge { color: #e6a817; }
.conn-kind-icon.stub { color: #c9a227; }
.conn-kind-icon.wh { color: #5b8def; }
.conn-close {
  background: transparent;
  border: none;
  color: #777;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.conn-close:hover { color: #fff; background: #2a2a34; }
.conn-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.conn-chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  background: #222230;
  border: 1px solid #3a3a4a;
  color: #c8c8d4;
}
.conn-chip.sig { color: #d0c48a; border-color: #5a5030; }
.conn-chip.type { color: #8ec8ff; border-color: #2a4a6a; }
.conn-chip.kind { color: #a8a8b8; }
.conn-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a6a7a;
  margin: 10px 0 6px;
}
.conn-section-label .hint {
  text-transform: none;
  letter-spacing: 0;
  color: #8a8070;
  font-weight: 500;
  margin-left: 6px;
}
.conn-sig-input {
  width: 100%;
  box-sizing: border-box;
  background: #0e0e12;
  border: 1px solid #5a5030;
  border-radius: 4px;
  color: #e6d4a8;
  padding: 6px 8px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  outline: none;
}
.conn-sig-input:focus { border-color: #c8b070; }
.conn-size-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.conn-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #1a1a24;
  border: 1px solid #333344;
  border-radius: 8px;
  color: #9a9aac;
  padding: 7px 4px 5px;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.conn-size:hover { border-color: #4a6a9a; color: #d0d0e0; }
.conn-size.active {
  background: #1a2838;
  border-color: #4a9eff;
  color: #e8f2ff;
  box-shadow: 0 0 0 1px rgba(74,158,255,0.25);
}
.conn-size-glyph { display: flex; color: currentColor; opacity: 0.9; }
.conn-size-label { font-size: 11px; font-weight: 700; }
.conn-mass-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: #101016;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid #2a2a34;
}
.conn-mass-seg {
  border: none;
  background: transparent;
  color: #8a8a9a;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 6px;
  cursor: pointer;
}
.conn-mass-seg:hover { color: #ddd; background: #1c1c26; }
.conn-mass-seg.fresh.active {
  background: linear-gradient(180deg, #1f5a38, #174a2e);
  color: #9dffc0;
}
.conn-mass-seg.reduced.active {
  background: linear-gradient(180deg, #6a4a12, #543a0e);
  color: #ffd88a;
}
.conn-mass-seg.critical.active {
  background: linear-gradient(180deg, #6a1e1e, #4a1212);
  color: #ff9a9a;
}
.conn-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.conn-time-row.stages {
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.conn-time-row.hours {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.conn-section-label .conn-life-hint {
  text-transform: none;
  letter-spacing: 0;
  color: #8a9ab0;
  font-weight: 600;
  margin-left: 8px;
  font-size: 10px;
}
.conn-time {
  background: #1a1a24;
  border: 1px solid #333344;
  color: #9a9aac;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.conn-time:hover { border-color: #4a6a9a; color: #ddd; }
.conn-time.active.stable {
  background: #1a2830;
  border-color: #2ec4d6;
  color: #9eefff;
}
.conn-time.active.eol,
.conn-time.active.lt4h {
  background: #3a2810;
  border-color: #e67e22;
  color: #ffd0a0;
}
.conn-time.active.lt1h {
  background: #301818;
  border-color: #e74c3c;
  color: #ffb0a8;
}
.conn-time.active.expired {
  background: #1a1a1a;
  border-color: #666;
  color: #aaa;
}
.conn-time-row.hours .conn-time {
  padding: 7px 2px;
  font-size: 10px;
  letter-spacing: 0.02em;
}
.conn-time.active.h1 {
  background: #301818;
  border-color: #e74c3c;
  color: #ffb0a8;
}
.conn-time.active.h4 {
  background: #3a2810;
  border-color: #e67e22;
  color: #ffd0a0;
}
.conn-time.active.h4_5 {
  background: #2a2814;
  border-color: #c9a227;
  color: #f0e0a0;
}
.conn-time.active.h16 {
  background: #1a2830;
  border-color: #2ec4d6;
  color: #9eefff;
}
.conn-time.active.h24 {
  background: #182418;
  border-color: #3d8;
  color: #b8e0b8;
}
.conn-time.active.h48 {
  background: #1c1a28;
  border-color: #8a7ae0;
  color: #d0c8ff;
}
.conn-mass-log {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 140px; overflow: auto;
  font-size: 11px; color: #bbb;
}
.conn-mass-log-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.1fr) auto auto;
  gap: 6px; align-items: center;
}
.conn-mass-log-row.pol { grid-template-columns: 1fr minmax(0, 1.4fr) auto; }
.conn-mass-log-row .muted { color: #7a7a88; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-mass-log-row.nested { padding-left: 8px; opacity: 0.92; }
.conn-activity-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 6px 0 0;
  padding: 6px 8px;
  background: #1a1a24;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
  color: #d0d0dc;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
}
.conn-activity-line:hover { border-color: #4a4a5a; background: #20202c; color: #fff; }
.conn-activity-line.open { border-color: #2a8a9a; background: #152028; }
.conn-activity-line .conn-activity-k { color: #9a9aaa; font-weight: 700; letter-spacing: .02em; }
.conn-activity-line .hint { flex: 1; color: #8a8a96; }
.conn-activity-line .pol-time { flex: 1; }
.conn-activity-line .chevron { color: #7a7a88; margin-left: auto; }
.conn-activity-flyout { width: min(340px, 92vw); }
.conn-activity-list { max-height: min(42vh, 360px); }
.conn-mass-group-head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.2fr) auto 12px;
  gap: 6px;
  align-items: center;
  width: 100%;
  padding: 4px 2px;
  background: transparent;
  border: none;
  color: #d0d0dc;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.conn-mass-group-head:hover { color: #fff; }
.conn-mass-group-head .muted { color: #7a7a88; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-mass-group-head .chevron { color: #7a7a88; }
.pol-time, .pol-badge {
  color: #e6a817; font-weight: 700; font-size: 10px; letter-spacing: 0.02em;
}
.pol-badge { margin-left: 6px; }
.pol-warn { color: #e6a817 !important; }
.conn-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #c8c8d4;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.conn-check input { accent-color: #4a9eff; }
.conn-check .hint { color: #6a6a7a; font-size: 11px; }
.conn-type-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.conn-type {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: #1a1a24;
  border: 1px solid #333344;
  color: #c8c8d4;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.conn-type .glyph { width: 18px; text-align: center; color: #7aa2ff; }
.conn-type:hover { border-color: #4a6a9a; }
.conn-type.active {
  background: #1a2434;
  border-color: #5b8def;
  color: #e8f0ff;
}
.conn-type.active.gate { border-color: #3de7c9; background: #122824; }
.conn-type.active.gate .glyph { color: #3de7c9; }
.conn-type.active.bridge { border-color: #e6a817; background: #2a2210; }
.conn-type.active.bridge .glyph { color: #e6a817; }
.conn-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #2a2a34;
}
.conn-danger {
  width: 100%;
  background: transparent;
  border: 1px solid #5a2a2a;
  color: #ff7a7a;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.conn-danger:hover { background: #2a1515; border-color: #8a3a3a; }
.conn-link-list {
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #2a2a34;
  border-radius: 8px;
  background: #101016;
}
.conn-link-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid #1e1e28;
  color: #ddd;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
}
.conn-link-item:last-child { border-bottom: none; }
.conn-link-item:hover { background: #1e2430; }
.conn-empty {
  padding: 10px;
  color: #666;
  font-size: 12px;
  text-align: center;
}

/* Eve Scout public holes panel */
.evescout-list { display: flex; flex-direction: column; min-height: min-content; }
.evescout-hub {
  padding: 6px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6a8ab0;
  background: #14141a;
  border-bottom: 1px solid #252530;
  position: sticky;
  top: 0;
}
.evescout-row {
  display: grid;
  grid-template-columns: 28px 1fr 44px 28px 28px;
  gap: 4px;
  align-items: center;
  padding: 4px 10px;
  border-bottom: 1px solid #1a1a22;
  color: #ccc;
}
.evescout-row:hover { background: #1e1e28; }
.es-class { font-weight: 700; font-size: 10px; }
.es-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-type { color: #8ab; font-size: 10px; }
.es-size { color: #aaa; font-size: 10px; text-align: right; }
.es-ttl { color: #777; font-size: 10px; text-align: right; }

.system-node.kill-count-flash {
    animation: killCountBump 1.2s ease-out;
}
@keyframes killCountBump {
    0% { filter: drop-shadow(0 0 0 transparent); }
    25% { filter: drop-shadow(0 0 10px #e74c3c); }
    100% { filter: drop-shadow(0 0 0 transparent); }
}

/* Signature paste */
.sig-paste-bar {
    display: flex;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #1a1a22;
    align-items: stretch;
}
.sig-paste-input {
    flex: 1;
    min-width: 0;
    background: #121218;
    border: 1px solid #2a2a34;
    color: #ddd;
    border-radius: 4px;
    font-size: 11px;
    padding: 4px 6px;
    resize: vertical;
    font-family: ui-monospace, monospace;
}
.sig-paste-btn {
    flex-shrink: 0;
    background: #2a4a6a;
    color: #e0e8f0;
    border: 1px solid #3a6a9a;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.sig-paste-btn:disabled { opacity: 0.45; cursor: default; }
.sig-paste-status { font-size: 10px; color: #8ab; padding: 2px 8px; }
.sig-missing { opacity: 0.45; text-decoration: line-through; }

/* Routes / intel */

/* ===== Routes panel (Pathfinder-style) ===== */
.routes-panel { display: flex; flex-direction: column; gap: 6px; font-size: 11px; min-height: 0; }
.routes-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding-bottom: 4px; border-bottom: 1px solid #222;
}
.routes-from { color: #888; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routes-from b { color: #cde; font-weight: 600; }
.routes-busy { color: #6af; }
.routes-icon-btn {
  background: #1e1e28; border: 1px solid #333; color: #aaa;
  border-radius: 4px; width: 24px; height: 22px; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 0;
}
.routes-icon-btn:hover:not(:disabled) { color: #fff; border-color: #555; background: #2a2a36; }
.routes-icon-btn:disabled { opacity: 0.35; cursor: default; }
.routes-icon-btn.sm { width: 20px; height: 18px; font-size: 11px; }
.routes-icon-btn.danger:hover:not(:disabled) { color: #f88; border-color: #633; }

.routes-table { display: flex; flex-direction: column; gap: 0; overflow: auto; min-height: 0; }
.routes-head, .routes-row {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 28px minmax(100px, 2.6fr) 48px;
  gap: 4px; align-items: center;
  padding: 3px 2px;
}
.routes-head { color: #555; font-size: 10px; text-transform: lowercase; border-bottom: 1px solid #1a1a22; }
.routes-row { border-bottom: 1px solid #15151c; cursor: pointer; }
.routes-row:hover { background: rgba(255,255,255,0.03); }
.routes-row.miss .rh-j { color: #555; }
.routes-row.found .rh-j { color: #9cf; font-weight: 600; }
.routes-row.open { background: rgba(80,120,200,0.06); }

.rh-sys { display: flex; align-items: center; gap: 5px; min-width: 0; }
.routes-sec-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.routes-sys-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ddd; }
.rh-j { text-align: right; font-variant-numeric: tabular-nums; }
.rh-sec { font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.rh-acts { display: flex; gap: 2px; justify-content: flex-end; }

.routes-chips { display: flex; flex-wrap: wrap; gap: 1px; align-items: center; }
.route-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 11px; height: 11px; font-size: 9px; line-height: 1;
  border-radius: 1px;
}
.chip-hs { color: #2ecc71; }
.chip-ls { color: #e67e22; }
.chip-ns { color: #e74c3c; }
.chip-c1, .chip-c2, .chip-c3 { color: #3db8c9; }
.chip-c4, .chip-c5 { color: #9b59b6; }
.chip-c6 { color: #c39; }
.chip-thera { color: #5dade2; }
.chip-pochven { color: #c0392b; }
.chip-wh, .chip-shattered, .chip-unknown { color: #a88; }
.chip-scout { color: #f1c40f; }
.chip-bridge { color: #1abc9c; }

.routes-none { color: #555; font-size: 10px; }
.routes-here { color: #6a6; font-size: 10px; }

.routes-detail {
  padding: 4px 6px 8px 12px;
  background: #121218;
  border-bottom: 1px solid #1a1a22;
  display: flex; flex-direction: column; gap: 2px;
}
.routes-hop-line {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  color: #bbb; font-size: 10px;
}
.routes-arrow { color: #555; }
.routes-hop-meta { color: #666; margin-left: auto; font-size: 9px; }

.routes-add { display: flex; gap: 6px; margin-top: 4px; }
.routes-add .route-input { flex: 1; }

.route-panel { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.route-row { display: flex; gap: 8px; align-items: center; }
.route-row label { color: #777; width: 36px; }
.route-input {
  flex: 1; background: #14141c; border: 1px solid #2a2a36; color: #ddd;
  border-radius: 4px; padding: 4px 6px; font-size: 11px; min-width: 0;
}
.route-check { color: #999; font-size: 10px; display: flex; gap: 6px; align-items: center; }
.route-summary { color: #8cf; font-weight: 600; margin-top: 4px; }
.route-hop { display: flex; flex-wrap: wrap; gap: 4px; color: #bbb; padding: 2px 0; border-bottom: 1px solid #1a1a22; }
.route-kind { color: #6a9; font-size: 10px; }

/* Route settings modal */
.routes-settings {
  position: fixed; z-index: 9600;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, 94vw); max-height: min(92vh, 760px);
  display: flex; flex-direction: column;
  background: #2a2a2e; border: 1px solid #3a3a44; border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.65);
  color: #ddd; font-size: 12px;
}
.routes-settings-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid #3a3a44; font-weight: 600;
}
.routes-settings-body { padding: 12px 14px; overflow: auto; flex: 1; }
.routes-settings-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 14px; border-top: 1px solid #3a3a44;
}
.rs-label { color: #aaa; font-size: 11px; margin-bottom: 6px; font-weight: 600; }
.rs-hint { color: #666; font-weight: 400; }
.rs-check {
  display: flex; align-items: center; gap: 8px;
  color: #ccc; font-size: 12px; padding: 3px 0;
}
.rs-check.indent { padding-left: 22px; color: #aaa; font-size: 11px; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #1a1a22; border: 1px solid #3a3a44; border-radius: 4px;
  padding: 2px 6px; font-size: 11px; color: #cde;
}
.rs-chip button {
  background: none; border: none; color: #e66; cursor: pointer; font-size: 12px; padding: 0 2px;
}


/* ========== Signature table controls ========== */
.sig-table-full { width: 100%; }
.sig-id { font-family: ui-monospace, monospace; font-weight: 600; color: #cde; letter-spacing: 0.02em; }
.sig-desc { color: #888; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.sig-desc-ph { color: #555; font-style: italic; }
.sig-desc-input {
  width: 100%; min-width: 80px; background: #14141c; border: 1px solid #4a6a9a;
  color: #eee; border-radius: 3px; font-size: 11px; padding: 2px 5px;
}
.sig-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.sig-filter-dd,
.sig-search {
  background: #141418;
  border: 1px solid #2a2a36;
  color: #ccc;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  height: 24px;
  padding: 0 8px;
}
.sig-search { width: 140px; min-width: 96px; }
.sig-search::placeholder { color: #666; text-transform: none; }
.sig-filter-dd:focus,
.sig-search:focus {
  outline: none;
  border-color: #4a6a9a;
}
.sig-lazy-check {
  display: inline-flex; align-items: center; gap: 5px;
  color: #9ab; font-size: 11px; cursor: pointer; user-select: none;
  padding: 2px 6px; border: 1px solid #333; border-radius: 4px; background: #1e1e28;
}
.sig-lazy-check:has(input:checked) { color: #e8c070; border-color: #6a5420; }
.sig-lazy-check input { margin: 0; accent-color: #c9a227; }
.sig-time { color: #666; font-size: 10px; white-space: nowrap; }
.sig-unknown-row { opacity: 0.92; }
.sig-unknown-label { color: #a66; font-style: italic; font-size: 11px; }
.sig-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #555; vertical-align: middle;
}
.sig-dot-unknown { background: #844; box-shadow: 0 0 0 1px #a55; }
.sig-dot-cat-combat { background: #e66; }
.sig-dot-cat-relic { background: #6c9; }
.sig-dot-cat-data { background: #69c; }
.sig-dot-cat-ore { background: #c96; }
.sig-dot-cat-gas { background: #6ac; }
.sig-dot-cat-wormhole { background: #a8a; }
.sig-dot-cat-unknown { background: #844; }

.sig-dd-sm, .sig-leads-dd {
  background: #14141c;
  border: 1px solid #2a2a36;
  color: #ccc;
  border-radius: 3px;
  font-size: 11px;
  padding: 2px 4px;
  max-width: 140px;
  min-width: 72px;
}
.sig-dd-sm:focus, .sig-leads-dd:focus {
  outline: none; border-color: #4a6a9a;
}
.sig-dd-unknown { color: #a66; font-style: italic; }
.sig-leads-dd { min-width: 90px; max-width: 130px; color: #8ab; }
.sig-leads-empty { color: #555; }

.sig-del-cell { width: 22px; text-align: center; padding-left: 2px !important; padding-right: 4px !important; }
.sig-del-btn {
  background: transparent; border: none; color: #666;
  font-size: 16px; line-height: 1; cursor: pointer;
  padding: 0 4px; border-radius: 3px; font-weight: 600;
}
.sig-del-btn:hover:not(:disabled) {
  color: #e66; background: rgba(180, 40, 40, 0.2);
}
.sig-del-btn:disabled { opacity: 0.3; cursor: default; }

.sig-open-reader {
  background: #1e1e28; border: 1px solid #333; color: #9ab;
  border-radius: 4px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.sig-open-reader:hover:not(:disabled) { color: #def; border-color: #555; }
.sig-open-reader:disabled { opacity: 0.4; cursor: default; }

/* Paste wrong-system confirmation */
.sig-confirm-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9500;
}
.sig-confirm-modal {
  position: fixed; z-index: 9501;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  background: #2a2a2e; border: 1px solid #4a3a30; border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  padding: 16px 18px; color: #ddd; font-size: 13px;
}
.sig-confirm-title {
  font-weight: 700; font-size: 14px; color: #f0c070; margin-bottom: 10px;
}
.sig-confirm-body { color: #ccc; line-height: 1.45; }
.sig-confirm-body b { color: #efe; }
.sig-confirm-hint { margin-top: 10px; font-size: 11px; color: #888; }
.sig-confirm-modal .paste-target-row { grid-template-columns: 1fr; }
.sig-confirm-modal .paste-target-text { min-width: 0; }
.sig-confirm-modal .paste-target-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.sig-confirm-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;
}
.sig-btn-cancel, .sig-btn-apply {
  border-radius: 4px; padding: 6px 14px; font-size: 12px; cursor: pointer; border: 1px solid #444;
}
.sig-btn-cancel { background: #222; color: #bbb; }
.sig-btn-cancel:hover { color: #fff; border-color: #666; }
.sig-btn-apply { background: #2a4a6a; color: #e0e8f0; border-color: #3a6a9a; font-weight: 600; }
.sig-btn-apply:hover { background: #345a7a; }

.paste-target-modal { width: min(440px, 94vw); }
.paste-target-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  max-height: 320px;
  overflow-y: auto;
}
.paste-target-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: #1c1c22;
  border: 1px solid #3a3a44;
  border-radius: 6px;
  padding: 8px 10px;
  color: #ddd;
  cursor: pointer;
}
.paste-target-row:hover { border-color: #5a8aba; background: #1e2834; }
.paste-target-row.is-selected { border-color: #c9a227; }
.paste-target-portraits {
  display: flex;
  align-items: center;
}
.paste-target-portrait {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #2a3a48;
  object-fit: cover;
  margin-right: -6px;
  background: #111;
}
.paste-target-portrait:last-child { margin-right: 0; }
.paste-target-text { min-width: 0; }
.paste-target-name { font-weight: 700; color: #eee; font-size: 13px; }
.paste-target-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 11px;
  color: #8a8a96;
}
.paste-target-sel {
  color: #d4b060;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 10px;
}

.dscan-tip {
  position: fixed;
  z-index: 10032;
  min-width: 200px;
  max-width: 280px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 10px;
  background: #121820;
  border: 1px solid #2a4a62;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.65);
  font-size: 12px;
  color: #c8d0d8;
}
.dscan-tip-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6aa8d0;
  margin-bottom: 4px;
}
.dscan-tip-ttl { color: #6a7a88; font-weight: 600; }
.dscan-tip-scout {
  font-size: 11px;
  color: #8aa;
  margin-bottom: 6px;
}
.dscan-tip-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  border-top: 1px solid #1a2834;
}
.dscan-tip-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: #101418;
  object-fit: contain;
}
.dscan-tip-icon.empty { border: 1px dashed #2a3440; }
.dscan-tip-type {
  color: #e0e8f0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dscan-tip-qty {
  color: #8ab;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.dscan-tip-npc-head {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #2a3020;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #a8944a;
}
.dscan-tip-row.npc .dscan-tip-type { color: #c4b480; font-weight: 500; }
.dscan-tip-row.npc .dscan-tip-qty { color: #8a7a48; }
.dscan-tip-empty { color: #667; font-size: 11px; padding: 6px 0; }

/* ========== WH type picker (Pathfinder-style) ========== */
.wh-picker {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}
.wh-picker-disabled { opacity: 0.45; pointer-events: none; }

.wh-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  background: #14141c;
  border: 1px solid #2e2e3a;
  color: #ddd;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  white-space: nowrap;
}
.wh-picker-btn:hover:not(:disabled) {
  border-color: #4a6a9a;
  background: #1a1a28;
}
.wh-picker-btn:disabled { cursor: default; }
.wh-picker-btn-unknown {
  color: #c88;
  border-color: #3a2a30;
}
.wh-picker-btn-unknown:hover:not(:disabled) {
  border-color: #6a3a45;
  background: #1c1418;
}

.wh-picker-unknown { color: #c88; font-style: italic; }
.wh-picker-code { color: #e8e8ef; font-weight: 600; font-family: ui-monospace, monospace; }
.wh-picker-arrow { color: #555; font-size: 10px; }
.wh-picker-dest { font-weight: 600; }
.wh-picker-note { color: #777; font-size: 10px; margin-left: 2px; }
.wh-picker-caret { color: #666; font-size: 9px; margin-left: 2px; }

/* Full-screen click catcher — below menu, above map */
.wh-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10055;
  background: transparent;
}

/* Fixed menu escapes overflow:hidden on signature panels */
.wh-picker-menu,
.wh-picker-menu-fixed {
  position: fixed;
  z-index: 10060;
  background: #1a1a22;
  border: 1px solid #3a3a48;
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.7);
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 220px;
  max-width: min(420px, 96vw);
  color: #ddd;
  font-size: 11px;
  /* grid of type chips — Pathfinder-like */
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wh-picker-filter {
  width: 100%; box-sizing: border-box;
  background: #121218; border: 1px solid #3a3a48; color: #eee;
  border-radius: 3px; font-size: 12px; padding: 5px 8px; margin-bottom: 4px;
  font-family: ui-monospace, monospace;
}
.wh-picker-filter:focus { outline: none; border-color: #4a6a9a; }
.wh-picker-empty { color: #888; font-size: 11px; padding: 8px 6px; font-style: italic; }

.wh-picker-section {
  font-size: 10px;
  text-transform: none;
  color: #888;
  font-weight: 600;
  padding: 6px 4px 3px;
  letter-spacing: 0.01em;
  border-top: 1px solid #2a2a34;
  margin-top: 2px;
}
.wh-picker-section:first-of-type { border-top: none; margin-top: 0; padding-top: 2px; }

.wh-picker-items {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 0 2px 4px;
}

.wh-picker-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #121218;
  border: 1px solid #2c2c38;
  color: #ddd;
  border-radius: 3px;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
  white-space: nowrap;
}
.wh-picker-item:hover {
  border-color: #4a6a9a;
  background: #1e2430;
}
.wh-picker-item-active {
  border-color: #4a9eff;
  background: #1a2838;
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.25);
}
.wh-picker-item-unknown {
  color: #c88;
  font-style: italic;
  margin-bottom: 2px;
  width: 100%;
  justify-content: flex-start;
}
.wh-picker-item .wh-picker-code { font-size: 11px; }
.wh-picker-item .wh-picker-dest { font-size: 11px; }
.wh-picker-item .wh-picker-note { font-size: 10px; color: #6a6a78; }

/* When JS measure fails — flow menu near button */
.wh-picker-open > .wh-picker-menu:not(.wh-picker-menu-fixed),
.wh-picker-menu-up:not([style*="position:fixed"]) {
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  top: auto;
  z-index: 9300;
}

/* ========== Signature reader modal ========== */
.sig-reader-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9400;
}
.sig-reader {
  position: fixed; z-index: 9401;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(920px, 96vw); max-height: min(86vh, 720px);
  display: flex; flex-direction: column;
  background: #1e1e26; border: 1px solid #3a3a48; border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.65);
  color: #ddd; font-size: 12px;
}
.sig-reader-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid #2a2a34;
}
.sig-reader-title { font-weight: 700; color: #e8e8ef; }
.sig-reader-system { color: #8ab; flex: 1; }
.sig-reader-close {
  background: transparent; border: none; color: #888;
  font-size: 20px; cursor: pointer; line-height: 1;
}
.sig-reader-close:hover { color: #fff; }
.sig-reader-options {
  display: grid; grid-template-columns: 200px 1fr; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid #2a2a34;
}
@media (max-width: 640px) {
  .sig-reader-options { grid-template-columns: 1fr; }
}
.sig-reader-opt-label {
  font-size: 10px; text-transform: uppercase; color: #666;
  letter-spacing: 0.04em; margin-bottom: 6px;
}
.sig-reader-check {
  display: flex; align-items: center; gap: 6px;
  color: #ccc; font-size: 12px; padding: 3px 0;
}
.sig-reader-check.disabled { color: #666; opacity: 0.7; }
.sig-reader-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: #2a2a34; color: #888; font-size: 10px; cursor: help;
}
.sig-reader-textarea {
  width: 100%; min-height: 72px;
  background: #121218; border: 1px solid #2a2a36; color: #ddd;
  border-radius: 4px; padding: 6px 8px; font-size: 11px;
  font-family: ui-monospace, monospace; resize: vertical;
}
.sig-reader-error { color: #e66; font-size: 11px; margin-top: 4px; }
.sig-reader-preview-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-bottom: 1px solid #2a2a34; color: #aaa;
}
.sig-reader-meta { color: #6a8; font-size: 11px; }
.sig-reader-search {
  margin-left: auto; background: #121218; border: 1px solid #2a2a36;
  color: #ddd; border-radius: 4px; padding: 3px 8px; font-size: 11px; width: 140px;
}
.sig-reader-table-wrap { flex: 1; overflow: auto; min-height: 0; padding: 0 8px 8px; }
.sig-reader-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.sig-reader-table th {
  text-align: left; padding: 4px 6px; color: #666; font-weight: 500;
  position: sticky; top: 0; background: #1e1e26;
}
.sig-reader-table td { padding: 3px 6px; border-bottom: 1px solid #1a1a22; }
.sig-row-new { background: rgba(40, 80, 40, 0.12); }
.sig-row-change { background: rgba(80, 70, 20, 0.12); }
.sig-row-delete { background: rgba(80, 30, 30, 0.15); opacity: 0.75; }
.sig-dot-new { background: #4a4; }
.sig-dot-change { background: #ca4; }
.sig-dot-keep { background: #456; }
.sig-dot-delete { background: #a44; }
.sig-dd {
  background: #14141c; border: 1px solid #2a2a36; color: #ccc;
  border-radius: 3px; font-size: 11px; padding: 2px 4px; max-width: 160px;
}
.sig-reader-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 14px; border-top: 1px solid #2a2a34;
}



/* Route preference radios */
.routes-pref {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 2px 0 4px;
}
.routes-pref-opt {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: #888;
  background: #14141c; border: 1px solid #2a2a36;
  border-radius: 4px; padding: 3px 8px; cursor: pointer;
  user-select: none;
}
.routes-pref-opt input { margin: 0; accent-color: #4a9eff; }
.routes-pref-opt.active {
  color: #def; border-color: #4a6a9a; background: #1a2434;
}
.routes-pref-opt:hover { border-color: #456; color: #ccc; }

/* System chips: square = k-space, circle = WH, diamond = Thera/Turnur (scout) */
.routes-chips { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.route-sys {
  display: inline-block;
  width: 10px; height: 10px;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1.5px solid currentColor;
  background: currentColor;
}
.route-sys-square {
  border-radius: 1px;
}
.route-sys-circle {
  border-radius: 50%;
}
.route-sys-diamond {
  width: 8px; height: 8px;
  border-radius: 1px;
  transform: rotate(45deg);
  margin: 1px 2px;
}

.routes-hop-sec {
  font-size: 10px; font-variant-numeric: tabular-nums; min-width: 28px;
}


/* Route chips — solid fills (in-game style), custom dark tooltips */
.routes-chips { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.route-sys-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.route-sys {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  box-sizing: border-box;
  border: none;
  background: currentColor;
}
.route-sys-square { border-radius: 1px; }
.route-sys-circle { border-radius: 50%; }
.route-sys-diamond {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  transform: rotate(45deg);
  margin: 1px 2px;
}

.route-tip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 10080;
  pointer-events: none;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  background: #1a1a24;
  border: 1px solid #2e2e3a;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55);
  font-size: 11px;
  line-height: 1.3;
  gap: 5px;
  align-items: baseline;
}
.route-sys-wrap:hover .route-tip {
  display: inline-flex;
}
/* Flip tip below when near top of panel */
.routes-row:first-child .route-tip,
.routes-head + .routes-row .route-tip {
  bottom: auto;
  top: calc(100% + 6px);
}
.route-tip-sec {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.route-tip-name {
  color: #e8e8ef;
  font-weight: 500;
}
.route-tip-hint {
  display: block;
  font-size: 9px;
  color: #7a7a88;
  margin-top: 2px;
}
.routes-hint {
  color: #8ab;
  font-size: 10px;
  margin-left: 8px;
}
.route-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1a1a24;
}
.routes-row:first-child .route-tip::after,
.routes-head + .routes-row .route-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #1a1a24;
}


/* Route settings autocomplete + avoid chips */
.rs-ac { position: relative; margin-top: 6px; }
.rs-ac .route-input { width: 100%; }
.rs-ac-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px);
  z-index: 10090;
  max-height: 220px; overflow: auto;
  background: #16161e; border: 1px solid #333; border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.rs-ac-item {
  display: grid;
  grid-template-columns: 36px 1fr minmax(60px, auto) auto;
  gap: 8px; align-items: center;
  width: 100%; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid #222;
  color: #ddd; padding: 6px 10px; font-size: 12px; cursor: pointer;
}
.rs-ac-item:last-child { border-bottom: none; }
.rs-ac-item:hover:not(.disabled) { background: #222230; }
.rs-ac-item.disabled { opacity: 0.45; cursor: not-allowed; }
.rs-ac-sec { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; }
.rs-ac-name { color: #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-ac-region { color: #777; font-size: 10px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-ac-tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em;
  color: #a86; background: #2a1a18; border: 1px solid #433; border-radius: 3px; padding: 1px 4px;
}
.rs-chip.avoid {
  border-color: #633; background: #221418; color: #ecc;
}
.rs-chip-sec {
  font-weight: 700; font-size: 10px; font-variant-numeric: tabular-nums; margin-right: 2px;
}
.rs-hint { color: #666; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 10px; }


/* ---------- Activity charts (Pathfinder-style hourly) ---------- */
.act-charts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 2px 6px;
}
.act-chart {
    background: #121218;
    border: 1px solid #1e1e28;
    border-radius: 6px;
    padding: 6px 6px 2px;
}
.act-chart-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    padding: 0 2px;
}
.act-chart-grip {
    color: #4a4a58;
    font-size: 11px;
    line-height: 1;
    cursor: default;
    user-select: none;
}
.act-chart-title {
    flex: 1;
    font-size: 11px;
    font-weight: 600;
    color: #b8b8c4;
    letter-spacing: 0.02em;
}
.act-chart-sum {
    font-size: 11px;
    font-weight: 700;
    color: #8a8a96;
    font-variant-numeric: tabular-nums;
}
.act-chart-legend {
    display: flex;
    gap: 8px;
    align-items: center;
}
.act-leg {
    font-size: 10px;
    font-weight: 700;
    color: var(--c, #aaa);
    font-variant-numeric: tabular-nums;
}
.act-leg::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c, #aaa);
    margin-right: 4px;
    vertical-align: 0;
}
.act-svg-wrap {
    position: relative;
}
.act-svg {
    display: block;
    width: 100%;
    height: 96px;
}
.act-axis {
    stroke: #2a2a34;
    stroke-width: 1;
}
.act-grid {
    stroke: #1c1c24;
    stroke-width: 1;
}
.act-ylab {
    fill: #6a6a78;
    font-size: 9px;
    font-family: "Segoe UI", system-ui, sans-serif;
}
.act-ylab-right {
    fill: #8a7a40;
}
.act-xlab {
    fill: #6a6a78;
    font-size: 9px;
    font-family: "Segoe UI", system-ui, sans-serif;
}
.act-hover-line {
    stroke: #ffffff;
    stroke-width: 1;
    stroke-opacity: 0.22;
    pointer-events: none;
}
.act-hit {
    cursor: crosshair;
}
.act-tip {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    z-index: 5;
    min-width: 108px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(12, 12, 16, 0.94);
    border: 1px solid #2e2e3a;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    pointer-events: none;
    font-size: 11px;
    color: #e8e8ef;
}
.act-tip-time {
    color: #9a9aa8;
    font-size: 10px;
    margin-bottom: 4px;
    white-space: nowrap;
}
.act-tip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.35;
    white-space: nowrap;
}
.act-tip-row strong {
    color: #fff;
    font-weight: 700;
}
.act-tip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.act-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 6px 4px 2px;
    font-size: 11px;
    color: #8a8a96;
}
.act-totals span {
    font-variant-numeric: tabular-nums;
}
.act-asof {
    font-size: 10px;
    color: #5c5c68;
    padding: 0 4px 4px;
    letter-spacing: 0.02em;
}
.act-sov-foot {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #1e1e28;
    font-size: 11px;
}

.pvp-act {
    padding: 4px 2px 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.pvp-act-card {
    background: #121218;
    border: 1px solid #1e1e28;
    border-radius: 6px;
    padding: 8px 8px 6px;
    min-width: 0;
    box-sizing: border-box;
}
.pvp-act-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    min-width: 0;
}
.pvp-act-hot {
    font-size: 12px;
    font-weight: 650;
    color: #e8e0c8;
    letter-spacing: .01em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pvp-act-n {
    font-size: 11px;
    color: #8a8a96;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}
.pvp-strip-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 4px 0 2px;
}
.pvp-strip {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 2px;
    height: 28px;
    width: 100%;
    min-width: 0;
}
.pvp-cell {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 2px;
    background: #1a1a22;
    cursor: crosshair;
    appearance: none;
    -webkit-appearance: none;
}
.pvp-cell:focus { outline: none; }
.pvp-cell.now {
    box-shadow: inset 0 0 0 1px #e8e0c8;
}
.pvp-cell.hot {
    box-shadow: inset 0 0 0 1px #e6a817;
}
.pvp-cell.now.hot {
    box-shadow: inset 0 0 0 1px #e8e0c8, inset 0 0 0 2px #e6a817;
}
.pvp-cell.over {
    filter: brightness(1.35);
}
.pvp-tip {
    bottom: calc(100% - 2px);
    top: auto;
}
.pvp-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 10px;
    color: #5c5c68;
    letter-spacing: .02em;
}
.intel-block { padding: 2px 0; }
.intel-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    padding: 3px 4px;
    font-size: 11px;
    color: #c8c8d0;
}
.intel-k {
    color: #7a7a88;
    font-weight: 600;
    min-width: 4.5rem;
}
.intel-campaign { color: #e6b800; }
.intel-timer { color: #f0a030; font-size: 10px; }


/* Ghost routes (connection history) */
.connection-ghost {
    stroke: #6a5a8a;
    stroke-dasharray: 6 5;
    opacity: 0.55;
}
.map-controls button.active-ghost {
    background: #3a2a55;
    color: #d0b0ff;
    border-color: #6a4a9a;
}

/* Rolling calculator */
.conn-roll-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 8px 0 4px;
    padding: 8px 10px;
    background: #1a1a24;
    border: 1px solid #2a2a3a;
    border-radius: 6px;
    color: #d0d0dc;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.conn-roll-toggle:hover {
    border-color: #4a4a5a;
    color: #fff;
    background: #20202c;
}
.conn-roll-toggle.open {
    border-color: #2a8a9a;
    color: #c0f0f8;
    background: #152028;
}
.conn-roll-toggle .chevron {
    color: #7a7a88;
    font-size: 12px;
    margin-left: 8px;
}
.conn-roll-toggle.open .chevron { color: #5bc0d0; }

.conn-roll-flyout {
    position: fixed;
    z-index: 10021;
    width: min(300px, 90vw);
    max-height: min(92vh, 720px);
    overflow-y: auto;
    background: #15151c;
    border: 1px solid #34344a;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.7);
    color: #e8e8ef;
    padding: 10px 12px 12px;
    pointer-events: auto;
    font-size: 13px;
}
.conn-roll-flyout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 13px;
    color: #e8e8ef;
    letter-spacing: 0.02em;
}
.conn-roll-flyout .roll-box {
    margin: 0;
    border: none;
    padding: 0;
    background: transparent;
}

.roll-box {
    margin: 6px 0 4px;
    padding: 8px;
    background: #121218;
    border: 1px solid #2a2a34;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.roll-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #b0b0bc;
}
.roll-row label { min-width: 5.5rem; }
.roll-input {
    flex: 1;
    min-width: 0;
    background: #0c0c10;
    border: 1px solid #2a2a34;
    color: #e8e8ef;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
}
.roll-input.narrow { flex: 0 0 3.5rem; }
.roll-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.roll-preset {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #2a2a34;
    background: #1a1a24;
    color: #c8c8d0;
    cursor: pointer;
}
.roll-preset:hover { border-color: #4a4a58; color: #fff; }
.roll-preset.on { border-color: #e6a817; color: #f3d27a; }
.roll-ship-row { align-items: flex-start; }
.roll-ship-search { flex: 1; min-width: 0; position: relative; }
.roll-ship-hits {
    position: relative;
    z-index: 40;
    background: #12121a;
    border: 1px solid #2a2a34;
    border-radius: 4px;
    max-height: 180px;
    overflow-y: auto;
    margin-top: 2px;
}
.roll-ship-hit {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #e8e8ef;
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
}
.roll-ship-hit:hover { background: #1c1c28; }
.roll-ship-empty { padding: 6px 8px; font-size: 11px; color: #888; }
.roll-hot { min-width: auto !important; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.roll-mass-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 10px;
    color: #8a8a96;
}
.roll-hot-side { color: #e6b800; font-weight: 600; }
.roll-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.roll-run {
    background: #1a4a55;
    border: 1px solid #2a8a9a;
    color: #c0f0f8;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.roll-run:disabled { opacity: 0.5; cursor: wait; }
.roll-hotmark {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #3a3a28;
    background: #222018;
    color: #d0c090;
    cursor: pointer;
}
.roll-hotmark.muted { color: #888; border-color: #2a2a34; background: #16161c; }
.roll-result {
    margin-top: 2px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.4;
    border: 1px solid #2a2a34;
    background: #0e0e14;
}
.roll-result .roll-risk { font-weight: 700; margin-bottom: 2px; }
.roll-result.risk-safe .roll-risk { color: #40c070; }
.roll-result.risk-low .roll-risk { color: #c0c040; }
.roll-result.risk-medium .roll-risk { color: #e09030; }
.roll-result.risk-high .roll-risk { color: #f05050; }
.roll-result.risk-unknown .roll-warn { margin: 0; }
.roll-warn { color: #f0a060; margin-top: 2px; }

.roll-plan { color: #9a9aa8; font-size: 10px; margin-bottom: 2px; }
.roll-box select.roll-input { cursor: pointer; }

.roll-derived {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 11px;
    color: #b0b0bc;
}
.roll-passes { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.roll-pass {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #2a2a34;
}
.roll-pass.safe { color: #40c070; border-color: #1a5a30; background: #0e2416; }
.roll-pass.may { color: #e0a030; border-color: #6a4a10; background: #24180a; }
.roll-pass.will { color: #f05050; border-color: #6a2020; background: #240e0e; }
.roll-band {
    position: relative;
    height: 10px;
    margin: 6px 0 4px;
    background: #0a0a10;
    border: 1px solid #2a2a34;
    border-radius: 3px;
    overflow: hidden;
}
.roll-band-hatch {
    position: absolute;
    top: 0; bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        rgba(230, 168, 23, 0.28) 0 4px,
        rgba(230, 168, 23, 0.08) 4px 8px);
}
.roll-band-p50 {
    position: absolute;
    top: -1px; bottom: -1px;
    width: 2px;
    background: #f3d27a;
    box-shadow: 0 0 4px #e6a817;
}
.roll-derived strong { color: #e8e8ef; font-variant-numeric: tabular-nums; }
.roll-derived .muted { color: #6a6a78; font-size: 10px; }

/* ========== Phase 3: Multi-character presence + FC view ========== */
.presence-tip {
  position: fixed;
  z-index: 10030;
  min-width: 220px;
  max-width: 300px;
  padding: 8px 10px;
  background: #14141c;
  border: 1px solid #2a3a2a;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.6);
  pointer-events: auto;
  font-size: 12px;
  color: #c8c8d0;
  user-select: none;
  -webkit-user-select: none;
}
.presence-tip-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6a9a78;
  margin-bottom: 6px;
}
.presence-tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid #1e1e28;
}
.presence-tip-row:first-of-type { border-top: none; }
.presence-tip-row.self .presence-tip-name { color: #7ec8ff; }
.presence-tip-por {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #1a1a24;
  object-fit: cover;
  flex-shrink: 0;
}
.presence-tip-ship-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #121218;
  border: 1px solid #2a2a34;
  object-fit: contain;
  flex-shrink: 0;
}
.presence-tip-ship-icon.empty {
  border: 1px dashed #2a2a34;
  background: #101016;
}
.presence-tip-meta { min-width: 0; flex: 1; }
.presence-tip-name {
  font-weight: 600;
  color: #e8e8ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presence-tip-ship {
  font-size: 11px;
  color: #8a9a7a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-toggle {
  background: #1a1a24;
  border: 1px solid #2a2a38;
  color: #b0b0bc;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fc-toggle:hover { border-color: #4a4a58; color: #fff; }
.fc-toggle.active {
  border-color: #3d9a5f;
  color: #6fdf9a;
  background: #14241a;
}
.wallet-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  margin-right: 10px;
  border: 1px solid #5a4a20;
  border-radius: 4px;
  background: #1a1810;
  color: #e6c86a;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.wallet-chip:hover { border-color: #8a7028; color: #f3d27a; }
.wallet-chip.open { border-color: #e6a817; background: #241c0c; }
.wallet-chip.frozen {
  border-color: #6a2020;
  background: #241414;
  color: #e88;
}
.fc-count {
  background: #1a3a28;
  color: #6fdf9a;
  border-radius: 8px;
  padding: 0 6px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.fc-panel {
  position: fixed;
  z-index: 9500;
  top: 48px;
  right: 16px;
  width: min(360px, 94vw);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: #15151c;
  border: 1px solid #2a3a2a;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.65);
  color: #e0e0e8;
  font-size: 12px;
  overflow: hidden;
}
.fc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #2a2a34;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
}
.fc-empty {
  padding: 16px;
  color: #6a6a78;
  line-height: 1.4;
}
.fc-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px;
}
.fc-row {
  display: grid;
  grid-template-columns: 28px 28px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  color: inherit;
  cursor: pointer;
}
.fc-row:hover { background: #1e1e28; }
.fc-row.self { background: rgba(80, 140, 200, 0.08); }
.fc-row.self .fc-name { color: #7ec8ff; }
.fc-por {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #1a1a24;
  object-fit: cover;
}
.fc-ship-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #121218;
  border: 1px solid #2a2a34;
  object-fit: contain;
}
.fc-ship-icon.empty {
  border: 1px dashed #2a2a34;
  background: #101016;
}
.fc-meta { min-width: 0; }
.fc-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-ship {
  font-size: 10px;
  color: #8a9a7a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-sys {
  font-size: 11px;
  color: #8ab;
  font-weight: 600;
  max-width: 100px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc-add-char {
  font-size: 11px;
  color: #6fdf9a;
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #2a4a34;
}
.fc-add-char:hover { background: #1a2a20; color: #9fefb8; }
a.char-link-btn {
  text-decoration: none;
  margin-right: 8px;
}

/* Home multi-character roster */
.char-roster {
  margin: 12px 0 18px;
  border: 1px solid #2a2a36;
  border-radius: 8px;
  background: #121218;
  overflow: hidden;
}
.char-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2a36;
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
}
.char-add-btn {
  font-size: 11px;
  color: #6fdf9a;
  text-decoration: none;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid #2a4a34;
  border-radius: 4px;
}
.char-add-btn:hover { background: #1a2a20; color: #9fefb8; }
.char-roster-list { padding: 4px; }
.char-roster-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
}
.char-roster-row.primary { background: rgba(80, 140, 200, 0.08); }
.char-roster-row:hover { background: #1a1a24; }
.char-roster-por {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #1a1a24;
  object-fit: cover;
}
.char-roster-meta { min-width: 0; }
.char-roster-name {
  font-weight: 600;
  color: #e8e8ef;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.char-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #7ec8ff;
  border: 1px solid #3a6a9a;
  border-radius: 3px;
  padding: 1px 5px;
}
.char-roster-sys {
  font-size: 11px;
  color: #7a8a7a;
  margin-top: 2px;
}
.char-roster-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.char-action {
  background: #1a1a24;
  border: 1px solid #333;
  color: #aaa;
  border-radius: 3px;
  font-size: 10px;
  padding: 2px 8px;
  cursor: pointer;
}
.char-action:hover:not(:disabled) { color: #fff; border-color: #555; }
.char-action.danger:hover:not(:disabled) { color: #e88; border-color: #844; }
.char-action:disabled { opacity: 0.4; cursor: default; }
.char-roster-hint {
  margin: 0;
  padding: 8px 12px 10px;
  font-size: 11px;
  color: #666;
  line-height: 1.4;
  border-top: 1px solid #2a2a36;
}

/* WH system effect tooltip (hover card) */
.wh-effect-tip {
  position: fixed;
  z-index: 10031;
  min-width: 200px;
  max-width: 280px;
  padding: 8px 10px;
  background: #14141c;
  border: 1px solid #2a2a38;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
  pointer-events: auto;
  font-size: 11px;
  color: #c8c8d0;
}

.wh-effect-tip-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e8e8ef;
}
.wh-effect-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid transparent;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 2px;
}
.sys-effect-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wh-effect-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 0;
  color: #a0a0aa;
}
.wh-effect-tip-row .bonus-pos { color: #2ecc71; font-variant-numeric: tabular-nums; }
.wh-effect-tip-row .bonus-neg { color: #e74c3c; font-variant-numeric: tabular-nums; }
.sys-effect-bonus {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #a0a0aa;
  min-width: 160px;
}
.sys-effect-bonus .bonus-pos { color: #2ecc71; }
.sys-effect-bonus .bonus-neg { color: #e74c3c; }
.sys-effect-name { margin-bottom: 2px; }

/* Phase 4 — Structures / d-scan */
.struct-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 8px;
  font-size: 11px;
  color: #888;
}
.struct-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #aaa;
}
.struct-hint {
  color: #555;
  font-size: 10px;
}
.struct-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
}
.struct-row {
  display: grid;
  grid-template-columns: 22px 1fr 18px;
  gap: 6px;
  align-items: center;
  padding: 4px 4px;
  border-radius: 4px;
}
.struct-row:hover { background: #1a1a24; }
.struct-row.missing {
  opacity: 0.55;
  text-decoration: line-through;
}
.struct-type-icon {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: #121218;
  object-fit: contain;
}
.struct-cat-dot {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #111;
  font-weight: 700;
}
.struct-meta { min-width: 0; }
.struct-name {
  font-size: 12px;
  font-weight: 600;
  color: #e0e0e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.struct-sub {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: #7a7a88;
}
.struct-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.struct-dist {
  color: #8ab;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.struct-del {
  background: transparent;
  border: none;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.struct-del:hover { color: #e66; }
.struct-sov-head {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #2a2a34;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6a6a78;
}

.share-panel { border-color: #2a3344; width: min(420px, 96vw); }
.manage-map {
  position: fixed; z-index: 9401;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1040px, 96vw); max-height: min(88vh, 820px);
  display: flex; flex-direction: column;
  background: #1e1e26; border: 1px solid #3a3a48; border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.65);
  color: #ddd; font-size: 14px;
}
.manage-map-body { padding: 12px 16px 16px; overflow-y: auto; min-height: 0; flex: 1; }
.settings-dialog .sig-reader-title { font-size: 16px; }
.settings-shell {
  display: flex; min-height: 0; flex: 1; overflow: hidden;
}
.settings-nav {
  width: 200px; flex-shrink: 0;
  padding: 12px 8px;
  border-right: 1px solid #2a2a34;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
  background: #191920;
}
.settings-nav-btn {
  display: block; width: 100%;
  text-align: left;
  background: transparent; border: 0;
  color: #c8c8d0;
  font-size: 14px; line-height: 1.3;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.settings-nav-btn:hover { background: #262630; color: #f0f0f4; }
.settings-nav-btn.active { background: #2e3344; color: #f3d27a; font-weight: 600; }
.settings-pane {
  flex: 1; min-width: 0; min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 24px;
}
.settings-card { margin: 0 0 18px; }
.settings-title {
  margin: 0 0 6px;
  font-size: 18px; font-weight: 650;
  color: #f0ead8;
}
.settings-sub {
  margin: 0 0 14px;
  font-size: 13px; line-height: 1.45;
  color: #9a9aa8;
}
.settings-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: #d8d0c0;
  margin: 0 0 6px;
}
.settings-preview {
  font-size: 13px; color: #c9a227;
  margin: 8px 0 12px;
  font-variant-numeric: tabular-nums;
}
.settings-dialog .share-input { font-size: 14px; padding: 8px 10px; min-height: 36px; }
.settings-dialog .hook-flags { font-size: 14px; gap: 10px; margin: 10px 0; }
.settings-dialog .hook-help { font-size: 13px; color: #8a8a96; }
.settings-dialog .share-type { font-size: 11px; }
.settings-dialog .share-role { font-size: 13px; }
.settings-dialog .hook-flags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  align-items: start;
  margin: 0 0 16px;
}
.settings-dialog .hook-flags-grid label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: #ddd;
  cursor: pointer;
}
.settings-dialog .share-audit {
  font-size: 14px;
}
.settings-dialog .share-audit-row {
  font-size: 14px;
  color: #c8c8d0;
  padding: 6px 0;
  grid-template-columns: 110px 1fr 1.4fr;
}
.share-expired { font-size: 12px; color: #e88; }
.share-exp { font-size: 12px; color: #8a8a96; }
.bm-caption { pointer-events: none; }
@media (max-width: 700px) {
  .settings-shell { flex-direction: column; }
  .settings-nav { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #2a2a34; }
  .settings-nav-btn { width: auto; padding: 6px 10px; font-size: 13px; }
}
.manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
@media (max-width: 700px) {
  .manage-grid { grid-template-columns: 1fr; }
}
.manage-scope { width: 100%; margin-top: 4px; }
.share-body { padding: 10px 12px 12px; overflow-y: auto; }
.share-add {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.8fr auto;
  gap: 6px;
  margin-bottom: 8px;
}
.share-input {
  background: #12121a;
  border: 1px solid #333;
  color: #e0e0e0;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
}
.share-add-btn { padding: 6px 10px; font-size: 12px; }
.share-hint { font-size: 10px; color: #666; margin-bottom: 10px; line-height: 1.35; }
.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.share-err { color: #e88; font-size: 11px; margin-bottom: 8px; }
.dir-picker { position: relative; margin: 6px 0; }
.dir-hits {
  position: absolute; left: 0; right: 0; top: 100%;
  z-index: 40;
  background: #14141c;
  border: 1px solid #2a2a34;
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}
.dir-hit {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  color: #e0e0e0;
  cursor: pointer;
  text-align: left;
}
.dir-hit:hover, .dir-hit.on { background: #1e2430; }
.dir-hit img { border-radius: 3px; flex-shrink: 0; }
.dir-hit-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-hit-cat { font-size: 10px; color: #6a6a74; text-transform: lowercase; }
.dir-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dir-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 4px;
  border: 1px solid #3a3428;
  border-radius: 12px;
  background: #1a1814;
  color: #d4c4a0;
  font-size: 11px;
  cursor: pointer;
}
.dir-chip img { border-radius: 50%; }
.dir-chip:hover { border-color: #6a5a38; }
.dir-confirm {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #3a3428;
  border-radius: 8px;
  background: #16140f;
}
.dir-confirm img { border-radius: 4px; }
.dir-confirm-name { font-weight: 600; color: #e8e8ef; }
.dir-confirm-sub { font-size: 11px; color: #8a8a96; }
.wp-modal {
  position: fixed;
  z-index: 10050;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  width: min(380px, 92vw);
  background: #16161c;
  border: 1px solid #2a2a34;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.wp-modal .dir-hit { border-bottom: 1px solid #1e1e28; }
.share-list-head {
  margin: 12px 0 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #888;
}
.share-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #222;
}
.share-who { display: flex; flex-direction: column; min-width: 0; }
.share-type { font-size: 9px; color: #888; text-transform: uppercase; letter-spacing: .04em; }
.share-role { font-size: 11px; color: #8fdfb0; }
.share-implicit { font-size: 10px; color: #666; }
.share-audit-head {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6a6a78;
}
.share-audit-row {
  display: grid;
  grid-template-columns: 72px 1fr 1fr;
  gap: 6px;
  font-size: 10px;
  color: #888;
  padding: 3px 0;
}
.coal-box { margin: 10px 0 12px; }
.coal-card {
  border: 1px solid #2a2a34;
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
  background: #12121a;
}
.coal-mem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #aaa;
  padding: 2px 0 2px 4px;
}
.hook-flags {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  font-size: 12px;
  color: #ccc;
  cursor: pointer;
}
.hook-flags input { margin-top: 2px; flex-shrink: 0; }
.hook-flags strong { display: block; color: #e8e0c8; font-weight: 600; }
.hook-help { display: block; margin-top: 2px; font-size: 11px; color: #888; line-height: 1.35; font-weight: 400; }
@media (max-width: 520px) {
  .share-add { grid-template-columns: 1fr 1fr; }
}

/* Home — scoped. Map chrome (top-bar, brand, header-char, tool-btn) is reused as-is. */
.home-page {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-dark);
    color: var(--text);
    font-size: 13px;
    position: relative;
}
.home-page .top-bar { position: sticky; top: 0; z-index: 20; }
.home-char-mini {
    border: 0;
    background: transparent;
    color: #888;
    font-size: 10px;
    cursor: pointer;
    padding: 0 2px;
}
.home-char-mini.danger { color: #a66; }
.home-char-mini.on { color: #e6c86a; }
.home-char-mini:hover { color: #e8e0c8; }
.header-char.untracked { opacity: .55; }

.home-hero {
    min-height: 280px;
    padding: 28px 24px 32px;
    background:
        linear-gradient(180deg, rgba(13,13,15,.35) 0%, rgba(13,13,15,.72) 70%, var(--bg-dark) 100%),
        url("../img/home-hero.jpg") center / cover no-repeat;
}
.home-maps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
}
.home-map-tile {
    position: relative;
    width: 220px;
    min-height: 92px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 14px 12px;
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    font: inherit;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.home-map-tile:hover { border-color: #e6a817; }
.home-map-new { border-style: dashed; background: rgba(21,21,24,.7); }
.home-map-name {
    font-size: 15px;
    font-weight: 600;
    color: #e8e0c8;
}
.home-map-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.home-map-role { color: #c8b88a; font-weight: 600; }
.wallet-pay-panel { width: 340px; }
.wallet-pay-panel .live-panel-head { margin-bottom: 0; }
.wallet-pay-card { text-align: left; }
.wallet-pay-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 650;
    color: #e8e0c8;
}
.wallet-pay-panel .wallet-pay-title { margin-top: 2px; }
.wallet-pay-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}
.home-wallet-por {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #5a4a20;
    background: #1a1810;
}
.wallet-pay-copy {
    margin: 0;
    color: #c8c0a8;
    font-size: 14px;
    line-height: 1.45;
}
.wallet-pay-match {
    margin: 8px 0 0;
    color: #e6c86a;
    font-size: 12px;
}
.wallet-pay-hint {
    margin: 8px 0 0;
    color: #9a9aa8;
    font-size: 12px;
}
.wallet-pay-hint a { color: #e6c86a; }
.home-new .wallet-pay-card {
    margin: 12px 0 4px;
    padding: 12px 14px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 6px;
    max-width: 420px;
}
.nm-rules .wallet-pay-card {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 6px;
    max-width: none;
}

.nm-hero { padding-bottom: 48px; }
.nm-shell {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.nm-rules {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 22px 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nm-rules h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #e8e0c8;
    letter-spacing: .04em;
}
.nm-rules-list {
    margin: 0;
    padding: 0 0 0 18px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}
.nm-rules-list li { margin: 0 0 6px; }
.nm-rules-list li:last-child { margin: 0; }
.nm-rules-list strong { color: #e8e0c8; font-weight: 650; }
.nm-rules .home-quote { margin: 0; }
.nm-rules .home-check { max-width: none; }
.nm-rules .home-banner-err, .nm-rules .home-banner-ok { text-align: left; margin: 0; }

.nm-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.nm-col {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.nm-col h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    color: #e8e0c8;
    letter-spacing: .04em;
}
.nm-col > p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.nm-col .home-create-input { width: 100%; font-size: 15px; }
.nm-col .fc-toggle { margin-right: 0; align-self: flex-start; font-size: 12px; padding: 6px 12px; }

.nm-sources {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nm-sources li {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    background: #101014;
}
.nm-sources strong {
    display: block;
    color: #e8e0c8;
    font-size: 13px;
    font-weight: 650;
    margin: 0 0 2px;
}
.nm-sources span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}
.nm-source-wf { border-color: #3a3220; }
.nm-source-wf .home-check {
    margin-top: 8px;
    max-width: none;
}
.nm-choose {
    align-self: flex-start;
    background: #1a1a1e;
    color: #e8e0c8;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.nm-choose.off { opacity: .45; cursor: not-allowed; }

@media (max-width: 860px) {
    .nm-cols { grid-template-columns: 1fr; }
}

.home-guest { text-align: center; padding: 48px 16px 20px; text-shadow: 0 2px 12px #000; }
.home-guest h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: .06em;
    color: #e8e0c8;
}
.home-guest p { margin: 0 auto; max-width: 520px; font-size: 15px; color: #aaa; line-height: 1.45; }
.home-banner-err { text-align: center; color: #c66; font-size: 12px; }
.home-banner-ok { text-align: center; color: #6a6; font-size: 12px; }

.home-strip {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
}
.home-create { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.home-create-input {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    padding: 7px 10px;
    min-width: 200px;
    font: inherit;
    font-size: 13px;
}
.home-import {
    position: relative;
    overflow: hidden;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 7px 10px;
    cursor: pointer;
}
.home-import input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.eve-sso-btn {
    display: inline-flex;
    line-height: 0;
    border: 0;
    background: transparent;
    padding: 0;
    text-decoration: none;
}
.eve-sso-btn img {
    display: block;
    height: 30px;
    width: auto;
}
.eve-sso-btn-lg img {
    height: 45px;
}
.eve-sso-btn:hover { opacity: .9; }
.eve-sso-btn:focus-visible { outline: 1px solid #e6a817; outline-offset: 3px; }

.home-eve-login {
    display: inline-flex;
    align-items: stretch;
    background: #141418;
    color: #e8e0c8;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
}
.home-eve-login:hover { border-color: #e6a817; }
.home-eve-mark {
    padding: 8px 10px;
    background: #1a1a1e;
    border-right: 1px solid var(--border);
    font-style: italic;
    letter-spacing: .08em;
}
.home-eve-login span:last-child { padding: 8px 14px; }

.home-body { max-width: 1080px; margin: 0 auto; padding: 28px 20px 12px; }
.home-sec { margin-bottom: 28px; }
.home-sec h2 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #e8e0c8;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.home-grid article {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 12px 10px;
}
.home-grid h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #e8e0c8;
}
.home-grid p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
}
.home-foot {
    text-align: center;
    font-size: 12px;
    color: #555;
    padding: 8px 16px 28px;
    line-height: 1.45;
}
.home-foot-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}
.home-foot-nav a {
    color: #8b96a8;
    text-decoration: none;
}
.home-foot-nav a:hover { color: #5ec8d8; }
.home-foot-nav span { color: #555; }
.home-foot-parent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: #8b96a8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}
.home-foot-parent svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.home-foot-parent:hover {
    color: #5ec8d8;
}
.home-foot-legal {
    margin: 0;
    color: #555;
}
@media (max-width: 860px) {
    .home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .home-grid { grid-template-columns: 1fr; }
}

.home-new {
    max-width: 420px;
    margin: 40px auto 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 12px 28px rgba(0,0,0,.4);
}
.home-new h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #e8e0c8;
    letter-spacing: .04em;
}
.home-new p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.45; }
.home-quote {
    margin: 0;
    font-size: 13px !important;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #2a2a34;
}
.home-quote.free { background: #12181a; color: #b8c8c0 !important; }
.home-quote.paid { background: #1a1610; color: #e8e0c8 !important; border-color: #3a3220; }
.home-quote strong { color: #e6a817; font-weight: 650; }
.home-new-label { font-size: 12px; color: #888; }
.home-new .home-create-input { width: 100%; font-size: 15px; }
.home-new .fc-toggle { margin-right: 0; align-self: flex-start; font-size: 12px; padding: 6px 12px; }
.home-new-or {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 6px;
}
.home-new .home-import { font-size: 13px; }
.home-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 10px;
    max-width: 440px;
    cursor: pointer;
}
.home-check input { margin-top: 3px; }

.cmp {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}
.cmp-intro h1 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #e8e0c8;
}
.cmp-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #888;
}
.cmp-lede, .cmp-note, .cmp-sec > p, .cmp-foot {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 820px;
}
.cmp-lede { color: #c8c4b8; }
.cmp-lede a, .cmp-foot a { color: #c8b88a; }
.cmp-sec { margin-top: 32px; }
.cmp-sec h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #e8e0c8;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.cmp-scroll { overflow-x: auto; margin: 16px 0 8px; }
.cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.4;
}
.cmp-table th, .cmp-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
    background: var(--bg-panel);
}
.cmp-table thead th {
    background: #1a1a1e;
    color: #e8e0c8;
    font-weight: 600;
    white-space: nowrap;
}
.cmp-table thead th.us, .cmp-table td:nth-child(2) { background: #1a1810; }
.cmp-table tbody th {
    color: #c8c4b8;
    font-weight: 600;
    width: 160px;
    background: #121216;
    white-space: nowrap;
}
.cmp-table-wide tbody th { width: 220px; white-space: normal; }
.cmp-table .yes { color: #8c8; }
.cmp-table .no { color: #888; }
.cmp-table .mid { color: #c8b88a; }
.cmp-table .intent { color: #e0b050; font-weight: 650; }
.cmp-foot { margin-top: 20px; font-size: 13px; color: #666; }

.plat .home-grid h3 { font-size: 16px; }
.plat .home-grid p { font-size: 15px; }

.plat-diagram {
    margin: 8px 0 12px;
    padding: 12px;
    background: #0a0a0c;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow-x: auto;
}
.plat-diagram svg { display: block; width: 100%; height: auto; min-width: 720px; }
.plat-grid article code, .plat p code, .cmp-table code {
    font-size: 11px;
    color: #c8b88a;
    background: #0d0d0f;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ---- Ops console ---- */
.ops-notice-bar {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    font-size: 13px;
    z-index: 200;
    width: 100%;
}
.ops-notice-bar.info { background: #1a3344; color: #cde; border-bottom: 1px solid #2a4a60; }
.ops-notice-bar.warn { background: #3a2e10; color: #f3d27a; border-bottom: 1px solid #6a5010; }
.ops-ticket-bar { z-index: 81; }
.ops-notice-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.ops-notice-bar.critical { background: #3a1212; color: #f0b0b0; border-bottom: 1px solid #6a2020; }
.ops-notice-copy { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.ops-notice-count { opacity: .8; font-variant-numeric: tabular-nums; }
.ops-notice-x {
    background: transparent; border: 0; color: inherit; cursor: pointer; font-size: 12px;
}
.ops-notice-scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.ops-notice-modal {
    width: min(440px, 100%);
    background: #1a1010;
    border: 1px solid #8a3030;
    border-radius: 8px;
    padding: 22px 24px 20px;
    color: #f0d0d0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    text-align: center;
}
.ops-notice-modal.critical {
    animation: ops-notice-pulse 1.6s ease-in-out infinite;
}
.ops-gift-modal {
    width: min(440px, 100%);
    background: #16140e;
    border: 1px solid #8a7010;
    border-radius: 8px;
    padding: 22px 24px 20px;
    color: #f0e0c0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    text-align: center;
}
.ops-gift-modal h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #f8e8c0;
}
.ops-gift-modal p { margin: 0 0 14px; color: #d8c8a0; line-height: 1.45; }
.ops-gift-modal .ops-notice-modal-kicker { color: #e6c86a; }
.ops-notice-modal-kicker {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #e88;
    margin-bottom: 8px;
}
.ops-notice-modal h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #f8e0e0;
}
.ops-notice-modal p { margin: 0 0 14px; color: #d8b8b8; line-height: 1.45; }
.ops-notice-modal-count { font-variant-numeric: tabular-nums; color: #f3d27a !important; }
.ops-notice-modal-hint { font-size: 12px; color: #a08080 !important; }
.ops-notice-modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
@keyframes ops-notice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 40, 40, .45); }
    50% { box-shadow: 0 0 0 8px rgba(180, 40, 40, 0); }
}
.ops-check {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    color: #ccc !important;
}
.ops-check input { width: auto; }
.ops-inline { display: inline-flex; align-items: center; gap: 6px; color: #888; }
.ops-inline input[type=number] { width: 72px; }
.ops-page { display: flex; flex-direction: column; height: 100vh; background: var(--bg-dark); overflow: hidden; }
.ops-page .top-bar { position: sticky; top: 0; z-index: 5; }
.ops-health { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.ops-chip {
    font-size: 11px; letter-spacing: .04em; padding: 2px 7px; border-radius: 10px;
    background: #1c1c22; color: #aaa; border: 1px solid #2a2a30;
}
.ops-chip.ok { color: #8c8; }
.ops-chip.off { color: #666; }
.ops-chip.warn { color: #f3d27a; border-color: #6a5010; }
.ops-chip.esi-ok { color: #8c8; }
.ops-chip.esi-degraded { color: #f3d27a; }
.ops-chip.esi-down { color: #e88; }
.ops-chip.esi-unknown { color: #888; }
.ops-kpis {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
    padding: 12px 12px 0;
    flex-shrink: 0;
}
.ops-kpi {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px;
    padding: 12px 14px;
}
.ops-kpi b { display: block; font-size: 28px; font-weight: 650; color: #e8e0c8; font-variant-numeric: tabular-nums; }
.ops-kpi span { color: var(--text-muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.ops-body {
    display: flex; min-height: 0; flex: 1;
    margin: 10px 12px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.ops-nav {
    width: 168px; flex-shrink: 0;
    padding: 10px 8px;
    border-right: 1px solid #2a2a34;
    display: flex; flex-direction: column; gap: 2px;
    overflow-y: auto;
    background: #191920;
}
.ops-nav-btn {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px;
    text-align: left;
    background: transparent; border: 0;
    color: #c8c8d0;
    font-size: 13px; line-height: 1.3;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.ops-nav-btn:hover { background: #262630; color: #f0f0f4; }
.ops-nav-btn.active { background: #2e3344; color: #f3d27a; font-weight: 600; }
.ops-nav-count {
    background: #e6a817; color: #0d0d0f;
    font-size: 10px; font-weight: 700;
    min-width: 16px; padding: 1px 5px;
    border-radius: 8px; text-align: center;
}
.ops-pane {
    flex: 1; min-width: 0; min-height: 0;
    overflow-y: auto;
    padding: 12px 14px 18px;
}
.ops-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.ops-card {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px;
    padding: 12px 14px; min-width: 0;
}
.ops-card h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #c8b88a; }
.ops-muted { color: var(--text-muted); font-size: 12px; }
.ops-empty { padding: 24px; color: #666; }
.ops-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ops-table th { text-align: left; color: #666; font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.ops-table td { padding: 5px 6px; border-bottom: 1px solid #1e1e24; vertical-align: top; }
.ops-id { color: #555; font-size: 10px; margin-left: 4px; }
.ops-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ops-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #888; }
.ops-form input, .ops-form select, .ops-form textarea {
    background: #0d0d0f; border: 1px solid var(--border); color: var(--text);
    padding: 6px 8px; border-radius: 4px; font: inherit;
}
.ops-span { grid-column: 1 / -1; }
.ops-span-2 { grid-column: 1 / -1; }
.ops-actions { display: flex; gap: 8px; align-items: center; }
.ops-btn {
    background: #e6a817; color: #0d0d0f; border: 0; border-radius: 4px;
    padding: 6px 12px; font-weight: 700; font-size: 12px; cursor: pointer;
}
a.ops-btn { text-decoration: none; display: inline-flex; align-items: center; }
.ops-btn.ghost { background: #2a2a30; color: #ccc; }
.ops-btn.ghost.on { outline: 1px solid #e6a817; color: #e6a817; }
.ops-btn.danger { background: #8a3030; color: #f0d0d0; }
.ops-btn:disabled { opacity: .5; cursor: default; }
.ops-tokens { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: #888; font-size: 12px; }
.ops-hit { font-size: 12px; margin: 8px 0 0; color: #ccc; }
.ops-warn { font-size: 12px; margin: 8px 0 0; color: #e8a05a; }
.ops-err { color: #e88; font-size: 12px; }
.ops-cust-picker { margin: 8px 0 12px; max-width: 420px; }
.ops-cust-picker .share-input {
    width: 100%;
    background: #0d0d0f;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 10px;
    border-radius: 4px;
    font: inherit;
}
.ops-dossier { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ops-dossier-head { display: flex; gap: 10px; align-items: center; }
.ops-dossier-head img { border-radius: 4px; border: 1px solid #2a2a30; }
.ops-subh {
    margin: 12px 0 4px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #888;
}
.ops-form .ops-check { flex-direction: row; align-items: center; gap: 8px; }
@media (max-width: 900px) {
    .ops-kpis, .ops-grid, .ops-form { grid-template-columns: 1fr; }
    .ops-body { flex-direction: column; }
    .ops-nav { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #2a2a34; }
    .ops-nav-btn { width: auto; }
}

.ticket-thread { display: flex; flex-direction: column; gap: 8px; }
.ticket-shot {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border, #2a2a30);
    border-radius: 6px;
    background: #0c0c10;
    display: block;
}
.ticket-msg {
    background: #121216; border: 1px solid #2a2a30; border-radius: 6px;
    padding: 8px 10px; font-size: 13px; color: #ddd; white-space: pre-wrap;
}
.ticket-msg.staff { border-color: #5a4814; background: #16140e; }
.ticket-msg.pilot { border-color: #2a2a30; }
.ticket-msg-meta { font-size: 11px; color: #888; margin-bottom: 4px; }
.ticket-body {
    width: 100%; background: #0d0d0f; border: 1px solid var(--border); color: var(--text);
    padding: 8px; border-radius: 4px; font: inherit; resize: vertical;
}
.ticket-row-on { background: #1c1a12; }
.ticket-row { cursor: pointer; }
.ops-kpis-inline { margin: 0 0 10px; }
.ops-link {
    background: none; border: 0; padding: 0; color: #c8b88a; cursor: pointer;
    font: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.ops-link:hover { color: #e6c86a; }
.ops-tree-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 4px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #1a1a1e;
    color: #c8b88a;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}
.ops-tree-btn:hover { border-color: #e6a817; color: #e6a817; }
.ops-tree-rail {
    display: inline-block;
    width: 10px;
    height: 12px;
    margin: 0 8px 0 6px;
    border-left: 1px solid #3a3a44;
    border-bottom: 1px solid #3a3a44;
    vertical-align: middle;
}
.ops-bag-count {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 8px;
    background: #2a2a30;
    color: #c8b88a;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
}
.ops-pilot-child td:first-child { color: #c8c8c8; }
.ops-pilot-bag td { color: #888; }
.ops-row-link { cursor: pointer; }
.ops-row-link:hover { background: #1c1a12; }
.ops-table tbody tr { cursor: default; }
.ops-table tbody tr[style*="cursor"] { cursor: pointer; }
.ops-table tbody tr:hover { background: #18181c; }

.support-drawer {
    position: fixed;
    top: 46px;
    right: 8px;
    z-index: 140;
    width: 420px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: 10px 12px 14px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,.5);
    font-size: 12px;
}
.support-drawer .ops-table { font-size: 12px; }
.support-compose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.support-compose label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: #888;
}
.support-compose input,
.support-compose select,
.support-compose textarea {
    background: #0d0d0f;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 8px;
    border-radius: 4px;
    font: inherit;
}
.ticket-row-need td:last-child { color: #e6a817; font-weight: 600; }
.support-unread {
    background: #3a3010;
    color: #f3d27a;
}

.watch-panel { width: 340px; max-height: min(70vh, 560px); overflow: auto; }
.alerts-panel { width: 380px; max-height: min(75vh, 640px); }
.alerts-panel .alerts-prefs { max-width: none; }
.watch-add {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 12px;
}
.watch-hit-row,
.watch-entry-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: 0;
    color: var(--text);
    text-align: left;
    padding: 4px 0;
    font: inherit;
    cursor: pointer;
}
.watch-entry-row { cursor: default; }
.watch-hit-row:hover { color: #e6a817; }
.watch-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
.watch-hit-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-hit-where { color: #888; font-size: 11px; }

.system-node.watch-hit .sys-card,
.system-node.watch-hit rect.sys-body {
    stroke: #e6a817;
    filter: drop-shadow(0 0 6px rgba(230, 168, 23, .55));
}
.system-node.watch-hit {
    outline: none;
}
path.watch-hit-link {
    stroke: #e6a817 !important;
    stroke-width: 2.75 !important;
    filter: drop-shadow(0 0 4px rgba(230, 168, 23, .5));
}

.account-page { display: flex; flex-direction: column; height: 100vh; background: var(--bg-dark); overflow: hidden; }
.account-page .top-bar { position: sticky; top: 0; z-index: 5; }
.account-body {
    display: flex; min-height: 0; flex: 1;
    margin: 10px 12px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.account-balance {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 650;
    color: #e6c86a;
    font-variant-numeric: tabular-nums;
}
.account-balance.frozen { color: #e88; }
.account-month {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 650;
    color: #e6c86a;
    font-variant-numeric: tabular-nums;
}
.account-slider {
    display: flex; flex-direction: column; gap: 6px;
    margin: 8px 0 10px; max-width: 520px;
    color: #c8c0a8; font-size: 13px;
}
.account-slider input[type=range] {
    width: 100%; accent-color: #e6a817;
}
.account-sub-maps { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.account-sub-map {
    padding: 10px 12px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 6px;
}
.account-sub-map-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 4px; color: #e8e0c8;
}
.account-page .wallet-pay-card {
    margin: 12px 0 4px;
    padding: 12px 14px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 6px;
    max-width: 480px;
}
.account-ledger td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-ledger td.credit { color: #6fdf9a; }
.account-ledger td.debit { color: #e88; }
.account-char-list { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.account-char {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: #151518;
    border: 1px solid #2a2a30;
    border-radius: 6px;
}
.account-char.primary { border-color: #5a4a20; }
.account-char-meta { flex: 1; min-width: 0; }
.account-char-name { font-weight: 650; color: #e8e0c8; display: flex; align-items: center; gap: 8px; }
.account-char-badge {
    font-size: 10px; font-weight: 700; letter-spacing: .04em;
    color: #e6c86a; border: 1px solid #5a4a20; border-radius: 8px;
    padding: 1px 6px;
}
.account-char-sys { font-size: 12px; color: #8a8a96; margin-top: 2px; }
.account-char-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.account-support-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.account-support {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
    gap: 16px;
    min-height: 0;
}
.account-support-thread .ticket-thread { max-height: calc(100vh - 240px); overflow: auto; }
.alerts-prefs { max-width: 560px; }
.alerts-prefs .hook-flags { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-size: 14px; color: #ddd; }
.alerts-prefs .live-sec-head { margin: 14px 0 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #8a8a96; }
@media (max-width: 800px) {
    .account-support { grid-template-columns: 1fr; }
}

.ops-usage { margin-bottom: 12px; }
.ops-usage-chart {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: 220px 22px;
    column-gap: 8px;
    margin-top: 8px;
}
.ops-usage-y { position: relative; grid-column: 1; grid-row: 1; }
.ops-usage-main { grid-column: 2; grid-row: 1; }
.ops-usage-x { grid-column: 2; grid-row: 2; }
.ops-usage-y span {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    font-size: 10px;
    color: #8a8a94;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.ops-usage-main {
    position: relative;
    background: #0a0a0c;
    border: 1px solid #2a2a30;
    border-radius: 6px;
    overflow: hidden;
    cursor: crosshair;
}
.ops-usage-svg { display: block; width: 100%; height: 100%; }
.ops-usage-grid { stroke: #24242c; stroke-width: 0.4; }
.ops-usage-hub, .ops-usage-unique, .ops-usage-tracked {
    fill: none;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}
.ops-usage-hub { stroke: #e6a817; stroke-width: 2; }
.ops-usage-unique { stroke: #8a8a94; stroke-width: 1.5; stroke-dasharray: 4 3; }
.ops-usage-tracked { stroke: #6aa0c8; stroke-width: 2; }
.ops-usage-cross { stroke: #e8dcc0; stroke-width: 0.4; stroke-dasharray: 1.5 1.5; }
.ops-usage-x { position: relative; }
.ops-usage-x span {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    font-size: 10px;
    color: #8a8a94;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.ops-usage-tip {
    position: absolute;
    top: 8px;
    transform: translateX(-12%);
    background: #16140e;
    border: 1px solid #5a4814;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    color: #e8e0c8;
    z-index: 3;
    pointer-events: none;
    min-width: 148px;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
    line-height: 1.45;
}
.ops-usage-tip strong { display: block; margin-bottom: 4px; color: #f8e8c0; }
.ops-usage-tip-empty { color: #888; }
.ops-usage-legend {
    display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
    font-size: 11px; color: #888; margin-top: 6px;
}
.ops-usage-leg {
    background: transparent; border: 0; padding: 0; cursor: pointer; font: inherit;
    opacity: .4;
}
.ops-usage-leg.on { opacity: 1; }
.ops-usage-legend .hub, .ops-usage-leg.hub { color: #e6a817; }
.ops-poll-strip {
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    overflow: visible;
}
.ops-poll-strip .ops-notice-copy {
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 8px 14px;
}
.ops-poll-strip strong {
    color: #eef6fa;
    font-size: 14px;
    line-height: 1.3;
}
.ops-poll-opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ops-poll-opts.modal { flex-direction: column; align-items: stretch; margin: 12px 0; }
.ops-poll-opt {
    border: 1px solid #4a6a80;
    background: #0e1c26;
    color: #e8e0c8;
    border-radius: 4px;
    padding: 6px 12px;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}
.ops-poll-opt.on { border-color: #e6a817; color: #e6a817; background: #241c10; }
.ops-poll-opt:disabled { opacity: .55; cursor: default; }
.ops-poll-tally { list-style: none; margin: 8px 0; padding: 0; }
.ops-poll-tally li { display: grid; grid-template-columns: 1fr auto 120px; gap: 8px; align-items: center; padding: 4px 0; }
.ops-poll-meter { display: block; height: 8px; background: #1a1a1e; border-radius: 4px; overflow: hidden; }
.ops-poll-meter > span { display: block; height: 100%; background: #e6a817; }
.ops-usage-legend .unique, .ops-usage-leg.unique { color: #8a8a94; }
.ops-usage-legend .tracked, .ops-usage-leg.tracked { color: #6aa0c8; }
.ops-usage-tip .hub { color: #e6a817; }
.ops-usage-tip .unique { color: #8a8a94; }
.ops-usage-tip .tracked { color: #6aa0c8; }

.ops-cash-table { margin: 12px 0 8px; }
.ops-cash-table th:not(:first-child),
.ops-cash-table td { text-align: right; font-variant-numeric: tabular-nums; }
.ops-cash-table tbody th { text-align: left; font-weight: 600; color: #c8c0a8; }








