:root{font-size:13px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button,select{color:inherit;background:#22252c;border:1px solid #363943;border-radius:7px;min-height:34px}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:7px 12px;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,transform .15s}button:hover{background:#30333e;border-color:#575b6c}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,canvas:focus-visible,summary:focus-visible{outline:2px solid var(--purple);outline-offset:3px}svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}h1,h2,h3,p{margin:0}small{color:var(--muted)}.symbols,.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.app-header{height:80px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#15171b;gap:16px}.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:38px;height:42px;display:grid;place-items:center;color:var(--purple)}.brand-mark svg{width:34px;height:34px;stroke-width:1.5}.brand strong{font-size:15px;letter-spacing:.5px;font-weight:600}.brand strong span{color:#606575;margin:0 9px;font-weight:400}.brand strong b{font-weight:450;letter-spacing:0}.brand small{display:block;margin-top:6px;font-size:10px;letter-spacing:.3px}.version{color:#7e8493;border:1px solid #353843;padding:4px 6px;font-size:8px;letter-spacing:1.2px;margin-left:7px;border-radius:3px}.header-actions{display:flex;gap:10px;align-items:center}.text-button{background:transparent;border-color:transparent;color:var(--muted);padding:5px 7px}.text-button:hover{color:var(--text);border-color:transparent}.primary-subtle{background:#2b283a;color:#c7bafc;border-color:#464055}.key{border:1px solid #424550;font-size:10px;border-radius:3px;padding:1px 5px;margin-left:4px}.workspace{display:grid;grid-template-columns:266px minmax(420px,1fr) 245px;min-height:calc(100vh - 80px)}.controls{padding:25px 22px;border-right:1px solid var(--line);background:var(--panel)}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.eyebrow{font-size:9px;letter-spacing:1.65px;color:var(--muted);font-weight:600}.small-dot{width:5px;height:5px;border-radius:50%;background:var(--purple)}h1{font-size:25px;font-weight:470;line-height:1.2;letter-spacing:-.8px}.intro{color:var(--muted);font-size:10px;margin:11px 0 22px;line-height:1.5}.scenario-list{display:flex;flex-direction:column;gap:7px;margin-bottom:25px}.scenario{justify-content:flex-start;background:#1b1d23;border:1px solid #30333c;padding:8px;gap:10px;text-align:left;min-height:58px}.scenario.active{border-color:#615579;background:linear-gradient(100deg,#2c263c,#22212a)}.scenario-art{height:38px;width:40px;display:grid;place-items:center;font-size:37px;border-radius:5px;flex-shrink:0;line-height:1;overflow:hidden;background-color:#191b24}.field-art{color:var(--purple);background-image:radial-gradient(#706289 1px,transparent 1px);background-size:10px 10px}.divide-art{color:#80a7b4;background:linear-gradient(90deg,#21303b 46%,#799399 46%,#799399 52%,#21303b 52%)}.weather-art{color:var(--amber);background:radial-gradient(ellipse at center,#453a2b,#282522)}.scenario b{font-size:11px;font-weight:500;display:block}.scenario small{display:block;font-size:9px;margin-top:4px}.scenario-arrow{margin-left:auto;color:#818394;font-size:15px}.tabs{display:flex;gap:4px;background:#101216;border:1px solid #2a2d34;padding:3px;border-radius:8px;margin-bottom:22px}.tabs button{flex:1;padding:5px 4px;background:transparent;border-color:transparent;color:var(--muted);min-height:28px;font-size:10px}.tabs button.active{background:#303039;color:#e8e3f5;border-color:#3c3a47;box-shadow:0 1px 4px #0003}.field-label{font-size:8px;letter-spacing:1.3px;display:block;margin:0 0 9px;color:#a1a5b3}select{width:100%;padding:8px 27px 8px 10px;font-size:11px;cursor:pointer}.field-help{font-size:10px;color:var(--muted);line-height:1.6;margin-top:10px;margin-bottom:20px}.slider-field{margin:19px 0 16px}.slider-field label{display:flex;justify-content:space-between;align-items:center;color:#bcc0cd;font-size:10px;margin-bottom:10px;gap:4px}.slider-field output{font-variant-numeric:tabular-nums;font-size:10px;color:#d1c6f3;background:#292733;padding:3px 6px;border-radius:4px;white-space:nowrap}.slider-field small{font-size:9px;display:block;margin-top:7px;line-height:1.4}input[type=range]{accent-color:var(--purple);width:100%;height:4px;display:block;cursor:pointer;margin:6px 0}input[type=range]::-webkit-slider-thumb{height:12px;width:12px}details{border-top:1px solid var(--line);margin-top:22px;padding-top:15px}summary{font-size:10px;color:#b4b8c5;cursor:pointer;list-style:none;display:flex;justify-content:space-between}summary::-webkit-details-marker{display:none}summary span{color:#737887}.seed-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0;margin-top:15px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}.seed-row input{width:84px;background:#14161b;color:#bab6cb;border:1px solid #343640;border-radius:5px;padding:6px 8px;font-variant-numeric:tabular-nums}.wide{width:100%;font-size:10px;min-height:34px;background:#26252f;border-color:#413c51;color:#c5bbdf}.scene-actions{display:flex;margin-top:9px;gap:7px}.scene-actions button{flex:1;font-size:9px;background:transparent;padding:4px 6px;border-color:var(--line)}.scene-actions svg{width:13px}.main-panel{padding:26px 24px;min-width:0}.arena-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:21px}.arena-header h2{font-size:21px;font-weight:450;letter-spacing:-.5px;margin-top:7px;display:flex;align-items:center;gap:10px}.arena-header h2 span{font-size:9px;color:#727685;border:1px solid #363943;padding:3px 5px;border-radius:4px;letter-spacing:0}.run-indicator{display:flex;align-items:center;gap:7px;font-size:10px;color:#a8a5b6;background:#24232b;border:1px solid #34323f;border-radius:20px;padding:6px 10px}.run-indicator i{width:5px;height:5px;border-radius:50%;background:#9b8dc1}.run-indicator.running{color:#a5d4c3;background:#1e2925;border-color:#344a40}.run-indicator.running i{background:#8dd7b5;box-shadow:0 0 8px #85d6b466}.arena-shell{border:1px solid #36353f;border-radius:11px;overflow:hidden;box-shadow:0 8px 26px #0002}.arena-toolbar{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;background:#1b1d23;border-bottom:1px solid #30323b;gap:8px}.draw-tools{display:flex;gap:4px;align-items:center}.draw-tools button{padding:7px;min-height:30px;width:31px;background:transparent;border-color:transparent;color:#969aa9}.draw-tools button.active{background:#373143;border-color:#665579;color:#d0baff}.draw-tools button:hover{background:#303039}.tool-divider{width:1px;height:18px;background:#353741;margin:0 5px}.draw-tools select{width:110px;font-size:9px;background:#22242b;padding:5px;min-height:27px;color:#afb2c0}.arena-toolbar .text-button{font-size:9px;min-height:28px}.canvas-wrap{position:relative;width:100%;aspect-ratio:1000/640;background:#151820;overflow:hidden}#arena{width:100%;height:100%;display:block;touch-action:none}.arena-corner{position:absolute;top:16px;left:16px;pointer-events:none;color:#818797;letter-spacing:1.2px;font-size:8px;display:flex;gap:9px;align-items:center}.arena-corner>span:last-child{letter-spacing:.5px;color:#555f71}.map-cross{font-size:17px;color:#a59aba}.map-legend{position:absolute;bottom:14px;left:16px;display:flex;gap:14px;font-size:8px;color:#84899b;pointer-events:none}.map-legend span{display:flex;align-items:center;gap:5px}.map-legend i{height:5px;width:5px;border-radius:50%}.violet{background:var(--purple)}.mint{background:var(--mint)}.amber{background:var(--amber)}.arena-foot{background:#1a1c23;border-top:1px solid #2d303b;display:flex;align-items:center;justify-content:space-between;padding:11px 13px;font-size:9px;color:#8e93a4;gap:12px}.layer-switches{display:flex;gap:11px;flex-wrap:wrap}.layer-switches label{display:flex;gap:5px;align-items:center;white-space:nowrap;font-size:8px;cursor:pointer}.layer-switches input{accent-color:#9c8abe;width:10px;height:10px;margin:0}.playback{display:flex;align-items:center;gap:20px;padding:17px 0 23px}.transport{display:flex;gap:4px}.transport button{width:30px;height:32px;padding:7px;border-color:transparent;background:transparent;color:#8a90a2}.transport .play-button{width:70px;background:#b9a4ed;color:#201931;border-color:#c9b7f5;border-radius:6px;font-size:10px;font-weight:600;margin-right:3px}.play-button svg{width:14px;height:14px;fill:currentColor;stroke-width:1.5}.timeline{flex:1;min-width:40px}.timeline-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:5px;font-size:9px;color:#777e90}.timeline-top #clock{font-family:ui-monospace,SFMono-Regular,monospace;font-size:11px;color:#c1bfcc}.timeline-top #history-label{font-size:8px;letter-spacing:.9px}.timeline input{height:3px;accent-color:#888092}.playback>select{width:85px;min-height:28px;font-size:9px;background:#1b1d24;color:#a9aabc;padding:5px 8px}.metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.metric-card{background:#1b1d23;border:1px solid #30323a;border-radius:9px;padding:14px 13px;min-height:132px;overflow:hidden}.metric-card>span{font-size:9px;color:#a1a4b3;display:flex;justify-content:space-between;align-items:center;gap:4px}.metric-icon{color:#9786b4;font-size:14px}.amber-text{color:var(--amber)}.mint-text{color:var(--mint)}.metric-card strong{font-size:27px;letter-spacing:-1px;font-weight:450;display:block;margin:13px 0 11px;font-variant-numeric:tabular-nums}.metric-card strong small{font-size:11px;letter-spacing:0;margin-left:2px}.metric-card>small{font-size:8px;color:#747b8c;display:block;line-height:1.5;margin-top:10px}.mini-track{height:3px;border-radius:3px;background:#333039;overflow:hidden;margin-top:18px}.mini-track i{display:block;height:100%;background:var(--amber);width:0}.energy-track i{background:#a48ac6;width:100%}.sparkline{height:11px;width:100%;display:block}.metric-detail{display:flex;justify-content:space-between;color:#7c8496;font-size:8px;padding-top:7px;gap:5px}.lower-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}.model-note{font-size:8px;color:#686f7e;line-height:1.5;display:flex;align-items:center;gap:6px}.model-note i{width:4px;height:4px;background:#626b7d;border-radius:50%;flex-shrink:0}.lower-row button{font-size:9px}.inspector{padding:25px 20px;border-left:1px solid var(--line);background:#17191e}.inspector .panel-heading{margin-bottom:26px}.inspector .panel-heading svg{color:#858097;width:14px;height:14px}.inspector-title{margin-bottom:20px}.inspector-title h2{font-size:16px;font-weight:450;letter-spacing:-.35px;margin-bottom:8px}.live-tag{font-size:7px;letter-spacing:1px;color:#8d889e}.inspector select{font-family:ui-monospace,SFMono-Regular,monospace;font-size:11px;background:#1f2128}.robot-preview{height:158px;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.orbit{position:absolute;border:1px solid #353040;border-radius:50%;width:96px;height:96px}.orbit-two{width:137px;height:137px;border-style:dashed;opacity:.55}.robot-glyph{width:59px;height:59px;stroke:#d3c2ff;fill:#b99ce9;stroke-width:1;transform:rotate(28deg);filter:drop-shadow(0 0 12px #c5a6ff38)}.robot-glyph path+path{stroke:#6d5b8a;stroke-width:2}.robot-preview>span{position:absolute;bottom:10px;color:#847694;font-size:8px;letter-spacing:1.5px}.agent-state{display:flex;gap:7px;align-items:center;font-size:11px;margin:13px 0 20px}.agent-state i{height:5px;width:5px;border-radius:50%;background:var(--purple)}#agent-energy{margin-left:auto;font-family:ui-monospace,monospace;font-size:10px;color:#aca0c4}.decision-card{background:#24212d;border:1px solid #383142;padding:13px;border-radius:7px}.decision-card .eyebrow{font-size:7px;color:#9f8fb9;letter-spacing:1.3px}.decision-card p{color:#c6b8d8;font-size:11px;line-height:1.7;margin-top:10px}.agent-facts{margin:22px 0}.agent-facts>div{display:flex;justify-content:space-between;padding:9px 0;gap:6px;border-bottom:1px solid #252830;align-items:center}.agent-facts dt{font-size:9px;color:#868d9d}.agent-facts dd{font-size:9px;margin:0;color:#b7b8c8;font-variant-numeric:tabular-nums;text-align:right}.knowledge-heading{display:flex;align-items:center;justify-content:space-between;margin-top:27px;margin-bottom:13px}.knowledge-heading h3{font-size:10px;font-weight:500}.knowledge-heading span{background:#292832;color:#ada0c7;border-radius:4px;padding:3px 5px;font-size:8px}.known-tasks{min-height:99px;max-height:270px;overflow-y:auto}.empty-state{font-size:10px;line-height:1.8;color:#6f778a;padding:15px 0}.known-task{display:grid;grid-template-columns:1fr auto;gap:5px;border-bottom:1px solid #292b33;padding:9px 0;font-size:9px;color:#baaf9b}.known-task small{font-size:8px;color:#777e90}.known-task b{font-weight:500;display:block;margin-bottom:4px}.note-card{background:#26232c;border:1px solid #3c3548;border-radius:7px;padding:13px;margin:24px 0}.note-card b{font-size:10px;color:#c0b3d1;font-weight:500}.note-card p{font-size:10px;line-height:1.7;color:#9590a3;margin-top:11px}#replay-banner{position:absolute;top:14px;left:50%;transform:translateX(-50%);background:#292038ef;color:#d9c2f8;border:1px solid #716083;border-radius:7px;padding:5px 9px;font-size:9px;white-space:nowrap}#replay-banner button{background:transparent;border:0;font-size:9px;color:#e2d1ff;min-height:22px;padding:2px 6px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#363143;border:1px solid #827190;box-shadow:0 10px 30px #0007;color:#e6d9fa;padding:13px 20px;border-radius:8px;z-index:20;max-width:600px;line-height:1.5}.toast.error{background:#432a31;border-color:#a36272;color:#f4cad4}dialog{color:var(--text);background:#1b1d23;border:1px solid #494350;border-radius:14px;padding:28px;max-width:min(960px,94vw);width:960px;box-shadow:0 20px 150px #0008;max-height:92vh}dialog::backdrop{background:#090b11bf;backdrop-filter:blur(5px)}.dialog-head{display:flex;justify-content:space-between;gap:16px;align-items:center}.dialog-head h2{font-size:25px;font-weight:450;letter-spacing:-.6px;margin-top:9px}.dialog-head>button{align-self:flex-start;background:transparent;border-color:#363840}.dialog-intro{color:#a7a8b8;line-height:1.8;margin:18px 0;font-size:12px;max-width:730px}.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:22px}.editor-bar{padding:10px 13px;display:flex;justify-content:space-between;background:#262632;border:1px solid #3a3744;border-bottom:0;border-radius:7px 7px 0 0;font-family:ui-monospace,monospace;font-size:10px;color:#b6a8c8}#python-source{display:block;width:100%;height:420px;min-height:260px;resize:vertical;background:#12151d;color:#c4b7df;border:1px solid #3a3744;border-radius:0 0 7px 7px;padding:16px;font:11px/1.8 ui-monospace,SFMono-Regular,monospace;tab-size:4;white-space:pre;overflow:auto}.code-reference{padding:6px 0}.code-reference h3{font-size:11px;font-weight:500;margin-bottom:16px;color:#b6acc7}.code-reference p{font-size:10px;color:#858a9b;line-height:1.5;margin:6px 0 17px}code,pre{font-family:ui-monospace,monospace;font-size:10px;color:#bfa7df}pre{line-height:1.8;white-space:pre-wrap}.python-notice{font-size:10px;color:#9690a2;margin-top:16px;line-height:1.6}.dialog-footer{display:flex;justify-content:space-between;gap:10px;margin-top:22px}.primary{background:#bba6ee;border-color:#cdb7ff;color:#281f39;font-weight:600}.primary:hover{background:#ccb9fa;color:#21172e}.inline-error{font:11px/1.6 ui-monospace,monospace;padding:12px;background:#3a252b;color:#f2acbc;border:1px solid #854253;border-radius:6px;margin-top:12px}.guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin:30px 0}.guide-grid article>span{font-size:11px;color:#b4a0d7}.guide-grid h3{font-size:14px;font-weight:500;margin:9px 0}.guide-grid p,.guide-details p{font-size:11px;color:#9a9dac;line-height:1.8}.guide-details{padding:20px;background:#15171e;border-radius:8px;border:1px solid #34313c}.guide-details h3{font-size:11px;font-weight:500;margin-bottom:10px}.guide-details p{margin:8px 0;font-size:10px}.shortcuts{display:flex;gap:24px;flex-wrap:wrap;margin-top:22px;font-size:10px;color:#9891a6}.shortcuts kbd{padding:4px 7px;background:#302b3b;border:1px solid #4a4059;border-radius:4px;margin-right:6px}#events-panel{margin-top:14px;border:1px solid #33333e;border-radius:8px;background:#171920;padding:15px}.events-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.events-header h3{font-size:11px;font-weight:500}.events-header span{font-size:9px;color:#8b819d}#event-list{max-height:170px;overflow:auto;font-family:ui-monospace,monospace;font-size:9px}.event-row{display:grid;grid-template-columns:max-content minmax(0,1fr) minmax(0,max-content) max-content;gap:8px;padding:6px 0;color:#818b9e;border-top:1px solid #242833;align-items:start}.event-row .delivered{color:#83bda9}.event-row .lost,.event-row .expired,.event-row .queue_full{color:#d39e8c}
@media(min-width:1650px){.workspace{grid-template-columns:280px minmax(420px,1fr) 280px}.main-panel{padding:30px 32px}.controls,.inspector{padding-left:26px;padding-right:26px}.canvas-wrap{max-height:calc(100vh - 400px);min-height:430px;aspect-ratio:auto}.metric-card{padding:18px}.metric-card>small{font-size:9px}.metric-card>span{font-size:10px}}
@media(max-width:1250px){.workspace{grid-template-columns:237px minmax(380px,1fr) 210px}.controls{padding:24px 16px}.inspector{padding:24px 15px}.main-panel{padding:24px 18px}.version{display:none}.metric-card{padding:12px 10px}.metric-card>span{font-size:8px}.metric-card strong{font-size:24px}.arena-foot{align-items:flex-start;flex-direction:column;gap:10px}.app-header{padding:0 18px}.header-actions{gap:5px}.header-actions button{font-size:10px}.layer-switches{gap:13px}.brand strong{font-size:13px}}
@media(max-width:1050px){.workspace{grid-template-columns:235px minmax(380px,1fr)}.inspector{grid-column:1/-1;border-top:1px solid var(--line);display:grid;grid-template-columns:200px 1fr 1fr;gap:16px}.inspector .panel-heading,.inspector-title,.robot-preview{display:none}.inspector select{align-self:start}.agent-state{margin:8px 0}.decision-card{grid-column:2;grid-row:1/3}.agent-facts{grid-column:3;grid-row:1/4;margin:0}.knowledge-heading{margin:0}.known-tasks{grid-column:1/3;max-height:100px}.brand small{display:none}.canvas-wrap{min-height:350px;aspect-ratio:1.4}.metrics-grid{grid-template-columns:repeat(2,1fr)}.metric-card{min-height:122px}.header-actions #help{display:none}.main-panel{padding:20px 16px}}
@media(max-width:720px){.app-header{height:65px;padding:0 12px}.brand{gap:4px}.brand strong{font-size:11px}.brand strong span{margin:0 4px}.brand-mark{width:28px}.brand-mark svg{width:25px}.header-actions button{padding:6px;font-size:9px;min-height:30px}.header-actions svg{display:none}.workspace{display:flex;flex-direction:column}.main-panel{order:0;padding:20px 12px}.controls{order:1;border-right:0;border-top:1px solid var(--line);padding:24px}.inspector{order:2;display:block;padding:24px}.inspector .panel-heading,.inspector-title{display:block}.inspector-title{margin-top:20px}.robot-preview{display:flex;height:130px}.canvas-wrap{min-height:280px;aspect-ratio:1.3}.arena-toolbar{padding:6px}.draw-tools{gap:0}.draw-tools select{width:89px;font-size:8px}.tool-divider{margin:0 3px}.arena-toolbar .text-button span{display:none}.map-legend{font-size:7px;gap:10px}.arena-header{margin-bottom:14px}.playback{gap:10px}.timeline-top #history-label{font-size:7px;letter-spacing:0}.playback>select{width:68px;font-size:8px}.metrics-grid{gap:8px}.scenario-list{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px}.scenario{min-width:0;flex-direction:column;align-items:flex-start;padding:9px}.scenario-arrow{display:none}.scenario b{font-size:10px}.scenario small{font-size:8px}.scenario-art{width:100%;height:34px}.controls h1 br{display:none}h1{font-size:23px}.intro{margin-bottom:18px}.agent-facts{margin:18px 0}.decision-card{margin:18px 0}.editor-layout{display:block}.code-reference{display:none}#python-source{font-size:10px;height:400px;padding:12px}dialog{padding:20px}.dialog-head h2{font-size:21px}.guide-grid{gap:20px}.guide-grid p{font-size:10px}.lower-row{align-items:flex-start}.model-note{font-size:7px}.layer-switches{gap:9px}.layer-switches label{font-size:8px}.arena-corner{font-size:7px}.metric-card>span{font-size:10px}.metric-card>small{font-size:9px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.site-return{font-size:10px;color:#b4a3cf;text-decoration:none;padding:7px}.runtime-loading{position:fixed;inset:80px 0 0;background:#14161bf5;z-index:30;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;padding:32px;text-align:center}.runtime-loading strong{font-size:24px;font-weight:450;color:#d3c4ef}.runtime-loading span{font-size:12px;color:#9993a8;max-width:520px;line-height:1.7}
@media(min-width:1051px){.app-header{position:sticky;top:0;z-index:5}.workspace{height:calc(100vh - 80px);min-height:0}.controls,.inspector,.main-panel{overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#3d3949 transparent}.canvas-wrap{max-height:calc(100vh - 470px);min-height:360px;aspect-ratio:1000/640}}

/* The full workspace shares one arena; closing panels returns their columns. */
[hidden]{display:none!important}
.preview-controls{display:none}
.workspace{--settings-width:266px;--inspector-width:245px;display:grid;grid-template-columns:var(--settings-width) minmax(0,1fr) var(--inspector-width)}
.settings-closed .workspace{--settings-width:0px}
.inspector-closed .workspace{--inspector-width:0px}
.controls{grid-column:1;grid-row:1}
.main-panel{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-width:0}
.inspector{grid-column:3;grid-row:1;display:block}
.settings-title{font-size:19px;font-weight:550;letter-spacing:-.3px;margin:0 0 22px}
.arena-header{order:0;gap:16px;flex-wrap:wrap;margin-bottom:4px}
.arena-heading{display:flex;align-items:center;gap:16px}
.arena-header h2{margin:0;font-size:16px}
.panel-toggle{font-size:11px;gap:7px;min-height:33px;background:transparent;color:#b5b7c4;border-color:#373a45}
.panel-toggle[aria-expanded=false]{color:var(--text);border-color:#625a78;background:#24212d}
.panel-toggle svg{width:16px;height:16px}
.main-panel>.playback{order:1;position:sticky;top:-26px;z-index:3;background:var(--bg);padding:14px 0;margin-bottom:4px}
.arena-shell{order:2;flex-shrink:0}
.canvas-wrap{min-height:0;max-height:none;aspect-ratio:1000/640}
.metrics-grid{order:3;margin-top:18px}
.lower-row{order:4;justify-content:flex-end}
#events-panel{order:5}
.inspector-title{margin-bottom:20px}
.inspector-title h2{font-size:17px;margin:0}
@media(min-width:1650px){.workspace{--settings-width:280px;--inspector-width:280px}}
@media(min-width:721px) and (max-width:1050px){
 .workspace{--settings-width:220px;--inspector-width:210px;height:calc(100vh - 80px);min-height:0}
 .controls,.inspector,.main-panel{overflow-y:auto;min-height:0}
 .inspector .robot-preview{display:block}.inspector .robot-preview{display:flex}
 .metrics-grid{grid-template-columns:repeat(2,1fr)}
 .main-panel>.playback{top:-20px}
 .arena-heading{gap:8px}.arena-header .run-indicator{display:none}
}
@media(min-width:721px){
 body.settings-closed .workspace{--settings-width:0px}
 body.inspector-closed .workspace{--inspector-width:0px}
}
@media(max-width:720px){
 .workspace{display:block;min-height:calc(100vh - 65px)}
 .controls,.inspector{position:fixed;top:118px;bottom:0;width:min(85vw,320px);overflow-y:auto;z-index:7;box-shadow:0 12px 40px #0008;border:1px solid var(--line);padding:22px}
 .controls{left:0}.inspector{right:0}
 .main-panel{padding:16px 12px}
 .arena-header{position:sticky;top:65px;z-index:8;flex-wrap:nowrap;background:var(--bg);padding:10px 0;margin-top:-10px}
 .arena-header h2,.arena-header .run-indicator{display:none}
 .arena-header .arena-heading{gap:0}
 .main-panel>.playback{top:114px;padding:10px 0}
 .app-header{position:sticky;top:0;z-index:9}
 .brand-mark{display:none}.brand strong{font-size:11px}
 .brand strong>span,.brand strong>b{display:none}
 .site-return{font-size:9px;margin-right:3px}
 .inspector-title{margin-top:0}
 .inspector .robot-preview{display:flex}
 .canvas-wrap{min-height:0;aspect-ratio:1000/640}
}

/* The inline view is a compact part of the site's reading column. */
body.preview{color-scheme:light;--bg:#fff;--text:#222;--muted:#666;--line:#ddd;background:#fff;font-family:Arial,Helvetica,sans-serif;overflow:hidden}
.preview .app-header,.preview .controls,.preview .inspector,.preview .arena-header,.preview .arena-toolbar,.preview .arena-foot,.preview .arena-corner,.preview .lower-row,.preview #events-panel{display:none!important}
.preview .workspace{display:block;height:100vh;min-height:0}
.preview .main-panel{display:flex;height:100%;padding:0;overflow:hidden}
.preview .preview-controls{display:flex;order:0;gap:12px;align-items:center;padding:16px 0;font-size:12px;flex-shrink:0}
.preview-controls>label:first-child{color:#666}
.preview .preview-controls select{width:160px;min-height:34px;border:1px solid #ccc;border-radius:4px;color:#222;background:#fff;font-size:12px;padding:7px 10px}
.preview-share{margin-left:auto;display:flex;align-items:center;gap:7px;color:#444;cursor:pointer;white-space:nowrap}
.preview-share input{accent-color:#435f6f;margin:0;width:14px;height:14px}
.preview .arena-shell{order:1;flex:1;min-height:0;display:flex;flex-direction:column;border:0;border-radius:5px;box-shadow:none}
.preview .canvas-wrap{flex:1;aspect-ratio:auto;min-height:0;max-height:none}
.preview #arena{touch-action:pan-y}
.preview .map-legend{font-size:9px;color:#a2a7b4;bottom:12px}
.preview .playback{order:2;position:static;flex-shrink:0;padding:14px 0 12px;gap:14px;margin:0;border-bottom:1px solid #e5e5e5}
.preview .transport .play-button{background:#262b30;border-color:#262b30;color:#fff;font-size:12px;width:78px;min-height:34px;border-radius:4px}
.preview .transport button{color:#555}
.preview #step,.preview #history,.preview #history-label,.preview #play-speed{display:none}
.preview .timeline{display:flex;justify-content:flex-end}
.preview .timeline-top{margin:0}.preview .timeline-top #clock{color:#555;font-size:12px}
.preview .metrics-grid{order:3;display:flex;gap:28px;margin:0;padding:14px 0;flex-shrink:0}
.preview .metric-card{display:flex;align-items:baseline;gap:9px;min-height:0;padding:0;background:none;border:0;border-radius:0;overflow:visible}
.preview .metric-card:nth-child(n+3),.preview .metric-card>small,.preview .metric-card>canvas,.preview .mini-track,.preview .metric-icon{display:none}
.preview .metric-card>span{font-size:11px;color:#666}
.preview .metric-card strong{font-size:15px;font-weight:600;letter-spacing:-.2px;color:#222;margin:0}
.preview .metric-card strong small{font-size:11px;font-weight:400;color:#666}
.preview .runtime-loading{background:#fffffff5;color:#333}
.preview .runtime-loading strong{color:#222}
.preview .runtime-loading span{color:#666}
.preview .toast{max-width:90%;bottom:14px}
@media(max-width:480px){
 .preview .preview-controls{flex-wrap:wrap;gap:8px 12px;padding:14px 0}
 .preview .preview-controls select{flex:1;width:auto}
 .preview .preview-share{width:100%;margin:3px 0 0;font-size:11px}
 .preview .metrics-grid{gap:18px;justify-content:space-between}
 .preview .metric-card{gap:6px}.preview .metric-card>span{font-size:10px}
 .preview .map-legend{font-size:8px;gap:10px}
}

/* Use the project's existing ant mark in both simulator entry points. */
.brand-mark{width:44px;height:44px;flex:0 0 44px}
.brand-mark img{display:block;width:100%;height:100%;object-fit:contain;border-radius:6px}
.preview-edits{display:none}
@media(max-width:720px){.brand-mark{display:block;width:30px;height:30px;flex-basis:30px}.brand{gap:7px}}

/* Quick editing keeps the preview compact; its parent follows content height. */
.preview .workspace{height:auto}
.preview .main-panel{height:auto;overflow:visible}
.preview .preview-edits{display:block;order:1;padding-bottom:12px}
.preview .quick-tools{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.preview .quick-tools button{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 9px;font-size:11px;color:#444;background:#fff;border:1px solid #d6d6d6;border-radius:4px}
.preview .quick-tools button:hover{background:#f5f5f5;border-color:#aaa}
.preview .quick-tools button.active,.preview #quick-settings-toggle[aria-expanded=true]{background:#edf1f3;border-color:#73818a;color:#202f39}
.preview .quick-tools svg{width:13px;height:13px}
.preview #quick-settings-toggle{margin-left:auto}
.preview .quick-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;margin-top:12px;padding:15px;background:#f8f8f7;border:1px solid #e6e6e3;border-radius:4px}
.preview .quick-settings>label{display:grid;gap:7px;font-size:11px;color:#555}
.preview .quick-settings select{background:#fff;color:#222;border:1px solid #ccc;min-height:33px;font-size:12px;padding:6px 8px}
.preview .quick-settings .slider-field{margin:0}
.preview .quick-settings .slider-field label{font-size:11px;color:#555}
.preview .quick-settings output{color:#444;background:transparent;font-size:11px;padding:0}
.preview .quick-settings input[type=range]{accent-color:#536777;width:100%;margin:9px 0 0}
.preview .quick-edit-hint{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0 0;font-size:11px;color:#555}
.preview .quick-edit-hint button{padding:4px 0;min-height:24px;border:0;background:transparent;color:#254e6c;font-size:11px;text-decoration:underline;white-space:nowrap}
.preview.editing-world #arena{touch-action:none}
.preview .arena-shell{order:2;display:block;flex:none}
.preview .canvas-wrap{aspect-ratio:1000/640;flex:none;contain:size}
.preview .playback{order:3}
.preview .metrics-grid{order:4}
.preview .runtime-loading{inset:0}
@media(max-width:480px){
 .preview .quick-tools{gap:6px}
 .preview .quick-tools button{font-size:10px;padding:6px 8px;gap:4px}
 .preview #quick-settings-toggle{margin-left:0}
 .preview .quick-settings{gap:14px 16px;padding:12px}
}

/* Integrated owner workspace: one canvas-first application under the shared header. */
.workspace-scene{display:none}
.workspace-embed{height:100dvh;overflow:hidden;font-size:13px}
.workspace-embed .app-header{display:none}
.workspace-embed .runtime-loading{inset:0}
.workspace-embed .workspace{--settings-width:250px;--inspector-width:240px;height:100dvh;min-height:0;gap:0}
.workspace-embed.settings-closed .workspace{--settings-width:0px}
.workspace-embed.inspector-closed .workspace{--inspector-width:0px}
.workspace-embed .controls,.workspace-embed .inspector{padding:22px 18px;overflow-y:auto;min-height:0;scrollbar-width:thin;background:var(--panel)}
.workspace-embed .controls{border-right:1px solid var(--line)}
.workspace-embed .inspector{border-left:1px solid var(--line);border-top:0}
.workspace-embed .settings-title,.workspace-embed .inspector-title h2{font-size:16px;font-weight:550;margin-bottom:20px}
.workspace-embed .workspace-scene{display:block;color:var(--muted);font-size:12px;margin-bottom:20px}
.workspace-embed .workspace-scene select{margin-top:8px}
.workspace-embed .scenario-list{display:none}
.workspace-embed select{min-height:37px;font-size:12px;padding:8px 10px;background:var(--surface);border-color:var(--line);color:var(--text)}
.workspace-embed .tabs{margin-bottom:22px;gap:2px}
.workspace-embed .tabs button{font-size:12px;min-height:32px}
.workspace-embed .field-label{font-size:10px;letter-spacing:.8px;color:var(--muted)}
.workspace-embed .field-help{font-size:12px;line-height:1.6;color:var(--muted)}
.workspace-embed .slider-field{margin-top:22px;margin-bottom:22px}
.workspace-embed .slider-field label,.workspace-embed .seed-row label{font-size:12px;color:var(--text)}
.workspace-embed .slider-field small{font-size:11px;color:var(--muted);line-height:1.5}
.workspace-embed .slider-field output{font-size:12px;background:var(--accent-wash);color:var(--purple)}
.workspace-embed input[type=range]{accent-color:var(--purple)}
.workspace-embed .controls summary{font-size:12px;color:var(--muted)}
.workspace-embed .seed-row input{font-size:13px;background:var(--bg);color:var(--text)}
.workspace-embed .controls button.wide{font-size:12px;margin-top:12px;min-height:36px}
.workspace-embed .scene-actions button{font-size:11px;min-height:36px}
.workspace-embed .note-card b,.workspace-embed .note-card p{font-size:12px;line-height:1.6}
.workspace-embed .main-panel{padding:14px 16px 10px;gap:10px;min-height:0;overflow-y:auto;position:relative}
.workspace-embed .arena-header{order:0;margin:0;min-height:36px;flex-shrink:0;gap:8px;flex-wrap:nowrap}
.workspace-embed .arena-header h2{font-size:14px;font-weight:500}
.workspace-embed .arena-heading{gap:12px}
.workspace-embed .panel-toggle{font-size:12px;min-height:32px;padding:6px 9px}
.workspace-embed .panel-toggle[aria-expanded=true]{background:var(--surface);border-color:var(--line);color:var(--text)}
.workspace-embed .panel-toggle[aria-expanded=false]{background:transparent;border-color:var(--line);color:var(--muted)}
.workspace-embed .run-indicator{font-size:11px;letter-spacing:.2px}
.workspace-embed .arena-shell{order:1;display:flex;flex-direction:column;flex:1 0 280px;min-height:280px;border-color:var(--line);border-radius:var(--radius)}
.workspace-embed .arena-toolbar{padding:8px 10px;flex-shrink:0;background:var(--panel)}
.workspace-embed .draw-tools button{width:34px;min-height:34px}
.workspace-embed .draw-tools select{font-size:12px;min-height:32px;max-width:150px}
.workspace-embed .canvas-wrap{flex:1;aspect-ratio:auto;min-height:170px;max-height:none}
.workspace-embed .arena-foot{padding:10px 12px;gap:8px;flex-wrap:wrap;flex-direction:row;font-size:11px;background:var(--panel);flex-shrink:0}
.workspace-embed .layer-switches{gap:12px;flex-wrap:wrap}
.workspace-embed .layer-switches label{font-size:11px;color:var(--muted)}
.workspace-embed .map-legend{font-size:10px;gap:16px}
.workspace-embed .arena-corner{font-size:9px;letter-spacing:1px}
.workspace-embed .main-panel>.playback{order:2;position:static;padding:4px 0;margin:0;flex-shrink:0;gap:16px}
.workspace-embed .transport .play-button{background:var(--purple);border-color:var(--purple);color:#211a32;min-height:36px;font-size:13px}
.workspace-embed .timeline-top #clock{font-size:14px;color:var(--text)}
.workspace-embed .timeline-top #history-label{font-size:10px;letter-spacing:.5px}
.workspace-embed .metrics-grid{order:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);flex-shrink:0}
.workspace-embed .metric-card{border:0;border-right:1px solid var(--line);border-radius:0;min-height:78px;padding:12px;background:transparent;min-width:0}
.workspace-embed .metric-card:last-child{border-right:0}
.workspace-embed .metric-card>span{font-size:11px;color:var(--muted)}
.workspace-embed .metric-card strong{font-size:22px;line-height:1.4;margin:3px 0 0;font-weight:500}
.workspace-embed .metric-card strong small{font-size:12px}
.workspace-embed .metric-card>small{font-size:10px;color:var(--muted);line-height:1.5}
.workspace-embed .metric-card>canvas,.workspace-embed .metric-card .mini-track,.workspace-embed .metric-icon,.workspace-embed .metric-detail{display:none}
.workspace-embed .lower-row{order:4;margin:0;min-height:22px;flex-shrink:0}
.workspace-embed #toggle-events{font-size:11px;min-height:22px;padding:2px 0}
.workspace-embed #events-panel{position:absolute;bottom:35px;left:16px;right:16px;z-index:4;margin:0;box-shadow:0 10px 40px #0008;padding:16px;background:var(--surface)}
.workspace-embed #event-list{font-size:11px;max-height:200px}
.workspace-embed .events-header h3,.workspace-embed .events-header span{font-size:12px}
.workspace-embed .inspector-title{display:block;margin:0}
.workspace-embed .robot-preview{display:none}
.workspace-embed .agent-state{font-size:13px;margin:18px 0}
.workspace-embed #agent-energy{font-size:12px}
.workspace-embed .decision-card{padding:14px;background:var(--accent-wash);border-color:#afa0fa30}
.workspace-embed .decision-card .eyebrow{font-size:10px;letter-spacing:.6px;color:var(--purple)}
.workspace-embed .decision-card p{font-size:12px;color:var(--text);line-height:1.7}
.workspace-embed .agent-facts{margin:20px 0}
.workspace-embed .agent-facts>div{padding:12px 0;border-color:var(--line)}
.workspace-embed .agent-facts dt,.workspace-embed .agent-facts dd{font-size:11px;color:var(--muted)}
.workspace-embed .agent-facts dd{color:var(--text)}
.workspace-embed .knowledge-heading h3{font-size:12px}
.workspace-embed .knowledge-heading span{font-size:11px}
.workspace-embed .empty-state,.workspace-embed .known-task,.workspace-embed .known-task small{font-size:12px;line-height:1.7;color:var(--muted)}
/* Optional code dock occupies the settings column without covering the arena. */
.workspace-embed.python-open .workspace{--settings-width:380px}
.workspace-embed.python-open .controls{display:none}
.workspace-embed.python-open #toggle-settings{color:var(--muted)}
.workspace-embed #python-dialog[open]{position:fixed;inset:0 auto 0 0;width:380px;max-width:none;height:100dvh;max-height:none;margin:0;border:0;border-right:1px solid var(--line);border-radius:0;padding:22px 18px;box-shadow:none;background:var(--panel);overflow:auto;z-index:10}
.workspace-embed #python-dialog h2{font-size:17px;margin:0}
.workspace-embed #python-dialog .dialog-intro{font-size:12px;line-height:1.7;margin:20px 0}
.workspace-embed #python-dialog .editor-layout{display:block}
.workspace-embed #python-dialog .code-reference{display:none}
.workspace-embed #python-source{height:calc(100dvh - 350px);min-height:240px;font-size:12px;padding:14px;resize:vertical;color:#d1c8ed;background:var(--bg)}
.workspace-embed #python-dialog .editor-bar{font-size:10px;background:var(--surface)}
.workspace-embed #python-dialog .python-notice{font-size:11px;color:var(--muted)}
.workspace-embed #python-dialog .dialog-footer{flex-wrap:wrap;margin-top:16px;gap:10px}
.workspace-embed #python-dialog .dialog-footer button{font-size:12px}
@media(max-width:1200px){
 .workspace-embed .workspace{--settings-width:230px;--inspector-width:220px}
 .workspace-embed .main-panel{padding:12px;gap:10px}
 .workspace-embed .arena-header h2{display:none}
 .workspace-embed .metric-card{padding:10px}.workspace-embed .metric-card>small{display:none}
 .workspace-embed.python-open .workspace{--settings-width:330px}
 .workspace-embed #python-dialog[open]{width:330px}
 .workspace-embed .run-indicator{display:none}
}
@media(max-width:900px){
 .workspace-embed .workspace{--settings-width:0px;--inspector-width:0px}
 .workspace-embed .controls,.workspace-embed .inspector{position:fixed;top:58px;bottom:0;width:min(85vw,300px);z-index:7;box-shadow:0 12px 40px #0008;border:1px solid var(--line)}
 .workspace-embed .controls{left:0}.workspace-embed .inspector{right:0}
 .workspace-embed .main-panel{grid-column:2}
 .workspace-embed .arena-header{position:static;top:auto;padding:0;background:var(--bg);z-index:8}
 .workspace-embed.python-open .workspace{--settings-width:0px}
 .workspace-embed #python-dialog[open]{width:min(460px,100vw);box-shadow:0 12px 60px #000b}
}
@media(max-width:720px){
 .workspace-embed .workspace{display:grid;height:100dvh;min-height:0}
 .workspace-embed .main-panel{padding:10px;gap:10px;order:0}
 .workspace-embed .arena-header h2{display:none}
 .workspace-embed .arena-shell{min-height:240px;flex-basis:240px}
 .workspace-embed .canvas-wrap{min-height:120px}
 .workspace-embed .arena-foot{font-size:10px;padding:8px}
 .workspace-embed .arena-foot #tool-hint{display:none}
 .workspace-embed .layer-switches{gap:10px}
 .workspace-embed .layer-switches label{font-size:10px}
 .workspace-embed .metric-card>span{font-size:10px}.workspace-embed .metric-card strong{font-size:18px}
 .workspace-embed .metric-card{padding:9px 7px;min-height:66px}
 .workspace-embed .main-panel>.playback{gap:10px}
 .workspace-embed .map-legend{font-size:9px;gap:10px}
 .workspace-embed .arena-corner{font-size:8px}
 .workspace-embed .playback>select{width:78px;font-size:11px;padding:6px}
 .workspace-embed .timeline-top #history-label{font-size:8px;letter-spacing:0}
}
/* Keep outcomes glanceable so the arena gets the available vertical space. */
.workspace-embed .metric-card{min-height:64px;padding:9px 12px}
.workspace-embed .metric-card>small{display:none}
.workspace-embed .metric-card strong{font-size:21px;line-height:1.25}
.workspace-embed .playback>select{min-width:88px}
@media(max-width:720px){.workspace-embed .metric-card{min-height:61px;padding:8px 7px}.workspace-embed .metric-card strong{font-size:18px}.workspace-embed .playback>select{min-width:75px}}
.tool-label{display:none}
.workspace-embed .main-panel{container-type:inline-size}
@container (min-width:700px){
 .workspace-embed .draw-tools .tool-label{display:inline;font-size:11px}
 .workspace-embed .draw-tools button{width:auto;padding:7px 9px}
}

/* Map configuration shares the workspace palette and stays out of the preview. */
.map-toolbar-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
.map-toolbar-actions #map-settings{font-size:11px;min-height:30px;padding:5px 10px;background:var(--panel);border-color:var(--line)}
.map-settings-actions{display:flex;flex-direction:column;gap:8px;margin-bottom:24px}
.map-settings-actions button{justify-content:center;font-size:12px;padding:8px}
#map-dialog{width:460px;max-width:calc(100vw - 24px);padding:24px}
#map-dialog .dialog-head h2{font-size:20px;margin:0}
#map-dialog .field-help{font-size:12px;line-height:1.6;margin:16px 0}
#map-dialog fieldset{border:0;padding:0;margin:22px 0}
#map-dialog legend{font-size:12px;font-weight:600;padding:0;margin-bottom:12px}
.map-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.map-fields label{font-size:12px;color:var(--muted)}
.map-fields input{display:block;width:100%;min-width:0;margin-top:6px;padding:9px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px}
#map-dialog .dialog-footer button{font-size:12px;padding:9px 14px}
@media(max-width:720px){.arena-toolbar{flex-wrap:wrap}.map-toolbar-actions{margin-left:auto}}

/* Use the same extensible scene picker in the local and embedded workspaces. */
body:not(.preview) .scenario-list{display:none}
body:not(.preview) .workspace-scene{display:flex;flex-direction:column;gap:9px;font-size:11px;color:var(--muted);margin:18px 0 24px}
body:not(.preview) .workspace-scene select{width:100%;padding:9px;background:var(--panel);color:var(--text);border-color:var(--line)}

.map-viewbar{display:flex;align-items:center;gap:12px;padding:6px 10px;border-bottom:1px solid var(--line);background:var(--panel);font-size:11px;flex-shrink:0}
.map-viewbar button{min-height:27px;padding:3px 9px;background:transparent;border-color:var(--line);font-size:11px}
.map-viewbar button.active{color:var(--purple);background:var(--raised)}
.map-viewbar button:disabled{opacity:.35;cursor:default}
.map-viewbar label{display:flex;align-items:center;gap:5px;white-space:nowrap;color:var(--muted)}
.map-viewbar input{accent-color:var(--purple);margin:0}
#map-coordinates{color:var(--muted);font-variant-numeric:tabular-nums}
.map-zoom{margin-left:auto;display:flex;align-items:center;gap:5px}
#zoom-level{min-width:38px;text-align:center;color:var(--muted);font-variant-numeric:tabular-nums}
.preview .map-viewbar{display:none}
@media(max-width:600px){#map-coordinates{display:none}.map-viewbar{gap:8px}}

/* Contact and outage tools use the existing inspector and parameter panels. */
.contact-section{min-width:0}
.contact-section .field-help{margin-bottom:6px}
.contact-list,.outage-list{max-height:210px;overflow:auto}
.contact-row,.outage-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid var(--line);font-size:11px;font-variant-numeric:tabular-nums}
.contact-row b,.outage-row b{display:block;font-weight:500}
.contact-row small,.outage-row small{display:block;font-size:10px;margin-top:4px;color:var(--muted)}
.contact-row>span:last-child{color:var(--muted);white-space:nowrap}
.contact-row.active b{color:var(--mint)}.contact-row.expired b{color:var(--amber)}
.outage-form{display:grid;gap:12px}
.software-version{font-size:11px;color:var(--muted);margin:6px 0 16px}
.runtime-status{order:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px;font-size:10px;color:var(--muted)}
.runtime-status strong{color:var(--text);font-weight:550}.runtime-status #connection-status{color:var(--mint)}
.runtime-status[data-connected=false] #connection-status,.runtime-status[data-connected=false] #connection-detail{color:var(--amber)}
.runtime-status button{margin-left:auto;min-height:28px;font-size:10px;padding:4px 9px}
.runtime-status #runtime-reconnect{margin-left:0}
.runtime-disconnected .canvas-wrap{outline:1px dashed var(--amber);outline-offset:2px}
#jobs-dialog{max-width:1080px;width:calc(100vw - 40px)}.jobs-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;margin-top:22px}
.jobs-layout h3{font-size:14px;font-weight:550;margin-bottom:12px}.jobs-layout .field-help{display:block;margin:9px 0;line-height:1.6}
#jobs-spec{display:block;width:100%;min-height:235px;padding:12px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:7px;font:11px/1.7 ui-monospace,monospace;resize:vertical}
.jobs-draft pre,.jobs-detail pre{max-height:220px;overflow:auto;padding:12px;border:1px solid var(--line);border-radius:7px;margin:12px 0;overflow-wrap:anywhere}.jobs-trust{display:flex;gap:9px;align-items:flex-start;font-size:10px;line-height:1.7;color:var(--muted);margin:14px 0}.jobs-trust input{flex-shrink:0;margin-top:3px}
.jobs-heading,.jobs-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.jobs-heading{justify-content:space-between;margin-bottom:12px}.jobs-heading h3{margin:0}.jobs-actions button{font-size:10px;padding:6px 9px}
#jobs-select{width:100%;margin-bottom:10px}.jobs-detail{font-size:11px;line-height:1.7;margin-top:16px;overflow-wrap:anywhere}.jobs-detail p{margin:8px 0}.jobs-detail dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 12px;margin:10px 0}.jobs-detail dt{color:var(--muted)}.jobs-detail dd{margin:0;font-size:10px;overflow-wrap:anywhere}
.jobs-journal{padding:12px 0;border-bottom:1px solid var(--line);font-size:10px;overflow-wrap:anywhere}.jobs-journal p{margin:6px 0}.jobs-artifacts{display:flex;flex-direction:column;gap:8px;margin-top:16px}.jobs-artifacts button{justify-content:flex-start;white-space:normal;font-size:10px}
@media(max-width:720px){.jobs-layout{grid-template-columns:1fr;gap:24px}#jobs-dialog{width:calc(100vw - 20px)}.jobs-actions button{flex:1}.header-actions #open-jobs{font-size:8px}}
.preview .software-version{display:none}
.outage-form>label{font-size:11px;color:var(--muted)}
.outage-form select,.outage-form>label>input{margin-top:6px;width:100%}
.outage-form>label>input{display:block;min-width:0;padding:9px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px}
.outage-row span{min-width:0;overflow-wrap:anywhere}
.outage-row button{flex-shrink:0}
.outage-form button,.outage-row button{font-size:11px;padding:6px 8px}
.outage-form .map-fields{gap:8px}
.outage-form .map-fields label{font-size:10px}
.contact-section .agent-facts{margin:8px 0}
.coordination-settings{padding-bottom:2px}
.resource-toggle{display:flex;align-items:center;gap:8px;font-size:12px;margin:12px 0}
.resource-toggle input{accent-color:var(--purple)}
#device-resource-settings>button{width:100%;white-space:normal;line-height:1.4}
.device-resource-inspector{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}
.device-resource-inspector .knowledge-heading span{font-size:10px;overflow-wrap:anywhere;text-align:right;max-width:50%}
.coordination-settings .field-label{margin-top:18px}
.parameter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 18px}
.parameter-grid label{min-width:0;color:#bcc0cd;font-size:10px;line-height:1.45}
.parameter-grid input{display:block;width:100%;min-width:0;margin-top:6px;padding:8px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px;font-variant-numeric:tabular-nums}
.number-field{display:block;margin:14px 0 18px;color:#bcc0cd;font-size:10px;line-height:1.45}
.number-field input{display:block;width:100%;margin-top:6px;padding:8px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px;font-variant-numeric:tabular-nums}
.coordination-settings .field-help{margin:9px 0 14px}
.workspace-embed .parameter-grid{gap:8px;margin:12px 0 16px}
.workspace-embed .parameter-grid label{font-size:11px;color:var(--text)}
.workspace-embed .parameter-grid input{font-size:12px;padding:8px}
.workspace-embed .number-field{font-size:11px;color:var(--text)}
.coordination-inspector{min-width:0}
.claim-list{max-height:170px;overflow:auto}
.claim-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:10px;font-variant-numeric:tabular-nums}
.claim-row b{display:block;font-weight:500;color:var(--text)}
.claim-row small{display:block;margin-top:3px;font-size:9px;color:var(--muted)}
.claim-row>span:last-child{color:var(--muted);white-space:nowrap}
.claim-row.own b,.claim-row.own>span:last-child{color:var(--mint)}
.known-task>small{max-width:90px;text-align:right}
.spatial-knowledge{margin:18px 0;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.spatial-knowledge .knowledge-heading{margin:0 0 10px;gap:8px}
.spatial-knowledge .knowledge-heading button{font-size:11px;min-height:28px;padding:3px 9px;white-space:nowrap}
.spatial-knowledge .agent-facts{margin:12px 0}
.known-robots{max-height:190px;overflow:auto}
.known-robot{padding:9px 0;border-bottom:1px solid var(--line);font-size:11px;line-height:1.6;font-variant-numeric:tabular-nums}
.known-robot b{font-weight:500;color:var(--purple)}
.known-robot small{display:block;color:var(--muted);font-size:10px}
.known-robot.reported b{color:var(--amber)}
#knowledge-view-label{color:var(--purple);font-size:11px;white-space:nowrap}
.canvas-wrap{background:#10161d}
.arena-corner{top:auto;bottom:46px;left:16px;color:#8298aa;pointer-events:none}
.map-legend{background:#101821d9;border:1px solid #63778738;border-radius:5px;padding:6px 9px;left:12px;bottom:10px;max-width:calc(100% - 165px);flex-wrap:wrap;gap:7px 12px;pointer-events:none}
.workspace-embed .map-legend{font-size:9px;gap:7px 12px}
@media(max-width:600px){
 .map-viewbar{display:grid;grid-template-columns:minmax(0,1fr) auto}
 .map-viewbar>button[data-tool="pan"]{justify-self:end}
 .map-viewbar .map-zoom{margin-left:0}
 .map-legend,.workspace-embed .map-legend{font-size:8px;gap:5px 8px;max-width:calc(100% - 110px)}
 .arena-corner{font-size:7px;bottom:55px}
}
@media(max-width:1050px){.spatial-knowledge{grid-column:1/-1}.spatial-knowledge .agent-facts{display:block}}
.map-legend .role-legend i{background:linear-gradient(90deg,#b5a5fa 0 33%,#e2b675 33% 66%,#80dbc0 66%);border-radius:50%;width:7px;height:7px}
.task-edit-field{display:block;margin:18px 0;color:var(--muted);font-size:11px}
.task-edit-field input{display:block;width:100%;margin-top:7px;padding:9px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px}
#task-dialog{width:460px;max-width:calc(100vw - 24px);padding:24px}
#task-dialog .dialog-head h2{font-size:20px;margin:0}
#task-dialog .field-help{font-size:12px;line-height:1.6;margin:14px 0}
#task-dialog .parameter-grid{grid-template-columns:1fr 1.15fr}
#task-dialog .dialog-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
#task-dialog .dialog-footer button{font-size:12px;padding:9px 14px}
.workspace-embed #task-dialog{width:min(460px,100vw);max-height:calc(100dvh - 24px);overflow:auto}
@media(min-width:721px) and (max-width:1050px){body:not(.workspace-embed) .contact-section{grid-column:1/-1}}

/* Event names grow with protocol features; reserve separate, wrapping cells. */
.event-row>span{min-width:0;line-height:1.5;overflow-wrap:anywhere}
.event-row>span:nth-child(3){max-width:24ch}
.event-row>span:first-child,.event-row>span:last-child{white-space:nowrap}
.event-row>span:last-child{text-align:right}
.events-header{gap:8px 16px;flex-wrap:wrap}
.events-header>span{min-width:0;max-width:100%;line-height:1.6;overflow-wrap:anywhere}

/* Scene setup uses the shared workspace palette and existing field styles. */
#map-dialog{width:640px;max-height:calc(100dvh - 32px);overflow:auto}
#map-dialog select{display:block;width:100%;margin-top:6px;padding:8px;min-width:0}
.scene-mode{display:block;font-size:12px;color:var(--muted);margin:16px 0}
#source-help{margin-bottom:0!important}
#workload-status{font-size:11px;line-height:1.7;overflow-wrap:anywhere;margin-bottom:20px}
@media(max-width:480px){#map-dialog .map-fields{grid-template-columns:1fr}}

#map-dialog [hidden]{display:none!important}

/* Optional local-map observer: shared by native and browser runtimes. */
[data-mapping-preset][hidden],[data-map-layer][hidden]{display:none}
.mapping-art{color:var(--mint);background:#263c38}
.map-free{background:#466b68}.map-occupied{background:#b79769}.map-unknown{background:#15202b;border:1px solid #637787}.map-route{background:#80dbc0}
#local-map-inspector dd{max-width:58%;overflow-wrap:anywhere}
#navigation-reason{overflow-wrap:anywhere}
@media(max-width:720px){.scenario-list:has([data-preset="mapping"]:not([hidden])){grid-template-columns:repeat(2,minmax(0,1fr))}}
