*{box-sizing:border-box}html,body{margin:0}body{font-family:-apple-system,system-ui,"Segoe UI",Roboto,sans-serif;background:#f3f3f1;color:#222;-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer}a{color:#1971c2}
header{position:sticky;top:0;z-index:10;background:#fff;border-bottom:1px solid #ddd;padding:8px 10px calc(6px);padding-top:calc(env(safe-area-inset-top) + 8px)}
.top{display:flex;align-items:center;gap:6px}.top h1{font-size:16px;margin:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.btn{border:1px solid #ccc;background:#fafafa;border-radius:9px;padding:7px 10px;font-size:14px;color:#222}.btn.pri{background:#1971c2;color:#fff;border-color:#1971c2}.btn.danger{color:#c92a2a;border-color:#e3a5a5}
.btn.on{background:#fff3bf;border-color:#f2c94c}
.chips{display:flex;gap:6px;overflow-x:auto;padding:8px 0 2px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;display:flex;align-items:center;gap:5px;border:1px solid #ccc;border-radius:999px;padding:5px 10px;font-size:13px;background:#fff;user-select:none}
.chip input{margin:0;width:15px;height:15px}.chip .sw{width:10px;height:10px;border-radius:50%;display:inline-block}
.banner{background:#fff3bf;border-bottom:1px solid #f2c94c;font-size:13px;padding:6px 12px;display:none}.banner.show{display:block}
.banner.guest{background:#e7f5ff;border-color:#a5d8ff}
#hint{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 14px);z-index:15;background:#222;color:#fff;padding:9px 14px;border-radius:999px;font-size:14px;display:none}
#planscroll{overflow:auto;max-width:100%;-webkit-overflow-scrolling:touch}
#plan{position:relative;width:100%;max-width:640px;margin:8px auto;background:#fff;border-radius:10px;box-shadow:0 1px 4px #0002}
#plan.z2{width:170%;max-width:none}#plan.z3{width:260%;max-width:none}
#plan img{display:block;width:100%;height:auto;border-radius:10px}#plan svg{position:absolute;inset:0;width:100%;height:100%}
#plan.picking svg{cursor:crosshair}
.zoom{position:fixed;right:10px;bottom:calc(env(safe-area-inset-bottom) + 64px);z-index:12;display:flex;flex-direction:column;gap:6px}
.zoom button{width:42px;height:42px;border-radius:50%;border:1px solid #ccc;background:#fff;font-size:20px;box-shadow:0 1px 4px #0003}
svg .blind{stroke:#7048e8;stroke-linecap:round;cursor:pointer}svg .blind.empty{stroke-dasharray:1 0;opacity:.85}
svg .blindhit{stroke:transparent;cursor:pointer}svg text{font-family:inherit;paint-order:stroke;stroke:#fff;stroke-linejoin:round;pointer-events:none}
svg .ph circle{fill:#e8590c;stroke:#fff}svg .ph.med circle{fill:#1c7ed6}svg .ph.low circle{fill:#868e96}svg .ph text{fill:#fff;stroke:none;font-weight:700}
svg .lt circle{fill:#ffd43b;stroke:#7a5c00}svg .lt.estimate circle{fill:#fff3bf;stroke-dasharray:3 2}
svg .pin path{stroke:#fff}svg .pin.sel path{stroke:#fab005}
svg g{cursor:pointer}
#legend{max-width:640px;margin:0 auto;padding:0 12px;font-size:12px;color:#555}
#list{max-width:640px;margin:10px auto 20px;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;padding:0 12px}
.card{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 1px 3px #0002;border:0;padding:0;text-align:left}.card img{width:100%;display:block;aspect-ratio:2/1;object-fit:cover}
.card div{padding:6px 8px;font-size:12px}.card b{display:block;font-size:13px}
h2.sec{max-width:640px;margin:18px auto 0;padding:0 12px;font-size:15px}
footer{text-align:center;font-size:13px;color:#666;padding:18px 12px calc(env(safe-area-inset-bottom) + 70px)}
.modal{position:fixed;inset:0;z-index:40;background:#0007;display:none;align-items:flex-end;justify-content:center}.modal.on{display:flex}
.sheet{background:#fff;width:100%;max-width:560px;max-height:88vh;overflow:auto;border-radius:16px 16px 0 0;padding:16px 16px calc(env(safe-area-inset-bottom) + 16px)}
@media(min-width:700px){.modal{align-items:center}.sheet{border-radius:16px}}
.sheet h3{margin:0 0 10px;font-size:17px}.sheet label{display:block;font-size:13px;color:#555;margin:10px 0 4px}
.sheet input[type=text],.sheet input[type=date],.sheet select,.sheet textarea{width:100%;font:inherit;font-size:16px;padding:9px;border:1px solid #ccc;border-radius:8px}
.sheet textarea{min-height:80px}.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.row .btn{flex:1}
.sheet img.pinphoto{max-width:100%;border-radius:8px;margin-top:8px}.muted{color:#666;font-size:13px}
.sharelist{list-style:none;padding:0;margin:8px 0}.sharelist li{border:1px solid #e5e5e5;border-radius:8px;padding:8px;margin:6px 0;font-size:13px}
.sharelist code{word-break:break-all;font-size:12px}.checks{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px}.checks label{margin:2px 0;color:#222;font-size:14px}
#pv{position:fixed;inset:0;z-index:30;background:#000;display:none}#pv.on{display:block}#pano{position:absolute;inset:0}
#bar{position:absolute;left:0;right:0;top:0;z-index:31;display:flex;gap:8px;align-items:center;padding:calc(env(safe-area-inset-top) + 8px) 10px 10px;background:linear-gradient(#000b,#0000);color:#fff}
#bar .t{flex:1;font-size:14px;line-height:1.25}#bar .t small{opacity:.75}#bar button{background:#fff2;color:#fff;border:1px solid #fff6;border-radius:8px;padding:8px 13px;font-size:17px}
#mini{position:absolute;right:10px;bottom:calc(env(safe-area-inset-bottom) + 10px);z-index:31;width:104px;background:#fffe;border-radius:8px;overflow:hidden;box-shadow:0 1px 6px #0008}
#mini img{width:100%;display:block}#mini svg{position:absolute;inset:0;width:100%;height:100%}
body.login{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:20px}
.card-login{background:#fff;padding:24px;border-radius:14px;box-shadow:0 2px 10px #0002;width:100%;max-width:340px}.card-login h1{margin:0 0 6px;font-size:20px}
.card-login input{width:100%;font-size:16px;padding:11px;border:1px solid #ccc;border-radius:8px;margin:10px 0}.card-login button{width:100%;padding:11px;font-size:16px;border:0;border-radius:8px;background:#1971c2;color:#fff}
.msg{color:#c92a2a;font-size:14px;min-height:1em}body.login footer{padding:16px}
