:root {
    --bg: #090d14;
    --bg-2: #0f1624;
    --line: #4ef7d8;
    --line-soft: rgba(78, 247, 216, 0.35);
    --ink: #d4f7ff;
    --muted: #79a6b1;
    --danger: #ff6f7b;
    --warn: #ffc56c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Share Tech Mono", monospace;
    background:
        radial-gradient(circle at 15% 20%, rgba(78, 247, 216, 0.18), transparent 24%),
        radial-gradient(circle at 80% 10%, rgba(110, 246, 255, 0.12), transparent 26%),
        linear-gradient(160deg, #06090f 0%, var(--bg) 45%, var(--bg-2) 100%);
    overflow-x: hidden;
}

.noise,
.scanline {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.noise {
    opacity: 0.1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.24) 0.7px, transparent 0.7px);
    background-size: 3px 3px;
}

.scanline {
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 4px
    );
}

.topbar,
.nav,
.content {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(2, 8, 16, 0.65);
    backdrop-filter: blur(4px);
}

.brand {
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.09em;
    font-weight: 700;
    font-size: 1rem;
}

.agent {
    color: var(--muted);
    font-size: 0.88rem;
}

.nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line-soft);
}

.nav a {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line-soft);
    border-radius: 0.45rem;
    padding: 0.5rem 0.8rem;
    transition: 180ms ease;
    font-size: 0.88rem;
}

.nav a:hover {
    border-color: var(--line);
    color: #f5ffff;
    box-shadow: 0 0 0 1px rgba(78, 247, 216, 0.3), 0 0 20px rgba(78, 247, 216, 0.18);
}

.nav a.danger {
    border-color: rgba(255, 111, 123, 0.5);
    color: #ffc0c6;
}

.content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem;
}

.panel-map {
    width: calc(100vw - 2rem);
    margin-left: calc(50% - 50vw + 1rem);
    margin-right: calc(50% - 50vw + 1rem);
}

.panel,
.panel-sub {
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(14, 22, 35, 0.78), rgba(7, 12, 20, 0.86));
    border-radius: 0.9rem;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px rgba(110, 246, 255, 0.08);
    animation: panelIn 420ms ease both;
}

@keyframes panelIn {
    from {
        transform: translateY(9px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1,
h2 {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

h1 {
    font-size: 1.2rem;
}

h2 {
    font-size: 1rem;
}

.muted {
    color: var(--muted);
}

.flash-wrap {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.72rem 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid;
    margin-bottom: 0.5rem;
}

.flash.ok {
    border-color: rgba(78, 247, 216, 0.6);
    color: #bbfff0;
}

.flash.error {
    border-color: rgba(255, 111, 123, 0.6);
    color: #ffc4ca;
}

.grid-form {
    display: grid;
    gap: 0.45rem;
}

label {
    color: var(--muted);
    font-size: 0.85rem;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    background: rgba(2, 8, 18, 0.8);
    border: 1px solid var(--line-soft);
    color: var(--ink);
    padding: 0.66rem 0.72rem;
    border-radius: 0.46rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--line);
    box-shadow: 0 0 0 2px rgba(78, 247, 216, 0.2);
}

button {
    margin-top: 0.3rem;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 38, 50, 0.95), rgba(8, 20, 30, 0.95));
    color: #d4fbff;
    border-radius: 0.45rem;
    padding: 0.66rem 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

button:hover {
    box-shadow: 0 0 20px rgba(78, 247, 216, 0.2);
}

.login-panel {
    max-width: 450px;
    margin: 10vh auto 0;
}

.map-shell {
    border: 1px solid rgba(78, 247, 216, 0.28);
    border-radius: 0.8rem;
    padding: 0.55rem;
    background: rgba(4, 10, 18, 0.78);
}

.map-shell--intro {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    animation: mapBootFrame 1.8s cubic-bezier(0.14, 0.84, 0.18, 1) both;
}

.map-shell--intro::before,
.map-shell--intro::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
}

.map-shell--intro::before {
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(126, 255, 195, 0.14),
            rgba(126, 255, 195, 0.14) 2px,
            transparent 2px,
            transparent 11px
        ),
        linear-gradient(90deg, transparent 0%, rgba(73, 255, 167, 0.16) 50%, transparent 100%);
    background-size: 100% 100%, 320px 100%;
    mix-blend-mode: screen;
    animation: mapMatrixRain 1.85s ease-out both;
}

