:root{--bg:#f6f6f3;--paper:#fcfcfa;--ink:#1f1f1d;--mute:#85857f;--line:#cfcfc8;--blue:#2457c5;--blue-bg:#eef2fb}
[hidden]{display:none!important}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--bg);color:var(--ink);
 font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif}
html,body{height:100%}
main{max-width:520px;margin:0 auto;height:100vh;height:100dvh;display:flex;flex-direction:column;padding:max(10px,env(safe-area-inset-top)) 14px max(10px,env(safe-area-inset-bottom))}
header{text-align:center;margin-bottom:6px;flex:none}
h1{font-size:18px;font-weight:700;letter-spacing:.03em;margin:0 0 2px}
.sub{margin:0;color:var(--mute);font-size:13px}
.badge{display:inline-block;margin-top:5px;padding:1px 12px;border:1px solid var(--blue);color:var(--blue);border-radius:999px;font-size:12px}
.tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px;flex:none}
.hint{font-size:11px;color:var(--blue);line-height:1.35;flex:1}
.btns{display:flex;gap:8px}
button{font:inherit;font-size:15px;min-height:44px;padding:0 16px;border-radius:8px;cursor:pointer;border:1px solid var(--line);background:#fff;color:var(--ink)}
button.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
svg#plan{display:block;flex:1 1 0;min-height:0;width:100%;touch-action:pan-y;user-select:none;-webkit-user-select:none;background:var(--paper);border:1px solid #e4e4de;border-radius:12px}
.wall{fill:none;stroke:#8d8d86;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.line{fill:none;stroke:var(--line);stroke-width:1}
.dash{stroke-dasharray:4 4}
.solid{stroke:#9d9d96;stroke-width:1.4}
.lbl{fill:#a5a59e;font-size:11px;letter-spacing:.08em}
.actions{margin-top:2px}
.actions button{flex:1;min-height:44px}
.zone rect{fill:none;stroke:var(--line);stroke-width:1}
.zone rect.dash{stroke-dasharray:4 4}
.zone rect.noline{stroke:none}
.zone path{fill:none;pointer-events:none;stroke-linecap:round}
.zone .edge-solid{stroke:#9d9d96;stroke-width:1.4}
.zone .edge-dash{stroke:#9d9d96;stroke-width:1.4;stroke-dasharray:4 4}
.zone.sel-edit path{stroke:var(--blue)}
.zone text{pointer-events:none}
.zone{pointer-events:none}
body.edit .zone{pointer-events:all}
body.edit .zone rect{fill:rgba(255,255,255,.01)}
.zone.sel-edit rect{stroke:var(--blue);stroke-width:1.6}
.seat.sel-edit rect{stroke-width:2.2;fill:var(--blue-bg)}
.handle{cursor:nwse-resize;touch-action:none}
.handle .hit{fill:transparent}
.handle .dot{fill:#fff;stroke:var(--blue);stroke-width:2}
.seat rect{fill:#fff;stroke:#b9b9b2;stroke-width:1;transition:fill .12s}
.seat text{fill:var(--ink);font-size:15px;font-weight:600;pointer-events:none}
.seat text.cap{font-size:11px;font-weight:400;fill:var(--mute)}
.seat{cursor:pointer;outline:none}
.seat:hover rect{stroke:var(--ink)}
.seat.sel rect{fill:var(--ink);stroke:var(--ink)}
.seat.sel text{fill:#fff}
.seat.sel text.cap{fill:#cfcfc8}
.seat:focus-visible rect{stroke:var(--ink);stroke-width:2}
body.edit .seat{cursor:grab;touch-action:none}
body.edit .seat rect{stroke:var(--blue)}
body.edit .zone text{fill:#8a8a84}
.seat.drag{cursor:grabbing}
.seat.drag rect{fill:var(--blue-bg);stroke-width:1.8;stroke-dasharray:4 3}
body.edit .seat.bad rect{stroke:#c0594a;fill:#fbeeec}
.foot{flex:none;padding-top:6px}
.note{text-align:center;font-size:11px;color:var(--blue);margin:0 0 3px;line-height:1.3}
.note.small{color:var(--mute)}
.cta{display:block;width:100%;min-height:48px;margin-top:5px;background:var(--ink);color:#fff;border-color:var(--ink);font-weight:600;border-radius:10px}
.cta[hidden]{display:none}
.toast{position:fixed;left:50%;top:max(8px,env(safe-area-inset-top));transform:translate(-50%,-12px);opacity:0;pointer-events:none;
 background:#fff;color:var(--ink);border:1px solid var(--ink);font-weight:600;padding:11px 20px;border-radius:10px;font-size:15px;transition:.18s;max-width:90vw;text-align:center;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.toast.show{opacity:1;transform:translate(-50%,0)}
.modal{position:fixed;inset:0;background:rgba(30,30,28,.35);display:flex;align-items:center;justify-content:center;padding:20px}
.modal[hidden]{display:none}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;width:100%;max-width:280px}
.card label{display:block;font-size:13px;color:var(--mute);margin-bottom:8px}
.card input{width:100%;font:inherit;font-size:20px;padding:10px 12px;background:#fff;color:var(--ink);border:1px solid var(--blue);border-radius:8px;text-transform:uppercase}
.err{min-height:18px;color:#c0594a;font-size:12px;margin:6px 0}
.card .btns{justify-content:flex-end}
@media(min-width:700px){main{padding-top:36px}}
