:root{
 --bg:#030506;--panel:#070a0d;--panel2:#0a0f13;--line:#263039;--line2:#3b2c23;--text:#d9e1e5;--muted:#78858d;
 --gold:#d0a966;--gold2:#f0d29a;--blue:#4eb6ff;--red:#ff3f38;--red2:#8e1715;--purple:#b34bff;--cyan:#42e1ff;--green:#42d79d;--orange:#ff9d36;
}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#000;color:var(--text);font-family:Consolas,'Courier New',monospace;overflow:hidden}button,input,select{font:inherit}.boot{position:fixed;inset:0;background:#000;z-index:10000;display:grid;place-items:center;transition:opacity .85s ease}.boot.fade{opacity:0;pointer-events:none}.boot-shell{width:min(1040px,92vw);height:min(700px,88vh);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.boot-node{position:absolute;top:5%;left:1%;font-size:12px;letter-spacing:.18em;color:#7a8992}.boot-status{position:absolute;bottom:4%;font-size:10px;letter-spacing:.16em;color:#4e5960}.skipboot{position:fixed;right:24px;bottom:22px;background:#050607;border:1px solid #4b2825;color:#8f6b68;padding:8px 12px;cursor:pointer;z-index:2}.signal-line{width:100%;height:110px;display:flex;align-items:center;justify-content:center;gap:8px;filter:drop-shadow(0 0 10px #b00);transition:opacity .5s,transform .8s}.signal-line span{height:1px;flex:1;background:linear-gradient(90deg,transparent,#f23)}.signal-line span:last-child{background:linear-gradient(90deg,#f23,transparent)}.signal-line i{width:2px;height:5px;background:#ff3d35;animation:eq .72s ease-in-out infinite alternate}.signal-line i:nth-of-type(2){animation-delay:.06s}.signal-line i:nth-of-type(3){animation-delay:.16s}.signal-line i:nth-of-type(4){animation-delay:.26s}.signal-line i:nth-of-type(5){animation-delay:.12s}.signal-line i:nth-of-type(6){animation-delay:.2s}.signal-line i:nth-of-type(7){animation-delay:.32s}.signal-line.morph{opacity:.1;transform:scaleX(.25)}
.ai-sphere{position:absolute;top:14%;width:245px;height:245px;border-radius:50%;filter:drop-shadow(0 0 25px #8d0000);animation:sphereFloat 4s ease-in-out infinite}.ai-sphere.is-hidden{opacity:0;transform:scale(.2);pointer-events:none}.ai-sphere:not(.is-hidden){transition:opacity .8s,transform .8s}.sphere-grid{position:absolute;inset:0;border-radius:50%;border:1px solid #ff4d46;background:radial-gradient(circle at 42% 38%,#ff756d38 0 7%,#a5131028 22%,#240000 56%,#020000 72%);box-shadow:0 0 44px #9a1616,inset 0 0 45px #c31919}.sphere-grid:before,.sphere-grid:after{content:"";position:absolute;inset:8%;border-radius:50%;border:1px solid #e73535aa;box-shadow:inset 0 0 20px #d21}.sphere-grid:after{inset:20% 4%;transform:rotate(63deg)}.sphere-ring{position:absolute;border:1px solid #ff594f99;border-radius:50%}.ring-a{inset:12%;animation:spin 8s linear infinite}.ring-b{left:-14%;right:-14%;top:42%;height:18%;transform:rotate(-8deg);animation:ringPulse 2.5s ease-in-out infinite}.ring-c{top:-15%;bottom:-15%;left:42%;width:16%;transform:rotate(28deg);animation:ringPulse 3.2s ease-in-out infinite reverse}.sphere-scan{position:absolute;left:5%;right:5%;top:50%;height:1px;background:#ff675f;box-shadow:0 0 16px #f22;animation:sphereScan 2.7s ease-in-out infinite}.boot.breach .ai-sphere{animation:glitch .12s steps(2) infinite}.boot.breach .sphere-grid{box-shadow:0 0 70px #f00,inset 0 0 60px #f33}.boot-text{width:min(780px,100%);height:205px;margin-top:240px;color:#ef4d47;font-size:15px;line-height:1.7;white-space:pre-wrap;text-shadow:0 0 8px #700}.boot.breach .boot-text{color:#ff2c25}
.archive-app{height:100vh;display:flex;flex-direction:column;background:#020304;opacity:1}.topframe{height:84px;display:grid;grid-template-columns:minmax(330px,430px) 1fr 190px;align-items:stretch;border-bottom:1px solid #26313a;background:linear-gradient(#05080a,#030506);z-index:20}.brand-block{display:flex;align-items:center;padding:8px 14px;border-right:1px solid #49382a;background:linear-gradient(90deg,#090806,#040608)}.sigil{width:58px;height:58px;border:1px solid #765b34;border-radius:50%;display:grid;place-items:center;margin-right:12px;color:var(--gold2);font-size:28px;box-shadow:inset 0 0 20px #5b3e1c55}.brand-block small{display:block;color:#ddc08a;letter-spacing:.24em;font-family:Georgia,serif;font-size:10px}.brand-block strong{display:block;color:#f1d7a6;font-family:Georgia,serif;font-size:23px;letter-spacing:.09em;white-space:nowrap}.brand-block span{font-size:9px;color:#8d877d;letter-spacing:.08em}.primary-nav{display:flex;align-items:center;justify-content:center;gap:6px;padding:0 12px}.primary-nav button{height:42px;min-width:74px;padding:0 12px;background:#071018;border:1px solid #263846;color:#aab7bf;cursor:pointer;letter-spacing:.04em;transition:.2s}.primary-nav button:hover{color:#fff;border-color:#597181}.primary-nav button.active{border-color:#2b9bd8;color:#dff6ff;box-shadow:inset 0 0 18px #0074aa66,0 0 12px #008cd544}.primary-nav button[data-section=intelligence].active{border-color:#ef413b;color:#ffd5d2;box-shadow:inset 0 0 20px #a20a0a66,0 0 15px #d7191955}.primary-nav button[data-section=veil].active{border-color:#b657ff;color:#efd5ff;box-shadow:inset 0 0 22px #650e9b77,0 0 16px #8e18d455}.top-status{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:0 14px;border-left:1px solid #22303a;color:#9ba8ae;font-size:10px;white-space:nowrap}.top-status a{color:#d4ad69;text-decoration:none;border:1px solid #40352b;padding:7px}.subnav{height:44px;display:flex;align-items:center;gap:7px;padding:0 14px;background:#05090c;border-bottom:1px solid #263039;z-index:15}.subnav button{height:31px;background:#071018;border:1px solid #263846;color:#a8b3ba;padding:0 13px;font-size:10px;cursor:pointer}.subnav button.active{border-color:#2d9cdc;color:#daf5ff;box-shadow:inset 0 0 14px #006da555}.subnav[data-mode=intelligence] button.active{border-color:#ef3d36;color:#ffd3d0;box-shadow:0 0 12px #d6151555,inset 0 0 14px #8e070766}.subnav[data-mode=veil] button.active{border-color:#b34bff;color:#f0d6ff;box-shadow:0 0 12px #8a18d355,inset 0 0 14px #50007a88}.subnav-spacer{flex:1}.archive-search{height:31px;display:flex;align-items:center;border:1px solid #2c3942;background:#020507;padding:0 8px;color:#617079;min-width:240px}.archive-search input{width:100%;border:0;background:none;color:#cbd4d9;outline:none;padding-left:7px;font-size:10px}.workspace{flex:1;min-height:0;display:grid;grid-template-columns:190px 1fr 230px}.sidepanel{min-height:0;background:#04080a;overflow:auto;z-index:10}.left-panel{border-right:1px solid #263039}.right-panel{border-left:1px solid #263039}.side-title{padding:12px 12px 8px;color:#b9c4ca;font-size:10px;letter-spacing:.16em;border-bottom:1px solid #1f2b32}.side-title.red{color:#ef5049}.side-title.purple{color:#c877ff}.layer-btn,.side-row{display:flex;align-items:center;width:100%;min-height:39px;padding:7px 10px;background:#070d10;border:0;border-bottom:1px solid #1e2930;color:#a4b0b7;text-align:left;font-size:10px;cursor:pointer}.layer-btn:hover,.layer-btn.active{background:#0b1318;color:#fff}.layer-btn:before{content:"";width:10px;height:10px;border-radius:50%;border:1px solid #6f818b;margin-right:9px;box-shadow:0 0 8px #334}.layer-btn.active:before{background:var(--blue);border-color:#fff;box-shadow:0 0 11px var(--blue)}.left-panel[data-mode=intelligence] .layer-btn.active:before{background:var(--red);box-shadow:0 0 11px var(--red)}.left-panel[data-mode=veil] .layer-btn.active:before{background:var(--purple);box-shadow:0 0 11px var(--purple)}.legend-item{display:flex;align-items:center;gap:9px;padding:6px 10px;font-size:9px;color:#a6b0b5}.legend-icon{width:12px;height:12px;border:1px solid currentColor;transform:rotate(45deg);flex:0 0 12px}.legend-icon.round{border-radius:50%;transform:none}.legend-icon.line{height:2px;border:0;background:currentColor;transform:none}.right-section{padding:10px;border-bottom:1px solid #202a31}.right-section h3{font-size:10px;margin:0 0 8px;color:#d4dce0;letter-spacing:.12em}.right-section h3 em{font-style:normal;float:right;color:#e54841}.alert-row{border:1px solid #27323a;background:#080d10;padding:8px 9px;margin-bottom:6px;cursor:pointer}.alert-row b{display:block;font-size:10px;color:#e6ecef}.alert-row span{display:block;color:#75838b;font-size:8px;margin-top:3px}.alert-row.critical{border-color:#681f1d}.alert-row.high{border-color:#5a2923}.empty-state{padding:12px;color:#5f6d74;font-size:9px;line-height:1.5}.mainstage{position:relative;min-width:0;min-height:0;background:#010203}.map-stage,.records-stage{position:absolute;inset:0}.map-hud{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:#05090c;border-bottom:1px solid #263039;z-index:5}.map-hud b{font-size:11px;color:#e3c897}.map-hud small{display:block;font-size:8px;color:#65727a;margin-top:2px}.map-controls{display:flex;align-items:center;gap:5px}.map-controls select,.map-controls button{height:29px;background:#071017;border:1px solid #2b3942;color:#aebac0;font-size:9px}.map-controls select{padding:0 7px;max-width:190px}.map-controls button{width:30px;cursor:pointer}.map-viewport{position:absolute;top:44px;left:0;right:0;bottom:0;overflow:hidden;background:#020405;cursor:grab}.map-viewport.dragging{cursor:grabbing}.map-world{position:absolute;transform-origin:0 0;will-change:transform;user-select:none}.map-world>img{display:block;width:100%;height:100%;pointer-events:none;user-select:none}.overlay-svg,.location-layer,.veil-ambient{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.overlay-svg{overflow:visible}.overlay-svg .intel-line{fill:none;stroke:#ff413a;stroke-width:.34;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 3px #f22);stroke-dasharray:1.5 1;animation:dash 9s linear infinite}.overlay-svg .intel-line.secondary{stroke:#ff9d36;opacity:.85}.overlay-svg .veil-line{fill:none;stroke:#b34bff;stroke-width:.38;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 4px #9d30ff);stroke-dasharray:1 1;animation:dash 12s linear infinite reverse}.overlay-svg .area-intelligence{fill:#ff2d2524;stroke:#ff3d36aa;stroke-width:.22}.overlay-svg .area-veil{fill:#8624ce20;stroke:#c45dffbb;stroke-width:.22}.location-layer{pointer-events:none}.map-marker{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;cursor:pointer;border:0;background:none;color:#fff;z-index:4}.map-marker .pulse{display:block;width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:#279bd7;box-shadow:0 0 12px #2aaaff;position:relative}.map-marker .pulse:after{content:"";position:absolute;inset:-7px;border:1px solid #41bfff77;border-radius:50%;animation:pulse 2s ease-out infinite}.map-marker.intelligence .pulse{background:#d92923;box-shadow:0 0 14px #f22}.map-marker.intelligence .pulse:after{border-color:#f33}.map-marker.veil .pulse{background:#8c2bd0;box-shadow:0 0 15px #c24fff}.map-marker.veil .pulse:after{border-color:#c24fff}.map-marker span{display:none;position:absolute;left:16px;top:-8px;background:#040709ee;border:1px solid #33414a;padding:4px 6px;white-space:nowrap;font-size:8px;color:#e4e9eb}.map-marker:hover span{display:block}.overlay-point{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;z-index:5;cursor:pointer}.overlay-point i{display:block;width:14px;height:14px;border:1px solid #fff;transform:rotate(45deg);background:#d72b25;box-shadow:0 0 11px #f22}.overlay-point.veil i{background:#7d21c7;box-shadow:0 0 12px #b34bff;border-radius:50%;transform:none}.overlay-point b{display:none;position:absolute;left:16px;top:-7px;background:#050709ed;border:1px solid #4a3433;padding:5px 7px;white-space:nowrap;font-size:8px}.overlay-point:hover b{display:block}.veil-ambient{opacity:0;transition:.5s;background:radial-gradient(circle at 25% 35%,#6e1ebc30,transparent 24%),radial-gradient(circle at 68% 42%,#0fbad821,transparent 18%),radial-gradient(circle at 82% 70%,#ef1c1830,transparent 23%);mix-blend-mode:screen}.map-world.mode-veil .veil-ambient{opacity:1}.map-world.mode-intelligence>img{filter:saturate(.88) contrast(1.05) brightness(.86)}.map-world.mode-veil>img{filter:saturate(1.15) contrast(1.08) brightness(.78) hue-rotate(6deg)}.scanline{position:absolute;left:0;right:0;height:1px;background:#ff423b;box-shadow:0 0 10px #f33;opacity:.18;animation:scan 7s linear infinite;pointer-events:none;z-index:6}.corner-grid{position:absolute;width:90px;height:90px;pointer-events:none;opacity:.18;background-image:linear-gradient(#6a7680 1px,transparent 1px),linear-gradient(90deg,#6a7680 1px,transparent 1px);background-size:12px 12px}.corner-grid.tl{left:0;top:0;mask-image:linear-gradient(135deg,#000,transparent 70%)}.corner-grid.br{right:0;bottom:0;mask-image:linear-gradient(315deg,#000,transparent 70%)}.map-breadcrumb{position:absolute;left:12px;bottom:10px;background:#030609d9;border:1px solid #2e3b43;padding:8px 12px;z-index:8}.map-breadcrumb b{display:block;font-family:Georgia,serif;color:#e2c386;font-size:12px;letter-spacing:.08em}.map-breadcrumb span{font-size:8px;color:#758188}.records-stage{overflow:auto;padding:24px;background:radial-gradient(circle at 75% 15%,#20101055,transparent 35%),#030608}.records-head{display:flex;justify-content:space-between;align-items:flex-start;border-left:3px solid var(--red);padding:4px 0 4px 16px;margin-bottom:18px}.records-head small{font-size:9px;color:#e14a43;letter-spacing:.17em}.records-head h1{margin:4px 0 6px;font-size:24px;letter-spacing:.12em;color:#edf2f4}.records-head p{margin:0;color:#78858d;font-size:11px}.records-stat{border:1px solid #29363e;padding:8px 13px;text-align:center}.records-stat span{display:block;font-size:21px;color:#e4ecef}.records-stat small{color:#718087}.records-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}.records-filters button{background:#071015;border:1px solid #2b3740;color:#909da4;padding:7px 10px;font-size:9px;cursor:pointer}.records-filters button.active{border-color:#d7443c;color:#fff}.records-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}.record-card{min-height:150px;background:linear-gradient(180deg,#0a0f12,#070b0d);border:1px solid #29353c;padding:14px;cursor:pointer;position:relative;overflow:hidden}.record-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:#90302c}.record-card:hover{border-color:#6b3733;box-shadow:0 0 20px #000}.record-card .eyebrow{font-size:8px;color:#e04a43;letter-spacing:.12em}.record-card h3{margin:7px 0;font-size:14px;color:#edf2f4}.record-card p{margin:0 0 12px;color:#7e8a91;font-size:10px;line-height:1.5}.record-card footer{position:absolute;left:14px;right:14px;bottom:12px;font-size:8px;color:#adbbbF;display:flex;justify-content:space-between}.record-card .status{color:#f0645d}.record-drawer{position:fixed;top:84px;right:0;bottom:0;width:min(520px,94vw);background:#05090cf5;border-left:1px solid #57302c;z-index:100;transform:translateX(102%);transition:transform .25s ease;box-shadow:-20px 0 60px #000c;overflow:auto}.record-drawer.open{transform:translateX(0)}.drawer-close{position:sticky;top:8px;float:right;margin:8px;background:#080b0d;border:1px solid #4d2b28;color:#ff6a62;width:34px;height:34px;font-size:20px;cursor:pointer;z-index:2}.drawer-content{padding:42px 26px 30px}.drawer-content small{color:#e04a43;letter-spacing:.16em}.drawer-content h2{font-family:Georgia,serif;font-size:28px;color:#ead0a0;margin:8px 0}.drawer-content .meta{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.drawer-content .meta span{border:1px solid #2c3941;background:#071015;padding:5px 7px;font-size:9px;color:#aeb9bf}.drawer-content p{line-height:1.65;color:#a2adb2;font-size:12px}.drawer-content hr{border:0;border-top:1px solid #273139;margin:18px 0}.ai-dock{position:fixed;left:13px;bottom:11px;width:166px;height:58px;background:#06090cf0;border:1px solid #492723;z-index:30;display:flex;align-items:center;padding:8px;gap:8px}.mini-sphere{width:39px;height:39px;border-radius:50%;border:1px solid #f0443c;box-shadow:0 0 15px #b31818,inset 0 0 14px #d22;background:radial-gradient(circle,#d93b34aa,#280000 60%,#000 70%);position:relative;flex:0 0 39px;animation:spin 10s linear infinite}.mini-sphere i{position:absolute;inset:7px;border:1px solid #ff5f58;border-radius:50%}.mini-sphere i:last-child{inset:14px -5px;transform:rotate(23deg)}.ai-dock small{display:block;color:#86939a;font-size:7px}.ai-dock b{font-size:8px;color:#f05049}.ai-wave{margin-left:auto;display:flex;gap:2px;align-items:center;height:20px}.ai-wave i{width:1px;height:4px;background:#f33;animation:eq .8s infinite alternate}.ai-wave i:nth-child(2){animation-delay:.1s}.ai-wave i:nth-child(3){animation-delay:.2s}.ai-wave i:nth-child(4){animation-delay:.3s}.ai-wave i:nth-child(5){animation-delay:.15s}
@keyframes eq{to{height:28px}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes sphereFloat{50%{transform:translateY(-7px)}}@keyframes sphereScan{0%,100%{top:25%;opacity:.2}50%{top:74%;opacity:1}}@keyframes ringPulse{50%{opacity:.35;transform:scale(1.08)}}@keyframes glitch{0%{transform:translate(0)}25%{transform:translate(5px,-2px)}50%{transform:translate(-5px,2px)}75%{transform:translate(3px,1px)}}@keyframes scan{from{top:0}to{top:100%}}@keyframes pulse{0%{transform:scale(.4);opacity:.9}100%{transform:scale(1.4);opacity:0}}@keyframes dash{to{stroke-dashoffset:-20}}
@media(max-width:1280px){.topframe{grid-template-columns:340px 1fr 150px}.brand-block strong{font-size:18px}.primary-nav{gap:3px}.primary-nav button{min-width:auto;padding:0 8px;font-size:10px}.workspace{grid-template-columns:165px 1fr 205px}.archive-search{min-width:180px}}
@media(max-width:980px){.topframe{grid-template-columns:270px 1fr}.top-status{display:none}.brand-block span{display:none}.primary-nav{overflow-x:auto;justify-content:flex-start}.workspace{grid-template-columns:58px 1fr}.right-panel{display:none}.left-panel .side-title,.left-panel .layer-btn span,.left-panel .legend-item span{display:none}.left-panel .layer-btn{justify-content:center}.left-panel .layer-btn:before{margin:0}.left-panel .legend-item{justify-content:center}.ai-dock{width:48px}.ai-dock>div:nth-child(2),.ai-dock .ai-wave{display:none}.records-stage{padding:16px}}
@media(max-width:700px){.topframe{height:96px;grid-template-columns:1fr}.brand-block{height:50px}.brand-block strong{font-size:16px}.primary-nav{height:46px;border-top:1px solid #1f2b32}.primary-nav button{height:32px}.subnav{overflow-x:auto}.archive-search{display:none}.workspace{grid-template-columns:48px 1fr}.map-hud small{display:none}.map-controls select{max-width:115px}.record-drawer{top:96px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.ai-dock{appearance:none;color:inherit;text-align:left;cursor:pointer}.ai-console{position:fixed;left:13px;bottom:78px;width:min(470px,calc(100vw - 26px));background:#05090cf7;border:1px solid #55302c;z-index:80;box-shadow:0 0 45px #000;transform:translateY(15px);opacity:0;pointer-events:none;transition:.2s}.ai-console.open{transform:translateY(0);opacity:1;pointer-events:auto}.ai-console-head{height:36px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;border-bottom:1px solid #2b343a;color:#df5a53;font-size:9px}.ai-console-head button{background:none;border:0;color:#f26760;font-size:18px;cursor:pointer}.ai-output{min-height:110px;max-height:230px;overflow:auto;padding:12px;color:#9aa7ad;font-size:10px;line-height:1.55;white-space:pre-wrap}.ai-console form{display:flex;border-top:1px solid #29343b}.ai-console input{flex:1;background:#020405;border:0;color:#dce4e8;padding:11px;outline:none}.ai-console form button{background:#2e0d0c;border:0;border-left:1px solid #6f2a26;color:#f6b7b2;padding:0 14px;cursor:pointer}
.timeline{margin-top:10px;border-left:1px solid #4b2d2a;padding-left:12px}.timeline div{position:relative;padding:7px 0;color:#8f9ba1;font-size:10px}.timeline div:before{content:"";position:absolute;left:-16px;top:12px;width:7px;height:7px;border-radius:50%;background:#d63f38;box-shadow:0 0 8px #d63f38}

/* ===== V3 FULL REGIONAL HIERARCHY ===== */
.map-stage{display:grid;grid-template-rows:44px minmax(0,1fr) 142px;overflow:hidden}.map-stage .map-hud{position:relative;inset:auto;height:44px}.map-hud-copy{min-width:0}.map-viewport{position:relative;top:auto;left:auto;right:auto;bottom:auto;min-height:0}.map-stage .map-world{transition:opacity .18s ease,filter .18s ease}.map-stage.map-switching .map-world{opacity:.28;filter:blur(1.5px)}.back-map.hidden{display:none}.map-breadcrumb{bottom:154px;display:flex;align-items:center;gap:7px;padding:6px 10px;max-width:70%;backdrop-filter:blur(5px)}.map-breadcrumb button{border:0;background:none;padding:0;color:#e2c386;font-family:Georgia,serif;font-size:11px;letter-spacing:.07em;cursor:pointer}.map-breadcrumb button:hover{text-shadow:0 0 10px #d8a759}.map-breadcrumb i{font-style:normal;color:#617079}.map-breadcrumb b{display:inline;font-size:11px}.map-breadcrumb span{margin-left:6px;white-space:nowrap}.region-navigator{height:142px;display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:4px;padding:5px;background:#020405;border-top:1px solid #5b4932;z-index:9;overflow:hidden}.region-card{position:relative;min-width:0;border:1px solid #5c4b33;background:#080b0d;overflow:hidden;text-align:left;color:#dfe5e8;cursor:pointer;padding:0;isolation:isolate}.region-card:before{content:"";position:absolute;inset:0;background-image:linear-gradient(180deg,#00000010 22%,#020304d4 78%),var(--region-bg);background-size:cover;background-position:center;filter:saturate(.92) brightness(.78);z-index:-2;transition:.22s}.region-card:after{content:"";position:absolute;inset:0;border:1px solid transparent;box-shadow:inset 0 0 30px #000b;z-index:-1}.region-card:hover:before,.region-card.active:before{filter:saturate(1.12) brightness(.95);transform:scale(1.025)}.region-card:hover,.region-card.active{border-color:#d2ae70;box-shadow:0 0 12px #7d5d2b55}.region-card.active{outline:1px solid #e4bf7d}.region-card-title{position:absolute;left:8px;right:8px;top:7px;font-family:Georgia,serif;color:#f1d7a6;font-size:11px;letter-spacing:.08em;text-shadow:0 2px 4px #000}.region-card small{position:absolute;left:8px;right:8px;top:25px;color:#d6dde1;font-size:7px;letter-spacing:.09em}.region-card em{position:absolute;left:8px;right:8px;bottom:29px;font-style:normal;color:#aab3b8;font-size:7px;line-height:1.25;text-shadow:0 1px 3px #000}.region-card b{position:absolute;left:8px;bottom:7px;background:#030608df;border:1px solid #a98955;color:#f1d7a6;padding:4px 7px;font-size:7px;letter-spacing:.05em}.key-locations-card:before{background-image:linear-gradient(180deg,#00000010 22%,#050608dd 78%),var(--region-bg)}.panel-note{padding:12px;color:#65737b;font-size:9px;line-height:1.55}.region-jump.active{color:#f1d7a6;border-left:2px solid #cda968}.map-controls .back-map{color:#e0c38e;border-color:#625037}.map-controls .back-map:hover{border-color:#c9a15e;color:#fff}.map-marker span{max-width:220px;overflow:hidden;text-overflow:ellipsis}.archive-app{--region-strip:142px}
@media(max-width:1280px){.region-navigator{grid-template-columns:repeat(6,minmax(105px,1fr));height:128px}.map-stage{grid-template-rows:44px minmax(0,1fr) 128px}.map-breadcrumb{bottom:140px}.region-card-title{font-size:9px}.region-card em{display:none}}
@media(max-width:980px){.map-stage{grid-template-rows:44px minmax(0,1fr) 112px}.region-navigator{height:112px;display:flex;overflow-x:auto;gap:4px}.region-card{flex:0 0 155px}.map-breadcrumb{bottom:124px}.region-card em{display:none}.region-card b{bottom:6px}.region-card-title{font-size:9px}}
@media(max-width:700px){.map-stage{grid-template-rows:44px minmax(0,1fr) 96px}.region-navigator{height:96px}.region-card{flex-basis:132px}.region-card small{display:none}.region-card-title{top:8px;font-size:8px}.region-card b{font-size:6px}.map-breadcrumb{bottom:108px;max-width:88%}.map-breadcrumb span{display:none}}
.region-hotspot{position:absolute;pointer-events:auto;border:1px solid transparent;background:transparent;cursor:zoom-in;z-index:2;transition:.15s}.region-hotspot:hover{border-color:#d2ae7066;background:#d2ae7008;box-shadow:inset 0 0 26px #d2ae7014}

/* ===== V3.1 MAP VIEWPORT POLISH =====
   Keep every map visually filled without exposing blank canvas, while preserving
   the full foreground map so baked-in labels are not cropped by the viewport. */
.map-viewport{background:#020405;isolation:isolate}
.map-backdrop{position:absolute;inset:-18px;z-index:0;pointer-events:none;background-repeat:no-repeat;background-position:center;background-size:cover;filter:blur(16px) saturate(.78) brightness(.34) contrast(1.06);transform:scale(1.045);opacity:.96;transition:background-image .18s ease,filter .25s ease}
.map-world{z-index:2;box-shadow:0 0 0 1px #263039,0 0 34px #000c;background:#020405}
.map-world>img{object-fit:fill}
.map-edge-shade{position:absolute;inset:0;z-index:4;pointer-events:none;box-shadow:inset 0 0 28px 7px #020405aa,inset 0 0 4px 1px #5b493244}
.map-world.mode-intelligence~.map-edge-shade{box-shadow:inset 0 0 30px 8px #030405bb,inset 0 0 8px 1px #6b1d1b44}
.map-world.mode-veil~.map-edge-shade{box-shadow:inset 0 0 30px 8px #030405bb,inset 0 0 8px 1px #5e257c55}

/* Map labels should flip inward at the edges instead of being clipped. */
.map-marker span,.overlay-point b{max-width:260px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25;box-shadow:0 4px 14px #000b}
.map-marker.anchor-left span,.overlay-point.anchor-left b{left:auto;right:17px;text-align:right}
.map-marker.anchor-below span,.overlay-point.anchor-below b{left:50%;right:auto;top:17px;transform:translateX(-50%);text-align:center}
.map-marker.anchor-above span,.overlay-point.anchor-above b{left:50%;right:auto;top:auto;bottom:17px;transform:translateX(-50%);text-align:center}
.map-marker.anchor-above.anchor-left span,.overlay-point.anchor-above.anchor-left b{left:auto;right:17px;transform:none;text-align:right}
.map-marker.anchor-below.anchor-left span,.overlay-point.anchor-below.anchor-left b{left:auto;right:17px;transform:none;text-align:right}

/* Region strip typography stays fully readable at every breakpoint. */
.region-card-title{white-space:normal;line-height:1.05;overflow:visible}
.region-card small{white-space:normal;line-height:1.05}
.region-card b{white-space:nowrap;max-width:calc(100% - 16px);overflow:hidden;text-overflow:ellipsis}

/* Small screens keep the map imagery filling the viewport rather than showing black margins. */
@media(max-width:700px){.map-backdrop{inset:-24px;filter:blur(18px) saturate(.76) brightness(.31)}.map-marker span,.overlay-point b{max-width:190px}}
.map-repair-label{position:absolute;z-index:3;transform:translate(-50%,-50%);pointer-events:none;background:#030608e8;border:1px solid #54616a;padding:4px 7px;color:#eef2f3;font-family:Georgia,serif;font-size:8px;letter-spacing:.03em;white-space:nowrap;text-shadow:0 1px 3px #000;box-shadow:0 3px 14px #000c}
.map-repair-label.anchor-left{transform:translate(-100%,-50%)}
.map-repair-label.anchor-above{transform:translate(-50%,-100%)}
.map-repair-label.anchor-left.anchor-above{transform:translate(-100%,-100%)}
.map-repair-label.anchor-below{transform:translate(-50%,0)}
.map-repair-label.anchor-left.anchor-below{transform:translate(-100%,0)}
.map-repair-label.anchor-right{transform:translate(0,-50%)}
.map-repair-label.anchor-right.anchor-above{transform:translate(0,-100%)}
.map-repair-label.anchor-right.anchor-below{transform:translate(0,0)}

/* V3.2 — Intelligence population / dossier crosslinks */
.mini-record{width:100%;display:grid;grid-template-columns:30px 1fr auto;gap:8px;align-items:center;text-align:left;border:1px solid #27323a;background:#080d10;padding:7px 8px;margin-bottom:6px;color:#d7dfe3;cursor:pointer;transition:.18s ease}.mini-record:hover{border-color:#6b3733;background:#0c1215;transform:translateX(-1px)}.mini-record .mini-icon{width:26px;height:26px;border:1px solid #58413a;border-radius:50%;display:grid;place-items:center;font-size:8px;color:#f06a62;background:radial-gradient(circle,#3c1615,#090a0c 70%);box-shadow:inset 0 0 10px #7e1e1b44}.mini-record .mini-icon.veil{color:#d695ff;border-color:#673f82;background:radial-gradient(circle,#321243,#08090b 72%);box-shadow:0 0 10px #8f2ad044,inset 0 0 10px #71208f55}.mini-record span:nth-child(2){min-width:0}.mini-record b{display:block;font-size:9px;color:#e8edf0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-record small{display:block;margin-top:2px;font-size:7px;color:#6e7c84;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-record em{font-style:normal;font-size:7px;color:#e65a52;text-align:right}.mini-record.unverified em{color:#78858c}.mini-record.suspected em{color:#d89a45}.mini-record.confirmed em{color:#f35b53}.mini-record.critical em{color:#ff3026;text-shadow:0 0 8px #f22}.phenomenon-mini em{color:#c86fff}.drawer-list{margin-top:8px;display:grid;gap:7px}.drawer-list>div{position:relative;padding:8px 10px 8px 14px;border:1px solid #243039;background:#070c0f;color:#97a4aa;font-size:10px;line-height:1.45}.drawer-list>div:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:#9d3732}.record-drawer .drawer-list+hr{margin-top:20px}.right-panel .right-section{overflow:hidden}.right-panel .mini-record:last-child{margin-bottom:0}
.operational-webs{display:grid;grid-template-columns:1fr;gap:4px}.operational-webs h3{margin-bottom:4px}.web-row{display:grid;grid-template-columns:84px 1fr;gap:7px;align-items:center;width:100%;padding:6px 7px;border:1px solid #252f35;background:#070c0f;color:#aeb8bd;text-align:left;cursor:pointer}.web-row:hover,.web-row.active{border-color:#71332f;background:#0b1013}.web-row b{font-size:8px;color:#e35149;letter-spacing:.08em}.web-row span{font-size:7px;color:#65737a;line-height:1.25}

/* ===== V3.3 MMO-STYLE INTELLIGENCE MARKERS + PORTRAIT DOSSIERS ===== */
.intel-hotspot{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;border:0;background:transparent;padding:0;z-index:8;cursor:pointer;color:#fff;overflow:visible}
.hotspot-core{position:relative;width:34px;height:34px;display:grid;place-items:center;filter:drop-shadow(0 0 8px #000)}
.marker-svg{width:28px;height:28px;overflow:visible}.skull-svg{fill:#ff342e;stroke:#ffb4af;stroke-width:1.2}.skull-svg circle,.skull-svg .cut{fill:#130303;stroke:none}.subject-hotspot .hotspot-core:before{content:"";position:absolute;inset:1px;border:1px solid #ff3a34;border-radius:50%;box-shadow:0 0 10px #d21d19,inset 0 0 10px #7f0f0d66;animation:markerBreath 2.3s ease-in-out infinite}.subject-hotspot .hotspot-core:after{content:"";position:absolute;inset:-6px;border:1px solid #ff3a3444;border-radius:50%;animation:pulse 2.2s ease-out infinite}
.subject-hotspot.tier-lieutenant .hotspot-core{width:39px;height:39px}.subject-hotspot.tier-lieutenant .marker-svg{width:31px;height:31px}.subject-hotspot.tier-lieutenant .hotspot-core:before{inset:-1px;border-width:2px}
.subject-hotspot.tier-elite .hotspot-core{width:45px;height:45px}.subject-hotspot.tier-elite .marker-svg{width:35px;height:35px}.subject-hotspot.tier-elite .hotspot-core:before{inset:-3px;border-width:2px;clip-path:polygon(50% 0,88% 12%,100% 50%,88% 88%,50% 100%,12% 88%,0 50%,12% 12%);border-radius:0}
.subject-hotspot.tier-boss .hotspot-core{width:54px;height:54px}.subject-hotspot.tier-boss .marker-svg{width:40px;height:40px;filter:drop-shadow(0 0 7px #ff1f17)}.subject-hotspot.tier-boss .hotspot-core:before{inset:-6px;border:2px solid #ff2921;clip-path:polygon(50% 0,88% 10%,100% 50%,88% 90%,50% 100%,12% 90%,0 50%,12% 10%);border-radius:0;box-shadow:0 0 18px #f22,inset 0 0 18px #a10d0d}.subject-hotspot.tier-boss .hotspot-core:after{inset:-12px;border-color:#ff433388}
.rank-stars{position:absolute;left:50%;top:-10px;transform:translateX(-50%);white-space:nowrap;font-size:8px;letter-spacing:1px;color:#ff443c;text-shadow:0 0 7px #f22}.tier-elite .rank-stars{top:-12px;font-size:9px}.rank-crown{position:absolute;left:50%;top:-15px;transform:translateX(-50%);font-size:14px;color:#ff4a42;text-shadow:0 0 9px #f22}.rank-bars{position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);display:flex;gap:2px}.rank-bars i{display:block;width:8px;height:2px;background:#ff342d;box-shadow:0 0 5px #f22}.rank-occult{position:absolute;left:50%;top:-10px;transform:translateX(-50%);font-size:9px;color:#cf5cff;text-shadow:0 0 8px #a832ff}
.subject-hotspot.tier-occult .hotspot-core:before{border-color:#bb45ff;box-shadow:0 0 13px #9c28dd,inset 0 0 12px #671b8f77}.subject-hotspot.tier-occult .hotspot-core:after{border-color:#c05bff77}.subject-hotspot.tier-occult .hotspot-core{width:47px;height:47px}
.rune-svg{fill:none;stroke:#d45cff;stroke-width:2;filter:drop-shadow(0 0 4px #9a28d7)}.rune-svg .rune-ring{stroke-width:1.3}.rune-svg .inner{stroke:#66dfff}.rune-svg .rune-main{stroke-width:2.2}.rune-svg .rune-cross{stroke:#b86cff;stroke-width:1.2}.rune-svg .node{fill:#f087ff;stroke:none}.rune-svg .rune-orbit{stroke:#69ddff;stroke-dasharray:3 3;animation:dash 4s linear infinite}
.anomaly-hotspot .hotspot-core{width:36px;height:36px}.anomaly-hotspot .hotspot-core:before{content:"";position:absolute;inset:-3px;border:1px solid #b94dfb;border-radius:50%;box-shadow:0 0 13px #9a27dd;animation:markerBreath 2.5s ease-in-out infinite}.anomaly-hotspot.rune-tier-2 .hotspot-core{width:43px;height:43px}.anomaly-hotspot.rune-tier-2 .marker-svg{width:36px;height:36px}.anomaly-hotspot.rune-tier-3 .hotspot-core{width:52px;height:52px}.anomaly-hotspot.rune-tier-3 .marker-svg{width:44px;height:44px}.anomaly-hotspot.rune-tier-3 .hotspot-core:before{inset:-7px;border-width:2px;box-shadow:0 0 20px #a62df1,inset 0 0 16px #65128666}.anomaly-hotspot.rune-tier-3 .hotspot-core:after{content:"";position:absolute;inset:-13px;border:1px dashed #66ddff77;border-radius:50%;animation:spin 8s linear infinite}.anomaly-pips{position:absolute;left:50%;bottom:-9px;transform:translateX(-50%);font-size:6px;letter-spacing:1px;color:#d26aff;text-shadow:0 0 6px #a42ddd;white-space:nowrap}
.generic-hotspot .hotspot-core{width:29px;height:29px}.generic-hotspot .intel-diamond{color:#ff493f;font-size:23px;text-shadow:0 0 8px #f22}.generic-hotspot .rune-svg{width:27px;height:27px}
.hotspot-popover{display:block;position:absolute;left:42px;top:50%;transform:translateY(-50%) translateX(-6px);width:190px;padding:8px 9px 7px;background:linear-gradient(180deg,#080b0ef5,#030506f5);border:1px solid #51312f;border-left:2px solid #ef423a;box-shadow:0 8px 25px #000e,0 0 12px #8f181833;opacity:0;visibility:hidden;pointer-events:none;text-align:left;transition:.15s ease;z-index:30}.hotspot-popover:before{content:"";position:absolute;left:-7px;top:50%;width:7px;height:1px;background:#ef423a}.hotspot-popover small{display:block;color:#e54b44;font-size:6px;letter-spacing:.13em;margin-bottom:3px}.hotspot-popover b{display:block;color:#eef2f4;font-family:Georgia,serif;font-size:11px;letter-spacing:.04em}.hotspot-popover em{display:block;color:#839098;font-style:normal;font-size:7px;margin-top:2px;line-height:1.25}.hotspot-popover strong{display:block;color:#ef5a52;font-size:7px;margin-top:6px;letter-spacing:.05em}.intel-hotspot:hover .hotspot-popover,.intel-hotspot:focus-visible .hotspot-popover{opacity:1;visibility:visible;transform:translateY(-50%) translateX(0)}
.intel-hotspot.anchor-left .hotspot-popover{left:auto;right:42px;text-align:right;border-left:1px solid #51312f;border-right:2px solid #ef423a}.intel-hotspot.anchor-left .hotspot-popover:before{left:auto;right:-7px}.intel-hotspot.anchor-above .hotspot-popover{top:auto;bottom:44px;left:50%;right:auto;transform:translateX(-50%) translateY(6px);text-align:center}.intel-hotspot.anchor-above:hover .hotspot-popover,.intel-hotspot.anchor-above:focus-visible .hotspot-popover{transform:translateX(-50%) translateY(0)}.intel-hotspot.anchor-below .hotspot-popover{top:44px;left:50%;right:auto;transform:translateX(-50%) translateY(-6px);text-align:center}.intel-hotspot.anchor-below:hover .hotspot-popover,.intel-hotspot.anchor-below:focus-visible .hotspot-popover{transform:translateX(-50%) translateY(0)}
.anomaly-hotspot .hotspot-popover{border-color:#58316f;border-left-color:#bd5aff}.anomaly-hotspot .hotspot-popover:before{background:#bd5aff}.anomaly-hotspot .hotspot-popover small,.anomaly-hotspot .hotspot-popover strong{color:#d486ff}
@keyframes markerBreath{0%,100%{opacity:.62;transform:scale(.94)}50%{opacity:1;transform:scale(1.06)}}

/* Priority subject sidebar portraits */
.subject-mini{grid-template-columns:38px 1fr auto;min-height:50px}.mini-portrait{width:36px;height:42px;display:block;border:1px solid #5c302d;background:#07090b;overflow:hidden;box-shadow:inset 0 0 10px #000}.mini-portrait img{width:100%;height:100%;object-fit:cover;object-position:center top;display:block;filter:saturate(.9) contrast(1.05)}.subject-mini:hover .mini-portrait img{filter:saturate(1.05) contrast(1.06)}.subject-mini .mini-tier{display:inline-block;margin-top:3px;color:#d6534b;font-size:6px;font-style:normal;letter-spacing:.11em}.subject-mini.tier-boss{border-color:#67201c}.subject-mini.tier-elite{border-color:#51302c}.subject-mini.tier-occult{border-color:#59326e}.mini-record .mini-icon .marker-svg{width:23px;height:23px}

/* Hierarchy legend */
.hierarchy-panel{padding-top:8px}.hierarchy-row{display:grid;grid-template-columns:42px 1fr;align-items:center;gap:8px;padding:6px 4px;border-bottom:1px solid #172026}.hierarchy-row:last-child{border-bottom:0}.hierarchy-icon{position:relative;width:38px;height:38px;display:grid;place-items:center}.hierarchy-icon .marker-svg{width:26px;height:26px}.hierarchy-row.boss .hierarchy-icon .marker-svg{width:31px;height:31px}.hierarchy-row b{display:block;color:#e9eef0;font-size:8px}.hierarchy-row small{display:block;color:#64727a;font-size:6px;margin-top:2px}.hierarchy-row .rank-crown{top:-7px}.hierarchy-row .rank-stars{top:-4px}.veil-hierarchy .hierarchy-icon .marker-svg{width:31px;height:31px}.veil-hierarchy .hierarchy-row b{color:#d99bff}

/* Subject index cards */
.record-card.subject-card{padding:0;display:grid;grid-template-columns:112px 1fr;min-height:176px}.record-card.subject-card:before{z-index:3}.record-portrait{position:relative;min-height:176px;border-right:1px solid #382523;background:#050607;overflow:hidden}.record-portrait img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover;object-position:center top;filter:saturate(.88) contrast(1.07) brightness(.83);transition:.2s}.subject-card:hover .record-portrait img{filter:saturate(1.05) contrast(1.08) brightness(.96);transform:scale(1.02)}.record-portrait:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,#050607 100%)}.portrait-rank{position:absolute;left:6px;right:6px;bottom:6px;z-index:2;display:flex;align-items:center;gap:5px;background:#050607db;border:1px solid #4e2b28;padding:4px}.portrait-rank .marker-svg{width:18px;height:18px}.portrait-rank b{font-size:6px;color:#e6564e;letter-spacing:.11em}.portrait-rank.tier-occult{border-color:#5c3672}.portrait-rank.tier-occult b{color:#d18aff}.record-card-copy{padding:14px;position:relative;min-width:0}.subject-card .record-card-copy footer{left:14px;right:14px}

/* Portrait dossier drawer */
.drawer-portrait{height:290px;margin:-42px -26px 20px;position:relative;overflow:hidden;border-bottom:1px solid #542d29;background:#030405}.drawer-portrait img{width:100%;height:100%;object-fit:cover;object-position:center 22%;display:block;filter:saturate(.9) contrast(1.08) brightness(.78)}.drawer-portrait:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,#05090c 100%),linear-gradient(90deg,#05090c44,transparent 35%,#05090c22)}.drawer-rank{position:absolute;left:17px;bottom:16px;z-index:3;display:flex;align-items:center;gap:8px;background:#040709e8;border:1px solid #68312d;padding:6px 9px}.drawer-rank span{display:grid;place-items:center}.drawer-rank .marker-svg{width:27px;height:27px}.drawer-rank b{font-size:8px;color:#ee625a;letter-spacing:.14em}.drawer-rank.tier-boss{border-color:#8c2924;box-shadow:0 0 16px #63171377}.drawer-rank.tier-occult{border-color:#653b7a}.drawer-rank.tier-occult b{color:#db92ff}.drawer-scan{position:absolute;left:0;right:0;height:1px;background:#f43d36;box-shadow:0 0 12px #f22;z-index:4;opacity:.45;animation:drawerScan 4.8s linear infinite}.drawer-rune{float:right;width:74px;height:74px;margin:0 0 8px 14px;display:grid;place-items:center;border:1px solid #57306d;background:#0a0710}.drawer-rune .marker-svg{width:58px;height:58px}@keyframes drawerScan{0%{top:0}100%{top:100%}}

@media(max-width:900px){.hotspot-popover{width:155px}.record-card.subject-card{grid-template-columns:92px 1fr}.drawer-portrait{height:245px}}
@media(max-width:700px){.hotspot-popover{display:none}.record-card.subject-card{grid-template-columns:82px 1fr}.drawer-portrait{height:220px}}


/* ========================================================================== */
/* V3.3.1 RESPONSIVE / TOUCH OPTIMIZATION                                     */
/* Phones + tablets keep the Archive cinematic while prioritizing the map.    */
/* ========================================================================== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
button,a,input,select{touch-action:manipulation}
.map-viewport{touch-action:none;overscroll-behavior:contain}
.primary-nav,.subnav,.region-navigator{-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.primary-nav::-webkit-scrollbar,.subnav::-webkit-scrollbar,.region-navigator::-webkit-scrollbar{height:3px}
.primary-nav::-webkit-scrollbar-thumb,.subnav::-webkit-scrollbar-thumb,.region-navigator::-webkit-scrollbar-thumb{background:#33434d}

/* Large tablets / compact desktop */
@media (max-width:1180px){
 .topframe{grid-template-columns:300px 1fr 118px;height:74px}
 .brand-block{padding:7px 10px}.sigil{width:48px;height:48px;font-size:22px;margin-right:9px}
 .brand-block strong{font-size:17px}.brand-block small{font-size:8px}.brand-block span{font-size:7px}
 .primary-nav{justify-content:flex-start;overflow-x:auto;padding:0 7px;gap:4px}
 .primary-nav button{flex:0 0 auto;height:36px;padding:0 9px;min-width:64px;font-size:9px}
 .top-status{padding:0 8px;gap:5px;font-size:8px}
 .workspace{grid-template-columns:160px minmax(0,1fr) 190px}
 .map-controls select{max-width:155px}
 .right-section{padding:8px}.mini-record{grid-template-columns:28px minmax(0,1fr) auto;padding:6px}
 .records-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
 .record-drawer{width:min(480px,52vw)}
}

/* Portrait tablets: map remains primary; right intelligence rail becomes drawer-only content. */
@media (max-width:900px){
 .archive-app{height:100dvh;min-height:100svh}
 .topframe{height:70px;grid-template-columns:240px minmax(0,1fr)}
 .top-status{display:none}.brand-block{min-width:0}.brand-block strong{font-size:15px;overflow:hidden;text-overflow:ellipsis}
 .primary-nav{padding-inline:6px}.primary-nav button{height:34px;min-width:60px;font-size:8px}
 .subnav{height:42px;padding:0 8px;gap:5px;overflow-x:auto;overflow-y:hidden;white-space:nowrap}
 .subnav button{flex:0 0 auto;min-height:32px;padding:0 11px;font-size:9px}
 .archive-search{display:none}
 .workspace{grid-template-columns:56px minmax(0,1fr)}
 .right-panel{display:none}
 .left-panel{overflow:hidden}.left-panel .side-title{font-size:0;padding:8px 0;text-align:center}.left-panel .side-title:after{content:'LAYERS';font-size:7px;color:#7f8d95}
 .left-panel .layer-btn{min-height:44px;justify-content:center;padding:0}.left-panel .layer-btn span{display:none}.left-panel .layer-btn:before{width:13px;height:13px;margin:0}
 .left-panel .legend-item{display:none}
 .map-hud{padding:0 8px}.map-hud-copy b{font-size:10px}.map-hud small{font-size:7px}
 .map-controls{gap:4px}.map-controls select{max-width:140px}.map-controls button{width:34px;min-width:34px}
 .region-card{flex-basis:145px;min-height:100px}
 .record-drawer{top:70px;bottom:0;width:min(500px,68vw);max-height:none;overflow-y:auto}
 .records-stage{padding:16px}.records-head h1{font-size:20px}.records-head p{font-size:10px}
 .records-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
 .ai-console{right:10px;bottom:68px;width:min(440px,calc(100vw - 76px))}
 .ai-dock{left:8px;bottom:8px}
}

/* Phones */
@media (max-width:620px){
 .archive-app{height:100dvh;min-height:100svh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
 .topframe{height:104px;grid-template-columns:1fr;grid-template-rows:52px 52px}
 .brand-block{height:52px;padding:5px 8px;border-right:0;border-bottom:1px solid #2a343a}
 .sigil{width:38px;height:38px;font-size:18px;margin-right:8px;flex:0 0 auto}
 .brand-block small{font-size:7px;letter-spacing:.18em}.brand-block strong{font-size:14px;letter-spacing:.06em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-block span{display:none}
 .primary-nav{height:52px;justify-content:flex-start;overflow-x:auto;border-top:0;padding:6px 7px;gap:5px;scroll-snap-type:x proximity}
 .primary-nav button{height:38px;min-width:68px;padding:0 10px;font-size:8px;scroll-snap-align:start}
 .subnav{height:42px;padding:5px 7px;gap:5px;overflow-x:auto;scroll-snap-type:x proximity}
 .subnav button{height:31px;min-width:max-content;padding-inline:10px;scroll-snap-align:start}
 .workspace{grid-template-columns:44px minmax(0,1fr)}
 .left-panel .layer-btn{min-height:46px}.left-panel .layer-btn:before{width:14px;height:14px}
 .mainstage{min-width:0}
 .map-stage{grid-template-rows:48px minmax(0,1fr) 86px}
 .map-hud{height:48px;gap:5px;padding:0 6px}.map-hud-copy{min-width:0;flex:1}.map-hud-copy b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-hud small{display:none}
 .map-controls{flex:0 0 auto}.map-controls select{width:92px;max-width:92px;font-size:7px;padding-inline:4px}.map-controls button{width:31px;min-width:31px;height:31px;font-size:11px}.map-controls #zoomOut{display:none}
 .map-viewport{min-height:0}
 .map-breadcrumb{bottom:96px;left:6px;right:6px;max-width:none;padding:5px 7px}.map-breadcrumb button,.map-breadcrumb b{font-size:9px}.map-breadcrumb span{display:none}
 .region-navigator{height:86px;padding:3px;gap:3px;display:flex;overflow-x:auto;scroll-snap-type:x mandatory}
 .region-card{flex:0 0 122px;min-height:78px;scroll-snap-align:start}.region-card-title{left:6px;right:6px;top:6px;font-size:8px}.region-card small,.region-card em{display:none}.region-card b{left:6px;bottom:5px;padding:3px 5px;font-size:6px}
 .map-marker .pulse{width:16px;height:16px}.map-marker .pulse:after{inset:-8px}
 .intel-hotspot,.anomaly-hotspot{transform:translate(-50%,-50%) scale(1.08)}
 .hotspot-popover{display:none!important}
 .records-stage{padding:12px 9px 90px}.records-head{margin-bottom:12px;padding-left:10px}.records-head h1{font-size:17px;letter-spacing:.07em}.records-head p{font-size:9px;line-height:1.45}.records-stat{display:none}
 .records-filters{overflow-x:auto;white-space:nowrap;display:flex;gap:5px;padding-bottom:5px}.records-filters button{flex:0 0 auto;min-height:36px}
 .records-grid{grid-template-columns:1fr;gap:8px}.record-card.subject-card{grid-template-columns:76px minmax(0,1fr)}.record-card h3{font-size:13px}.record-card p{font-size:9px;line-height:1.45}
 .record-drawer{position:fixed;left:44px;right:0;top:104px;bottom:0;width:auto;max-width:none;transform:translateY(105%);border-left:1px solid #3b2928;border-top:1px solid #55332f;transition:transform .24s ease;overflow:auto;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
 .record-drawer.open{transform:translateY(0)}
 .drawer-close{position:sticky;top:0;margin-left:auto;z-index:4;width:42px;height:42px;background:#090d10ef;border-left:1px solid #333;border-bottom:1px solid #333}
 .drawer-content{padding:4px 14px 24px}.drawer-content h2{font-size:19px}.drawer-portrait{height:210px;margin-inline:-14px}.drawer-list>div{font-size:9px}
 .ai-dock{left:50px;bottom:calc(7px + env(safe-area-inset-bottom));height:46px;width:46px;padding:0;border-radius:50%;overflow:hidden}.ai-dock>div:nth-child(2),.ai-dock .ai-wave{display:none}.mini-sphere{margin:0 auto}
 .ai-console{position:fixed;left:51px;right:7px;bottom:calc(60px + env(safe-area-inset-bottom));width:auto;max-height:62vh}.ai-output{max-height:38vh;font-size:9px}.ai-console input{min-width:0}
 .boot-shell{width:92vw;height:82dvh}.boot-node{font-size:9px}.boot-text{font-size:11px;line-height:1.55;height:190px;margin-top:200px}.ai-sphere{width:190px;height:190px}.skipboot{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));font-size:8px}
}

/* Very small phones */
@media (max-width:390px){
 .workspace{grid-template-columns:40px minmax(0,1fr)}
 .record-drawer{left:40px}.ai-dock{left:46px}
 .map-controls select{width:78px;max-width:78px}.map-controls #backMap{display:none}
 .primary-nav button{min-width:63px;padding-inline:8px}
 .record-card.subject-card{grid-template-columns:68px minmax(0,1fr)}
 .drawer-portrait{height:185px}
}

/* Landscape phones: maximize the actual map area. */
@media (max-height:520px) and (orientation:landscape){
 .topframe{height:54px;grid-template-columns:220px 1fr;grid-template-rows:54px}.brand-block{height:54px}.brand-block span,.brand-block small{display:none}.brand-block strong{font-size:13px}.sigil{width:36px;height:36px}
 .primary-nav{height:54px;padding-block:7px}.primary-nav button{height:36px;min-width:64px}
 .subnav{height:38px;padding-block:3px}.workspace{grid-template-columns:44px minmax(0,1fr)}
 .map-stage{grid-template-rows:42px minmax(0,1fr) 72px}.map-hud{height:42px}.region-navigator{height:72px}.region-card{min-height:66px}.region-card-title{font-size:7px}.map-breadcrumb{bottom:80px}
 .record-drawer{top:54px;left:44px}.drawer-portrait{height:145px}.records-stage{padding:8px 10px 70px}.records-head{margin-bottom:8px}.records-head p{display:none}
 .ai-console{max-height:72vh}.boot-shell{height:92vh}.boot-text{margin-top:145px;height:120px;font-size:9px}.ai-sphere{width:150px;height:150px;top:7%}
}

/* Notched devices / safe areas */
@supports(padding:max(0px)){
 .brand-block{padding-left:max(8px,env(safe-area-inset-left))}
 .top-status{padding-right:max(8px,env(safe-area-inset-right))}
 .region-navigator{padding-right:max(3px,env(safe-area-inset-right))}
}


.boot-actions{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:16px;flex-wrap:wrap;position:relative;z-index:3}.boot-start,.boot-voice,.voice-status-toggle{background:#06090c;border:1px solid #5a2725;color:#efb3b0;padding:10px 14px;letter-spacing:.12em;cursor:pointer;text-transform:uppercase}.boot-start:hover,.boot-voice:hover,.voice-status-toggle:hover{border-color:#ff5a52;box-shadow:0 0 14px rgba(255,60,60,.18)}.boot-start:disabled{opacity:.55;cursor:default}.signal-line.speaking i{animation-duration:.16s;box-shadow:0 0 10px #ff3b34}.ai-sphere.speaking .sphere-scan{animation-duration:.8s;box-shadow:0 0 24px #ff2c25}.voice-status-toggle{font-size:10px;padding:6px 10px}.top-status button{font:inherit}
@media (max-width: 900px){.boot-actions{margin-top:10px}.boot-start,.boot-voice{font-size:10px;padding:8px 10px}}
@media (max-width: 560px){.boot-actions{flex-direction:column;gap:8px}.voice-status-toggle{font-size:9px;padding:5px 8px}}