.map-shell--intro::after {
    background:
        linear-gradient(180deg, transparent 0%, rgba(86, 255, 172, 0.32) 48%, rgba(188, 255, 223, 0.08) 52%, transparent 100%),
        linear-gradient(90deg, rgba(38, 255, 182, 0.12), transparent 25%, transparent 75%, rgba(38, 255, 182, 0.12));
    transform: translateY(-120%);
    filter: blur(0.7px);
    animation: mapScanSweep 1.95s cubic-bezier(0.14, 0.84, 0.18, 1) both;
}

.map-svg {
    width: 100%;
    height: auto;
}

.map-shell--intro .map-svg {
    position: relative;
    z-index: 1;
    animation: mapBootContent 1.95s cubic-bezier(0.14, 0.84, 0.18, 1) both;
}

.map-svg path {
    fill: rgba(18, 35, 48, 0.95) !important;
    stroke: url(#borderGlow);
    stroke-width: 1.6;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 3px rgba(49, 255, 210, 0.72)) drop-shadow(0 0 9px rgba(110, 246, 255, 0.45));
    transition: filter 220ms ease, fill 220ms ease;
}

.map-svg path:hover {
    fill: rgba(18, 35, 48, 0.95) !important;
    filter: drop-shadow(0 0 5px rgba(49, 255, 210, 0.95)) drop-shadow(0 0 14px rgba(110, 246, 255, 0.7));
}

.town-label {
    fill: #dffcff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    paint-order: stroke;
    stroke: rgba(4, 14, 22, 0.95);
    stroke-width: 1.4;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px rgb(1, 23, 5));
}

.map-shell--intro .town-label,
.map-shell--intro .spy-dot {
    animation: mapGlyphReveal 2.2s cubic-bezier(0.16, 0.86, 0.2, 1) both;
}

.spy-dot {
    fill: #70fff0;
    stroke: #e7ffff;
    stroke-width: 0.8;
    r: 4.2;
    filter: drop-shadow(0 0 6px #70fff0);
}

.agent-node {
    cursor: pointer;
}

.agent-hit {
    fill: transparent;
    stroke: transparent;
    pointer-events: all;
}

.agent-briefing {
    position: absolute;
    left: 1rem;
    right: auto;
    top: 1rem;
    width: min(600px, calc(100% - 2rem));
    z-index: 4;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    pointer-events: none;
}

.agent-briefing.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.agent-briefing .document-body {
    grid-template-columns: minmax(150px, 190px) 1fr;
}

.readiness-track {
    height: 12px;
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(78, 247, 216, 0.42);
    background: rgba(2, 8, 14, 0.8);
    overflow: hidden;
}

.readiness-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #1effb4, #89ffd2 72%, #d6fff1 100%);
    box-shadow: 0 0 12px rgba(70, 255, 187, 0.45);
    transition: width 320ms ease;
}

.readiness-label {
    margin-top: 0.42rem !important;
    color: #c9fff0;
    font-size: 0.84rem;
}

.spy-dot--user {
    animation: blink 1.35s infinite;
}

.spy-dot--event {
    fill: #ff4f57;
    stroke: #ffd2d5;
    stroke-width: 0.7;
    filter: drop-shadow(0 0 9px rgba(255, 79, 87, 0.92));
    animation: eventPing 2.4s ease-out;
}

.event-label {
    fill: #ffd7da;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    paint-order: stroke;
    stroke: rgba(35, 0, 4, 0.95);
    stroke-width: 1.25;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(255, 79, 87, 0.7));
    animation: eventPing 2.4s ease-out;
}

