/* 현장 전환, 도면 확대/이동, 푸터, /demo */
:root{--paper:#fbfaf6;--dline:#23221e;--dink:#1c1b18;--dgray:#625f56;--zy:#e5a800;--zr:#c62828;--dgreen:#1f7a3f}
:root[data-theme=dark]{--paper:#16171a;--dline:#d8d5ca;--dink:#f1efe8;--dgray:#a9a69b;--zy:#ffb800;--zr:#ff7a6b;--dgreen:#4cb26e}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--paper:#16171a;--dline:#d8d5ca;--dink:#f1efe8;--dgray:#a9a69b;--zy:#ffb800;--zr:#ff7a6b;--dgreen:#4cb26e}}
.scenes{display:flex;gap:6px;overflow-x:auto;padding:6px 12px;background:var(--surface);border-bottom:1px solid var(--line);scrollbar-width:thin}
.sc{flex:none;min-height:44px;padding:4px 14px;background:var(--surface);border:1px solid var(--line);cursor:pointer;font-weight:600;font-size:14px;white-space:nowrap}
.sc.on{background:var(--ink);color:var(--surface);border-color:var(--ink)}
.foot{padding:4px 12px calc(4px + env(safe-area-inset-bottom));font-size:12px;color:var(--ink2);background:var(--surface);border-top:1px solid var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.foot a{color:var(--accent-text);text-underline-offset:2px}
.figwrap{position:relative;margin-bottom:6px}
.fig{position:relative;overflow:hidden;aspect-ratio:841/594;background:var(--paper);border:1px solid var(--line);touch-action:none;cursor:grab;user-select:none}
.zi{transform-origin:0 0;width:100%;height:100%}.zi svg{width:100%;height:100%;display:block}
.zc{display:flex;justify-content:flex-end;gap:4px;margin-top:4px}
@media(min-width:900px){.sheet{width:460px}}.sheet.wide{inset:0;width:auto;max-height:none;border:0}.sheet.wide .fig{aspect-ratio:auto;height:min(62vh,calc(100vw * .7))}
.dwg .paper{fill:var(--paper);stroke:none}
.dwg .dl{fill:none;stroke:var(--dline);stroke-width:1.3}.dwg .dl.thick{stroke-width:2.4}.dwg .dt{fill:none;stroke:var(--dline);stroke-width:.7}
.dwg .bg{fill:var(--paper)}.dwg .fillk{fill:var(--dline)}.dwg .fillnone{fill:none}
.dwg .dh{stroke:var(--dline);stroke-width:.6;fill:none}.dwg .dhf{fill:var(--dline)}.dwg .zy{fill:var(--zy)}.dwg .zr{fill:var(--zr)}.dwg .dr2{stroke:var(--zr);stroke-width:1.2}.dwg .mk{fill:var(--dline)}
.dwg .t{fill:var(--dink);font:500 11px var(--font)}.dwg .t.sm{font-size:9px}.dwg .t.b{font-weight:700}.dwg .t.g{fill:var(--dgray)}.dwg .t.r{fill:var(--zr);font-weight:700}
.dwg .ax{stroke:var(--dline);stroke-width:.6;stroke-dasharray:10 2 2 2;fill:none}.dwg .dash{stroke-dasharray:6 3}.dwg .dash2{stroke-dasharray:3 2}.dwg .dot{stroke-dasharray:1.5 2.5}.dwg .dashdot{stroke-dasharray:8 2 2 2}
.dwg .fk{stroke:var(--zy);stroke-width:4;fill:none}.dwg .wk{stroke:var(--dgreen);stroke-width:2;stroke-dasharray:4 3;fill:none}.dwg .gr{fill:var(--dgreen);stroke:none}.dwg .wh{stroke:#fff;stroke-width:1.8;fill:none}
.dwg .you{fill:var(--accent);stroke:var(--dline);stroke-width:1.5}.dwg .you.pulse{fill:none;stroke:var(--zr);stroke-width:2;transform-box:fill-box;transform-origin:center;animation:pl 1.6s ease-out infinite}
.dwg .zy2{fill:var(--zy);stroke:var(--dline);stroke-width:1}.dwg .fov{fill:var(--zy);opacity:.2;stroke:none}
.names li.f{border-color:var(--ok);color:var(--ok)}
.btn .wave{display:inline-block;width:20px;height:14px;margin-right:8px;vertical-align:-2px;position:relative}.wave i{position:absolute;left:50%;bottom:0;border:2px solid currentColor;border-bottom:0;border-radius:20px 20px 0 0;transform:translateX(-50%);opacity:.35}
.wave i:nth-child(1){width:8px;height:5px}.wave i:nth-child(2){width:15px;height:9px}.wave i:nth-child(3){width:22px;height:13px}
.btn.sent .wave i{animation:wv 1.2s ease-out 2}@keyframes wv{0%{opacity:.1}40%{opacity:1}100%{opacity:.1}}
.embed .top{min-height:44px;padding:2px 8px}.embed .brand img,.embed .tag{display:none}.embed .brand h1{font-size:14px}.embed .foot,.embed .scenes{display:none}.embed .top .ib{width:44px}
/* /demo */
.demo{min-height:100%;overflow:auto}.demo-wrap{max-width:1280px;margin:0 auto;padding:16px 16px 40px;display:grid;gap:16px}
.demo header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}.demo h1{font-size:22px;line-height:1.25}.demo .lead{color:var(--ink2);max-width:62ch}
.pair{display:grid;grid-template-columns:1fr 64px 1fr;gap:8px;align-items:start;justify-items:center}
.phone{width:min(100%,380px);border:1px solid var(--ink);background:var(--surface);padding:10px 8px 14px;display:grid;gap:6px}.phone h2{font-size:13px;text-align:center;color:var(--ink2)}
.phone iframe{width:100%;height:min(74vh,700px);min-height:520px;border:1px solid var(--line);background:var(--bg);display:block}
.link{display:grid;place-items:center;align-self:center;position:relative;width:64px;height:140px}.link .ring{position:absolute;left:50%;top:50%;width:14px;height:14px;border:2px solid var(--accent-text);border-radius:50%;transform:translate(-50%,-50%);opacity:0}
.link.go .ring{animation:rg 1.4s ease-out 3}.link .ring:nth-child(2){animation-delay:.3s!important}.link .ring:nth-child(3){animation-delay:.6s!important}
@keyframes rg{0%{opacity:.9;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(4.5)}}
.link b{font:700 11px var(--mono);color:var(--ink2);text-align:center;line-height:1.3}
.logbox{border:1px solid var(--line);background:var(--surface)}.logbox h2{font-size:14px;padding:8px 12px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:8px}
.log{list-style:none;margin:0;padding:0;max-height:210px;overflow:auto;font:12.5px/1.5 var(--mono)}.log li{padding:4px 12px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:78px 62px 1fr;gap:8px}
.log time{color:var(--ink2)}.log .k{font-weight:700}.k.adm{color:var(--accent-text)}.k.wrk{color:var(--ok)}
.qrs{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.qr{border:1px solid var(--line);background:var(--surface);padding:12px;display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center}
.qr svg{width:132px;height:132px;display:block;background:#fff}.qr h3{font-size:15px;margin-bottom:4px}.qr p{font-size:13px;color:var(--ink2);word-break:break-all}.qr a{color:var(--accent-text)}
.demo .row{margin-top:0}
@media(max-width:900px){.pair{grid-template-columns:1fr;justify-items:center}.link{width:100%;height:56px}.phone iframe{height:70vh}}
body.demo{height:auto;min-height:100%}

.embed .sheet{max-height:50%}.embed .side{max-height:42%}.phone iframe{height:min(82vh,780px)}
.embed .sh-b{padding-top:6px}
