:root {
    --cyber-black: #000000;
    --cyber-dark: #0a0a0a;
    --cyber-green: #00ff41;
    --cyber-cyan: #00e5ff;
    --cyber-magenta: #ff00ff;
    --cyber-yellow: #ffd700;
    --cyber-orange: #ff6600;
    --cyber-red: #ff0040;
    --cyber-blue: #4169e1;
    --cyber-purple: #9945ff;
    --cyber-pink: #ff69b4;
    --cyber-dim: #1a1a1a;
    --cyber-muted: #333333;
    --cyber-text: #e0e0e0;
    --chrome-h: 56px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    overflow: hidden;
    height: 100%;
    height: 100dvh;
}
body {
    overflow: hidden;
    font-family: "Play", sans-serif;
    background: var(--cyber-black);
    color: var(--cyber-text);
    height: 100%;
    height: 100dvh;
    -webkit-font-smoothing: antialiased;
    /* allow nested overflow:auto regions to receive touch scroll on iOS */
    touch-action: manipulation;
}
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--cyber-black);
}
::-webkit-scrollbar-thumb {
    background: var(--cyber-muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-green);
}

/* minimal chrome — fill viewport; children own their own scroll */
.page-shell {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.site-chrome {
    flex-shrink: 0;
    border-bottom: 1px solid #151515;
    background: #000;
}
.chrome-inner {
    padding: 8px 12px;
}
.header-row1 {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-zone {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.brand-flag {
    display: inline-flex;
    width: 28px;
    height: 28px;
}
.brand-flag svg {
    width: 100%;
    height: 100%;
}
.map-zone {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}
.nav-btn {
    color: #888;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 2px;
}
.nav-btn:hover {
    color: #ccc;
}
.nav-here {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.3);
}
.nav-you {
    color: var(--cyber-cyan);
}
.nav-you.nav-here {
    color: var(--cyber-cyan);
    border-color: rgba(0, 229, 255, 0.45);
    background: rgba(0, 229, 255, 0.08);
}
/* super dashboard /me */
.me-stage {
    max-width: 1100px;
}
.me-id-row {
    display: grid;
    grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.me-id-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #080808;
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 4px;
}
.me-avatar {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--cyber-cyan);
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.me-id-copy {
    flex: 1;
    min-width: 0;
}
.me-handle {
    font-size: 16px;
    font-weight: 700;
    color: #e8e8e8;
}
.me-since {
    font-size: 11px;
    color: #555;
    margin-top: 2px;
}
.me-bal-card {
    padding: 12px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
}
.me-counts {
    margin-bottom: 14px;
}
a.me-kpi {
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.1s,
        background 0.1s;
}
a.me-kpi:hover {
    border-color: #333;
    background: #0c0c0c;
}
.me-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 22px;
}
.me-actions .cta-btn {
    min-height: 52px;
}
.me-section {
    margin-bottom: 22px;
}
.me-section-h {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #777;
}
.me-section-h a {
    color: var(--cyber-cyan);
    text-decoration: none;
    letter-spacing: 0.8px;
}
.me-section-h a:hover {
    color: var(--cyber-green);
}
.me-empty {
    padding: 14px 16px;
    background: #080808;
    border: 1px dashed #222;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
}
.me-empty a {
    color: var(--cyber-green);
}
.me-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.me-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px 10px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.1s;
}
.me-chip:hover {
    border-color: #333;
}
.me-chip-name {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.4px;
    color: #ddd;
}
.me-chip-name.worker {
    color: var(--cyber-cyan);
}
.me-chip-name.machine {
    color: var(--cyber-orange);
}
.me-chip-name.land {
    color: var(--cyber-green);
}
.me-chip-name.event {
    color: var(--cyber-magenta);
}
.me-chip-name.city {
    color: var(--cyber-yellow);
}
.me-chip-meta {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.3px;
}
.me-intent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.me-intent {
    display: grid;
    grid-template-columns: 48px 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    background: #080808;
    border: 1px solid #151515;
    border-radius: 3px;
    font-size: 12px;
}
.me-intent .ii-id {
    color: #555;
    font-variant-numeric: tabular-nums;
}
.me-intent .ii-fleet {
    color: #ccc;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.me-intent .ii-act {
    color: var(--cyber-cyan);
    font-weight: 700;
    letter-spacing: 0.8px;
    font-size: 10px;
}
.me-intent .ii-flat {
    color: #666;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 720px) {
    .me-id-row {
        grid-template-columns: 1fr 1fr;
    }
    .me-id-card {
        grid-column: 1 / -1;
    }
    .me-intent {
        grid-template-columns: 40px 1fr auto;
    }
    .me-intent .ii-flat {
        display: none;
    }
}
/* economy: elements · BOM · market */
.eco-msg {
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #222;
}
.eco-msg.ok {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.35);
    background: rgba(0, 255, 65, 0.06);
}
.eco-msg.err {
    color: var(--cyber-red);
    border-color: rgba(255, 0, 64, 0.35);
    background: rgba(255, 0, 64, 0.06);
}
.bom-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.bom-card {
    padding: 14px 16px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
}
.bom-card.ready {
    border-color: rgba(0, 255, 65, 0.28);
}
.bom-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.bom-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #e0e0e0;
}
.bom-blurb {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}
.bom-io {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: start;
}
.bom-col-h {
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}
.bom-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    font-size: 12px;
    color: #aaa;
    padding: 3px 0;
}
.bom-line.short {
    color: var(--cyber-red);
}
.bom-line.out {
    color: var(--cyber-green);
}
.bom-have {
    color: #444;
    font-size: 11px;
}
.bom-arrow {
    color: #444;
    font-size: 18px;
    padding-top: 18px;
}
.bom-note {
    margin-top: 8px;
    font-size: 11px;
    color: #444;
    letter-spacing: 0.4px;
}
.eco-table-h,
.market-table-h {
    grid-template-columns: 48px minmax(120px, 1.4fr) 80px 72px 80px minmax(
            100px,
            1.2fr
        ) !important;
}
.eco-row,
.market-row {
    grid-template-columns: 48px minmax(120px, 1.4fr) 80px 72px 80px minmax(
            100px,
            1.2fr
        ) !important;
}
.market-panel {
    padding: 14px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    margin-bottom: 8px;
}
.market-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.market-select {
    max-width: 220px;
}
.market-have {
    font-size: 12px;
    color: #666;
}
.market-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.market-qty-in {
    width: 56px;
    padding: 6px 8px;
    font-size: 12px;
}
@media (max-width: 720px) {
    .bom-io {
        grid-template-columns: 1fr;
    }
    .bom-arrow {
        display: none;
    }
    .eco-table-h .st-region,
    .eco-row .st-region {
        display: none;
    }
}
/* ERP studio */
.studio-create-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.studio-create-bar .cta-btn {
    min-height: 56px;
}
.studio-section-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 11px;
    letter-spacing: 1.4px;
    font-weight: 700;
    color: #777;
}
.studio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.studio-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #080808;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
}
.studio-row:hover {
    border-color: #333;
}
.studio-row-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
}
.studio-kind {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--cyber-cyan);
    border: 1px solid rgba(0, 229, 255, 0.35);
    padding: 4px 8px;
    border-radius: 2px;
    flex-shrink: 0;
}
.studio-title {
    font-size: 15px;
    font-weight: 700;
    color: #e4e4e4;
    letter-spacing: 0.3px;
}
.studio-meta {
    font-size: 11px;
    color: #555;
    margin-top: 3px;
    word-break: break-all;
}
.studio-row-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}
button.kpi.me-kpi,
button.studio-kpi {
    font-family: inherit;
    cursor: pointer;
    border: 1px solid #1a1a1a;
    width: 100%;
    text-align: left;
    color: inherit;
    background: #080808;
}
.studio-row.hi {
    border-color: rgba(0, 255, 65, 0.45);
    box-shadow: 0 0 16px rgba(0, 255, 65, 0.08);
}
.sys-tag {
    font-size: 10px;
    color: var(--cyber-yellow);
    letter-spacing: 1px;
}
.link-meta {
    margin-top: 4px;
}
.link-btn {
    font-family: inherit;
    font-size: 11px;
    color: var(--cyber-cyan);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.chain-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
}
.chain-step {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--cyber-green);
    padding: 4px 8px;
    border: 1px solid rgba(0, 255, 65, 0.25);
    border-radius: 2px;
}
.chain-arr {
    color: #444;
    font-size: 12px;
}
.sheet-wide {
    max-width: min(520px, 96vw);
}
/* full-page studio forms (no overlays) */
.studio-breadcrumb {
    font-size: 12px;
    color: #555;
    margin-bottom: 12px;
    letter-spacing: 0.4px;
}
.studio-breadcrumb a {
    color: var(--cyber-cyan);
    text-decoration: none;
}
.studio-form-page {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.studio-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}
.studio-detail {
    max-width: 720px;
}
.studio-kind-lg {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--cyber-cyan);
    border: 1px solid rgba(0, 229, 255, 0.35);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 10px;
}
.studio-title-lg {
    font-size: 22px;
    font-weight: 700;
    color: #e8e8e8;
    margin: 0 0 10px;
    word-break: break-word;
}
.studio-row-link {
    text-decoration: none;
    color: inherit;
}
.studio-row-link:hover {
    border-color: rgba(0, 255, 65, 0.35);
}
.draft-kind {
    color: var(--cyber-yellow) !important;
    border-color: rgba(255, 215, 0, 0.4) !important;
}
a.kpi.me-kpi {
    text-decoration: none;
    color: inherit;
    display: block;
}
/* Views — projections */
.view-detail {
    max-width: 1100px;
}
.view-summary {
    color: var(--cyber-green);
    font-size: 13px;
    margin: 10px 0 8px;
    letter-spacing: 0.3px;
}
.view-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.view-table-wrap {
    overflow-x: auto;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    background: #080808;
}
.view-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.view-table th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 1.2px;
    color: #666;
    padding: 10px 12px;
    border-bottom: 1px solid #1c1c1c;
    white-space: nowrap;
}
.view-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #121212;
    color: #ccc;
    word-break: break-word;
}
.view-table tr:hover td {
    background: #0c0c0c;
}
.view-kanban {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    align-items: start;
}
.kanban-col {
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    min-height: 120px;
}
.kanban-h {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--cyber-cyan);
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a1a;
}
.kanban-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}
.kanban-card,
.kanban-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #0c0c0c;
    border: 1px solid #222;
    border-radius: 3px;
    padding: 10px;
}
.kanban-card-link:hover .kanban-card,
a.kanban-card-link:hover {
    border-color: rgba(0, 255, 65, 0.4);
}
a.kanban-card-link {
    border: 1px solid #222;
    border-radius: 3px;
    padding: 0;
}
a.kanban-card-link .kanban-card {
    border: none;
}
/* ERP kernel layers */
.kernel-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
}
.kernel-layer {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 12px 14px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    align-items: baseline;
}
.kernel-layer.accent {
    border-color: rgba(0, 255, 65, 0.3);
}
.kernel-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--cyber-yellow);
}
.kernel-body {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}
@media (max-width: 560px) {
    .kernel-layer {
        grid-template-columns: 1fr;
    }
}
.search-dock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid #151515;
    background: #000;
}
.dock-count {
    font-size: 11px;
    color: #666;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.dock-credit {
    font-size: 11px;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
}
.act-pill {
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 5px 9px;
    border-radius: 2px;
    border: 1px solid #222;
    background: #0a0a0a;
    color: #888;
    cursor: pointer;
}
.act-pill.sel {
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    background: rgba(0, 229, 255, 0.08);
}
.act-pill.locked {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ─── cyberia: fleets & flats experimental console ─── */
/* fill the viewport; only side panels scroll, map stays locked center */
.cyberia-shell {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cyberia-shell .site-chrome,
.cyberia-chrome {
    flex-shrink: 0;
}
/* single header row only — no subhead strip; stage eats the rest */
.cyberia-chrome .header-row2 {
    display: none;
}
.cyberia-chrome .chrome-inner {
    padding-bottom: 6px;
}
.cyberia-phase-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: var(--cyber-green);
    border: 1px solid rgba(0, 255, 65, 0.35);
    padding: 4px 12px;
    border-radius: 2px;
    margin: 0 12px;
}

/* ─── cities catalog ─── */
.cities-shell {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #000;
}
/* sole page scroller on catalog screens — must keep a definite height */
.cities-stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 28px 20px 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}
.cities-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}
.cities-kicker {
    font-size: 11px;
    letter-spacing: 2px;
    color: #555;
    font-weight: 700;
    margin-bottom: 8px;
}
.cities-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: 1px;
    color: #e0e0e0;
    margin: 0 0 8px;
}
.cities-lead {
    font-size: 14px;
    color: #777;
    max-width: 420px;
    line-height: 1.45;
    margin: 0;
}
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.city-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 14px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition:
        border-color 0.12s,
        background 0.12s,
        box-shadow 0.12s;
    min-height: 180px;
}
a.city-card:hover,
button.city-card:hover {
    border-color: #333;
    background: #0c0c0c;
}
.city-card.live {
    border-color: rgba(0, 255, 65, 0.28);
    box-shadow: 0 0 24px rgba(0, 255, 65, 0.06);
}
.city-card.live:hover {
    border-color: rgba(0, 255, 65, 0.55);
    box-shadow: 0 0 28px rgba(0, 255, 65, 0.12);
}
.city-card.ghost {
    border-style: dashed;
    opacity: 0.85;
}
.city-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.city-rank {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #555;
}
.city-status {
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid #222;
}
.city-status.live {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.4);
    background: rgba(0, 255, 65, 0.08);
}
.city-status.founding {
    color: var(--cyber-yellow);
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.06);
}
.city-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #e8e8e8;
}
.city-region {
    font-size: 12px;
    color: #666;
    letter-spacing: 0.3px;
}
.city-blurb {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
    flex: 1;
    margin: 4px 0 0;
}
.city-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #151515;
    font-size: 11px;
    color: #666;
    letter-spacing: 0.4px;
}
.city-open {
    margin-left: auto;
    color: var(--cyber-cyan);
    font-weight: 700;
    letter-spacing: 0.8px;
}
.city-card.live .city-open {
    color: var(--cyber-green);
}
.cta-found {
    color: var(--cyber-yellow);
    border-color: rgba(255, 215, 0, 0.65);
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.1);
    font-weight: 800;
}
.cta-found:hover {
    background: rgba(255, 215, 0, 0.18);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.18);
}
.cities-dock {
    flex-shrink: 0;
    z-index: 20;
}
.cities-dock .dock-found {
    flex: 1;
    max-width: 420px;
}
/* ensure footer never collapses on catalog pages */
.cities-shell > .search-dock,
.cities-shell > .cyberia-dock {
    flex-shrink: 0;
}
.found-label {
    display: block;
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #666;
    font-weight: 700;
    margin: 10px 0 4px;
}
.found-input {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 2px;
    color: #e0e0e0;
    outline: none;
}
.found-input:focus {
    border-color: rgba(255, 215, 0, 0.5);
}
.found-err {
    margin-top: 8px;
    color: var(--cyber-red);
    font-size: 12px;
}
.intent-commit.found {
    margin-top: 14px;
    border-color: var(--cyber-yellow);
    color: var(--cyber-yellow);
    background: rgba(255, 215, 0, 0.1);
}
.intent-commit.event {
    margin-top: 14px;
    border-color: var(--cyber-magenta);
    color: var(--cyber-magenta);
    background: rgba(255, 0, 255, 0.1);
}
.cta-event {
    color: var(--cyber-magenta);
    border-color: rgba(255, 0, 255, 0.65);
    background: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 18px rgba(255, 0, 255, 0.1);
    font-weight: 800;
}
.cta-event:hover {
    background: rgba(255, 0, 255, 0.18);
    box-shadow: 0 0 24px rgba(255, 0, 255, 0.18);
}
.city-status.upcoming {
    color: var(--cyber-cyan);
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.08);
}
.event-card .city-name {
    font-size: 18px;
}
/* list toolbar — plots / places */
.list-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px 14px 12px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
}
.list-search {
    max-width: 420px;
}
.list-filters,
.list-sorts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.list-sort-label {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #555;
    font-weight: 700;
    margin-right: 4px;
}
.chip {
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.9px;
    padding: 5px 10px;
    border-radius: 2px;
    border: 1px solid #222;
    background: #0a0a0a;
    color: #777;
    cursor: pointer;
    transition:
        border-color 0.1s,
        color 0.1s,
        background 0.1s;
}
.chip:hover {
    border-color: #444;
    color: #bbb;
}
.chip-on {
    border-color: rgba(0, 255, 65, 0.45);
    color: var(--cyber-green);
    background: rgba(0, 255, 65, 0.08);
}
.rating-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid #222;
}
.rating-badge.tier-a {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.45);
    background: rgba(0, 255, 65, 0.1);
}
.rating-badge.tier-b {
    color: var(--cyber-cyan);
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.08);
}
.rating-badge.tier-c {
    color: var(--cyber-yellow);
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.06);
}
.rating-badge.tier-d {
    color: var(--cyber-orange);
    border-color: rgba(255, 102, 0, 0.4);
    background: rgba(255, 102, 0, 0.08);
}
.rating-badge.tier-e {
    color: #888;
    border-color: #333;
}
.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}
.rating-row {
    display: grid;
    grid-template-columns: 44px 1fr 28px;
    gap: 8px;
    align-items: center;
    font-size: 9px;
    letter-spacing: 0.8px;
    color: #555;
    font-weight: 700;
}
.rating-track {
    height: 4px;
    background: #151515;
    border-radius: 1px;
    overflow: hidden;
}
.rating-fill {
    height: 100%;
    border-radius: 1px;
}
.rating-fill.size {
    background: var(--cyber-cyan);
}
.rating-fill.zone {
    background: var(--cyber-yellow);
}
.rating-fill.depth {
    background: var(--cyber-magenta);
}
.rating-n {
    text-align: right;
    color: #666;
    font-variant-numeric: tabular-nums;
}
.place-kind {
    font-weight: 700;
    letter-spacing: 0.8px;
}
.place-kind.estate {
    color: var(--cyber-green);
}
.place-kind.landmark {
    color: var(--cyber-yellow);
}
.place-kind.amenity {
    color: var(--cyber-cyan);
}
.place-kind.nature {
    color: #6f6;
}
.place-kind.trail {
    color: var(--cyber-orange);
}
.plot-card,
.place-card {
    min-height: 160px;
}
.cyberia-nav {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}
/* bank above banks — mock dashboard */
.bank-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.bank-mock-tag {
    font-size: 10px;
    letter-spacing: 1.2px;
    color: var(--cyber-yellow);
    border: 1px solid rgba(255, 215, 0, 0.35);
    padding: 4px 10px;
    border-radius: 2px;
    font-weight: 700;
}
.bank-dash {
    margin-bottom: 8px;
}
.bank-invariant {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #080808;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
}
.bank-inv-k {
    font-size: 10px;
    letter-spacing: 1.4px;
    font-weight: 700;
    color: var(--cyber-green);
}
.bank-inv-eq {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    color: #ddd;
    background: transparent;
}
.bank-inv-sub {
    font-size: 11px;
    color: #666;
    letter-spacing: 0.3px;
}
.bank-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.kpi,
.kpi.ok,
.kpi.warn,
.kpi.bad {
    padding: 12px 12px 10px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
}
.kpi.ok {
    border-color: rgba(0, 255, 65, 0.35);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.06);
}
.kpi.warn {
    border-color: rgba(255, 215, 0, 0.4);
}
.kpi.bad {
    border-color: rgba(255, 0, 64, 0.45);
}
.kpi-lab {
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}
.kpi-val {
    font-size: 22px;
    font-weight: 700;
    color: #e8e8e8;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.3px;
}
.kpi.ok .kpi-val {
    color: var(--cyber-green);
}
.kpi.warn .kpi-val {
    color: var(--cyber-yellow);
}
.kpi.bad .kpi-val {
    color: var(--cyber-red);
}
.kpi-val.pos {
    color: var(--cyber-green);
}
.kpi-sub {
    margin-top: 4px;
    font-size: 10px;
    color: #555;
    letter-spacing: 0.3px;
}
.bank-util {
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
}
.bank-util-lab {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
}
.bank-util-track {
    height: 6px;
    background: #151515;
    border-radius: 2px;
    overflow: hidden;
}
.bank-util-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-green));
    border-radius: 2px;
}
.bank-section-h {
    font-size: 11px;
    letter-spacing: 1.6px;
    font-weight: 700;
    color: #777;
    margin-bottom: 10px;
}
.honesty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}
.honesty-card {
    padding: 12px;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    position: relative;
}
.hon-n {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #222;
}
.hon-lab {
    font-size: 10px;
    letter-spacing: 1.1px;
    font-weight: 700;
    color: #666;
    margin-bottom: 6px;
}
.hon-val {
    font-size: 18px;
    font-weight: 700;
    color: #e0e0e0;
    font-variant-numeric: tabular-nums;
}
.hon-val.pos {
    color: var(--cyber-green);
}
.hon-why {
    margin-top: 6px;
    font-size: 11px;
    color: #555;
    line-height: 1.35;
}
.bank-footnote {
    margin-top: 14px;
    font-size: 12px;
    color: #555;
    line-height: 1.45;
    max-width: 720px;
}
.bank-footnote em {
    color: #888;
    font-style: normal;
    font-weight: 600;
}
.regime {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 1px 6px;
    border-radius: 2px;
    border: 1px solid #222;
}
.regime.taker {
    color: var(--cyber-cyan);
    border-color: rgba(0, 229, 255, 0.35);
}
.regime.maker {
    color: var(--cyber-orange);
    border-color: rgba(255, 102, 0, 0.4);
}
.regime.transition {
    color: var(--cyber-yellow);
    border-color: rgba(255, 215, 0, 0.35);
}
.hub-mark {
    color: #555;
    font-size: 9px;
    letter-spacing: 0.6px;
}
.win-open {
    color: var(--cyber-green) !important;
    font-weight: 700;
}
.bank-table-body {
    max-height: none !important;
    overflow: visible !important;
}
/* earth states table */
.states-table-wrap {
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    background: #080808;
}
.states-table-h,
.states-row {
    display: grid;
    grid-template-columns:
        48px minmax(140px, 1.6fr)
        72px 100px 72px 72px minmax(90px, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
}
.states-table-h {
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: #555;
    border-bottom: 1px solid #151515;
    background: #0a0a0a;
    position: sticky;
    top: 0;
    z-index: 2;
}
.states-table-body {
    /* table lives inside .cities-stage scroll — no nested trap on mobile */
    max-height: none;
    overflow: visible;
}
@media (min-width: 721px) {
    .states-table-body {
        max-height: min(70vh, 720px);
        overflow: auto;
    }
}
.states-row {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #111;
    font-size: 13px;
    transition: background 0.1s;
}
.states-row:last-child {
    border-bottom: none;
}
.states-row:hover {
    background: #0e0e0e;
}
.states-row.podium-1 {
    background: rgba(255, 215, 0, 0.04);
}
.states-row.podium-2 {
    background: rgba(192, 196, 204, 0.03);
}
.states-row.podium-3 {
    background: rgba(205, 127, 50, 0.04);
}
.st-rank {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}
.st-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.st-flag {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.st-name-text {
    color: #ddd;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-code {
    color: #444;
    font-size: 10px;
    letter-spacing: 0.6px;
    flex-shrink: 0;
}
.st-token {
    color: var(--cyber-yellow);
    font-weight: 700;
    letter-spacing: 0.6px;
    font-size: 12px;
}
.st-cap {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #e8e8e8;
}
.st-cap.soon {
    color: #555;
    font-weight: 500;
    font-style: italic;
}
.st-delta,
.st-pop {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #888;
    font-size: 12px;
}
.st-region {
    color: #666;
    font-size: 11px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 900px) {
    .states-table-h .st-pop,
    .states-table-h .st-region,
    .states-row .st-pop,
    .states-row .st-region {
        display: none;
    }
    .states-table-h,
    .states-row {
        grid-template-columns: 40px minmax(120px, 1.4fr) 64px 88px 64px;
    }
}
@media (max-width: 560px) {
    .states-table-h .st-delta,
    .states-table-h .st-token,
    .states-row .st-delta,
    .states-row .st-token {
        display: none;
    }
    .states-table-h,
    .states-row {
        grid-template-columns: 36px 1fr 80px;
    }
}
/* robots catalog */
.robots-section {
    margin-top: 28px;
}
.robots-section:first-of-type {
    margin-top: 8px;
}
.robots-section-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.robots-section-h .fleet-section {
    border-bottom: none;
    padding: 0;
    font-size: 11px;
    letter-spacing: 1.6px;
    color: #777;
}
.robots-section-n {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.6px;
}
.robots-grid {
    margin-bottom: 4px;
}
.robot-card .city-name.robot-name.worker {
    color: var(--cyber-cyan);
}
.robot-card .city-name.robot-name.machine {
    color: var(--cyber-orange);
}
.market-card .city-open {
    color: var(--cyber-orange);
}
.intent-commit.buy {
    margin-top: 14px;
    border-color: var(--cyber-orange);
    color: var(--cyber-orange);
    background: rgba(255, 102, 0, 0.1);
}
@media (max-width: 720px) {
    /* keep viewport lock — scrolling happens inside .cities-stage */
    .cities-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .cities-stage {
        padding: 20px 14px 16px;
    }
    .header-row1 {
        flex-wrap: wrap;
    }
    .cyberia-nav {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
    .cities-dock,
    .cyberia-dock {
        flex-wrap: wrap;
        gap: 8px;
        min-height: unset;
        padding: 8px 10px;
        /* safe area for home indicator */
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    .dock-count {
        white-space: normal;
        flex: 1 1 100%;
        order: 3;
    }
    .dock-credit {
        order: 4;
    }
}
.cyberia-phase-pill .phase-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyber-green);
    box-shadow: 0 0 8px var(--cyber-green);
}
.cyberia-ctas {
    display: flex;
    gap: 8px;
    align-items: center;
}
/* primary market actions — live in the footer dock */
.cyberia-cta-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.cyberia-dock.dock-ctas,
.cyberia-dock .dock-ctas {
    flex: 1 1 auto;
}
.cyberia-dock {
    flex-shrink: 0;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    min-height: 72px;
    flex-wrap: nowrap;
    z-index: 30;
    border-top: 1px solid #151515;
    background: #000;
}
@media (max-width: 1100px) {
    .cyberia-cta-bar {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 560px) {
    .cyberia-cta-bar {
        grid-template-columns: 1fr;
    }
}
.cta-btn {
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 6px 14px;
    border-radius: 2px;
    cursor: pointer;
    border: 1px solid;
}
.cta-btn.cta-lg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    font-size: 14px;
    letter-spacing: 1.5px;
    min-height: 56px;
    text-align: left;
}
.cta-ico {
    font-size: 22px;
    line-height: 1;
}
.cta-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cta-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
}
.cta-sub {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.4px;
    opacity: 0.7;
}
.cta-buy {
    color: var(--cyber-orange);
    border-color: rgba(255, 102, 0, 0.7);
    background: rgba(255, 102, 0, 0.12);
    box-shadow: 0 0 18px rgba(255, 102, 0, 0.12);
}
.cta-buy:hover {
    background: rgba(255, 102, 0, 0.22);
    box-shadow: 0 0 24px rgba(255, 102, 0, 0.22);
}
.cta-lease {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.65);
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 18px rgba(0, 255, 65, 0.1);
}
.cta-lease:hover {
    background: rgba(0, 255, 65, 0.18);
    box-shadow: 0 0 24px rgba(0, 255, 65, 0.18);
}
.cta-btn.cta-bold .cta-title {
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.cta-split {
    color: var(--cyber-cyan);
    border-color: rgba(0, 229, 255, 0.75);
    background: rgba(0, 229, 255, 0.12);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.14);
    font-weight: 800;
}
.cta-split:hover {
    background: rgba(0, 229, 255, 0.22);
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.25);
}
.cta-merge {
    color: var(--cyber-magenta);
    border-color: rgba(255, 0, 255, 0.7);
    background: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 18px rgba(255, 0, 255, 0.12);
    font-weight: 800;
}
.cta-merge:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 28px rgba(255, 0, 255, 0.22);
}
.intent-commit.split {
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    background: rgba(0, 229, 255, 0.1);
}
.intent-commit.merge {
    border-color: var(--cyber-magenta);
    color: var(--cyber-magenta);
    background: rgba(255, 0, 255, 0.1);
}
.ii-act.split {
    color: var(--cyber-cyan);
}
.ii-act.merge {
    color: var(--cyber-magenta);
}
.fleet-card.merge-b {
    border-color: var(--cyber-magenta);
    box-shadow: inset 3px 0 0 var(--cyber-magenta);
}
.panel-cta {
    margin-left: auto;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 2px;
    cursor: pointer;
    color: var(--cyber-orange);
    border: 1px solid rgba(255, 102, 0, 0.4);
    background: transparent;
}
.panel-cta.lease {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.4);
}
.panel-cta:hover {
    background: rgba(255, 255, 255, 0.04);
}
.fleet-card.owned {
    border-style: dashed;
}
.fleet-card.catalog {
    width: 100%;
}
.ii-act.buy {
    color: var(--cyber-orange);
}
.ii-act.lease {
    color: var(--cyber-green);
}

