/* base reset (standalone) */
*,*::before,*::after{box-sizing:border-box}
html{color-scheme:light;-webkit-text-size-adjust:100%}
:root{padding-bottom:env(safe-area-inset-bottom,0px)}
/* --sat: room to leave at the top for the iPhone/iPad status bar in the home-screen app, plus the blur iOS draws below it
   (up to 44px more; the extra is never more than the status bar itself, so it's 0 in Safari and on computers) */
:root{--sat:calc(env(safe-area-inset-top,0px) + min(44px, env(safe-area-inset-top,0px)))}
body{margin:0;font:14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif}
img{max-width:100%}
[hidden]{display:none!important}

/* Layout: full-height field tool. Plan canvas left, keypad editor right (bottom sheet on phones). */
:root{
  --brand:#002E5D; --navy:#002E5D; --navy-2:#0d4a87; --ink:#16212e; --muted:#5d6b7b; --line:#d6dde6;
  --bg:#eef2f6; --surface:#ffffff; --surface-2:#f6f8fb; --plan-bg:#ffffff;
  --todo:#ffffff; --review:#e8a33a; --done:#2f9e6a; --warn:#c2412d; --focus:#2b7bd6;
  --f-ui:"Public Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-eng:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,Menlo,monospace;
  --img-filter:none;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --navy:#7fb2ea; --navy-2:#a9cbf2; --ink:#e6ecf3; --muted:#9aa8b8; --line:#2c3a4b;
  --bg:#0f1720; --surface:#16212d; --surface-2:#1c2937; --plan-bg:#e9edf1;
  --todo:#16212d; --review:#e8a33a; --done:#3cb37c; --warn:#ff4d4d; --focus:#6aa8f0;
  --img-filter:brightness(.92); color-scheme:dark}}
:root[data-theme="dark"]{
  --navy:#7fb2ea; --navy-2:#a9cbf2; --ink:#e6ecf3; --muted:#9aa8b8; --line:#2c3a4b;
  --bg:#0f1720; --surface:#16212d; --surface-2:#1c2937; --plan-bg:#e9edf1;
  --todo:#16212d; --review:#e8a33a; --done:#3cb37c; --warn:#ff4d4d; --focus:#6aa8f0;
  --img-filter:brightness(.92); color-scheme:dark}
