:root{--bg:#f2f2f7;--surface:#fff;--text:#1c1c1e;--muted:#6e6e73;--border:#d8d8dc;--accent:#0a66e0;--accent-text:#fff;--danger:#d92d20;--btn:#e9e9ee;--viewer-bg:#eef0f4;--label-bg:#ffffffd9;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#000;--surface:#1c1c1e;--text:#f2f2f7;--muted:#98989f;--border:#38383a;--accent:#3b8bff;--btn:#2c2c2e;--viewer-bg:#1a1b1f;--label-bg:#1c1c1ed9;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#000;--surface:#1c1c1e;--text:#f2f2f7;--muted:#98989f;--border:#38383a;--accent:#3b8bff;--btn:#2c2c2e;--viewer-bg:#1a1b1f;--label-bg:#1c1c1ed9;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;font:15px/1.4 -apple-system,BlinkMacSystemFont,PingFang HK,Noto Sans TC,Microsoft JhengHei,sans-serif}.app,.viewer{flex-direction:column;max-width:1100px;height:100%;margin:0 auto;display:flex}.viewer{max-width:none}.bar{padding:8px 16px;padding-top:max(8px, env(safe-area-inset-top));background:var(--surface);border-bottom:1px solid var(--border);grid-template-columns:1fr auto 1fr;align-items:center;display:grid}.bar h1{text-align:center;margin:0;font-size:17px;font-weight:600}.bar>:first-child{justify-self:start}.bar>:nth-child(3),.bar-right{justify-self:end;align-items:center;gap:4px;display:flex}.btn{font:inherit;cursor:pointer;background:var(--btn);color:var(--accent);border:0;border-radius:10px;padding:8px 14px}.btn:disabled{opacity:.4;cursor:not-allowed}.btn.primary{background:var(--accent);color:var(--accent-text);font-weight:600}.btn.ghost{background:0 0;padding:6px 8px}.btn.link{background:0 0;text-decoration:none}.btn.small{padding:5px 10px;font-size:13px}.btn.danger{color:var(--danger)}.btn.large{padding:12px 40px;font-size:17px}.menu{position:relative}.menu summary{font-size:20px;line-height:1;list-style:none}.menu summary::-webkit-details-marker{display:none}.menu-items{z-index:20;background:var(--surface);border:1px solid var(--border);border-radius:12px;flex-direction:column;min-width:160px;padding:6px;display:flex;position:absolute;top:100%;right:0;box-shadow:0 8px 24px #00000026}.menu-items button,.menu-items label{text-align:left;color:var(--text);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;align-items:center;gap:6px;padding:8px 10px;display:flex}.menu-items button:hover,.menu-items label:hover{background:var(--btn)}.empty{text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:14px;padding:16px;display:flex}.empty h2{margin:0;font-size:22px}.empty p{margin:0}.empty-icon{color:var(--muted);font-size:64px;line-height:1}.canvas-wrap{flex:1;min-height:0;padding:8px;position:relative}.editor{touch-action:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.editor .hit{cursor:pointer}.editor .handle{fill:#fff;cursor:grab}.room-label{fill:var(--text);pointer-events:none;paint-order:stroke;stroke:var(--label-bg);stroke-linejoin:round;font-weight:700}.overlay{background:#00000026;flex-direction:column;justify-content:center;align-items:center;gap:12px;font-weight:600;display:flex;position:absolute;inset:0}.spinner{border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;width:32px;height:32px;animation:.9s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.inspector{background:var(--surface);border-top:1px solid var(--border);flex-direction:column;justify-content:center;gap:8px;height:118px;padding:10px 16px;display:flex}.row{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.row input:not([type]),.row input[inputmode],.row select{min-width:0;font:inherit;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;flex:1;padding:7px 10px}.row select{flex:0 auto}.row input[type=range],.spacer{flex:1}.muted{color:var(--muted)}.center{text-align:center;margin:0}.footnote{color:var(--muted);margin:0;font-size:12px}.segmented{background:var(--btn);border-radius:9px;padding:2px;display:inline-flex}.segmented button{color:var(--text);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:7px;padding:5px 16px}.segmented button.on{background:var(--surface);font-weight:600;box-shadow:0 1px 3px #00000026}.actions{padding:10px 16px;padding-bottom:max(10px, env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border);align-items:center;gap:8px;display:flex}.split{display:inline-flex}.split .btn:first-child{border-radius:10px 0 0 10px}.split .btn:last-child{border-left:1px solid var(--border);border-radius:0 10px 10px 0;padding:8px 10px}.modal-backdrop{z-index:50;background:#00000059;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}@media (width>=640px){.modal-backdrop{align-items:center}}.modal{background:var(--bg);border-radius:16px 16px 0 0;width:100%;max-width:520px;max-height:90vh;overflow:auto}@media (width>=640px){.modal{border-radius:16px}}.modal .bar{border-radius:inherit;position:sticky;top:0}.modal-body{padding:8px 16px 24px}.modal-body h2{color:var(--muted);margin:18px 4px 6px;font-size:13px;font-weight:500}.group{background:var(--surface);border-radius:12px;flex-direction:column;gap:10px;padding:10px 12px;display:flex}.group .row>span:first-child{flex:1}.group .btn{align-self:flex-start}.warning{color:#8a4b00;background:#fff4e5;border-radius:10px;padding:10px 12px;font-size:13px}.alert{background:var(--surface);text-align:center;border-radius:14px;max-width:360px;margin:auto 16px;padding:18px}.alert h2{margin:0 0 6px;font-size:17px}.alert p{margin:0 0 14px}.toast{z-index:60;background:var(--text);color:var(--bg);border-radius:999px;padding:8px 16px;font-size:14px;position:fixed;bottom:90px;left:50%;transform:translate(-50%)}.viewer-canvas{background:var(--viewer-bg);flex:1;min-height:0}.viewer-canvas canvas{touch-action:none;display:block}.hint{background:var(--label-bg);color:var(--muted);white-space:nowrap;pointer-events:none;border-radius:999px;padding:6px 12px;font-size:12px;position:fixed;bottom:16px;left:50%;transform:translate(-50%)}
