:root{color-scheme:dark;--void:#05090d;--field:#081219;--panel:#0b171d;--rule:#263b42;--text:#dce7e5;--muted:#92a8a8;--orange:#ff5428;--cyan:#58ddd0;--amber:#ffb52e;--mono:ui-monospace,'Cascadia Code','Segoe UI Mono',monospace;--sans:system-ui,-apple-system,'Segoe UI',sans-serif}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{min-width:320px;background:var(--void)}
body{margin:0;color:var(--text);font:16px/1.5 var(--sans);background:radial-gradient(ellipse at 78% 0%,#0c1b22 0,transparent 42%),var(--void);min-height:100vh}
button,input,select{font:inherit}
button,select,input{color:inherit}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
.site-header{height:66px;border-bottom:1px solid var(--rule);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,76px)}
.brand{color:var(--text);text-decoration:none;display:flex;align-items:center;gap:11px;font:600 13px var(--mono);letter-spacing:.12em}
.brand b{color:var(--muted);font-weight:400}.brand-mark{width:25px;height:25px;fill:none;stroke:var(--orange);stroke-width:2}
.header-note,.section-index,.panel-heading,.panel-number,.panel-heading-inline,.map-legend,.floor-picker,footer,.range-label output{font:500 11px var(--mono);letter-spacing:.1em;color:var(--muted)}
main{width:min(1320px,calc(100% - 48px));margin:0 auto}
.intro{display:flex;align-items:center;justify-content:space-between;padding:48px 0 35px;border-bottom:1px solid var(--rule)}
.section-index{color:var(--orange);margin:0 0 10px}
h1{font-size:clamp(28px,4vw,43px);letter-spacing:-.045em;line-height:1.12;margin:0;font-weight:600}
.intro-copy{color:var(--muted);max-width:600px;margin:14px 0 0;font-size:15px}
.device-mark{width:104px;height:64px;display:flex;align-items:end;gap:5px;border-bottom:1px solid #31615c;padding:0 10px 8px;transform:skewY(-8deg)}
.device-mark span{flex:1;background:var(--cyan);height:var(--h,28%);opacity:.84;box-shadow:0 0 9px #58ddd04a}.device-mark span:nth-child(2n){--h:55%}.device-mark span:nth-child(3n){--h:82%}.device-mark span:nth-child(4n){--h:38%}
.workspace{display:grid;grid-template-columns:294px minmax(0,1fr);gap:26px;padding:26px 0 20px}
.controls{background:linear-gradient(145deg,#0a151a,#081015);border:1px solid var(--rule);padding:0 19px 17px;align-self:start}
.panel-heading{display:flex;justify-content:space-between;border-bottom:1px solid var(--rule);padding:15px 0 13px;color:var(--cyan)}
.panel-number{color:#577077}
form{padding-top:8px}.field{display:flex;flex-direction:column;gap:7px;margin:13px 0;color:var(--muted);font-size:13px}
.field select,.field input:not([type=range]),.floor-picker select{height:39px;border:1px solid #334950;border-radius:1px;background:#071015;padding:0 10px;color:var(--text);width:100%;font:13px var(--mono)}
.field select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#88a3a3 50%),linear-gradient(135deg,#88a3a3 50%,transparent 50%);background-position:calc(100% - 15px) 16px,calc(100% - 10px) 16px;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field input[type=number]{appearance:textfield}.field input::-webkit-inner-spin-button{appearance:none}
.toggle-field{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px;margin:14px 0}.toggle-field input{width:15px;height:15px;margin:0;accent-color:var(--cyan)}
.range-label{display:flex;justify-content:space-between}.range-label output{color:var(--cyan)}
input[type=range]{accent-color:var(--cyan);height:17px;margin:1px 0}
.form-hint{font:11px/1.55 var(--mono);color:#769093;margin:11px 0 16px}
.primary-button{width:100%;height:45px;background:var(--orange);border:1px solid #ff754f;color:#190b06;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:space-between;padding:0 13px;cursor:pointer}
.primary-button:hover{background:#ff7048}.primary-button:disabled{opacity:.65;cursor:progress}
.local-note{border-top:1px solid var(--rule);margin-top:16px;padding-top:13px;display:flex;align-items:flex-start;gap:9px;color:var(--muted);font-size:11px;line-height:1.45}
.live-dot{width:7px;height:7px;flex:none;border-radius:50%;margin-top:4px;background:var(--cyan);box-shadow:0 0 8px #58ddd099}
.output{min-width:0}.map-toolbar{height:42px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.panel-heading-inline{color:var(--cyan)}.map-summary{color:var(--muted);font:12px var(--mono);margin-left:14px}
.toolbar-actions{display:flex;align-items:center;gap:12px}.quiet-button{border:1px solid #385059;background:#0a151a;color:var(--text);font:11px var(--mono);padding:8px 11px;cursor:pointer}.quiet-button:hover:not(:disabled){border-color:var(--cyan);color:var(--cyan)}.quiet-button:disabled{opacity:.4;cursor:not-allowed}
.floor-picker{display:flex;align-items:center;gap:8px}.floor-picker select{width:auto;height:32px;padding:0 23px 0 8px;background-color:#071015}
.map-frame{position:relative;min-height:420px;height:min(55vw,610px);max-height:610px;display:flex;align-items:center;justify-content:center;overflow:auto;border:1px solid #263b42;background-color:#050b0f;background-image:linear-gradient(#11212655 1px,transparent 1px),linear-gradient(90deg,#11212655 1px,transparent 1px);background-size:24px 24px}
.map-frame::before,.map-frame::after{content:"";position:absolute;width:12px;height:12px;pointer-events:none;border-color:var(--orange);border-style:solid;opacity:.75}.map-frame::before{top:7px;left:7px;border-width:1px 0 0 1px}.map-frame::after{bottom:7px;right:7px;border-width:0 1px 1px 0}
canvas{display:block;max-width:calc(100% - 32px);max-height:calc(100% - 32px);image-rendering:pixelated}
.map-empty{color:#779091;text-align:center;font:12px var(--mono)}.map-empty p{margin:12px 0 0}.empty-glyph{font:44px/1 var(--sans);color:#315354;text-shadow:0 0 20px #58ddd02d}
.map-legend{min-height:40px;display:flex;align-items:center;gap:19px;border-bottom:1px solid var(--rule);font-size:10px}.map-legend span{display:inline-flex;align-items:center;gap:7px}.map-legend #map-size{margin-left:auto;color:#729092}
.map-legend i{width:9px;height:9px;display:inline-block}.key-floor{background:var(--cyan)}.key-wall{border:1px solid #33464b;background:#111c20}.key-special{background:var(--orange)}
.json-panel{margin-top:17px;border:1px solid var(--rule);background:#081116}.json-panel summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;padding:12px 14px;color:var(--cyan);font:11px var(--mono);letter-spacing:.09em}.json-panel summary::-webkit-details-marker{display:none}.json-panel summary::after{content:"+";color:var(--muted)}.json-panel[open] summary::after{content:"−"}
#json-size{color:var(--muted);letter-spacing:0}.json-actions{display:flex;justify-content:flex-end;padding:0 14px 8px}pre{overflow:auto;max-height:260px;margin:0;padding:12px 14px;border-top:1px solid var(--rule);color:#9bb3af;font:11px/1.55 var(--mono);white-space:pre}
.error-message{padding:9px 12px;border-left:2px solid #f16f65;background:#251312;color:#ffd0c8;font-size:13px}
.format-note{display:grid;grid-template-columns:150px 1fr;border-top:1px solid var(--rule);padding:18px 0 32px;gap:10px}.format-note .section-index{margin:0}.format-note p{margin:0;color:var(--muted);font-size:13px;max-width:720px}
footer{border-top:1px solid var(--rule);min-height:54px;padding:15px clamp(20px,5vw,76px);display:flex;justify-content:space-between;font-size:10px}
@media(max-width:820px){main{width:min(100% - 32px,700px)}.workspace{grid-template-columns:1fr;gap:22px}.controls{width:100%}.map-frame{height:60vw;min-height:320px;max-height:520px}.intro{padding-top:35px}.device-mark{width:80px}}
@media(max-width:520px){.site-header{height:58px;padding:0 16px}.header-note{font-size:9px}main{width:calc(100% - 28px)}.intro{padding:30px 0 24px}.intro-copy{font-size:14px}.device-mark{width:52px;height:45px;margin-left:12px;flex:none}.workspace{padding-top:17px}.map-toolbar{height:auto;min-height:42px;align-items:flex-start}.map-summary{display:block;margin:4px 0 0;font-size:10px}.toolbar-actions{gap:6px;flex-wrap:wrap;justify-content:flex-end}.quiet-button{padding:7px 8px;font-size:10px}.map-frame{min-height:290px;height:76vw}.map-legend{gap:10px;font-size:8px;flex-wrap:wrap;padding:8px 0}.map-legend i{width:7px;height:7px}.map-legend #map-size{width:100%;margin:0}.format-note{grid-template-columns:1fr;gap:7px;padding-bottom:25px}footer{padding:12px 14px;font-size:8px;gap:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