/* buy / lease sheets */
.cyberia-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cyberia-sheet {
    width: min(440px, 100%);
    max-height: min(80vh, 640px);
    overflow: auto;
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 4px;
    padding: 14px 16px 16px;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.08);
}
.sheet-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.sheet-x {
    font-family: inherit;
    background: transparent;
    border: 1px solid #333;
    color: #888;
    width: 28px;
    height: 28px;
    border-radius: 2px;
    cursor: pointer;
}
.sheet-x:hover {
    color: #fff;
    border-color: #555;
}
.sheet-note {
    font-size: 12px;
    color: #666;
    line-height: 1.45;
    margin: 0 0 12px;
}
.sheet-catalog {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.sheet-wide {
    width: min(520px, 100%);
}
.sheet-catalog-compact {
    max-height: 140px;
    overflow: auto;
}
.split-pick-label {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #666;
    font-weight: 700;
    margin: 10px 0 6px;
}
.split-dir-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.split-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.split-range {
    flex: 1;
    accent-color: var(--cyber-cyan);
    height: 4px;
    cursor: pointer;
}
.split-ratio-lbl {
    font-size: 13px;
    font-weight: 700;
    color: var(--cyber-yellow);
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.split-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 8px 0 12px;
    align-items: stretch;
}
.split-mini {
    width: 100%;
    height: 160px;
    background: #050505;
    border: 1px solid #1a1a1a;
    border-radius: 3px;
}
.split-metrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    padding: 6px 0;
}
.split-metrics.empty {
    color: #555;
    padding: 12px 0;
}
.sm-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    letter-spacing: 0.3px;
}
.sm-row.total {
    color: #e0e0e0;
    font-weight: 700;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 6px;
    margin-bottom: 2px;
}
.sm-row.a {
    color: var(--cyber-cyan);
    font-weight: 700;
}
.sm-row.b {
    color: var(--cyber-magenta);
    font-weight: 700;
}
.sm-row.dim {
    color: #555;
    font-size: 11px;
}
.sm-row.warn {
    color: var(--cyber-red);
    font-size: 11px;
    margin-top: 4px;
}
@media (max-width: 520px) {
    .split-preview {
        grid-template-columns: 1fr;
    }
}
.intent-commit.lease {
    border-color: var(--cyber-green);
}
/* map is the hero: fixed side rails, flexible center */
.cyberia-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 270px;
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    overflow: hidden;
}
.cyberia-panel {
    background: #050505;
    border: 1px solid #151515;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}
/* center map panel always largest / focused */
.cyberia-flats {
    min-width: 0;
    border-color: #1f1f1f;
    box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.06);
}
.cyberia-fleets,
.cyberia-right {
    min-width: 0;
}
.cyberia-panel-h {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #111;
    flex-shrink: 0;
}
.panel-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--cyber-yellow);
}
.panel-sub {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.5px;
}
/* only the fleet list scrolls — not the page, not the map */
.fleet-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
}
.fleet-list::-webkit-scrollbar {
    width: 4px;
}
.fleet-list::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 2px;
}
.fleet-section {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #555;
    padding: 6px 2px 2px;
    border-bottom: 1px solid #151515;
    margin-top: 2px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: #050505;
    z-index: 1;
}
.fleet-section:first-child {
    margin-top: 0;
    padding-top: 0;
}
.fleet-card {
    text-align: left;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 3px;
    padding: 5px 8px;
    color: #ccc;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    transition:
        border-color 0.12s,
        background 0.12s;
}
.fleet-card:hover:not(:disabled) {
    border-color: #333;
    background: #0e0e0e;
}
.fleet-card.sel {
    border-color: var(--cyber-green);
    background: rgba(0, 255, 65, 0.06);
    box-shadow: inset 3px 0 0 var(--cyber-green);
}
.fleet-card.offline {
    opacity: 0.4;
    cursor: not-allowed;
}
.fleet-card.worker .fleet-name {
    color: var(--cyber-cyan);
}
.fleet-card.machine .fleet-name {
    color: var(--cyber-orange);
}
.fleet-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.fleet-name {
    font-weight: 700;
    letter-spacing: 0.8px;
    font-size: 11px;
}
.fleet-status {
    font-size: 9px;
    letter-spacing: 0.8px;
}
.fleet-role {
    font-size: 10px;
    color: #666;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fleet-meta {
    display: none; /* denser list — kind/phase redundant next to role */
}
.cyberia-hint {
    display: none; /* keep stage clean; CTAs live in footer */
}
.flat-map-wrap {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    display: flex;
    position: relative;
    overflow: hidden; /* static viewport — camera never scrolls the panel */
    touch-action: none;
    cursor: grab;
    outline: none;
    background: #050505;
    user-select: none;
}
.flat-map-wrap:active,
.flat-map-wrap.game-map:active {
    cursor: grabbing;
}
.flat-map-wrap:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(0, 255, 65, 0.35);
}
/* camera world — pan/zoom via transform, origin top-left */
.map-world {
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}
.flat-map {
    width: 100%;
    height: 100%;
    display: block;
    background: radial-gradient(
        ellipse at 50% 45%,
        #0c0c0c 0%,
        #050505 55%,
        #000 100%
    );
    border-radius: 0;
    overflow: visible;
}
/* left game zoom / pan rail */
.map-zoom-rail {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 4px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid #222;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.map-cam-btn {
    width: 28px;
    height: 28px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #ccc;
    background: #0c0c0c;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    cursor: pointer;
    padding: 0;
}
.map-cam-btn:hover {
    color: var(--cyber-green);
    border-color: rgba(0, 255, 65, 0.45);
    background: rgba(0, 255, 65, 0.08);
}
.map-cam-sep {
    height: 1px;
    background: #222;
    margin: 2px 2px;
}
.map-zoom-readout {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--cyber-yellow);
    font-variant-numeric: tabular-nums;
}
.map-tooltip {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 6;
    min-width: 140px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 3px;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.12);
}
.mt-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #e0e0e0;
}
.mt-area {
    margin-top: 4px;
    font-size: 12px;
    color: var(--cyber-cyan);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mt-hint {
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: 0.8px;
    color: #666;
}
.map-hud-hint {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 4;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: #444;
    background: rgba(0, 0, 0, 0.55);
    padding: 3px 10px;
    border-radius: 2px;
    pointer-events: none;
    white-space: nowrap;
}
.flat-path {
    cursor: pointer;
    transition:
        fill 0.1s,
        stroke 0.1s,
        filter 0.1s;
}
.flat-path.is-hov {
    filter: brightness(1.25) drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}
.flat-path.is-sel {
    filter: brightness(1.15) drop-shadow(0 0 8px rgba(0, 255, 65, 0.45));
}
.flat-path:hover {
    filter: brightness(1.2);
}
.flat-label {
    fill: #e0e0e0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    pointer-events: none;
    font-family: "Play", sans-serif;
}
.place-label {
    fill: #555;
    font-size: 8px;
    letter-spacing: 0.5px;
    pointer-events: none;
    font-family: "Play", sans-serif;
}
.map-caption {
    fill: #333;
    font-size: 8px;
    letter-spacing: 0.3px;
    font-family: "Play", sans-serif;
}
.flat-legend {
    display: flex;
    gap: 14px;
    padding: 4px 10px 6px;
    font-size: 10px;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.flat-legend .leg.sin {
    color: var(--cyber-green);
}
.flat-legend .leg.avalon {
    color: var(--cyber-orange);
}
.flat-legend .leg.bridge {
    color: var(--cyber-cyan);
}
.flat-legend .leg.core {
    color: var(--cyber-yellow);
}
.flat-legend .leg.ether {
    color: var(--cyber-purple);
}
.flat-legend .leg.dim {
    color: #444;
}
.district-label {
    fill: rgba(255, 255, 255, 0.22);
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
    pointer-events: none;
    font-family: "Play", sans-serif;
    /* size is screen-stable via SVG inverse-scale under map zoom */
}
.flat-label {
    fill: #f0f0f0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    pointer-events: none;
    font-family: "Play", sans-serif;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.85);
    stroke-width: 3px;
}
.place-dot {
    pointer-events: none;
}
.place-label {
    fill: #888;
    font-size: 9px;
    letter-spacing: 0.4px;
    pointer-events: none;
    font-family: "Play", sans-serif;
}
.map-caption {
    fill: #555;
    font-size: 9px;
    letter-spacing: 0.3px;
    font-family: "Play", sans-serif;
    pointer-events: none;
}

.cyberia-right {
    min-width: 0;
}
.render-3d {
    padding: 10px 8px;
    flex: 0 0 auto;
    min-height: 160px;
    max-height: 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #111;
    overflow: hidden;
}
.render-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    align-items: start;
}
.render-tag {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #555;
    font-weight: 700;
    margin-bottom: 4px;
}
.prism-scene {
    perspective: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
/* stylized unit: worker (cyan biped) / machine (orange blocky) */
.bot-scene {
    perspective: 500px;
}
.bot-figure {
    --bot-color: var(--cyber-cyan);
    position: relative;
    width: 72px;
    height: 96px;
    transform-style: preserve-3d;
    animation: bot-bob 2.8s ease-in-out infinite;
}
.bot-figure.machine {
    animation: bot-spin 10s linear infinite;
}
.bot-figure.empty {
    opacity: 0.35;
    animation: none;
}
@keyframes bot-bob {
    0%,
    100% {
        transform: translateY(0) rotateY(-12deg);
    }
    50% {
        transform: translateY(-6px) rotateY(12deg);
    }
}
@keyframes bot-spin {
    from {
        transform: rotateY(0deg) translateY(0);
    }
    to {
        transform: rotateY(360deg) translateY(0);
    }
}
.bot-head {
    position: absolute;
    left: 50%;
    top: 0;
    width: 28px;
    height: 24px;
    margin-left: -14px;
    border-radius: 4px 4px 2px 2px;
    background: color-mix(in srgb, var(--bot-color) 55%, #000);
    border: 1px solid var(--bot-color);
    box-shadow: 0 0 12px color-mix(in srgb, var(--bot-color) 40%, transparent);
}
.bot-figure.machine .bot-head {
    width: 36px;
    height: 20px;
    margin-left: -18px;
    border-radius: 2px;
}
.bot-head::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bot-color);
    box-shadow:
        12px 0 0 var(--bot-color),
        0 0 8px var(--bot-color);
}
.bot-figure.machine .bot-head::after {
    left: 8px;
    width: 8px;
    height: 4px;
    border-radius: 1px;
    box-shadow: 12px 0 0 var(--bot-color);
}
.bot-body {
    position: absolute;
    left: 50%;
    top: 28px;
    width: 40px;
    height: 36px;
    margin-left: -20px;
}
.bot-chest {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: color-mix(in srgb, var(--bot-color) 28%, #0a0a0a);
    border: 1px solid color-mix(in srgb, var(--bot-color) 70%, #333);
    box-shadow: inset 0 0 12px
        color-mix(in srgb, var(--bot-color) 15%, transparent);
}
.bot-figure.machine .bot-chest {
    border-radius: 2px;
    height: 42px;
}
.bot-arm {
    position: absolute;
    top: 4px;
    width: 10px;
    height: 28px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--bot-color) 40%, #111);
    border: 1px solid color-mix(in srgb, var(--bot-color) 50%, #222);
}
.bot-arm-l {
    left: -12px;
    transform: rotate(12deg);
}
.bot-arm-r {
    right: -12px;
    transform: rotate(-12deg);
}
.bot-figure.machine .bot-arm {
    width: 14px;
    height: 12px;
    top: 12px;
}
.bot-legs {
    position: absolute;
    left: 50%;
    top: 66px;
    width: 36px;
    margin-left: -18px;
    display: flex;
    justify-content: space-between;
}
.bot-leg {
    width: 12px;
    height: 26px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--bot-color) 35%, #000);
    border: 1px solid color-mix(in srgb, var(--bot-color) 45%, #222);
}
.bot-figure.machine .bot-leg {
    width: 16px;
    height: 14px;
    border-radius: 1px;
}
.bot-glow {
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 48px;
    height: 8px;
    margin-left: -24px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse,
        color-mix(in srgb, var(--bot-color) 45%, transparent),
        transparent 70%
    );
    filter: blur(2px);
}
.prism {
    --prism-color: var(--cyber-green);
    width: 110px;
    height: 70px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(58deg) rotateZ(-28deg);
    animation: prism-spin 14s linear infinite;
}
@keyframes prism-spin {
    from {
        transform: rotateX(58deg) rotateZ(-28deg);
    }
    to {
        transform: rotateX(58deg) rotateZ(332deg);
    }
}
.prism-face {
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--prism-color) 70%, #fff 0%);
    background: color-mix(in srgb, var(--prism-color) 18%, transparent);
}
.prism-top {
    width: 110px;
    height: 70px;
    transform: translateZ(36px);
    box-shadow: 0 0 24px color-mix(in srgb, var(--prism-color) 30%, transparent);
}
.prism-front {
    width: 110px;
    height: 36px;
    transform: rotateX(-90deg) translateY(-18px) translateZ(35px);
    transform-origin: bottom;
    background: color-mix(in srgb, var(--prism-color) 12%, #000 40%);
}
.prism-side {
    width: 70px;
    height: 36px;
    left: 110px;
    transform: rotateY(90deg) rotateX(-90deg) translateY(-18px)
        translateZ(-35px);
    transform-origin: left bottom;
    background: color-mix(in srgb, var(--prism-color) 8%, #000 50%);
}
.prism-meta {
    text-align: center;
}
.prism-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e0e0e0;
}
.prism-sub {
    font-size: 11px;
    color: #555;
    margin-top: 2px;
    letter-spacing: 0.5px;
}
.intent-form {
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
}
.intent-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}
.intent-k {
    color: #555;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 10px;
}
.intent-v {
    color: var(--cyber-yellow);
    font-weight: 700;
    letter-spacing: 1px;
}
.intent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.act-pill {
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 5px 9px;
    border-radius: 2px;
    border: 1px solid #222;
    background: #0a0a0a;
    color: #888;
    cursor: pointer;
}
.act-pill.sel {
    border-color: var(--cyber-cyan);
    color: var(--cyber-cyan);
    background: rgba(0, 229, 255, 0.08);
}
.act-pill.locked {
    opacity: 0.35;
    cursor: not-allowed;
}
.intent-commit {
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 12px;
    padding: 10px;
    border: 1px solid var(--cyber-green);
    background: rgba(0, 255, 65, 0.08);
    color: var(--cyber-green);
    border-radius: 2px;
    cursor: pointer;
}
.intent-commit:hover {
    background: rgba(0, 255, 65, 0.16);
}
.intent-queue {
    margin-top: 4px;
    border-top: 1px solid #111;
    padding-top: 8px;
}
.intent-empty {
    font-size: 11px;
    color: #444;
    letter-spacing: 0.3px;
}
.intent-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.intent-item {
    display: grid;
    grid-template-columns: 42px 1fr auto auto;
    gap: 8px;
    font-size: 11px;
    padding: 5px 6px;
    background: #0a0a0a;
    border: 1px solid #151515;
    border-radius: 2px;
}
.ii-id {
    color: #444;
}
.ii-fleet {
    color: var(--cyber-orange);
    font-weight: 700;
}
.ii-act {
    color: var(--cyber-cyan);
}
.ii-flat {
    color: var(--cyber-green);
    font-weight: 700;
}
.cyberia-dock {
    gap: 16px;
}
.cyberia-soft3-dock {
    color: #444 !important;
    font-size: 11px;
    flex: 1;
}

