/* R1 living Shadow web: a source-driven space, not a navigation deck.
   The existing session/composer/depth owners remain responsible for effects. */
.mw-world.ls-enabled{--ls-bg:#080c13;--ls-line:#648ea3;--ls-ink:#e5edf2;--ls-soft:#9cabb7;
 --ls-gold:#ebc88b;color:var(--ls-ink);background:radial-gradient(ellipse at 70% 15%,#1b2735 0%,transparent 43%),linear-gradient(138deg,#0a1220,#070a10 85%);isolation:isolate}
.ls-enabled .mw-top{background:linear-gradient(#090e17ef,#0b1020a8,#090e1700);padding:13px 23px 12px;z-index:61}
.ls-enabled .mw-top button{min-height:42px}
.ls-enabled .mw-stage{padding:0;perspective:none;touch-action:auto}
.ls-enabled .mw-ambient{display:none}
.ls-world,.ls-world *{box-sizing:border-box}
.ls-world{position:absolute;inset:0;overflow:hidden;--ls-ease:cubic-bezier(.15,.8,.2,1);color:var(--ls-ink)}
.ls-world button{color:inherit;font:inherit;appearance:none;cursor:pointer}
.ls-world button:focus-visible,.ls-chat button:focus-visible{outline:2px solid var(--ls-gold)!important;outline-offset:4px}
.ls-world button[disabled]{opacity:.35;cursor:not-allowed}
.ls-backdrop{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 45% 50%,#2e517013,transparent 46%),repeating-linear-gradient(90deg,transparent 0,transparent 78px,#beddfb06 79px,#beddfb06 80px);mask-image:linear-gradient(90deg,transparent,#000 20%,#000 80%,transparent)}
.ls-viewport{position:absolute;top:100px;right:12px;bottom:72px;left:12px;overflow:hidden;touch-action:none;cursor:grab;outline:none;isolation:isolate;perspective:1100px}
.ls-viewport[data-grab="true"]{cursor:grabbing}
.ls-grid{position:absolute;left:-50%;top:18%;width:200%;height:154%;pointer-events:none;opacity:.58;transform:perspective(870px) rotateX(66deg);transform-origin:50% 50%;
 background-image:linear-gradient(#84a8bf20 1px,transparent 1px),linear-gradient(90deg,#84a8bf20 1px,transparent 1px);
 background-size:68px 68px;mask-image:radial-gradient(ellipse,#000 5%,transparent 68%)}
.ls-camera{position:absolute;inset:0;transform-origin:center;transform-style:preserve-3d;will-change:transform;transition:transform .72s var(--ls-ease)}
.ls-camera[data-direct="true"]{transition:none}
.ls-threads{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:1}
.ls-threads path{fill:none;stroke:#7ba9c270;stroke-width:1.15;vector-effect:non-scaling-stroke;transition:stroke .35s,opacity .35s}
.ls-threads path[data-relevant="false"]{opacity:.13;stroke:#59758c}
.ls-threads path[data-relevant="true"]{stroke:var(--ls-gold);stroke-width:1.6;opacity:.8}
.ls-structures{position:absolute;inset:0;z-index:3}
.ls-node{position:absolute;z-index:3;width:118px;min-height:116px;max-width:none;padding:0!important;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transform:translate(-50%,-50%) translateZ(var(--ls-height,0px));touch-action:none;
 transition:filter .34s,opacity .34s,transform .55s var(--ls-ease)}
.ls-node .ls-tower{position:relative;display:block;width:60px;height:60px;border-radius:34% 41% 38% 42%;
 border:1px solid #8fc2d0ad;transform:rotate(-45deg) skew(8deg,8deg);background:linear-gradient(135deg,#90b4c254,#1b334b65 56%,#121f3085);
 box-shadow:inset 5px 8px 26px #c7e9f412,inset -9px -12px 24px #030710c7,0 18px 35px #000c}
.ls-node .ls-tower:before{content:'';position:absolute;inset:10px;border:1px solid #e5f5ff66;border-radius:33%;background:radial-gradient(circle at 30% 26%,#e4f5ff64,#79a0bb13 55%,transparent 70%);box-shadow:0 0 28px #abc9d848}
.ls-node .ls-tower:after{content:'';position:absolute;inset:-13px;border:1px solid #94b3c834;transform:translateZ(-5px);border-radius:37%}
.ls-node b{display:block;font-size:12px;font-weight:600;line-height:1.3;max-width:130px;letter-spacing:.015em;text-align:center;text-shadow:0 3px 8px #050810;overflow-wrap:anywhere}
.ls-node small{font-size:10px;line-height:1.3;color:var(--ls-soft);text-align:center;max-width:130px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ls-node[data-kind="matter"]{--ls-height:26px;width:152px}
.ls-node[data-kind="matter"] .ls-tower{width:84px;height:84px;background:linear-gradient(140deg,#e9cc9785,#77553148 50%,#222b3c)}
.ls-node[data-kind="matter"] .ls-tower:before{background:radial-gradient(circle at 30% 26%,#fce0baaf,#bd9b5530,transparent 76%)}
.ls-node[data-kind="contribution"] .ls-tower,.ls-node[data-kind="work"] .ls-tower{border-color:#8bcbb7;background:linear-gradient(130deg,#72b5a175,#1d3c42)}
.ls-node[data-kind="evidence"] .ls-tower,.ls-node[data-kind="source"] .ls-tower,.ls-node[data-kind="source-page"] .ls-tower{border-color:#d8bd80;background:linear-gradient(130deg,#c9a96168,#2b2734)}
.ls-node[data-kind="provider"] .ls-tower,.ls-node[data-kind="model"] .ls-tower{border-color:#b1a3d6;background:linear-gradient(130deg,#9b90c779,#2d2b49)}
.ls-node[data-status="held"] .ls-tower,.ls-node[data-status="unknown"] .ls-tower{border-style:dashed;filter:saturate(.5)}
.ls-node[data-status="failed"] .ls-tower{border-color:#df8979;filter:saturate(.55)}
.ls-node[data-focused="true"]{z-index:8;filter:drop-shadow(0 0 13px #d0c18a6e)}
.ls-node[data-focused="true"] .ls-tower{border-color:var(--ls-gold);transform:rotate(-45deg) skew(8deg,8deg) scale(1.12)}
.ls-camera[data-inspecting="true"] .ls-node:not([data-related="true"]):not([data-focused="true"]){opacity:.3;filter:grayscale(.32)}
.ls-node[data-active-live="true"] .ls-tower:before{animation:ls-work-signal 2s ease-in-out infinite}
@keyframes ls-work-signal{50%{box-shadow:0 0 36px #a7efcae0;background:#7dc0a177}}
.ls-inspection{position:absolute;z-index:15;left:0;top:0;min-width:250px;width:min(330px,60vw);max-width:330px;pointer-events:auto;
 padding:17px 20px 20px;border-left:2px solid #deb778df;border-radius:3px 16px 16px 3px;
 background:linear-gradient(120deg,#111f30f2,#0a101cf3);backdrop-filter:blur(20px);
 box-shadow:0 23px 75px #000a,0 0 38px #547fa329;transform:translate(94px,-40%);transition:opacity .32s,transform .45s}
.ls-inspection[hidden]{display:none!important}
.ls-inspection .ls-kicker{font-size:10px;letter-spacing:.17em;color:var(--ls-gold);margin:0 0 8px}
.ls-inspection h2{font:480 clamp(17px,2vw,23px)/1.2 Inter,system-ui,sans-serif;letter-spacing:-.035em;margin:0 0 9px;overflow-wrap:anywhere}
.ls-inspection p{font-size:12px;color:#cedae5;line-height:1.6;max-height:140px;overflow:auto;overflow-wrap:anywhere}
.ls-inspection small{display:block;color:#8fa5b6;font-size:10px;line-height:1.5;overflow-wrap:anywhere}
.ls-relations{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.ls-relations button{min-height:39px;max-width:100%;padding:7px 11px;background:#172d40;border:1px solid #52718a72;border-radius:11px;font-size:11px;text-align:left}
.ls-inspection .ls-trace{margin-top:11px;border-top:1px solid #869caf25;padding-top:9px}
.ls-hud{position:absolute;z-index:6;top:106px;left:28px;pointer-events:none;max-width:min(500px,68%)}
.ls-hud small{font-size:10px;letter-spacing:.19em;color:#c8ba98}
.ls-hud h1{font:400 clamp(20px,3vw,32px)/1.14 Inter,system-ui,sans-serif;letter-spacing:-.04em;max-width:34ch;margin:8px 0}
.ls-hud p{font-size:12px;color:var(--ls-soft);line-height:1.5;margin:0;max-width:44ch}
.ls-instruments{position:absolute;z-index:18;left:18px;bottom:18px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.ls-instruments button{min-width:42px;min-height:42px;padding:9px 13px;border:1px solid #a4b4c638;border-radius:12px;background:#0e1b2bdc;backdrop-filter:blur(12px);font-size:12px}
.ls-instruments .ls-zoom{color:#abc5d4;font-size:11px;min-width:36px;text-align:center}
.ls-instruments button[aria-pressed="true"]{border-color:var(--ls-gold);color:var(--ls-gold)}
.ls-orientation{position:absolute;z-index:5;right:25px;top:110px;display:flex;align-items:center;gap:8px;font-size:10px;color:#a1b5c2;pointer-events:none;max-width:40%;text-align:right}
.ls-orientation i{display:block;width:6px;height:6px;border-radius:50%;background:#8a9db0}
.ls-world[data-live="true"] .ls-orientation i{background:#8bcbb7}
.ls-announce{position:absolute;z-index:10;right:18px;bottom:25px;max-width:min(410px,38vw);font-size:11px;color:#91a8b8;line-height:1.4;margin:0;text-align:right;pointer-events:none}
.ls-empty{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;text-align:center;gap:12px;pointer-events:none;padding:20px;color:#d9e4ec}
.ls-empty i{width:94px;height:94px;border-radius:40%;border:1px solid #8eafbd94;transform:rotate(-30deg);background:radial-gradient(circle at 25% 20%,#c1d9e479,#314e6755,transparent)}
.ls-empty h2{font-weight:400;font-size:clamp(23px,3vw,36px);margin:7px 0 0;letter-spacing:-.035em}
.ls-empty p{font-size:13px;line-height:1.55;max-width:43ch;color:var(--ls-soft);margin:0}
.ls-enabled .mw-flow{position:relative!important;inset:auto!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:auto!important;transform:none!important;opacity:1!important;filter:none!important;pointer-events:auto!important;visibility:visible!important;padding:11px 15px!important;margin:0!important;flex:1}
.ls-enabled .mw-flow .mw-turn{margin:0 0 13px!important;padding:9px 8px!important}
.ls-enabled .mw-flow .mw-turn p{font-size:13px!important;line-height:1.55!important}
.ls-enabled .mw-flow .mw-attached{display:none}
.ls-chat{position:absolute;z-index:59;right:22px;bottom:22px;width:min(420px,43vw);height:min(460px,65vh);display:flex;flex-direction:column;border-radius:23px;
 background:#111c2ef5;backdrop-filter:blur(25px);border:1px solid #829db560;box-shadow:0 20px 60px #000b;overflow:visible;transition:width .45s var(--ls-ease),height .45s var(--ls-ease),border-radius .4s}
.ls-chat-head{display:flex;align-items:center;gap:8px;min-height:51px;padding:8px 12px;border-bottom:1px solid #9ab4c420;cursor:default}
.ls-chat-head b{font-size:12px;font-weight:640;flex:1}
.ls-chat-head span{font-size:10px;color:#acbec7;white-space:nowrap}
.ls-chat-head button{min-width:35px;min-height:34px;border:0;background:#28405499;border-radius:9px;font-size:12px;padding:4px 7px}
.ls-chat .mw-composer{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;display:grid!important;width:auto!important;margin:6px 10px 10px!important;background:#111d2b!important;border-color:#728e9b4b!important;box-shadow:none!important;flex:none}
.ls-chat .mw-composer #private-request{font-size:14px!important}
.ls-chat[data-mode="mini"]{width:250px;height:245px}
.ls-chat[data-mode="mini"] .mw-flow{padding:8px!important}
.ls-chat[data-mode="mini"] .mw-flow .mw-turn:not(.active){display:none}
.ls-chat[data-mode="mini"] .mw-flow .mw-expression{display:none}
.ls-chat[data-mode="mini"] .mw-composer{grid-template-columns:20px minmax(0,1fr) 44px!important;margin:3px!important;padding:5px!important}
.ls-chat[data-mode="mini"] .mw-composer #sw-compose-options{width:20px!important}
.ls-chat[data-mode="mini"] .ls-chat-head [data-chat="split"]{display:none}
.ls-chat[data-mode="split"]{top:94px;right:0;bottom:0;width:38%;height:auto;max-height:none;border-radius:18px 0 0 0}
.ls-world[data-chat-mode="split"] .ls-viewport{right:38%}
.ls-world[data-chat-mode="split"] .ls-orientation{right:40%}
.ls-chat[data-mode="orb"]{width:70px;height:70px;border-radius:25px;touch-action:none;cursor:grab;overflow:hidden;right:22px;bottom:22px;background:linear-gradient(135deg,#a4c7d4,#374d6e 55%,#0d1b29)}
.ls-chat[data-mode="orb"] .ls-chat-head,.ls-chat[data-mode="orb"] .mw-flow,.ls-chat[data-mode="orb"] .mw-composer{display:none!important}
.ls-chat-orb{display:none!important;position:absolute;inset:0;border:0;border-radius:24px;background:transparent;font-size:26px;color:#f5e5ca!important;cursor:grab}
.ls-chat[data-mode="orb"] .ls-chat-orb{display:block!important}
.ls-chat-orb:before{content:'';position:absolute;inset:10px;border:1px solid #fff9;border-radius:36%;transform:rotate(45deg)}
.ls-chat-orb span{position:relative;z-index:1;display:grid;place-items:center}
.ls-chat[data-mode="orb"][data-dragging="true"]{cursor:grabbing;transition:none}
.ls-enabled .mw-depth{z-index:69;inset:110px max(14px,15vw) 95px;background:#091525f6;color:#e4edf1}
.ls-enabled[data-depth]:not([data-depth="root"]) .mw-flow{transform:none!important;opacity:1!important;filter:none!important}
.ls-enabled[data-depth]:not([data-depth="root"]) .mw-depth{opacity:1;transform:none;pointer-events:auto}
.ls-enabled .mw-recovery{z-index:74;inset:auto 16px 92px;max-height:60%;overflow:auto;background:#0d1728}
body.shadow-session-locked .ls-enabled .mw-stage{filter:none!important;pointer-events:auto!important;user-select:auto}
body.shadow-session-locked .ls-chat .mw-flow,body.shadow-session-locked .ls-chat .mw-composer{visibility:hidden!important}
body.shadow-session-locked .ls-world .ls-node{visibility:hidden!important}
body.shadow-session-locked .ls-world .ls-inspection{display:none!important}
/* Existing session-lock owner remains visible; the living scene never suppresses it. */
.ls-chat[data-private-visible="false"] .mw-flow,.ls-chat[data-private-visible="false"] .mw-composer{visibility:hidden!important}
.ls-inspection{touch-action:pan-y}
@media(min-width:1550px){.ls-node{width:138px;min-height:132px}.ls-node .ls-tower{width:76px;height:76px}.ls-viewport{left:42px;right:42px}}
@media(max-width:980px){.ls-chat[data-mode="split"]{width:46%}.ls-world[data-chat-mode="split"] .ls-viewport{right:46%}.ls-inspection{width:280px}.ls-node{width:105px}}
@media(max-width:640px){
 .ls-viewport{top:103px;left:0;right:0;bottom:80px}
 .ls-hud{top:105px;left:15px;max-width:80%}
 .ls-hud h1{font-size:20px}
 .ls-node{min-height:94px;width:90px;gap:5px}
 .ls-node .ls-tower{width:47px;height:47px}
 .ls-node b{font-size:10px}
 .ls-node small{font-size:9px;max-width:84px}
 .ls-inspection{width:245px;min-width:220px;padding:11px 13px;transform:translate(-50%,80px)}
 .ls-instruments{left:7px;bottom:11px;gap:3px}
 .ls-instruments button{padding:5px 7px;min-width:36px}
 .ls-announce{display:none}
 .ls-chat{bottom:10px;right:10px;width:min(390px,calc(100vw - 20px));height:min(460px,65vh)}
 .ls-chat[data-mode="split"]{width:100%;top:auto;bottom:0;height:47%;border-radius:18px 18px 0 0}
 .ls-world[data-chat-mode="split"] .ls-viewport{right:0;bottom:47%}
 .ls-chat-head span{display:none}
 .ls-chat[data-mode="orb"]{width:60px;height:60px}
 .ls-enabled .mw-depth{inset:112px 10px 84px}
}
@media(prefers-reduced-motion:reduce){
 .ls-enabled *, .ls-enabled *:before,.ls-enabled *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
/* A recorded work label does not prove current movement. */
.ls-enabled[data-motion="working"] .mw-truth i,.ls-enabled[data-motion="waiting"] .mw-truth i,.ls-enabled[data-motion="recovering"] .mw-truth i{animation:none!important}

/* R2: the same scene graph feeds the GPU structures and DOM accessible controls.
   CSS forms are only a fallback. GPU motion is enabled exclusively by live state. */
.ls-gpu{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;display:block}
.ls-enabled[data-living-renderer="webgl2"] .ls-threads{opacity:.22}
.ls-enabled[data-living-renderer="webgl2"] .ls-node .ls-tower{opacity:.10}
.ls-enabled[data-living-renderer="webgl2"] .ls-node[data-focused="true"] .ls-tower{opacity:.28}
.ls-enabled[data-living-renderer="webgl2"] .ls-node b{background:linear-gradient(90deg,#0b1523aa,#0b1523db,#0b1523aa);border-radius:9px;padding:4px 9px;max-width:152px}
.ls-enabled[data-living-renderer="webgl2"] .ls-node small{background:#090f1d93;padding:3px 4px;border-radius:6px}
.ls-enabled .ls-node{isolation:isolate}

/* R3: evidence-driven architectural colour, not a risk/trust score.
   The field is a signed-observation *subset*; no full-home assurance claim. */
.ls-world[data-home-posture="OBSERVATION_DEGRADED"] .ls-backdrop{
 background:radial-gradient(ellipse at 55% 49%,#b44b3726,transparent 52%),
 repeating-linear-gradient(90deg,transparent 0,transparent 78px,#cf827612 79px,#cf827612 80px)}
.ls-world[data-home-posture="IDENTITY_REVIEW"] .ls-backdrop{
 background:radial-gradient(ellipse at 55% 45%,#c89c3c23,transparent 55%),
 repeating-linear-gradient(90deg,transparent 0,transparent 78px,#b9956011 79px,#b9956011 80px)}
.ls-world[data-home-posture="SIGNED_SUBSET_OBSERVED"] .ls-backdrop{
 background:radial-gradient(ellipse at 50% 47%,#5ba9901c,transparent 50%),
 repeating-linear-gradient(90deg,transparent 0,transparent 78px,#89b6a40e 79px,#89b6a40e 80px)}
.ls-world[data-home-posture="OBSERVATION_DEGRADED"] .ls-orientation i{background:#d88a7b}
.ls-world[data-home-posture="IDENTITY_REVIEW"] .ls-orientation i{background:#e2b16f}
.ls-world[data-home-posture="SIGNED_SUBSET_OBSERVED"] .ls-orientation i{background:#83c0ad}
.ls-world[data-home-posture]:not([data-home-posture="NONE"]) .ls-orientation{max-width:45ch}
.ls-node[data-kind="team"] .ls-tower,.ls-node[data-kind="team-lane"] .ls-tower{
 border-color:#c0afea;background:linear-gradient(135deg,#a99bdb77,#253350)}
.ls-node[data-kind="team-lane"][data-status="returned"] .ls-tower{border-color:#8bd6b9}
.ls-node[data-kind="team-lane"][data-status="failed"] .ls-tower{border-color:#e69b86}
.ls-node[data-kind="home-observation"][data-status="degraded"] .ls-tower{
 border-color:#df8a7a;background:linear-gradient(125deg,#8e453f99,#221b29)}
.ls-node[data-kind="home-observation"][data-status="changed"] .ls-tower{
 border-color:#e2b878;background:linear-gradient(125deg,#a37e4c99,#25232e)}
.ls-node[data-kind="home-observation"][data-status="observed"] .ls-tower{
 border-color:#8bc9b5;background:linear-gradient(125deg,#477d6b99,#213342)}

/* R4 direct Matter interaction. Objects stay in the scene; supplementary
   evidence/compare lenses have no independent task or truth ownership. */
.ls-object-actions{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0 9px}
.ls-object-actions button,.ls-object-actions a,.ls-compare-content button{
 display:inline-flex;align-items:center;justify-content:center;text-align:center;
 font:500 11px/1.35 Inter,system-ui,sans-serif;
 min-height:42px;border:1px solid #7e9cb56a;border-radius:12px;
 padding:9px 12px;background:linear-gradient(125deg,#1f344b,#17293b);
 color:#e3edf1!important;text-decoration:none!important;max-width:100%;
 cursor:pointer;overflow-wrap:anywhere}
.ls-object-actions button:hover,.ls-object-actions a:hover,
.ls-compare-content button:hover{border-color:#dbbb86}
.ls-object-actions button:focus-visible,.ls-object-actions a:focus-visible,
.ls-compare-content button:focus-visible{outline:2px solid #e7be7a;outline-offset:3px}
.ls-node[data-pinned="true"] .ls-tower{outline:2px dashed #d8b77e;outline-offset:9px}
.ls-threads path[data-comparison="UI_ONLY_NOT_EVIDENCE"]{
 stroke:#eed090!important;stroke-width:2;stroke-dasharray:6 8;opacity:.8!important}
.ls-compare-region{position:absolute;left:28px;bottom:91px;z-index:31;
 width:min(690px,calc(61vw - 36px));max-height:min(390px,51vh);
 overflow:auto;overscroll-behavior:contain;
 border:1px solid #b8a47a7a;border-radius:18px;
 background:linear-gradient(126deg,#101d30f1,#0b1425f5);
 backdrop-filter:blur(24px);box-shadow:0 25px 70px #000b;
 padding:16px 19px 14px;color:#e6edf0}
.ls-compare-region[hidden]{display:none!important}
.ls-compare-region>.ls-kicker{font-size:10px;letter-spacing:.16em;color:#d9bc89}
.ls-compare-content{font-size:12px;color:#bdcedb;line-height:1.5}
.ls-compare-content>p{margin:9px 0}
.ls-compare-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:9px 0 13px}
.ls-compare-observation{min-width:0;padding:11px 12px 12px;
 border:1px solid #6688a04a;border-radius:13px;
 background:#122438a3;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.ls-compare-observation small{font:500 10px/1.3 Inter,system-ui,sans-serif;
 color:#b1c6d2;max-width:100%;overflow-wrap:anywhere}
.ls-compare-observation h3{margin:0;font:520 17px/1.2 Inter,system-ui,sans-serif;
 max-width:100%;overflow-wrap:anywhere}
.ls-compare-observation p{margin:0;font-size:12px;line-height:1.6;
 max-height:95px;overflow:auto;overflow-wrap:anywhere;white-space:pre-wrap}
.ls-compare-observation button{margin-top:auto}
.ls-compare-boundary{border-top:1px solid #a8bfd029;padding-top:9px;
 color:#d1ba91!important;font-size:11px!important}
.ls-world[data-chat-mode="split"] .ls-compare-region{width:min(640px,calc(61vw - 46px))}
@media(max-width:980px){.ls-compare-region{width:min(520px,60vw)}}
@media(max-width:640px){
 .ls-compare-region{left:7px;right:7px;width:auto;bottom:82px;
 max-height:36vh;padding:12px;border-radius:15px}
 .ls-compare-pair{gap:7px}
 .ls-compare-observation{padding:8px;gap:5px}
 .ls-compare-observation h3{font-size:13px}
 .ls-compare-observation p{font-size:11px}
 .ls-world[data-chat-mode="split"] .ls-compare-region{
   bottom:calc(47% + 10px);max-height:24vh;width:auto}
}
@media(prefers-reduced-motion:reduce){.ls-compare-region{transition:none!important}}

/* Browser-tested R5 repair: real hit areas and a viewport-bounded, unscaled
   contextual lens. The lens never changes the graph or navigation owner. */
.ls-viewport{overflow:clip}
.ls-node{width:130px;min-height:164px;height:164px;gap:6px}
.ls-node .ls-tower{flex-shrink:0}
.ls-node b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:36px;max-width:130px}
.ls-node small{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;max-height:18px;max-width:128px}
.ls-node[data-kind="matter"]{width:152px;height:176px;min-height:176px}
.ls-inspection{transform:none!important;min-width:0;max-width:none;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;transition:opacity .2s;background:linear-gradient(120deg,#111f30fa,#0a101cfc)}
.ls-chat-head{gap:5px}
.ls-chat-head span{display:none}
.ls-chat-head button{flex-shrink:0}
.ls-camera[data-inspecting="true"] .ls-node:not([data-related="true"]):not([data-focused="true"]){opacity:.40}
.ls-compare-region{max-height:min(350px,44vh)}
@media(max-width:640px){
 .ls-node{width:100px;height:140px;min-height:140px}
 .ls-node[data-kind="matter"]{width:118px;height:152px;min-height:152px}
 .ls-node b{max-width:100px;font-size:11px;max-height:30px}
 .ls-node small{max-width:100px}
 .ls-inspection{transform:none!important;padding:12px 14px}
 .ls-hud{max-width:calc(100% - 30px)}
 .ls-orientation{display:none}
 .ls-compare-region{max-height:29vh}
 .ls-instruments{max-width:calc(100% - 74px);gap:3px}
}

/* R6 complete-app integration: original optional local tools remain reachable
   through the existing + panel, rather than covering the conversation grid. */
.ls-chat .sw-route-options .ss-local-actions{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 7px;padding-top:10px;border-top:1px solid #91aaba35}
.ls-chat .sw-route-options .ss-local-actions button{appearance:none;min-height:42px;flex:1 1 110px;padding:8px 11px;font:500 12px/1.35 Inter,system-ui,sans-serif;background:#1a3146;color:#e5edf2;border:1px solid #71899c66;border-radius:11px}
.ls-chat .sw-route-options .ss-local-explanation,.ls-chat .sw-route-options .ss-local-model{font:400 11px/1.45 Inter,system-ui,sans-serif;color:#afc4d1;margin:7px 0}
.ls-chat .ss-local-result{max-height:180px;overflow:auto;white-space:normal;font:400 12px/1.5 Inter,system-ui,sans-serif;color:#dce7ee}
.ls-chat .ss-local-result pre{font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere}
.ls-chat .ss-local-result[hidden]{display:none!important}
.ls-chat .mw-composer .sw-team-matter-ambient{grid-column:1/-1;min-width:0;font-size:11px;line-height:1.4}
.ls-chat .mw-composer .sw-team-matter-ambient[hidden]{display:none!important}
.ls-chat .mw-composer .sw-team-matter-detail{max-height:150px;overflow:auto}

/* The legacy carrier gives the zero-height options anchor overflow:auto,
   clipping its absolutely positioned panel while leaving apparent DOM bounds.
   Keep the anchor visible; only the actual open menu is a scroll container. */
.ls-chat .mw-composer #mw-options{overflow:visible!important;max-height:none!important;z-index:50!important}
.ls-chat .mw-composer #sw-route-options{overflow:auto!important;max-height:min(44vh,calc(100vh - 180px))!important;overscroll-behavior:contain}
.ls-chat .mw-composer #sw-route-options[hidden]{display:none!important}

/* R7 actual-service inspection presentation: the surrounding headline recedes
   while a record is open; the existing top Matter identity remains visible. */
.ls-world:has(.ls-camera[data-inspecting="true"]) .ls-hud{opacity:0;visibility:hidden}
.ls-inspection>button{appearance:none;display:inline-flex;align-items:center;min-height:44px;max-width:100%;margin-top:12px;padding:9px 12px;border:1px solid #8aa6b568;border-radius:12px;background:#1c3447;color:#e4eef2;font:500 12px/1.35 Inter,system-ui,sans-serif;cursor:pointer}
.ls-inspection>button:focus-visible{outline:2px solid var(--ls-gold);outline-offset:3px}
.ls-chat-head button{color:#dbe7ec!important}

/* Commissioned gameworld R1: compact source-bound HUD, not a second Matter UI. */
.mw-world.ls-enabled .ls-inspection[data-focus-posture="glance"]{
 padding:11px 13px 13px;border:1px solid #c5b78473;border-left:2px solid #dec68c;
 border-radius:17px;background:linear-gradient(146deg,#111e2aef,#0a1220ee);
 box-shadow:0 12px 36px #010712a8,0 0 28px #c6ae7530;
 backdrop-filter:blur(15px);overflow:auto;overscroll-behavior:contain;
}
.mw-world.ls-enabled .ls-inspection[data-focus-posture="glance"] h2{
 font-size:clamp(16px,1.8vw,20px);line-height:1.2;margin:4px 0 7px;
}
.mw-world.ls-enabled .ls-inspection .ls-focus-state{
 display:block;color:#e1c596;font:500 11px/1.35 system-ui,sans-serif;
 white-space:normal;letter-spacing:.01em;
}
.mw-world.ls-enabled .ls-inspection .ls-focus-teaser{
 color:#c6d4df;font-size:11px;line-height:1.5;max-height:4.5em;
 overflow:hidden;overflow-wrap:anywhere;margin:6px 0 7px;
}
.mw-world.ls-enabled .ls-inspection .ls-object-actions{
 gap:5px;margin:7px 0;
}
.mw-world.ls-enabled .ls-inspection .ls-object-actions button,
.mw-world.ls-enabled .ls-inspection .ls-object-actions a,
.mw-world.ls-enabled .ls-inspection .ls-relations button{
 min-height:44px;padding:8px 10px;line-height:1.25;font-size:11px;border-radius:10px;
}
.mw-world.ls-enabled .ls-inspection .ls-relations{margin-top:6px;gap:5px}
.mw-world.ls-enabled .ls-inspection .ls-focus-dossier,
.mw-world.ls-enabled .ls-inspection .ls-more-corridors{
 border-top:1px solid #a7b9c12c;padding:6px 0;margin-top:6px;
}
.mw-world.ls-enabled .ls-inspection summary{
 min-height:38px;display:list-item;cursor:pointer;list-style:revert;
 color:#e4c68f;font-size:11px;padding:9px 1px 5px;
}
.mw-world.ls-enabled .ls-inspection summary:focus-visible{
 outline:2px solid #e7c995;outline-offset:2px;
}
.mw-world.ls-enabled .ls-inspection .ls-focus-dossier .ls-dossier-text{
 max-height:180px;white-space:pre-wrap;overflow:auto;
 font-size:12px;line-height:1.55;margin:7px 0;
}
.mw-world.ls-enabled .ls-inspection .ls-more-corridors .ls-relations{
 display:flex;flex-direction:column;align-items:stretch;margin:5px 0 9px;
}
.mw-world.ls-enabled .ls-camera[data-inspecting="true"] .ls-node[data-related="true"] .ls-tower{
 border-color:#d3bf92;box-shadow:0 0 20px #cbb88c30,inset 0 12px 20px #c7e9f413;
}
.mw-world.ls-enabled .ls-node[data-focused="true"] .ls-tower{
 box-shadow:0 0 25px #d8cba16b,0 18px 35px #000c;
}
.mw-world.ls-enabled .ls-instruments [data-world-control^="corridor"]{
 min-width:44px;min-height:44px;font-size:19px;
 border-radius:14px;background:linear-gradient(145deg,#1c3448dd,#111a29ee);
}
.mw-world.ls-enabled .ls-instruments [data-world-control^="corridor"][disabled]{
 opacity:.35;filter:saturate(.25);
}
.mw-world.ls-enabled .ls-instruments [data-world-control^="corridor"]:focus-visible{
 outline:2px solid #e5c38d;outline-offset:2px;
}
/* Optional public Guide/capability/experience remains a HUD over the world.
   Private source-reading documents keep their separate existing depth surface. */
#shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth{
 inset:92px 16px 84px auto!important;
 width:min(410px,38vw)!important;max-width:calc(100% - 32px)!important;
 padding:14px 18px!important;border:1px solid #bdac8b70!important;
 border-radius:20px!important;background:linear-gradient(155deg,#221b16ed,#111722f4)!important;
 box-shadow:0 22px 60px #000b!important;overscroll-behavior:contain;
}
#shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth h2{
 font-size:clamp(20px,2vw,28px);margin:10px 0 13px;
}
#shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth h3{
 font-size:14px;margin:9px 0 4px;
}
#shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth p{
 font-size:12px;line-height:1.5;margin:5px 0 9px;
}
#shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth button{
 min-height:44px;max-width:100%;
}
/* A narrow-screen first expansion uses the original composer in a compact dock. */
@media(max-width:640px){
 .mw-world.ls-enabled .ls-chat[data-mode="mini"]{
   width:calc(100vw - 16px);max-width:420px;min-width:0;
   height:min(228px,32dvh);right:8px;bottom:max(8px,env(safe-area-inset-bottom));
   border-radius:17px;
 }
 .mw-world.ls-enabled .ls-chat[data-mode="mini"] .mw-flow{
   min-height:18px!important;flex:1;overflow:auto;padding:5px 9px!important;
 }
 .mw-world.ls-enabled .ls-chat[data-mode="mini"] .ls-chat-head{
   min-height:39px;padding:4px 7px;
 }
 .mw-world.ls-enabled .ls-chat[data-mode="mini"] .mw-composer{
   margin:2px 6px 7px!important;min-height:70px!important;
   max-height:110px;overflow:visible;
 }
 .mw-world.ls-enabled .ls-chat[data-mode="float"]{height:min(460px,58dvh)}
 .mw-world.ls-enabled .ls-world[data-chat-mode="mini"] .ls-viewport{
   bottom:calc(min(228px,32dvh) + 15px);
 }
 .mw-world.ls-enabled .ls-world[data-chat-mode="mini"] .ls-instruments{
   bottom:calc(min(228px,32dvh) + 17px);
 }
 .mw-world.ls-enabled .ls-inspection[data-focus-posture="glance"]{
   padding:10px 12px;max-width:calc(100vw - 22px);
 }
 .mw-world.ls-enabled .ls-inspection .ls-focus-teaser{
   max-height:2.9em;line-height:1.45;
 }
 #shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth{
   top:auto!important;left:8px!important;right:8px!important;
   bottom:max(86px,calc(env(safe-area-inset-bottom) + 80px))!important;
   width:auto!important;max-width:none!important;height:min(244px,34dvh)!important;
   max-height:min(244px,34dvh)!important;
   padding:12px 15px!important;border-radius:17px!important;
 }
}
@media(max-height:560px){
 .mw-world.ls-enabled .ls-chat[data-mode="mini"]{height:28dvh}
 .mw-world.ls-enabled .ls-world[data-chat-mode="mini"] .ls-viewport{bottom:calc(28dvh + 12px)}
 .mw-world.ls-enabled .ls-world[data-chat-mode="mini"] .ls-instruments{bottom:calc(28dvh + 14px)}
 #shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth{
  height:min(180px,28dvh)!important;max-height:min(180px,28dvh)!important}
}
@media(prefers-reduced-motion:reduce){
 .mw-world.ls-enabled .ls-inspection[data-focus-posture="glance"],
 .mw-world.ls-enabled .ls-chat[data-mode="mini"],
 #shadow-matter-world.mw-world.ls-enabled[data-public-depth="true"] .sd-depth{
  transition:none!important;animation:none!important;
 }
}


/* Commissioned thumb-reachable quickbar: one spatial control rail, not a
   multi-row conventional navigation toolbar obscuring scene and composer. */
@media(max-width:640px){
 .mw-world.ls-enabled .ls-instruments{
  display:flex;flex-wrap:nowrap;align-items:center;gap:4px;
  width:calc(100% - 72px);max-width:calc(100% - 72px);
  min-height:48px;overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;overscroll-behavior-x:contain;
  padding:2px 3px 5px;touch-action:pan-x;
 }
 .mw-world.ls-enabled .ls-instruments::-webkit-scrollbar{display:none}
 .mw-world.ls-enabled .ls-instruments button{
  flex:0 0 auto;min-width:44px;min-height:44px;padding:6px 9px;
  border-radius:12px;
 }
 .mw-world.ls-enabled .ls-instruments .ls-zoom{flex:0 0 33px;min-width:33px}
 .mw-world.ls-enabled .ls-instruments button[aria-label="Inspect bounded existing Home observations"],
 .mw-world.ls-enabled .ls-instruments button[aria-label="Inspect Vault and temporary-workspace source dependencies"]{
  font-size:0;min-width:60px;width:60px;
 }
 .mw-world.ls-enabled .ls-instruments button[aria-label="Inspect bounded existing Home observations"]:after{
  content:"Home";font-size:10px;
 }
 .mw-world.ls-enabled .ls-instruments button[aria-label="Inspect Vault and temporary-workspace source dependencies"]:after{
  content:"Custody";font-size:10px;
 }
}


/* Flow R2 — camera choreography before art complexity. Focus is animated;
   direct wheel/touch/manipulation is immediate. No worker-state animation. */
.mw-world.ls-enabled .ls-camera{
 transition:transform .46s cubic-bezier(.22,.8,.18,1)!important;
}
.mw-world.ls-enabled .ls-camera[data-direct="true"]{
 transition:none!important;
}
.mw-world.ls-enabled .ls-grid{
 will-change:transform;transition:transform .58s cubic-bezier(.22,.8,.18,1);
}
.mw-world.ls-enabled .ls-grid[data-direct="true"]{
 transition:none!important;
}
.mw-world.ls-enabled .ls-inspection[data-focus-posture="glance"]{
 transition:top .44s cubic-bezier(.22,.8,.18,1),
            left .44s cubic-bezier(.22,.8,.18,1),
            opacity .28s ease-out!important;
}
.mw-world.ls-enabled .ls-camera[data-direct="true"] + .ls-inspection{
 transition:none!important;
}
.mw-world.ls-enabled .ls-route-ribbon{
 position:absolute;z-index:14;top:76px;left:50%;transform:translateX(-50%);
 max-width:min(590px,calc(100% - 170px));min-height:23px;
 display:flex;align-items:center;justify-content:center;
 gap:6px;padding:2px 9px;
 pointer-events:none;overflow:hidden;
 color:#c6d0d7;font:500 10px/1.3 system-ui,sans-serif;
 background:linear-gradient(90deg,#0b142100,#0b1421c9 20%,#0b1421c9 80%,#0b142100);
}
.mw-world.ls-enabled .ls-route-ribbon[hidden]{display:none!important}
.mw-world.ls-enabled .ls-route-ribbon .ls-path-entry{
 flex:0 1 auto;min-width:0;max-width:190px;overflow:hidden;
 text-overflow:ellipsis;white-space:nowrap;
}
.mw-world.ls-enabled .ls-route-ribbon .ls-path-entry:last-child{
 color:#f0d39e;flex:0 1 auto;font-weight:600;
}
.mw-world.ls-enabled .ls-route-ribbon .ls-path-divide{
 flex:0 0 auto;color:#9eafba;
}
.mw-world.ls-enabled .ls-inspection .ls-focus-return{
 position:relative;display:inline-flex;align-items:center;justify-content:center;
 min-height:44px;max-width:100%;margin:8px 0 3px;
 padding:8px 14px;border:1px solid #9aaec17a;border-radius:10px;
 background:#1b3345d9;color:#e1e9ed;cursor:pointer;
 font:500 12px/1.25 system-ui,sans-serif;
}
.mw-world.ls-enabled .ls-inspection .ls-focus-return:focus-visible{
 outline:2px solid #e4c48f;outline-offset:3px;
}
.mw-world.ls-enabled .ls-viewport{
 backface-visibility:hidden;
}
@media(max-width:640px){
 .mw-world.ls-enabled .ls-route-ribbon{
  top:74px;left:50%;max-width:calc(100% - 28px);
  gap:4px;padding:2px 4px;font-size:10px;
 }
 .mw-world.ls-enabled .ls-route-ribbon .ls-path-entry{max-width:132px}
 .mw-world.ls-enabled .ls-inspection .ls-focus-return{
  min-height:44px;margin:5px 0;
 }
 .mw-world.ls-enabled .ls-inspection .ls-object-actions{
  margin:3px 0;
 }
}
@media(prefers-reduced-motion:reduce){
 .mw-world.ls-enabled .ls-camera,
 .mw-world.ls-enabled .ls-grid,
 .mw-world.ls-enabled .ls-inspection{
  transition:none!important;animation:none!important;
 }
}


/* Flow R3 — real recorded source corridor is the spatial navigation highlight.
   This is not execution progress or a provider status; never animate a fake worker. */
.mw-world.ls-enabled .ls-threads path[data-navigation="true"]{
 stroke:#ebcd90!important;stroke-width:2.4!important;opacity:.95!important;
 stroke-dasharray:5 6;filter:drop-shadow(0 0 4px #e6be7560);
}
.mw-world.ls-enabled .ls-threads path[data-navigation="false"][data-relevant="false"]{
 opacity:.11;
}
.mw-world.ls-enabled[data-living-renderer="webgl2"][data-focus-route="true"] .ls-threads{
 opacity:.68;
}
@media(prefers-reduced-motion:reduce){
 .mw-world.ls-enabled .ls-threads path{
  animation:none!important;transition:none!important;
 }
}


/* Urgent UX R1: existing private-session loss stays HONEST but usable.
   The owner already fails closed on protected source. A full-height document
   sheet hid the controls needed to understand/recover the existing session.
   Restrict this to visual layout; no change to auth, issuer or effect grants. */
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]){
 position:absolute!important;
 inset:auto!important;
 top:50%!important;left:50%!important;right:auto!important;bottom:auto!important;
 transform:translate(-50%,-50%)!important;
 box-sizing:border-box!important;
 display:grid!important;align-content:start!important;
 width:min(440px,calc(100% - 28px))!important;max-width:calc(100% - 28px)!important;
 height:auto!important;max-height:min(430px,calc(100dvh - 190px))!important;
 overflow-y:auto!important;overflow-x:hidden!important;
 scrollbar-width:thin;overscroll-behavior:contain;
 padding:17px 20px 18px!important;gap:7px!important;
 border:1px solid #c2bb9872!important;border-radius:19px!important;
 box-shadow:0 21px 65px #000b,0 0 28px #d1b37c18!important;
 background:linear-gradient(155deg,#132337f5,#0c1828f8)!important;
 backdrop-filter:blur(16px);
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) h1{
 font-size:clamp(25px,3vw,34px)!important;
 line-height:1.15!important;margin:2px 0 5px!important;
 max-width:100%!important;letter-spacing:-.035em!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) p{
 margin:4px 0 6px!important;
 font-size:13px!important;line-height:1.48!important;
 max-width:100%!important;overflow-wrap:anywhere;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) #mw-native-account-status-r138{
 color:#e3ca9a!important;font-size:12px!important;line-height:1.4!important;
 margin:6px 0!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) .mw-recovery-controls{
 display:flex!important;flex-wrap:wrap!important;align-items:stretch!important;
 gap:7px!important;margin-top:4px!important;max-width:100%!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) .mw-recovery-controls button{
 min-height:44px!important;max-width:100%!important;box-sizing:border-box!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
}
/* The existing second-stage session lock is separate from the Matter carrier.
   It must not clip sign-in/recovery controls or force an unreachable bottom. */
body[data-shadow-carrier="matter-world-r1"] .shadow-lock-screen:not([hidden]){
 padding:12px!important;overflow:auto!important;overscroll-behavior:contain;
}
body[data-shadow-carrier="matter-world-r1"] .shadow-lock-screen:not([hidden])
  .shadow-lock-card{
 box-sizing:border-box!important;min-width:0!important;
 max-height:calc(100dvh - 30px)!important;
 overflow-y:auto!important;overscroll-behavior:contain!important;
 padding:clamp(14px,2.5vw,25px)!important;
}
@media(max-width:640px){
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]){
  top:clamp(195px,27dvh,255px)!important;
  left:50%!important;transform:translateX(-50%)!important;
  width:calc(100% - 24px)!important;
  max-width:calc(100% - 24px)!important;
  max-height:min(420px,calc(100dvh - 320px))!important;
  padding:13px 14px 16px!important;gap:6px!important;
 }
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) h1{
  font-size:clamp(23px,6vw,29px)!important;
 }
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) p{
  font-size:12px!important;margin:3px 0 5px!important;
 }
}
@media(max-height:610px){
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]){
  top:145px!important;transform:translateX(-50%)!important;
  max-height:calc(100dvh - 225px)!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]){
   transition:none!important;animation:none!important;
 }
}


/* Full-source browser diagnosis R2: legacy lock card is reparented inside
   #mw-recovery. Its own 30px padding, bordered card and generous headings
   stacked with the recovery HUD, forcing action controls below the viewport.
   Only remove duplicate PRESENTATION, never modify the existing auth owner. */
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-card{
 box-sizing:border-box!important;display:block!important;
 width:100%!important;max-width:none!important;min-width:0!important;
 height:auto!important;max-height:none!important;overflow:visible!important;
 padding:0!important;margin:0!important;border:0!important;
 border-radius:0!important;background:transparent!important;
 box-shadow:none!important;backdrop-filter:none!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-card h2{
 font-size:clamp(24px,3.1vw,31px)!important;line-height:1.13!important;
 margin:2px 0 9px!important;letter-spacing:-.035em!important;
 overflow-wrap:anywhere!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-card .session-kicker{
 margin:0 0 7px!important;font-size:10px!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-card p{
 margin:3px 0 8px!important;line-height:1.4!important;
 font-size:12px!important;overflow-wrap:anywhere!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-actions{
 display:flex!important;flex-wrap:wrap!important;gap:6px!important;
 padding:0!important;margin:6px 0 8px!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-actions button{
 box-sizing:border-box!important;min-height:44px!important;
 margin:0!important;padding:7px 12px!important;white-space:normal!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .shadow-lock-card small{
 font-size:10px!important;line-height:1.4!important;
 margin:5px 0!important;overflow-wrap:anywhere!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .session-boundary-note{
 margin-top:7px!important;
}


/* Browser-verified reparenting truth: the original #shadow-lock-title,
   #shadow-lock-detail, #shadow-lock-kicker and buttons are MOVED directly
   under #mw-recovery; no .shadow-lock-card wrapper survives there.
   Target actual source-owned DOM; keep original session code untouched. */
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #shadow-lock-title{
 font:500 clamp(25px,2.6vw,32px)/1.12 Inter,system-ui,sans-serif!important;
 letter-spacing:-.035em!important;max-width:none!important;
 margin:3px 0 7px!important;overflow-wrap:anywhere!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #shadow-lock-detail{
 margin:3px 0 6px!important;font-size:12px!important;
 line-height:1.45!important;max-width:100%!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #shadow-lock-kicker{
 margin:0 0 3px!important;font-size:10px!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #mw-recovery-controls{
 gap:5px!important;margin:0!important;padding:0!important;
 align-content:start!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #mw-recovery-controls > *{
 margin:0!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #mw-recovery-controls button{
 min-height:44px!important;height:44px!important;
 padding:7px 11px!important;margin:0!important;
 border-radius:14px!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #workspace-status{
 margin:0 0 2px!important;min-height:0!important;
 padding:0!important;font-size:11px!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) #shadow-session-readback-status{
 display:block;min-height:0!important;line-height:1.25!important;
 font-size:10px!important;margin:0!important;
}
body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
 #mw-recovery.mw-recovery:not([hidden]) .session-boundary-note{
 display:block;font-size:9px!important;line-height:1.35!important;
 margin:3px 0!important;
}
@media(max-width:640px){
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]) #shadow-lock-title{
  font-size:clamp(24px,6.5vw,29px)!important;
 }
}

/* C4 signed browser Matter read presentation. A leased view of ONE signed
   selected source; not a second composer, model route or canonical Matter. */
.ls-chat .ls-browser-signed-same-matter{
  flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;
  padding:clamp(10px,2vw,17px);color:#dce9ef;scrollbar-width:thin;
  touch-action:pan-y;
}
.ls-chat .ls-browser-signed-same-matter[hidden]{display:none!important}
.ls-chat .ls-browser-signed-same-matter article{
  margin:0 0 15px;padding:12px 13px;border:1px solid #8ba6b72c;
  border-radius:12px;background:#172b3a87;
}
.ls-chat .ls-browser-signed-same-matter .ls-browser-source-return{
  border-color:#9eaeac58;background:#17303a7d
}
.ls-chat .ls-browser-signed-same-matter p{
  margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;
  font:400 13px/1.55 Inter,system-ui,sans-serif;
}
.ls-chat .ls-browser-signed-same-matter small{
  display:block;font:500 10px/1.5 Inter,system-ui,sans-serif;
  letter-spacing:.01em;color:#b6c8d3;
}
.ls-chat .ls-browser-signed-same-matter .ls-browser-source-held,
.ls-chat .ls-browser-signed-same-matter .ls-browser-source-limits{
  font:400 11px/1.5 Inter,system-ui,sans-serif;color:#b5bec7
}
.ls-chat[data-mode="orb"] .ls-browser-signed-same-matter{display:none!important}
.ls-chat[data-signed-browser-read="true"] .mw-composer{
  opacity:.55;pointer-events:none
}
@media(max-width:640px){
 .ls-chat .ls-browser-signed-same-matter{padding:10px}
 .ls-chat .ls-browser-signed-same-matter article{padding:9px 11px}
}

/* R55: keep the existing permission panel usable in short viewports.
   Presentation only: original hidden/disabled states and signed handlers stay
   untouched. The panel, rather than the clipped outer scene, owns scrolling. */
@media (max-height:610px){
 body[data-shadow-carrier="matter-world-r1"] #shadow-matter-world.mw-world.ls-enabled
  #mw-recovery.mw-recovery:not([hidden]){
  top:calc(8px + env(safe-area-inset-top,0px))!important;
  bottom:auto!important;
  transform:translateX(-50%)!important;
  min-height:0!important;
  height:auto!important;
  max-height:calc(100vh - 16px)!important;
  max-height:calc(100% - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
  grid-auto-rows:max-content;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  scroll-padding-block:12px;
  touch-action:pan-y;
 }
}