@keyframes blink {
    0%,
    70%,
    100% {
        opacity: 0.24;
        r: 3.6;
    }
    35% {
        opacity: 1;
        r: 5.6;
        filter: drop-shadow(0 0 10px #6cf6ff);
    }
}

@keyframes mapBootFrame {
    0% {
        opacity: 0.12;
        transform: perspective(1800px) rotateX(-28deg) rotateY(-7deg) scale(0.985, 0.08) skewX(7deg);
        filter: brightness(1.8) saturate(1.4) blur(6px);
    }
    26% {
        opacity: 0.48;
        transform: perspective(1800px) rotateX(10deg) rotateY(4deg) scale(1.005, 0.22) skewX(-3deg);
        filter: brightness(1.45) saturate(1.32) blur(1.2px);
    }
    54% {
        opacity: 0.92;
        transform: perspective(1800px) rotateX(-5deg) rotateY(-1deg) scale(1.008, 1.02);
        filter: brightness(1.08) saturate(1.08) blur(0);
    }
    74% {
        transform: perspective(1800px) rotateX(2deg) rotateY(0.5deg) scale(0.998, 0.992);
    }
    100% {
        opacity: 1;
        transform: perspective(1800px) rotateX(0deg) rotateY(0deg) scale(1);
        filter: none;
    }
}

@keyframes mapMatrixRain {
    0% {
        opacity: 0;
        background-position: 0 0, -320px 0;
    }
    18% {
        opacity: 0.96;
    }
    58% {
        opacity: 0.52;
        background-position: 0 180px, 160px 0;
    }
    100% {
        opacity: 0;
        background-position: 0 300px, 340px 0;
    }
}

@keyframes mapScanSweep {
    0% {
        opacity: 0;
        transform: translateY(-120%);
    }
    14% {
        opacity: 1;
    }
    76% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translateY(120%);
    }
}

@keyframes mapBootContent {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(1.03);
        filter: blur(9px) brightness(1.7);
    }
    45% {
        opacity: 0.65;
        transform: translateY(10px) scale(1.012);
        filter: blur(2px) brightness(1.28);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: none;
    }
}

@keyframes mapGlyphReveal {
    0% {
        opacity: 0;
        filter: blur(8px) brightness(1.8);
    }
    52% {
        opacity: 0;
        filter: blur(8px) brightness(1.8);
    }
    78% {
        opacity: 0.78;
        filter: blur(2px) brightness(1.25);
    }
    100% {
        opacity: 1;
        filter: none;
    }
}

@keyframes eventPing {
    0% {
        opacity: 0;
        r: 1.3;
    }
    25% {
        opacity: 1;
        r: 3.2;
    }
    100% {
        opacity: 0;
        r: 5.3;
    }
}

.tech-list {
    margin: 0;
    padding-left: 1.2rem;
}

.tech-list li {
    margin-bottom: 0.55rem;
}

.briefing-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1rem;
    align-items: start;
}

.mission-list {
    display: grid;
    gap: 0.55rem;
}

.mission-tab {
    display: grid;
    gap: 0.2rem;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(78, 247, 216, 0.26);
    border-radius: 0.55rem;
    padding: 0.68rem 0.78rem;
    background: linear-gradient(180deg, rgba(9, 19, 29, 0.85), rgba(7, 12, 20, 0.9));
    color: var(--ink);
    cursor: pointer;
    margin-top: 0;
}

.mission-tab:hover,
.mission-tab.active {
    border-color: var(--line);
    box-shadow: 0 0 0 1px rgba(78, 247, 216, 0.2), 0 0 18px rgba(78, 247, 216, 0.12);
}

.mission-tab-code {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #89c8d0;
}

.mission-tab-title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.9rem;
}

.mission-document {
    border: 1px solid rgba(78, 247, 216, 0.33);
    border-radius: 0.8rem;
    background: linear-gradient(180deg, rgba(7, 17, 23, 0.96), rgba(5, 12, 19, 0.96));
    box-shadow: inset 0 0 0 1px rgba(110, 246, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.35);
    transform-origin: top center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.mission-document.is-open {
    animation: unfoldDossier 920ms cubic-bezier(0.16, 0.84, 0.18, 1), documentPulse 920ms ease-out;
}

.mission-document::before,
.mission-document::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}

.mission-document::before {
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(126, 255, 195, 0.16),
            rgba(126, 255, 195, 0.16) 2px,
            transparent 2px,
            transparent 10px
        ),
        linear-gradient(90deg, transparent 0%, rgba(73, 255, 167, 0.18) 50%, transparent 100%);
    background-size: 100% 100%, 240px 100%;
    mix-blend-mode: screen;
}

.mission-document::after {
    background:
        linear-gradient(180deg, transparent 0%, rgba(86, 255, 172, 0.34) 48%, rgba(188, 255, 223, 0.08) 52%, transparent 100%),
        linear-gradient(90deg, rgba(38, 255, 182, 0.14), transparent 25%, transparent 75%, rgba(38, 255, 182, 0.14));
    transform: translateY(-120%);
    filter: blur(0.5px);
}