html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--f-ui);font-size:14px;overflow:hidden}
*{box-sizing:border-box}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.app{height:100%;display:flex;flex-direction:column}
.bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding-block:10px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));background:var(--surface);border-bottom:1px solid var(--line)}
.brand{display:flex;flex-direction:column;line-height:1.15;margin-right:auto;min-width:0}
.brand b{font-size:15px;letter-spacing:.01em}
.brand span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface-2)}
.seg button{border:0;background:transparent;padding:7px 12px;cursor:pointer;font-weight:500;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--navy);color:var(--surface)}
:root[data-theme="dark"] .seg button[aria-pressed="true"]{color:#0f1720}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .seg button[aria-pressed="true"]{color:#0f1720}}
.btn{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:7px 12px;cursor:pointer;font-weight:500}
.btn:hover{border-color:var(--navy)}
.btn.primary{background:var(--navy);border-color:var(--navy);color:var(--surface)}
.btn.small{padding:4px 9px;font-size:12.5px}
.btn.danger{color:var(--warn)}
.pill{font-size:12px;padding:4px 9px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);color:var(--muted);white-space:nowrap}
.pill.ok{color:var(--done)} .pill.bad{color:var(--warn)}
.progress{font-variant-numeric:tabular-nums;font-size:12.5px;color:var(--muted);white-space:nowrap}
.progress b{color:var(--ink)}
.work{flex:1;min-height:0;display:flex}
.planwrap{position:relative;flex:1;min-width:0;background:var(--plan-bg);overflow:hidden;touch-action:none}
#plan{width:100%;height:100%;display:block;cursor:grab;user-select:none;-webkit-user-select:none}
#plan.placing{cursor:crosshair}
#plan image{filter:var(--img-filter)}
.zoom{position:absolute;right:calc(12px + env(safe-area-inset-right,0px));bottom:12px;display:flex;flex-direction:column;gap:6px}
.zoom button{width:38px;height:38px;border-radius:8px;border:1px solid #c9d2dc;background:#fff;color:#16212e;font-size:18px;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.legend{position:absolute;left:calc(12px + env(safe-area-inset-left,0px));bottom:12px;background:rgba(255,255,255,.94);color:#16212e;border:1px solid #c9d2dc;border-radius:8px;padding:8px 10px;font-size:11.5px;display:flex;flex-direction:column;gap:4px;max-width:calc(100% - 90px)}
.legend i{display:inline-block;width:10px;height:12px;border-radius:2px;border:1.5px solid #002E5D;vertical-align:-2px;margin-right:6px}
.legend .dot{width:16px;height:8px;border-radius:2px;border:1px dashed #6b7888;background:#fff}
.legend .dot.on{background:rgba(0,46,93,.15);border:1px solid #002E5D}
.banner{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#16212e;color:#fff;padding:8px 14px;border-radius:8px;font-size:13px;display:flex;gap:10px;align-items:center;box-shadow:0 4px 16px rgba(0,0,0,.25);max-width:calc(100% - 32px)}
.stalebar{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:60;background:#16212e;color:#fff;padding:10px 12px 10px 16px;border-radius:12px;font-size:13.5px;line-height:1.35;display:flex;gap:10px;align-items:center;box-shadow:0 6px 24px rgba(0,0,0,.3);width:max-content;max-width:calc(100% - 32px)}
.stalebar span{flex:1 1 auto;min-width:0}.stalebar .btn{flex:none}.stalebar .btn.primary{background:#fff;color:#16212e;border-color:#fff}.stalebar .btn:not(.primary){background:transparent;color:#fff;border:1px solid rgba(255,255,255,.45)}
@media (max-width:760px){ .stalebar{flex-wrap:wrap;width:auto;left:16px;right:16px;transform:none}.stalebar span{flex-basis:100%} }
.banner button{background:transparent;border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:6px;padding:3px 8px;cursor:pointer}
/* plan svg */
.kp rect.body{stroke:#002E5D;stroke-width:1.1;fill:#fff}
.kp.review rect.body{fill:#e8a33a}
.kp.done rect.body{fill:#2f9e6a;stroke:#1d6b47}
.kp text{font-family:var(--f-ui);font-weight:700;font-size:5.4px;fill:#002E5D;paint-order:stroke;stroke:#fff;stroke-width:1.6px}
.kp .sel{fill:none;stroke:#2b7bd6;stroke-width:1.4;opacity:0}
.kp.selected .sel{opacity:1}
.kp{cursor:pointer}
.kp.dim{opacity:.45}
.load{cursor:pointer}
.load rect.mk{fill:transparent;stroke:#8795a5;stroke-width:.5;stroke-dasharray:1.2 .8}
.load.used rect.mk{fill:#002E5D;fill-opacity:.13;stroke:#002E5D;stroke-width:.7;stroke-dasharray:none}
.load text{font-family:var(--f-ui);font-weight:700;font-size:4.2px;pointer-events:none}
.ring{fill:none;stroke-width:1.2;animation:pulse 1.6s ease-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes pulse{0%{opacity:.9;transform:scale(.6)}100%{opacity:0;transform:scale(2.2)}}
@media (prefers-reduced-motion:reduce){.ring{animation:none;opacity:.6}}
/* panel */
.panel{width:430px;flex:none;background:var(--surface);border-left:1px solid var(--line);overflow-y:auto;overscroll-behavior:contain}
.pin{padding:16px 18px 28px;display:flex;flex-direction:column;gap:16px}
.ph{display:flex;align-items:flex-start;gap:10px}
.ph h2{margin:0;font-size:19px;font-family:var(--f-mono);font-weight:500;letter-spacing:.02em}
.ph .sub{font-size:12px;color:var(--muted);margin-top:2px}
.ph .x{margin-left:auto}
label.f{display:flex;flex-direction:column;gap:5px;font-size:11.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
label.f input,label.f select,label.f textarea{text-transform:none;letter-spacing:0;font-weight:400;font-size:14px;color:var(--ink);background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:8px 10px;width:100%}
textarea{resize:vertical}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.row>*{flex:1;min-width:120px}
.sect{border-top:1px solid var(--line);padding-top:14px;display:flex;flex-direction:column;gap:12px}
.sect h3{margin:0;font-size:11.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);display:flex;align-items:center;gap:8px}
.sect h3 .units{margin-left:auto;font-family:var(--f-mono);font-weight:500;text-transform:none;letter-spacing:0}
.units.bad{color:var(--warn)}
.presets{display:flex;flex-wrap:wrap;gap:6px}
.presets button{border:1px solid var(--line);background:var(--surface-2);border-radius:6px;padding:4px;cursor:pointer;line-height:0}
.presets button:hover{border-color:var(--navy)}
.presets svg rect{fill:var(--surface);stroke:var(--muted);stroke-width:1}
.facewrap{display:flex;gap:18px;align-items:flex-start}
.face{width:132px;flex:none;border-radius:10px;padding:13px 12px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.12)}
.stack{display:grid;grid-template-rows:repeat(6,34px);gap:3px}
.stack.over{grid-template-rows:none;grid-auto-rows:34px}
.kbtn{border-radius:4px;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;text-align:center;padding:2px 5px;font-family:var(--f-eng);font-weight:600;font-size:11px;line-height:1.1;letter-spacing:.04em;white-space:pre-line;overflow:hidden;position:relative;box-shadow:inset 0 0 0 1px rgba(0,0,0,.14),inset 0 -2px 0 rgba(0,0,0,.08)}
.kbtn.empty{opacity:.55;font-style:italic;font-weight:500}
.kbtn.sel{outline:2.5px solid var(--focus);outline-offset:1px}
.kbtn .sw{position:absolute;left:3px;top:3px;width:6px;height:6px;border-radius:50%}
.slot{border:1.5px dashed rgba(0,0,0,.25);border-radius:4px}
.facemeta{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1;font-size:12.5px;color:var(--muted)}
.blist{display:flex;flex-direction:column;gap:4px}
.blist button{display:flex;gap:8px;align-items:center;text-align:left;background:transparent;border:1px solid transparent;border-radius:6px;padding:4px 6px;cursor:pointer;color:var(--ink);min-width:0}
.blist button.on{border-color:var(--line);background:var(--surface-2)}
.blist .sw{width:10px;height:10px;border-radius:50%;flex:none}
.blist .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.blist .n{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--muted);font-size:12px}
.editor{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:12px}
.editor label.f input,.editor label.f select,.editor label.f textarea{background:var(--surface)}
.edhead{display:flex;align-items:center;gap:8px;font-weight:600}
.edhead .sw{width:12px;height:12px;border-radius:50%}
.edhead .tools{margin-left:auto;display:flex;gap:4px}
.icon{width:32px;height:30px;border:1px solid var(--line);background:var(--surface);border-radius:6px;cursor:pointer}
.icon:disabled{opacity:.35;cursor:default}
.chips{display:flex;flex-direction:column;gap:5px}
.chip{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:7px;padding:5px 6px 5px 9px;min-width:0}
.chip.ckit{cursor:pointer}.chip.ckit:hover{border-color:var(--accent,#2563eb)}
.ckback{align-self:flex-start;margin-bottom:6px}
.chip.off{background:#d9dee4;color:#3f4854}.chip.off .id{color:#6b7480}
.chip .id{font-family:var(--f-mono);font-size:11px;color:var(--muted);flex:none}
.chip .nm{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.chip input{width:58px;padding:3px 6px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);font-variant-numeric:tabular-nums;text-align:right}
.chip button{border:0;background:transparent;cursor:pointer;color:var(--muted);font-size:16px;padding:0 4px}
.hint{font-size:12.5px;color:var(--muted);line-height:1.45}
.picker{display:flex;flex-direction:column;gap:6px}
.picker .list{max-height:260px;overflow-y:auto;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.picker label.opt{display:flex;gap:8px;align-items:center;padding:6px 9px;border-bottom:1px solid var(--line);cursor:pointer;font-size:13px}
.picker label.opt:last-child{border-bottom:0}
.picker .opt .id{font-family:var(--f-mono);font-size:11px;color:var(--muted);width:66px;flex:none}
.picker .opt .d{margin-left:auto;white-space:nowrap;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.picker .opt .tag{font-size:10.5px;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:0 4px}
.kplist{display:flex;flex-direction:column;gap:6px}
.kprow{display:grid;grid-template-columns:auto 1fr auto;gap:4px 10px;align-items:center;text-align:left;border:1px solid var(--line);background:var(--surface-2);border-radius:8px;padding:8px 10px;cursor:pointer}
.kprow:hover{border-color:var(--navy)}
.kprow .id{font-family:var(--f-mono);font-size:12px}
.kprow .loc{font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kprow .eng{grid-column:2/4;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st{font-size:11px;border-radius:999px;padding:2px 8px;border:1px solid var(--line);white-space:nowrap}
.st.todo{color:var(--muted)} .st.review{color:#9a6212;border-color:#e8a33a} .st.done{color:var(--done);border-color:var(--done)}
.loadinfo{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:13px;display:flex;flex-direction:column;gap:4px}
.confirm{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--warn)}
/* Project settings › Floors (layouts/editor-floors.js) */
.pjfl{padding:6px 0}.pjfl+.pjfl{border-top:1px solid var(--line)}
.pjflrow{display:flex;align-items:center;gap:10px;min-height:32px}.pjflrow b{flex:1 1 auto;min-width:0}.pjflrow .hint{flex:none;margin:0}.pjflrow .btn{flex:none}
.pjflwarn{font-size:13px;color:var(--warn);margin:6px 0 8px;display:flex;flex-direction:column;gap:6px}.pjflwarn .hint{margin:0}.pjflwarn .btn:not(.danger){color:var(--ink)}
.pjflbtns{display:flex;gap:8px;flex-wrap:wrap}
/* schedule */
.sched{position:fixed;inset:0;background:var(--bg);z-index:20;display:flex;flex-direction:column}
.sched .bar{position:sticky;top:0}
.sbody{flex:1;overflow:auto;padding-block:16px 40px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.tablewrap{overflow-x:auto;background:var(--surface);border:1px solid var(--line);border-radius:10px}
table{border-collapse:collapse;width:100%;min-width:760px;font-size:13px}
th,td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:top}
th{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);background:var(--surface-2);position:sticky;top:0}
td.mono{font-family:var(--f-mono);font-size:12px;white-space:nowrap}
.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.card h4{margin:0 0 8px;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.card ul{margin:0;padding-left:18px;font-size:13px;line-height:1.55}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:#16212e;color:#fff;border-radius:8px;padding:9px 14px;font-size:13px;z-index:40;box-shadow:0 4px 16px rgba(0,0,0,.25)}
@media (max-width:860px){
  .work{flex-direction:column}
  .planwrap{flex:none;height:50%}
  .bar{gap:8px;padding-block:8px}
  .bar .btn,.seg button{padding:6px 9px;font-size:13px}
  .progress{display:none}
  .panel{width:auto;flex:1;border-left:0;border-top:1px solid var(--line)}
  .legend{display:none}
  .brand span{display:none}
}

/* Connected Home brand bar */
.bar{background:var(--brand);color:#fff;border-bottom:0;box-shadow:inset 0 -3px 0 rgba(255,255,255,.06)}
.brand{flex-direction:row;align-items:center;gap:14px}
.brand .bt{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.brand b{font-family:"Montserrat",var(--f-ui);font-weight:700;letter-spacing:.02em;color:#fff}
.brand span{color:rgba(255,255,255,.72)!important}
.logo{height:44px;width:auto;display:block;flex:none}
.vr{width:1px;align-self:stretch;margin-block:4px;background:rgba(255,255,255,.28);flex:none}
.bar .seg{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.28)}
.bar .seg button{color:rgba(255,255,255,.78)!important;background:transparent!important}
.bar .seg button[aria-pressed="true"]{background:#fff!important;color:var(--brand)!important}
.bar .btn{background:transparent;border-color:rgba(255,255,255,.4);color:#fff}
.backjobs{color:#fff;text-decoration:none;font-size:26px;line-height:1;padding:2px 8px 4px;border-radius:8px;border:1px solid rgba(255,255,255,.35);margin-right:2px}
.backjobs:hover{background:rgba(255,255,255,.1)}
.bar .btn:hover{border-color:#fff;background:rgba(255,255,255,.08)}
.bar .btn.primary{background:#fff;border-color:#fff;color:var(--brand);font-weight:600}
.bar .pill{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.25);color:rgba(255,255,255,.85)}
.bar .pill.ok{color:#9be6bd}.bar .pill.bad{color:#ffc2b5}
.bar .progress{color:rgba(255,255,255,.75)}.bar .progress b{color:#fff}
.bar :focus-visible{outline-color:#fff}
.sched .bar{position:relative}
@media (max-width:860px){.brand .bt span{display:none}}

/* phone header: compact bar + dropdown menu */
.bar{position:relative;z-index:15}
.menubtn{display:none}
.hmenu{display:contents}
.seg .sm{display:none}
@media (max-width:860px){
  .bar{flex-wrap:nowrap;gap:10px;padding-block:6px}
  .logo{height:28px}
  .vr{display:none}
  .brand{gap:10px;margin-right:auto;min-width:0}
  .brand .bt{min-width:0}
  .brand b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .seg .lg{display:none}.seg .sm{display:inline}
  .bar .floors button{padding:6px 10px}
  .menubtn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:34px;flex:none;border-radius:8px;border:1px solid rgba(255,255,255,.4);background:transparent;color:#fff;cursor:pointer}
  .menubtn[aria-expanded="true"]{background:#fff;color:var(--brand)}
  .hmenu{display:none;position:absolute;top:100%;right:max(16px,env(safe-area-inset-right,0px));left:auto;width:min(300px,calc(100vw - 32px));flex-direction:column;align-items:stretch;gap:10px;padding:12px;background:var(--brand);border-radius:0 0 12px 12px;box-shadow:0 12px 28px rgba(0,0,0,.3)}
  .hmenu.open{display:flex}
  .hmenu .seg{display:flex}.hmenu .seg button{flex:1}
  .hmenu .btn{width:100%;text-align:center;padding:9px 12px}
  .hmenu .progress{display:block;color:rgba(255,255,255,.8)}
  .hmenu .pill{align-self:flex-start}
}
.bar .btn[aria-pressed="true"]{background:#ffd60a;border-color:#ffd60a;color:#1b2430;font-weight:600}
@media (min-width:861px) and (max-width:1480px){.bar .progress{display:none}}

/* load schedule */
.ldtop{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}
.ldstats{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}.ldstats b{color:var(--ink)}
.ldfilter input,.ldfilter select{padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);min-width:0}
.ldfilter input{flex:2;min-width:160px}.ldfilter select{flex:1;min-width:130px}.ldfilter .btn{flex:none}
.ldtable td.num,.ldtable th.num{text-align:right;font-variant-numeric:tabular-nums}
.ldtable .warn{color:var(--warn)}
.ldtable .tag{font-size:10.5px;border:1px solid var(--line);border-radius:4px;padding:0 4px;color:var(--muted);font-family:var(--f-ui)}
.ldtable td.acts{white-space:nowrap;text-align:right}.ldtable td.acts .btn{margin-left:4px}
.ldtable tr:hover td{background:var(--surface-2)}

.chk{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
.chk input{width:18px;height:18px;margin:0;accent-color:var(--navy)}

/* Lock (job opens locked; tap to edit, tap again to relock) */
.lockbtn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;flex:none;border-radius:8px;border:1px solid rgba(255,255,255,.4);background:transparent;color:#fff;cursor:pointer;font:inherit;font-size:13px;font-weight:600}
.lockbtn:hover{border-color:#fff;background:rgba(255,255,255,.08)}
.lockbtn[aria-pressed="true"]{background:#ffd60a;border-color:#ffd60a;color:#1b2430}
.lockbtn[hidden]{display:none}
/* the side panel button at the top right of the plan (Plan Layout's #panTog, Keypads' #kwPanTog): body.pshut hides the panel on a computer */
.pantog{position:absolute;top:10px;right:calc(10px + env(safe-area-inset-right,0px));z-index:4;display:grid;place-items:center;width:36px;height:34px;border-radius:10px;border:1px solid #c9d2dc;background:rgba(255,255,255,.96);color:#16212e;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.pantog:hover{border-color:var(--brand,#002E5D)}
.pantog .pchev{transition:transform .4s cubic-bezier(.2,.8,.2,1);transform-origin:9.75px 12px}
body.pshut .pantog .pchev{transform:rotate(180deg)}
body.sheetui .pantog{display:none}
@media (prefers-reduced-motion:reduce){ .pantog .pchev{transition:none} }
@media (max-width:860px){ .lockbtn span{display:none} .lockbtn{width:38px;padding:0;justify-content:center} }
.locked [data-ldedit],.locked [data-ldplace],
.locked label[for=importFile],.locked .edonly,.locked [data-pre],.locked .presets,.locked .edhead .tools,
.locked [data-rm],.locked .picker,.locked [data-restore]{display:none!important}
.locked #pin input:disabled,.locked #pin select:disabled,.locked #pin textarea:disabled{opacity:1;color:var(--ink);-webkit-text-fill-color:var(--ink);cursor:default}
.locked #pin .seg button:disabled{opacity:1;cursor:default}
.locked #pin .seg button:disabled:not([aria-pressed="true"]){opacity:.55}

/* Share-with-client dialog */
/* a dialog stays clear of the status bar (--sat) and the home bar in the iPhone/iPad home-screen app */
.chaddr{position:fixed;z-index:200;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:4px;display:flex;flex-direction:column;max-width:calc(100vw - 16px)}   /* js/address.js: Google's addresses under an address box */
.chaddr[hidden]{display:none}
.chaddr button{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;padding:7px 9px;border:0;border-radius:6px;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.chaddr button:hover,.chaddr button[aria-selected="true"]{background:var(--surface-2)}
.chaddr b{font-size:13.5px;font-weight:600}.chaddr span{font-size:12px;color:var(--muted)}
.chaddr-by{font-size:10.5px;color:var(--muted);text-align:right;padding:3px 8px 2px}
.kwmodal{position:fixed;inset:0;z-index:60;background:rgba(15,23,32,.45);display:grid;place-items:center;padding:calc(16px + var(--sat)) 16px calc(16px + env(safe-area-inset-bottom,0px))}
.kwbox{background:var(--surface);color:var(--ink);border-radius:14px;box-shadow:0 20px 50px rgba(0,0,0,.3);width:min(520px,100%);max-height:calc(100vh - 32px - var(--sat) - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 32px - var(--sat) - env(safe-area-inset-bottom,0px));overflow:auto;padding:18px;display:flex;flex-direction:column;gap:12px}
.kwhead{display:flex;align-items:center;justify-content:space-between;gap:10px}.kwhead b{font-size:17px;font-family:"Montserrat",var(--f-ui)}
.kwbox .chk{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
.kwbox .chk input{width:18px;height:18px;margin:0;accent-color:var(--navy)}
/* Client view (view.html): nothing staff-only shows */
.viewonly #shareBtn,.viewonly #exportJob,.viewonly #dlCsv,.viewonly #sync,.viewonly #cloudPill{display:none!important}
.bar .vopill{color:#fff;font-weight:600}
.viewonly .seg:has([data-st]){display:none!important}
.vonote{font-size:14px;color:var(--ink);white-space:pre-wrap;line-height:1.45;text-transform:none;letter-spacing:0;font-weight:400}
.chip .volv{font-variant-numeric:tabular-nums;font-size:13px;min-width:2.2em;text-align:right}

/* Shared projects (v10): loads and lights are edited in the Layout app */
.linked [data-ldedit],.linked [data-ldplace]{display:none!important}

/* Full-screen plan: Layout installer mode always, every app on phones (body.sheetui, set by each editor). The plan fills
   the screen, floating buttons and one menu replace the header, the panel opens as a bottom sheet, tool hints sit in a strip */
.sheethd,.imenubtn,.fabs,.fab,#bannerPanel{display:none}
body.sheetui .app>.bar{display:none}
body.sheetui .app{height:100vh;height:100dvh}
body.sheetui .work{position:fixed;inset:0;display:block}
body.sheetui .planwrap{position:absolute;inset:0;height:auto!important;width:auto}
body.sheetui .panel{display:none;position:fixed;z-index:30;background:var(--surface);box-shadow:0 -6px 30px rgba(0,0,0,.25);overflow-y:auto;overscroll-behavior:contain}
body.sheetui.sheet .panel{display:flex}
@media (max-width:860px){ body.sheetui .panel{left:0;right:0;bottom:0;top:auto;max-height:62vh;width:auto;border-radius:16px 16px 0 0;border:0;padding-bottom:env(safe-area-inset-bottom,0px)} }
@media (min-width:861px){ body.sheetui .panel{top:70px;right:12px;bottom:12px;width:420px;border-radius:14px;border:1px solid var(--line)} }
body.sheetui .sheethd{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:3;height:48px;box-sizing:border-box;background:var(--surface);padding:8px 14px 6px 18px;border-bottom:1px solid var(--line);flex:none}
body.sheetui .sheethd b{flex:1;min-width:0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sheethd .grab{display:none}
/* the grab bar: a tap minimizes the sheet to its header (body.sheetmin, js/plan-ui.js phoneChrome) and brings it back */
@media (max-width:860px){ .sheethd .grab{display:block;position:absolute;top:0;left:50%;transform:translateX(-50%);width:96px;height:22px;padding:0;margin:0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .sheethd .grab::after{content:'';position:absolute;top:5px;left:29px;width:38px;height:4px;border-radius:2px;background:var(--line)}
  .sheethd .grab:focus-visible{outline:2px solid var(--brand);outline-offset:-2px;border-radius:6px}
  body.sheetui.sheet.sheetmin .panel{max-height:calc(48px + env(safe-area-inset-bottom,0px));overflow:hidden}
  body.sheetui.sheet.sheetmin .sheethd{cursor:pointer} }
body.sheetui .fabs{display:flex;gap:8px;position:absolute;z-index:20;top:calc(12px + var(--sat));right:calc(12px + env(safe-area-inset-right,0px))}
body.sheetui .imenubtn,body.sheetui .fab{display:grid;place-items:center;width:46px;height:46px;padding:0;border-radius:12px;border:0;background:var(--brand);color:#fff;box-shadow:0 4px 14px rgba(0,0,0,.28);cursor:pointer;text-decoration:none;font-size:30px;line-height:1}
body.sheetui .fab[hidden]{display:none}
body.sheetui .fab:disabled{opacity:.45;cursor:default}
body.sheetui .fab[aria-pressed="true"]{background:#ffd60a;color:#1b2430}
body.sheetui .fabback{position:absolute;z-index:20;top:calc(12px + var(--sat));left:calc(12px + env(safe-area-inset-left,0px));padding-bottom:4px}
/* The floor pill at the top left of the plan: Plan Layout's #flPick (layouts/layout-editor.js) and the other apps' floor and
   rack pills (PlanUI.floorPill). A navy button with this floor; it opens a list of all of them */
.flpick{position:relative;flex:none;z-index:5}   /* an open floor list sits over the tools under it */
.flpick[hidden]{display:none}
.flbtn{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:999px;border:1px solid var(--brand,#002E5D);background:var(--brand,#002E5D);color:#fff;font:inherit;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.2);white-space:nowrap}
.flbtn[aria-expanded="true"] svg:last-child{transform:rotate(180deg)}
.fllist{position:absolute;left:0;top:calc(100% + 6px);min-width:100%;display:flex;flex-direction:column;padding:6px;gap:2px;background:var(--c-card,#fff);border:1px solid var(--c-line2,#c9d2dc);border-radius:12px;box-shadow:0 10px 24px rgba(0,0,0,.18)}
.fllist[hidden]{display:none}
.fllist button{border:0;background:transparent;text-align:left;padding:8px 12px;border-radius:8px;font:inherit;font-size:14px;color:var(--c-text,#16212e);cursor:pointer;white-space:nowrap}
.fllist button:hover{background:var(--c-tint,#eef2f6)}
.fllist button[aria-checked="true"]{background:var(--c-tint,#e6eef7);color:var(--c-strong,var(--brand,#002E5D));font-weight:700}
/* the other apps: the pill sits in the row at the top left of the drawing (.sw-tl, css/schem.css) and the tools move under it */
.sc-main>.sw-tl:not(:has(.flpick:not([hidden]),.sw-room,#swHidden)){display:none}
body:not(.sheetui) .sc-main:has(>.sw-tl .flpick:not([hidden])) .rk-tools{top:58px}   /* a computer only: on a phone the tools drop down under the wrench */
/* a phone: the floor (or rack) is chosen at the top of the Menu, as in Plan Layout's ☰ menu, not from the pill */
body.sheetui .sw-tl .flpick{display:none}
.sc-mfloor{display:flex;width:100%}.sc-mfloor button{flex:1;padding:9px 6px}
.sc-mseg{margin-bottom:10px}   /* the View choices (appChrome segMenu) before the Menu's own summary */
/* the bar's Undo, as Plan Layout's seg; on a phone a round button among the top-right ones */
.sc-barr .undoseg svg{display:none}
body.sheetui .fabs .undoseg{border:0;background:none;border-radius:12px;overflow:visible}
body.sheetui .fabs .undoseg button{display:grid;place-items:center;width:46px;height:46px;padding:0;border:0;border-radius:12px;background:var(--brand)!important;color:#fff!important;box-shadow:0 4px 14px rgba(0,0,0,.28)}
body.sheetui .fabs .undoseg button:disabled{opacity:.45}
body.sheetui .fabs .undoseg svg{display:block}
body.sheetui .fabs .undoseg span{display:none}
body.sheetui .fabs .undoseg[hidden]{display:none}
/* The apps inside the app (Rack Design, WiFi Heat Mapping, Lighting Design, System Schematics) on a phone, ≤860px
   (PlanUI.appChrome in js/plan-ui.js): the navy bar goes; its ‹ link, Menu button and Claude button (#chatSlot) become these
   floating buttons, its segmented control floats between them, the tools open as a list under a Tools button, the sync pill
   shows in the Menu's head. The bar's own rules (css/schem.css) still lay it out on a computer and an iPad held sideways. */
.fabseg,.fabtools,.fabpill{display:none}
body.sheetui .sc-bar{display:none}
body.sheetui .fabtools{position:absolute;z-index:20;top:calc(66px + var(--sat));left:calc(12px + env(safe-area-inset-left,0px))}
body.sheetui .sc-main:not(:has(.rk-tools:not([hidden]),.sw-tools:not([hidden]))) .fabtools{display:none}   /* view only, no racks yet: nothing to open */
body.sheetui .fabs .sc-menubtn,body.sheetui .fabs #chatSlot .chatbtn{display:grid;place-items:center;width:46px;height:46px;min-height:0;padding:0;border:0;border-radius:12px;background:var(--brand);color:#fff;box-shadow:0 4px 14px rgba(0,0,0,.28)}
body.sheetui .fabs .sc-menubtn span,body.sheetui .fabs #chatSlot .chatbtn span{display:none}
body.sheetui .fabs .sc-menubtn svg,body.sheetui .fabs #chatSlot .chatbtn svg{width:22px;height:22px}
body.sheetui .fabs .sc-menubtn[aria-expanded="true"],body.sheetui .fabs #chatSlot .chatbtn[aria-expanded="true"]{background:#ffd60a;color:#1b2430}
body.sheetui .fabs .sc-menubtn[hidden]{display:none}
body.sheetui .fabs #chatSlot:empty{display:none}
body.sheetui .fab[aria-expanded="true"]{background:#ffd60a;color:#1b2430}
/* the bar's segmented control, floating between the buttons (it scrolls sideways when the systems don't fit) */
body.sheetui .fabseg{position:absolute;z-index:19;top:calc(12px + var(--sat));left:calc(70px + env(safe-area-inset-left,0px));right:calc(70px + env(safe-area-inset-right,0px));display:flex;justify-content:center}
body.sheetui .sc-main:has(.fabs #chatBtn) .fabseg,body.sheetui .sc-main:has(.fabs .undoseg:not([hidden])) .fabseg{right:calc(124px + env(safe-area-inset-right,0px))}   /* room for each round button on the right */
body.sheetui .sc-main:has(.fabs #chatBtn):has(.fabs .undoseg:not([hidden])) .fabseg{right:calc(178px + env(safe-area-inset-right,0px))}
body.sheetui .fabseg .seg{display:flex;max-width:100%;height:46px;box-sizing:border-box;border:0;border-radius:12px;background:var(--surface);box-shadow:0 4px 14px rgba(0,0,0,.28);overflow-x:auto;scrollbar-width:none}
body.sheetui .fabseg .seg[hidden],body.sheetui .fabseg .seg:empty{display:none}
body.sheetui .fabseg .seg button{flex:1 0 auto;padding:0 13px;font-size:13.5px;font-weight:600;white-space:nowrap}
/* the tools: a list under the Tools button, as Plan Layout's, in place of the row under the bar */
body.sheetui .rk-tools,body.sheetui .sw-tools{display:none}
body.sheetui.tools .rk-tools:not([hidden]),body.sheetui.tools .sw-tools{display:flex;flex-direction:column;align-items:stretch;gap:4px;z-index:21;left:calc(12px + env(safe-area-inset-left,0px));right:auto;top:calc(120px + var(--sat));width:max-content;max-width:calc(100% - 24px);max-height:calc(100% - 140px - env(safe-area-inset-bottom,0px));overflow-y:auto;padding:6px;border-radius:12px;background:var(--c-card,var(--surface));box-shadow:0 8px 24px rgba(0,0,0,.25)}
body.sheetui.tools .rk-tools .sw-tool,body.sheetui.tools .sw-tools .sw-tool{width:100%;flex:none;box-shadow:none;font-size:14px;padding:10px 12px;justify-content:flex-start;text-align:left}
/* the line along the top and System Schematics' room filter sit to the right of the buttons */
body.sheetui .sw-tip{top:calc(66px + var(--sat));left:calc(70px + env(safe-area-inset-left,0px));right:calc(12px + env(safe-area-inset-right,0px));transform:none;max-width:none}
body.sheetui .sw-tl{top:calc(66px + var(--sat));left:calc(70px + env(safe-area-inset-left,0px));flex-wrap:wrap}
body.sheetui .sc-main:has(.sw-room) .sw-tip{top:calc(112px + var(--sat))}   /* under System Schematics' room filter */
/* the item panel and the gear list, bottom sheets with Plan Layout's look */
body.sheetui .rk-pal,body.sheetui .rk-side{border-radius:16px 16px 0 0;border:0;box-shadow:0 -6px 30px rgba(0,0,0,.25)}
body.sheetui .rk-palhead{padding-top:14px}
body.sheetui .rk-palhead::before{content:"";position:absolute;top:5px;left:50%;transform:translateX(-50%);width:38px;height:4px;border-radius:2px;background:var(--c-line,var(--line))}
body.sheetui .sc-mhead .fabpill:not([hidden]){display:inline-flex;margin-left:auto;margin-right:10px}
/* the Menu drops down under its button, as Plan Layout's (.imenu), so the button stays there to close it */
body.sheetui .sc-menu{top:calc(66px + var(--sat));right:calc(12px + env(safe-area-inset-right,0px));bottom:auto;left:auto;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 80px - var(--sat));border:1px solid var(--c-line,var(--line));border-radius:14px;box-shadow:0 14px 40px rgba(0,0,0,.28);padding:6px 16px 14px}
body.sheetui #bannerPanel{display:inline-block}
@media (min-width:861px){ body.sheetui .banner{left:70px;right:auto;transform:none;top:calc(12px + var(--sat));max-width:calc(100% - 300px)} }
/* phones: a tool's instructions become a strip along the bottom, out of the way of the plan */
@media (max-width:860px){
  body.sheetui .banner{top:auto;left:calc(10px + env(safe-area-inset-left,0px));right:calc(10px + env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));transform:none;max-width:none;border-radius:12px;padding:8px 8px 8px 14px;flex-wrap:nowrap}
  body.sheetui .banner #bannerText{flex:1;min-width:0;line-height:1.3}
  body.sheetui .banner button{flex:none;padding:8px 12px;font-size:14px}
  body.sheetui.sheet .banner{display:none}
  body.sheetui.strip .zoom{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  body.sheetui.strip .toast{bottom:calc(130px + env(safe-area-inset-bottom,0px))}   /* above the strip and the size sliders */
}
.imenu{position:fixed;z-index:40;top:calc(66px + var(--sat));right:12px;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 78px - var(--sat) - env(safe-area-inset-bottom,0px));overflow-y:auto;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 14px 40px rgba(0,0,0,.28);padding:6px 16px 14px}
.imenu[hidden]{display:none}
.imhd{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.imhd>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.imhd b{font-size:15px}.imhd span{font-size:12px;color:var(--muted)}
.imsec{padding:10px 0;border-bottom:1px solid var(--line)}
.imsec:last-child{border-bottom:0}
.imsec h3{margin:0 0 8px;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.imsec .seg{display:flex;width:100%}.imsec .seg button{flex:1}
.imchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.imchips button{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:5px 10px;font-size:12.5px;cursor:pointer;color:var(--ink)}
.imchips button[aria-pressed="false"]{color:var(--muted);text-decoration:line-through;background:var(--surface-2)}
.imchips i{width:9px;height:9px;border-radius:50%;display:inline-block}
.imchips button.lyall{background:#0b2545;color:#fff;border-color:#0b2545;font-weight:600}   /* Plan Layout's Show all in the phone menu (kw-v500) */
.imchips button.solo{background:#0b1f3a;color:#fff;border-color:#0b1f3a;text-decoration:none}.imchips button.solo i{box-shadow:0 0 0 2px #fff}
.imnav{display:flex;flex-direction:column}
.imnav button{display:flex;align-items:center;justify-content:space-between;border:0;border-radius:8px;background:transparent;padding:11px 8px;font:inherit;font-weight:600;font-size:14.5px;color:var(--ink);cursor:pointer;text-align:left}
.imnav button:hover{background:var(--surface-2)}
.imnav a.imlink{display:flex;align-items:center;border-radius:8px;padding:11px 8px;font-weight:600;font-size:14.5px;color:var(--ink);text-decoration:none}
.imnav a.imlink:hover{background:var(--surface-2)}
.imnav .n{font-family:var(--f-mono);font-weight:500;font-size:12px;color:var(--muted)}
.imfoot{display:flex;gap:8px}.imfoot .btn{flex:1}
.imrow{display:flex;gap:6px}.imrow .tool{flex:1;min-width:0;justify-content:center}
.imfoot a.btn{color:var(--ink)}
body.sheetui .panel{flex-direction:column}
.imrow .btn{flex:1;min-width:0;justify-content:center;display:inline-flex;align-items:center;gap:6px}

/* Touch screens: iPhone/iPad Safari zooms into any text box under 16px when it's tapped. 16px stops that and keeps pinch-zoom. */
@media (pointer:coarse){ input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea{font-size:16px!important} }

/* the bar under the floating keypad (layout.css shows it in .kpfloat) */
.kpbar{display:none}
.kpbar .kpgo{flex:1;min-width:0;display:flex;align-items:center;gap:12px;border:0;background:transparent;color:var(--ink);padding:13px 6px 13px 18px;font:inherit;font-size:14px;text-align:left;cursor:pointer}
.kpbar .kpx{flex:none;width:52px;border:0;border-left:1px solid var(--line);background:transparent;color:var(--muted);font-size:17px;cursor:pointer}
.kpbar .go{flex:none;font-weight:700;color:var(--navy)}
/* while a sheet is open on a phone, toasts show near the top instead of over the sheet */
@media (max-width:860px){ body.sheetui.sheet .toast{bottom:auto;top:calc(70px + var(--sat))} }

/* Desktop header: less-used actions sit in a "More" dropdown so the header stays on one row */
.more{position:relative;display:inline-flex}
.more[hidden]{display:none}
.morelist{position:absolute;right:0;top:calc(100% + 8px);z-index:40;display:flex;flex-direction:column;gap:6px;min-width:210px;padding:10px;background:var(--brand);border-radius:12px;box-shadow:0 12px 28px rgba(0,0,0,.3)}
.morelist[hidden]{display:none}
.morelist .btn{width:100%;justify-content:flex-start;text-align:left}
/* Project lock (saved on the project, for everyone) */
.bar .plpill{background:#ffd60a;color:#1b2430;border-color:#ffd60a;font-weight:600}

/* Home-screen app on iPhone/iPad: the status bar (time, signal) sits over the top of the page. Each top bar grows by its
   height so the navy fills the space behind it and the buttons sit below it (0 in Safari and on computers). */
.bar{padding-top:calc(10px + var(--sat))}
@media (max-width:860px){ .bar{padding-top:calc(6px + var(--sat))} }
/* zoom buttons stay above the home indicator */
body.sheetui:not(.strip) .zoom{bottom:calc(12px + env(safe-area-inset-bottom,0px))}
/* symbol size slider, bottom left of the plan (Layout app) */
.sizectl{position:absolute;left:calc(12px + env(safe-area-inset-left,0px));bottom:12px;background:rgba(255,255,255,.94);border:1px solid #c9d2dc;border-radius:10px;padding:6px 10px;box-shadow:0 1px 3px rgba(0,0,0,.12);z-index:3}
.sizectl label{display:flex;align-items:center;gap:8px;font-size:12px;color:#16212e;font-weight:600}
.sizectl input{width:200px;accent-color:var(--navy,#0b2a4a)}
body.sheetui.strip .sizectl{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
body.sheetui:not(.strip) .sizectl{bottom:calc(12px + env(safe-area-inset-bottom,0px))}
@media (max-width:640px){ .sizectl label span{display:none} .sizectl input{width:min(170px,calc(100vw - 120px))} }
/* a device-only project that's also in the cloud: which copy to keep */
.twinbox .twdates{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.twinbox .twdates>div{border:1px solid var(--line);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.twinbox .twdates span{font-size:12px;color:var(--muted)}
.twinbox .twdates i{font-style:normal;font-size:11px;font-weight:600;color:#15803d}
.twinbox>.btn{width:100%;justify-content:center;text-align:center}
/* one height for a text box (with or without a dropdown list) and a dropdown, wherever they sit side by side */
label.f input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),label.f select,
.ldfilter input,.ldfilter select{box-sizing:border-box;height:38px}
.ldedit input,.ldedit select{box-sizing:border-box;height:32px}
.ctrow .rmname,.ctrow select{box-sizing:border-box;height:34px}
select{box-sizing:border-box}
/* the plan's messages sit just above the Symbols / Lines sliders, never over them */
body:has(#sizeCtl) .toast{bottom:calc(60px + env(safe-area-inset-bottom,0px))}
body.sheetui.strip:has(#sizeCtl) .toast{bottom:calc(130px + env(safe-area-inset-bottom,0px))}
@media (max-width:860px){ body.sheetui.sheet:has(#sizeCtl) .toast{bottom:auto} }   /* a phone sheet open: messages at the top, as before */
#plan.placing,#plan.placing *{cursor:crosshair!important}   /* adding or a tool on: nothing on the plan looks (or acts) tappable */
/* right-click menus (js/ctx-menu.js) on every page; on the frame pages they're also .chs-pop */
.ch-ctx{position:fixed;z-index:1000;background:var(--c-card,var(--surface));color:var(--c-text,var(--ink));border:1px solid var(--c-line,var(--line));border-radius:4px;box-shadow:0 16px 40px rgba(0,27,54,.18);padding:4px;min-width:200px;max-width:300px;display:flex;flex-direction:column;font-family:var(--font-body,inherit)}
.ch-ctx button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px;border:0;background:transparent;border-radius:3px;font-size:13px;color:inherit;cursor:pointer}
.ch-ctx button:hover:not([disabled]),.ch-ctx button:focus-visible{background:var(--c-tint,var(--surface-2));outline-offset:-2px}
.ch-ctx button[disabled]{opacity:.45;cursor:default}
.ch-ctx .danger{color:var(--c-accent,var(--warn))}
.ch-ctx .sep{height:1px;background:var(--c-line,var(--line));margin:4px 0}
.ch-ctx .lbl{padding:6px 10px 2px;font-weight:700;font-size:10.5px;letter-spacing:.12em;color:var(--c-muted,var(--muted))}
.ch-ctx .hint{padding:6px 10px;font-size:12px;color:var(--c-muted,var(--muted))}
.ch-ctx [aria-checked="true"]{font-weight:600}.ch-ctx [aria-checked="true"]::after{content:"✓";margin-left:auto}
/* Photo mode opened from a project's page (Photos › Add, &photo=1): only the rooms and their cameras, Done goes back */
body.photoonly #instTools,body.photoonly #planwrap>.fabs,body.photoonly #bannerPanel,body.photoonly #sizeCtl{display:none!important}
@media (min-width:861px){ body.photoonly .banner{left:50%;transform:translateX(-50%)} }   /* the floor dropdown has the top left */
body.photoonly .plantop{top:calc(12px + var(--sat))}   /* below the iPhone/iPad status bar in the home-screen app, like the other buttons */
@media (max-width:860px){ body.photoonly.sheetui:not(.strip) .zoom{bottom:calc(84px + env(safe-area-inset-bottom,0px))} }   /* above the Done bar */
/* Deliverables (js/deliverables.js): the Publish / Send for review dialog in each app, and the project page's section */
.dl-seg{display:flex;width:100%}.dl-seg button{flex:1 1 0;min-width:0;padding:9px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dl-seg button:disabled{opacity:.45;cursor:not-allowed}
.dl-sheets{border:1px solid var(--line);border-radius:8px;padding:8px 12px;margin:0;display:flex;flex-direction:column;gap:6px}
.dl-sheets legend{font-size:11.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;padding:0 4px}
.dl-warn{color:var(--c-review,#8a5300)}
.dl-acts{display:flex;gap:8px;align-items:center}.dl-grow{flex:1}
.dl-apps{display:flex;flex-direction:column;gap:12px}
.dl-app{border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:8px;min-width:0}
.dl-ahead{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.dl-ahead h3{margin:0;font-size:14.5px;flex:0 1 auto}
.dl-cur{font-family:var(--f-mono,monospace);font-size:12px;font-weight:600;padding:2px 7px;border-radius:999px;background:var(--c-issued-bg,#e3f2ea);color:var(--c-issued,#1f7a4c)}
.dl-chg{font-size:11.5px;font-weight:600;padding:2px 7px;border-radius:999px;background:var(--c-review-bg,#fff4e0);color:var(--c-review,#8a5300)}
.dl-openapp{margin-left:auto}
.dl-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.dl-v{display:flex;align-items:center;gap:10px;min-width:0}
.dl-tag{flex:none;font-family:var(--f-mono,monospace);font-size:12px;font-weight:600;min-width:46px;text-align:center;padding:3px 6px;border-radius:6px;background:var(--c-issued-bg,#e3f2ea);color:var(--c-issued,#1f7a4c)}
.dl-v.review .dl-tag{background:var(--c-review-bg,#fff4e0);color:var(--c-review,#8a5300)}
.dl-what{flex:1;min-width:0;font-size:13px;color:var(--muted);text-decoration:none;border-radius:6px}.dl-what b{color:var(--ink);font-weight:600}
.dl-what:hover b,.dl-what:focus-visible b{text-decoration:underline;color:var(--c-strong,var(--navy))}
.dl-v a.dl-dl{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:8px;background:none;color:var(--muted)}.dl-v a.dl-dl:hover{background:var(--c-tint,var(--surface-2));color:var(--ink)}.dl-v a.dl-dl svg{width:17px;height:17px}
.dl-what small{display:block;color:var(--ink);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dl-v .dl-acts{flex:none;display:flex;gap:6px}
.dl-not{font-size:12.5px;color:var(--muted)}
.dl-app.dl-none{padding:8px 12px}.dl-app.dl-none h3{font-weight:600}
@media (max-width:640px){ .dl-openapp{margin-left:auto} }
/* the app's row: its name and version (or Not published yet) on one line, Open app at the right; on a phone the version goes under the name */
.cosec .dl-ahead{flex-wrap:nowrap;min-width:0}
.dl-anm{flex:1;min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dl-ast{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cosec .dl-ahead h3{margin:0;line-height:1.3}
.cosec .dl-not{line-height:1.3}
.cosec .dl-openapp{flex:none;margin-left:auto}
@media (max-width:640px){ .dl-anm{flex-direction:column;align-items:flex-start;gap:3px} }
/* Preview the PDF on its own row above Cancel and Publish */
.dl-prevrow{display:flex;align-items:center;gap:10px}.dl-prevrow .btn{flex:none}
/* a keypad's bar (CHOpen.keypadDocs, kw-v543): above the plan's when both show; on a phone at the top, under the floating
   buttons, clear of the keypad and the sheet along the bottom */
body:has(#staleBar:not([hidden])) #kpStaleBar:not([hidden]){bottom:calc(76px + env(safe-area-inset-bottom,0px))}
@media (max-width:860px){ #kpStaleBar.stalebar,body:has(#staleBar:not([hidden])) #kpStaleBar:not([hidden]){top:calc(66px + var(--sat,0px));bottom:auto} }
