body.play-body {
    overflow: hidden;
    margin: 0;
    background: #0a0604;
}
body.play-body::before,
body.play-body::after {
    z-index: 40;
    opacity: 0.35;
}
#playCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    cursor: crosshair;
}
#playCanvas.locked { cursor: none; }
.play-hud {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
}
.play-hud .interactive { pointer-events: auto; }
.play-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}
.play-panel {
    background: rgba(12, 10, 16, 0.72);
    border: 1px solid rgba(232, 177, 132, 0.22);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}
.play-prompt {
    position: absolute;
    left: 50%;
    bottom: 18%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    border-radius: 0.2rem;
    background: linear-gradient(90deg, rgba(8, 18, 16, 0.2), rgba(8, 18, 16, 0.78), rgba(8, 18, 16, 0.2));
    border: 1px solid rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.18), inset 0 0 12px rgba(16, 185, 129, 0.08);
    color: #d1fae5;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.play-prompt.visible { display: flex; }
.play-prompt kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 0.3rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.55);
    color: #34d399;
    font-weight: 700;
}
.play-crosshair {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 0;
    border-radius: 0;
    opacity: 0.88;
    box-shadow:
        -10px -10px 0 -8px rgba(110, 231, 183, 0.85),
        10px -10px 0 -8px rgba(110, 231, 183, 0.85),
        -10px 10px 0 -8px rgba(110, 231, 183, 0.85),
        10px 10px 0 -8px rgba(110, 231, 183, 0.85);
}
.play-crosshair::before,
.play-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(110, 231, 183, 0.75);
}
.play-crosshair::before {
    left: 50%; top: 4px; width: 1px; height: 14px; margin-left: -0.5px;
}
.play-crosshair::after {
    top: 50%; left: 4px; height: 1px; width: 14px; margin-top: -0.5px;
}
.play-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 6, 10, 0.72);
    pointer-events: auto;
}
.play-overlay.open { display: flex; }
.play-modal {
    width: min(520px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: rgba(14, 12, 20, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem 1.4rem 1.4rem;
    color: #e5e7eb;
}
.play-modal label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}
.play-modal .field { margin-bottom: 1rem; }
.play-modal input[type="range"],
.play-modal select {
    width: 100%;
    accent-color: #e04228;
    background: #0a0c14;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.5rem;
    color: #e5e7eb;
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
}
.play-metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
    margin: 0.8rem 0 1rem;
}
.play-metric {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.55rem;
    padding: 0.55rem 0.65rem;
}
.play-metric .v {
    font-family: Orbitron, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}