.nav-cyberia.nav-here,
.nav-btn.nav-cyberia.nav-here {
    color: var(--cyber-green);
}

@media (max-width: 1100px) {
    .cyberia-stage {
        /* map stays center-top hero */
        grid-template-columns: 170px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 220px;
    }
    .cyberia-fleets {
        grid-column: 1;
        grid-row: 1;
    }
    .cyberia-flats {
        grid-column: 2;
        grid-row: 1;
    }
    .cyberia-right {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .cyberia-dock {
        flex-wrap: wrap;
    }
}
@media (max-width: 720px) {
    /* stay in viewport; stage stacks and scrolls as a whole */
    .cyberia-shell {
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    .cyberia-stage {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 26vh) minmax(240px, 42vh) minmax(
                200px,
                32vh
            );
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
    }
    .cyberia-fleets {
        grid-column: 1;
        grid-row: 1;
    }
    .cyberia-flats {
        grid-column: 1;
        grid-row: 2; /* still the visual center of the stack */
    }
    .cyberia-right {
        grid-column: 1;
        grid-row: 3;
    }
    .cyberia-soft3 {
        display: none;
    }
    .cyberia-phase-pill {
        display: none;
    }
    /* map pan only when touching the map, not the whole page */
    .flat-map-wrap {
        touch-action: none;
    }
}

/* Elements — the periodic table with prices */
.ptable-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
}
.ptable {
    display: grid;
    grid-template-columns: repeat(18, minmax(52px, 1fr));
    grid-auto-rows: 58px;
    gap: 4px;
    min-width: 1010px;
}
.ptable-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid color-mix(in srgb, var(--el-c) 35%, transparent);
    border-radius: 3px;
    cursor: pointer;
    padding: 2px;
    position: relative;
    transition: border-color 0.1s, background 0.1s;
}
.ptable-cell:hover {
    border-color: var(--el-c);
    background: color-mix(in srgb, var(--el-c) 8%, transparent);
}
.ptable-cell.ptable-on {
    border-color: var(--el-c);
    background: color-mix(in srgb, var(--el-c) 14%, transparent);
}
.ptable-z {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 8px;
    color: #556;
}
.ptable-sym {
    font-size: 16px;
    font-weight: 700;
    color: var(--el-c);
    line-height: 1;
}
.ptable-px {
    font-size: 9px;
    color: #888;
    line-height: 1;
}

