/* v141/v142 — 3D Maintenance. Same visual language as the 3D rework screen.
   v142: phone = 3D full screen + small dock; the sheet opens only when needed. */
html.m3d-open,html.m3d-open body{overflow:hidden!important;overscroll-behavior:none}
.m3d{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10060;display:flex;overflow:hidden;font-family:'Figtree','Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;color:#15171C;background:linear-gradient(180deg,#EEF1F4 0%,#D9DEE4 100%);-webkit-tap-highlight-color:transparent;touch-action:none}
.m3d *,.m3d *::before,.m3d *::after{box-sizing:border-box}
.m3d button,.m3d textarea,.m3d input{font-family:inherit}
.m3d button{-webkit-appearance:none;appearance:none;cursor:pointer;touch-action:manipulation}
.m3d button:disabled{opacity:.5;cursor:default}
.m3d textarea,.m3d input{touch-action:manipulation}
.m3d-stage{position:relative;flex:1;min-width:0;-webkit-user-select:none;user-select:none}
.m3d-scene{position:absolute;top:0;right:0;bottom:0;left:0;touch-action:none}
.m3d-hud{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}
.m3d-loading{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;padding:0 24px;z-index:1}
.m3d-loading .box{pointer-events:auto;background:#fff;padding:12px 18px;border-radius:14px;font-weight:700;font-size:15px;box-shadow:0 6px 24px rgba(20,30,40,.14);text-align:center}
.m3d-loading button{margin-left:8px;height:40px;padding:0 14px;border:0;border-radius:12px;background:#15171C;color:#fff;font-weight:800}

/* top bar over the 3D room (same as 3D rework) */
.m3d-top{position:absolute;top:0;left:0;right:0;padding:calc(10px + env(safe-area-inset-top)) 10px 0;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.m3d-bar{pointer-events:auto;display:flex;align-items:center;gap:10px;background:#fff;border-radius:18px;padding:8px;box-shadow:0 4px 20px rgba(20,30,40,.12);max-width:600px;width:100%}
.m3d-roombtn{width:60px;height:48px;border:0;border-radius:13px;background:#0E4C78;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;line-height:1;gap:2px;padding:0}
.m3d-roombtn .k{font-size:9px;font-weight:700;letter-spacing:.06em;opacity:.75}
.m3d-roombtn .n{font-size:18px;font-weight:800;max-width:100%;padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.m3d-roombtn.long{width:auto;min-width:60px;max-width:120px;padding:0 6px}.m3d-roombtn.long .n{font-size:13px}
.m3d-grow{flex:1;min-width:0}
.m3d-title{font-size:15.5px;font-weight:800;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m3d-sub{font-size:12.5px;color:#5B6472;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m3d-sub .r{color:#C62828}.m3d-sub .g{color:#1F8A55}
.m3d-vseg{display:flex;background:#EEF1F4;border-radius:12px;padding:3px;flex:none}
.m3d-vseg button{height:38px;min-width:42px;padding:0 9px;border:0;border-radius:9px;background:transparent;font-size:14px;font-weight:800;color:#5B6472}
.m3d-vseg button.on{background:#15171C;color:#fff}
.m3d-x{width:44px;height:44px;border:0;border-radius:12px;background:#EEF1F4;flex:none;padding:0;color:#15171C;display:flex;align-items:center;justify-content:center}
.m3d-zones{pointer-events:auto;display:flex;gap:6px;overflow-x:auto;max-width:600px;width:100%;scrollbar-width:none;padding-bottom:2px;-webkit-overflow-scrolling:touch;touch-action:pan-x}
.m3d-zones::-webkit-scrollbar{display:none}
.m3d-zones button{height:34px;padding:0 12px;flex:none;border:0;border-radius:11px;font-size:13px;font-weight:700;white-space:nowrap;background:#fff;color:#15171C;box-shadow:0 2px 8px rgba(20,30,40,.12)}
.m3d-zones button:active{transform:scale(.95)}
.m3d-hint{align-self:flex-start;background:rgba(21,23,28,.86);color:#fff;font-size:13px;font-weight:600;padding:9px 12px;border-radius:12px;max-width:min(600px,100%);line-height:1.3}
.m3d-hint.act{pointer-events:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#0E4C78;box-shadow:0 6px 20px rgba(14,76,120,.35)}
.m3d-hint.act span{flex:1;min-width:150px}
.m3d-hint.act button{height:36px;padding:0 12px;border:0;border-radius:10px;background:#fff;color:#0E4C78;font-weight:800;font-size:13px}
.m3d-tools{position:absolute;right:10px;top:calc(122px + env(safe-area-inset-top));display:flex;flex-direction:column;gap:6px;pointer-events:auto}
.m3d-tools button{width:42px;height:42px;border:0;border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(20,30,40,.14);font-weight:800;font-size:14px;color:#15171C;padding:0}
.m3d-tools button.on{background:#15171C;color:#fff}
.m3d-tools button.on.g{background:#1F8A55}
.m3d-tools button.half{background:#15171C;color:#fff;opacity:.72}
.m3d-tools button:active{transform:scale(.95)}

/* bottom of the 3D room: undo / redo + (phone) the small dock */
.m3d-bot{position:absolute;left:0;right:0;bottom:0;padding:0 10px calc(10px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px;pointer-events:none;transition:opacity .16s ease,transform .2s ease}
.m3d-bot.hide{opacity:0;transform:translateY(24px)}
.m3d-bot.hide *{pointer-events:none!important}
.m3d-tip{align-self:center;background:rgba(21,23,28,.86);color:#fff;font-size:13px;font-weight:600;padding:9px 14px;border-radius:12px;text-align:center;max-width:100%}
.m3d-ur{display:flex;gap:8px;align-self:flex-end;pointer-events:auto}
.m3d-ur button{width:50px;height:50px;border:0;border-radius:15px;background:#fff;box-shadow:0 4px 16px rgba(20,30,40,.14);display:flex;align-items:center;justify-content:center;color:#15171C;padding:0}
.m3d-ur button.off{color:#BCC2CB}
.m3d-ur button:active{transform:scale(.94)}
.m3d-dock{pointer-events:auto;display:flex;gap:8px;background:#fff;border-radius:22px;padding:8px;box-shadow:0 6px 24px rgba(20,30,40,.14)}
.m3d-dock button{height:54px;border:0;border-radius:15px;font-weight:800;font-size:15px;color:#15171C;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 10px;min-width:0}
.m3d-dock button:active{transform:scale(.97)}
.m3d-dk-list{flex:1.35;background:#F2F4F7;justify-content:flex-start!important}
.m3d-dk-list b{min-width:34px;height:34px;border-radius:11px;background:#9AA3AE;color:#fff;display:flex;align-items:center;justify-content:center;padding:0 7px;font-size:16px;flex:none}
.m3d-dk-list.has b{background:#DC3D3D}
.m3d-dk-list span{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1;font-size:14.5px;min-width:0}
.m3d-dk-list small{font-size:11px;font-weight:800;color:#1F8A55}
.m3d-dk-ck{flex:1;background:#F2F4F7;flex-direction:column;gap:1px!important;line-height:1.1}
.m3d-dk-ck b{font-size:14.5px}
.m3d-dk-ck span{font-size:11px;color:#6B7380;font-weight:700}
.m3d-dk-add{flex:1;background:#0E4C78!important;color:#fff!important;font-size:16px!important}

/* side panel (PC) / bottom sheet (phone) */
.m3d-panel{width:410px;flex:none;background:#fff;display:flex;flex-direction:column;border-left:1px solid #E1E5EA;box-shadow:-6px 0 30px rgba(20,30,40,.08);z-index:2;min-height:0}
.m3p-head{display:flex;align-items:center;gap:8px;padding:12px 14px 10px;border-bottom:1px solid #EEF1F4;flex:none;cursor:default;position:relative}
.m3p-grab{display:none}
.m3p-room{flex:1;min-width:0}
.m3p-room b{display:block;font-size:17px;font-weight:800}
.m3p-room span{display:block;font-size:12px;color:#5B6472;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m3p-counts{display:flex;gap:6px;flex:none}
.m3p-counts span{font-size:12px;font-weight:800;padding:5px 9px;border-radius:999px}
.m3p-counts .o{background:#FDECEC;color:#B71C1C}.m3p-counts .f{background:#E7F6EE;color:#17693F}
.m3p-head .m3d-ur,.m3p-x{display:none}
.m3p-head .m3d-ur{gap:6px;align-self:center}
.m3p-head .m3d-ur button{width:40px;height:40px;border-radius:12px;box-shadow:none;background:#F2F4F7}
.m3p-x{width:40px;height:40px;border:0;border-radius:12px;background:#EEF1F4;align-items:center;justify-content:center;padding:0;color:#15171C;flex:none}
.m3p-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:12px 14px calc(18px + env(safe-area-inset-bottom));min-height:0;touch-action:pan-y}
.m3p-lbl{font-size:11.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#6B7380;margin:14px 0 7px}
.m3p-wrap,.m3p-chips{display:flex;flex-wrap:wrap;gap:6px}
.m3p-chip{min-height:38px;padding:7px 12px;border:1.5px solid #DDE2E8;border-radius:12px;background:#fff;font-size:13.5px;font-weight:700;color:#15171C;text-align:left;line-height:1.2}
.m3p-chip.opt{border-left:5px solid var(--c,#656B78)}
.m3p-chip.sm{min-height:32px;font-size:12.5px;padding:5px 10px}
.m3p-chip.on{background:#15171C;border-color:#15171C;color:#fff}
.m3p-chip.r{color:#B71C1C}.m3p-chip.on.r{background:#DC3D3D;border-color:#DC3D3D;color:#fff}
.m3p-chip.g{color:#17693F}.m3p-chip.on.g{background:#1F8A55;border-color:#1F8A55;color:#fff}
.m3p-chip.warn{color:#B71C1C;border-color:#F3C4C4}
.m3p-chip:active,.m3p-btn:active,.m3p-mini:active,.m3p-ckb:active,.m3p-solve:active{transform:scale(.96)}
.m3p-sev,.m3p-kind{min-height:34px;padding:5px 11px;border:1.5px solid #DDE2E8;border-radius:10px;background:#fff;font-size:12.5px;font-weight:800;color:var(--c)}
.m3p-sev.on,.m3p-kind.on{background:var(--c);border-color:var(--c);color:#fff}
.m3p-btn{min-height:42px;padding:8px 14px;border:1.5px solid #D5DBE2;border-radius:12px;background:#fff;font-size:14px;font-weight:800;color:#15171C}
.m3p-btn.dark{background:#15171C;border-color:#15171C;color:#fff}
.m3p-btn.ok{background:#1F8A55;border-color:#1F8A55;color:#fff}
.m3p-btn.warn{color:#B71C1C;border-color:#F3C4C4;background:#FFF7F7}
.m3p-btn.big{width:100%;min-height:54px;font-size:16.5px;margin-top:10px;border-radius:14px}
.m3p-btn.sm{min-height:36px;font-size:13px;padding:6px 12px;margin-top:6px}
.m3p-btn.wide{width:100%;margin-top:10px;text-align:left;display:block}
.m3p-btn.wide small{font-weight:600;color:#6B7380;margin-left:4px}
.m3p-btn.more,.m3p-btn.edit{background:#F4F7FA;border-color:#E1E7EE}
.m3p-btn.edit.on{background:#fff}
.m3p-row2.acts .m3p-btn{min-width:0}
.m3p-row2{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.m3p-row2 .m3p-btn{flex:1;min-width:140px}
.m3p-empty{padding:18px 12px;text-align:center;color:#6B7380;font-size:13.5px;background:#F6F8FA;border-radius:12px;margin-top:8px}
.m3p-addbtn{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:11px 14px;border:1.5px dashed #9FB7CC;border-radius:14px;background:#F2F7FB;color:#0E4C78;margin-bottom:10px;text-align:left}
.m3p-addbtn b{font-size:15px;font-weight:800}
.m3p-addbtn span{font-size:12px;font-weight:600;color:#5B6472}

.m3p-write{background:#F4F7FA;border:1.5px solid #E1E7EE;border-radius:14px;padding:10px;margin-bottom:12px}
.m3p-write label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}
.m3p-write textarea,.m3p-note textarea,.m3p-body>textarea,.m3p-in{width:100%;border:1.5px solid #D5DBE2;border-radius:11px;padding:9px 11px;font-size:16px;line-height:1.35;resize:vertical;background:#fff;color:#15171C;outline:none}
.m3p-write textarea:focus,.m3p-note textarea:focus,.m3p-body>textarea:focus,.m3p-in:focus{border-color:#0E4C78;box-shadow:0 0 0 3px rgba(14,76,120,.14)}
.m3p-inrow{display:flex;gap:6px;align-items:flex-start}
.m3p-inrow .m3p-in{flex:1;margin:0}
.m3p-inrow .m3p-btn{margin:0;min-height:42px}
.m3p-more{display:none}
.m3p-write.has .m3p-more,.m3p-write:focus-within .m3p-more{display:block}
.m3p-recent{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:7px}
.m3p-recent>span{font-size:11.5px;color:#6B7380;font-weight:700}

.m3p-tabs{display:flex;gap:4px;background:#EEF1F4;border-radius:12px;padding:4px;margin:4px 0 10px}
.m3p-tabs button{flex:1;height:38px;border:0;border-radius:9px;background:transparent;font-size:13px;font-weight:800;color:#5B6472;white-space:nowrap}
.m3p-tabs button.on{background:#fff;color:#15171C;box-shadow:0 1px 4px rgba(20,30,40,.1)}
.m3p-tabs b{font-weight:800;color:#B71C1C}
.m3p-filt{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}

.m3p-is{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1.5px solid #F1CDCD;border-left:5px solid #DC3D3D;border-radius:12px;margin-bottom:6px;cursor:pointer;background:#FFF9F9}
.m3p-is.fixed{border-color:#CFE9DA;border-left-color:#1F9A5F;background:#F5FBF7}
.m3p-is.cur{box-shadow:0 0 0 3px rgba(240,164,58,.35)}
.m3p-is .n{width:28px;height:28px;border-radius:50%;background:#DC3D3D;color:#fff;font-style:normal;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;flex:none}
.m3p-is.fixed .n{background:#1F9A5F}
.m3p-is .t{flex:1;min-width:0}
.m3p-is .t b{display:block;font-size:14px;font-weight:800;line-height:1.25}
.m3p-is.fixed .t b{color:#2F6B4D}
.m3p-is .t small{display:block;font-size:12px;color:#6B7380;line-height:1.3;margin-top:1px}
.m3p-is .t small.tm{font-weight:700}
.m3p-is .t small.tm.r{color:#B71C1C}.m3p-is .t small.tm.g{color:#17693F}
em.sev{font-style:normal;font-size:10.5px;font-weight:800;color:#fff;background:var(--c);border-radius:6px;padding:1px 6px;vertical-align:2px;margin-left:2px;letter-spacing:.02em}
.m3p-mini{width:42px;height:42px;border:1.5px solid #D5DBE2;border-radius:12px;background:#fff;font-size:17px;font-weight:800;flex:none;padding:0;color:#15171C}
.m3p-solve{height:42px;padding:0 12px;border:0;border-radius:12px;background:#1F8A55;color:#fff;font-size:13.5px;font-weight:800;flex:none;white-space:nowrap}

.m3p-obj{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.m3p-obj b{display:block;font-size:17px;font-weight:800;line-height:1.2}
.m3p-obj span{display:block;font-size:12.5px;color:#5B6472}
.m3p-obj em{font-style:normal;font-weight:800}
.m3p-back{width:40px;height:40px;border:0;border-radius:11px;background:#EEF1F4;font-size:24px;line-height:1;font-weight:700;flex:none;padding:0 0 3px;color:#15171C}
.m3p-n{width:34px;height:34px;border-radius:50%;font-style:normal;font-weight:800;font-size:15px;display:flex;align-items:center;justify-content:center;flex:none;color:#fff}
.m3p-n.r{background:#DC3D3D}.m3p-n.g{background:#1F9A5F}
.m3p-when{margin-top:8px;border-radius:12px;overflow:hidden;font-size:13px;font-weight:600}
.m3p-when>div{padding:8px 11px}
.m3p-when .r{background:#FDECEC;color:#8E1B1B}.m3p-when .g{background:#E7F6EE;color:#17693F}
.m3p-when b{font-weight:800}
.m3p-notebox{margin-top:8px;padding:8px 11px;border-radius:11px;background:#FFF8E6;color:#6B4E00;font-size:13px;font-weight:600;line-height:1.35}
.m3p-grp{margin-top:12px}
.m3p-gh{font-size:12px;font-weight:800;color:var(--c,#5B6472);margin-bottom:6px;text-transform:uppercase;letter-spacing:.04em}
.m3p-same{margin-top:12px;font-size:13px;color:#5B6472;line-height:1.9}
.m3p-same.sm{font-size:12.5px;margin-top:10px}
.m3p-same button{border:1.5px solid #F3C4C4;background:#FFF7F7;color:#B71C1C;font-weight:800;border-radius:8px;padding:3px 8px;margin:0 3px 0 0;font-size:12.5px}
.m3p-det{margin-top:14px;border:1.5px solid #E6EAEE;border-radius:12px;padding:10px 12px}
.m3p-det summary{font-size:13.5px;font-weight:800;cursor:pointer;list-style:none}
.m3p-det summary::-webkit-details-marker{display:none}
.m3p-det summary::before{content:'▸ ';color:#6B7380}
.m3p-det[open] summary::before{content:'▾ '}
.m3p-hist{list-style:none;margin:8px 0 0;padding:0;font-size:12.5px;color:#5B6472}
.m3p-hist li{padding:5px 0;border-top:1px solid #F0F2F5}
.m3p-hist b{color:#15171C}
.m3p-note label{display:block;font-size:13px;font-weight:800;margin-bottom:6px}
.m3p-note small{display:block;color:#6B7380;font-size:12px;margin:5px 0}

.m3p-cktop{background:#F4F7FA;border-radius:12px;padding:10px;font-size:13px;color:#3A4250;margin-bottom:8px}
.m3p-cktop .m3p-row2{margin-top:6px}
.m3p-ckg h4{margin:14px 0 6px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#6B7380}
.m3p-ck{display:flex;align-items:center;gap:8px;padding:7px 8px;border:1.5px solid #E6EAEE;border-radius:11px;margin-bottom:5px;background:#fff}
.m3p-ck .no{width:28px;font-size:12px;font-weight:800;color:#8A93A0;flex:none;text-align:center}
.m3p-ck .l{flex:1;min-width:0;font-size:13.5px;font-weight:700;line-height:1.25}
.m3p-ck .l small{display:block;font-size:11.5px;font-weight:700;color:#6B7380;margin-top:1px}
.m3p-ck.ok{background:#F2FAF5;border-color:#CFE9DA}.m3p-ck.fixed{background:#F2FAF5;border-color:#CFE9DA}
.m3p-ck.bad{background:#FFF5F5;border-color:#F3C4C4}.m3p-ck.bad .l small{color:#B71C1C}
.m3p-ckb{width:42px;height:40px;border:1.5px solid #D5DBE2;border-radius:10px;background:#fff;font-size:16px;font-weight:800;flex:none;padding:0;color:#5B6472}
.m3p-ckb.ok{color:#1F8A55}.m3p-ckb.ok.on{background:#1F8A55;border-color:#1F8A55;color:#fff}
.m3p-ckb.bad{color:#C62828}

/* modal: choose rooms / open another room */
.m3d-modal-host{position:absolute;z-index:20}
.m3d-modal-host.body{position:fixed;z-index:10090}
.m3d-modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(15,20,28,.45);display:flex;align-items:center;justify-content:center;padding:16px;z-index:10085;font-family:'Figtree','Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;color:#15171C}
.m3d-mbox{background:#fff;border-radius:18px;width:min(760px,100%);max-height:min(86vh,900px);max-height:min(86dvh,900px);display:flex;flex-direction:column;box-shadow:0 30px 80px rgba(0,0,0,.3);overflow:hidden}
.m3d-mhead{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid #EEF1F4}
.m3d-mhead>div{flex:1;min-width:0}
.m3d-mhead b{display:block;font-size:17px;font-weight:800}
.m3d-mhead span{display:block;font-size:12.5px;color:#5B6472;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m3d-mhead button{width:40px;height:40px;border:0;border-radius:11px;background:#EEF1F4;font-size:17px;font-weight:800;cursor:pointer}
.m3d-mquick{display:flex;gap:6px;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid #EEF1F4}
.m3d-mquick button{min-height:34px;padding:5px 11px;border:1.5px solid #D5DBE2;border-radius:10px;background:#fff;font-size:12.5px;font-weight:800;cursor:pointer}
.m3d-mgrid{overflow-y:auto;padding:6px 16px 12px;-webkit-overflow-scrolling:touch;flex:1;min-height:0;touch-action:pan-y;overscroll-behavior:contain}
.m3d-mfl h5{margin:12px 0 6px;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#6B7380}
.m3d-mfl>div{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px}
.m3d-mfl button{min-height:48px;border:1.5px solid #D5DBE2;border-radius:11px;background:#fff;font-size:15px;font-weight:800;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;padding:4px}
.m3d-mfl button small{font-size:10px;font-weight:700;color:#8A93A0;margin-top:2px}
.m3d-mfl button.on{background:#0E4C78;border-color:#0E4C78;color:#fff}.m3d-mfl button.on small{color:#CFE3F3}
.m3d-mfl button.has{background:#F6F8FA;color:#9AA2AE;border-style:dashed;cursor:not-allowed}
.m3d-mfl button.bad{border-color:#F3C4C4;background:#FFF5F5;color:#B71C1C}.m3d-mfl button.bad small{color:#C62828}
.m3d-mfl button.good{border-color:#CFE9DA;background:#F2FAF5;color:#17693F}
.m3d-mfoot{display:flex;align-items:center;gap:10px;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #EEF1F4}
.m3d-mfoot span{flex:1;font-size:13.5px;font-weight:700;color:#5B6472}

.m3d-toast{position:fixed;left:50%;bottom:calc(22px + env(safe-area-inset-bottom));transform:translate(-50%,30px);opacity:0;pointer-events:none;z-index:10120;background:#15171C;color:#fff;border-radius:14px;padding:10px 12px 10px 16px;display:flex;align-items:center;gap:12px;font:700 14px/1.3 'Figtree','Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;box-shadow:0 10px 30px rgba(0,0,0,.3);transition:opacity .2s,transform .2s;max-width:calc(100vw - 24px)}
.m3d-toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.m3d-toast button{height:34px;padding:0 12px;border:0;border-radius:9px;background:#F0A43A;color:#15171C;font-weight:800;font-size:13px;cursor:pointer;flex:none}
@media (max-width:899px){html.m3d-open .m3d-toast{bottom:var(--m3d-tb,22px);transform:translate(-50%,16px)}html.m3d-open .m3d-toast.show{transform:translate(-50%,0)}}

/* rooms without 3D: only the panel */
.m3d.no3d .m3d-stage{flex:none;width:0;overflow:visible}
.m3d.no3d .m3d-hud .m3d-top{position:fixed;z-index:5;max-width:600px}
.m3d.no3d .m3d-panel{flex:1;width:auto;max-width:760px;margin:0 auto;padding-top:calc(76px + env(safe-area-inset-top));border-left:0;box-shadow:none;background:transparent}
.m3d.no3d .m3p-head,.m3d.no3d .m3p-body{background:#fff}
.m3d.no3d .m3p-head{border-radius:16px 16px 0 0}
.m3d.no3d .m3p-head .m3d-ur{display:flex}
.m3d.no3d .m3p-x{display:none!important}

/* PC: room on the left, panel on the right */
@media (min-width:900px){
  .m3d-bot{right:0}
}
/* phone / small tablet: 3D full screen; the sheet slides up only when needed */
@media (max-width:899px){
  .m3d{display:block}
  .m3d-stage{position:absolute;top:0;right:0;bottom:0;left:0}
  .m3d-panel{position:absolute;left:0;right:0;bottom:0;width:auto;border-left:0;border-radius:22px 22px 0 0;box-shadow:0 -10px 34px rgba(20,30,40,.2);max-height:58vh;max-height:58dvh;transform:translateY(calc(100% + 40px));visibility:hidden;transition:transform .26s cubic-bezier(.2,.8,.2,1),visibility 0s linear .26s,max-height .22s ease;will-change:transform}
  .m3d-panel.open{transform:none;visibility:visible;transition:transform .26s cubic-bezier(.2,.8,.2,1),visibility 0s,max-height .22s ease}
  .m3d-panel.big{max-height:calc(100vh - 130px);max-height:calc(100dvh - 130px - env(safe-area-inset-top))}
  .m3p-head{cursor:pointer;padding:16px 10px 8px 14px;touch-action:none}
  .m3p-grab{display:block;position:absolute;top:6px;left:50%;width:44px;height:5px;border-radius:3px;background:#CBD2DA;margin-left:-22px}
  .m3p-head .m3d-ur,.m3p-x{display:flex}
  .m3p-counts{display:none}
  .m3p-room b{font-size:16px}
  .m3p-body{padding:10px 12px calc(16px + env(safe-area-inset-bottom))}
  .m3d.no3d .m3d-panel{position:absolute;top:0;max-height:none;border-radius:0;padding-top:calc(76px + env(safe-area-inset-top));background:#EEF1F4;transform:none;visibility:visible;box-shadow:none}
  .m3d.no3d .m3p-grab{display:none}
  .m3d.no3d .m3p-head{cursor:default;padding-top:12px}
  .m3d-modal{align-items:flex-end;padding:0}
  .m3d-mbox{border-radius:20px 20px 0 0;max-height:92vh;max-height:92dvh;width:100%}
}
@media (max-width:420px){
  .m3d-bar{padding:6px;gap:7px}
  .m3d-title{font-size:14.5px}
  .m3d-sub{font-size:12px}
  .m3d-vseg button{min-width:36px;padding:0 7px;font-size:13px}
  .m3d-x{width:40px;height:40px}
  .m3p-row2 .m3p-btn{min-width:0}
  .m3d-dock{gap:6px;padding:7px}
  .m3d-dock button{font-size:14px;padding:0 8px}
  .m3d-dk-list span{font-size:13.5px}
}

/* room popup button */
.m3d-roombtn-open{display:inline-flex!important;align-items:center;gap:6px;background:#0E4C78!important;border-color:#0E4C78!important;color:#fff!important;font-weight:800!important}
.m3d-roombtn-open svg{flex:none}
.m3d-roombtn-open b{background:#DC3D3D;color:#fff;border-radius:999px;padding:1px 7px;font-size:11px;margin-left:2px}

/* ───────── admin tab ───────── */
.m3t{max-width:1240px;margin:0 auto;padding:16px 16px 48px;font-family:'Figtree','Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;color:#15171C}
.m3t-head{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}
.m3t-hl{min-width:0}
.m3t-head h2{margin:0;font-size:23px;font-weight:800;letter-spacing:-.015em}
.m3t-head p{margin:3px 0 0;font-size:13px;color:#5B6472;font-weight:600}
.m3t-head p .r{color:#C62828}.m3t-head p .g{color:#1F8A55}
.m3t-ur .m3d-ur button{width:44px;height:44px;border:1.5px solid #E1E5EA;border-radius:13px;background:#fff;display:flex;align-items:center;justify-content:center;color:#15171C;cursor:pointer;padding:0}
.m3t-ur .m3d-ur{display:flex;gap:6px}
.m3t-ur .m3d-ur button.off{color:#C2C8D0}
.m3t-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.m3t-stat{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px 12px 18px;border:1.5px solid #E6EAEE;border-radius:16px;background:#fff;text-align:left;cursor:pointer;font-family:inherit;overflow:hidden}
.m3t-stat::before{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;background:#9AA3AE}
.m3t-stat.r::before{background:#DC3D3D}.m3t-stat.o::before{background:#EA580C}.m3t-stat.b::before{background:#0E4C78}.m3t-stat.g::before{background:#1F8A55}
.m3t-stat b{font-size:26px;font-weight:800;line-height:1.05}
.m3t-stat.r b{color:#C62828}.m3t-stat.o b{color:#C2410C}.m3t-stat.b b{color:#0E4C78}.m3t-stat.g b{color:#1F8A55}
.m3t-stat b small{font-size:12px;font-weight:800;opacity:.85}
.m3t-stat span{font-size:12.5px;font-weight:700;color:#5B6472}
.m3t-stat:hover{border-color:#C9D2DC}
.m3t-seg{display:flex;gap:4px;background:#E9EDF1;border-radius:14px;padding:4px;margin-bottom:12px;max-width:720px}
.m3t-seg button{flex:1;height:42px;border:0;border-radius:11px;background:transparent;font-size:14px;font-weight:800;color:#5B6472;cursor:pointer;white-space:nowrap;font-family:inherit;padding:0 8px}
.m3t-seg button.on{background:#fff;color:#15171C;box-shadow:0 1px 4px rgba(20,30,40,.12)}
.m3t-seg .ph{display:none}
.m3t-head .nw{white-space:nowrap}
.m3t-seg button b{display:inline-block;min-width:20px;padding:1px 6px;border-radius:999px;background:#DC3D3D;color:#fff;font-size:11.5px;margin-left:3px}
.m3t-filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:10px}
.m3t-seg2{display:flex;gap:3px;background:#E9EDF1;border-radius:11px;padding:3px}
.m3t-seg2 button{height:34px;padding:0 13px;border:0;border-radius:8px;background:transparent;font-weight:800;font-size:13px;color:#5B6472;cursor:pointer;font-family:inherit;white-space:nowrap}
.m3t-seg2 button.on{background:#fff;color:#15171C}
.m3t-seg2 button.open.on{background:#DC3D3D;color:#fff}.m3t-seg2 button.fixed.on{background:#1F8A55;color:#fff}
.m3t-q{flex:1;min-width:200px;height:40px;border:1.5px solid #D5DBE2;border-radius:11px;padding:0 12px;font-size:15px;font-family:inherit;outline:none;background:#fff}
.m3t-q:focus{border-color:#0E4C78}
.m3t-cats{display:flex;gap:6px;flex-wrap:wrap;width:100%}
.m3t-cats button,.m3t-rf button{min-height:34px;padding:4px 12px;border:1.5px solid #DDE2E8;border-radius:999px;background:#fff;font-size:12.5px;font-weight:800;color:#3A4250;cursor:pointer;font-family:inherit;white-space:nowrap}
.m3t-cats button.on,.m3t-rf button.on{background:#15171C;border-color:#15171C;color:#fff}
.m3t-cats b{color:#C62828}.m3t-cats .on b{color:#FFB4B4}
.m3t-rf{display:flex;gap:6px;margin:0 0 4px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.m3t-rf::-webkit-scrollbar{display:none}

/* room tiles */
.m3t-floor h3{display:flex;align-items:baseline;gap:10px;margin:18px 0 9px;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#3A4250}
.m3t-floor h3 span{font-size:12px;letter-spacing:0;text-transform:none}
.m3t-floor h3 em{font-style:normal;font-weight:800}
.m3t-floor h3 em.r{color:#C62828}.m3t-floor h3 em.g{color:#1F8A55}
.m3t-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.m3t-tile{position:relative;min-height:96px;border:1.5px solid #E4E8ED;border-radius:16px;background:#fff;text-align:left;padding:10px 12px 12px;cursor:pointer;display:flex;flex-direction:column;gap:3px;font-family:inherit;color:#15171C;overflow:hidden;transition:border-color .12s,box-shadow .12s,transform .08s}
.m3t-tile:hover{border-color:#0E4C78;box-shadow:0 6px 18px rgba(14,76,120,.12)}
.m3t-tile:active{transform:scale(.98)}
.m3t-tile .tn{display:flex;align-items:center;justify-content:space-between;gap:6px}
.m3t-tile .tn b{font-size:21px;font-weight:800;line-height:1.05;letter-spacing:-.01em}
.m3t-tile .tn em{font-style:normal;min-width:26px;height:26px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:13.5px;font-weight:800;padding:0 7px;flex:none}
.m3t-tile .tn em.cnt{background:#DC3D3D;color:#fff}
.m3t-tile .tn em.ok{background:#1F8A55;color:#fff}
.m3t-tile .ty{font-size:11px;font-weight:800;color:#8A93A0;letter-spacing:.03em}
.m3t-tile .ty .u{color:#DC2626}
.m3t-tile .pr{font-size:12.5px;font-weight:700;line-height:1.25;color:#8A93A0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:1px}
.m3t-tile .pm{font-size:11.5px;font-weight:800;color:#C62828}
.m3t-tile .bar{position:absolute;left:0;right:0;bottom:0;height:4px;background:#EEF1F4}
.m3t-tile .bar i{display:block;height:100%;background:#7FB89A}
.m3t-tile.bad{border-color:#F2C2C2;background:linear-gradient(180deg,#FFF6F6 0%,#FFFFFF 70%)}
.m3t-tile.bad .pr{color:#9B1C1C}
.m3t-tile.good{border-color:#CDE8D8;background:linear-gradient(180deg,#F3FBF6 0%,#FFFFFF 70%)}
.m3t-tile.good .pr{color:#17693F}
.m3t-tile.none .tn b{color:#3A4250}
.m3t-tile.urg{border-color:#DC2626;box-shadow:inset 0 0 0 1px #DC2626}

/* problem rows (Recent, Problem types, All problems) */
.m3t-day{margin:16px 0 8px;font-size:13px;font-weight:800;color:#3A4250;text-transform:uppercase;letter-spacing:.05em}
.m3t-sub{font-size:13px;color:#5B6472;margin:4px 0 8px;font-weight:600}
.m3t-link{border:0;background:none;color:#1F8A55;font-weight:800;cursor:pointer;font-size:13px;padding:0;text-decoration:underline;font-family:inherit}
.m3t-type{border:1.5px solid #E1E5EA;border-radius:14px;background:#fff;margin-bottom:8px;overflow:hidden}
.m3t-type.open{border-color:#0E4C78}
.m3t-th{width:100%;display:flex;align-items:center;gap:10px;padding:11px 12px;border:0;background:#fff;text-align:left;cursor:pointer;font-family:inherit;color:#15171C}
.m3t-th>i{width:12px;height:12px;border-radius:4px;flex:none}
.m3t-th .m3t-tt{flex:1;min-width:0}
.m3t-th .m3t-tt b{display:block;font-size:15px;font-weight:800}
.m3t-th .m3t-tt small{display:block;font-size:12px;color:#6B7380;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m3t-th .m3t-tc{display:flex;gap:6px;flex:none}
.m3t-th .m3t-tc em{font-style:normal;font-size:12px;font-weight:800;padding:4px 9px;border-radius:999px}
.m3t-th .m3t-tc em.r{background:#FDECEC;color:#B71C1C}.m3t-th .m3t-tc em.g{background:#E7F6EE;color:#17693F}
.m3t-th .m3t-chev{color:#8A93A0;font-size:14px;flex:none}
.m3t-tb{padding:0 12px 12px;border-top:1px solid #EEF1F4}
.m3t-bulk{display:flex;gap:6px;flex-wrap:wrap;padding:10px 0}
.m3t-bulk button{min-height:38px;padding:5px 12px;border:1.5px solid #D5DBE2;border-radius:10px;background:#fff;font-size:13px;font-weight:800;cursor:pointer;font-family:inherit;color:#15171C}
.m3t-bulk .ok{background:#1F8A55;border-color:#1F8A55;color:#fff}
.m3t-bulk .warn{color:#B71C1C;border-color:#F3C4C4;background:#FFF7F7}
.m3t-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1.5px solid #F1CDCD;border-left:6px solid #DC3D3D;border-radius:14px;margin-bottom:8px;background:#FFF9F9}
.m3t-row.urg{border-color:#E9A3A3;border-left-color:#B91C1C}
.m3t-row.fixed{background:#F5FBF7;border-color:#D2ECDD;border-left-color:#1F8A55}
.m3t-rn{min-width:58px;height:50px;border:0;border-radius:12px;background:#DC3D3D;color:#fff;font-weight:800;font-size:16px;cursor:pointer;font-family:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.05;padding:0 6px;flex:none}
.m3t-rn small{font-size:8.5px;letter-spacing:.07em;opacity:.8;font-weight:800}
.m3t-row.fixed .m3t-rn{background:#1F8A55}
.m3t-rt{flex:1;min-width:0}
.m3t-rt b{display:block;font-size:14.5px;font-weight:800;line-height:1.25}
.m3t-row.fixed .m3t-rt b{color:#2F6B4D}
.m3t-rt small{display:block;font-size:12px;color:#6B7380;line-height:1.4}
.m3t-rt small i{display:inline-block;width:8px;height:8px;border-radius:3px;margin-right:5px;vertical-align:0}
.m3t-rt small.tm{font-weight:700}
.m3t-rt small.tm.r{color:#B71C1C}.m3t-rt small.tm.g{color:#17693F}
.m3t-row.fixed .m3t-rt small.tm.r{color:#8A93A0}
.m3t-rt small.nt{color:#6B4E00}
.m3t-ra{display:flex;gap:6px;flex:none;align-items:center}
.m3t-ra button{min-height:42px;padding:6px 12px;border:1.5px solid #D5DBE2;border-radius:12px;background:#fff;font-size:13.5px;font-weight:800;cursor:pointer;font-family:inherit;color:#15171C;white-space:nowrap}
.m3t-ra .ok{background:#1F8A55;border-color:#1F8A55;color:#fff;min-width:104px}
.m3t-ra .back{color:#B71C1C;border-color:#F3C4C4;background:#fff}
.m3t-ra .rm{width:42px;padding:0}
.m3t-empty{padding:30px 16px;text-align:center;color:#6B7380;background:#F6F8FA;border-radius:14px;font-size:14px;margin-top:8px}
@media (max-width:640px){
  .m3t{padding:12px 10px 48px}
  .m3t-head h2{font-size:20px}
  .m3t-head p{font-size:12px}
  .m3t-stats{grid-template-columns:1fr 1fr;gap:8px}
  .m3t-stat{padding:10px 12px 10px 16px}
  .m3t-stat b{font-size:23px}
  .m3t-seg button{font-size:13px;height:40px;padding:0 4px}
  .m3t-seg .pc{display:none}
  .m3t-seg .ph{display:inline}
  .m3t-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .m3t-tile{min-height:92px;padding:8px 9px 11px;border-radius:14px}
  .m3t-tile .tn b{font-size:18.5px}
  .m3t-tile .tn em{min-width:22px;height:22px;font-size:12px;border-radius:8px;padding:0 5px}
  .m3t-tile .pr{font-size:11.5px}
  .m3t-row{flex-wrap:wrap;gap:10px;padding:10px}
  .m3t-rt{flex:1 1 calc(100% - 80px)}
  .m3t-ra{width:100%;justify-content:flex-end}
  .m3t-ra .ok{flex:1;min-height:44px}
}

/* v143: choose problems, then ✓ Submit (nothing is saved by a normal tap) */
.m3p-foot{flex:none;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #E6EAEE;background:#fff;box-shadow:0 -8px 20px rgba(20,30,40,.07);position:relative;z-index:2}
.m3d-panel.has-foot .m3p-body{padding-bottom:14px}
.m3p-sevrow{display:flex;align-items:center;gap:5px;margin-bottom:8px;overflow-x:auto;scrollbar-width:none;touch-action:pan-x}
.m3p-sevrow::-webkit-scrollbar{display:none}
.m3p-sevrow>span{font-size:11px;font-weight:800;color:#6B7380;text-transform:uppercase;letter-spacing:.04em;margin-right:3px;white-space:nowrap;flex:none}
.m3p-sevrow .m3p-sev{min-height:32px;padding:4px 10px;font-size:12px;flex:none}
.m3p-subrow{display:flex;gap:8px}
.m3p-subrow .m3p-btn{min-height:50px;margin:0}
.m3p-subrow .go{flex:1;font-size:16px;border-radius:14px}
.m3p-btn[disabled]{opacity:1;background:#EEF1F4;border-color:#E1E5EA;color:#7A828E;font-size:14px}
.m3p-chip.pk.on{background:var(--c,#15171C);border-color:var(--c,#15171C);color:#fff;box-shadow:0 3px 10px rgba(20,30,40,.18)}
.m3p-chip.own{background:#FFFBEA;border-color:#F0D78C}
.m3p-chip.own.on,.m3p-chip.opt.on{background:var(--c,#15171C);border-color:var(--c,#15171C);color:#fff}
.m3p-chip.newc{border:1.5px dashed #9FB7CC;background:#F2F7FB;color:#0E4C78;font-weight:800}
.m3p-cw{display:inline-flex;align-items:stretch;max-width:100%}
.m3p-cw .m3p-chip{border-top-right-radius:0;border-bottom-right-radius:0;min-width:0}
.m3p-cx{border:1.5px solid #F0D78C;border-left:0;background:#FFF3CC;color:#8A6A00;border-radius:0 12px 12px 0;width:34px;font-size:12px;font-weight:800;padding:0;flex:none}
.m3p-cw .m3p-chip.on+.m3p-cx{border-color:var(--c,#15171C)}
.m3p-addnew{background:#F2F7FB;border:1.5px dashed #9FB7CC;border-radius:14px;padding:10px;margin:8px 0 4px}
.m3p-addnew label{display:block;font-size:14px;font-weight:800;color:#0E4C78;margin-bottom:7px}
.m3p-addnew small{display:block;font-size:11.5px;color:#5B6472;font-weight:600;margin-top:6px;line-height:1.3}
.m3p-addnew .m3p-btn{min-height:44px}
.m3p-addbtn.here{margin:12px 0 2px}
.m3p-ck.pend{border-color:#DC3D3D;background:#FFF5F5}
.m3p-ckb.bad.on{background:#DC3D3D;border-color:#DC3D3D;color:#fff}
.m3p-ckc{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 9px;margin:-2px 0 7px;border:1.5px solid #F3C4C4;border-radius:11px;background:#FFF5F5;font-size:13px}
.m3p-ckc span{flex:1;min-width:150px;color:#8E1B1B;font-weight:600;line-height:1.3}
.m3p-ckc .m3p-btn{min-height:40px;margin:0;padding:6px 12px}
.m3d-hint.act span small{display:block;font-size:11.5px;font-weight:600;opacity:.85;margin-top:2px}
.m3d-hint.act.on{background:#155E3B;box-shadow:0 6px 20px rgba(21,94,59,.35)}
.m3d-hint.act.on button{color:#155E3B}
.m3d-hint.act button.go{background:#fff;color:#155E3B;font-size:14px;min-width:104px;box-shadow:0 0 0 2px rgba(255,255,255,.5)}
.m3d-bot.place .m3d-hint{align-self:stretch;max-width:none;padding:10px 10px 10px 14px;border-radius:18px;font-size:14px}
.m3d-bot.place .m3d-hint button{height:48px;border-radius:13px;font-size:14px;padding:0 14px}
.m3d-bot.place .m3d-hint span{min-width:0;flex:1 1 100%}
.m3d-bot.place .m3d-hint.on span,.m3d-bot.place .m3d-hint.act span{flex-basis:100%}
.m3d-bot.place .m3d-hint button.go{flex:1}