.play-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    margin-top: 0.35rem;
    overflow: hidden;
}
.play-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #e04228, #10b981);
    width: 50%;
}
.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
}
.play-btn-primary {
    background: linear-gradient(90deg, #e04228, #c4341c);
    color: #fff;
}
.play-btn-ghost {
    background: transparent;
    border-color: rgba(255,255,255,0.18);
    color: #e5e7eb;
}
.play-boot {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: radial-gradient(ellipse at 50% 40%, #2a140c 0%, #06060a 70%);
    color: #f3e8de;
    text-align: center;
    padding: 2rem;
    pointer-events: auto;
}
.play-boot.hidden { display: none; }
.play-comms {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    width: min(280px, calc(100vw - 2.5rem));
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: rgba(8, 10, 16, 0.78);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.65rem;
    padding: 0.28rem 0.45rem 0.4rem;
    backdrop-filter: blur(10px);
    transition: width 0.15s ease, opacity 0.15s ease;
}
.play-comms.collapsed {
    width: min(240px, calc(100vw - 2.5rem));
    padding: 0.22rem 0.4rem;
    opacity: 0.9;
}
.play-comms.collapsed .play-comms-body { display: none; }
.play-comms-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.play-comms-head button.play-comms-toggle {
    border: 0;
    background: transparent;
    color: #d1d5db;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    text-align: left;
    flex: 1;
    min-width: 0;
}
.play-comms-head button.play-comms-toggle span {
    display: block;
    color: #6b7280;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
}
.play-comms-badge {
    font-size: 0.58rem;
    color: #86efac;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    white-space: nowrap;
}
.play-comms-tabs {
    display: flex;
    gap: 0.3rem;
}
.play-comms-tabs button {
    flex: 1;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.35rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-family: inherit;
}
.play-comms-tabs button.active {
    color: #fff;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.12);
}
.play-chat-log {
    height: 108px;
    overflow-y: auto;
    font-size: 0.68rem;
    line-height: 1.4;
    color: #d1d5db;
    padding: 0.25rem 0.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.play-chat-log .msg {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}
.play-chat-log .msg .who {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}
.play-chat-log .msg.me .who { color: #34d399; }
.play-chat-log .msg.them .who { color: #fbbf24; }
.play-chat-log .msg .body { color: #e5e7eb; word-break: break-word; }
.play-chat-log .msg.sys .body,
.play-chat-log .sys { color: #a78bfa; }
.play-chat-log .msg.crew .body,
.play-chat-log .crew { color: #94a3b8; font-style: italic; }
.play-chat-log .empty {
    color: #6b7280;
    font-size: 0.65rem;
    padding: 0.35rem 0;
}
.play-chat-form {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
}
.play-chat-form input {
    flex: 1;
    min-width: 0;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 0.4rem;
    color: #fff;
    font-size: 0.72rem;
    padding: 0.45rem 0.6rem;
    font-family: inherit;
}
.play-chat-form input:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.55);
}
.play-chat-form button[type="submit"] {
    flex-shrink: 0;
    padding: 0.4rem 0.65rem;
    white-space: nowrap;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #d1fae5;
    border-radius: 0.4rem;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
}
.play-chat-form button[type="submit"]:hover {
    background: rgba(16, 185, 129, 0.28);
}
.play-comms-hint {
    font-size: 0.55rem;
    color: #6b7280;
    letter-spacing: 0.05em;
}
.play-crew-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.75rem 0 1rem;
}
.play-crew-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
}
.play-crew-row .meta {
    font-size: 0.6rem;
    color: #9ca3af;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.play-crew-row.you {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}
.play-toolbar {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}
.play-inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}
.play-inv-slot {
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.55rem;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
        repeating-linear-gradient(0deg, transparent, transparent 6px, rgba(255,255,255,0.02) 6px, rgba(255,255,255,0.02) 7px);
    padding: 0.4rem;
    font-size: 0.58rem;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.2rem;
    position: relative;
    overflow: hidden;
}
.play-inv-slot.empty {
    color: #4b5563;
    border-style: dashed;
    border-color: rgba(255,255,255,0.08);
}
.play-inv-slot.empty .play-item-icon {
    opacity: 0.28;
}
.play-inv-slot.filled {
    color: #e5e7eb;
    border-color: rgba(16, 185, 129, 0.35);
    background:
        radial-gradient(ellipse at 30% 20%, rgba(16, 185, 129, 0.12), transparent 55%),
        linear-gradient(165deg, rgba(20, 28, 26, 0.95), rgba(12, 14, 18, 0.92));
}
.play-inv-slot.kind-currency.filled { border-color: rgba(251, 191, 36, 0.45); background: radial-gradient(ellipse at 30% 20%, rgba(251, 191, 36, 0.14), transparent 55%), linear-gradient(165deg, rgba(32, 26, 14, 0.95), rgba(12, 14, 18, 0.92)); }
.play-inv-slot.kind-produce.filled { border-color: rgba(167, 139, 250, 0.45); background: radial-gradient(ellipse at 30% 20%, rgba(167, 139, 250, 0.14), transparent 55%), linear-gradient(165deg, rgba(24, 18, 36, 0.95), rgba(12, 14, 18, 0.92)); }
.play-inv-slot.kind-ammo.filled { border-color: rgba(56, 189, 248, 0.4); }
.play-inv-slot.kind-part.filled { border-color: rgba(248, 113, 113, 0.4); }
.play-inv-slot.kind-consumable.filled { border-color: rgba(52, 211, 153, 0.5); }
.play-inv-slot .play-item-icon {
    width: 100%;
    height: 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.play-inv-slot .play-item-icon svg {
    width: 2.1rem;
    height: 2.1rem;
    display: block;
}
.play-inv-slot .play-item-name {
    display: block;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.play-inv-slot .qty {
    position: absolute;
    top: 0.28rem;
    right: 0.32rem;
    min-width: 1.15rem;
    padding: 0.05rem 0.28rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255,255,255,0.12);
    color: #a7f3d0;
    font-weight: 700;
    font-size: 0.55rem;
    text-align: center;
}
.play-inv-slot .play-item-kind {
    font-size: 0.48rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}
.play-tool-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.75rem 0 1rem;
}
.play-tool-row .play-tool {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
    background: linear-gradient(120deg, rgba(255,255,255,0.03), transparent);
}
.play-tool-row .play-tool.equipped {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(120deg, rgba(245, 158, 11, 0.12), rgba(255,255,255,0.02));
}
.play-tool-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}
.play-tool-meta .play-item-icon {
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    border-radius: 0.45rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-tool-meta .play-item-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}
.play-armory-row .play-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.45rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-armory-row .play-item-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}
.play-armory-copy { flex: 1; min-width: 0; }
.play-map-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.75rem 0 1rem;
}
.play-dest-section {
    margin: 0.85rem 0 0.25rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9ca3af;
}
.play-dest-hint {
    margin: 0 0 0.45rem;
    font-size: 0.68rem;
    line-height: 1.35;
    color: #6b7280;
}
.play-dest-map {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
}
.play-status-pill {
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255,255,255,0.12);
    color: #d1d5db;
    background: rgba(255,255,255,0.06);
}
.play-tier-badge {
    display: inline-block;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.12rem 0.45rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
}
.play-tier-badge[data-tier="charter"] {
    border-color: rgba(244, 114, 182, 0.55);
    color: #f9a8d4;
    background: rgba(236, 72, 153, 0.14);
}
.play-tier-badge[data-tier="investor"] {
    border-color: rgba(96, 165, 250, 0.5);
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
}
.play-membership-banner {
    margin-bottom: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
}
.play-membership-banner strong {
    display: block;
    font-size: 0.8rem;
    color: #fde68a;
    margin-bottom: 0.15rem;
}
.play-membership-banner span {
    display: block;
    font-size: 0.68rem;
    color: #cbd5e1;
    line-height: 1.35;
}
.play-perks-list {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
    list-style: disc;
}
.play-perks-list li {
    font-size: 0.68rem;
    color: #fde68a;
    line-height: 1.4;
}
.play-tier-chip {
    display: inline-block;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.05rem 0.32rem;
    border-radius: 0.2rem;
    vertical-align: middle;
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
}
.play-tier-chip[data-tier="charter"] {
    border-color: rgba(244, 114, 182, 0.55);
    color: #f9a8d4;
    background: rgba(236, 72, 153, 0.16);
}
.play-tier-chip[data-tier="investor"] {
    border-color: rgba(96, 165, 250, 0.5);
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
}
.play-status-pill.live {
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.12);
}
.play-status-pill.design {
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
}
.play-status-pill.concept {
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(59, 130, 246, 0.1);
}
.play-map-banner {
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    margin-bottom: 0.35rem;
}
.play-map-banner > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.play-map-banner strong {
    color: #f3f4f6;
    font-size: 0.85rem;
}
.play-map-banner p {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.4;
    color: #9ca3af;
}
.play-sector-planned {
    margin: 0.75rem 0 1rem;
    padding-left: 1rem;
    color: #d1d5db;
    font-size: 0.75rem;
    line-height: 1.45;
}
.play-sector-planned li { margin-bottom: 0.25rem; }
.play-mission-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: 280px;
}
.play-mission-list li {
    font-size: 0.65rem;
    line-height: 1.35;
    color: #9ca3af;
    padding-left: 0.85rem;
    position: relative;
}
.play-mission-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #6b7280;
}
.play-mission-list li.active { color: #e5e7eb; }
.play-mission-list li.active::before { background: #f59e0b; }
.play-mission-list li.done { color: #6ee7b7; text-decoration: line-through; }
.play-mission-list li.done::before { background: #10b981; }
.play-players {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-top: 0.35rem;
}
.play-waypoint {
    position: absolute;
    left: 50%;
    bottom: 26%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
    max-width: min(420px, calc(100vw - 2rem));
    padding: 0.65rem 0.9rem;
    border-radius: 0.7rem;
    background: rgba(8, 10, 16, 0.78);
    border: 1px solid rgba(232, 177, 132, 0.28);
    color: #f3e8de;
}
.play-waypoint.visible { display: flex; }
.play-waypoint-arrow {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 1.1rem;
    transition: transform 0.08s linear;
    flex-shrink: 0;
}
.play-waypoint-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.play-waypoint-meta {
    font-size: 0.65rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}
.play-mission-list li .hint {
    display: block;
    color: #6b7280;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 0.15rem;
}
.play-mission-list li.active .hint { color: #a8a29e; }
.play-fade {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: #06060a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.play-fade.on {
    opacity: 1;
    pointer-events: auto;
}
.play-modal-wide {
    max-width: min(720px, 94vw);
    max-height: min(86vh, 900px);
    overflow-y: auto;
}
.play-security-board {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.5rem 0 0.75rem;
}
.play-fac-map {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.55rem;
    background: linear-gradient(165deg, rgba(30, 24, 20, 0.9), rgba(12, 14, 18, 0.95));
    padding: 0.55rem 0.65rem 0.75rem;
}
.play-fac-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.play-fac-map-head strong {
    color: #f3f4f6;
    font-size: 0.8rem;
}
.play-fac-grid {
    position: relative;
    height: 140px;
    border-radius: 0.4rem;
    border: 1px dashed rgba(255,255,255,0.12);
    background:
        radial-gradient(ellipse at 30% 40%, rgba(224, 66, 40, 0.08), transparent 55%),
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: auto, 18px 18px, 18px 18px;
    overflow: hidden;
}
.play-fac-grid-accurate {
    height: auto;
    min-height: 220px;
    width: 100%;
    background:
        radial-gradient(ellipse at 42% 28%, rgba(224, 66, 40, 0.12), transparent 50%),
        radial-gradient(ellipse at 72% 58%, rgba(52, 211, 153, 0.08), transparent 45%),
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: auto, auto, 16px 16px, 16px 16px;
}
.play-fac-zone {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.2rem;
}
.play-fac-zone span {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(229,231,235,0.55);
    font-weight: 700;
}
.play-fac-player {
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}
.play-fac-node.kind-construction { border-color: rgba(52, 211, 153, 0.55); }
.play-fac-node.kind-transit { border-color: rgba(96, 165, 250, 0.45); }
.play-fac-node.kind-gateway { border-color: rgba(251, 146, 60, 0.5); }
.play-fac-node.kind-habitat { border-color: rgba(129, 140, 248, 0.55); }
.play-fac-node.kind-sample { border-color: rgba(251, 191, 36, 0.45); }
.play-fac-node.kind-salvage { border-color: rgba(251, 191, 36, 0.65); }
.play-fac-node.kind-comms { border-color: rgba(56, 189, 248, 0.45); }
.play-fac-node {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 4.5rem;
    max-width: 7rem;
    padding: 0.2rem 0.35rem;
    border-radius: 0.3rem;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(15, 18, 22, 0.85);
    color: #e5e7eb;
    font-size: 0.58rem;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    z-index: 2;
}
.play-fac-node.compact {
    min-width: 2.6rem;
    max-width: 4.8rem;
    padding: 0.1rem 0.28rem;
    font-size: 0.5rem;
}
.play-fac-node.raised {
    border-color: rgba(52, 211, 153, 0.9);
    background: rgba(6, 42, 28, 0.92);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.4);
    z-index: 3;
}
.play-fac-node.raised em { color: #6ee7b7; }
.play-fac-node span { display: block; font-weight: 700; }
.play-fac-node em {
    display: block;
    font-style: normal;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.5rem;
}
.play-fac-node.kind-security { border-color: rgba(245, 158, 11, 0.55); }
.play-fac-node.kind-dome { border-color: rgba(52, 211, 153, 0.45); }
.play-fac-node.kind-power { border-color: rgba(250, 204, 21, 0.45); }
.play-fac-node.planned { opacity: 0.72; border-style: dashed; }
.play-map-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0.3rem 0 0.15rem;
}
.play-map-tool {
    font-size: 0.6rem;
    padding: 0.22rem 0.45rem;
}
.play-fac-ghost {
    position: absolute;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px dashed rgba(52, 211, 153, 0.85);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}
.play-build-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}
.play-btn.active-place {
    border-color: rgba(52, 211, 153, 0.7);
    color: #6ee7b7;
}
.play-fac-grid.place-mode {
    cursor: crosshair;
}
.play-mission-panel.is-hidden {
    display: none !important;
}
.play-raid-table {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.4rem 0 1rem;
}
.play-raid-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
}
.play-raid-meta { flex: 1; min-width: 0; }
.play-raid-title {
    color: #f3f4f6;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.25rem;
}
.play-raid-meta p {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.35;
    color: #9ca3af;
}
.play-status-pill.cleared,
.play-status-pill.locked {
    color: #9ca3af;
}
.play-status-pill.ready { color: #6ee7b7; border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.12); }
.play-status-pill.active { color: #fcd34d; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.1); }
 .play-dest-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.8rem 0 1rem;
    max-height: min(52vh, 360px);
    overflow-y: auto;
}
.play-dest-list button {
    text-align: left;
    width: 100%;
}
.play-dialogue-lines {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #d1d5db;
    min-height: 4.5rem;
    margin: 0.75rem 0 1rem;
}
.play-action-toast {
    position: absolute;
    left: 50%;
    top: 22%;
    transform: translateX(-50%);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(8, 10, 16, 0.75);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #d1fae5;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}
.play-action-toast.show { opacity: 1; }
.play-action-toast.hit {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}
.play-keys {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    font-size: 0.58rem;
    line-height: 1.55;
    color: #6b7280;
    letter-spacing: 0.04em;
    text-align: right;
    pointer-events: none;
    max-width: 14rem;
}
.play-keys kbd {
    display: inline-block;
    min-width: 1.1rem;
    padding: 0.05rem 0.28rem;
    margin-right: 0.15rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.25rem;
    color: #9ca3af;
    font-family: inherit;
    font-size: 0.55rem;
}
.play-crosshair.strike {
    width: 14px;
    height: 14px;
    border-color: #f87171;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.55);
}
.play-vignette-hit {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(248, 113, 113, 0.28) 100%);
    transition: opacity 0.15s ease;
}
.play-vignette-hit.show { opacity: 1; }
.play-combat-hud {
    margin-top: 0.45rem;
    font-size: 0.65rem;
    color: #d1d5db;
}
.play-hp-track {
    height: 0.35rem;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin: 0.25rem 0 0.35rem;
}
.play-hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #dc2626, #f59e0b 55%, #34d399);
    border-radius: 999px;
    transition: width 0.15s ease;
}
.play-weapon-line {
    color: #9ca3af;
    letter-spacing: 0.04em;
}
.play-currency-line {
    text-align: right;
    max-width: 11.5rem;
    line-height: 1.25;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
}
.play-armory-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.75rem 0 1rem;
    max-height: 280px;
    overflow-y: auto;
}
.play-armory-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.72rem;
    background: linear-gradient(120deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}
.play-armory-row.owned {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(120deg, rgba(16, 185, 129, 0.12), rgba(255,255,255,0.02));
}
.play-armory-row .meta {
    font-size: 0.58rem;
    color: #9ca3af;
    margin-top: 0.2rem;
}
 /* ---- Mobile touch layer ---- */
.play-touch {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 55;
    pointer-events: none;
}
.play-touch .touch-zone {
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.play-stick {
    position: absolute;
    left: max(0.75rem, env(safe-area-inset-left));
    bottom: max(1.1rem, env(safe-area-inset-bottom));
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: rgba(8, 10, 16, 0.35);
    border: 1px solid rgba(255,255,255,0.14);
}
.play-stick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-radius: 50%;
    background: rgba(232, 177, 132, 0.35);
    border: 1px solid rgba(232, 177, 132, 0.55);
    transition: background 0.1s ease;
}
.play-stick-knob.active {
    background: rgba(16, 185, 129, 0.45);
    border-color: rgba(16, 185, 129, 0.7);
}
.play-touch-actions {
    position: absolute;
    right: max(0.65rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(2, 64px);
    gap: 0.5rem;
    justify-items: center;
}
.play-touch-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(8, 10, 16, 0.62);
    color: #e5e7eb;
    font-size: 0.48rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.1;
    gap: 0.12rem;
    padding: 0.2rem;
}
.play-touch-btn i {
    font-size: 0.95rem;
    line-height: 1;
}
.play-touch-btn span {
    font-size: 0.48rem;
}
.play-touch-btn.fire {
    width: 78px;
    height: 78px;
    background: rgba(185, 28, 28, 0.45);
    border-color: rgba(248, 113, 113, 0.55);
    font-weight: 700;
}
.play-touch-btn.fire i { font-size: 1.15rem; }
.play-touch-btn:active,
.play-touch-btn.active {
    background: rgba(16, 185, 129, 0.35);
    border-color: rgba(16, 185, 129, 0.65);
}
.play-touch-btn.fire:active,
.play-touch-btn.fire.active {
    background: rgba(239, 68, 68, 0.55);
}
.play-mission-toggle {
    display: inline-flex;
}
.play-ops-modal {
    width: min(560px, calc(100vw - 2rem));
}
.play-ops-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.play-ops-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem 0.75rem;
}
.play-ops-toolbar .play-ops-group {
    flex: 1 1 9.5rem;
    min-width: 0;
}
.play-ops-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}
.play-ops-group > span {
    flex: 0 0 auto;
    min-width: 2.6rem;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b7280;
}
.play-ops-group .play-comms-tabs {
    flex: 1;
    margin: 0;
}
.play-hud-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    margin-bottom: 0.5rem;
}
.play-hud-row strong {
    display: block;
    color: #f3f4f6;
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}
.play-hud-row p {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.35;
    color: #9ca3af;
}
.play-keys {
    display: none;
}
.play-keys {
    display: none;
}
.play-keys:not(.is-hidden) {
    display: block;
}
.play-keys.is-hidden {
    display: none !important;
}
 body.play-touch-mode {
    touch-action: none;
    overscroll-behavior: none;
}
body.play-touch-mode #playCanvas {
    touch-action: none;
}
body.play-touch-mode .play-touch {
    display: block;
}
body.play-touch-mode .play-keys {
    display: none;
}
body.play-touch-mode .play-comms {
    bottom: calc(168px + env(safe-area-inset-bottom));
    left: 0.65rem;
    width: min(220px, calc(100vw - 9rem));
}
body.play-touch-mode .play-prompt {
    bottom: calc(155px + env(safe-area-inset-bottom));
    font-size: 0.65rem;
    padding: 0.5rem 0.85rem;
}
body.play-touch-mode .play-waypoint {
    bottom: calc(28% + 2rem);
}
body.play-touch-mode .play-top {
    padding: 0.55rem 0.65rem;
    gap: 0.45rem;
    align-items: stretch;
}
body.play-touch-mode .play-panel {
    padding: 0.5rem 0.65rem;
    font-size: 0.7rem;
}
body.play-touch-mode .play-top > .play-panel:first-child {
    flex: 1;
    min-width: 0;
}
body.play-touch-mode .play-mission-panel {
    display: block;
    max-width: min(220px, 48vw);
}
body.play-touch-mode .play-mission-panel.open {
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    top: 5.5rem;
    max-width: none;
    max-height: 40vh;
    overflow: auto;
    z-index: 56;
    pointer-events: auto;
}
body.play-touch-mode .play-mission-toggle {
    display: inline-flex;
}
body.play-touch-mode .play-top .play-btn {
    padding: 0.4rem 0.55rem;
    font-size: 0.62rem;
}
body.play-touch-mode .play-boot {
    padding: 1.25rem;
}
body.play-touch-mode .play-boot h1 {
    font-size: 2rem;
}
body.play-touch-mode .play-modal {
    width: min(520px, calc(100vw - 1rem));
    max-height: calc(100dvh - 1rem);
    padding: 1rem;
}
body.play-touch-mode .play-comms-tabs {
    flex-wrap: wrap;
}
 @media (max-width: 720px) {
    .play-top {
        flex-wrap: wrap;
    }
    .play-keys {
        display: none;
    }
}