/* selected element trade panel */
.el-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border: 1px solid #223;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.02);
}
.el-panel-id {
    display: flex;
    align-items: center;
    gap: 14px;
}
.el-panel-sym {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}
.el-panel-trade {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.el-panel-px {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.el-qty {
    width: 80px;
    text-align: right;
}

/* Robot portal — Gallery grid */
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.bot-card {
    border: 1px solid color-mix(in srgb, var(--bot-c, #444) 40%, transparent);
    border-radius: 6px;
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--bot-c, #444) 6%, transparent), transparent 60%);
    transition: border-color 0.12s;
}
.bot-card:hover { border-color: var(--bot-c, #666); }
.bot-emoji { font-size: 42px; line-height: 1; }
.bot-name { font-size: 15px; font-weight: 700; color: var(--bot-c, #ccc); letter-spacing: 1px; }
.bot-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bot-tags .chip { font-size: 9px; }
.bot-blurb { font-size: 12px; color: #778; line-height: 1.5; flex: 1; }
.bot-buy { align-self: flex-start; }

/* P&L + cashflow tables on /me */
.pnl-table { border: 1px solid var(--line, #1a1a24); border-radius: 4px; overflow: hidden; }
.pnl-row {
    display: grid;
    grid-template-columns: 1fr 90px 90px 90px;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #14141c;
    font-size: 12px;
    align-items: baseline;
}
.pnl-row:last-child { border-bottom: none; }
.pnl-row.pnl-head { color: #556; font-size: 10px; letter-spacing: 2px; background: rgba(255,255,255,0.02); }
.pnl-row.pnl-total { background: rgba(255,255,255,0.02); font-weight: 700; }
.pnl-row.cash-row { grid-template-columns: 1fr 90px 90px; }
.pnl-num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
    .pnl-row { grid-template-columns: 1fr 64px 64px 64px; font-size: 11px; }
    .pnl-row.cash-row { grid-template-columns: 1fr 64px 64px; }
}