.mission-document.is-open::before {
    animation: matrixRainFlash 920ms ease-out;
}

.mission-document.is-open::after {
    animation: scanSweep 920ms cubic-bezier(0.16, 0.84, 0.18, 1);
}

.mission-document-inner {
    padding: 0.9rem;
    position: relative;
    z-index: 1;
}

.mission-document.is-open .document-head,
.mission-document.is-open .target-frame,
.mission-document.is-open .briefing-section {
    animation: contentDecrypt 760ms cubic-bezier(0.18, 0.88, 0.22, 1) both;
}

.mission-document.is-open .document-head {
    animation-delay: 130ms;
}

.mission-document.is-open .target-frame {
    animation-delay: 220ms;
}

.mission-document.is-open .briefing-section:first-child {
    animation-delay: 300ms;
}

.mission-document.is-open .briefing-section:last-child {
    animation-delay: 380ms;
}

.document-head h2 {
    margin-bottom: 0.32rem;
}

.document-body {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 0.85rem;
    align-items: start;
}

.target-frame {
    margin: 0;
    border: 1px solid rgba(78, 247, 216, 0.33);
    border-radius: 0.64rem;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(160deg, rgba(0, 0, 0, 0.5), rgba(10, 25, 18, 0.55)),
        repeating-linear-gradient(
            to bottom,
            rgba(110, 246, 255, 0.045),
            rgba(110, 246, 255, 0.045) 1px,
            transparent 1px,
            transparent 4px
        );
}

.target-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(1) contrast(1.05) brightness(0.82) sepia(0.18) hue-rotate(70deg) saturate(2.3);
    opacity: 0.9;
    mix-blend-mode: screen;
}

.target-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(38, 255, 182, 0.1), rgba(2, 7, 11, 0.12));
    pointer-events: none;
}

.target-frame figcaption {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #b7ffe9;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(78, 247, 216, 0.4);
    border-radius: 0.3rem;
    padding: 0.2rem 0.34rem;
}

.briefing-details {
    display: grid;
    gap: 0.6rem;
}

.briefing-section {
    border: 1px solid rgba(78, 247, 216, 0.24);
    border-radius: 0.58rem;
    padding: 0.62rem 0.7rem;
    background: rgba(8, 16, 26, 0.58);
}

.briefing-section h3 {
    margin: 0 0 0.45rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.briefing-section p {
    margin: 0;
}

.briefing-packages {
    margin: 0;
    padding-left: 1.1rem;
}

.briefing-packages li {
    margin-bottom: 0.28rem;
}

@keyframes unfoldDossier {
    0% {
        opacity: 0.08;
        transform: perspective(1400px) rotateX(-34deg) rotateY(-8deg) scale(0.92, 0.04) skewX(8deg);
        filter: brightness(1.8) saturate(1.5) blur(5px);
    }
    24% {
        opacity: 0.42;
        transform: perspective(1400px) rotateX(11deg) rotateY(5deg) scale(1.01, 0.18) skewX(-4deg);
        filter: brightness(1.45) saturate(1.4) blur(1px);
    }
    50% {
        opacity: 0.92;
        transform: perspective(1400px) rotateX(-6deg) rotateY(-2deg) scale(1.015, 1.03) skewX(1deg);
        filter: brightness(1.1) saturate(1.15) blur(0);
    }
    68% {
        transform: perspective(1400px) rotateX(3deg) rotateY(1deg) scale(0.998, 0.985);
    }
    100% {
        opacity: 1;
        transform: perspective(1400px) rotateX(0deg) rotateY(0deg) scale(1);
        filter: none;
    }
}

@keyframes documentPulse {
    0% {
        box-shadow: inset 0 0 0 1px rgba(110, 246, 255, 0.1), 0 0 0 rgba(0, 0, 0, 0);
    }
    35% {
        box-shadow: inset 0 0 0 1px rgba(130, 255, 212, 0.35), 0 0 36px rgba(73, 255, 167, 0.18);
    }
    100% {
        box-shadow: inset 0 0 0 1px rgba(110, 246, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.35);
    }
}

@keyframes matrixRainFlash {
    0% {
        opacity: 0;
        background-position: 0 0, -240px 0;
    }
    18% {
        opacity: 0.95;
    }
    55% {
        opacity: 0.48;
        background-position: 0 120px, 120px 0;
    }
    100% {
        opacity: 0;
        background-position: 0 220px, 260px 0;
    }
}

@keyframes scanSweep {
    0% {
        opacity: 0;
        transform: translateY(-120%);
    }
    16% {
        opacity: 1;
    }
    72% {
        opacity: 0.72;
    }
    100% {
        opacity: 0;
        transform: translateY(120%);
    }
}

@keyframes contentDecrypt {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        filter: blur(8px) brightness(1.8);
        clip-path: inset(0 0 100% 0);
    }
    38% {
        opacity: 0.6;
        transform: translateY(8px) scale(1.01);
        filter: blur(2px) brightness(1.35);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: none;
        clip-path: inset(0 0 0 0);
    }
}