/* Quiet visor — keep IDs/classes; reduce dashboard chrome */
body.play-body::before,
body.play-body::after {
    opacity: 0.16;
    z-index: 1;
}
.play-boot {
    background: radial-gradient(ellipse at 50% 30%, rgba(40, 18, 12, 0.55), rgba(6, 6, 10, 0.92));
}
.play-boot-card {
    width: min(420px, 100%);
    padding: 1.5rem 1.35rem 1.25rem;
    border: 1px solid rgba(232, 177, 132, 0.18);
    background: rgba(10, 9, 14, 0.72);
    backdrop-filter: blur(16px);
    border-radius: 0.4rem;
    text-align: left;
}
.play-boot-copy {
    max-width: 28rem;
    margin: 0.65rem 0 1.1rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #c4c4cc;
}
.play-vitals,
.play-mission-chip,
.play-helm-actions .play-btn,
.play-comms,
.play-console {
    border-radius: 0.35rem;
    border-color: rgba(232, 177, 132, 0.16);
    box-shadow: none;
    background: rgba(8, 8, 12, 0.58);
}
.play-panel {
    background: rgba(8, 8, 12, 0.58);
    border-color: rgba(232, 177, 132, 0.16);
    backdrop-filter: blur(8px);
    border-radius: 0.35rem;
    padding: 0.55rem 0.7rem;
}
.play-top {
    padding: 0.75rem 0.9rem;
    gap: 0.65rem;
    flex-wrap: nowrap;
}
.play-visor-end {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    max-width: min(300px, 46vw);
    z-index: 56;
}
.play-mission-chip {
    width: min(280px, 46vw);
    max-width: 100%;
}
.play-mission-chip:not(.is-collapsed) {
    max-height: min(36vh, 18rem);
    overflow: auto;
}
.play-comms {
    background: rgba(8, 8, 12, 0.62);
    border-radius: 0.35rem 0.35rem 0 0;
}
.play-overlay {
    background: rgba(4, 4, 8, 0.62);
}
.play-modal.play-console {
    border-radius: 0.4rem;
    border-color: rgba(232, 177, 132, 0.2);
    background: rgba(12, 11, 16, 0.96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.play-btn-primary {
    background: #c4341c;
    box-shadow: none;
}
.play-crosshair {
    opacity: 0.92;
}

.play-vitals {
    max-width: min(280px, 46vw);
}
.play-vitals-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: center;
    font-size: 0.62rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}
.play-vitals-xp {
    color: #6b7280;
}
.play-helm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: flex-start;
}
.play-helm-more {
    position: relative;
}
.play-helm-more > summary {
    list-style: none;
    cursor: pointer;
}
.play-helm-more > summary::-webkit-details-marker { display: none; }
.play-helm-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.3rem);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 7.5rem;
    padding: 0.35rem;
    background: rgba(8, 8, 12, 0.92);
    border: 1px solid rgba(232, 177, 132, 0.2);
    border-radius: 0.35rem;
    z-index: 57;
}
.play-mission-chip.is-collapsed .play-mission-list li:not(.active) {
    display: none;
}
.play-mission-chip.is-collapsed .play-mission-list:not(:has(li.active)) li:last-child {
    display: list-item;
}
.play-weapon-line.is-low {
    color: #f87171;
}
.play-console-head,
.play-console-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.play-console-kicker,
.play-console-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6ee7b7;
    margin: 0 0 0.2rem;
}
.play-console-title,
.play-console-title {
    font-family: Orbitron, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.25;
}
@media (max-width: 390px) {
    .play-vitals {
        max-width: 100%;
    }
    .play-mission-chip {
        max-width: 100%;
    }
    .play-helm-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.play-visor-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.play-visor-scan,
.play-visor-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(52, 211, 153, 0.035) 0 1px,
        transparent 1px 4px
    );
    mix-blend-mode: screen;
    opacity: 0.55;
    animation: visor-scan 9s linear infinite;
}
.play-visor-mask,
.play-visor-mask {
    position: absolute;
    inset: 0;
    box-shadow:
        inset 0 0 80px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(52, 211, 153, 0.12);
    border-radius: 2.4rem;
}
.play-visor-ticks,
.play-visor-ticks {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border: 1px solid rgba(110, 231, 183, 0.12);
    border-radius: 50%;
}
.play-visor-ticks::before,
.play-visor-ticks::after {
    content: '';
    position: absolute;
    background: rgba(110, 231, 183, 0.35);
}
.play-visor-ticks::before {
    left: 50%;
    top: -6px;
    width: 1px;
    height: 12px;
}
.play-visor-ticks::after {
    top: 50%;
    left: -6px;
    height: 1px;
    width: 12px;
}
@keyframes visor-scan {
    from { background-position: 0 0; }
    to { background-position: 0 80px; }
}
.play-panel,
.play-vitals,
.play-mission-chip {
    border-color: rgba(52, 211, 153, 0.22);
    background: rgba(6, 12, 12, 0.62);
}
.play-boot-card {
    border-color: rgba(52, 211, 153, 0.28);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.12);
}