.timeline {
    display: grid;
    gap: 0.55rem;
}

.timeline-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.7rem;
    border: 1px solid rgba(78, 247, 216, 0.28);
    border-radius: 0.5rem;
    padding: 0.6rem;
}

.slot {
    color: #b7ffff;
}

.messages-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
}

.chat-index {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.5rem 0 1rem;
}

.chat-chip {
    display: grid;
    gap: 0.1rem;
    min-width: 180px;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(78, 247, 216, 0.28);
    border-radius: 0.55rem;
    padding: 0.6rem 0.7rem;
    background: rgba(6, 14, 24, 0.6);
}

.chat-chip:hover,
.chat-chip.active {
    border-color: var(--line);
    box-shadow: 0 0 0 1px rgba(78, 247, 216, 0.18), 0 0 18px rgba(78, 247, 216, 0.12);
}

.chat-chip-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.88rem;
}

.chat-chip-meta,
.chat-chip-time {
    color: var(--muted);
    font-size: 0.75rem;
}

.thread-panel {
    margin-top: 1rem;
}

.thread-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.reply-link {
    text-decoration: none;
    color: #bffef2;
    border: 1px solid var(--line-soft);
    border-radius: 0.45rem;
    padding: 0.45rem 0.7rem;
}

.mailbox {
    display: grid;
    gap: 0.7rem;
}

.mail-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(78, 247, 216, 0.32);
    border-radius: 0.55rem;
    padding: 0.7rem;
    background: rgba(6, 14, 24, 0.65);
}

.mail-item.in {
    border-color: rgba(110, 246, 255, 0.34);
}

.mail-item.out {
    border-color: rgba(78, 247, 216, 0.24);
}

.mail-item:hover {
    box-shadow: 0 0 0 1px rgba(78, 247, 216, 0.18), 0 0 20px rgba(78, 247, 216, 0.1);
}

.mail-item header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.subject {
    font-family: "Orbitron", sans-serif;
    font-size: 0.92rem;
}

.stamp,
.meta {
    color: var(--muted);
    font-size: 0.8rem;
}

.reply-hint {
    margin-top: 0.5rem;
    color: #b7ffff;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compose select[multiple] {
    min-height: 170px;
}

.map-shell .agent-briefing {
    position: absolute !important;
    top: 1rem !important;
    left: 1rem !important;
    right: auto !important;
    bottom: auto !important;
}

@media (max-width: 820px) {
    .panel-map {
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .messages-layout {
        grid-template-columns: 1fr;
    }

    .briefing-layout {
        grid-template-columns: 1fr;
    }

    .document-body {
        grid-template-columns: 1fr;
    }

    .map-shell {
        padding: 0.4rem;
    }

    .map-shell--intro {
        overflow: visible;
    }

    .map-svg {
        min-height: 60vh;
    }

    .map-shell .agent-hit {
        r: 24;
    }

    .map-shell .spy-dot {
        r: 6.5;
    }

    .map-shell .town-label {
        font-size: 16px;
    }

    .agent-briefing {
        position: static !important;
        width: 100%;
        max-height: none;
        margin-top: 0.85rem;
        pointer-events: auto;
    }

    .agent-briefing .document-body {
        grid-template-columns: 1fr;
    }

    .agent-briefing .document-body {
        gap: 0.65rem;
    }

    .target-frame {
        max-height: 45vh;
    }

    .target-frame img {
        aspect-ratio: 16 / 10;
        object-position: center 12%;
    }

    .briefing-section {
        padding: 0.58rem 0.62rem;
    }

    .briefing-section p,
    .readiness-label {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .thread-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-row {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-wrap: wrap;
    }
}
