@font-face{font-family:'Exo 2';src:url('./Exo2.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}@font-face{font-family:Tektur;src:url('./Tektur.ttf') format('truetype');font-weight:400 900;font-style:normal;font-display:swap}

:root{font-family:"Exo 2","Arial",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;color:#202123;background:#e7e8e7}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,input:focus-visible{outline:2px solid currentColor;outline-offset:4px}svg{display:block;flex-shrink:0}
.stage{max-width:1110px;margin:0 auto;padding:44px 22px 55px}
.page-heading{display:flex;align-items:end;justify-content:space-between;gap:25px;margin:0 0 21px}
.overline{margin:0 0 9px;letter-spacing:.23em;font-weight:800;font-size:10px;color:#757979}
h1{font-family:"Tektur","Exo 2",sans-serif;margin:0;font-size:clamp(25px,3.1vw,39px);line-height:1.14;font-weight:700;letter-spacing:-.028em}
.description{color:#818484;max-width:300px;text-align:right;font-size:11px;line-height:1.55;margin:0}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:11px;flex-wrap:wrap;margin:0 0 24px}
.demo-modes{background:#d7d9d8;border:1px solid #c9cecb;border-radius:999px;display:flex;padding:4px;gap:3px;overflow:auto;max-width:100%}
.demo-modes button{font-size:11px;font-weight:670;border:0;background:none;color:#636768;border-radius:999px;padding:10px 13px;white-space:nowrap;transition:background .2s,color .2s}
.demo-modes button[aria-pressed=true]{background:#fff;color:#171918;box-shadow:0 2px 7px #1013121a}
.toolbar-note{font-size:11px;color:#8c8e8d}
.phones{display:flex;justify-content:center;align-items:flex-start;gap:34px;flex-wrap:wrap}
.specimen{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.spec-label{display:flex;gap:11px;align-items:center;padding:0 0 0 10px;font-size:10px;font-weight:750;letter-spacing:.17em;text-transform:uppercase;color:#7b7e7d}
.spec-label b{display:grid;place-items:center;background:#d1d4d2;color:#505554;border-radius:6px;width:26px;height:21px;font-size:10px;letter-spacing:.08em}
.phone{--bg:#f9f9f8;--fg:#141616;--muted:#828688;--border:#e2e4e3;--card:#fff;--soft:#f0f1f0;--btn:#121515;--btn-fg:#fff;--orb-rgb:25,27,28;--orb-glow:#b6babb32;--shade:rgba(20,24,24,.08);--line:rgba(30,35,35,.10);width:390px;height:844px;position:relative;overflow:hidden;isolation:isolate;flex:none;background:var(--bg);color:var(--fg);border:1px solid #d6d9d7;border-radius:46px;box-shadow:0 22px 60px #29332e26,0 5px 12px #29332e12;transition:background .32s,color .32s;touch-action:manipulation}
.phone[data-theme=dark]{--bg:#0f1012;--fg:#f5f5f5;--muted:#96999a;--border:#323537;--card:#1b1c1e;--soft:#26282a;--btn:#f3f4f4;--btn-fg:#111315;--orb-rgb:236,238,239;--orb-glow:#a4a8ad18;--shade:rgba(0,0,0,.42);--line:rgba(230,234,234,.11);border-color:#313437;box-shadow:0 25px 64px #090c0c70,0 5px 18px #0a0c0e33}
.phone:before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-1;background:radial-gradient(ellipse 240px 330px at 50% 41%,var(--orb-glow),transparent 86%)}
.status-bar{height:42px;padding:17px 27px 0;display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:760;line-height:1}
.status-icons{display:flex;align-items:center;gap:6px}.status-icons svg{height:13px;width:18px}.status-icons svg:last-child{width:24px}
.brand{font-family:"Tektur","Exo 2",sans-serif;position:absolute;top:64px;left:29px;margin:0;font-size:19px;font-weight:700;line-height:1.2;letter-spacing:.035em;white-space:nowrap;user-select:none;z-index:2}
.orb-area{position:absolute;left:50%;top:218px;width:330px;height:330px;transform:translateX(-50%);transition:top .67s cubic-bezier(.21,.82,.21,1),width .67s cubic-bezier(.21,.82,.21,1),height .67s cubic-bezier(.21,.82,.21,1);z-index:1;pointer-events:none;will-change:width,top}
.orb-halo{position:absolute;inset:4%;border-radius:50%;background:radial-gradient(ellipse at 50% 49%,var(--orb-glow) 0%,transparent 66%);filter:blur(17px);opacity:.9}
.orbit-rings{position:absolute;inset:7%;border:1px solid var(--line);border-radius:50%;opacity:.48}
.orbit-rings:before,.orbit-rings:after{content:"";position:absolute;inset:11%;border:1px solid var(--line);border-radius:50%}.orbit-rings:after{inset:23%;opacity:.7}
.orb-canvas{display:block;position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 3px 10px var(--orb-glow));opacity:.94}
.phone:not([data-state=idle]) .orb-area{top:169px;width:184px;height:184px}
.phone[data-state=thinking] .orb-area{top:160px;width:198px;height:198px}
.phone[data-state=answer] .orb-area{top:158px;width:175px;height:175px}
.response-card{position:absolute;top:354px;left:23px;right:23px;height:265px;border-radius:27px;background:var(--card);border:1px solid var(--border);box-shadow:0 14px 31px var(--shade);padding:17px 18px 16px;opacity:0;visibility:hidden;transform:translateY(18px) scale(.98);transition:opacity .35s,transform .45s cubic-bezier(.2,.8,.2,1),visibility 0s .35s;z-index:3;display:flex;flex-direction:column;overflow:hidden}
.phone:not([data-state=idle]) .response-card{opacity:1;visibility:visible;transform:translateY(0) scale(1);transition:opacity .35s,transform .45s cubic-bezier(.2,.8,.2,1)}
.response-top{display:flex;align-items:center;gap:8px;min-height:29px;flex:none}.response-avatar{width:27px;height:27px;display:grid;place-items:center;background:var(--soft);border-radius:50%;color:var(--fg)}.response-avatar svg{width:20px;height:20px}.response-name{font-family:"Tektur","Exo 2",sans-serif;font-size:11px;font-weight:700;letter-spacing:.055em}.response-demo{font-size:9px;color:var(--muted);margin-left:auto;letter-spacing:.13em}
.response-panel{display:none;flex-direction:column;flex:1;min-height:0}
.phone[data-state=typing] .response-panel[data-panel=typing],.phone[data-state=thinking] .response-panel[data-panel=thinking],.phone[data-state=answer] .response-panel[data-panel=answer]{display:flex}
.response-empty{margin:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);font-size:12px;gap:10px}
.response-empty svg{opacity:.48;width:27px;height:27px}
.response-working{padding-top:39px;color:var(--fg);font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:24px}
.skeleton{display:grid;gap:11px}.skeleton i{height:9px;border-radius:999px;background:linear-gradient(90deg,var(--soft) 14%,var(--border) 50%,var(--soft) 85%);background-size:200% 100%;animation:shimmer 1.25s linear infinite}.skeleton i:nth-child(2){width:82%}.skeleton i:nth-child(3){width:58%}
@keyframes shimmer{to{background-position-x:-200%}}
.response-answer{font-size:13px;line-height:1.58;letter-spacing:-.02em;color:var(--fg);margin:21px 0 8px;max-height:130px;overflow:auto;scrollbar-width:thin;overflow-wrap:anywhere}
.response-tools{margin-top:auto;display:flex;border-top:1px solid var(--border);padding-top:10px;gap:7px;justify-content:space-around}
.response-tools button{border:0;color:var(--muted);background:transparent;min-height:36px;font-size:10px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:5px;padding:4px 6px;border-radius:9px}.response-tools button:hover{background:var(--soft);color:var(--fg)}.response-tools svg{width:15px;height:15px}
.source-notice{position:absolute;inset:8px;z-index:5;border-radius:20px;background:var(--card);border:1px solid var(--border);padding:19px;display:none;flex-direction:column;justify-content:space-between;box-shadow:0 2px 15px var(--shade)}.source-notice.open{display:flex}.source-notice strong{font-family:"Tektur","Exo 2",sans-serif;font-size:13px;font-weight:650}.source-notice p{font-size:12px;line-height:1.5;color:var(--muted)}.source-notice button{align-self:flex-start;border:1px solid var(--border);background:var(--soft);color:var(--fg);font-size:11px;border-radius:9px;padding:9px 13px}
.query-form{position:absolute;left:24px;right:24px;bottom:119px;height:66px;display:flex;align-items:center;gap:13px;background:var(--card);border:1px solid var(--border);border-radius:24px;padding:8px 8px 8px 17px;box-shadow:0 8px 31px var(--shade);z-index:4;transition:bottom .43s cubic-bezier(.21,.82,.21,1)}
.phone:not([data-state=idle]) .query-form{bottom:108px}
.query-form .query-star{width:26px;height:26px;opacity:.84;flex:none}.query-form input{outline:0;border:0;min-width:0;flex:1;background:transparent;color:var(--fg);font-size:12px;font-weight:550;letter-spacing:-.01em}.query-form input::placeholder{color:var(--muted);opacity:1}.query-form:focus-within{border-color:var(--fg)}
.send{width:48px;height:48px;border-radius:17px;flex:none;border:0;background:var(--btn);color:var(--btn-fg);display:grid;place-items:center}.send svg{width:21px;height:21px;transition:transform .2s}.send:active svg{transform:translateX(3px)}
.nav{position:absolute;left:0;right:0;bottom:0;height:86px;background:var(--card);border-top:1px solid var(--border);border-radius:29px 29px 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;justify-items:center;padding:0 15px;z-index:5}
.nav-btn{width:58px;height:58px;display:grid;place-items:center;border:0;background:transparent;color:var(--muted);border-radius:19px;transition:background .15s,color .15s,transform .15s;position:relative}.nav-btn svg{width:31px;height:31px;stroke-width:1.9}.nav-btn:not(.nav-main):active{transform:scale(.9)}.nav-btn:not(.nav-main):hover{color:var(--fg)}.nav-main:hover,.nav-main:focus-visible{color:var(--btn-fg)}.nav-main{width:70px;height:70px;border-radius:24px;background:var(--btn);color:var(--btn-fg);box-shadow:0 8px 23px var(--shade);border:0}.nav-main svg{width:46px;height:46px}.nav-btn[aria-current=page]:not(.nav-main){color:var(--fg)}
.toast{position:absolute;bottom:201px;left:24px;right:24px;padding:12px 14px;background:var(--btn);color:var(--btn-fg);border-radius:14px;font-size:11px;font-weight:650;line-height:1.4;z-index:8;pointer-events:none;opacity:0;transform:translateY(8px);transition:.24s;text-align:center}.toast.visible{opacity:1;transform:translateY(0)}
.footnote{max-width:680px;color:#858888;font-size:11px;line-height:1.65;margin:28px auto 0;text-align:center}.footnote code{color:#404344;background:#d5d8d6;border-radius:5px;padding:1px 4px}
@media(max-width:850px){.stage{padding:22px 12px 34px}.page-heading{margin-bottom:18px}.description{display:none}.toolbar-note{display:none}.phones{gap:29px}.specimen{align-items:center}.page-heading{padding:0 4px}}
@media(max-width:420px){.phone{width:min(390px,calc(100vw - 24px));height:844px}.specimen{width:100%}.brand{font-size:19px}.orb-area{width:min(330px,86vw);height:min(330px,86vw)}.nav{padding-inline:5px}.nav-btn:not(.nav-main){width:52px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition-duration:.01ms!important}}
/* v1.2 — precision motion, rebuilt after analyzing real mobile taps.
   One coherent transition for active icon — no bouncing, overshoot, rotation,
   forced reflows, or keyframe restarts. NO active backing plate or underline.
   The main GRIMM action remains an anchored brand element. */
button{-webkit-tap-highlight-color:transparent}
.nav{isolation:isolate}
.nav-btn{z-index:1;transform:translate3d(0,0,0);will-change:transform;transition:color 190ms ease}
.nav-btn:not(.nav-main){background:transparent;box-shadow:none}
/* Prevent sticky :hover highlighting inactive icons on Android touch browsers. */
.nav-btn:not(.nav-main):not(.is-active):hover{color:var(--muted)}
.nav-btn:not(.nav-main) svg{
  opacity:.72;
  transform:translate3d(0,0,0) scale(1);
  transition:transform 210ms cubic-bezier(.22,.8,.24,1),opacity 190ms ease;
  will-change:transform,opacity;
}
.nav-btn.is-active:not(.nav-main){color:var(--fg);background:transparent;box-shadow:none}
.nav-btn.is-active:not(.nav-main) svg{opacity:1;transform:translate3d(0,-1px,0) scale(1.055)}
.nav-btn:not(.nav-main):active{transform:none}
.nav-btn:not(.nav-main).is-pressed svg{transform:translate3d(0,1px,0) scale(.955)}
.nav-main,.nav-main.is-active{
  border:0;
  box-shadow:0 8px 23px var(--shade);
  transform:translate3d(0,0,0);
  transition:transform 180ms cubic-bezier(.22,.8,.24,1),box-shadow 180ms ease;
}
.nav-main.is-pressed,.nav-main:active{transform:scale(.955);box-shadow:0 5px 14px var(--shade)}
.nav-main svg{transition:none;animation:none!important}
@media(prefers-reduced-motion:reduce){
  .nav-btn,.nav-btn svg,.nav-main{animation:none!important;transition:none!important}
}
/* Optional diagnostic; invisible inside the app unless explicitly enabled. */
.fps-toggle{border:1px solid #bfc3c0;border-radius:999px;background:#f8f9f8;color:#373c3a;padding:8px 12px;font-weight:700;font-size:11px;letter-spacing:.02em;cursor:pointer}
.fps-toggle[aria-pressed=true]{background:#121515;color:#fff;border-color:#121515}
.fps-badge{display:none;position:absolute;right:24px;top:62px;z-index:10;padding:6px 9px;border-radius:9px;background:var(--soft);color:var(--fg);font:600 11px/1.3 "Exo 2",Arial,sans-serif;font-variant-numeric:tabular-nums;pointer-events:none}
.phone[data-fps=on] .fps-badge{display:block}
/* v0.8 — submit button: press, ripple, spinner and acknowledgement. */
.send{position:relative;overflow:hidden;isolation:isolate;transition:transform 210ms cubic-bezier(.24,.89,.32,1),box-shadow 250ms ease,background 250ms ease}
.send:active,.send[data-send-phase=press]{transform:scale(.86);box-shadow:0 0 0 5px var(--soft),0 0 0 6px var(--border)}
.send[data-send-phase=loading]{transform:scale(.97);box-shadow:0 0 0 3px var(--soft)}
.send[data-send-phase=sent]{transform:scale(1);box-shadow:0 0 0 5px var(--soft),0 0 0 7px var(--border)}
.send-ripple{position:absolute;width:12px;height:12px;border:1px solid var(--btn-fg);border-radius:50%;top:50%;left:50%;opacity:0;transform:translate(-50%,-50%) scale(.5);pointer-events:none}
.send[data-send-phase=press] .send-ripple{animation:send-ink-wave 460ms ease-out both}
@keyframes send-ink-wave{0%{opacity:.7;transform:translate(-50%,-50%) scale(.5)}100%{opacity:0;transform:translate(-50%,-50%) scale(5.2)}}
.send-symbol{position:absolute;inset:0;display:grid;place-items:center;transition:opacity 190ms ease,transform 250ms cubic-bezier(.18,.85,.19,1)}
.send-symbol svg{width:21px;height:21px}
.send-symbol--load,.send-symbol--done{opacity:0;transform:translateY(11px) scale(.65)}
.send[data-send-phase=loading] .send-symbol--arrow,.send[data-send-phase=sent] .send-symbol--arrow{opacity:0;transform:translateY(-13px) scale(.75)}
.send[data-send-phase=loading] .send-symbol--load,.send[data-send-phase=sent] .send-symbol--done{opacity:1;transform:translateY(0) scale(1)}
.send-symbol--load svg{animation:send-spinner 920ms linear infinite}
@keyframes send-spinner{to{transform:rotate(360deg)}}
.send[data-send-phase=sent] .send-symbol--done svg{animation:send-tick-pop 380ms cubic-bezier(.15,.89,.32,1.2) both}
@keyframes send-tick-pop{0%{transform:scale(.62) rotate(-15deg)}65%{transform:scale(1.18) rotate(5deg)}100%{transform:scale(1) rotate(0deg)}}
.query-form.needs-input{animation:query-nudge 340ms cubic-bezier(.4,0,.3,1) both}
@keyframes query-nudge{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}60%{transform:translateX(4px)}}
/* Don't animate for accessibility, but update selected state and response immediately. */
@media(prefers-reduced-motion:reduce){.nav-btn,.nav-btn svg,.send,.send-symbol{animation:none!important;transition:none!important}}

/* v1.0 — full-height conversational surface; the five-tab dock stays on the landing screen. */
.phone[data-view="conversation"] .fps-badge{display:none!important}
.phone[data-view="conversation"] .nav{pointer-events:none;visibility:hidden}
.phone[data-view="conversation"] .brand,.phone[data-view="conversation"] .orb-area,.phone[data-view="conversation"] .home-form{pointer-events:none}
.phone[data-view="conversation"] .orb-area{opacity:0;transform:translateX(-50%) translateY(-26px) scale(.48);transition:opacity .3s ease,transform .42s cubic-bezier(.2,.8,.2,1)}
.phone[data-view="conversation"] .brand{opacity:0;transition:opacity .17s}
.chat-sheet{position:absolute;z-index:11;inset:42px 0 0;background:var(--bg);display:flex;flex-direction:column;min-height:0;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(46px);transition:opacity .28s ease,transform .45s cubic-bezier(.18,.83,.18,1),visibility 0s .45s;overflow:hidden}
.phone[data-view="conversation"] .chat-sheet{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0);transition:opacity .25s,transform .44s cubic-bezier(.18,.83,.18,1),visibility 0s}
.chat-head{height:79px;flex:0 0 79px;display:flex;align-items:center;gap:10px;padding:8px 18px 10px 16px;border-bottom:1px solid var(--border);background:var(--bg)}
.chat-back{flex:0 0 36px;width:36px;height:42px;border:0;color:var(--fg);display:grid;place-items:center;border-radius:14px;background:transparent}
.chat-back:active{background:var(--soft);transform:scale(.96)}.chat-back svg{width:22px;height:22px}
.chat-mini{display:grid;place-items:center;width:51px;height:51px;flex:0 0 51px;border-radius:50%;overflow:hidden;background:radial-gradient(circle at center,var(--soft) 0%,transparent 77%);border:1px solid var(--border)}
.chat-mini canvas{width:51px;height:51px;display:block;filter:drop-shadow(0 0 5px var(--orb-glow))}
.chat-head-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}.chat-head-copy strong{font-family:'Tektur','Exo 2',sans-serif;letter-spacing:.065em;font-size:14px;font-weight:750;white-space:nowrap}.chat-head-copy span{color:var(--muted);font-size:10px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-demo{font-size:9px;letter-spacing:.10em;font-weight:800;color:var(--muted);background:var(--soft);border-radius:9px;padding:6px 7px;white-space:nowrap}
.chat-feed{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--border) transparent;display:flex;flex-direction:column;gap:17px;padding:26px 19px 23px;background:var(--bg)}
.chat-feed::-webkit-scrollbar{width:4px}.chat-feed::-webkit-scrollbar-thumb{background:var(--border);border-radius:99px}
.chat-empty{margin:auto;min-height:150px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;text-align:center;color:var(--muted);font-size:12px;line-height:1.6;padding:24px}
.chat-empty strong{font-family:'Tektur','Exo 2',sans-serif;font-weight:650;color:var(--fg);font-size:14px}
.chat-empty .empty-divider{width:28px;height:1px;background:var(--border)}
.dialog-turn{display:flex;flex-direction:column;gap:6px;max-width:100%;animation:turn-in 300ms cubic-bezier(.2,.8,.2,1) both}
@keyframes turn-in{from{opacity:0;transform:translateY(11px)}to{opacity:1;transform:translateY(0)}}
.dialog-turn--user{align-self:flex-end;width:max-content;max-width:91%;border-radius:19px 19px 6px 19px;padding:14px 16px;background:var(--soft);border:1px solid var(--border)}
.dialog-turn--user .turn-text{font-size:13px;color:var(--fg);line-height:1.6;font-weight:550;overflow-wrap:anywhere;white-space:pre-wrap}
.dialog-turn--ai{align-self:stretch;padding:1px 1px 8px;min-height:56px}
.ai-byline{display:flex;gap:9px;align-items:center;min-height:23px}.ai-byline strong{font-family:'Tektur','Exo 2',sans-serif;font-size:10px;letter-spacing:.065em}.ai-byline .ai-time{margin-left:auto;font-size:10px;color:var(--muted)}
.ai-byline .ai-indicator{width:7px;height:7px;background:var(--fg);opacity:.52;border-radius:100%}
.dialog-turn--ai[data-turn-state="thinking"] .ai-indicator{animation:thinking-pulse 920ms ease-in-out infinite}
@keyframes thinking-pulse{0%,100%{opacity:.35;transform:scale(.75)}50%{opacity:1;transform:scale(1.24)}}
.ai-content{margin:7px 0 10px;padding:0 2px 0 16px;border-left:2px solid var(--border);font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.ai-content.loading{display:flex;flex-direction:column;gap:12px;color:var(--muted)}
.ai-lines{display:flex;flex-direction:column;gap:9px;padding:3px 0}.ai-lines i{display:block;height:8px;border-radius:99px;background:linear-gradient(90deg,var(--soft),var(--border),var(--soft));background-size:180% 100%;animation:shimmer 1.15s linear infinite}.ai-lines i:nth-child(2){width:84%}.ai-lines i:nth-child(3){width:54%}
.ai-actions{display:flex;flex-wrap:wrap;gap:7px;padding-left:16px}.ai-actions button{display:inline-flex;align-items:center;gap:5px;background:transparent;border:1px solid var(--border);color:var(--muted);padding:8px 9px;min-height:34px;border-radius:11px;font-size:10px;font-weight:650;transition:background .16s}.ai-actions button svg{width:14px;height:14px}.ai-actions button:active{background:var(--soft)}
.chat-form{flex:0 0 auto;display:flex;align-items:center;gap:12px;margin:0;padding:12px 17px 18px;background:var(--card);border-top:1px solid var(--border);min-height:88px}
.chat-form .chat-input-mark{flex:0 0 23px;width:23px;height:23px;color:var(--fg);display:grid;place-items:center;opacity:.75}
.chat-form input{min-width:0;flex:1;outline:none;border:none;background:transparent;color:var(--fg);font-size:13px;font-weight:560;line-height:1.3}
.chat-form input::placeholder{color:var(--muted)}.chat-form .send{width:49px;height:49px}
.chat-sheet .chat-source{display:none;position:absolute;inset:78px 12px 101px;z-index:3;background:var(--card);border:1px solid var(--border);border-radius:22px;box-shadow:0 14px 38px var(--shade);padding:24px;overflow-y:auto;flex-direction:column;gap:15px}.chat-source[data-open="true"]{display:flex}.chat-source h3{font:700 15px/1.4 'Tektur','Exo 2',sans-serif;margin:0}.chat-source p{color:var(--muted);font-size:12px;line-height:1.7;margin:0}.chat-source button{border:1px solid var(--border);color:var(--fg);background:var(--soft);padding:12px 18px;border-radius:13px;margin-top:auto;align-self:flex-start}
.chat-toast{position:absolute;bottom:108px;left:28px;right:28px;border-radius:14px;padding:11px;text-align:center;color:var(--btn-fg);background:var(--btn);font-size:11px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;transform:translateY(9px);z-index:5}.chat-toast.visible{opacity:1;transform:translateY(0)}
@media(max-width:420px){.chat-head{padding-inline:12px}.chat-feed{padding:18px 16px 24px}.chat-form{padding-inline:13px}.chat-head-copy strong{font-size:13px}}
/* v1.1 — scrollable conversation regression fix.
   Each dialogue item MUST occupy its intrinsic content height; otherwise,
   flex-shrink:1 collapses long AI responses and action rows to min-height:56px,
   causing later messages to overlap text/actions in the same scroll viewport. */
.chat-feed > .dialog-turn{flex:0 0 auto;min-width:0}
.dialog-turn--ai{height:auto;overflow:visible}
.dialog-turn--ai .ai-actions{flex-shrink:0}
/* Scrollport remains a bounded flex child; the composer stays outside it. */
.chat-feed{min-height:0;overflow-y:auto;overscroll-behavior-y:contain}

@media(prefers-reduced-motion:reduce){.dialog-turn,.ai-lines i,.dialog-turn--ai .ai-indicator{animation:none!important}.chat-sheet{transition:none!important}}


/* G.R.I.M.M. Staff Communications — v1.3 extension to accepted v1.2. */
button, input, select, textarea { font-family: inherit }
select:focus-visible,textarea:focus-visible {outline:2px solid currentColor;outline-offset:2px}
.prototype-settings{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.prototype-settings label{display:flex;gap:6px;align-items:center;font-size:11px;color:#4a4e4d;font-weight:700}
.prototype-settings select,.prototype-settings button{border:1px solid #c9cdca;border-radius:13px;background:#f8f9f8;color:#292e2c;padding:8px 10px;font-size:11px;font-weight:650;min-height:36px}
.prototype-settings button{background:#202222;color:#fff;border-color:#202222}
.phone[data-view="staff"] .brand,.phone[data-view="staff"] .orb-area,.phone[data-view="staff"] .query-form,.phone[data-view="staff"] .response-card{visibility:hidden;pointer-events:none;opacity:0}
.phone[data-view="staff"][data-staff-depth="detail"] .nav{visibility:hidden;pointer-events:none}
.staff-shell{position:absolute;z-index:4;inset:42px 0 86px;display:none;flex-direction:column;background:var(--bg);overflow:hidden;isolation:isolate;transition:bottom 205ms cubic-bezier(.4,0,.2,1)}
.phone[data-view="staff"] .staff-shell{display:flex;animation:sc-arrive 190ms cubic-bezier(.22,.8,.24,1)}
.phone[data-view="staff"][data-staff-depth="detail"] .staff-shell{bottom:0}
@keyframes sc-arrive{from{opacity:.5;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.sc{--quiet:#a2a5a4;display:flex;flex-direction:column;flex:1;min-height:0;font-size:12px;color:var(--fg)}
.sc button{color:inherit;-webkit-tap-highlight-color:transparent}
.sc-head{padding:14px 23px 7px;display:flex;align-items:center;gap:12px;flex:0 0 auto;min-height:70px}
.sc-brandline{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.sc-context{display:flex;gap:7px;align-items:center;font-size:9px;letter-spacing:.16em;font-weight:770;color:var(--muted);text-transform:uppercase}
.sc-context:before{content:'';width:5px;height:5px;background:var(--fg);border-radius:50%;opacity:.7}
.sc-heading{font:700 26px/1.1 'Tektur','Exo 2',sans-serif;margin:0;letter-spacing:-.06em}
.sc-iconbtn{width:36px;height:36px;min-width:36px;border:0;background:transparent;border-radius:12px;display:grid;place-items:center;color:var(--fg);position:relative}
.sc-iconbtn svg{width:19px;height:19px}
.sc-iconbtn:active,.sc-iconbtn[aria-expanded=true]{background:var(--soft)}
.sc-iconbtn:disabled{opacity:.35}
.sc-hasdot:after{content:'';position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:var(--fg);box-shadow:0 0 0 2px var(--bg)}
.sc-filters{display:flex;flex:0 0 auto;gap:6px;padding:10px 22px 16px;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
.sc-filters::-webkit-scrollbar{display:none}
.sc-chip{min-height:31px;padding:7px 11px;border-radius:11px;border:1px solid var(--border);background:transparent;font-size:10px;font-weight:750;color:var(--muted)!important;letter-spacing:-.01em}
.sc-chip[data-selected=true]{background:var(--btn);border-color:var(--btn);color:var(--btn-fg)!important}
.sc-scroll,.sc-messages,.sc-search-results,.sc-media-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.sc-scroll{overflow-anchor:none;--sc-room-inset:18px}.sc-room-group{padding:0 var(--sc-room-inset,18px) 14px}.sc-room-list{padding:6px var(--sc-room-inset,18px) 14px}
.sc-grouphead{display:flex;align-items:center;gap:8px;padding:10px 5px 5px;text-transform:uppercase;font-size:9px;font-weight:800;letter-spacing:.15em;color:var(--muted)}
.sc-grouphead button{margin-left:auto;border:0;background:transparent;padding:4px;color:var(--muted)}
.sc-grouphead button svg{width:14px;height:14px;transition:transform .2s}
.sc-grouphead[data-folded=true] button svg{transform:rotate(-90deg)}
.sc-groupbody{height:auto;overflow:hidden;opacity:1;contain:layout}
.sc-groupbody-inner{min-height:0}
.sc-room-group[data-folded=true] .sc-groupbody{height:0;opacity:0;pointer-events:none}
.sc-room{width:100%;min-height:69px;text-align:left;display:flex;align-items:center;gap:11px;padding:9px 6px;border:0;border-bottom:1px solid var(--border);background:transparent}
.sc-room:last-child{border-bottom-color:transparent}
.sc-room:active{background:var(--soft);border-radius:12px}
.sc-roomicon{display:grid;place-items:center;width:41px;height:41px;flex:0 0 41px;border:1px solid var(--border);background:var(--soft);border-radius:15px;color:var(--fg);font:650 17px 'Tektur','Exo 2',sans-serif}
.sc-roomicon[data-kind=dm]{border-radius:50%;font-size:13px}
.sc-roomicon svg{width:18px;height:18px}
.sc-roomtext{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}
.sc-roomavatar{position:relative;display:block;width:41px;height:41px;flex:0 0 41px}.sc-roomavatar>.sc-count{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 4px;border:2px solid var(--bg);border-radius:9px;box-sizing:border-box;line-height:1;z-index:1}
.sc-roomtitle{display:flex;align-items:baseline;gap:7px;min-width:0}
.sc-roomtitle strong{font-size:15.6px;font-weight:770;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.sc-roomtitle time,.sc-roommeta time{margin-left:auto;font-size:9px;color:var(--muted);white-space:nowrap}
.sc-preview{color:var(--muted);font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.5}
.sc-count{font-size:9px;min-width:20px;height:20px;border-radius:8px;display:grid;place-items:center;padding:0 5px;background:var(--btn);color:var(--btn-fg);font-weight:750}
.sc-mention-dot{width:5px;height:5px;background:var(--fg);border-radius:50%;flex:0 0 5px}
.sc-recap{border:1px solid var(--border);background:var(--card);border-radius:17px;padding:11px 12px;margin:2px 22px 14px;box-shadow:0 5px 17px var(--shade)}
.sc-recap-top{display:flex;gap:8px;align-items:center}
.sc-recap-top svg{width:16px;height:16px;opacity:.8}
.sc-recap-top strong{font:670 12px/1.3 'Tektur','Exo 2',sans-serif;letter-spacing:-.035em}
.sc-recap-top span{font-size:10px;color:var(--muted);margin-left:auto}
.sc-recap-toggle{font-size:10px;font-weight:750;border:0;background:var(--soft);padding:6px 9px;border-radius:9px;white-space:nowrap}
.sc-recap-body{height:auto;overflow:hidden;opacity:1;contain:layout}
.sc-recap-inner{min-height:0}
.sc-recap[data-expanded=false] .sc-recap-body{height:0;opacity:0;pointer-events:none}
.sc-recap-sub{color:var(--muted);margin:9px 0 0;font-size:10px;line-height:1.45}
.sc-recap[data-expanded=true] .sc-recap-sub{display:none}
.sc-recap-lines{display:flex;flex-direction:column;gap:12px;margin-top:10px;padding:11px 3px 2px 0;border-top:1px solid var(--border);max-height:min(190px,32vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.sc-recap-entry{display:flex;flex-direction:column;gap:7px;align-items:stretch;min-width:0}
.sc-recap-entry span{display:block;min-width:0;color:var(--muted);font-size:10.5px;line-height:1.55;overflow-wrap:anywhere}
.sc-recap-entry button{align-self:flex-end;border:0;background:var(--soft);font-size:9px;border-radius:8px;padding:7px 10px;white-space:nowrap;min-height:28px}
.sc-banner{margin:2px 19px 10px;padding:10px 12px;background:var(--soft);border:1px solid var(--border);border-radius:13px;color:var(--fg);display:flex;align-items:center;gap:9px;line-height:1.45;font-size:10px}
.sc-banner svg{flex:0 0 17px;height:17px;width:17px}
.sc-banner span{flex:1}
.sc-banner button{border:0;background:var(--card);padding:6px 7px;border-radius:7px;font-size:9px}
.sc-detail-head{min-height:67px;height:67px;flex:0 0 67px;padding:9px 11px;display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--border);background:var(--bg)}
.sc-back{display:grid;place-items:center;flex:0 0 33px;width:33px;height:40px;border:0;border-radius:11px;background:transparent}.sc-back svg{width:21px;height:21px}
.sc-detail-head .sc-roomicon{height:36px;width:36px;flex-basis:36px;border-radius:12px;font-size:15px}
.sc-room-summary{display:flex;align-items:center;align-self:stretch;flex:1;min-width:0;gap:8px;padding:0;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.sc-room-summary:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.sc-detail-title{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.sc-detail-title strong{font:670 14px/1.15 'Tektur','Exo 2',sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.025em}
.sc-detail-title small{font-size:9px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-date{text-align:center;color:var(--muted);font-size:9px;letter-spacing:.05em;margin:18px 0 14px;font-weight:650}
.sc-messages{padding:2px 14px 23px;display:flex;flex-direction:column;gap:10px}
.sc-message{padding:5px 3px 7px;display:flex;align-items:flex-start;gap:10px;min-width:0;scroll-margin-top:18px}
.sc-message[data-mine=true] .sc-msgcontent{background:var(--soft);padding:11px;border:1px solid var(--border);border-radius:15px}
.sc-avatar{height:31px;width:31px;min-width:31px;border-radius:11px;background:var(--soft);border:1px solid var(--border);display:grid;place-items:center;font:650 10px 'Tektur','Exo 2',sans-serif;color:var(--fg)}
.sc-message[data-mine=true] .sc-avatar{border-radius:50%}
.sc-msgcontent{min-width:0;flex:1}
.sc-msgmeta{display:flex;gap:8px;align-items:baseline;margin-bottom:6px;min-width:0}.sc-msgmeta strong{font-size:11px;font-weight:800}.sc-msgmeta time{font-size:9px;color:var(--muted)}
.sc-msgtext{font-size:11.5px;line-height:1.62;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;color:var(--fg)}
.sc-highlight{font-weight:750;border-bottom:1px dotted currentColor}
.sc-quote{border-left:2px solid var(--muted);background:var(--soft);padding:6px 8px;border-radius:4px 9px 9px 4px;font-size:9px;color:var(--muted);line-height:1.5;margin-bottom:7px}
.sc-attachmentgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:11px 0 4px}
.sc-photo{display:block;width:100%;aspect-ratio:1 / 1;overflow:hidden;background:var(--soft);border:1px solid var(--border);border-radius:10px;position:relative;padding:0}
.sc-photo svg,.sc-photo img{width:100%;height:100%;display:block;object-fit:cover}
.sc-photo:active{transform:scale(.97)}
.sc-file{display:flex;gap:8px;align-items:center;text-align:left;width:100%;border:1px solid var(--border);background:var(--soft);border-radius:11px;padding:9px;margin-top:9px;font-size:10px;overflow:hidden}
.sc-file svg{width:20px;height:20px;flex:0 0 20px}
.sc-file span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.sc-msg-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}
.sc-small-action{display:inline-flex;align-items:center;gap:5px;color:var(--muted)!important;border:0;background:transparent;padding:5px 5px 5px 0;font-size:9px;font-weight:690;min-height:26px}
.sc-small-action svg{width:13px;height:13px}
.sc-issue{margin-top:9px;border:1px solid var(--border);border-left:2px solid var(--fg);border-radius:9px;background:var(--card);padding:10px}
.sc-issue-head{display:flex;gap:7px;align-items:center;font-size:10px;font-weight:800}
.sc-issue-head svg{height:14px;width:14px}
.sc-issue-desc{font-size:10px;color:var(--muted);line-height:1.5;margin:7px 0 9px;overflow-wrap:anywhere}
.sc-issue button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;max-width:100%;line-height:1.2;padding:8px 11px;border:1px solid var(--border);background:var(--soft);border-radius:9px;font-size:10px;font-weight:750}
.sc-created{display:flex;gap:7px;align-items:center;font-size:10px;color:var(--muted);font-weight:670;margin-top:9px}.sc-created svg{width:14px;height:14px}
.sc-notice{font-size:9px;color:var(--muted);line-height:1.4;margin-top:6px}
.sc-composer{background:var(--card);border-top:1px solid var(--border);padding:9px 13px 15px;flex:0 0 auto;position:relative}
.sc-replyto{display:flex;gap:7px;align-items:center;margin-bottom:6px;padding:6px 9px;border:1px solid var(--border);border-radius:9px;background:var(--soft);font-size:10px;color:var(--muted)}
.sc-replyto span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-replyto button{border:0;background:transparent;padding:3px}
.sc-composerbar{display:flex;align-items:flex-end;gap:7px}
.sc-plus{flex:0 0 34px;height:39px;border:0;display:grid;place-items:center;background:transparent;border-radius:10px;color:var(--muted)!important}
.sc-composer textarea{resize:none;background:transparent;border:0;min-width:0;flex:1;padding:11px 1px;font-size:12px;line-height:1.5;max-height:105px;min-height:39px;outline:0;color:var(--fg)}
.sc-composer textarea::placeholder{color:var(--muted)}
.sc-send{flex:0 0 39px;height:39px;width:39px;border:0;background:var(--btn);color:var(--btn-fg)!important;border-radius:12px;display:grid;place-items:center}
.sc-send svg{width:19px;height:19px}.sc-send:disabled{opacity:.5}
.sc-input-extra{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:6px}
.sc-input-extra span{font-size:9px;padding:5px 6px;border:1px solid var(--border);border-radius:7px;display:inline-flex;gap:4px;align-items:center;max-width:100%}
.sc-input-extra span b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:165px;font-weight:550}
.sc-input-extra button{border:0;background:transparent}
.sc-mentions{position:absolute;left:43px;right:52px;bottom:calc(100% - 2px);padding:7px;background:var(--card);border:1px solid var(--border);border-radius:13px;box-shadow:0 8px 18px var(--shade);display:flex;flex-direction:column;gap:2px;z-index:5;max-height:min(275px,48vh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;animation:sc-mentions-arrive 160ms cubic-bezier(.22,.8,.24,1) both}
@keyframes sc-mentions-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.sc-mentions button.sc-mention-option{border:0;background:transparent;min-height:43px;width:100%;padding:6px 9px;display:flex;gap:9px;align-items:center;font-size:11px;border-radius:9px;text-align:left;flex:0 0 auto;transition:background 130ms}
.sc-mentions button.sc-mention-option[aria-selected=true],.sc-mentions button.sc-mention-option:active{background:var(--soft)}
.sc-mention-icon{flex:0 0 28px;height:28px;border-radius:10px;background:var(--soft);display:grid;place-items:center}
.sc-mention-icon svg{width:15px;height:15px}
.sc-mention-label{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.sc-mention-label strong{font-size:11px;font-weight:780;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-mention-label small{font-size:9px;color:var(--muted);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-mentions-head{margin:4px 9px 6px;font-size:9px;color:var(--muted);font-weight:790;letter-spacing:.13em}
.sc-mentions-foot{margin:4px 7px 3px;font-size:9px;color:var(--muted);line-height:1.35}
.sc-unreadline{display:flex;gap:7px;align-items:center;font-size:9px;color:var(--fg);font-weight:700;margin:5px 0}.sc-unreadline:before,.sc-unreadline:after{content:'';flex:1;height:1px;background:var(--border)}
.sc-state{margin:auto;padding:30px 22px;display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:13px;color:var(--fg)}
.sc-state > svg{width:30px;height:30px;opacity:.8}.sc-state strong{font:650 15px/1.35 'Tektur','Exo 2',sans-serif}.sc-state p{font-size:11px;color:var(--muted);line-height:1.6;max-width:250px;margin:0}.sc-state button{padding:10px 13px;border:1px solid var(--border);background:var(--soft);border-radius:10px;font-size:11px}
.sc-skeleton{margin:13px 22px;display:flex;gap:11px;align-items:center}.sc-skeleton i{display:block;background:var(--soft);border-radius:13px;flex:0 0 42px;height:42px}.sc-skeleton span{width:70%;height:10px;background:var(--soft);border-radius:7px}
.sc-searchline{margin:12px 18px 12px;border:1px solid var(--border);background:var(--soft);border-radius:13px;display:flex;align-items:center;gap:9px;padding:0 11px;height:43px;flex:0 0 auto}.sc-searchline svg{width:17px;height:17px;color:var(--muted)}
.sc-searchline input{border:0;outline:none;background:transparent;min-width:0;flex:1;font-size:11px;color:var(--fg)}
.sc-search-results{padding:3px 22px 17px}
.sc-result{border:0;border-bottom:1px solid var(--border);background:transparent;width:100%;padding:13px 2px;text-align:left;display:flex;flex-direction:column;gap:6px}
.sc-result strong{font-size:11px}.sc-result span{font-size:10px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
.sc-search-label{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-weight:800;margin:12px 0 4px}
.sc-search-results em{background:var(--soft);font-style:normal;font-weight:800;color:var(--fg)}
.sc-thread-count{color:var(--muted);font-size:10px;padding:9px 16px;border-bottom:1px solid var(--border)}
.sc-gallery{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;background:var(--bg)}
.sc-gallery-head{position:absolute;inset:0 0 auto;z-index:2;padding:12px 14px;display:flex;gap:9px;align-items:center;min-height:62px;background:linear-gradient(var(--bg) 65%,transparent)}
.sc-gallery-head strong{flex:1;font:630 12px 'Tektur','Exo 2',sans-serif}.sc-gallery-head span{font-size:10px;color:var(--muted)}
.sc-gallery-content{display:flex;flex:1;min-height:0;width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior:contain;touch-action:pan-x pinch-zoom;scrollbar-width:none;}
.sc-gallery-content::-webkit-scrollbar{display:none;}
.sc-gallery-slide{position:relative;flex:0 0 100%;width:100%;height:100%;margin:0;scroll-snap-align:start;scroll-snap-stop:always;}
.sc-gallery-art{width:100%;height:100%;background:var(--bg);overflow:hidden;}
.sc-gallery-art svg,.sc-gallery-art img{width:100%;height:100%;object-fit:contain;display:block;user-select:none;-webkit-user-drag:none;}
.sc-gallery-caption{position:absolute;inset:auto 0 0;padding:22px 16px calc(16px + env(safe-area-inset-bottom,0px));font-size:10px;color:var(--muted);line-height:1.5;text-align:center;background:linear-gradient(transparent,var(--bg));pointer-events:none;overflow-wrap:anywhere;}
.sc-modalbg{position:absolute;inset:0;z-index:10;background:var(--shade);display:flex;align-items:end}
.sc-modal{background:var(--card);border:1px solid var(--border);border-radius:22px 22px 0 0;width:100%;padding:18px 21px 27px;display:flex;flex-direction:column;gap:13px;max-height:93%;overflow:auto;box-shadow:0 -10px 24px var(--shade)}
.sc-modalhead{display:flex;justify-content:space-between;align-items:center;gap:8px}.sc-modalhead strong{font:660 15px 'Tektur','Exo 2',sans-serif}.sc-modalhead button{border:0;background:transparent;padding:8px}
.sc-modal label{display:flex;flex-direction:column;gap:6px;font-size:10px;color:var(--muted);font-weight:700}
.sc-modal textarea,.sc-modal input,.sc-modal select{width:100%;padding:11px;border-radius:10px;border:1px solid var(--border);background:var(--soft);color:var(--fg);font:500 12px/1.5 'Exo 2',sans-serif}.sc-modal textarea{resize:vertical;min-height:74px}
.sc-modal .sc-confirm{background:var(--btn);color:var(--btn-fg);border:0;padding:13px;border-radius:12px;font-weight:750;font-size:11px}
.sc-modalnote{font-size:9px;color:var(--muted);line-height:1.5;margin:0}
.sc-flash{position:absolute;bottom:13px;left:20px;right:20px;z-index:12;opacity:0;pointer-events:none;transform:translateY(8px);background:var(--btn);color:var(--btn-fg);border-radius:11px;padding:11px 13px;font-size:10px;text-align:center;transition:opacity 180ms,transform 180ms}
.sc-flash.is-visible{opacity:1;transform:translateY(0)}
.voice-button{flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border:0;border-radius:17px;color:var(--fg);background:transparent;padding:0;transition:background 160ms,transform 160ms}
.voice-button svg{width:21px;height:21px}.voice-button:active{transform:scale(.95)}
.voice-button[data-voice-active=true]{background:var(--soft)}
.chat-form .voice-button{flex-basis:48px;width:48px;height:48px}
.chat-form .send{width:48px;height:48px}
.voice-hint{display:none;position:absolute;bottom:100%;right:12px;left:12px;margin-bottom:9px;padding:10px 12px;gap:8px;align-items:center;background:var(--card);border:1px solid var(--border);box-shadow:0 10px 18px var(--shade);border-radius:12px;font-size:11px;font-weight:700;z-index:4}
.voice-hint svg{width:17px;height:17px;opacity:.7}.voice-hint[data-visible=true]{display:flex}
.voice-hint span{flex:1}.voice-hint button{padding:6px 9px;border:1px solid var(--border);background:var(--soft);border-radius:8px;font-size:10px}
.chat-form{position:relative;gap:8px}
.query-form{gap:8px;padding-left:14px}
.query-form .query-star{width:23px;height:23px}
.query-form .send{width:48px;height:48px}
@media(max-width:420px){.prototype-settings{justify-content:center}.sc-head{padding-inline:18px}.sc-filters{padding-inline:17px}.sc-recap{margin-inline:17px}.sc-scroll{--sc-room-inset:13px}.sc-room-group{padding-inline:var(--sc-room-inset,13px)}.sc-messages{padding-inline:11px}.query-form .query-star{width:21px}}
@media(prefers-reduced-motion:reduce){.staff-shell,.sc-photo,.sc-flash,.sc-groupbody,.sc-groupbody-inner,.sc-recap-body,.sc-recap-inner,.sc-mentions,.sc-mentions button{animation:none!important;transition:none!important}}
/* QA refinements: avoid v1.1-style flex item compression with long threads. */
.sc-messages > .sc-message,.sc-messages > .sc-date,.sc-messages > .sc-thread-count,.sc-messages > .sc-unreadline{flex:0 0 auto;min-width:0}
.sc-context{white-space:nowrap}

/* v1.3.3: screen-to-screen precision motion; transition retains outgoing screen briefly. */
.sc-screen-ghost{position:absolute;inset:0;z-index:1;pointer-events:none!important;overflow:hidden;user-select:none}
.staff-shell>.sc{background:var(--bg);}
.staff-shell>.sc:not(.sc-screen-ghost){position:relative;z-index:2}
@media(prefers-reduced-motion:reduce){.staff-shell{transition:none!important}}

/* v1.3.4 — GPU-friendly accordion layout. No height/grid-track tween. */
.sc-stack-scroll{overflow-anchor:none;position:relative;}
.sc-group-stack{position:relative;width:100%;min-height:0;isolation:isolate;}
.sc-stack-scroll .sc-room-group{position:absolute;top:0;left:0;right:0;transform:translate3d(0,0,0);}
.sc-stack-scroll .sc-groupbody{position:absolute;left:var(--sc-room-inset,18px);right:var(--sc-room-inset,18px);top:var(--sc-head-height,30px);height:auto!important;overflow:visible;opacity:1;}
.sc-stack-scroll .sc-room-group[data-folded=true] .sc-groupbody{opacity:0;visibility:hidden;pointer-events:none;}
.sc-recap{position:relative;z-index:2;flex:0 0 auto;}
.sc-recap-body{position:relative;left:auto;right:auto;top:auto;height:auto!important;overflow:hidden;}
.sc-recap[data-expanded=false] .sc-recap-body{height:0!important;opacity:0;visibility:hidden;pointer-events:none;}
.sc-scroll{position:relative;z-index:1;}
@media(max-width:420px){.sc-stack-scroll .sc-groupbody{left:var(--sc-room-inset,13px);right:var(--sc-room-inset,13px);}}
@media(prefers-reduced-motion:reduce){.sc-stack-scroll .sc-room-group,.sc-recap-body{animation:none!important;transition:none!important;}}

/* v1.3.4 screen navigation: shell dimensions stay fixed during transitions. */
.phone[data-view="staff"] .staff-shell{inset:42px 0 0;transition:none!important;}
.phone[data-view="staff"] .staff-shell>.sc[data-sc-screen="inbox"]{padding-bottom:86px;}
/* Inbox dialogs cover the navigation while the shell keeps its full-height layout. */
.phone[data-view="staff"] .staff-shell:has(>.sc[data-sc-screen="inbox"]:not(.sc-screen-ghost)>.sc-modalbg){z-index:6;}

/* v1.3.6 — separate recap actions from its scrollbar and fade overflowing text.
   Gradients change only when a scroll boundary is crossed (not on every frame). */
.sc-recap{margin-bottom:20px;}
.sc-recap-inner{border-top:1px solid var(--border);margin-top:10px;}
.sc-recap-lines{
  box-sizing:border-box;max-width:100%;min-width:0;
  margin-top:0;border-top:0;
  padding:11px 22px 13px 0;
  scrollbar-gutter:stable;
  scrollbar-color:var(--border) transparent;
  --sc-recap-fade-top:0px;--sc-recap-fade-bottom:0px;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000 var(--sc-recap-fade-top),#000 calc(100% - var(--sc-recap-fade-bottom)),transparent 100%);
  mask-image:linear-gradient(to bottom,transparent 0px,#000 var(--sc-recap-fade-top),#000 calc(100% - var(--sc-recap-fade-bottom)),transparent 100%);
}
.sc-recap-lines::-webkit-scrollbar{width:4px;}
.sc-recap-lines::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px;}
/* Inbox fade makes section headings recede softly under the fixed recap area. */
.sc-stack-scroll{
  padding-top:6px;
  --sc-inbox-fade-top:0px;--sc-inbox-fade-bottom:0px;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000 var(--sc-inbox-fade-top),#000 calc(100% - var(--sc-inbox-fade-bottom)),transparent 100%);
  mask-image:linear-gradient(to bottom,transparent 0px,#000 var(--sc-inbox-fade-top),#000 calc(100% - var(--sc-inbox-fade-bottom)),transparent 100%);
}

/* v1.3.7 — compact Recap actions, respecting v1.3.6 scrollbar gutter and fade */
.sc-recap-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:9px;row-gap:3px}
.sc-recap-entry span{min-width:0;max-width:100%;line-height:1.5;font-size:10px}
.sc-recap-entry button{align-self:center;justify-self:end;margin:0;padding:7px 8px;min-height:29px;font-size:9px;border-radius:8px;max-width:66px}
.sc-recap-lines{row-gap:13px;padding-right:15px}
/* v1.3.7 — slim, unified messenger composer. All controls remain monochrome. */
.sc-composer{padding:9px 12px 12px;background:var(--bg);border-top:1px solid var(--border)}
.sc-composerbar{width:100%;display:flex;align-items:center;gap:5px;min-height:51px;border:1px solid var(--border);border-radius:16px;background:var(--card);padding:5px 6px;box-shadow:0 2px 9px var(--shade)}
.sc-composerbar:focus-within{border-color:var(--muted)}
.sc-camera-button{width:30px;height:38px;background:transparent;color:var(--muted);border-radius:10px}
.sc-composerbar button,.sc-voice-stage button{display:grid;place-items:center;border:0;flex:0 0 auto}
.sc-emoji-button,.sc-attachment-button{width:30px;height:36px;border-radius:10px;background:transparent;color:var(--muted)!important}
.sc-emoji-button:active,.sc-attachment-button:active{background:var(--soft)}
.sc-emoji-button svg,.sc-attachment-button svg{width:19px;height:19px}
.sc-composerbar textarea{flex:1;min-width:0;min-height:38px;max-height:103px;line-height:1.45;padding:10px 0;font-size:12px;border:0;outline:0;resize:none;background:transparent;color:var(--fg)}
.sc-mic-button,.sc-composerbar .sc-send{width:40px;height:40px;flex:0 0 40px;border-radius:12px!important;background:var(--btn);color:var(--btn-fg)!important;box-shadow:none}
.sc-composerbar .sc-mic-button:disabled{opacity:.45}
.sc-composerbar [hidden]{display:none!important}
.sc-emoji-panel{display:flex;gap:6px;position:absolute;bottom:calc(100% + 5px);left:12px;max-width:calc(100% - 24px);padding:9px;background:var(--card);border:1px solid var(--border);border-radius:13px;box-shadow:0 12px 24px var(--shade);z-index:6;animation:sc-mentions-arrive 150ms ease-out both}
.sc-emoji-panel button{width:35px;height:35px;display:grid;place-items:center;border:0;border-radius:9px;background:var(--soft);font-size:18px;filter:none}
.sc-mentions{left:12px;right:12px;bottom:calc(100% + 4px)}
.sc-voice-stage{display:flex;align-items:center;gap:6px;min-width:0;min-height:51px;padding:6px;border:1px solid var(--border);border-radius:16px;background:var(--card);box-shadow:0 2px 9px var(--shade);width:100%}
.sc-voice-stage>button{width:33px;height:37px;border-radius:10px;background:var(--soft);color:var(--fg)}
.sc-voice-stage .sc-voice-status{flex:1;min-width:0;font-size:10.5px;line-height:1.35;color:var(--muted);overflow-wrap:anywhere}
.sc-voice-stage .sc-live-dot{width:7px;height:7px;border-radius:50%;background:var(--fg);flex:0 0 7px;animation:sc-live-pulse 1.25s ease-in-out infinite}
@keyframes sc-live-pulse{0%,100%{opacity:1}50%{opacity:.35}}
.sc-wave{display:flex;align-items:center;justify-content:center;gap:2px;flex:1;min-width:0;height:32px;overflow:hidden}
.sc-wave i{display:block;background:var(--fg);width:2px;height:27px;flex:0 0 2px;border-radius:2px;transform:scaleY(var(--idle-scale));transform-origin:center;will-change:transform}
.sc-voice-stage time{font-size:9px;font-weight:750;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.sc-voice-stage .sc-voice-finish,.sc-voice-stage .sc-voice-send{width:38px;height:38px;background:var(--btn);color:var(--btn-fg);border-radius:12px}
.sc-voice-stage .sc-voice-demo{width:auto;font-size:9px;font-weight:750;white-space:nowrap;padding-inline:8px}
.sc-voice-preview-body{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}.sc-voice-preview-body strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-voice-preview-track,.sc-audio-track{height:3px;border-radius:99px;background:var(--border);overflow:hidden;width:100%}
.sc-voice-preview-track>div,.sc-audio-track-fill{width:100%;height:100%;background:var(--fg);transform:scaleX(0);transform-origin:left center}
.sc-voice-preview-audio{display:none}
.sc-voice-attachment{display:flex;align-items:center;gap:8px;padding:9px;background:var(--soft);border:1px solid var(--border);border-radius:12px;margin-top:9px;max-width:100%;min-width:0}
.sc-voice-attachment button{flex:0 0 30px;width:30px;height:30px;background:var(--btn);color:var(--btn-fg);display:grid;place-items:center;border:0;border-radius:10px}
.sc-audio-meta{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}.sc-audio-meta strong{font-size:9.5px;font-weight:750}.sc-voice-attachment time{font-size:9px;color:var(--muted);font-variant-numeric:tabular-nums}
.sc-voice-attachment audio{display:none}
.sc-photo .sc-imgfx-slot,.sc-gallery-art .sc-imgfx-slot{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit;opacity:0}
.sc-photo img.sc-img-fallback,.sc-gallery-art img.sc-img-fallback{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:1}
.sc-photo img.sc-img-fallback{object-fit:cover;}
.sc-gallery-art img.sc-img-fallback{object-fit:contain;}
.sc-photo.sc-imgfx-active .sc-img-fallback,.sc-gallery-art.sc-imgfx-active .sc-img-fallback{opacity:0}
.sc-photo.sc-imgfx-active .sc-imgfx-slot,.sc-gallery-art.sc-imgfx-active .sc-imgfx-slot{opacity:1}
.sc-imgfx-slot>div{width:100%;height:100%}
.sc-gallery-art{position:relative}
/* Fullscreen camera: owned by PhotoTools; existing orb/chat transitions stay intact. */
.sc-camera,.sc-camera-exit{position:absolute;inset:0;z-index:30;background:#101414;color:#fff;overflow:hidden;animation:sc-camera-in 230ms cubic-bezier(.2,.7,.3,1)}
.sc-camera-frame{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:100%;overflow:hidden;touch-action:none}
.sc-camera-frame>video{width:100%;height:100%;object-fit:cover;transform:scale(var(--camera-scale,1));transition:transform 100ms linear}
:is(.sc-camera,.sc-camera-exit)[data-facing=user] .sc-camera-frame>video{transform:scaleX(-1) scale(var(--camera-scale,1))}
:is(.sc-camera,.sc-camera-exit) button{cursor:pointer;border:0;color:inherit;background:#10141480;display:grid;place-items:center;min-width:44px;min-height:44px;border-radius:50%;transition:background 160ms,transform 160ms}
:is(.sc-camera,.sc-camera-exit) button:hover{background:#ffffff26}:is(.sc-camera,.sc-camera-exit) button:active{transform:scale(.94)}:is(.sc-camera,.sc-camera-exit) button:focus-visible{outline:2px solid #fff;outline-offset:3px}:is(.sc-camera,.sc-camera-exit) button:disabled{opacity:.4;cursor:default}:is(.sc-camera,.sc-camera-exit) [hidden]{display:none!important}
.sc-camera-head{position:absolute;z-index:3;inset:0 0 auto;display:flex;justify-content:space-between;padding:calc(12px + env(safe-area-inset-top,0px)) 14px 26px;background:linear-gradient(#0006,transparent)}
.sc-camera-status{position:absolute;inset:40% 18px auto;text-align:center;font-size:13px}
.sc-camera-bottom{position:absolute;inset:auto 0 0;z-index:2;padding:20px 18px calc(18px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,#000b 35%,#000e);display:flex;flex-direction:column;align-items:center;gap:12px}
.sc-camera-strip{display:flex;gap:8px;width:100%;overflow-x:auto;align-items:center;scrollbar-width:thin}
.sc-camera-strip img{width:58px;height:64px;object-fit:cover;flex-shrink:0;border:1px solid #fff8;border-radius:8px}.sc-camera-strip button{width:58px;height:64px;flex-shrink:0;border:1px solid #fff8;border-radius:8px}
.sc-camera-controls{display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 6px}.sc-camera-controls .sc-camera-shutter{width:78px;height:78px;min-width:78px;border:3px solid #fff;background:transparent;position:relative}.sc-camera-shutter:before{content:'';position:absolute;inset:6px;border-radius:50%;background:#fff}.sc-camera-shutter svg{display:none}.sc-camera-mode{font-size:13px;font-weight:600}.sc-camera-bottom small{font-size:10px;color:#ffffffa6}
.sc-camera-error{position:absolute;inset:25% 25px auto;display:flex;align-items:center;text-align:center;flex-direction:column;gap:12px}.sc-camera-error strong{font-size:16px}.sc-camera-error p{font-size:12px;line-height:1.6;max-width:270px;margin:0}.sc-camera-error button{border-radius:12px;padding:10px 16px;background:#fff;color:#101414;font-size:12px}
.sc-camera-review{position:absolute;inset:0;z-index:4;background:#101414;animation:sc-camera-in 200ms ease-out}.sc-camera-review img{width:100%;height:100%;object-fit:contain}.sc-camera-review>div{position:absolute;inset:auto 0 0;display:flex;flex-direction:column;gap:12px;padding:24px 18px calc(24px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,#000b)}.sc-camera-review button{border-radius:14px;padding:12px 17px;font-size:12px}.sc-camera-review [data-photo=use]{background:#fff;color:#101414}
.sc-photo-import{width:86px;height:86px;position:relative;overflow:hidden;border-radius:12px;margin-bottom:10px}.sc-photo-import>img{width:100%;height:100%;object-fit:cover}
.sc-photo-transfer{position:absolute;inset:0;z-index:4;background:#10141455;display:grid;place-items:center;animation:sc-photo-reveal 180ms ease-out;transition:background 220ms}
.sc-photo-ring{position:absolute;width:62px;height:62px;border-radius:50%;background:var(--bg);color:var(--fg);pointer-events:none}
.sc-photo-transfer[data-indeterminate=true] .sc-photo-ring{animation:sc-photo-turn 5s linear infinite}
.sc-photo-ring svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2.4;overflow:visible}.sc-photo-ring-track{opacity:.2}.sc-photo-ring-value{stroke-dasharray:var(--photo-progress,65) 100;stroke-linecap:round;transition:stroke-dasharray 180ms linear}
.sc-photo-transfer>button{width:50px;height:50px;padding:0;display:grid;place-items:center;border:0;border-radius:50%;background:var(--bg);color:var(--fg);cursor:pointer;z-index:1}.sc-photo-transfer>button svg{width:20px;height:20px}.sc-photo-transfer>button:hover{background:var(--soft)}.sc-photo-transfer>button:focus-visible{outline:2px solid var(--fg);outline-offset:4px}
.sc-photo-transfer-label{position:absolute;bottom:18%;color:#fff;font-size:11px;text-shadow:0 1px 4px #000}.sc-photo-import .sc-photo-transfer-label{display:none}.sc-photo-transfer[data-done=true]{background:transparent}.sc-photo-transfer[data-done=true] .sc-photo-ring{animation-play-state:paused;opacity:0;transition:opacity 180ms}.sc-photo-transfer[data-done=true] .sc-photo-transfer-label{opacity:0}
@keyframes sc-camera-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes sc-photo-turn{to{transform:rotate(360deg)}}
@keyframes sc-photo-reveal{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.sc-camera,.sc-camera-review,.sc-photo-transfer,.sc-photo-transfer[data-indeterminate=true] .sc-photo-ring{animation:none!important}:is(.sc-camera,.sc-camera-exit) button,.sc-photo-transfer,.sc-photo-ring-value{transition:none!important}}
@media (max-width:360px){.sc-composer{padding-inline:8px}.sc-composerbar{gap:2px;padding-inline:3px}.sc-emoji-button,.sc-attachment-button{width:27px}.sc-wave{gap:1.5px}.sc-wave i{width:2px;flex-basis:2px}.sc-recap-entry{column-gap:5px}.sc-recap-lines{padding-right:13px}}
@media(prefers-reduced-motion:reduce){.sc-emoji-panel,.sc-live-dot{animation:none!important}.sc-wave i{will-change:auto}}

/* Mobile installable PWA: source v1.3.7 demo remains in demo.html. */
html.grimm-pwa,html.grimm-pwa body{height:100%;width:100%;overflow:hidden;overscroll-behavior:none;background:#f9f9f8}
.grimm-pwa .stage{width:100%;max-width:none;margin:0;padding:0;height:100%;}
.grimm-pwa .page-heading,.grimm-pwa .toolbar,.grimm-pwa .footnote,.grimm-pwa .spec-label{display:none!important;}
.grimm-pwa .phones,.grimm-pwa .specimen{display:block!important;margin:0;padding:0;width:100%;height:100%;max-width:none;}
.grimm-pwa .phone,.grimm-pwa .phone:is(:first-child,:last-child){
 width:100%!important;height:var(--grimm-visual-h,100dvh)!important;max-height:none!important;
 margin:0!important;flex:none!important;position:relative;overflow:hidden!important;border:0!important;border-radius:0!important;box-shadow:none!important;
 transition:background 180ms,color 180ms;}
.grimm-pwa .status-bar{display:none!important;}
.grimm-pwa .brand{top:calc(26px + env(safe-area-inset-top,0px));left:23px;}
.grimm-pwa .orb-area{top:min(calc(21dvh + 12px),205px);}
.grimm-pwa .phone:not([data-state=idle]) .orb-area{top:calc(115px + env(safe-area-inset-top,0px));}
.grimm-pwa .query-form{bottom:calc(105px + env(safe-area-inset-bottom,0px));}
.grimm-pwa .phone:not([data-state=idle]) .query-form{bottom:calc(105px + env(safe-area-inset-bottom,0px));}
.grimm-pwa .nav{height:calc(79px + env(safe-area-inset-bottom,0px));padding-bottom:env(safe-area-inset-bottom,0px);}
.grimm-pwa .chat-sheet{inset:0!important;padding-top:env(safe-area-inset-top,0px);}
.grimm-pwa .chat-form{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));}
.grimm-pwa .staff-shell,.grimm-pwa .phone[data-view=staff] .staff-shell{inset:0!important;bottom:0!important;padding-top:env(safe-area-inset-top,0px);}
.grimm-pwa .phone[data-view=staff] .staff-shell>.sc[data-sc-screen=inbox]{padding-bottom:calc(79px + env(safe-area-inset-bottom,0px))!important;}
.grimm-pwa .sc-composer{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));}
.grimm-pwa .sc-modal{padding-bottom:calc(25px + env(safe-area-inset-bottom,0px));}
.grimm-pwa .chat-toast{bottom:calc(100px + env(safe-area-inset-bottom,0px));}
.grimm-pwa .phone[data-view=staff][data-staff-depth=detail] .nav{visibility:hidden;}
.grimm-pwa .sc-head{padding-top:calc(12px + 0px);}
.grimm-pwa .fps-badge{top:calc(12px + env(safe-area-inset-top,0px));}
.grimm-pwa .qa-launch{position:absolute;right:8px;top:calc(8px + env(safe-area-inset-top,0px));z-index:99;}
.grimm-pwa .qa-chip{position:fixed;z-index:90;bottom:calc(91px + env(safe-area-inset-bottom,0px));right:8px;background:rgba(115,115,115,.84);color:#fff;border:0;border-radius:9px;font-size:10px;font-weight:800;letter-spacing:.12em;padding:8px 10px;box-shadow:0 2px 9px #0002;}
.grimm-pwa .qa-panel{position:fixed;bottom:0;left:0;right:0;z-index:99;display:none;flex-direction:column;gap:13px;background:#f6f6f6;color:#161616;box-shadow:0 -10px 40px #0004;padding:24px 22px calc(24px + env(safe-area-inset-bottom,0px));border-radius:20px 20px 0 0;font-size:14px;max-height:80dvh;overflow:auto;}
.grimm-pwa .qa-panel[data-open=true]{display:flex;}
.grimm-pwa .qa-panel label{display:flex;flex-direction:column;gap:6px;}
.grimm-pwa .qa-panel select,.grimm-pwa .qa-panel button{padding:12px;border:1px solid #aaa;border-radius:12px;background:white;color:#161616;font:inherit;}
.grimm-pwa .qa-panel button[data-qa-clear]{color:#762323;border-color:#af7b7b;}
.grimm-pwa .qa-panel p{font-size:11px;line-height:1.55;margin:0;color:#555;}
@media(max-height:610px){.grimm-pwa .brand{top:15px}.grimm-pwa .orb-area{top:14dvh;width:230px;height:230px}.grimm-pwa .query-form{bottom:calc(80px + env(safe-area-inset-bottom,0px));}}

/* v1.3.8 — original thinking-orbs mounts, not the retired Canvas approximation. */
.orb-area>.orb-canvas{display:grid;place-items:center;pointer-events:none;}
.orb-canvas>canvas{display:block;transform:none;image-rendering:auto;}
.chat-mini>.mini-orb{width:100%;height:100%;display:grid;place-items:center;}
.chat-mini>.mini-orb>canvas{display:block;width:48px!important;height:48px!important;}
/* img-fx's default inline-block root has zero intrinsic width for percent-sized children;
   explicit geometry is required for both thumbnails and full-screen gallery. */
.sc-imgfx-slot>.image-gen-root{display:block;width:100%;height:100%;}
.sc-imgfx-slot>.image-gen-root>.image-gen-child{width:100%;height:100%;}
.sc-imgfx-slot .image-gen-shader,.sc-imgfx-slot .image-gen-overlay{width:100%;height:100%;}
/* Avoid exposing a blank slot before the renderer has painted. */
.sc-photo.sc-imgfx-active .sc-imgfx-slot,.sc-gallery-art.sc-imgfx-active .sc-imgfx-slot{opacity:1;}
.sc-photo.sc-imgfx-active .sc-img-fallback,.sc-gallery-art.sc-imgfx-active .sc-img-fallback{opacity:0;}
@media(prefers-reduced-motion:reduce){.orb-canvas>canvas,.mini-orb>canvas{animation:none!important;transition:none!important;}}

/* Reveal overlays retain the native image beneath transparent transition pixels. */
.sc-photo.sc-imgfx-revealing .sc-imgfx-slot,.sc-gallery-art.sc-imgfx-revealing .sc-imgfx-slot{opacity:1;}
/* Gallery is a sibling of .sc; its controls must receive the theme explicitly. */
.sc-gallery .sc-back{color:var(--fg);}
/* Original effect at bounded software resolution, still covering the whole photo. */
.sc-imgfx-software>.image-gen-shader,.sc-imgfx-software>.image-gen-overlay{transform:scale(var(--grimm-fx-scale));transform-origin:top left;}

/* Fade only the edges with more content, including nested and horizontal scrollers. */
/* The viewport itself is not a scroller: hidden overflow otherwise allows
   browser anchoring/focus to move the entire header when Recap expands. */
@supports(overflow:clip){.phone,.grimm-pwa .phone,.grimm-pwa .phone:is(:first-child,:last-child){overflow:clip!important;}}
[data-scroll-fade="vertical"]{
 -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--scroll-fade-start,0px),#000 calc(100% - var(--scroll-fade-end,0px)),transparent 100%);
 mask-image:linear-gradient(to bottom,transparent 0,#000 var(--scroll-fade-start,0px),#000 calc(100% - var(--scroll-fade-end,0px)),transparent 100%);
}
[data-scroll-fade="horizontal"]{
 -webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--scroll-fade-start,0px),#000 calc(100% - var(--scroll-fade-end,0px)),transparent 100%);
 mask-image:linear-gradient(to right,transparent 0,#000 var(--scroll-fade-start,0px),#000 calc(100% - var(--scroll-fade-end,0px)),transparent 100%);
}


/* Local voice preview shares the dictation composer. */
.voice-hint.ai-voice-preview audio{width:100%;min-width:0;flex:1;height:36px;}
.voice-hint.ai-voice-preview button{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;padding:0;}
.dialog-turn--user audio{width:100%;max-width:280px;height:40px;margin-top:8px;}
.grimm-voice-player{display:flex;align-items:center;gap:12px;width:260px;max-width:100%;min-width:0;padding:12px 13px;background:var(--soft);border:1px solid var(--border);border-radius:20px;box-sizing:border-box;}
.dialog-turn--user:has(.grimm-voice-player){padding:0;background:transparent;border:0;}
.dialog-turn--user .grimm-voice-player{margin-top:0;}
.sc-voice-attachment.grimm-voice-player{margin-top:9px;border-radius:20px;padding:12px 13px;gap:12px;}
.sc-message[data-mine=true] .grimm-voice-player{border:0;background:transparent;padding:3px 0;margin-top:8px;}
.grimm-voice-player .gv-play{flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:var(--btn);color:var(--btn-fg);cursor:pointer;transition:transform 140ms;}
.grimm-voice-player .gv-play:active{transform:scale(.94);}
.grimm-voice-player .gv-play svg{width:23px;height:23px;}
.grimm-voice-player .gv-body{flex:1;min-width:0;}
.grimm-voice-player .gv-track{height:34px;position:relative;}
.grimm-voice-player .gv-wave{display:flex;align-items:center;justify-content:space-between;gap:2px;height:34px;overflow:hidden;}
.grimm-voice-player .gv-wave i{flex:1;max-width:3px;min-width:1px;height:var(--bar-height);border-radius:99px;background:var(--muted);opacity:.28;}
.grimm-voice-player .gv-wave i.gv-played{background:var(--fg);opacity:1;}
.grimm-voice-player[data-playing=true] .gv-wave i.gv-played{opacity:1;}
.grimm-voice-player .gv-seek{position:absolute;inset:-5px 0;width:100%;height:44px;padding:0;margin:0;opacity:0;cursor:pointer;touch-action:none;}
.grimm-voice-player .gv-track:has(.gv-seek:focus-visible){outline:2px solid var(--muted);outline-offset:3px;border-radius:4px;}
.grimm-voice-player .gv-play:focus-visible{outline:2px solid var(--fg);outline-offset:3px;}
.grimm-voice-player .gv-meta{display:flex;align-items:center;gap:8px;min-height:16px;margin-top:2px;color:var(--muted);font-size:11px;line-height:1.2;}
.grimm-voice-player time{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;}
.grimm-voice-player .gv-status{font-size:10px;}
.grimm-voice-player audio{display:none;}
@media(prefers-reduced-motion:reduce){.grimm-voice-player .gv-play{transition:none;}}

/* Equal, compact recap gutters and icon-only room links. */
.sc-recap{margin-inline:12px;padding-inline:12px;}
.sc-recap-lines{padding-inline:6px;}
.sc-recap-entry button{width:32px;height:32px;min-height:32px;padding:0;display:grid;place-items:center;}

.sc-recap[hidden]{display:none!important;}
.sc-recap-icon[aria-pressed=true]{background:var(--soft);}

/* Stable pointer capture provides press-and-hold recording on both screens. */
.voice-button,.sc-mic-button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}
.home-voice-hint{left:0;right:0;bottom:calc(100% + 12px);}
.phone[data-voice-recording=true][data-view=home] .home-form input,.phone[data-voice-recording=true][data-view=home] .home-form .send{visibility:hidden;pointer-events:none;}
[data-voice-holding=true] .voice-button,[data-voice-holding=true] .sc-voice-finish{transform:translateX(var(--voice-drag,0px));}
.sc-swipe-hint{font-size:9px;color:var(--muted);white-space:nowrap;}
.sc-voice-recording{gap:5px;}
.sc-voice-recording .sc-wave{justify-content:space-between;gap:1px;}
.sc-voice-recording .sc-wave i{width:2px;flex:1 1 2px;max-width:3px;height:28px;transition:transform 65ms linear;}
[data-voice-cancelled=true] .sc-mic-button,[data-voice-cancelled=true] .home-form .voice-button{animation:voice-discard-feedback 450ms ease-out;}
@keyframes voice-discard-feedback{0%{transform:translateX(-45px) scale(.65);opacity:.2}100%{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.sc-voice-recording .sc-wave i{transition:none;}[data-voice-cancelled=true] .sc-mic-button,[data-voice-cancelled=true] .home-form .voice-button{animation:none;}}

/* Inbox selection follows the existing monochrome toolbar and room layout. */
.sc-selection-head{min-height:70px;animation:sc-selection-enter 160ms ease-out;}
.sc-selection-count{flex:1;font:700 24px/1 'Tektur','Exo 2',sans-serif;}
.sc-room{position:relative;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:pan-y;}
.sc-room[data-selected=true]{background:var(--soft);border-radius:16px;}
.sc-room[data-selected=true] .sc-roomicon:after{content:'✓';position:absolute;right:-3px;bottom:-3px;display:grid;place-items:center;width:18px;height:18px;border:2px solid var(--card);border-radius:50%;background:var(--btn);color:var(--btn-fg);font-size:11px;font-weight:800;}
.sc-roomicon{position:relative;}
.sc-roomtitle>svg{flex:0 0 12px;color:var(--muted);}
@keyframes sc-selection-enter{from{opacity:.6;transform:translateY(-3px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.sc-selection-head{animation:none;}}

/* One action at the end of the GRIMM composer: microphone or text send. */
.home-form .voice-button,.chat-form .voice-button{background:var(--btn);color:var(--btn-fg);}
.home-form [hidden],.chat-form [hidden]{display:none!important;}
.home-voice-hint{display:none!important;}
[data-grimm-orb]{position:relative;}

/* Chosen Tabler icons and Noto Emoji. Colour is preserved in both themes. */
.grimm-emoji{display:inline-block;width:1.3em;height:1.3em;object-fit:contain;vertical-align:-.25em;margin:0 .06em;}
.sc-emoji-panel{display:flex;flex-direction:column;width:calc(100% - 24px);max-height:min(340px,48svh);padding:12px;border-radius:20px;gap:8px;}
.sc-emoji-head{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;}
.sc-emoji-head strong{font-size:13px;}
.sc-emoji-head button{width:28px;height:28px;background:transparent;color:var(--muted);}
.sc-emoji-search{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--soft);border-radius:12px;flex:0 0 auto;color:var(--muted);}
.sc-emoji-search input{width:100%;min-width:0;padding:0;border:0;outline:none;background:transparent;color:var(--fg);font:inherit;font-size:12px;}
.sc-emoji-search:focus-within{outline:1px solid var(--muted);}
.sc-emoji-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin;}
.sc-emoji-scroll h4{font-size:10px;font-weight:650;color:var(--muted);margin:12px 0 8px;}
.sc-emoji-scroll section:first-child h4{margin-top:2px;}
.sc-emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;}
.sc-emoji-grid button{width:100%;height:40px;background:transparent;border-radius:10px;}
.sc-emoji-grid button:hover,.sc-emoji-grid button:focus-visible{background:var(--soft);outline:1px solid var(--muted);outline-offset:-1px;}
.sc-emoji-grid button:active{transform:scale(.94);}
.sc-emoji-grid .grimm-emoji{width:29px;height:29px;margin:0;}
.sc-emoji-panel [hidden]{display:none!important;}
.sc-emoji-empty{font-size:12px;text-align:center;color:var(--muted);padding:15px 0;}
@media(max-width:360px){.sc-emoji-grid{grid-template-columns:repeat(7,minmax(0,1fr));}}

/* Compact Staff bubbles and message gestures, in the GRIMM palette. */
.sc-messages{gap:5px;padding-bottom:14px;}
.sc-message{position:relative;padding:1px 0;gap:6px;justify-content:flex-start;touch-action:pan-y;outline:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}
.sc-message[data-mine=true]{justify-content:flex-end;}
.sc-message[data-mine=true]>.sc-avatar,.sc-message[data-dm=true]>.sc-avatar{display:none;}
.sc-message .sc-avatar{align-self:flex-end;width:27px;min-width:27px;height:27px;border-radius:50%;font-size:9px;}
.sc-message .sc-msgcontent,.sc-message[data-mine=true] .sc-msgcontent{position:relative;flex:0 1 auto;width:fit-content;min-width:60px;max-width:calc(100% - 34px);padding:7px 9px 4px;border:1px solid var(--border);border-radius:13px 13px 13px 4px;background:var(--bg);transform:translateX(var(--reply-offset,0px));transition:transform 170ms ease;}
.sc-message[data-mine=true] .sc-msgcontent{background:var(--soft);border-radius:13px 13px 4px 13px;max-width:86%;}
.sc-message[data-dm=true] .sc-msgcontent{max-width:86%;}
.sc-message[data-swiping=true] .sc-msgcontent{transition:none;}
.sc-message:focus-visible .sc-msgcontent{outline:2px solid var(--muted);outline-offset:2px;}
.sc-swipe-reply{display:none;position:absolute;right:6px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none;}.sc-message[data-swiping=true] .sc-swipe-reply{display:flex;}
.sc-msgmeta{margin-bottom:2px;gap:6px;}.sc-msgmeta:empty{display:none;}
.sc-msgmeta strong{font-size:10px;}.sc-msgtext{font-size:12px;line-height:1.4;}
.sc-msgtext:empty{display:none;}
.sc-message-footer{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-height:12px;margin-top:2px;color:var(--muted);font-size:8px;line-height:1;white-space:nowrap;}
.sc-message-footer time{font-variant-numeric:tabular-nums;}.sc-message-mark{display:flex;gap:3px;font-size:8px;margin-right:auto;}
.sc-receipt{display:flex;align-items:center;}.sc-receipt[data-delivery=read]{color:var(--fg);}
.sc-receipt[data-delivery=pending] svg{animation:sc-sending-clock 1.3s linear infinite;}
@keyframes sc-sending-clock{to{transform:rotate(360deg)}}
.sc-message-reactions:empty{display:none;}
.sc-message-reaction{display:flex;align-items:center;gap:4px;background:var(--soft);border:1px solid var(--border);padding:3px 6px;margin-top:4px;border-radius:20px;font-size:9px;}
.sc-message-reaction .grimm-emoji{width:18px;height:18px;}
.sc-pinned-message{display:flex;gap:8px;align-items:center;padding:7px 18px;border:0;border-bottom:1px solid var(--border);background:var(--soft);text-align:left;flex-shrink:0;}
.sc-pinned-message span{display:flex;flex-direction:column;gap:2px;min-width:0;}.sc-pinned-message b{font-size:10px;}.sc-pinned-message small{font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.sc-message-overlay{position:absolute;inset:0;z-index:35;background:rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center;padding:12px;}
.sc-message-panel{width:min(300px,100%);max-height:calc(100% - 20px);overflow:auto;overscroll-behavior:contain;background:var(--bg);border:1px solid var(--border);box-shadow:0 12px 48px rgba(0,0,0,.16);border-radius:20px;padding:5px;animation:sc-message-menu-in 140ms ease;}
@keyframes sc-message-menu-in{from{opacity:0;transform:translateY(5px) scale(.98)}to{opacity:1;transform:none}}
.sc-message-panel>button{width:100%;display:flex;gap:12px;align-items:center;padding:10px 12px;border:0;border-radius:11px;background:transparent;text-align:left;font-size:12px;min-height:40px;}
.sc-message-panel button:hover,.sc-message-panel button:focus-visible{background:var(--soft);outline:2px solid var(--border);outline-offset:-2px;}
.sc-message-panel-head{display:flex;align-items:center;justify-content:space-between;padding:2px 8px 4px;}.sc-message-panel-head strong{font-size:11px;color:var(--muted);}.sc-message-panel-head button{width:36px;height:36px;border:0;background:transparent;border-radius:50%;display:grid;place-items:center;font-size:0;}.sc-message-panel-head button span{display:none;}
.sc-message-reaction-picker{display:flex;gap:2px;align-items:center;border-bottom:1px solid var(--border);padding:5px 4px 9px;}
.sc-message-reaction-picker button{border:0;border-radius:11px;background:transparent;min-width:30px;height:36px;display:grid;place-items:center;flex:1;}
.sc-message-reaction-picker .grimm-emoji{width:25px;height:25px;}.sc-message-reaction-picker button span{display:none;}
.sc-message-reaction-picker [aria-pressed=true]{background:var(--soft);box-shadow:inset 0 0 0 1px var(--muted);}
.sc-message-all-reactions{display:grid;grid-template-columns:repeat(7,1fr);max-height:280px;overflow:auto;}
.sc-message-read-summary{border-bottom:1px solid var(--border)!important;}.sc-read-avatars{display:flex;margin-left:auto;}.sc-read-avatars i{width:24px;height:24px;border-radius:50%;background:var(--soft);border:2px solid var(--bg);margin-left:-7px;display:grid;place-items:center;font-size:8px;font-style:normal;}
.sc-reader{display:flex;gap:10px;padding:10px 12px;align-items:center;}.sc-reader>i{width:34px;height:34px;background:var(--soft);border:1px solid var(--border);border-radius:50%;display:grid;place-items:center;font-size:11px;font-style:normal;}.sc-reader>span{display:flex;flex-direction:column;gap:5px;}.sc-reader strong{font-size:12px;}.sc-reader small{display:flex;gap:4px;align-items:center;font-size:10px;color:var(--muted);}
.sc-message-note{padding:8px 12px;font-size:11px;line-height:1.5;color:var(--muted);}
.sc-message .grimm-voice-player{min-width:min(200px,100%);max-width:100%;padding:6px 0!important;margin-top:0!important;border:0!important;background:transparent!important;gap:9px;}
@media(prefers-reduced-motion:reduce){.sc-message-panel,.sc-receipt[data-delivery=pending] svg{animation:none;}.sc-message .sc-msgcontent{transition:none;}}

/* Quoted replies navigate independently of the message action menu. */
button.sc-quote{display:block;width:100%;text-align:left;border:0;border-left:2px solid var(--muted);font-family:inherit;cursor:pointer;}
button.sc-quote:focus-visible{outline:2px solid var(--muted);outline-offset:2px;}
.sc-receipt{flex:0 0 16px;width:16px;justify-content:center;}
.sc-receipt svg{display:block;flex:none;}
.sc-message[data-jump-highlight=true] .sc-msgcontent{outline:2px solid var(--muted);outline-offset:2px;}

/* Chat layout approved from the sketch; composer and receipt geometry stay intact. */
.sc-messages{gap:8px;padding:0 16px 16px;}
.sc-date{align-self:center;width:fit-content;margin:10px auto 7px;padding:4px 15px;border-radius:99px;background:var(--soft);font-size:10px;letter-spacing:0;font-weight:500;}
.sc-message{gap:9px;}
.sc-message .sc-avatar{align-self:flex-start;margin-top:5px;width:31px;min-width:31px;height:31px;}
.sc-message .sc-msgcontent,.sc-message[data-mine=true] .sc-msgcontent{padding:9px 11px 6px;border-radius:13px;max-width:calc(100% - 40px);}
.sc-message[data-mine=true] .sc-msgcontent,.sc-message[data-dm=true] .sc-msgcontent{max-width:86%;}
.sc-message .sc-msgtext{line-height:1.42;}
.sc-pinned-message{margin:8px 16px 0;padding:9px 12px;border-radius:10px;border:0;min-height:35px;color:var(--muted);}
.sc-pinned-message span{flex:1;overflow:hidden;}.sc-pinned-message small{font-size:11px;}
.sc-pinned-message>svg{flex:none;}
.sc-thread-link{display:flex;align-items:center;gap:8px;width:100%;margin-top:7px;padding:6px 0 1px;border:0;background:transparent;color:var(--muted);font-size:10px;font-weight:650;text-align:left;}
.sc-thread-link>svg{flex:none;}.sc-thread-link>svg:last-child{margin-left:2px;}
.sc-issue{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:5px 9px;align-items:center;padding:10px;background:var(--soft);border:1px solid var(--border);border-radius:12px;}
.sc-issue-icon{grid-row:1 / 3;width:40px;height:40px;display:grid;place-items:center;border-radius:10px;background:var(--border);color:var(--muted);}
.sc-issue-copy{min-width:0;grid-column:2 / -1;padding-right:22px;}.sc-issue-head{font-size:9px;font-weight:500;color:var(--muted);}.sc-issue-desc{margin:3px 0 0;font-size:10px;font-weight:650;color:var(--fg);line-height:1.35;}
.sc-issue button.sc-issue-more{position:absolute;right:7px;top:5px;background:transparent;border:0;min-height:25px;width:25px;padding:0;}
.sc-issue-tags{grid-column:2;display:flex;flex-wrap:wrap;gap:4px 9px;font-size:9px;color:var(--muted);min-width:0;}
.sc-issue-tags span{display:flex;gap:4px;align-items:center;overflow-wrap:anywhere;}.sc-issue-tags svg{flex:none;}
.sc-issue button.sc-issue-create{grid-column:3;grid-row:2;background:var(--btn);color:var(--btn-fg);border:0;white-space:nowrap;padding:8px 10px;min-height:32px;}
.grimm-voice-player .gv-speed{flex:0 0 auto;min-width:37px;height:27px;padding:0 6px;background:var(--soft);color:var(--muted);border:0;border-radius:99px;font-size:10px;font-weight:650;}
@media(max-width:360px){.sc-issue{grid-template-columns:32px minmax(0,1fr) 25px;gap:6px;}.sc-issue-icon{width:32px;height:32px;grid-row:1;}.sc-issue-tags{grid-column:1 / -1;}.sc-issue button.sc-issue-create{grid-row:3;grid-column:1 / -1;justify-self:end;}.sc-message .grimm-voice-player{min-width:0;gap:7px;}.grimm-voice-player .gv-play{width:38px;height:38px;flex-basis:38px;}}

/* Focus feedback only for controls without an existing transition. */
[data-motion-focus=true]{transition:border-color 150ms ease,background-color 150ms ease,box-shadow 150ms ease,outline-offset 150ms ease;}
[data-motion-focus=true]:focus-visible{outline-offset:2px;}

/* Approved role badges: soft color by position, shared across chat and contact surfaces. */
.sc-personline{display:flex;align-items:center;flex-wrap:wrap;gap:3px 6px;min-width:0;}
.sc-personline>strong{min-width:0;max-width:100%;}
.sc-roomtitle>.sc-personline{flex:1;}
.sc-msgmeta{flex-wrap:wrap;align-items:center;gap:3px 6px;}
.sc-msgmeta>strong{max-width:100%;overflow-wrap:anywhere;}
.sc-role-badge,.sc-result .sc-role-badge{display:inline-flex;align-items:center;flex:0 0 auto;max-width:100%;padding:2px 7px;min-height:18px;border-radius:99px;font:500 9px/14px 'Exo 2',Arial,sans-serif;letter-spacing:0;color:var(--role-fg);background:var(--role-bg);white-space:normal;overflow-wrap:anywhere;}
.sc-role-badge[data-tone=cleaning]{--role-bg:#e6eddf;--role-fg:#465d36;}
.sc-role-badge[data-tone=reception]{--role-bg:#e4ebf7;--role-fg:#40597c;}
.sc-role-badge[data-tone=technical]{--role-bg:#f2eadc;--role-fg:#735b35;}
.sc-role-badge[data-tone=coordination]{--role-bg:#ece7f2;--role-fg:#61516e;}
.sc-role-badge[data-tone=management]{--role-bg:#e5e7eb;--role-fg:#4c535e;}
.phone[data-theme=dark] .sc-role-badge[data-tone=cleaning]{--role-bg:#293629;--role-fg:#c0d5b2;}
.phone[data-theme=dark] .sc-role-badge[data-tone=reception]{--role-bg:#293344;--role-fg:#bdcfea;}
.phone[data-theme=dark] .sc-role-badge[data-tone=technical]{--role-bg:#3b3224;--role-fg:#dec9a6;}
.phone[data-theme=dark] .sc-role-badge[data-tone=coordination]{--role-bg:#352d3f;--role-fg:#d2c0e2;}
.phone[data-theme=dark] .sc-role-badge[data-tone=management]{--role-bg:#30343b;--role-fg:#cbd0d8;}
.sc-detail-head:has(.sc-role-badge){height:auto;min-height:67px;flex-basis:auto;}

.sc-camera-exit{pointer-events:none;animation:sc-camera-out 190ms cubic-bezier(.4,0,.2,1)}
@keyframes sc-camera-out{from{transform:translateY(0)}to{transform:translateY(100%)}}
@media(prefers-reduced-motion:reduce){.sc-camera-exit{animation:none!important}}

.sc-camera-zoom{display:flex;align-items:center;gap:12px;padding:5px 9px;border-radius:24px;background:#10141499;max-width:100%}
.sc-camera-zoom button{font-size:13px;min-width:42px;min-height:38px;font-weight:650;background:transparent}
.sc-camera-zoom input{width:120px;max-width:30vw;accent-color:#fff;cursor:pointer;min-height:34px}
.sc-camera-gallery{position:relative}.sc-camera-gallery span{position:absolute;top:calc(100% + 4px);font-size:10px;color:#fff;white-space:nowrap}
.sc-camera-torch[aria-pressed=true]{background:#fff!important;color:#101414!important}
.sc-camera-native-flash{font-size:11px;padding:5px 12px;min-height:30px!important;border-radius:12px!important}
.sc-camera-review textarea{width:100%;box-sizing:border-box;padding:12px 14px;min-height:55px;max-height:110px;resize:none;border:1px solid #fff4;border-radius:14px;background:#101414cf;color:#fff;font:13px/1.5 'Exo 2',sans-serif}
.sc-camera-review textarea::placeholder{color:#ffffffb3}.sc-camera-review textarea:focus-visible{outline:2px solid #fff;outline-offset:2px}.sc-camera-review-actions{display:flex;justify-content:space-between;gap:8px}
.sc-camera-screenflash{position:absolute;inset:0;background:#fff;z-index:9;pointer-events:none}
@media(prefers-reduced-motion:reduce){.sc-camera-frame>video{transition:none!important}}

.sc-composerbar button:disabled{opacity:.45;cursor:default}

.sc-camera-strip{min-height:74px;scroll-snap-type:x proximity;touch-action:pan-x;overscroll-behavior-x:contain}
.sc-camera-strip>button{position:relative;flex:0 0 68px;width:68px;height:74px;overflow:hidden;border-radius:9px;scroll-snap-align:start;transition:opacity 160ms,transform 160ms,border-color 160ms}
.sc-camera-strip>button img{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:inherit;object-fit:cover}
.sc-camera-strip>button[aria-pressed=true]{border:2px solid #fff}
.sc-camera-photo-check{position:absolute;right:4px;top:4px;width:20px;height:20px;border-radius:50%;background:#fff;color:#101414;display:grid;place-items:center}
.sc-camera-strip .sc-camera-strip-picker{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px;background:#101414a6}.sc-camera-strip-picker span{font-size:9px;line-height:1.2}
.sc-camera-strip-empty{font-size:11px;color:#fff9;max-width:160px;line-height:1.5;padding:8px}
.sc-camera-photos-done{border-radius:14px!important;padding:7px 15px;font-size:12px;background:#fff!important;color:#101414!important}
.sc-camera-flash-help{position:absolute;z-index:8;inset:auto 12px 18px;padding:20px;border:1px solid #ffffff40;border-radius:20px;background:#101414f5;display:flex;flex-direction:column;gap:12px;box-shadow:0 8px 30px #0006;animation:sc-camera-in 180ms ease-out}
.sc-camera-flash-help strong{font-size:16px}.sc-camera-flash-help p{margin:0;font-size:12px;line-height:1.6;color:#fffc}.sc-camera-flash-help button{font-size:12px;padding:10px 14px;border-radius:12px;background:#fff2}.sc-camera-flash-help button:first-of-type{background:#fff;color:#101414}
@media(prefers-reduced-motion:reduce){.sc-camera-flash-help{animation:none!important}.sc-camera-strip>button{transition:none!important}}

/* Photo messages: stable width avoids shrink-to-fit percentage grid collapse. */
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgcontent{width:80%;min-width:0;max-width:86%}
.sc-photo-media{position:relative;margin:5px 0 0;border-radius:10px;overflow:hidden}
.sc-photo-album{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
.sc-photo-album[data-count="1"]{grid-template-columns:minmax(0,1fr)}
.sc-photo-album .sc-photo{border:0;border-radius:0;aspect-ratio:1/1}
.sc-photo-album[data-count="1"] .sc-photo{aspect-ratio:4/3}
.sc-photo-album[data-count="3"] .sc-photo:first-child,.sc-photo-album[data-count="5"] .sc-photo:first-child{grid-column:1/-1;aspect-ratio:16/9}
.sc-photo-media .sc-message-footer{position:absolute;right:6px;bottom:6px;z-index:2;color:#fff;background:rgba(16,20,20,.66);border-radius:9px;padding:4px 6px;margin:0;pointer-events:none;font-size:9px;min-height:18px}
.sc-photo-media .sc-receipt[data-delivery="read"]{color:inherit}
.sc-photo-media .sc-message-mark:empty{display:none}
.sc-photo-media+.sc-msgtext:not(:empty){margin-top:7px}
.sc-photo-drafts{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding:3px 2px 5px;scrollbar-width:thin}
.sc-photo-draft{position:relative;flex:0 0 76px;height:76px;border-radius:12px;background:var(--soft);animation:sc-photo-draft-in 180ms ease-out}
.sc-photo-draft img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.sc-photo-draft button{position:absolute;right:3px;top:3px;width:24px;height:24px;border:1px solid rgba(255,255,255,.3);border-radius:50%;display:grid;place-items:center;background:rgba(16,20,20,.74);color:#fff;padding:0}
.sc-photo-draft-add{flex:0 0 76px;height:76px;display:grid;place-items:center;border:1px dashed var(--border);border-radius:12px;background:var(--soft);color:var(--muted)}
.sc-photo-draft-count{font-size:10px;color:var(--muted);padding:1px 2px 6px}
@keyframes sc-photo-draft-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.sc-photo-draft{animation:none}}

.sc-camera-thumb{position:relative;flex:0 0 68px;width:68px;height:74px;animation:sc-photo-draft-in 180ms ease-out}
.sc-camera-thumb>[data-photo="strip-photo"]{position:relative;width:100%;height:100%;padding:0;border-radius:9px;border:1px solid #fff6;overflow:hidden;background:#10141455;color:#fff}
.sc-camera-thumb img{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:inherit;object-fit:cover}
.sc-camera-thumb>[data-photo="remove-media"]{position:absolute;right:2px;top:2px;width:26px;height:26px;min-height:26px;padding:0;border-radius:50%;display:grid;place-items:center;background:#101414bd;color:#fff;z-index:2;border:1px solid #fff5}
.sc-camera-thumb>[data-photo="remove-media"] svg{width:13px;height:13px}
.sc-camera-video-time{position:absolute;bottom:3px;left:3px;background:#101414bb;padding:2px 4px;border-radius:5px;font-size:9px;color:#fff}
.sc-camera-shutter{touch-action:none;-webkit-user-select:none;user-select:none}
.sc-camera[data-recording=true] .sc-camera-shutter:before{background:#e95858;border-radius:12px;inset:20px;transition:inset 180ms,border-radius 180ms,background 180ms}
.sc-camera[data-recording=true] .sc-camera-mode{color:#ff9696;font-variant-numeric:tabular-nums}
.sc-camera[data-captured=true] .sc-camera-frame{animation:sc-camera-shot 180ms ease-out}
.sc-video-badge{position:absolute;left:6px;bottom:6px;display:flex;align-items:center;gap:4px;background:#101414a8;color:#fff;padding:4px 6px;border-radius:8px;font-size:10px;pointer-events:none}
.sc-photo-draft .sc-video-badge{left:3px;bottom:3px;font-size:8px;padding:2px 3px}
.sc-gallery-art video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
@keyframes sc-camera-shot{from{filter:brightness(1.4)}to{filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.sc-camera-thumb,.sc-camera[data-captured=true] .sc-camera-frame{animation:none}.sc-camera-shutter:before{transition:none!important}}

.sc-camera-thumb>[data-photo="remove-media"]{min-width:26px}
.sc-camera-thumb .sc-camera-photo-check{top:auto;right:4px;bottom:4px}

/* Timeline video viewer: own controls and a DOM gesture surface over native video. */
.sc-video-player{position:absolute;inset:0;color:var(--fg)}
.sc-video-surface{position:absolute;inset:62px 0 calc(140px + env(safe-area-inset-bottom,0px))}
.sc-video-surface video{pointer-events:none;user-select:none;-webkit-user-select:none}
.sc-video-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:60px;height:60px;padding:0;border:1px solid #fff3;border-radius:50%;background:#101414bb;color:#fff;transition:opacity 180ms,background 180ms;z-index:1}
.sc-video-player[data-playing=true] .sc-video-center{opacity:0;pointer-events:none}
.sc-video-dock{position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:2;padding:14px 14px 10px;border:1px solid var(--border);border-radius:22px;background:var(--card);box-shadow:0 6px 24px var(--shade);animation:sc-photo-draft-in 180ms ease-out}
.sc-video-timeline{position:relative;height:52px;border-radius:9px;overflow:hidden;background:var(--soft);touch-action:none}
.sc-gallery-art .sc-video-frames{display:flex;height:100%;pointer-events:none}
.sc-gallery-art .sc-video-frames img{position:static;flex:1;min-width:0;width:12.5%;height:100%;object-fit:cover;opacity:.86;transition:opacity 180ms}
.sc-video-playhead{position:absolute;left:clamp(2px,var(--video-position,0%),calc(100% - 3px));top:0;bottom:0;width:3px;background:var(--fg);box-shadow:0 0 0 2px var(--card);pointer-events:none;z-index:1}
.sc-video-seek{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:ew-resize;touch-action:none;z-index:2}
.sc-video-seek:focus-visible{opacity:1;accent-color:var(--fg)}
.sc-video-actions{display:flex;gap:8px;align-items:center;padding-top:9px}
.sc-video-actions button{min-width:44px;height:44px;padding:0;display:grid;place-items:center;color:var(--fg);border:0;border-radius:50%;background:var(--soft);transition:transform 150ms,background 150ms}
.sc-video-actions .sc-video-play{background:var(--btn);color:var(--btn-fg)}
.sc-video-actions .sc-video-rate{border-radius:22px;font-size:12px;font-weight:650}
.sc-video-actions button:active{transform:scale(.94)}
.sc-video-time{flex:1;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted)}
.sc-video-error{position:absolute;left:20px;right:20px;bottom:16px;text-align:center;font-size:12px;color:var(--fg);background:var(--card);border-radius:12px;padding:10px}
.sc-video-error[hidden],.sc-gallery-slide[data-kind=video]>.sc-gallery-caption{display:none}
@media(max-width:360px){.sc-video-dock{left:8px;right:8px;padding:12px}.sc-video-actions{gap:5px}.sc-video-time{font-size:11px}}
@media(prefers-reduced-motion:reduce){.sc-video-dock{animation:none}.sc-video-center,.sc-video-actions button,.sc-video-frames img{transition:none}}
.sc-video-center svg{width:24px;height:24px}
.sc-video-actions svg{width:20px;height:20px}
.sc-video-seek:focus-visible{opacity:0;outline:none}
.sc-video-timeline:focus-within{box-shadow:inset 0 0 0 2px var(--fg)}

/* A continuous mask replaces the 48-step voice waveform boundary. */
.grimm-voice-player .gv-wave-played{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;gap:2px;height:34px;clip-path:inset(0 calc(100% - var(--voice-progress,0%)) 0 0);pointer-events:none}
.grimm-voice-player .gv-wave-played i{flex:1;max-width:3px;min-width:1px;height:var(--bar-height);border-radius:99px;background:var(--fg)}
.grimm-voice-player .gv-wave i.gv-played{background:var(--muted);opacity:.28}
.grimm-voice-player[data-playing=true] .gv-wave i.gv-played{opacity:.28}
.sc-video-badge{height:24px;gap:4px;padding:4px 7px;border-radius:99px;background:#101414aa;font-size:10px;line-height:1;white-space:nowrap}
.sc-video-badge svg{flex:0 0 12px;width:12px;height:12px}
.sc-video-badge svg path{fill:currentColor;stroke:none}
.sc-photo-draft .sc-video-badge{height:18px;padding:2px 4px}
.sc-photo-draft .sc-video-badge svg{flex-basis:10px;width:10px;height:10px}

/* Promote only the two moving chat screens for the duration of navigation. */
.staff-shell>.sc[data-navigation-motion=true],.staff-shell>.sc-screen-ghost{will-change:transform}

/* Local media preview: never expose Android's default giant Play poster. */
.sc-camera-frame>video{opacity:0;transition:opacity 160ms ease-out,transform 100ms linear}
.sc-camera[data-preview-ready=true] .sc-camera-frame>video{opacity:1}
.sc-photo>.sc-inline-video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;background:var(--soft)}
@media(prefers-reduced-motion:reduce){.sc-camera-frame>video{transition:none!important}}

/* Intrinsic single media: no artificial mat, crop or automatic filename. */
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgcontent{padding:0;overflow:hidden}
.sc-message[data-photo-count="1"] .sc-msgcontent{width:min(86%,calc(min(62vh,480px) * var(--media-ratio,1.333333)))}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-photo-media{margin:0;border-radius:12px}
.sc-photo-album[data-count="1"] .sc-photo{aspect-ratio:var(--media-ratio,4/3)}
.sc-photo-album[data-count="1"] .sc-photo img,.sc-photo-album[data-count="1"] .sc-inline-video{object-fit:contain}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgmeta:empty{display:none}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgmeta:not(:empty),.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgtext,.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-reactions:not(:empty),.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-quote{margin:0;padding:7px 10px}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-reactions:empty{display:none}

/* A static cover bridges decoder startup; no transparent/blank first frame. */
.sc-photo>.sc-inline-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}
.sc-photo>.sc-inline-video{position:relative;z-index:1;opacity:0;background:transparent}
.sc-photo>.sc-inline-video[data-frame-ready=true]{opacity:1}
.sc-video-surface>.sc-playback-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.sc-video-surface>video{opacity:0}
.sc-video-surface>video[data-frame-ready=true]{opacity:1}

.sc-detail-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sc-detail-meta .sc-role-badge {
  flex: 0 1 auto;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-detail-meta small {
  flex: 0 0 auto;
  max-width: 53%;
  font-size: 10px;
  line-height: 1.2;
}

.sc-folder-list .sc-room,.phone .sc-folder-list .gi-entry-group{border-bottom:0}
.phone .sc-folder-list .gi-entry-group{margin:0;padding:0}
.sc-folder-pins{margin-bottom:6px}
.sc-folder-pins>.sc-grouphead{margin:0}
.sc-filters>.sc-chip{flex:none}
.sc-roommeta{display:grid;align-content:center;justify-items:end;gap:4px;flex:none}
.sc-roommeta .sc-count{height:17px;min-width:17px}
.sc-roomavatar>.sc-room-presence:not([hidden]){position:absolute;z-index:2;right:-1px;top:-1px;width:13px;height:13px;box-sizing:border-box;border:2px solid var(--bg);border-radius:50%;background:#56866c;pointer-events:none}

/* Byte progress for chat attachments. The transfer's server confirmation owns completion. */
.sc-transfer-ring {
  --transfer-size:48px;
  --transfer-track:var(--border);
  position:absolute;
  z-index:2;
  box-sizing:border-box;
  width:var(--transfer-size);
  height:var(--transfer-size);
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  display:grid;
  place-items:center;
  border-radius:50%;
  color:var(--fg);
  background:var(--bg);
  pointer-events:none;
}
.sc-transfer-ring[hidden] { display:none }
.sc-transfer-ring::before {
  content:"";
  position:absolute;
  inset:3px;
  border-radius:inherit;
  background:conic-gradient(currentColor var(--transfer-percent,0%), var(--transfer-track) 0%);
  mask:radial-gradient(farthest-side,transparent calc(100% - 2px),black calc(100% - 1px));
}
.sc-transfer-ring[data-indeterminate=true]::before {
  background:conic-gradient(currentColor 24%,var(--transfer-track) 0%);
  animation:sc-transfer-spin 900ms linear infinite;
}
@keyframes sc-transfer-spin { to { transform:rotate(360deg) } }
.sc-transfer-ring[data-transfer-cancel] { pointer-events:auto; cursor:pointer }
.sc-transfer-ring[data-transfer-cancel]>span::before {
  content:"×";
  font-size:20px;
  line-height:1;
}
.sc-file:has(.sc-transfer-ring) { position:relative }
.sc-file .sc-transfer-ring {
  --transfer-size:27px;
  left:auto;
  right:9px;
  transform:translateY(-50%);
  background:var(--soft);
}
.sc-file .sc-transfer-ring[data-transfer-cancel]>span::before { font-size:14px }
.sc-file:has(.sc-transfer-ring:not([hidden]))>svg:last-of-type { visibility:hidden }
@media(prefers-reduced-motion:reduce) {
  .sc-transfer-ring[data-indeterminate=true]::before { animation:none }
}

/* Work consumes the established phone tokens; no shared chat/orb overrides. */
.work-shell[hidden]{display:none!important}.work-shell{position:absolute;z-index:4;inset:42px 0 0;background:var(--bg);color:var(--fg);overflow:hidden;display:flex;flex-direction:column}.phone[data-view=work] .brand,.phone[data-view=work] .orb-area,.phone[data-view=work] .query-form{visibility:hidden;pointer-events:none}.work-shell[data-overlay=true]{z-index:7;background:transparent}.work-screen{height:100%;min-height:0;display:flex;flex-direction:column;padding-bottom:86px}.work-shell button{font:600 12px 'Exo 2',sans-serif;color:var(--fg);cursor:pointer;transition:background-color 160ms ease,transform 160ms ease,opacity 160ms ease}.work-shell button:active:not(:disabled){transform:scale(.97)}.work-shell button:disabled{opacity:.5;cursor:default}.work-shell button:focus-visible,.work-shell input:focus-visible,.work-shell select:focus-visible,.work-shell textarea:focus-visible,.work-shell summary:focus-visible{outline:2px solid var(--fg);outline-offset:3px}.work-shell button:hover:not(:disabled){filter:brightness(.94)}.work-shell svg,.work-suggestion svg,.work-purchase-linked svg{flex-shrink:0}.work-detail-head>button{width:44px;height:44px;display:grid;place-items:center;border:0;background:transparent;border-radius:14px}.work-tabs{display:flex;margin:0 18px;border:1px solid var(--border);border-radius:12px;background:var(--soft);padding:3px}.work-tabs button{border:0;background:transparent;border-radius:9px;min-height:40px;flex:1}.work-tabs button[aria-pressed=true],.work-filters button[aria-pressed=true]{background:var(--btn);color:var(--btn-fg)}.work-filters{display:flex;gap:7px;padding:13px 18px 15px;overflow:auto;flex-shrink:0}.work-filters button{min-height:36px;padding:7px 12px;border:1px solid var(--border);border-radius:99px;background:transparent;white-space:nowrap;font-size:11px}.work-search{display:flex;gap:9px;align-items:center;margin:12px 18px 0;border:1px solid var(--border);border-radius:12px;padding:3px 9px;background:var(--card)}.work-search input{background:transparent;border:0;min-width:0;flex:1;color:var(--fg);font:500 14px 'Exo 2',sans-serif;min-height:40px}.work-search button{border:0;background:transparent;min-height:36px;min-width:36px}.work-list{flex:1;min-height:0;overflow:auto;padding:0 18px 20px;scrollbar-gutter:stable;overflow-anchor:none}.work-group{margin-bottom:17px}.work-group-heading{display:flex;justify-content:space-between;align-items:center;width:100%;padding:8px 0 10px;border:0;background:transparent;text-align:left;min-height:40px}.work-group-heading strong{font-size:14px}.work-group-heading strong span{margin-left:5px;color:var(--muted);font-size:12px}.work-group-rows{border:1px solid var(--border);border-radius:17px;background:var(--card);overflow:hidden}.work-task-row{display:flex;align-items:flex-start;gap:11px;width:100%;padding:14px 12px;min-height:66px;border:0;border-bottom:1px solid var(--border);background:transparent;text-align:left}.work-task-row:last-child{border-bottom:0}.work-task-symbol{margin-top:2px;color:var(--muted)}.work-row-copy{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.work-row-copy strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere;font-weight:700}.work-row-copy small{font-size:11px;line-height:1.45;color:var(--muted);font-weight:500}.work-due{display:flex;gap:4px;align-items:center}.work-row-comments{display:flex;gap:3px;align-items:center;color:var(--muted);font-size:10px;align-self:center}.work-purchase{border-bottom:1px solid var(--border)}.work-purchase-open{display:flex;align-items:center;gap:10px;width:100%;padding:15px 0;min-height:88px;border:0;background:transparent;text-align:left}.work-item-icon{display:grid;place-items:center;width:42px;height:44px;border-radius:13px;background:var(--soft);flex-shrink:0}.work-status{display:inline-flex;align-items:center;max-width:112px;flex-shrink:0;white-space:normal;border-radius:99px;background:var(--soft);padding:5px 8px;color:var(--fg);font-size:10px;line-height:1.35;font-weight:600}.work-status[data-status=doing],.work-status[data-status=clarify]{background:#d5b06a24}.work-status[data-status=review],.work-status[data-status=received],.work-status[data-status=done]{background:#8cae8a26}.work-status[data-status=rejected]{background:#c5888824}.work-decision{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:0 13px 13px;margin-bottom:12px}.work-decision .work-purchase-open{padding-bottom:7px}.work-request-author{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:11px;margin:3px 0 8px}.work-request-reason{font-size:12px;line-height:1.5;color:var(--muted);margin:0 0 12px;overflow-wrap:anywhere}.work-last-comment{background:var(--soft);padding:10px;border-radius:11px;font-size:11px;line-height:1.5;overflow-wrap:anywhere;margin-bottom:12px}.work-row-actions,.work-detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.work-row-actions>button,.work-detail-actions>button{min-height:42px;flex:1;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--card);white-space:nowrap}.work-row-actions>button:last-child:has(svg){flex:0 0 42px;display:grid;place-items:center}.work-shell .work-primary,.work-suggestion .work-primary,.overview-shell .work-primary,.staff-dialog .work-primary{border:0;border-radius:12px;background:var(--btn);color:var(--btn-fg);padding:12px 14px;min-height:44px;font-weight:700;font-family:'Exo 2',sans-serif}.work-shell .work-secondary,.overview-shell .work-secondary,.staff-dialog .work-secondary{border:1px solid var(--border);border-radius:12px;background:var(--card);padding:11px 13px;min-height:44px}.work-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;min-height:230px;color:var(--muted)}.work-empty strong{font-size:15px;color:var(--fg)}.work-empty p{font-size:12px;margin:0;line-height:1.5}.work-spinner{display:inline-block;width:28px;height:28px;border:2px solid var(--border);border-top-color:var(--fg);border-radius:50%;animation:work-spin 5s linear infinite}.work-local-banner{font-size:11px;color:var(--muted);padding:0 18px}.work-detail-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);flex-shrink:0}.work-detail-head>strong{flex:1;font:650 17px Tektur,'Exo 2',sans-serif}.work-detail{flex:1;min-height:0;overflow:auto;padding:20px 20px 30px;overflow-anchor:none}.work-detail h2{font-size:21px;line-height:1.4;margin:0 0 10px;overflow-wrap:anywhere}.work-description{font-size:14px;line-height:1.6;margin:0 0 17px;white-space:pre-wrap;overflow-wrap:anywhere}.work-meta{background:var(--soft);border-radius:15px;padding:8px 13px;margin:0 0 16px}.work-meta>div{display:flex;gap:14px;justify-content:space-between;padding:8px 0;font-size:12px;line-height:1.4}.work-meta dt{color:var(--muted);flex-shrink:0}.work-meta dd{margin:0;text-align:right;overflow-wrap:anywhere}.work-detail h3{font-size:14px;margin:22px 0 12px}.work-detail h3 span{color:var(--muted);font-size:12px}.work-images{display:flex;gap:8px;overflow:auto;padding:5px 0 10px}.work-images button{padding:0;width:90px;height:90px;flex-shrink:0;border:1px solid var(--border);border-radius:13px;overflow:hidden;background:var(--soft)}.work-images img{width:100%;height:100%;object-fit:cover}.work-comments article{padding:12px 0;border-bottom:1px solid var(--border)}.work-comments article header{display:flex;justify-content:space-between;gap:12px;font-size:12px}.work-comments article time{color:var(--muted);font-size:10px}.work-comments p{font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;margin:7px 0 0}.work-comment{position:relative;display:flex;gap:7px;flex-wrap:wrap;margin:15px 0}.work-comment textarea{flex:1;min-width:0;border:1px solid var(--border);border-radius:13px;background:var(--card);color:var(--fg);padding:10px;font:500 13px/1.5 'Exo 2',sans-serif;resize:none}.work-comment>button{display:grid;place-items:center;padding:0;flex:0 0 44px;height:44px;width:44px;min-height:44px;border:0;border-radius:13px;align-self:end;background:var(--btn);color:var(--btn-fg)}.work-comment [role=alert]{width:100%;font-size:11px}.work-muted{color:var(--muted);font-size:12px}.work-history{font-size:12px;margin-top:22px}.work-history summary{cursor:pointer;min-height:40px}.work-history p{line-height:1.5;border-left:2px solid var(--border);padding:0 0 0 11px;margin:0 0 13px}.work-history small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.work-reason{background:var(--soft);padding:12px;border-radius:12px;font-size:13px;line-height:1.5}.work-modalbg{z-index:10;backdrop-filter:blur(2px);animation:work-overlay 160ms ease-out}.work-dialog{padding:18px 20px 25px;gap:14px;max-height:94%;font-family:'Exo 2',sans-serif}.work-dialog input,.work-dialog select,.work-dialog textarea{font:500 14px/1.5 'Exo 2',sans-serif;min-height:44px}.work-dialog textarea{resize:none!important}.work-dialog label{font-size:12px;line-height:1.4}.work-dialog .work-checkbox{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:44px}.work-checkbox input{width:20px;min-height:20px;height:20px}.work-form-error{margin:0;font-size:12px;line-height:1.5;color:var(--fg);border-left:2px solid var(--fg);padding-left:10px}.work-dialog [aria-invalid=true]{border-color:var(--fg)}.work-file-label{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;cursor:pointer;min-height:44px}.work-upload>small{font-size:10px;color:var(--muted)}.work-draft-images{display:flex;align-items:center;gap:8px;overflow:auto}.work-draft-images>div{position:relative;flex:0 0 72px;height:72px;border-radius:12px;overflow:hidden;border:1px solid var(--border)}.work-draft-images img{width:100%;height:100%;object-fit:cover}.work-draft-images button{position:absolute;top:3px;right:3px;display:grid;place-items:center;width:26px;height:26px;border:0;border-radius:50%;background:#101414b0;color:#fff}.work-upload-progress{display:grid;place-items:center;flex:0 0 72px;height:72px;background:var(--soft);border-radius:12px}.work-full-image{width:100%;height:auto;max-height:65vh;object-fit:contain}.work-flash{position:absolute;bottom:100px;left:18px;right:18px;padding:12px;background:var(--btn);color:var(--btn-fg);border-radius:13px;text-align:center;font-size:12px;pointer-events:none;opacity:0;transition:opacity 160ms ease}.work-flash.visible{opacity:1}.work-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.work-suggestion{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr) 28px;align-items:center;gap:8px;border:1px solid var(--border);border-radius:15px;background:var(--soft);padding:12px;margin-top:12px}.work-suggestion-icon{display:grid;place-items:center;width:36px;height:38px;background:var(--card);border-radius:11px}.work-suggestion strong,.work-suggestion small{display:block;line-height:1.4}.work-suggestion strong{font-size:13px;overflow-wrap:anywhere}.work-suggestion small{font-size:10px;color:var(--muted);margin-bottom:3px}.work-suggestion-close{border:0;background:transparent;padding:6px;color:var(--muted);cursor:pointer}.work-suggestion .work-primary{grid-column:2/4;justify-self:end;font-size:11px;cursor:pointer}.work-purchase-linked{display:flex;gap:5px;align-items:center;border:0;background:var(--soft);border-radius:12px;padding:10px;font:600 12px 'Exo 2',sans-serif;color:var(--fg);margin-top:10px;text-align:left;cursor:pointer}.work-shell [hidden]{display:none!important}@keyframes work-spin{to{transform:rotate(360deg)}}@keyframes work-overlay{from{background-color:transparent}to{background-color:var(--shade)}}
.grimm-pwa .work-shell{inset:0;padding-top:env(safe-area-inset-top,0px)}.grimm-pwa .work-screen{padding-bottom:calc(79px + env(safe-area-inset-bottom,0px))}.grimm-pwa .work-dialog{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}@media(max-width:340px){.work-list{padding-inline:12px}.work-tabs{margin-inline:12px}.work-filters{padding-inline:12px}.work-purchase-open{gap:7px}.work-status{max-width:82px;font-size:9px}.work-item-icon{width:35px}.work-detail{padding-inline:15px}}@media(prefers-reduced-motion:reduce){.work-shell *,.work-shell *::before,.work-shell *::after{animation:none!important;transition:none!important}.work-suggestion,.work-purchase-linked{animation:none!important;transition:none!important}}
.work-upload-progress{position:relative;overflow:hidden}.work-upload-progress .sc-photo-transfer>button{width:32px;height:32px}.work-upload-progress .sc-photo-ring{width:58px;height:58px}.work-upload-progress .sc-photo-transfer>button svg{width:15px;height:15px}

.work-group-rows{display:grid;grid-template-rows:1fr;transition:grid-template-rows 180ms ease,border-color 180ms ease}.work-group-inner{min-height:0;overflow:hidden}.work-group-rows[data-folded=true]{grid-template-rows:0fr;border-color:transparent}
.work-shell:has(>.work-modalbg){z-index:7}
html{scrollbar-color:#828688 transparent;scrollbar-width:thin}.phone *{scrollbar-color:var(--muted) transparent;scrollbar-width:thin}@media(forced-colors:active){html,.phone *{scrollbar-color:auto}}
.work-photo.work-dialog{position:absolute;inset:0;max-height:none;padding:0;border:0;border-radius:0;gap:0;overflow:hidden}.work-photo .sc-gallery-head button{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:12px;background:transparent}.work-photo .sc-gallery-art img{object-fit:contain}
.nav-btn[data-tab="Задачи"]{position:relative}.work-attention{position:absolute;top:5px;right:4px;min-width:16px;height:16px;display:grid;place-items:center;padding:0 3px;border-radius:99px;background:var(--btn);color:var(--btn-fg);font:700 9px 'Exo 2',sans-serif;border:2px solid var(--card);pointer-events:none;animation:work-badge 160ms ease-out}@media(prefers-reduced-motion:reduce){.work-attention{animation:none!important}}

@keyframes work-badge{from{opacity:0;scale:.85}to{opacity:1;scale:1}}
.work-task-box{width:16px;height:16px;border:1.4px solid var(--muted);border-radius:5px;display:grid;place-items:center;flex:0 0 16px}

/* Approved Work 1/1/3/3: quick creation sheets and cards with lifecycle steps. */
.work-record-hero h2{font:700 21px/1.25 Tektur,'Exo 2',sans-serif;letter-spacing:-.035em;margin:0 0 7px}.work-record-hero>p{font-size:12px;color:var(--muted);margin:0;line-height:1.5}
.work-stages{list-style:none;display:grid;grid-template-columns:repeat(var(--work-step-count),minmax(0,1fr));padding:0;margin:23px 0 20px;gap:0}.work-stages li{position:relative;display:flex;align-items:center;flex-direction:column;gap:7px;text-align:center;min-width:0;color:var(--muted)}.work-stages li:not(:last-child):after{content:'';position:absolute;height:1px;left:calc(50% + 19px);right:calc(-50% + 19px);top:17px;background:var(--border)}.work-stages li[data-reached=true]:after{background:var(--fg)}.work-stages li>span{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--border);border-radius:50%;background:var(--card);z-index:1}.work-stages li small{font-size:10px;line-height:1.35;white-space:nowrap}.work-stages li[aria-current=step]{color:var(--fg);font-weight:750}.work-stages li[aria-current=step]>span{background:var(--btn);color:var(--btn-fg);border-color:var(--btn)}.work-stages li[data-reached=true]>span{color:var(--fg);border-color:var(--fg)}
.work-detail-actions{margin:0 0 16px;gap:7px}.work-detail-actions>.work-primary{flex-basis:100%}.work-detail-actions:not(:has(.work-primary))>button:first-child{background:var(--btn);color:var(--btn-fg);border-color:var(--btn)}
.work-responsible{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr));gap:8px;margin:0 0 17px}.work-person-chip{display:flex;align-items:center;gap:8px;min-width:0;padding:9px;background:var(--card);border:1px solid var(--border);border-radius:13px}.work-person-avatar{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;border-radius:50%;background:var(--soft);font-size:10px;font-weight:750}.work-person-chip>span:last-child{display:flex;flex-direction:column;gap:3px;min-width:0}.work-person-chip small{font-size:10px;color:var(--muted)}.work-person-chip strong{font-size:11px;line-height:1.35;overflow-wrap:anywhere}.work-date-chip{justify-content:center}
.work-disclosure{border:1px solid var(--border);border-radius:14px;background:var(--card);margin:0 0 9px;overflow:hidden}.work-disclosure>summary{display:flex;align-items:center;gap:8px;min-height:46px;padding:10px 12px;cursor:pointer;font-size:12px;list-style:none}.work-disclosure>summary::-webkit-details-marker{display:none}.work-disclosure>summary strong{flex:1;font-size:12px}.work-disclosure>summary>span{font-size:10px;color:var(--muted)}.work-disclosure>summary>svg:last-child{transition:rotate 160ms ease}.work-disclosure[open]>summary>svg:last-child{rotate:180deg}.work-disclosure>div{padding:0 12px 12px}.work-disclosure .work-description{font-size:13px;line-height:1.5;margin:0 0 7px}.work-disclosure .work-images{padding-bottom:0}.work-disclosure .work-images button{width:100px;height:88px}.work-record-details .work-meta{background:transparent;margin:0;padding:0 12px 9px;border-radius:0}.work-record-details .work-meta>div{padding:7px 0;border-top:1px solid var(--border);font-size:11px}.work-history{margin-top:0;font-size:11px}.work-history p{margin:7px 0 13px}.work-history p:last-child{margin-bottom:0}.work-detail .work-discussion-heading{margin:20px 0 12px;display:flex;align-items:center;gap:6px}
.work-comments{display:flex;flex-direction:column;gap:9px;padding-bottom:5px}.work-comments article{max-width:94%;align-self:flex-start;padding:10px 12px;background:var(--card);border:1px solid var(--border);border-radius:15px 15px 15px 4px}.work-comments article[data-own=true]{align-self:flex-end;background:var(--soft);border-radius:15px 15px 4px 15px}.work-comments article header{font-size:11px;gap:10px}.work-comments article time{font-size:9px}.work-comments article p{font-size:12px;line-height:1.5;margin:5px 0 0}.work-comments>.work-muted{margin:0;padding:2px 0 10px}
.work-screen[data-screen=detail]>.work-comment{margin:0 12px 9px;padding:5px;flex:0 0 auto;align-items:center;background:var(--card);border:1px solid var(--border);border-radius:18px;box-shadow:0 3px 12px var(--shade)}.work-comment textarea{border:0;border-radius:12px;min-height:44px;max-height:100px;line-height:22px;padding:11px 10px;background:transparent}.work-comment>button{align-self:center;border-radius:13px}.work-comment [role=alert]{margin:0 8px 5px}.work-detail{padding:18px 18px 20px}
.work-create-sheet.work-dialog{position:relative;gap:13px;padding-top:26px;border-radius:23px 23px 0 0;max-height:94%;scroll-padding-bottom:75px}.work-create-sheet:before{content:'';position:absolute;top:9px;left:calc(50% - 18px);width:36px;height:4px;background:var(--border);border-radius:99px}.work-create-sheet .sc-modalhead{margin-bottom:3px}.work-create-sheet .sc-modalhead strong{font-size:16px}.work-create-sheet .sc-modalhead>button{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;padding:0;border-radius:12px}
.work-create-body{display:flex;flex-direction:column;gap:10px}.work-create-sheet .work-create-title>input{border:0;background:transparent;border-radius:0;padding:6px 0;min-height:44px;font:700 20px/1.3 Tektur,'Exo 2',sans-serif;letter-spacing:-.035em}.work-create-sheet .work-create-description>textarea{border:0;background:transparent;padding:3px 0;min-height:56px;font-size:13px;line-height:1.55}.work-create-description textarea::placeholder{color:var(--muted)}
.work-create-chips{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.work-create-sheet .work-create-chips>label,.work-create-sheet .work-create-assignee>label{border:1px solid var(--border);border-radius:13px;padding:7px 10px 4px;font-size:10px;gap:0;min-width:0}.work-create-sheet .work-create-chips input,.work-create-sheet .work-create-chips select,.work-create-sheet .work-create-assignee select{border:0;background:transparent;min-height:32px;padding:4px 0;font-size:12px;border-radius:6px;min-width:0}.work-create-sheet input[type=date]{font-size:11px}.work-create-sheet .work-checkbox{border:1px solid var(--border);border-radius:13px;padding:8px 10px;font-size:12px;min-height:45px;color:var(--fg)}.work-create-sheet .work-checkbox input{width:18px;min-height:18px;height:18px;padding:0;flex:0 0 18px;accent-color:var(--btn)}
.work-create-sheet .work-quantity-label{font-size:10px;gap:5px}.work-quantity-control{display:flex;align-items:center;border:1px solid var(--border);border-radius:13px;min-height:45px;background:var(--card);padding:2px}.work-create-sheet .work-quantity-control input{border:0;background:transparent;padding:6px;min-height:36px;flex:1;min-width:0;text-align:center;font-size:13px}.work-quantity-control button{display:grid;place-items:center;width:38px;height:38px;border:0;background:var(--soft);border-radius:10px;flex:0 0 38px;font-size:19px}
.work-create-sheet .work-upload{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.work-create-sheet .work-draft-images{max-width:calc(100% - 78px);flex:0 1 auto}.work-create-sheet .work-draft-images:empty{display:none}.work-create-sheet .work-file-label{width:70px;height:72px;flex:0 0 70px;min-height:72px;border:1px dashed var(--border);border-radius:12px;display:flex!important;flex-direction:column!important;justify-content:center;font-size:10px;color:var(--fg);gap:6px;background:transparent}.work-create-sheet .work-upload>small{width:100%;font-size:9px}.work-create-details{border:0;margin:0;background:transparent}.work-create-details>summary{padding:6px 0;min-height:40px;color:var(--muted);gap:5px}.work-create-details>summary strong{font-weight:600;font-size:11px}.work-create-details>div{padding:4px 0 5px;display:flex;flex-direction:column;gap:10px}.work-create-sheet>[type=submit]{position:sticky;bottom:0;flex-shrink:0;margin-top:0;min-height:46px;box-shadow:0 -5px 10px var(--card)}
@media(max-width:340px){.work-stages li small{font-size:8px}.work-stages li>span{width:30px;height:30px}.work-stages li:not(:last-child):after{top:15px;left:calc(50% + 16px);right:calc(-50% + 16px)}.work-detail{padding-inline:13px}.work-create-sheet.work-dialog{padding-inline:16px}.work-create-sheet .work-create-title>input{font-size:19px}.work-person-chip{padding:8px;gap:6px}.work-person-avatar{width:28px;height:28px;flex-basis:28px}.work-person-chip strong{font-size:10px}}
.work-search{transition:border-color 160ms ease,box-shadow 160ms ease}.work-search:focus-within{border-color:var(--muted);box-shadow:0 0 0 2px var(--soft)}.work-shell .work-search input:focus-visible{outline:none;box-shadow:none}.work-create-sheet input:focus-visible,.work-create-sheet textarea:focus-visible,.work-create-sheet select:focus-visible{outline-color:var(--muted)}
.work-create-sheet{animation:work-sheet-arrive 180ms cubic-bezier(.2,.7,.3,1)}@keyframes work-sheet-arrive{from{translate:0 12px}to{translate:0 0}}
.work-group-chevron{display:block;rotate:180deg;transition:rotate 160ms ease}.work-group-chevron[data-folded=true]{rotate:0deg}

/* Focus belongs to the visible control surface, not another rectangle inside it. */
.work-shell .work-dialog input:not([type=checkbox]):focus-visible,.work-shell .work-dialog select:focus-visible,.work-shell .work-dialog textarea:focus-visible,.work-shell .work-comment textarea:focus-visible{outline:none;outline-offset:0}
.work-dialog input,.work-dialog select,.work-dialog textarea{transition:border-color 160ms ease,box-shadow 160ms ease}
.work-dialog:not(.work-create-sheet) input:focus-visible,.work-dialog:not(.work-create-sheet) select:focus-visible,.work-dialog:not(.work-create-sheet) textarea:focus-visible,.work-create-details input:focus-visible,.work-create-details select:focus-visible{border-color:var(--muted)}
.work-create-chips>label,.work-create-assignee>label,.work-quantity-control,.work-create-title,.work-create-description{transition:border-color 160ms ease,box-shadow 160ms ease}
.work-create-chips>label:focus-within,.work-create-assignee>label:focus-within,.work-quantity-control:focus-within{border-color:var(--muted);box-shadow:0 0 0 2px var(--soft)}
.work-create-title:focus-within,.work-create-description:focus-within{box-shadow:0 1px 0 var(--muted)}
.work-screen[data-screen=detail]>.work-comment:focus-within{border-color:var(--muted);box-shadow:0 0 0 2px var(--soft)}
.work-group-rows{transition:grid-template-rows 180ms ease,border-color 180ms ease,border-width 180ms ease,background-color 180ms ease}
.work-group-rows[data-folded=true]{border-width:0;background:transparent}
.work-create-sheet{overscroll-behavior-y:contain}.work-create-sheet>.sc-modalhead{touch-action:none;user-select:none;-webkit-user-select:none}
/* Work reveal slots and disclosures each have one motion owner. */
.work-search-slot{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows 180ms ease,opacity 160ms ease}.work-search-slot[data-open=true]{grid-template-rows:1fr;opacity:1}.work-search-inner{min-height:0;overflow:hidden}
.work-disclosure[data-disclosure-closing=true]>summary>svg:last-child{rotate:0deg}.work-create-details>summary>svg:first-child{transition:rotate 160ms ease}.work-create-details[open]>summary>svg:first-child{rotate:180deg}.work-create-details[data-disclosure-closing=true]>summary>svg:first-child{rotate:0deg}

/* Match approved chat navigation: opaque screens, one owner, no text crossfade. */
.work-screen{position:relative;z-index:2;background:var(--bg)}
.work-screen-ghost{position:absolute;inset:0;z-index:1;pointer-events:none!important;overflow:hidden;user-select:none}

.work-create-stages{display:grid;grid-template-columns:1fr 1fr;gap:7px;list-style:none;padding:0;margin:4px 0 10px}.work-create-stages li{padding-top:8px;border-top:3px solid var(--border);font-size:11px;line-height:1.4;color:var(--muted)}.work-create-stages [aria-current=step],.work-create-stages [data-reached=true]{border-color:var(--fg);color:var(--fg)}
.work-create-sheet .work-create-body{display:block;min-width:0}.work-create-sheet [data-work-create-panel]{display:flex;flex-direction:column;gap:16px;min-width:0}.work-create-sheet [data-work-create-panel]>h4{font:600 22px/1.25 Tektur,'Exo 2',sans-serif;letter-spacing:-.025em;margin:0 0 2px}.work-create-sheet .work-create-title>span,.work-create-sheet .work-create-description>span{color:var(--muted);font-size:11px}.work-create-sheet .work-create-title>input{font-family:'Exo 2',sans-serif;font-size:19px;letter-spacing:0;min-height:48px;border-bottom:1px solid var(--border)}
.work-create-sheet .work-create-description>textarea{background:var(--soft);border:1px solid var(--border);border-radius:12px;padding:11px;min-height:82px;font-size:16px}.work-create-sheet .work-create-title>input::placeholder{font-size:16px;font-weight:400;letter-spacing:0}.work-create-sheet .work-quantity-label{font-size:11px}.work-create-sheet .work-quantity-control input{font-size:16px;min-height:42px}.work-create-sheet .work-quantity-control button{width:44px;height:44px;flex-basis:44px}
.work-create-summary{padding:14px;background:var(--soft);border-radius:13px;display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.work-create-summary strong{font-size:17px;line-height:1.4}.work-create-summary>span{font-size:11px;color:var(--muted)}
.work-create-sheet [data-work-create-panel="2"] label{gap:6px;font-size:11px;color:var(--muted)}.work-create-sheet [data-work-create-panel="2"] input:not([type=checkbox]),.work-create-sheet [data-work-create-panel="2"] select{font-size:16px;padding:10px;min-height:46px;color:var(--fg)}.work-create-sheet [data-work-create-panel="2"] .work-create-assignee>label{padding:0;border:0;gap:6px}.work-create-sheet [data-work-create-panel="2"] .work-create-assignee select{background:var(--soft);border:1px solid var(--border);border-radius:12px}.work-create-sheet [data-work-create-panel="2"] .work-create-chips>label{padding:0;border:0;gap:6px}.work-create-sheet [data-work-create-panel="2"] .work-create-chips select{background:var(--soft);border:1px solid var(--border);border-radius:12px;font-size:14px}
.work-create-date{display:grid;gap:6px;min-width:0}.work-create-date>span{font-size:11px;color:var(--muted)}.work-create-date>div{display:flex;align-items:center;gap:6px}.work-create-date button{min-height:46px;border:1px solid var(--border);border-radius:12px;background:var(--soft);color:var(--fg);display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:10px;font:500 14px 'Exo 2',sans-serif}.work-create-date [data-work=create-date]{flex:1;min-width:0}.work-create-date [data-work=create-date-clear]{justify-content:center;flex:0 0 44px}
.work-create-sheet .work-file-label{width:auto;min-height:44px;height:auto;flex-direction:row!important;gap:8px;padding:8px 12px;border:1px solid var(--border);font-size:12px}.work-create-sheet .work-upload>small{font-size:10px}.work-create-sheet .work-draft-images{max-width:100%}
.work-create-footer{position:sticky;bottom:-1px;display:flex;align-items:center;gap:8px;padding:10px 0 0;background:var(--card);margin-top:3px;flex-shrink:0;box-shadow:0 -8px 12px var(--card)}.work-create-footer>.work-primary{flex:1;display:flex;justify-content:center;align-items:center;gap:8px;min-height:48px;font-size:13px}.work-create-footer>[data-work=create-previous]{display:grid;place-items:center;flex:0 0 46px;height:48px;border:1px solid var(--border);background:var(--soft);border-radius:13px;color:var(--fg)}
.work-create-sheet button:disabled{opacity:.55}.work-create-sheet button:not(:disabled):hover{filter:brightness(.97)}.work-create-sheet button:focus-visible{outline:2px solid var(--muted);outline-offset:2px}.work-calendar .real-calendar{width:100%}.work-calendar .real-calendar-days button{min-height:40px}.work-calendar button{touch-action:manipulation}
.work-create-footer .work-spinner{width:16px;height:16px;flex:0 0 16px;border-width:2px}
/* Approved purchase cards: canonical Work tokens, one parent with independent goods. */
.work-purchase-items{display:grid;gap:10px;margin:16px 0}.work-purchase-progress{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.work-purchase-items>progress{width:100%;height:5px;border:0;border-radius:99px;accent-color:var(--btn);overflow:hidden}.work-purchase-items>progress::-webkit-progress-bar{background:var(--soft)}.work-purchase-items>progress::-webkit-progress-value{background:var(--btn)}
.work-shell .work-purchase-item{min-width:0;border:1px solid var(--border);border-radius:17px;padding:13px;background:var(--card);display:flex;flex-direction:column;gap:10px}.work-purchase-item>header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.work-purchase-item>header>div{min-width:0;flex:1}.work-purchase-item h3{font-size:14px;line-height:1.4;margin:0;overflow-wrap:anywhere}.work-purchase-item p{font-size:12px;color:var(--muted);margin:4px 0 0}.work-purchase-item .work-status{white-space:normal;max-width:92px;flex-shrink:0;line-height:1.3}.work-purchase-item-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.work-shell .work-purchase-item-actions>button{width:auto;min-height:44px;flex:0 1 auto;padding:8px 12px;font-size:12px}.work-purchase-cost{font-size:13px;font-weight:600;overflow-wrap:anywhere}.work-purchase-total{display:flex;gap:10px;justify-content:space-between;align-items:baseline;padding:8px 0;font-size:12px}.work-purchase-total strong{font-size:15px;text-align:right;overflow-wrap:anywhere}.work-purchase-items>.work-muted{font-size:11px;line-height:1.5;margin:0}
.work-item-editor{display:grid;gap:10px}.work-item-editor .work-purchase-item>header{align-items:center}.work-item-editor .work-purchase-item>header>button{width:44px;min-height:44px;padding:0;flex:0 0 44px;display:grid;place-items:center}.work-item-editor input{min-width:0;min-height:44px;font-size:16px}.work-item-editor input[readonly]{color:var(--muted);background:var(--soft)}.work-item-editor small{color:var(--muted);font-size:11px;line-height:1.45}.work-shell .work-item-editor+[data-work=add-item]{width:auto;min-height:44px;align-self:flex-start;font-size:12px}.work-detail:has(>.work-purchase-items)>.work-detail-actions>button,.staff-dialog [data-archive-confirm],.staff-dialog [data-archive-cancel]{min-height:44px;white-space:normal}

/* Approved compact purchase list; Task dialog and row geometry unchanged. */
.work-shopping-group{margin:18px 0}.work-shopping-group>h3{font-size:13px;color:var(--sc-muted,var(--muted));display:flex;gap:8px;margin:0 0 8px}.work-shopping-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 0;border-bottom:1px solid var(--border)}.work-shopping-copy{flex:1;min-width:100px;display:grid;gap:3px}.work-shopping-copy strong{overflow-wrap:anywhere;font-size:14px}.work-shopping-copy small{color:var(--sc-muted,var(--muted));font-size:12px}.work-shopping-cost{font-size:13px}.work-shopping-secondary{width:100%}.work-shopping-secondary button{font-size:12px;min-height:44px}.work-inline-cost{display:flex;gap:8px;align-items:end;flex-wrap:wrap;width:100%}.work-inline-cost label{flex:1;min-width:100px;font-size:12px}.work-inline-cost input{width:100%;box-sizing:border-box;min-height:44px;border:1px solid var(--border);border-radius:10px;padding:10px;color:inherit;background:var(--card)}.work-inline-cost [role=alert]{width:100%;font-size:13px}.work-purchase-quick textarea[name=goodsText]{min-height:160px;resize:vertical}.work-purchase-quick-sheet .work-create-body{display:grid;gap:14px}.work-purchase-create-details{margin-top:8px}.work-purchase-create-details>summary{min-height:44px;cursor:pointer}.work-purchase-quick-sheet .work-create-footer{display:flex}.work-purchase-quick-sheet .work-create-footer>[type=submit]{width:100%}

/* Task checklist: same compact rhythm as the approved shopping list. */
.work-task-card{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid var(--border)}
.work-task-card:last-child{border-bottom:0}
.work-task-card>.work-task-row{flex:1;min-width:0;min-height:64px;border-bottom:0;width:auto;padding:0;align-items:center}
.work-task-quick-actions{display:flex;align-items:center;flex:none}
.work-shell .work-task-action{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:var(--btn);color:var(--btn-fg);transition:transform 160ms ease,background-color 160ms ease}
.work-task-action[data-work=submit]{background:var(--soft);color:var(--fg);box-shadow:inset 0 0 0 1px var(--border)}
.work-task-progress{display:flex;align-items:center;gap:8px;color:var(--muted)!important;font-variant-numeric:tabular-nums;margin-top:4px}
.work-task-row-meter{display:block;flex:none;width:42px;height:3px;border-radius:3px;background:var(--soft);overflow:hidden}
.work-task-row-meter i{display:block;height:100%;background:var(--fg);border-radius:3px}
.work-task-checklist{margin:18px 0 22px}
.work-task-checklist>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.work-task-checklist h3{margin:0;font:600 15px 'Exo 2',sans-serif}
.work-task-checklist>header>span{color:var(--muted);font-size:12px;white-space:nowrap}
.work-task-meter{height:3px;background:var(--soft);border-radius:3px;overflow:hidden;margin-bottom:8px}
.work-task-meter i{display:block;height:100%;background:var(--fg);transition:width 180ms ease}
.work-check-row{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:12px 0;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;color:var(--fg);font:500 14px/1.45 'Exo 2',sans-serif;text-align:left;cursor:pointer}
.work-check-row>span:last-child{min-width:0;overflow-wrap:anywhere}
.work-check-box{display:grid;place-items:center;flex:none;width:22px;height:22px;box-sizing:border-box;border:1.5px solid var(--muted);border-radius:7px}
.work-check-row[aria-checked=true] .work-check-box{background:var(--btn);border-color:var(--btn);color:var(--btn-fg)}
.work-check-row[aria-checked=true]>span:last-child{color:var(--muted);text-decoration:line-through}
.work-check-row:disabled{opacity:1;cursor:default}
.work-check-row:focus-visible{outline:2px solid var(--fg);outline-offset:3px;border-radius:7px}
.work-task-quick-sheet .work-create-body{display:grid;gap:20px}
.work-checklist-input>span{color:var(--muted);font-size:11px}
.work-task-quick-sheet textarea[name=checklistText]{min-height:130px;padding:12px;font-size:14px;line-height:1.7;resize:vertical;background:var(--soft);border:1px solid var(--border);border-radius:12px}
.work-checklist-input>small{font-size:11px;color:var(--muted)}
.work-task-create-details>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:13px;cursor:pointer;list-style:none}
.work-task-create-details>summary::-webkit-details-marker{display:none}
.work-task-create-details>summary svg{transition:transform 180ms}
.work-task-create-details[open]>summary svg{transform:rotate(180deg)}
.work-task-create-details>div{display:grid;gap:16px;padding-top:12px}
.work-task-quick-sheet .work-create-footer{display:flex}
.work-task-quick-sheet .work-create-footer>[type=submit]{width:100%}
@media(prefers-reduced-motion:reduce){.work-task-meter i,.work-task-create-details>summary svg{transition:none}}

/* Task detail hierarchy: owner first, checklist central, one primary action. */
.work-task-detail>.work-record-hero{margin-bottom:16px}
.work-task-detail>.work-responsible{margin:0 0 20px}
.work-task-detail>.work-detail-actions{display:flex;align-items:center;gap:10px;margin:18px 0 22px;flex-wrap:wrap}
.work-task-detail>.work-detail-actions>[data-work=assign]{order:2;flex:0 0 auto;width:auto;min-height:44px;padding-inline:14px;background:transparent;border-color:transparent;color:var(--muted);font-size:12px}
.work-task-detail>.work-detail-actions>.work-primary{order:0;flex:1;min-width:150px}
.work-task-detail>.work-detail-actions>[data-work=return]{order:1;flex:1;min-width:130px}
.work-task-detail>.work-task-checklist{margin-bottom:0}

/* Theme ownership: .phone variables in app.css; scope all new geometry to overview. */
.overview-shell{position:absolute;z-index:4;inset:42px 0 86px;background:var(--bg);display:flex;flex-direction:column;overflow:hidden;isolation:isolate}.overview-shell[hidden]{display:none}.phone[data-view=overview]>.brand,.phone[data-view=overview]>.orb-area,.phone[data-view=overview]>.query-form{visibility:hidden;pointer-events:none}.grimm-pwa .overview-shell{inset:0 0 calc(79px + env(safe-area-inset-bottom,0px));padding-top:env(safe-area-inset-top,0px)}
.overview-heading{padding-bottom:4px}.overview-role{display:flex;align-items:center;gap:5px;margin-left:auto;color:var(--muted);font-size:10px}.overview-role svg{width:16px}.overview-stats{padding:0 23px 17px;color:var(--muted);font-size:12px;min-height:32px;flex-shrink:0}.overview-tabs{flex-shrink:0;margin-bottom:12px}.overview-controls{padding:0 18px;flex-shrink:0}.overview-datebar{display:flex;align-items:center;gap:3px;border:1px solid var(--border);border-radius:13px;background:var(--card);padding:2px 4px 2px 11px;min-height:45px}.overview-date{display:flex;align-items:center;gap:9px;flex:1;min-width:0;position:relative;min-height:40px;font-size:12px;font-weight:600;cursor:pointer}.overview-date>span{white-space:nowrap}.overview-date>input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;color-scheme:light}.phone[data-theme=dark] .overview-date>input{color-scheme:dark}.overview-datebar:focus-within{outline:2px solid var(--muted);outline-offset:2px}.overview-datebar>.sc-iconbtn{width:35px;height:39px;min-width:35px;border-radius:10px}.overview-filters{display:flex;gap:6px;margin:10px 0 0}.overview-filters button{min-height:35px;padding:0 14px;font:500 11px 'Exo 2',sans-serif;background:var(--card);color:var(--muted);border:1px solid var(--border);border-radius:99px;transition:background 160ms,color 160ms}.overview-filters button[aria-pressed=true]{background:var(--btn);color:var(--btn-fg);border-color:var(--btn)}.overview-banner{color:var(--muted);font-size:9px;padding:11px 18px 10px;flex-shrink:0}.overview-scroll{flex:1;min-height:0;overflow:auto;padding:0 18px 16px;overscroll-behavior:contain;scrollbar-gutter:stable}.overview-scroll:focus-visible,.overview-grid-wrap:focus-visible{outline:2px solid var(--muted);outline-offset:-2px}.overview-shift-group{margin-bottom:21px}.overview-shift-group>header{display:flex;align-items:center;justify-content:space-between;margin:1px 0 8px}.overview-shift-group h4{margin:0;font:600 15px 'Tektur',sans-serif;letter-spacing:-.03em;display:flex;align-items:center;gap:7px}.overview-shift-group h4>span{font:600 10px 'Exo 2',sans-serif;color:var(--muted);background:var(--soft);border-radius:6px;padding:3px 6px}.overview-shift-group header>small{color:var(--muted);font-size:9px}.overview-shift-row{width:100%;display:flex;align-items:center;gap:10px;padding:12px 9px;border:1px solid var(--border);background:var(--card);border-radius:14px;text-align:left;color:var(--fg);margin-bottom:7px;min-height:65px}.overview-shift-symbol{display:grid;place-items:center;background:var(--soft);border-radius:10px;width:34px;height:36px;flex-shrink:0}.overview-shift-row>span:nth-child(2){flex:1;min-width:0}.overview-shift-row strong,.overview-shift-row small{display:block}.overview-shift-row strong{font-size:12px;margin-bottom:4px}.overview-shift-row small{font-size:10px;color:var(--muted)}.overview-shift-row time{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}.overview-empty-row{font-size:11px;color:var(--muted);border:1px dashed var(--border);border-radius:13px;padding:17px 12px;margin:0}.overview-grid-wrap{overflow-x:auto;overscroll-behavior-x:contain;border:1px solid var(--border);border-radius:14px;background:var(--card)}.overview-grid{min-width:calc(112px + var(--overview-cols)*var(--overview-unit));font-size:11px}.overview-grid-header{display:grid;grid-template-columns:112px repeat(var(--overview-cols),minmax(var(--overview-unit),1fr));background:var(--soft);min-height:54px;border-bottom:1px solid var(--border)}.overview-grid-header>strong{position:sticky;left:0;z-index:3;background:var(--soft);display:flex;align-items:center;padding:0 10px;font-weight:600}.overview-column{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-left:1px solid var(--border);font-variant-numeric:tabular-nums}.overview-column b{font-size:11px;font-weight:600;min-width:24px;text-align:center}.overview-column small{font-size:9px;color:var(--muted)}.overview-today b{background:var(--btn);color:var(--btn-fg);padding:3px 5px;border-radius:6px}.overview-grid-row{display:grid;grid-template-columns:112px minmax(0,1fr);min-height:83px;border-bottom:1px solid var(--border)}.overview-grid-row:last-child{border-bottom:0}.overview-resource{position:sticky;left:0;z-index:3;background:var(--card);display:flex;justify-content:center;flex-direction:column;gap:6px;padding:12px 10px;border-right:1px solid var(--border)}.overview-resource strong{font-size:11px;line-height:1.35;font-weight:600}.overview-resource small{font-size:9px;color:var(--muted);line-height:1.35}.overview-track{display:grid;grid-template-columns:repeat(var(--overview-cols),minmax(var(--overview-unit),1fr));grid-template-rows:1fr;position:relative;min-height:83px}.overview-slot{grid-row:1;border:0;border-right:1px solid var(--border);border-radius:0;background:transparent;min-height:82px;color:var(--muted);padding:0;position:relative}.overview-slot:last-of-type{border-right:0}.overview-slot>span{opacity:0;transition:opacity 160ms;font-size:19px}.overview-slot:hover:not(:disabled)>span,.overview-slot:focus-visible>span{opacity:1}.overview-slot[aria-pressed=true]{background:var(--soft);outline:1px dashed var(--fg);outline-offset:-4px;border-radius:10px}.overview-slot[aria-pressed=true]>span{opacity:1}.overview-booking{grid-row:1;z-index:1;min-width:0;align-self:center;justify-self:stretch;margin:8px 3px;min-height:57px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;text-align:left;padding:7px 8px;gap:4px;border:1px solid var(--border);border-radius:9px;background:var(--soft);color:var(--fg);overflow:hidden}.overview-booking strong{font-size:10px;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overview-booking small{font-size:9px;color:var(--muted);white-space:nowrap}.overview-grid-hint{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:10px 2px 0;color:var(--muted);font-size:9px}.overview-grid-hint span{text-align:center}.overview-summary{flex:0 0 auto;margin:0 14px 9px;padding:12px;border:1px solid var(--border);border-radius:17px;background:var(--card)}.overview-summary[hidden]{display:none}.overview-summary-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.overview-summary-head>strong{font:600 14px 'Tektur',sans-serif;letter-spacing:-.03em}.overview-summary-head>button{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--muted)}.overview-summary-meta{display:flex;align-items:center;gap:7px;justify-content:space-between;color:var(--muted);font-size:10px;margin:2px 0 10px}.overview-summary-meta select{font:500 10px 'Exo 2',sans-serif;min-height:30px;background:var(--soft);color:var(--fg);border:1px solid var(--border);border-radius:8px;padding:3px;max-width:90px}.overview-summary>.work-primary{min-height:43px;width:100%;display:flex;align-items:center;justify-content:space-between;padding-inline:15px;font-size:12px}.overview-state{display:flex;align-items:center;justify-content:center;text-align:center;min-height:230px;flex-direction:column;gap:12px;padding:28px 12px}.overview-state-icon{display:grid;place-items:center;background:var(--soft);border-radius:18px;width:58px;height:58px;color:var(--muted)}.overview-state strong{font:600 15px 'Tektur',sans-serif}.overview-state p{max-width:250px;line-height:1.5;font-size:12px;color:var(--muted);margin:0}.overview-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.staff-dialog{position:fixed;top:auto;right:auto;margin:0;box-sizing:border-box;color:var(--fg);background:var(--bg);border:1px solid var(--border);border-radius:22px;max-width:none;padding:20px;box-shadow:0 12px 48px var(--shade);overflow:auto;overscroll-behavior:contain}.staff-dialog::backdrop{background:#0006}.staff-dialog>form{display:flex;flex-direction:column;gap:15px}.staff-dialog .sc-modalhead{margin:0 0 3px}.staff-dialog .sc-modalhead>strong{font-family:Tektur,sans-serif;font-size:15px}.staff-dialog .sc-modalhead>button{width:35px;height:35px;border-radius:10px;display:grid;place-items:center}.staff-dialog label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:500}.staff-dialog input,.staff-dialog select{width:100%;min-height:44px;box-sizing:border-box;font:400 14px 'Exo 2',sans-serif;padding:10px;border:1px solid var(--border);border-radius:12px;color:var(--fg);background:var(--card)}.staff-dialog input:focus,.staff-dialog select:focus{outline:none;border-color:var(--muted);box-shadow:0 0 0 2px var(--soft)}.staff-dialog .work-muted{font-size:10px;line-height:1.5;margin:0}.staff-dialog .work-primary,.staff-dialog .work-secondary{min-height:45px;width:100%;font-size:12px}.staff-dialog .overview-form-error{margin:0;font-size:11px;line-height:1.5}.overview-booking-info{display:flex;gap:11px;align-items:center;padding:12px;background:var(--soft);border-radius:13px}.overview-booking-info>span{display:grid;place-items:center}.overview-booking-info strong,.overview-booking-info small{display:block}.overview-booking-info strong{font-size:13px;margin-bottom:5px}.overview-booking-info small{color:var(--muted);font-size:11px}.overview-record{margin:0;font-size:12px}.overview-record>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}.overview-record dt{color:var(--muted)}.overview-record dd{margin:0;overflow-wrap:anywhere;text-align:right}.overview-shell button,.staff-dialog button,.staff-dialog select,.overview-shell select{cursor:pointer}.overview-shell button:disabled,.staff-dialog button:disabled{cursor:default}.overview-shell button:focus-visible,.staff-dialog button:focus-visible{outline:2px solid var(--fg);outline-offset:2px}.overview-shell button:hover:not(:disabled),.staff-dialog button:hover:not(:disabled){filter:brightness(.96)}.overview-shell button:active:not(:disabled),.staff-dialog button:active:not(:disabled){filter:brightness(.9)}.overview-slot:disabled{opacity:1}.overview-flash{bottom:12px}
@media(max-width:420px){.overview-stats{padding-inline:18px}.overview-role span{display:none}}@media(max-width:340px){.overview-controls{padding-inline:12px}.overview-scroll{padding-inline:12px}.overview-summary{margin-inline:10px;padding:10px}.overview-summary-meta{font-size:9px}.overview-stats{font-size:11px}.overview-heading{min-height:64px}.overview-tabs{margin-inline:12px}.overview-banner{padding-inline:12px}}
@media(prefers-reduced-motion:reduce){.overview-shell *,.staff-dialog{animation:none!important;transition:none!important}}@media(forced-colors:active){.overview-slot[aria-pressed=true]{outline:2px dashed Highlight}.overview-booking{border:2px solid ButtonText}.overview-today b{outline:1px solid ButtonText}}

.overview-tabs button{font:600 12px "Exo 2",sans-serif;color:var(--fg)}.overview-tabs button[aria-pressed=true]{color:var(--btn-fg)}
.staff-dialog button{color:var(--fg);font-family:inherit}.overview-shell .work-secondary{color:var(--fg)}
/* Date navigation and filters form a single row; narrow screens scroll this row. */
.overview-controls{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;overflow-x:auto;padding-bottom:3px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}.overview-datebar{flex:1 0 150px;min-width:150px;padding-left:7px;gap:0}.overview-date{gap:5px;font-size:11px}.overview-date>svg{width:16px;flex-shrink:0}.overview-datebar>.sc-iconbtn{width:28px;min-width:28px}.overview-filters{flex:0 0 auto;margin:0;white-space:nowrap;flex-wrap:nowrap;gap:4px}.overview-filters button{padding-inline:8px;min-height:39px;font-size:10px}.overview-controls:has(.overview-filters) .overview-datebar{max-width:240px}.overview-track{overflow:hidden}.overview-slot{touch-action:pan-y;user-select:none}.overview-slot[aria-pressed=true]{background:transparent;outline:none;border-radius:0}.overview-slot[aria-pressed=true]>span{opacity:0}.overview-booking{position:absolute;top:12px;height:57px;min-height:0;margin:0;box-sizing:border-box}.overview-selection{position:absolute;top:8px;bottom:8px;z-index:2;border:1px dashed var(--fg);border-radius:9px;background:var(--soft);pointer-events:none;box-sizing:border-box;opacity:.82;display:flex;align-items:center;overflow:hidden;padding:6px}.overview-selection span{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overview-track[data-drag-invalid=true] .overview-selection{border-style:solid;background:var(--card)}.overview-shell[data-selecting=true] .overview-slot{cursor:crosshair}.overview-stay-times{font-size:9px;color:var(--muted);text-align:center;margin:9px 0 0}.overview-summary-meta>span{min-width:0;line-height:1.5}.overview-summary-meta select{flex-shrink:0}.overview-controls::-webkit-scrollbar{height:4px}.overview-controls::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
@media(max-width:340px){.overview-datebar{flex-basis:140px;min-width:140px}.overview-date{font-size:10px;gap:4px}.overview-date>svg{width:14px}.overview-datebar>.sc-iconbtn{width:26px;min-width:26px}.overview-filters button{padding-inline:6px}}

/* One quiet connection-state layer over the original live orb. */
.odin-layer{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:0;visibility:hidden;transition:opacity 300ms ease,visibility 0s 300ms}
.odin-cross{position:absolute;inset:-65px -20px;width:calc(100% + 40px);height:calc(100% + 130px);overflow:visible;color:var(--fg);opacity:.3;transform:scale(.97);transition:transform 300ms ease}
.odin-cross path{fill:none;stroke:currentColor;stroke-width:1;vector-effect:non-scaling-stroke}
.odin-cross-fragments{opacity:0}
.odin-title{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(354px,calc(100vw - 32px));padding:8px 0;text-align:center;white-space:nowrap;font:600 clamp(14px,4.35vw,18px)/1.35 "Tektur","Exo 2",sans-serif;letter-spacing:-.045em;color:var(--fg);background:radial-gradient(ellipse at center,var(--bg) 35%,transparent 73%)}
.odin-title:before,.odin-title:after{content:attr(data-copy);position:absolute;inset:8px 0;opacity:0;clip-path:inset(42% 0 42%);pointer-events:none}
.odin-reconnect{position:absolute;left:17px;right:56px;top:50%;transform:translateY(-50%);font:400 clamp(10px,3vw,12px)/1.4 "Exo 2",sans-serif;color:var(--muted);opacity:0;visibility:hidden;pointer-events:none;transition:opacity 300ms ease,visibility 0s 300ms}
.odin-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.phone[data-odin-connection=offline][data-view=home] .odin-layer,.phone[data-odin-connection=offline][data-view=home] .odin-reconnect{opacity:1;visibility:visible;transition-delay:0s}
.phone[data-odin-connection=offline] .odin-cross{transform:scale(1)}
.phone[data-odin-connection=offline] .home-form input,.phone[data-odin-connection=offline] .home-form .query-star{opacity:0}
.phone[data-odin-connection=offline] .home-form .voice-button{opacity:.35;background:transparent;color:var(--muted);cursor:default}
.phone[data-odin-connection=offline] .home-form .send{display:none!important}
.phone[data-odin-connection=offline] .home-form .voice-button{display:grid!important}
.phone[data-odin-animate=true] .odin-cross{animation:odin-line-break 5.2s steps(1,end) infinite}
.phone[data-odin-animate=true] .odin-cross-fragments{animation:odin-fragments 5.2s steps(1,end) infinite}
.phone[data-odin-animate=true] .odin-title:before{animation:odin-type-break 5.2s steps(1,end) infinite;color:#b86565;--odin-shift:3px}
.phone[data-odin-animate=true] .odin-title:after{animation:odin-type-break 5.2s steps(1,end) infinite;color:#5c9292;--odin-shift:-2px}
.phone[data-odin-animate=true] .orb-area>.orb-canvas{animation:odin-orb-break 5.2s steps(1,end) infinite}
.phone[data-odin-animate=true] .odin-reconnect{animation:odin-hint-break 5.2s steps(1,end) infinite}
@keyframes odin-line-break{0%,91%,95%,98%,100%{translate:0;opacity:.3}92%,96%{translate:3px -1px;opacity:.5}93%,97%{translate:-2px 1px;opacity:.2}}
@keyframes odin-fragments{0%,91%,95%,98%,100%{opacity:0;translate:0}92%,96%{opacity:.8;translate:4px -2px;stroke:#b86565}93%,97%{opacity:.7;translate:-3px 2px;stroke:#5c9292}}
@keyframes odin-type-break{0%,91%,94%,97%,100%{opacity:0;translate:0}92%,96%{opacity:.8;translate:var(--odin-shift) -1px}93%{opacity:.6;translate:calc(-1 * var(--odin-shift)) 1px}}
@keyframes odin-orb-break{0%,91%,95%,98%,100%{translate:0;clip-path:none}92%,96%{translate:3px 0;clip-path:polygon(0 0,100% 0,100% 32%,92% 32%,92% 34%,100% 34%,100% 66%,4% 66%,4% 68%,100% 68%,100% 100%,0 100%)}93%,97%{translate:-2px 0;clip-path:polygon(0 0,100% 0,100% 44%,0 44%,0 46%,100% 46%,100% 100%,0 100%)}}
@keyframes odin-hint-break{0%,92%,95%,98%,100%{translate:0;text-shadow:none}93%,96%{translate:1px 0;text-shadow:-1px 0 #b8656560,1px 0 #5c929260}}
@media(prefers-reduced-motion:reduce){.odin-layer,.odin-cross,.odin-reconnect{transition:none!important}.odin-layer *,.odin-reconnect,.phone[data-odin-connection=offline] .orb-canvas{animation:none!important}}
@media(forced-colors:active){.odin-cross{opacity:.5}.odin-title{background:Canvas;color:CanvasText}.odin-reconnect{color:CanvasText}.odin-title:before,.odin-title:after,.odin-cross-fragments{display:none}}
.phone:not([data-view=home]) .odin-layer,.phone:not([data-view=home]) .odin-reconnect{visibility:hidden;opacity:0;transition:none}
@media(max-height:610px){.grimm-pwa .odin-cross{inset:-20px -20px;height:calc(100% + 40px)}}

/* Older WebViews may not support :is() or dynamic viewport units. */
.grimm-pwa .phone {
  width: 100% !important;
  height: var(--grimm-visual-h, 100vh) !important;
  max-height: none !important;
  margin: 0 !important;
  flex: none !important;
  position: relative;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: background 180ms, color 180ms;
}
.grimm-pwa .orb-area { top: min(calc(21vh + 12px), 205px); }

/* Absolute outgoing screens must occupy the same padded content box. */
.grimm-pwa .staff-shell > .sc-screen-ghost,
.grimm-pwa .work-shell > .work-screen-ghost {
  top: env(safe-area-inset-top, 0px);
}
.grimm-pwa .work-shell > .work-screen-ghost {
  height: calc(100% - env(safe-area-inset-top, 0px));
}

/* Keep navigation compositor-only while the staff detail screen is open. */
.grimm-pwa .phone[data-view="staff"] .nav {
  transition: transform 270ms cubic-bezier(.4,0,.2,1);
  transform: translateY(0);
}
.grimm-pwa .phone[data-view="staff"][data-staff-depth="detail"] .nav {
  visibility: visible;
  transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px) + 2px));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .grimm-pwa .phone[data-view="staff"] .nav { transition: none; }
}

/* Approved compact capsule: one five-tab geometry in both themes. */
.grimm-pwa .phone .nav {
 left:12px;right:12px;bottom:env(safe-area-inset-bottom,0px);height:48px!important;
 padding:0 3px!important;border:1px solid #dce1e3;border-radius:17px;
 background:linear-gradient(135deg,#fff,#f3f5f5 48%,#e9edef);box-shadow:0 3px 12px #16212608;
}
.grimm-pwa .phone[data-theme="dark"] .nav {background:linear-gradient(135deg,#353c46,#222831 48%,#0d1116);border-color:#ffffff18;box-shadow:none}
.grimm-pwa .phone .nav .nav-btn {width:100%;min-width:0;height:48px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#747f85;transform:none;display:grid;place-items:center}
.grimm-pwa .phone[data-theme="dark"] .nav .nav-btn {color:#c1c8cd}
.grimm-pwa .phone .nav .native-nav-carrier {width:32px;height:32px;display:grid;place-items:center;border-radius:10px}
.grimm-pwa .phone .nav .native-nav-marker {position:absolute;top:8px;left:0;width:32px;height:32px;border-radius:10px;background:#dfe5e8;box-shadow:inset 0 0 0 1px #d2dade;pointer-events:none;transition:left 270ms cubic-bezier(.2,.8,.2,1)}
.grimm-pwa .phone[data-theme="dark"] .nav .native-nav-marker {background:#ffffff19;box-shadow:inset 0 0 0 1px #ffffff16}
.grimm-pwa .phone .nav .nav-btn[aria-current="page"] .native-nav-carrier {color:#182329}
.grimm-pwa .phone[data-theme="dark"] .nav .nav-btn[aria-current="page"] .native-nav-carrier {color:white}
@media(prefers-reduced-motion:reduce){.grimm-pwa .phone .nav .native-nav-marker{transition:none!important}}
.grimm-pwa .phone .nav .native-nav-carrier svg,.grimm-pwa .phone .nav .native-nav-carrier img {width:22px;height:22px;transform:none;opacity:1;object-fit:contain}
.grimm-pwa .phone[data-theme="light"] .nav .native-nav-carrier img {filter:brightness(0);opacity:.88}
.grimm-pwa .phone .nav .work-attention {top:3px;right:calc(50% - 19px);min-width:13px;height:13px;padding:0 2px;border-width:1px;font-size:8px;background:#263138;color:#fff;border-color:#f2f4f5}
.grimm-pwa .phone[data-theme="dark"] .nav .work-attention {background:#dce1e3;color:#1c2329;border-color:#27303a}
.grimm-pwa .phone .nav .nav-btn:focus-visible {outline:2px solid currentColor;outline-offset:-4px;border-radius:10px}
.grimm-pwa .phone .home-form {left:16px;right:16px;bottom:calc(66px + env(safe-area-inset-bottom,0px))!important;height:66px;padding-left:18px}
.grimm-pwa .phone .home-form .query-star:empty {display:none}
.grimm-pwa .phone[data-view="staff"] .staff-shell>.sc[data-sc-screen="inbox"] {padding-bottom:calc(48px + env(safe-area-inset-bottom,0px))!important}
.grimm-pwa .work-shell .work-screen {padding-bottom:calc(48px + env(safe-area-inset-bottom,0px))}
.grimm-pwa .overview-shell {bottom:calc(48px + env(safe-area-inset-bottom,0px))}
/* The source PNG has transparent margins; match its visible mark to sibling icons. */
.grimm-pwa .phone .nav .native-nav-carrier img {width:30px;height:30px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-room{border-bottom:0}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .staff-shell .sc-head{min-height:64px;padding:8px 18px 6px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-filters{padding-top:8px;padding-bottom:10px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-detail-head{min-height:56px;height:56px;flex-basis:56px;padding-top:6px;padding-bottom:6px;border-bottom:0}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-pinned-message{margin-top:6px;padding-top:8px;padding-bottom:8px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-date{margin-top:12px;margin-bottom:10px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-message .sc-msgtext{font-size:16.9px;line-height:1.45;overflow-wrap:anywhere;word-break:break-word}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-preview{display:block;max-width:100%;font-size:13.65px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-msgmeta strong{font-size:11px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-message[data-photo-count="0"] .sc-msgcontent{padding:10px 12px 7px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-composer{border-top:0;padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-composerbar{min-height:50px;padding-top:4px;padding-bottom:4px}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-composer textarea{font-size:16px}
/* DM metadata may wrap; keep it visible without changing normal 56px headers. */
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-detail-head:has(.sc-role-badge){height:auto;min-height:56px;flex-basis:auto}
/* Allow deliberate horizontal gestures while keeping vertical pan and pinch. */
.grimm-pwa .orb-area,.grimm-pwa .chat-feed,.grimm-pwa .chat-head,
.grimm-pwa .sc-head,.grimm-pwa .sc-scroll,.grimm-pwa .sc-search-results,.grimm-pwa .sc-stack-scroll,.grimm-pwa .sc-room,.grimm-pwa .sc-recap,.grimm-pwa .sc-messages,.grimm-pwa .sc-detail-head,
.grimm-pwa .work-list,.grimm-pwa .work-detail,.grimm-pwa .work-heading,.grimm-pwa .work-detail-head {touch-action:pan-y pinch-zoom}
.grimm-pwa .phone[data-view="home"] {touch-action:pan-y pinch-zoom}
.grimm-pwa .overview-scroll,.grimm-pwa .overview-heading,.grimm-pwa .overview-summary,.grimm-pwa .overview-empty-row {touch-action:pan-y pinch-zoom}

/* A completed interactive drag owns its transition; do not restart it. */
.grimm-pwa .phone.grimm-swipe-committing .chat-sheet,.grimm-pwa .phone.grimm-swipe-committing .nav{transition:none!important}

/* One mounted owner per root page; transforms are applied only during a root transition. */
.grimm-pwa .native-home-page{position:absolute;inset:0;background:var(--bg);overflow:hidden;z-index:1}
.grimm-title{margin:0;font:inherit;letter-spacing:inherit}
.grimm-home-role{display:block;margin-top:2px;color:var(--muted);font:500 11px/1.25 'Exo 2',sans-serif;letter-spacing:normal}
.grimm-home-role[hidden]{display:none}
.grimm-pwa .phone[data-live-pager=true] .native-home-page.native-pager-visible,
.grimm-pwa .phone[data-live-pager=true] .staff-shell.native-pager-visible,
.grimm-pwa .phone[data-live-pager=true] .work-shell.native-pager-visible,
.grimm-pwa .phone[data-live-pager=true] .overview-shell.native-pager-visible{display:flex!important;visibility:visible!important;opacity:1!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;box-sizing:border-box;animation:none!important;transition:none!important;will-change:transform;z-index:4;background:var(--bg)}
.grimm-pwa .phone[data-live-pager=true] .native-home-page.native-pager-visible{display:block!important;padding:0!important}
.grimm-pwa .phone[data-live-pager=true] .native-home-page.native-pager-visible .brand,
.grimm-pwa .phone[data-live-pager=true] .native-home-page.native-pager-visible .orb-area,
.grimm-pwa .phone[data-live-pager=true] .native-home-page.native-pager-visible .query-form{visibility:visible!important;opacity:1!important}
.grimm-pwa .phone[data-live-pager=true] .staff-shell.native-pager-visible{padding-top:env(safe-area-inset-top,0px)}
.grimm-pwa .phone[data-live-pager=true] .staff-shell.native-pager-visible>.sc[data-sc-screen=inbox]{padding-bottom:calc(48px + env(safe-area-inset-bottom,0px))!important}
.grimm-pwa .phone[data-live-pager=true] .overview-shell.native-pager-visible{height:calc(100% - 48px - env(safe-area-inset-bottom,0px))!important;padding-top:env(safe-area-inset-top,0px)}
.grimm-pwa .phone[data-live-pager=true] .nav{z-index:8}

/* The live root owner supplies entry motion; nested screens retain their own transitions. */
.grimm-pwa .phone[data-view=staff] .staff-shell{animation:none!important}

/* A native selected-property eyebrow keeps compact header controls within the viewport. */
.grimm-pwa .sc-context{min-width:0;max-width:100%;overflow:hidden}
.grimm-pwa .sc-context:before{flex-shrink:0}
.grimm-pwa .sc-context [data-auth-property-label]{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Chat counters share the published Work attention token/geometry; no Work owner changes. */
.grimm-pwa .phone .nav [data-tab="Чаты"]{position:relative}
.grimm-pwa .phone .sc-room>.chat-unread-count{position:static;flex-shrink:0;min-width:13px;height:13px;padding:0 2px;border:1px solid #f2f4f5;border-radius:99px;background:#263138;color:#fff;font:700 8px 'Exo 2',sans-serif;pointer-events:none;animation:work-badge 160ms ease-out}
.grimm-pwa .phone[data-theme="dark"] .sc-room>.chat-unread-count{background:#dce1e3;color:#1c2329;border-color:#27303a}
@media(prefers-reduced-motion:reduce){.grimm-pwa .phone .sc-room>.chat-unread-count{animation:none!important}}

.grimm-update-offer{position:absolute;z-index:20;top:calc(67px + env(safe-area-inset-top,0px));left:12px;right:12px;width:calc(100% - 24px);min-height:68px;border-radius:18px;display:flex;align-items:center;gap:11px;padding:10px 12px;box-sizing:border-box;border:1px solid #ffffff18;background:linear-gradient(135deg,#353c46,#222831 48%,#0d1116);color:#fff;box-shadow:0 5px 18px #18242c0c;text-align:left;font:inherit;cursor:pointer}
.grimm-update-offer[hidden]{display:none!important}.grimm-update-offer .update-symbol{width:26px;height:26px;flex:none;display:grid;place-items:center;color:#e8edf1}.grimm-update-offer svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.grimm-update-offer .update-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}.grimm-update-offer strong{font-size:13px;font-weight:650;line-height:1.25}.grimm-update-offer small{font-size:11px;color:#c1c8cd;line-height:1.3;overflow-wrap:anywhere}.grimm-update-offer .update-arrow{width:32px;height:32px;flex:none;border-radius:10px;background:#ffffff12;display:grid;place-items:center}.grimm-update-offer .update-arrow svg{width:19px;height:19px}.grimm-update-offer:focus-visible,.grimm-update-dialog button:focus-visible{outline:2px solid #788a98;outline-offset:3px}
.grimm-update-dialog{color:var(--fg);font-family:'Exo 2',sans-serif}
.grimm-update-dialog .sc-modalhead button{min-width:44px;min-height:44px}
.grimm-update-body{padding:8px 20px 22px}.grimm-update-version{color:var(--muted);font-size:13px}.grimm-update-body h3{font:700 16px Tektur,sans-serif;margin:20px 0 8px}.grimm-update-body [data-update-notes]{white-space:pre-wrap;overflow-wrap:anywhere}.grimm-update-body progress{width:100%;accent-color:var(--fg)}
.grimm-update-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.grimm-update-actions button{min-height:44px;padding:0 15px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--fg);font:600 14px 'Exo 2',sans-serif;cursor:pointer}.grimm-update-actions button[data-update="download"],.grimm-update-actions button[data-update="install"]{background:var(--btn);color:var(--btn-fg)}.grimm-update-actions button:disabled{opacity:.5;cursor:default}.grimm-update-actions [hidden]{display:none!important}

.real-overview .overview-role:empty{display:none}.real-overview .overview-heading{flex-shrink:0}.real-overview .overview-banner{font-size:11px;line-height:1.4}.real-overview .overview-scroll{min-height:0;overflow:auto}.real-overview .overview-datebar{display:flex;gap:6px;align-items:center}.real-overview .overview-datebar label{position:relative;flex:1;min-width:0;font-size:13px}.real-overview .overview-datebar input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.real-overview .overview-grid-wrap{overflow:auto;max-width:100%;touch-action:pan-y pinch-zoom}.real-grid{min-width:calc(112px + var(--timeline-width));position:relative}.real-grid-head,.real-grid-row{display:flex}.real-grid-head{position:sticky;top:0;z-index:4;background:var(--surface,#fff)}.real-grid-head>span,.real-resource{position:sticky;left:0;z-index:3;background:var(--surface,#fff);width:112px;min-width:112px;box-sizing:border-box;padding:8px;border-right:1px solid #8883;overflow:hidden}.real-grid-head>div{display:flex;width:var(--timeline-width)}.real-grid-head>div span{flex:1;text-align:center;font-size:11px;padding:8px 0}.real-category{position:sticky;left:0;width:calc(100vw - 60px);padding:7px 10px;box-sizing:border-box;font-size:11px;opacity:.7}.real-resource strong,.real-resource small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.real-resource strong{font-size:12px}.real-resource small{font-size:10px;opacity:.6}.real-grid-row{border-bottom:1px solid #8882;height:58px}.real-overview .overview-track{position:relative;display:flex;flex:none;height:58px;min-width:0}.real-slot{flex:1;background:transparent;border:0;border-right:1px solid #8882;min-width:0;padding:0}.real-booking{position:absolute;top:6px;height:46px;box-sizing:border-box;border:1px solid #467ec977;background:#dceaf8;color:#183650;border-radius:8px;text-align:left;padding:5px;overflow:hidden;z-index:1;min-width:1px}.real-booking strong,.real-booking small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.real-booking small{font-size:9px}.real-shift-group h4{margin:14px 0 7px}.real-shift-group h4 small{opacity:.5}.real-overview .overview-shift-item{display:flex;flex-direction:column;width:100%;text-align:left;gap:4px;padding:12px;margin-bottom:6px;border:1px solid #8883;border-radius:12px;background:transparent;color:inherit}.real-period{font-size:13px}.overview-dialog .sc-modalhead small{display:block;font-size:11px;opacity:.6}.overview-dialog .overview-record dd{overflow-wrap:anywhere}.phone[data-theme=dark] .real-grid-head,.phone[data-theme=dark] .real-grid-head>span,.phone[data-theme=dark] .real-resource{background:#15171a}.phone[data-theme=dark] .real-booking{background:#243d54;color:#e1efff}

.real-period{display:flex;align-items:center;gap:10px;padding:10px;background:#8881;border-radius:12px}.real-period strong{font-size:13px}.real-period small{display:block;font-size:11px;opacity:.65;margin-top:4px}.real-card-info{display:flex;align-items:center;gap:10px;font-size:13px;min-height:34px;overflow-wrap:anywhere}.real-card-info svg{flex:none;opacity:.6}.real-card-total{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #8883;padding-top:12px;margin-top:10px;font-size:12px}.real-card-total strong{font-size:20px}

.real-overview[data-section=houses] .overview-scroll,.real-overview[data-section=services] .overview-scroll{overflow:hidden;display:flex;flex-direction:column;padding-bottom:0}.real-overview[data-section=houses] .overview-grid-wrap,.real-overview[data-section=services] .overview-grid-wrap{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}.real-grid-head small{display:block;font-size:9px;opacity:.6}.real-grid-head .real-today{font-weight:700;background:#467ec922;box-shadow:inset 0 -2px #467ec9}

.staff-dialog>form.real-booking-card{gap:7px}.real-booking-card .real-period{margin:0;padding:9px}.real-booking-card .real-card-info{min-height:28px}.real-booking-card .real-card-total{margin-top:3px;padding-top:8px}.real-booking-card .sc-modalhead strong{font-size:17px}.real-booking-card .work-primary{margin-top:3px}

.real-booking-card .work-primary:disabled{background:var(--soft);color:var(--muted);border:1px solid var(--border)}

/* Approved shared modal: existing Exo2/Tektur and graphite tokens. */
.staff-dialog>form.real-booking-form{gap:10px}.real-booking-form .sc-modalhead{margin-bottom:3px}.real-booking-form .sc-modalhead strong{font-family:Tektur,'Exo 2',sans-serif;font-size:16px}.real-form-fields{display:grid;gap:10px}.real-form-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.real-booking-form label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--muted);min-width:0}.real-booking-form input,.real-booking-form select,.real-booking-form textarea{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--soft);color:var(--fg);font:inherit;font-size:13px;min-height:39px}.real-booking-form input:disabled,.real-booking-form textarea:disabled{opacity:.6}.real-booking-form textarea{height:54px;resize:vertical}.real-booking-form .real-form-check{flex-direction:row;align-items:center;font-size:10px;line-height:1.35}.real-form-check input{width:15px;min-height:15px;flex:none}.real-form-modifiers{margin:0;padding:8px;border:1px solid var(--border);border-radius:10px}.real-form-modifiers legend{font-size:11px;color:var(--muted)}.real-form-modifiers label{flex-direction:row;align-items:center;justify-content:space-between}.real-form-modifiers input{width:58px;min-height:32px;padding:5px}.real-form-status:empty{display:none}.real-form-status{font-size:11px;line-height:1.5;color:var(--muted);margin:0}.real-form-actions{display:grid;gap:8px}.real-booking-form .work-primary{background:var(--btn);color:var(--btn-fg)}.real-booking-form .work-primary:disabled{background:var(--soft);color:var(--muted);border:1px solid var(--border)}.real-booking-form .real-card-total{margin-top:3px}.real-booking-form .work-muted{font-size:10px;line-height:1.4;margin:0}
.real-booking-form .real-form-check[hidden]{display:none}
.phone[data-theme=dark] .real-result-symbol.success{color:#9ac79c}.phone[data-theme=dark] .real-result-symbol.failure{color:#e79c94}
.real-save-result>.real-result-symbol.success,.real-save-result>.real-result-symbol.failure,.real-save-result>strong{animation:real-result-enter 200ms ease-out both}@keyframes real-result-enter{from{opacity:0;transform:scale(.9) translateY(5px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.real-save-result>.real-result-symbol,.real-save-result>strong{animation:none!important}}
.real-overview .overview-banner:empty{display:none}.real-period-button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:44px;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--fg);font:inherit;font-size:12px}.real-period-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.real-period-button svg{flex:none}.real-overview .overview-datebar{display:flex;align-items:center;gap:5px}.real-overview .overview-datebar>.real-period-button{flex:1}.real-overview .overview-datebar .sc-iconbtn{width:28px;min-width:28px;padding:0}.real-today-button{height:44px;padding:8px!important;font-size:11px!important}.real-add-button{width:44px;height:44px;flex:none;border:0;border-radius:12px;background:var(--btn);color:var(--btn-fg);font-size:28px;line-height:1}.real-booking-form .real-form-row>.real-period-button{width:100%}.real-calendar{width:100%;max-width:320px;box-sizing:border-box;display:grid;gap:14px}.real-calendar-month{display:flex;align-items:center;justify-content:space-between;font-family:Tektur,'Exo 2',sans-serif}.real-calendar-month button{width:40px;height:40px;border:1px solid var(--border);border-radius:11px;background:var(--soft);color:var(--fg);font-size:23px}.real-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.real-calendar-days small{font-size:10px;color:var(--muted);padding-bottom:6px}.real-calendar-days button{min-width:0;aspect-ratio:1;border:0;border-radius:9px;background:transparent;color:var(--fg);font:inherit;font-size:12px}.real-calendar-days .is-outside{opacity:.35}.real-calendar-days .is-range{background:var(--soft);border-radius:3px}.real-calendar-days .is-selected{background:var(--btn);color:var(--btn-fg);opacity:1}.real-calendar>p{margin:0;color:var(--muted);font-size:11px;text-align:center}.real-calendar .real-form-actions{grid-template-columns:1fr 1fr}.real-resource-chooser{display:grid;gap:8px;max-height:70vh;overflow:auto}.real-resource-chooser>button{text-align:left}.real-save-result{display:flex;min-height:270px;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;padding:20px 6px;box-sizing:border-box}.real-save-result>strong{font-family:Tektur,'Exo 2',sans-serif;font-size:18px}.real-save-result>p{font-size:12px;color:var(--muted);margin:0}.real-result-symbol{display:grid;place-items:center;width:70px;height:70px;border-radius:50%;background:var(--soft);font-size:43px}.real-result-symbol.success{color:#477345}.real-result-symbol.failure{color:#a44e46}.real-result-symbol.loading span,.real-result-symbol.pending span{width:30px;height:30px;border:3px solid var(--border);border-top-color:var(--fg);border-radius:50%;animation:real-saving-spin .9s linear infinite}.real-save-result>button{width:100%}.real-save-result details{text-align:left;width:100%;font-size:12px}.real-save-result [hidden],.real-booking-form>[hidden]{display:none!important}@keyframes real-saving-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.real-result-symbol span{animation:none!important}}
.real-conflict-review section,.real-conflict-review details{border:1px solid var(--border);border-radius:10px;padding:10px;overflow-wrap:anywhere}.real-conflict-review section>strong,.real-conflict-review summary{font-size:12px;font-weight:650}.real-conflict-review small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.real-conflict-review p{font-size:12px;line-height:1.4;margin:6px 0 0;white-space:pre-wrap}.real-conflict-review details>summary{cursor:pointer}
.real-overview .overview-track{min-height:58px;height:58px;overflow:hidden}.real-resource{flex:0 0 112px;max-width:112px;background:var(--card);display:flex;flex-direction:column;justify-content:center;gap:4px}.real-resource strong{line-height:1.3}.real-category{line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;background:var(--card)}.real-grid-head,.real-grid-head>span{background:var(--card)}
.real-booking[data-source=pms][data-status="1"]{background:#e2efdf;color:#244523;border-color:#92b58b}.real-booking[data-source=pms][data-status="5"]{background:#fff0bd;color:#614b11;border-color:#c5a44d}.phone[data-theme=dark] .real-booking[data-source=pms][data-status="1"]{background:#293f2b;color:#e1efdd;border-color:#72916b}.phone[data-theme=dark] .real-booking[data-source=pms][data-status="5"]{background:#4d4023;color:#fff0c1;border-color:#ae9250}.real-overview .overview-shift-row strong,.real-overview .overview-shift-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.real-overview .overview-shift-row time{flex:none}
.real-resource-line{display:flex;align-items:center;gap:4px;min-width:0}.real-resource-line strong{min-width:0;flex:1;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;line-height:1.3}.real-resource-line small{display:flex;align-items:center;gap:2px;flex:none;white-space:nowrap;font-size:10px;opacity:.75}.real-resource-line svg{width:13px;height:13px;flex:none}.real-booking{top:4px;height:50px;padding:4px}.real-band-label{display:block;will-change:transform;overflow:hidden}.real-booking .real-band-money{font-weight:650;font-size:10px;line-height:1.4}.real-band-status{display:block;font-size:9px;line-height:1.3;opacity:.72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.real-booking[data-source=pms][data-status="4"]{background:#e9e9e7;color:#555954;border-color:#b4b8b1}.phone[data-theme=dark] .real-booking[data-source=pms][data-status="4"]{background:#353735;color:#d3d6d1;border-color:#626861}.real-customer-results{display:grid;gap:4px;max-height:150px;overflow:auto}.real-customer-results button{text-align:left;font-size:11px;white-space:normal;overflow-wrap:anywhere}.real-rate-hint:empty,.real-customer-results:empty,[data-customer-state]:empty{display:none}.real-booking-form [data-quote][hidden]{display:none}.real-rate-hint{font-size:10px;line-height:1.4}.real-booking-form [data-customer-state]{font-size:10px;line-height:1.4;margin:0}

/* One shared period row. Form range controls retain their existing geometry. */
.real-house-date-row>.real-period-button{grid-column:1/-1}
.real-overview .overview-datebar{gap:8px;border:0;border-radius:0;background:transparent;padding:0;min-height:44px}.real-overview .overview-datebar:focus-within{outline:0}.real-overview .overview-datebar>button{height:44px;min-height:44px;box-sizing:border-box}.real-overview .overview-datebar>.real-period-button{justify-content:flex-start;gap:5px;padding:8px;border:0;background:var(--soft);font-weight:500}.real-overview .overview-datebar>.real-period-button>span{min-width:0;overflow:visible;text-overflow:clip;white-space:nowrap;text-align:left;flex:1}.real-overview .overview-datebar>.real-period-button>.real-period-chevron{flex:none;font-size:18px;line-height:1}.real-overview .overview-datebar>.real-today-button{flex:none;padding:8px 12px!important;border:0;background:var(--soft);font-size:12px!important}.real-overview .overview-datebar>.real-add-button{width:44px;min-width:44px;padding:0}.real-overview .overview-datebar>button:focus-visible{outline:2px solid var(--muted);outline-offset:2px}
.real-calendar-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.real-calendar-months button{min-width:0;min-height:44px;padding:8px 3px;border:0;border-radius:10px;background:var(--soft);color:var(--fg);font:inherit;font-size:12px}.real-calendar-months button.is-selected{background:var(--btn);color:var(--btn-fg)}.real-calendar-month button{width:44px;height:44px}.real-calendar button:focus-visible{outline:2px solid var(--muted);outline-offset:2px}
/* Approved house-and-tariff cards use the existing theme and dialog. */
.real-house-search{display:flex;flex-direction:column;gap:12px;min-width:0}
.staff-dialog>form.real-house-search{gap:12px}.real-house-search [data-search-status]:empty{display:none}.real-house-search [data-search-status]{font-size:12px;margin:0}
.real-house-search .real-period-button{width:100%;min-height:44px;white-space:normal;text-align:left}
.real-house-search .real-period-button span{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.4}
.real-search-steps,.real-search-heading,.real-search-cardhead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.real-search-steps{font-size:11px;color:var(--muted);padding:4px 0}.real-search-steps b{font-weight:400}.real-search-steps [aria-current=step]{color:var(--fg);font-weight:600}
.real-search-rooms{display:flex;flex-direction:column;gap:12px}
.real-search-card{border:1px solid var(--border);border-radius:16px;padding:12px;background:var(--card)}
.real-search-cardhead{margin-bottom:10px;flex-wrap:wrap}.real-search-cardhead>strong{font-size:16px;overflow-wrap:anywhere}
.staff-dialog .real-search-cardhead label{display:flex;flex-direction:row;align-items:center;gap:4px;min-width:0}
.real-search-cardhead select{min-height:36px;max-width:130px;background:var(--soft);color:inherit;border:1px solid var(--border);border-radius:10px;padding:4px;font:inherit}
.real-search-rates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.real-search-rates button{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:8px;min-height:94px;padding:8px!important;text-align:left;min-width:0;white-space:normal;overflow-wrap:anywhere}
.real-search-rates button span{font-size:11px;line-height:1.3}.real-search-rates button strong{font-size:13px;line-height:1.35}.real-search-rates button:disabled{opacity:.55}
.real-search-rates button[aria-pressed=true]{border-color:var(--fg);background:var(--soft);box-shadow:inset 0 0 0 1px var(--fg)}
.real-search-selection{position:sticky;bottom:-1px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;margin-top:12px;border-top:1px solid var(--border);background:var(--card)}
.real-search-selection>div{display:grid;gap:3px;min-width:0}.real-search-selection span{font-size:13px}.real-search-selection button{min-width:100px;min-height:44px}
.real-group-form{display:grid;gap:12px;min-width:0}.real-group-summary{display:grid;gap:8px}.real-group-summary .real-card-info{justify-content:space-between;gap:10px;align-items:flex-start}.real-group-summary span{min-width:0;overflow-wrap:anywhere}.real-group-summary small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.real-group-summary strong{overflow-wrap:anywhere}.real-group-form .real-form-actions{grid-template-columns:1fr 1.5fr}.real-group-form .real-save-result .real-result-symbol.loading:empty:after{content:'';width:30px;height:30px;border:3px solid var(--border);border-top-color:var(--fg);border-radius:50%;animation:real-saving-spin .9s linear infinite}@media(prefers-reduced-motion:reduce){.real-group-form .real-result-symbol.loading:empty:after{animation:none}}
.staff-dialog .real-search-selection button{width:auto;flex:0 0 auto}.real-search-selection>div{min-width:100px;white-space:nowrap}

/* HOME138: presentation follows the existing actual scoped read lifecycle. */
.real-overview .overview-datebar>.real-add-button{display:grid;place-items:center;line-height:0}.real-add-button svg{display:block;flex:none}
.real-overview[data-section=houses] .real-slot.real-today{background:var(--soft);box-shadow:inset 1px 0 var(--border),inset -1px 0 var(--border)}
.real-overview.is-refreshing::after{content:"";position:absolute;inset:var(--overview-refresh-top,0px) 0 0;z-index:5;pointer-events:none;background:linear-gradient(110deg,transparent 40%,var(--fg) 50%,transparent 60%);background-size:240% 100%;opacity:.045;animation:overview-refresh-wave 2.2s linear infinite}
@keyframes overview-refresh-wave{from{background-position:120% 0}to{background-position:-120% 0}}
@media(prefers-reduced-motion:reduce){.real-overview.is-refreshing::after{animation:none;background:none;border-top:2px solid var(--muted);opacity:.65}}

/* HOME147: current service hour and exact minute, below interactive bookings. */
.real-overview[data-section=services] .real-grid-head>div{position:relative}
.real-overview[data-section=services] .real-grid-head>div>[data-service-hour]{padding-bottom:21px}
.real-overview[data-section=services] .real-current-hour{background:var(--soft);box-shadow:inset 1px 0 var(--border),inset -1px 0 var(--border)}
.real-overview .real-service-now{position:absolute;top:0;bottom:0;width:1px;border-left:1px solid var(--fg);opacity:.55;z-index:0;pointer-events:none}
.real-overview .real-grid-head>div>.real-service-now-label{position:absolute;bottom:1px;width:96px;flex:none;padding:0;font-size:9px;line-height:14px;color:var(--fg);background:var(--card);border:1px solid var(--border);border-radius:5px;pointer-events:none;z-index:1;white-space:nowrap}

/* Source-local states and a thin factual clock; no filled current column. */
.real-overview .overview-stats{display:flex;gap:3px;flex-wrap:wrap}.real-summary-placeholder{color:var(--muted)}
/* A shared vertical rhythm for the shift summary and its date controls. */
.real-overview .overview-controls{padding-bottom:16px}
.real-overview .overview-shift-group{margin-bottom:24px}
.real-overview .overview-shift-group>header{margin:0 0 8px}
.real-summary-placeholder[aria-label^="Загрузка"]{background:var(--soft);border-radius:4px;min-width:48px}
.real-overview .real-service-now{opacity:.55;overflow:hidden;z-index:1}
.real-now-glint::after{content:"";position:absolute;left:-1px;top:-30%;width:2px;height:30%;background:var(--fg);filter:brightness(1.6);animation:real-now-glint 3s linear infinite}
.real-overview:not([data-section=houses]):not([data-section=services]) .real-service-now{display:none}
.real-overview .real-grid-head>div{padding-bottom:0;position:relative}
.real-overview[data-section=services] .real-grid-head>div>[data-service-hour]{padding-bottom:0}
.real-summary-placeholder[aria-label^="Загрузка"],.real-source-skeleton{position:relative;overflow:hidden}
.real-summary-placeholder[aria-label^="Загрузка"]::after,.real-source-skeleton::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 25%,var(--border) 50%,transparent 75%);transform:translateX(-100%);animation:real-source-shimmer 1.8s ease-in-out infinite}
.real-source-skeleton{height:48px;margin:8px 0;border-radius:8px;background:var(--soft)}
@keyframes real-source-shimmer{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){.real-summary-placeholder::after,.real-source-skeleton::after{animation:none;display:none}}
@keyframes real-now-glint{to{transform:translateY(440%)}}
@media(prefers-reduced-motion:reduce){.real-now-glint::after{animation:none;display:none}}

.real-overview .real-grid{position:relative}.real-overview .real-now-glint{border:0;opacity:1;z-index:5;overflow:hidden}
.real-overview .real-now-glint::after{animation-play-state:paused}.real-overview.is-clock-active .real-now-glint::after{animation-play-state:running}

.real-overview .overview-shift-row{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;min-height:72px;height:auto;padding:10px;gap:8px;margin:7px 0;border-radius:13px;background:var(--hk-tint);border:1px solid color-mix(in srgb,var(--hk-ink) 15%,transparent)}
.real-overview .overview-shift-row.hk-neutral{--hk-tint:var(--soft);--hk-ink:var(--muted)}
.real-overview .overview-shift-symbol{flex:none;width:34px;height:36px;display:grid;place-items:center;background:none;color:var(--hk-ink)}
.real-overview .overview-shift-symbol svg{width:19px;height:19px}.real-overview .overview-shift-row>span:nth-child(2){min-width:0;flex:1}.real-overview .overview-shift-row strong{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.3}.real-overview .overview-shift-row time{flex:none}.real-overview .overview-shift-row>svg{width:14px;height:14px;flex:none}
@media(max-width:360px){.real-overview .overview-shift-row{gap:6px}.real-overview .overview-shift-symbol{width:30px}}

/* Approved service chooser only; shared dialog/form layout remains unchanged. */
.staff-dialog.sc-modal.real-service-dialog{overflow:hidden;gap:0;padding:18px 16px}
.staff-dialog.sc-modal>form.real-service-tiles{display:flex;flex-direction:column;gap:0;width:100%;min-width:0;min-height:0;height:min(620px,75vh);max-height:none;overflow:hidden;padding:0;margin:0}
.real-service-tiles .sc-modalhead{flex:none;align-items:flex-start;gap:8px;margin:0 0 17px}.real-service-tiles .sc-modalhead>div{min-width:0}.real-service-tiles .sc-modalhead strong{display:block;font:600 23px/1.15 Tektur,'Exo 2',sans-serif;letter-spacing:-.4px;overflow-wrap:anywhere}.real-service-tiles .sc-modalhead small{display:block;margin-top:8px;font-size:12px;line-height:1.5;color:var(--muted)}
.sc-modal .real-service-tiles .sc-modalhead button{width:44px;height:44px;min-height:44px;padding:0;flex:none;border:0;border-radius:12px;background:transparent;color:var(--fg);display:grid;place-items:center}
.real-service-search{display:flex;align-items:center;gap:9px;min-height:48px;flex:none;background:var(--soft);border-radius:14px;padding:0 11px;margin-bottom:15px}.real-service-search>svg{flex:none;color:var(--muted)}
.sc-modal .real-service-tiles input[data-service-query]{min-width:0;width:100%;height:48px;min-height:48px;padding:10px 0;border:0;border-radius:0;background:transparent;font:400 16px/1.4 'Exo 2',sans-serif;color:var(--fg);box-shadow:none}.real-service-tiles input[type=search]::-webkit-search-cancel-button{display:none}.real-service-tiles input::placeholder{color:var(--muted);opacity:1}
.sc-modal .real-service-tiles [data-service-clear]{width:44px;min-width:44px;height:44px;min-height:44px;flex:none;padding:0;border:0;border-radius:10px;background:transparent;color:var(--fg);display:grid;place-items:center}
.real-service-caption{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:none;margin-bottom:10px;font-size:11px;line-height:1.4;color:var(--muted)}.real-service-caption [data-service-count]{white-space:nowrap}
.real-service-results{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;padding:2px 2px 6px}.real-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sc-modal .real-service-tiles .real-service-tile{box-sizing:border-box;min-width:0;width:100%;min-height:152px;height:auto;display:flex;flex-direction:column;align-items:flex-start;gap:12px;border:1px solid var(--border);border-radius:17px;padding:14px;background:var(--card);color:var(--fg);text-align:left;font:inherit;cursor:pointer}
.real-service-tile .real-service-symbol{width:25px;height:25px;display:grid;place-items:center;flex:none}.real-service-tile strong{display:block;min-width:0;white-space:normal;overflow-wrap:anywhere;font:600 15px/1.3 'Exo 2',sans-serif}.real-service-tile small{display:flex;align-items:center;gap:5px;margin-top:auto;font:400 12px/1.4 'Exo 2',sans-serif;color:var(--muted)}.real-service-tile small svg{flex:none}.sc-modal .real-service-tiles .real-service-tile:hover{background:var(--soft)}.sc-modal .real-service-tiles .sc-modalhead button:hover{background:var(--soft)}.sc-modal .real-service-tiles [data-service-clear]:hover{background:var(--card)}.real-service-tile:active{opacity:.65}.real-service-tiles :is(button,input):focus-visible{outline:2px solid var(--fg);outline-offset:2px}.real-service-empty{padding:34px 10px;margin:0;text-align:center;color:var(--muted);font-size:14px;line-height:1.5}.real-service-tiles [hidden]{display:none!important}

/* Confirmed closed periods remain separate from guest reservations. */
.real-unavailable{position:absolute;top:0;bottom:0;box-sizing:border-box;z-index:0;pointer-events:auto;overflow:hidden;background:repeating-linear-gradient(135deg,transparent 0,transparent 4px,var(--border) 4px,var(--border) 6px),var(--soft);border-block:1px solid var(--border);color:var(--muted);display:flex;align-items:center}
.real-unavailable>.real-band-label{display:inline-flex;align-items:center;gap:5px;min-width:0;padding:4px 6px;box-sizing:border-box;background:var(--card);border-radius:5px;font-size:10px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.real-unavailable>.real-band-label>span{overflow:hidden;text-overflow:ellipsis}

/* Let the calendar track receive swipes over cells that cannot create bookings. */
.real-overview .overview-track .real-slot:disabled{pointer-events:none}

@property --hk-edge-angle{syntax:'<angle>';inherits:false;initial-value:0deg}
.hk-state-surface{--hk-green:#e2f1e5;--hk-green-ink:#2d5d39;--hk-yellow:#f9edc9;--hk-yellow-ink:#725920;--hk-red:#f6e2de;--hk-red-ink:#863f35;--hk-blue:#e1eef2;--hk-blue-ink:#315d6d;--hk-purple:#ece5f5;--hk-purple-ink:#684e81;--hk-gray:#e7ece8;--hk-gray-ink:#56655b;--hk-teal:#e0efe9;--hk-teal-ink:#306653;--hk-glint:#af8b2f;--hk-urgent-edge:#d64040;}
.housekeeping-shell{position:absolute;inset:env(safe-area-inset-top,0px) 0 calc(58px + env(safe-area-inset-bottom,0px));z-index:4;display:flex;flex-direction:column;background:var(--bg);color:var(--fg);padding:0 12px;overflow:hidden;isolation:isolate;touch-action:pan-y}
.phone[data-theme=dark] .hk-state-surface{--hk-green:#213d2b;--hk-green-ink:#b2dfbf;--hk-yellow:#463d24;--hk-yellow-ink:#eddaa1;--hk-red:#452c29;--hk-red-ink:#efb5a9;--hk-blue:#263e45;--hk-blue-ink:#afd6e2;--hk-purple:#3b304a;--hk-purple-ink:#d2bfe6;--hk-gray:#333d36;--hk-gray-ink:#c0cfc5;--hk-teal:#254137;--hk-teal-ink:#addcc8;--hk-glint:#f2d17d;--hk-urgent-edge:#ed7777}
.housekeeping-shell[hidden]{display:none!important}
.housekeeping-shell *{box-sizing:border-box}
.housekeeping-shell button,.hk-sheet button{cursor:pointer;touch-action:manipulation;font:inherit}
.housekeeping-shell .hk-heading{padding:10px 4px 16px;min-height:80px;flex:none}
.housekeeping-shell .hk-banner{font-size:12px;line-height:1.4;color:var(--muted);flex:none}
.housekeeping-shell .hk-banner:not(:empty){padding:0 4px 10px}
.housekeeping-shell .hk-banner button{border:0;border-radius:8px;background:var(--soft);color:var(--fg);padding:10px}
.housekeeping-shell .hk-viewport{flex:1;min-height:0;position:relative;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent;contain:layout paint;isolation:isolate;clip-path:inset(0);overflow-anchor:none;touch-action:pan-y}
.housekeeping-shell .hk-spacer{width:1px;pointer-events:none}
.housekeeping-shell .hk-row{position:absolute;top:0;left:1px;right:4px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:7px}
.housekeeping-shell .hk-row[data-section=true]:before{content:'';position:absolute;left:4px;right:4px;top:-14px;height:1px;background:var(--border)}
.housekeeping-shell .hk-card{position:relative;min-width:0;height:var(--hk-height);padding:0;border-radius:calc(11px + 4px * var(--hk-spread));background:var(--hk-tint);isolation:isolate;overflow:hidden}
.housekeeping-shell .hk-card[data-note=true]{height:calc(var(--hk-height) + var(--hk-note))}
.hk-state-surface .hk-ready{--hk-tint:var(--hk-green);--hk-ink:var(--hk-green-ink)}
.hk-state-surface .hk-clean{--hk-tint:var(--hk-yellow);--hk-ink:var(--hk-yellow-ink)}
.hk-state-surface .hk-dirty,.hk-state-surface .hk-guest{--hk-tint:var(--hk-red);--hk-ink:var(--hk-red-ink)}
.hk-state-surface .hk-occupied{--hk-tint:var(--hk-blue);--hk-ink:var(--hk-blue-ink)}
.hk-state-surface .hk-late{--hk-tint:var(--hk-purple);--hk-ink:var(--hk-purple-ink)}
.hk-state-surface .hk-repair,.hk-state-surface .hk-unmarked{--hk-tint:var(--hk-gray);--hk-ink:var(--hk-gray-ink)}
.hk-state-surface .hk-inspect{--hk-tint:var(--hk-inspect);--hk-ink:var(--hk-inspect-ink)}
.housekeeping-shell .hk-card button{position:absolute;border:0;background:none;padding:0;color:inherit;border-radius:7px}
.housekeeping-shell .hk-card button:focus-visible,.hk-sheet button:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
.housekeeping-shell .hk-name{left:calc(8px + 2px * var(--hk-spread));top:calc(var(--hk-center) * (1 - var(--hk-lower)) + 6px * var(--hk-lower));width:calc((100% - 86px) * (1 - var(--hk-spread)) + (100% - 20px) * var(--hk-spread));height:calc(44px * (1 - var(--hk-lower)) + 20px * var(--hk-lower));display:flex;align-items:center;text-align:left;font-size:calc(14.3px + var(--hk-spread) * 1.3px);font-weight:650;line-height:18px}
.housekeeping-shell .hk-name span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}
.housekeeping-shell .hk-full{display:none}
.housekeeping-shell .hk-row[data-long=true] .hk-full{display:block}
.housekeeping-shell .hk-row[data-long=true] .hk-short{display:none}
.housekeeping-shell .hk-status{left:8px;top:calc(var(--hk-height) - 48px);height:44px;width:calc(100% - 86px);display:flex;align-items:center;gap:2px;color:var(--hk-ink)!important;opacity:var(--hk-spread);font-size:11px;white-space:nowrap;text-align:left;overflow:hidden}
.housekeeping-shell .hk-status span{overflow:hidden;text-overflow:ellipsis}
.housekeeping-shell .hk-card svg{width:16px;height:16px;flex:none}
.housekeeping-shell .hk-status svg{width:12px;height:12px}
.housekeeping-shell .hk-status .hk-sweeping{width:16px;height:16px}
.housekeeping-shell .hk-tools{position:absolute;left:calc(100% - 76px);top:calc(var(--hk-center) * (1 - var(--hk-lower)) + (var(--hk-height) - 48px) * var(--hk-lower));width:72px;height:44px;display:flex}
.housekeeping-shell .hk-tools button{position:relative;flex:1;min-width:0;width:24px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--fg);transition:background .18s}
.housekeeping-shell .hk-tools button[aria-pressed]:after{content:'';position:absolute;width:3px;height:3px;bottom:5px;border-radius:50%;background:currentColor;opacity:.22}
.housekeeping-shell .hk-tools button[aria-pressed=true]:after{opacity:1}
.housekeeping-shell .hk-tools button[aria-pressed=false] svg{opacity:.4}
.housekeeping-shell .hk-tools button:disabled{cursor:default}
.housekeeping-shell .hk-tools button:disabled svg{opacity:.3}
.housekeeping-shell .hk-note{left:8px;right:8px;top:var(--hk-height);height:26px;display:flex;align-items:center;gap:5px;padding:0 6px!important;border-radius:7px;background:color-mix(in srgb,var(--card) 30%,transparent)!important;color:var(--fg);font-size:11px;text-align:left;opacity:var(--hk-spread)}
.housekeeping-shell .hk-note svg{width:13px;height:13px;opacity:.7}
.housekeeping-shell .hk-note span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hk-state-surface :is(.hk-card,.hk-inline-card,.overview-shift-row).hk-clean:before,.hk-state-surface :is(.hk-card,.hk-inline-card,.overview-shift-row)[data-urgent=true]:after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1.7px;background:conic-gradient(from var(--hk-edge-angle),transparent 0 66%,var(--hk-glint) 79%,transparent 94%);mask:linear-gradient(currentColor 0 0) content-box,linear-gradient(currentColor 0 0);mask-composite:exclude;-webkit-mask:linear-gradient(currentColor 0 0) content-box,linear-gradient(currentColor 0 0);-webkit-mask-composite:xor;pointer-events:none;animation:hk-edge 3.8s linear infinite}
.hk-state-surface :is(.hk-card,.hk-inline-card,.overview-shift-row)[data-urgent=true]:after{background:conic-gradient(from var(--hk-edge-angle),transparent 0 66%,var(--hk-urgent-edge) 79%,transparent 94%);z-index:2}
.hk-state-surface .hk-sweeping{animation:hk-sweep 2.2s ease-in-out infinite;transform-origin:50% 75%}
.housekeeping-shell .hk-card[data-visible=false]:before,.housekeeping-shell .hk-card[data-visible=false]:after,.housekeeping-shell .hk-card[data-visible=false] .hk-sweeping,.housekeeping-shell[hidden] .hk-card:before,.housekeeping-shell[hidden] .hk-card:after,.housekeeping-shell[hidden] .hk-sweeping{animation-play-state:paused}
.housekeeping-shell .hk-state{padding:50px 18px;color:var(--muted);text-align:center;font-size:14px}
.hk-sheet{color:var(--fg);font:14px/1.4 'Exo 2',sans-serif}
.hk-sheet .sc-modalhead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.hk-sheet .sc-modalhead strong{font-family:Tektur,sans-serif;font-size:18px}
.hk-sheet .sc-modalhead small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.hk-sheet .sc-modalhead button{width:44px;height:44px;flex:none;border:0;background:none;color:var(--fg)}
.hk-sheet svg{width:18px;height:18px}
.hk-sheet .hk-primary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:46px;margin:12px 0}
.hk-sheet fieldset{border:0;margin:12px 0;padding:0;display:grid;gap:8px}
.hk-sheet legend{font-size:12px;color:var(--muted);margin-bottom:8px}
.hk-sheet fieldset label{display:flex;gap:10px;align-items:center;min-height:44px;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--soft)}
.hk-sheet input{accent-color:var(--fg)}
.hk-sheet .hk-urgent-choice{display:flex;justify-content:space-between;align-items:center;min-height:48px}
.hk-sheet .hk-field{display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--muted);margin:10px 0}
.hk-sheet textarea{font:16px/1.4 'Exo 2',sans-serif;min-height:80px;max-height:180px;resize:none;border:1px solid var(--border);border-radius:12px;padding:10px;background:var(--soft);color:var(--fg)}
.hk-sheet .hk-history-link{display:flex;justify-content:center;align-items:center;gap:7px;min-height:44px;width:100%;border:0;background:none;color:var(--muted)}
.hk-sheet .hk-error{color:var(--fg);padding:12px;border-radius:10px;background:var(--soft);font-size:13px;line-height:1.4}
.hk-sheet .hk-comment-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.5;margin:12px 0}
.hk-sheet .hk-comment-author,.hk-sheet .hk-wait{font-size:12px;color:var(--muted)}
.hk-sheet .hk-log{padding:12px 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.hk-sheet .hk-log strong{display:block;font-size:14px}
.hk-sheet .hk-log small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.hk-sheet .hk-log p{margin:7px 0 0;font-size:13px;white-space:pre-wrap}
.grimm-pwa .phone[data-live-pager=true] .housekeeping-shell.native-pager-visible{display:flex!important;visibility:visible!important;opacity:1!important;position:absolute!important;inset:env(safe-area-inset-top,0px) 0 calc(58px + env(safe-area-inset-bottom,0px))!important;width:100%!important;box-sizing:border-box;animation:none!important;transition:none!important;will-change:transform;z-index:4;background:var(--bg)}
@keyframes hk-edge{to{--hk-edge-angle:360deg}}
@keyframes hk-sweep{0%,100%{transform:rotate(-7deg) translateX(-1px)}50%{transform:rotate(7deg) translateX(1px)}}
.hk-state-surface{--hk-inspect:#f5dfc1;--hk-inspect-ink:#795126}
.phone[data-theme=dark] .hk-state-surface{--hk-inspect:#503824;--hk-inspect-ink:#f4c896}
.housekeeping-shell .hk-card[hidden],.housekeeping-shell .hk-row[hidden]{display:none!important}
.housekeeping-shell .hk-inline-row{display:block;z-index:3;align-items:start}
.housekeeping-shell .hk-inline-card{position:relative;isolation:isolate;overflow:hidden;background:var(--hk-tint);border-radius:17px;padding:5px;color:var(--fg);width:100%}
.housekeeping-shell .hk-inline-card>header{padding:8px 8px 10px;display:flex;justify-content:space-between;gap:8px;align-items:center}
.housekeeping-shell .hk-inline-card>header strong{font-size:14px;font-weight:650}
.housekeeping-shell .hk-inline-current{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--hk-ink);margin-top:7px}
.housekeeping-shell .hk-inline-current svg{width:16px;height:16px;flex:none}
.housekeeping-shell [data-hk-collapse]{width:40px;height:40px;flex:none;display:grid;place-items:center;background:none;border:0;border-radius:10px;color:var(--hk-ink)}
.housekeeping-shell [data-hk-collapse] svg{width:18px;height:18px}
.housekeeping-shell .hk-inline-editor{position:relative;z-index:1;border-radius:13px;background:var(--card);padding:11px}
.housekeeping-shell .hk-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.housekeeping-shell .hk-pick{position:relative;overflow:hidden;min-height:44px;border:1px solid transparent;border-radius:11px;display:flex;align-items:center;gap:7px;padding:8px;text-align:left;background:var(--hk-tint);color:var(--hk-ink);font-size:12px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.housekeeping-shell .hk-pick span,.housekeeping-shell .hk-pick svg{position:relative;z-index:1}
.housekeeping-shell .hk-pick svg{width:18px;height:18px;flex:none}
.housekeeping-shell .hk-pick[data-current=true]{border-color:var(--hk-ink)}
.housekeeping-shell .hk-pick:disabled{opacity:.43}
.housekeeping-shell .hk-pick:focus-visible,.housekeeping-shell .hk-inline-tools button:focus-visible,.housekeeping-shell .hk-comment-save:focus-visible,.housekeeping-shell summary:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.housekeeping-shell .hk-pick[data-hk-status=dirty]{touch-action:pan-y}
.housekeeping-shell .hk-pick[data-hk-status=dirty]:before{content:'';position:absolute;inset:0;background:color-mix(in srgb,var(--hk-urgent-edge) 24%,transparent);transform:scaleX(var(--hk-hold,0));transform-origin:left}
.housekeeping-shell .hk-pick[data-holding=true]{box-shadow:0 0 0 2px color-mix(in srgb,var(--hk-urgent-edge) 30%,transparent)}
.housekeeping-shell .hk-hold-help{font-size:11px;line-height:1.4;color:var(--muted);margin:9px 0 8px}
.housekeeping-shell .hk-inline-comment{margin-top:8px}
.housekeeping-shell .hk-inline-comment summary{min-height:40px;display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;list-style:none}
.housekeeping-shell .hk-inline-comment summary::-webkit-details-marker{display:none}
.housekeeping-shell .hk-inline-comment summary svg{width:16px;height:16px}
.housekeeping-shell .hk-field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}
.housekeeping-shell .hk-inline-comment textarea{width:100%;resize:none;min-height:76px;border:1px solid var(--border);border-radius:11px;padding:9px;background:var(--soft);color:var(--fg);font:16px/1.4 'Exo 2',sans-serif}
.housekeeping-shell .hk-comment-save{width:100%;border:0;background:var(--soft);color:var(--fg);min-height:40px;border-radius:10px;font-size:12px;margin:7px 0}
.housekeeping-shell .hk-inline-tools{display:flex;align-items:center;gap:3px;padding-top:7px;margin-top:1px}
.housekeeping-shell .hk-inline-tools button{border:0;background:none;min-height:44px;display:flex;flex:1;min-width:0;justify-content:center;align-items:center;gap:5px;color:var(--muted);padding:4px 1px;font-size:11px;line-height:1.2;border-radius:8px}
.housekeeping-shell .hk-inline-tools button:last-child{flex:1.5}
.housekeeping-shell .hk-inline-tools svg{height:18px;width:18px;flex:none}
.housekeeping-shell .hk-inline-tools [aria-pressed=true]{color:var(--fg)}
.housekeeping-shell .hk-inline-tools [aria-pressed=false] svg{opacity:.4}
.housekeeping-shell .hk-inline-tools [aria-pressed=true] svg{filter:drop-shadow(0 0 3px color-mix(in srgb,currentColor 30%,transparent))}
.housekeeping-shell .hk-error{font-size:12px;line-height:1.4;background:var(--soft);padding:9px;border-radius:9px;margin:8px 0 0}
.housekeeping-shell .hk-inline-pending{font-size:12px;line-height:1.4;color:var(--muted);margin:8px 0}
@media(hover:hover){.housekeeping-shell .hk-card button:hover{background:color-mix(in srgb,var(--hk-ink) 9%,transparent)}.hk-sheet button:hover{filter:brightness(.96)}}
@media(prefers-reduced-motion:reduce){.housekeeping-shell *,.housekeeping-shell *:before,.housekeeping-shell *:after{animation:none!important;transition:none!important}}

.hk-state-surface[data-hk-motion=false] :is(.hk-card,.hk-inline-card,.overview-shift-row):before,.hk-state-surface[data-hk-motion=false] :is(.hk-card,.hk-inline-card,.overview-shift-row):after,.hk-state-surface[data-hk-motion=false] .hk-sweeping,.hk-state-surface :is(.hk-card,.hk-inline-card,.overview-shift-row)[data-visible=false]:before,.hk-state-surface :is(.hk-card,.hk-inline-card,.overview-shift-row)[data-visible=false]:after,.hk-state-surface :is(.hk-card,.hk-inline-card,.overview-shift-row)[data-visible=false] .hk-sweeping{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.hk-state-surface .overview-shift-row:before,.hk-state-surface .overview-shift-row:after,.hk-state-surface .overview-shift-row .hk-sweeping{animation:none!important}}

.housekeeping-shell .hk-card[data-temperature=true] .hk-name {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: calc(44px * (1 - var(--hk-lower)) + 35px * var(--hk-lower));
}
.housekeeping-shell .hk-temperature {
  color: var(--hk-ink);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 13px;
}
.hk-temperature-loading {
  position: relative;
  display: inline-block;
  inline-size: 36px;
  block-size: 8px;
  overflow: hidden;
  border-radius: 3px;
  background: currentColor;
  opacity: .33;
  vertical-align: baseline;
}
.hk-temperature-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, var(--hk-surface, var(--bg)), transparent);
  animation: hk-temperature-wave 1.15s ease-in-out infinite;
}
@keyframes hk-temperature-wave {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hk-temperature-loading::after { animation: none; }
}
.housekeeping-shell .hk-temperatures {
  margin: 0 0 9px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.housekeeping-shell .hk-temperatures > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
}
.housekeeping-shell .hk-temperatures > div + div { border-top: 1px solid var(--border); }
.housekeeping-shell .hk-temperatures dt { min-width: 0; overflow-wrap: anywhere; }
.housekeeping-shell .hk-temperatures dd {
  margin: 0;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.housekeeping-shell .zont-boiler-entry {
  --zont-entry-dot: #73807f;
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  margin-inline-start: auto;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--soft);
  color: var(--fg);
  transition: background-color .16s ease, transform .16s ease;
}
.housekeeping-shell .zont-boiler-entry[hidden] { display: none; }
.zont-boiler-entry svg { width: 23px; height: 23px; }
.zont-boiler-entry i {
  position: absolute;
  inset: 5px 5px auto auto;
  width: 9px;
  height: 9px;
  border: 2px solid var(--soft);
  border-radius: 50%;
  background: var(--zont-entry-dot);
}
.housekeeping-shell .zont-boiler-entry[data-zont-state=online] { --zont-entry-dot: #428569; }
.housekeeping-shell .zont-boiler-entry:is([data-zont-state=offline],[data-zont-state=error]) { --zont-entry-dot: #c1853f; }
.zont-boiler-entry:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.zont-boiler-entry:active { transform: scale(.94); }

.zont-boiler-content { display: grid; gap: 13px; padding-block: 0 3px; }
.zont-boiler-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 162px;
  padding: 18px;
  border: 1px solid #35372f;
  border-radius: 20px;
  background: radial-gradient(ellipse at 100% -20%, #4b4334 0%, #222823 58%, #171d1a 100%);
  color: #f7f3e9;
}
.zont-boiler-measure { z-index: 1; min-width: 0; }
.zont-boiler-label { color: #ded6c4; font-size: 13px; font-weight: 550; }
.zont-boiler-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-height: 61px;
  font: 600 clamp(39px, 11vw, 49px)/1.22 Tektur, 'Exo 2', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}
.zont-boiler-value small {
  color: #e6cc9c;
  font: 500 22px/1 Tektur, 'Exo 2', sans-serif;
  letter-spacing: 0;
}
.zont-boiler-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  margin: 4px 0 0;
  color: #dce7de;
  font-size: 12px;
}
.zont-boiler-status i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #bdc9c3; }
.zont-boiler-status[data-zont-state=online] i { background: #93cea9; }
.zont-boiler-status:is([data-zont-state=error],[data-zont-state=offline]) i { background: #e8ba7e; }

.zont-boiler-art {
  position: absolute;
  right: 5%;
  top: 50%;
  width: min(33%, 106px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #f5d49a;
  pointer-events: none;
}
.zont-boiler-art::before, .zont-boiler-art span {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #f4d5a122;
}
.zont-boiler-art span { inset: 13%; border-color: #f4d5a137; }
.zont-boiler-art::after {
  content: '';
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  box-shadow: 0 0 34px #e6b66b32;
}
.zont-boiler-hero .zont-boiler-art svg { height: 43%; width: 43%; z-index: 1; }
.zont-boiler-content[data-mode=online] .zont-boiler-art span {
  animation: zont-ambient 3.4s ease-out 1;
}
.zont-boiler-content:is([data-mode=offline],[data-mode=error]) .zont-boiler-art { opacity: .6; }
@keyframes zont-ambient {
  10% { opacity: .9; transform: scale(.92); }
  68% { opacity: .22; transform: scale(1.24); }
  100% { opacity: 1; transform: scale(1); }
}

.zont-boiler-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.zont-boiler-metrics > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 77px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--soft);
}
.zont-boiler-metrics dt { font-size: 11px; line-height: 1.16; font-weight: 550; }
.zont-boiler-metrics dd {
  margin: 5px 0 0;
  font: 550 clamp(17px, 5vw, 21px)/1.18 Tektur, 'Exo 2', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.zont-boiler-metrics dd small { font: 550 10px/1 'Exo 2', sans-serif; letter-spacing: 0; }
.zont-boiler-content [data-missing=true] small { visibility: hidden; }
.zont-boiler-content:not([data-mode=loading]) [data-zont-value] { animation: zont-value-in .2s ease-out; }
@keyframes zont-value-in { from { opacity: .5; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.zont-boiler-content[data-mode=loading] [data-zont-value] {
  display: inline-block;
  color: transparent;
  border-radius: 5px;
  min-width: 2em;
  background: linear-gradient(110deg, #8882 25%, #8885 48%, #8882 70%);
  background-size: 220% 100%;
  animation: zont-skeleton 1.4s ease-in-out infinite;
}
@keyframes zont-skeleton { to { background-position: -210% 0; } }

.zont-boiler-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.zont-boiler-observed { margin: 0; color: color-mix(in srgb, var(--muted), var(--fg) 24%); font-size: 12px; line-height: 1.25; }
.zont-boiler-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 44px;
  border: 0;
  padding: 0 5px;
  border-radius: 9px;
  background: transparent;
  color: var(--fg);
  font-size: 12px !important;
  font-weight: 600 !important;
}
.zont-boiler-refresh svg { width: 15px; height: 15px; }
.zont-boiler-refresh:disabled { opacity: .55; cursor: wait; }
.zont-boiler-refresh[data-refreshing=true] svg { animation: zont-refresh 1s linear infinite; }
@keyframes zont-refresh { to { transform: rotate(360deg); } }
@media (hover:hover) {
  .housekeeping-shell .zont-boiler-entry:hover, .zont-boiler-refresh:hover:not(:disabled) {
    background: color-mix(in srgb, var(--soft), var(--fg) 6%);
  }
}
@media (max-width:355px) {
  .zont-boiler-hero { padding-inline: 13px; }
  .zont-boiler-art { right: 4%; }
  .zont-boiler-metrics { gap: 5px; }
  .zont-boiler-metrics > div { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .zont-boiler-entry, .zont-boiler-content *, .zont-boiler-content *::before, .zont-boiler-content *::after {
    animation: none !important;
    transition: none !important;
  }
}

.housekeeping-shell .hk-temperature:has(.heating-cold-mark) {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 14px;
}

.heating-cold-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 14px;
  inline-size: 14px;
  block-size: 14px;
  border-radius: 50%;
  background: #f5bc5f;
  color: #412b0e;
  font: 750 11px/1 'Exo 2', sans-serif;
  animation: heating-mark-in .24s cubic-bezier(.19,.9,.33,1);
}

@keyframes heating-mark-in {
  from { opacity: .35; transform: scale(.72); }
  to { opacity: 1; transform: scale(1); }
}

.heating-cold-detail {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  margin: 0 0 8px;
  border-radius: 9px;
  background: color-mix(in srgb, #f5bc5f 17%, var(--card));
  color: var(--fg);
  font: 600 12px/1.25 'Exo 2', sans-serif;
}


.heating-cold-detail[hidden] { display: none; }

/* Canonical StaffDialog, phone tokens and native controls; channels-only variant. */
/* Existing entry rows in compose/About retain their1.56 geometry. */
.cm-row{width:100%;text-align:left;min-height:48px;margin:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px}
.cm-row span{display:block;color:var(--muted);font-size:12px;line-height:1.4}
.cm-dialog{padding:0!important}
.cm-dialog .cm-panel{padding:0;max-height:inherit;min-height:0;display:flex;flex-direction:column;overflow:hidden;color:var(--fg)}
.cm-dialog .sc-modalhead{display:flex;align-items:center;gap:8px;flex:none;padding:10px 12px 4px;margin:0;border:0}
.cm-dialog .sc-modalhead strong{flex:1;min-width:0;font:700 18px/1.25 Tektur,'Exo 2',sans-serif;overflow-wrap:anywhere}
.cm-dialog .sc-modalhead button{display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:13px;background:transparent;color:var(--fg)}
.cm-dialog svg{flex:none}
.cm-dialog .cm-content{min-height:0;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;padding:12px 16px 8px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.cm-dialog .cm-content::-webkit-scrollbar{width:3px}.cm-dialog .cm-content::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
.cm-dialog .cm-content>form{display:grid;gap:14px;margin:0}
.cm-dialog .cm-field{display:flex;flex-direction:column;gap:7px;min-width:0;margin:0;font:600 12px/1.4 'Exo 2',sans-serif;color:var(--fg)}
.cm-dialog .cm-field small{font-size:11px;font-weight:400;color:var(--muted)}
.cm-dialog .cm-field input,.cm-dialog .cm-field textarea{box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid var(--border);border-radius:13px;background:var(--soft);color:var(--fg);font:400 16px/1.4 'Exo 2',sans-serif}
.cm-dialog .cm-field textarea{height:70px;min-height:70px;resize:none}
.cm-dialog .cm-field input::placeholder,.cm-dialog .cm-field textarea::placeholder{color:var(--muted)}
.cm-dialog .cm-field-error{color:var(--fg);font-size:12px;line-height:1.4;margin:-6px 0 0}
.cm-dialog .cm-field input[aria-invalid=true]{border-color:var(--fg)}
.cm-dialog .cm-progress{display:flex;align-items:center;gap:7px;margin:0 0 16px}
.cm-dialog .cm-progress i{height:3px;flex:1;min-width:0;border-radius:3px;background:var(--border)}
.cm-dialog .cm-progress i.is-active{background:var(--fg)}
.cm-dialog .cm-progress>span{font-size:11px;color:var(--muted);white-space:nowrap;margin-left:4px}
.cm-dialog .cm-identity{display:flex;align-items:center;gap:13px;margin:0 0 2px}
.cm-dialog.sc-modal .cm-photo{position:relative;display:grid;place-items:center;width:60px;height:60px;flex:0 0 60px;border:1px dashed var(--muted);border-radius:18px;background:var(--soft);color:var(--muted);cursor:pointer;overflow:visible;padding:0}
.cm-dialog .cm-photo:focus-within{outline:2px solid var(--fg);outline-offset:3px}
.cm-dialog .cm-photo img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.cm-dialog .cm-photo-add{position:absolute;right:-4px;bottom:-4px;display:grid;place-items:center;box-sizing:border-box;width:23px;height:23px;background:var(--btn);color:var(--btn-fg);border:3px solid var(--card);border-radius:50%;font:500 13px/1 'Exo 2',sans-serif}
.cm-dialog .cm-photo input{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;opacity:0;cursor:pointer;border:0}
.cm-dialog .cm-identity>div{min-width:0}.cm-dialog .cm-identity strong{font-size:13px;font-weight:650;display:block;margin-bottom:5px}
.cm-dialog .cm-identity p{max-width:180px;font-size:12px;line-height:1.45;color:var(--muted);margin:0}
.cm-dialog .cm-access{margin:2px 0 0;padding:0;border:0;min-width:0}
.cm-dialog .cm-access legend{font-size:12px;font-weight:600;color:var(--fg);margin-bottom:9px;padding:0}
.cm-dialog.sc-modal .cm-choice{position:relative;display:flex;flex-direction:row;align-items:center;gap:0;min-height:44px;margin:0;color:var(--fg);cursor:pointer;font-weight:400}
.cm-dialog.sc-modal .cm-choice>input{position:absolute;left:0;top:0;width:1px;height:1px;min-width:0;min-height:0;margin:0;padding:0;border:0;opacity:0;appearance:auto}
.cm-dialog .cm-choice-copy{flex:1;min-width:0;overflow-wrap:anywhere}
.cm-dialog .cm-choice-copy strong{display:block;font-size:14px;line-height:1.35;font-weight:650}
.cm-dialog .cm-choice-copy small{display:block;font-size:11px;line-height:1.45;color:var(--muted);font-weight:400;margin-top:4px}
.cm-dialog .cm-access-choice+.cm-access-choice{margin-top:8px}
.cm-dialog .cm-access-ui{display:flex;align-items:center;gap:11px;padding:12px;width:100%;border:1px solid var(--border);border-radius:14px;background:var(--card);transition:background-color 160ms,border-color 160ms}
.cm-dialog .cm-access-icon{display:flex;color:var(--muted);flex:none}
.cm-dialog .cm-access-choice input:checked+.cm-access-ui{border-color:var(--fg);background:var(--soft)}
.cm-dialog .cm-access-choice input:checked+.cm-access-ui .cm-access-icon{color:var(--fg)}
.cm-dialog .cm-radio{display:grid;place-items:center;box-sizing:border-box;width:18px;height:18px;border:1px solid var(--muted);border-radius:50%;flex:none}
.cm-dialog .cm-radio::after{content:'';width:8px;height:8px;border-radius:50%;background:var(--fg);transform:scale(0);transition:transform 160ms}
.cm-dialog .cm-access-choice input:checked+.cm-access-ui .cm-radio::after{transform:scale(1)}
.cm-dialog .cm-choice input:disabled~span{cursor:default}
.cm-dialog .cm-access-choice input:disabled:not(:checked)+.cm-access-ui{opacity:.55}
.cm-dialog .cm-choices{display:grid;gap:0}
.cm-dialog .cm-selection-ui{display:flex;align-items:center;width:100%;gap:10px;padding:10px 1px;border-bottom:1px solid var(--border);min-height:55px}
.cm-dialog .cm-choice-avatar{display:grid;place-items:center;width:33px;height:33px;border-radius:11px;background:var(--soft);color:var(--muted);flex:none;font-size:11px;font-weight:650;overflow:hidden}
.cm-dialog .cm-selection .cm-choice-copy strong{font-size:13px;font-weight:600}
.cm-dialog .cm-check{display:grid;place-items:center;box-sizing:border-box;width:19px;height:19px;flex:none;border:1px solid var(--border);border-radius:6px;background:var(--card);color:transparent;transition:background-color 160ms,color 160ms}
.cm-dialog .cm-selection input:checked+.cm-selection-ui .cm-check{background:var(--btn);color:var(--btn-fg);border-color:var(--btn)}
.cm-dialog .cm-section-head{display:flex;align-items:center;gap:8px;margin:8px 0 -8px;min-height:22px}
.cm-dialog .cm-section-head>strong{font-size:13px;flex:1;font-weight:650}
.cm-dialog .cm-section-head>span{font-size:10px;padding:4px 6px;border-radius:7px;color:var(--muted);background:var(--soft)}
.cm-dialog .cm-help,.cm-dialog .cm-fineprint{font-size:11px;line-height:1.5;color:var(--muted);margin:0}
.cm-dialog .cm-channel-summary{display:flex;align-items:center;gap:11px;padding:0 0 12px;margin:0;border-bottom:1px solid var(--border)}
.cm-dialog .cm-channel-summary strong{font-size:14px;display:block;font-weight:650;overflow-wrap:anywhere}
.cm-dialog .cm-channel-summary small{font-size:11px;color:var(--muted);display:block;margin-top:4px}
.cm-dialog .cm-search{display:flex;align-items:center;gap:9px;background:var(--soft);border:1px solid var(--border);border-radius:14px;min-height:46px;padding:3px 10px;margin:0}
.cm-dialog .cm-search>svg{color:var(--muted)}
.cm-dialog .cm-search input{width:100%;min-width:0;border:0;border-radius:0;min-height:38px;padding:0;background:transparent;color:var(--fg);font:400 16px/1.4 'Exo 2',sans-serif}
.cm-dialog .cm-search input::placeholder{color:var(--muted)}
.cm-dialog .cm-search input::-webkit-search-cancel-button{appearance:none}
.cm-dialog .cm-search button{display:grid;place-items:center;width:38px;min-width:38px;height:38px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--muted)}
.cm-dialog .cm-tabs{display:flex;gap:4px;padding:4px;border-radius:13px;background:var(--soft);margin:12px 0}
.cm-dialog .cm-tabs button{flex:1;border:0;border-radius:10px;min-height:40px;padding:6px;background:transparent;color:var(--muted);font:600 13px 'Exo 2',sans-serif}
.cm-dialog .cm-tabs button[aria-pressed=true]{background:var(--card);color:var(--fg)}
.cm-dialog .cm-catalog-row{padding:0;margin:0;border-bottom:1px solid var(--border)}
.cm-dialog .cm-channel{display:flex;align-items:center;gap:12px;width:100%;min-height:72px;padding:12px 0;border:0;background:transparent;text-align:left;color:var(--fg);font:inherit}
.cm-dialog .cm-channel-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--soft);color:var(--fg);flex:none;overflow:hidden}
.cm-dialog .cm-channel-copy{flex:1;min-width:0;overflow-wrap:anywhere}
.cm-dialog .cm-channel-copy strong{font-size:15px;font-weight:650;display:block}
.cm-dialog .cm-channel-copy small{font-size:11px;line-height:1.4;color:var(--muted);display:block;margin-top:5px}
.cm-dialog .cm-channel-description{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.4;color:var(--muted);margin-top:4px}
.cm-dialog .cm-channel-tail{font-size:11px;color:var(--muted);display:flex;align-items:center;flex:none}
.cm-dialog .cm-content>.cm-fineprint{margin:12px 0 0}
.cm-dialog .cm-footer{flex:none;margin:0;padding:12px 16px 16px;background:var(--card)}
.cm-dialog .cm-primary,.cm-dialog .cm-create-action{width:100%;box-sizing:border-box;min-height:49px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:8px;font:650 14px 'Exo 2',sans-serif}
.cm-dialog .cm-create-action{border:0;background:var(--soft);color:var(--fg)}
.cm-dialog .cm-roster-preview{padding:0;margin:0 0 12px;border-radius:12px;background:var(--soft)}
.cm-dialog .cm-roster-preview summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;padding:11px 12px;font-size:12px;line-height:1.4}
.cm-dialog .cm-roster-preview summary::-webkit-details-marker{display:none}
.cm-dialog .cm-roster-preview summary>span{flex:1;min-width:0}
.cm-dialog .cm-roster-preview summary strong{display:block;font-weight:600;font-size:12px}
.cm-dialog .cm-roster-preview summary small{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.cm-dialog .cm-roster-preview[open] summary>svg:last-child{transform:rotate(180deg)}
.cm-dialog .cm-roster-preview p{padding:0 12px 12px;margin:0;max-height:84px;overflow:auto;font-size:12px;line-height:1.6;overflow-wrap:anywhere;color:var(--muted)}
.cm-dialog .cm-status{flex:none;margin:0;padding:0 16px 10px;font-size:12px;color:var(--muted)}
.cm-dialog .cm-row{width:100%;text-align:left;min-height:48px;margin:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px}
.cm-dialog .cm-row strong{font-size:13px}.cm-dialog .cm-row span{font-size:12px;color:var(--muted);line-height:1.4}
.cm-dialog .cm-impact{display:grid;gap:4px;padding:10px 0;border-bottom:1px solid var(--border)}.cm-dialog .cm-impact strong{font-size:13px}
.cm-dialog .cm-error,.cm-dialog .cm-pending{flex:none;padding:12px;margin:8px 16px;border:1px solid var(--border);border-radius:12px;color:var(--fg);background:var(--soft);font-size:12px;line-height:1.5}
.cm-dialog .cm-error+.cm-row{padding:0 16px}
.cm-dialog .cm-empty{font-size:13px;color:var(--muted);text-align:center;padding:24px 8px}
.cm-dialog .cm-content>.sc-search-label{margin:12px 0 4px}
.cm-dialog button,.cm-dialog summary{cursor:pointer}
.cm-dialog button:disabled{opacity:.5;cursor:default}
.cm-dialog button:focus-visible,.cm-dialog input:focus-visible,.cm-dialog textarea:focus-visible,.cm-dialog summary:focus-visible,.cm-dialog .cm-choice input:focus-visible+span{outline:2px solid var(--fg);outline-offset:3px}
.cm-dialog .cm-choice input:focus-visible{outline:0}
.cm-dialog .cm-content-enter{animation:cm-content-in 160ms cubic-bezier(.2,.7,.3,1)}
.cm-dialog .cm-spinner{width:14px;height:14px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:cm-spin 850ms linear infinite}
@keyframes cm-content-in{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes cm-spin{to{transform:rotate(360deg)}}
.cm-activity-dots{display:inline-block;animation:cm-activity-pulse 1.2s ease-in-out infinite}
@keyframes cm-activity-pulse{50%{opacity:.3}}
.cm-avatar{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.cm-dialog [hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.cm-dialog .cm-content-enter,.cm-dialog .cm-spinner,.cm-activity-dots{animation:none}.cm-dialog .cm-radio::after,.cm-dialog .cm-check,.cm-dialog .cm-access-ui{transition:none}}

/* Owner-approved notification UI, aligned to profile «Акцент». Theme and
   overlay lifecycle remain owned by StaffAPP and the shared StaffDialog. */
.ns-dialog.sc-modal{display:flex;flex-direction:column;padding:0!important;color:var(--fg)}
.ns-panel{display:flex;flex-direction:column;min-height:0;max-height:inherit;overflow:hidden}
.ns-head{display:flex;align-items:center;gap:8px;flex:none;padding:10px 14px 4px}
.ns-head h2{flex:1;min-width:0;margin:0;font:600 24px/1.2 Tektur,'Exo 2',sans-serif;letter-spacing:-.7px;overflow-wrap:anywhere}
.ns-head button{display:grid;place-items:center;width:44px;height:44px;flex:none;padding:0;background:transparent;border:0;color:var(--fg);border-radius:10px}
.ns-content{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent;padding:10px 22px 6px;overflow-anchor:none}
.ns-content::-webkit-scrollbar{width:3px}.ns-content::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
.ns-row{display:flex;align-items:center;gap:11px;min-height:58px;padding:10px 0;border-bottom:1px solid var(--border);margin:0}
.ns-copy{flex:1;min-width:0}.ns-copy strong{display:block;font:600 14px/1.4 'Exo 2',sans-serif}.ns-copy small{display:block;margin-top:4px;font:400 12px/1.5 'Exo 2',sans-serif;color:var(--muted)}
.ns-category{display:flex;align-items:center;align-self:stretch;flex:1;gap:11px;min-width:0;width:100%;padding:0;background:transparent;border:0;color:var(--fg);text-align:left}
.ns-category.ns-row{padding:10px 0;border-bottom:1px solid var(--border)}.ns-category svg{flex:none;color:var(--muted)}
.ns-dialog .ns-toggle{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0;position:relative;width:44px;height:44px;min-width:44px;flex:none;margin:0;padding:0;cursor:pointer}
.ns-dialog .ns-toggle input{position:absolute;inset:0;width:44px;height:44px;min-width:0;min-height:0;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
.ns-dialog .ns-toggle span{display:block;box-sizing:border-box;pointer-events:none;flex:none;width:44px;height:26px;border-radius:20px;background:var(--border);padding:3px;transition:background 160ms}
.ns-toggle span:after{content:'';display:block;width:20px;height:20px;border-radius:50%;background:var(--bg);transition:transform 160ms}.ns-toggle input:checked+span{background:var(--fg)}.ns-toggle input:checked+span:after{transform:translateX(18px);background:var(--bg)}
.ns-toggle input:focus-visible+span{outline:2px solid var(--fg);outline-offset:3px}.ns-toggle input:disabled+span{opacity:.55}.ns-dialog button:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
.ns-preset{padding:8px 0 16px;margin:0 0 8px;border-bottom:1px solid var(--border)}.ns-preset strong{display:block;font-size:14px}.ns-preset small{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.ns-section{margin:20px 0 6px;color:var(--muted);font-size:11px;letter-spacing:1.1px;text-transform:uppercase}.ns-note,.ns-message{font:400 12px/1.5 'Exo 2',sans-serif;color:var(--muted)}.ns-message{padding:15px 0}
.ns-footer{flex:none;padding:8px 22px 16px}.ns-feedback{font:400 12px/1.5 'Exo 2',sans-serif;color:var(--muted);margin:0 0 6px;min-height:18px}
.ns-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;width:100%;margin:8px 0 0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:transparent;color:var(--fg);font:600 13px/1.4 'Exo 2',sans-serif}
.ns-quiet-zone{display:flex;align-items:center;gap:7px;margin:3px 0 10px;color:var(--muted);font:400 12px/1.5 'Exo 2',sans-serif}.ns-quiet-zone svg{flex:none}
.ns-time-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 12px}
.ns-dialog .ns-time{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;min-width:0;min-height:100px;margin:0;padding:13px 14px;border:1px solid var(--border);border-radius:14px;background:var(--soft);color:var(--fg);text-align:left;cursor:pointer}
.ns-time-label{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;font:500 12px/1.4 'Exo 2',sans-serif;color:var(--muted)}
.ns-time-value{font:500 28px/1.15 Tektur,'Exo 2',sans-serif;letter-spacing:-.7px;font-variant-numeric:tabular-nums;white-space:nowrap}.ns-time-value[data-empty=true]{color:var(--muted)}
/* Native input owns keyboard, accessibility and Android's time picker; the
   visible value avoids blank/locale-dependent WebView time-field rendering. */
.ns-dialog .ns-time input{position:absolute;inset:0;z-index:1;box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
.ns-dialog .ns-time:focus-within{outline:2px solid var(--fg);outline-offset:3px}.ns-time-disabled{opacity:.55;cursor:default}
.ns-quiet-summary{min-height:36px;margin:0 0 16px;font:400 12px/1.5 'Exo 2',sans-serif;color:var(--muted)}
.ns-dialog .ns-quiet-save{background:var(--fg);color:var(--bg);border-color:var(--fg)}.ns-quiet-help{margin:12px 0 0}
.ns-push{padding:14px;margin-top:20px;border-radius:17px;background:var(--soft);display:grid;gap:8px}.ns-push small{color:var(--muted);font-size:11px}.ns-push strong{font-size:13px}.ns-push>span{display:block;text-align:center;padding:10px;border-radius:10px;background:var(--bg);font-size:12px}
@media(prefers-reduced-motion:reduce){.ns-dialog *{animation:none!important;transition:none!important}}

@media(max-width:360px){.ns-head{padding-inline:10px;gap:4px}.ns-head h2{font-size:20px;overflow-wrap:normal}.ns-content{padding-inline:17px}.ns-footer{padding-inline:17px}}

.property-alert-form fieldset{min-inline-size:0;margin:0;padding:0;border:0}
.property-alert-dialog .property-alert-time{min-height:44px;padding:6px 9px;align-items:center;justify-content:center;border-radius:10px}
.property-alert-time .ns-time-value{font-size:17px;letter-spacing:0}
.property-alert-rule{gap:8px}
.property-alert-dialog .ns-message[hidden]{display:none}

#auth-gate{min-height:100dvh;display:flex;flex-direction:column;justify-content:center;gap:18px;padding:28px;font-family:'Exo 2',sans-serif;background:#f6f6f4;color:#17191b}#auth-gate[hidden],#workspace[hidden]{display:none}#auth-gate h1{font-family:Tektur,sans-serif;font-size:32px;margin:0}#auth-gate [data-actions] button{border:0;border-radius:14px;padding:14px;background:#292c30;color:#fff;font:inherit;cursor:pointer}#auth-gate [data-actions]{display:grid;gap:10px}#auth-gate [data-actions][hidden]{display:none}.overview-role.auth-profile-trigger{border:0;background:transparent;font:inherit;cursor:pointer}.overview-role.auth-profile-trigger:focus-visible{outline:2px solid currentColor;outline-offset:3px}.auth-profile-dialog{display:grid;gap:14px;color:var(--fg)}.auth-profile-dialog p{margin:0;overflow-wrap:anywhere}.auth-profile-dialog summary{cursor:pointer}.auth-profile-dialog [data-profile-choices]{display:grid;gap:8px;margin-top:10px}.auth-profile-dialog button{cursor:pointer}
@media(prefers-color-scheme:dark){#auth-gate{background:#111315;color:#f6f6f4}#auth-gate [data-actions] button{background:#e8e8e6;color:#191b1d}}

#auth-gate[data-loading="true"]{position:relative;justify-content:flex-start;padding:0 20px;gap:0}#auth-gate[data-loading="true"] .brand{position:absolute;top:calc(26px + env(safe-area-inset-top,0px));left:23px;margin:0;font-size:19px;font-weight:700;line-height:1.2;letter-spacing:.035em}#auth-gate:not([data-loading="true"]) .auth-shell{display:none}.auth-status-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.auth-shell{flex:1;min-height:0;width:100%}.auth-shell-placeholders{display:grid;gap:14px;margin-top:calc(76px + env(safe-area-inset-top,0px))}.auth-shell-placeholders span{height:18px;width:72%;border-radius:10px;background:#e8eae9}.auth-shell-placeholders span:nth-child(2){width:88%;height:70px;border-radius:18px}.auth-shell-placeholders span:nth-child(3){width:58%}.auth-shell-nav{position:absolute;bottom:env(safe-area-inset-bottom,0px);left:12px;right:12px;height:48px;display:grid;grid-template-columns:repeat(5,1fr);align-items:center;justify-items:center;border-radius:17px;background:linear-gradient(135deg,#fff,#f3f5f5 48%,#e9edef);box-shadow:inset 0 0 0 1px #dce1e3;color:#747f85}.auth-shell-nav span{display:grid;place-items:center;width:48px;height:48px}.auth-shell-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.auth-shell-nav img{width:22px;height:22px;object-fit:contain;filter:brightness(0);opacity:.88}@media(prefers-color-scheme:dark){.auth-shell-placeholders span{background:#282d30}.auth-shell-nav{background:linear-gradient(135deg,#353c46,#222831 48%,#0d1116);box-shadow:inset 0 0 0 1px #ffffff16;color:#c1c8cd}.auth-shell-nav img{filter:none;opacity:1}}
.auth-profile-sheet.staff-dialog{padding:0;border-radius:20px;background:var(--bg);color:var(--fg)}.auth-profile-sheet .auth-profile-dialog{display:block;padding:0 22px 20px}.auth-profile-hero{margin:0 -22px 23px;padding:23px 22px 21px;background:var(--btn);color:var(--btn-fg)}.auth-profile-hero .sc-modalhead{margin-bottom:22px}.auth-profile-hero .sc-modalhead strong{font:600 31px/1.2 'Tektur',sans-serif;letter-spacing:-.6px}.auth-profile-brand{display:flex;align-items:center;gap:4px;font:500 11px 'Tektur',sans-serif;text-transform:uppercase;letter-spacing:1px}.auth-profile-brand button{color:inherit!important;width:44px;min-height:44px;background:transparent!important;font-size:25px!important;padding:0!important}.auth-profile-person{display:flex;align-items:center;gap:12px}.auth-profile-avatar{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:11px;background:color-mix(in srgb,currentColor 15%,transparent);font:600 22px 'Tektur',sans-serif}.auth-profile-person>div{min-width:0}.auth-profile-person [data-profile-identity]{font-size:20px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}.auth-profile-person [data-profile-context]{margin-top:4px;font-size:13px;line-height:1.5;color:color-mix(in srgb,var(--btn-fg) 75%,var(--btn))}.auth-profile-context-menu{border-top:1px solid var(--border);margin-top:8px}.auth-profile-context-menu summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:55px;padding:10px 0;font-size:14px}.auth-profile-context-menu summary::-webkit-details-marker{display:none}.auth-profile-context-menu[open] summary>.profile-icon:last-child{transform:rotate(90deg)}.auth-profile-sheet [data-profile-team],.auth-profile-sheet button:is([data-profile-notifications],[data-profile-property-alerts]):not([hidden]){display:flex;align-items:center;gap:10px;width:100%;min-height:55px;border:0;border-top:1px solid var(--border);border-radius:0;padding:12px 0;background:transparent;color:var(--fg);text-align:left;font:400 14px 'Exo 2',sans-serif}.auth-profile-sheet [data-profile-logout]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;margin-top:12px;border:0;background:transparent;color:color-mix(in srgb,var(--fg) 70%,var(--bg));font:400 13px 'Exo 2',sans-serif}.auth-profile-sheet button:hover:not(:disabled),.auth-profile-sheet summary:hover{filter:brightness(.92)}.auth-profile-sheet :focus-visible{outline:2px solid currentColor;outline-offset:3px}.auth-profile-sheet [hidden]{display:none!important}@media(max-width:400px){.auth-profile-sheet .auth-profile-dialog{padding:0 17px 18px}.auth-profile-hero{margin:0 -17px 20px;padding:18px 17px 20px}.auth-profile-hero .sc-modalhead strong{font-size:27px}}
/* A profile sheet owns its opaque surface; scroll fades belong to content lists. */
.auth-profile-sheet[data-scroll-fade]{mask-image:none;-webkit-mask-image:none}

.auth-profile-menu-copy{flex:1}.auth-profile-menu-copy small{display:block;margin-top:3px;font-size:12px;color:color-mix(in srgb,var(--fg) 65%,var(--bg))}.auth-profile-context-menu summary>.profile-icon:last-child,.auth-profile-sheet [data-profile-team]>.profile-icon:last-child,.auth-profile-sheet :is([data-profile-notifications],[data-profile-property-alerts])>.profile-icon:last-child{width:16px;height:16px;margin-left:auto}.auth-profile-sheet [data-profile-logout] .profile-icon{width:16px;height:16px}

.caller-settings{color:var(--fg);font-family:'Exo 2',sans-serif}.caller-settings .caller-toggle{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px;min-height:48px;margin:0 0 8px;color:var(--fg);cursor:pointer}.caller-toggle>span{font:600 19px/1.3 'Tektur',sans-serif}.caller-settings .caller-toggle input{appearance:none;-webkit-appearance:none;position:relative;width:44px;height:26px;min-height:26px;flex:0 0 44px;margin:9px 0;padding:0;border:0;border-radius:20px;background:var(--border);cursor:pointer}.caller-settings .caller-toggle input:after{content:'';position:absolute;width:20px;height:20px;left:3px;top:3px;background:var(--card);border-radius:50%;box-shadow:0 1px 3px var(--shade);transition:transform .15s}.caller-settings .caller-toggle input:checked{background:var(--btn)}.caller-settings .caller-toggle input:checked:after{background:var(--btn-fg);transform:translateX(18px)}.caller-settings .caller-toggle input:disabled{cursor:default;opacity:.55}.caller-settings :focus-visible{outline:2px solid var(--fg);outline-offset:3px}.caller-settings p{margin:0;line-height:1.5;overflow-wrap:anywhere}.caller-settings .caller-description{font-size:13px;color:color-mix(in srgb,var(--fg) 65%,var(--bg))}.caller-settings [data-caller-status]{font-size:12px;min-height:18px;margin-top:8px;color:color-mix(in srgb,var(--fg) 70%,var(--bg))}.caller-database{border-top:1px solid var(--border);padding-top:20px;margin-top:21px}.caller-database>header{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;font-weight:600;margin-bottom:13px}.caller-database [data-caller-version]{font-size:12px;color:color-mix(in srgb,var(--fg) 65%,var(--bg));font-weight:400}.caller-db-feedback{min-height:0}.caller-db-feedback p{min-height:20px}.caller-settings h3{font:600 21px/1.3 'Tektur',sans-serif;margin:0 0 5px}.caller-db-feedback p{font-size:12px;color:color-mix(in srgb,var(--fg) 65%,var(--bg));font-variant-numeric:tabular-nums}.caller-database.is-error h3{color:var(--fg)}.caller-db-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0 3px;font-size:11px;color:color-mix(in srgb,var(--fg) 65%,var(--bg))}.caller-db-steps>span:before{content:'';display:block;height:3px;border-radius:2px;background:var(--soft);margin-bottom:6px}.caller-db-steps>.is-active:before{background:var(--fg)}.caller-db-meter{min-height:43px;margin:12px 0 6px}.caller-db-track{height:5px;border-radius:3px;background:var(--soft);overflow:hidden}.caller-db-track>span{display:block;height:100%;background:var(--fg);border-radius:inherit;transition:width .2s}.caller-db-track.is-indeterminate>span{width:30%;animation:caller-progress 1.5s ease-in-out infinite}.caller-db-meter>p{display:flex;justify-content:space-between;gap:12px;margin-top:7px;font-size:11px;font-variant-numeric:tabular-nums;color:color-mix(in srgb,var(--fg) 65%,var(--bg))}.caller-settings .caller-update{width:100%;min-height:44px;border-radius:10px;margin:14px 0 0;background:var(--btn);color:var(--btn-fg);border:1px solid transparent;font:500 13px 'Exo 2',sans-serif}.caller-settings .caller-update:hover:not(:disabled){filter:brightness(.92)}.caller-settings button:active:not(:disabled){transform:translateY(1px)}.caller-settings .caller-update:disabled{opacity:.65;cursor:default}.caller-settings .caller-db-note{font-size:11px;color:color-mix(in srgb,var(--fg) 65%,var(--bg));margin-top:10px}.caller-background{margin-top:4px}.caller-background summary{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:color-mix(in srgb,var(--fg) 70%,var(--bg));list-style:none;cursor:pointer}.caller-background[open] summary>.profile-icon:last-child{transform:rotate(180deg)}.caller-background summary::-webkit-details-marker{display:none}.caller-background p{font-size:12px;color:color-mix(in srgb,var(--fg) 65%,var(--bg));margin:4px 0 10px}.caller-background button{width:100%;min-height:44px;font-size:13px}.caller-settings [hidden]{display:none!important}@keyframes caller-progress{0%{transform:translateX(-100%)}100%{transform:translateX(430%)}}@media(prefers-reduced-motion:reduce){.caller-settings *{transition:none!important;animation:none!important}.caller-db-track.is-indeterminate>span{width:35%}}

/* Accent preview geometry and persistent icons; text updates target labels only. */
.profile-icon{display:inline-block;flex:none;width:19px;height:19px;vertical-align:middle}.caller-db-label,.caller-update{display:flex;align-items:center;gap:8px}.caller-db-label .profile-icon,.caller-update .profile-icon{width:16px;height:16px}.caller-update{justify-content:center}.caller-background summary .profile-icon{width:15px;height:15px}.caller-background summary [data-caller-battery-label]{flex:1}.caller-settings [data-caller-status].caller-ready-status{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.av-profile-button{position:relative;flex:0 0 72px;width:72px;height:72px;padding:0!important;border:0!important;background:transparent!important;color:inherit!important;overflow:visible}.av-profile-picture,.av-large{display:grid;place-items:center;overflow:hidden;background:color-mix(in srgb,currentColor 13%,transparent);border:1px solid color-mix(in srgb,currentColor 15%,transparent);font:600 32px Tektur,sans-serif;border-radius:22px;width:72px;height:72px}.av-profile-picture img,.av-large img{height:100%;width:100%;object-fit:cover}.av-camera-badge{position:absolute;bottom:-4px;right:-4px;display:grid;place-items:center;width:29px;height:29px;background:var(--bg);color:var(--fg);border:3px solid var(--btn);border-radius:11px}.av-camera-badge svg{width:16px;height:16px}.av-profile-caption{font-size:12px!important;opacity:.7;margin:13px 0 0!important}.av-sheet{padding:22px!important;background:var(--bg)!important;color:var(--fg)!important}.av-sheet .sc-modalhead{margin:0 0 22px}.av-sheet .sc-modalhead strong{font:600 23px Tektur,sans-serif}.av-sheet .sc-modalhead button{width:36px;min-height:36px;font-size:28px;border:0;background:transparent}.av-summary{display:flex;gap:16px;align-items:center;margin:0 0 24px}.av-large{flex:none;color:var(--fg);background:var(--soft);width:76px;height:76px}.av-summary p{font-size:14px;line-height:1.5;color:var(--muted);margin:0}.av-row{width:100%;display:flex;align-items:center;gap:13px;min-height:58px;border:0;border-top:1px solid var(--border);border-radius:0;background:transparent;color:var(--fg);padding:12px 2px;font:400 16px 'Exo 2',sans-serif;text-align:left}.av-row>span:last-child:not(:first-child){margin-left:auto;color:var(--muted);font-size:24px}.av-row.av-remove{color:#a3493d}.av-help{font-size:12px;line-height:1.45;color:var(--muted);margin:20px 0 0}.av-error{color:#a3493d;font-size:14px}.av-intro{font-size:14px;color:var(--muted);margin:0 0 18px}.av-crop{position:relative;width:100%;aspect-ratio:1;overflow:hidden;border-radius:16px;background:var(--soft)}.av-crop canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.av-frame{pointer-events:none;position:absolute;inset:0;border-radius:50%;box-shadow:0 0 0 80px #0008;border:1.5px solid #fff9}.av-scale{display:flex!important;align-items:center;gap:16px;margin:22px 0!important;color:var(--muted);font-size:23px}.av-scale input{width:100%;min-height:36px;accent-color:var(--btn);padding:0!important}.av-save{width:100%;min-height:50px!important}.av-profile-button:focus-visible,.av-row:focus-visible{outline:2px solid currentColor;outline-offset:4px}

.av-sheet{overflow:auto;max-height:calc(100% - 28px);padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important}.av-sheet button:not(:disabled){cursor:pointer}.av-sheet button:disabled,.av-sheet input:disabled{cursor:wait;opacity:.6}.av-sheet button:hover:not(:disabled){filter:brightness(.92)}.av-sheet :focus-visible{outline:2px solid currentColor;outline-offset:3px}.av-sheet .av-help[role=status]{min-height:18px}.av-profile-picture img,.av-large img{display:block}.sc-avatar[data-person-avatar],.sc-roomicon[data-person-avatar]{overflow:hidden}.sc-avatar[data-person-avatar] img{width:100%;height:100%;object-fit:cover}.av-crop canvas:active{cursor:grabbing}@media(max-height:700px){.av-crop{width:min(100%,45dvh);margin-inline:auto}.av-sheet .sc-modalhead{margin-bottom:14px}.av-scale{margin:12px 0!important}}
.staff-dialog.av-sheet .av-scale{display:flex!important;flex-direction:row;align-items:center;grid-template-columns:none;flex-wrap:nowrap}.staff-dialog.av-sheet .av-scale input{flex:1;min-width:0;width:auto}.staff-dialog.av-sheet .av-scale span{flex:none}

.phone .gi-entry-group{padding:0 var(--sc-room-inset,18px) 9px;border-bottom:1px solid var(--line);margin-bottom:9px}
.phone .gi-entry{cursor:pointer;color:var(--fg);font:inherit}
.phone .gi-entry:hover{background:var(--soft)}.phone .gi-entry:active{opacity:.7}.phone .gi-entry:focus-visible{outline:2px solid currentColor;outline-offset:-3px;border-radius:16px}
.phone .gi-vk{font-family:Exo2,sans-serif;font-size:19px;letter-spacing:-1px}.phone .gi-origin{opacity:.85}.phone .gi-delivery{display:block;font-size:11px;opacity:.75;padding:3px 0 0;text-align:right}
.phone .gi-head .sc-detail-title{min-width:0;flex:1}.phone .gi-head .sc-detail-title strong{font-family:Tektur,sans-serif;font-size:20px}

.phone .sc-file-unavailable small{display:block;font-size:12px;opacity:.7;line-height:1.35;margin-top:3px}.phone .gi-media-note{font-size:12px;opacity:.75;margin:5px 12px;line-height:1.35}

.sp-schedule{overflow-y:auto;min-height:0;padding:4px 20px 100px;font-family:'Exo 2',sans-serif;color:var(--fg)}.sp-schedule *{box-sizing:border-box}.sp-schedule button{font:inherit;cursor:pointer;color:inherit}.sp-week-switch{display:flex;background:var(--soft);border-radius:13px;padding:4px;gap:4px;margin:12px 0 23px}.sp-week-switch button{flex:1;min-height:40px;border:0;border-radius:10px;background:transparent;font-size:14px}.sp-week-switch button[aria-pressed=true]{background:var(--btn);color:var(--btn-fg)}.sp-period{display:flex;justify-content:space-between;align-items:center;margin:0 0 17px}.sp-period h4,.sp-day-detail h4{font:600 18px Tektur,sans-serif;margin:0}.sp-period>span,.sp-hint{font-size:12px;color:var(--muted)}.sp-day-block{display:flex;gap:14px;padding:17px 0;border-bottom:1px solid var(--border)}.sp-day-date{flex:0 0 32px;display:flex;flex-direction:column;align-items:center;position:relative;padding-top:1px}.sp-day-date strong{font:600 24px Tektur,sans-serif}.sp-day-date span{font-size:12px;color:var(--muted);margin-top:3px}.sp-day-date i{height:4px;width:4px;background:var(--fg);border-radius:50%;margin-top:6px}.sp-day-people{flex:1;min-width:0}.sp-day-label{font-size:12px;color:var(--muted);display:flex;justify-content:space-between;margin-bottom:10px}.sp-today .sp-day-label{color:var(--fg);font-weight:600}.sp-compact-person{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:9px;font-size:13px;line-height:1.4}.sp-compact-person span{overflow-wrap:anywhere}.sp-compact-person b{font-size:12px;white-space:nowrap;font-weight:500;font-variant-numeric:tabular-nums}.sp-hint{margin:-5px 0 17px}.sp-grid-head,.sp-grid-person{display:grid;grid-template-columns:80px repeat(7,minmax(0,1fr));gap:3px;align-items:stretch}.sp-grid-head{font-size:10px;margin-bottom:9px;align-items:center}.sp-grid-head>span{text-align:center;color:var(--muted)}.sp-grid-head>span:first-child{text-align:left}.sp-grid-head b{display:block;color:var(--fg);font-size:13px;margin-top:5px;font-weight:500}.sp-grid-person{padding:10px 0;border-top:1px solid var(--border)}.sp-grid-person>div{display:flex;flex-direction:column;justify-content:center;min-width:0}.sp-grid-person strong{font-size:12px;font-weight:600;overflow-wrap:anywhere}.sp-grid-person small{font-size:10px;color:var(--muted);overflow-wrap:anywhere;margin-top:4px}.sp-grid-person button{min-height:48px;min-width:0;border:0;padding:4px 0;border-radius:7px;font-size:11px!important;line-height:1.6;font-variant-numeric:tabular-nums}.sp-on{background:var(--soft)}.sp-grid-person .sp-off{background:transparent;color:var(--muted)}.sp-grid-person .sp-picked.sp-on{background:var(--btn);color:var(--btn-fg)}.sp-now b{text-decoration:underline;text-underline-offset:4px}.sp-day-detail{margin-top:24px;padding-top:20px;border-top:1px solid var(--border)}.sp-day-detail h4{font-size:16px;margin:0 0 20px}.sp-person{display:flex;align-items:center;gap:10px;margin-top:18px}.sp-avatar{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:12px;background:var(--soft);font-size:12px;font-weight:600}.sp-person-copy{min-width:0;flex:1}.sp-person-copy strong,.sp-personal strong{display:block;font-size:13px;font-weight:600}.sp-person-copy small,.sp-personal small{display:block;margin-top:4px;color:var(--muted);font-size:11px}.sp-person>b{font-size:13px;font-weight:500;white-space:nowrap}.sp-personal{display:flex;align-items:center;gap:12px;margin:18px 0 28px}.sp-my-week{margin-top:24px}.sp-my-week-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:14px}.sp-my-week-heading strong{font-size:14px;font-weight:600}.sp-my-week-heading small{font-size:12px;color:var(--muted)}.sp-my-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.sp-my-days button{display:flex;flex-direction:column;gap:10px;align-items:center;border:0;border-radius:12px;padding:12px 0;min-width:0;background:var(--soft)}.sp-my-days small{font-size:11px}.sp-my-days strong{font:500 19px Tektur,sans-serif}.sp-my-days i{font-style:normal;font-size:9px}.sp-my-days .sp-restday{background:transparent;color:var(--muted)}.sp-my-days [aria-pressed=true]{background:var(--btn);color:var(--btn-fg)}.sp-week-total{display:flex;justify-content:space-between;margin-top:11px;font-size:12px;color:var(--muted)}@media(max-width:350px){.sp-schedule{padding-left:14px;padding-right:14px}.sp-grid-head,.sp-grid-person{grid-template-columns:68px repeat(7,minmax(0,1fr));gap:2px}.sp-my-days{gap:2px}.sp-my-days i{font-size:8px}}
.sp-edit-dialog{padding:24px!important;background:var(--bg)!important;color:var(--fg)!important}.sp-edit .sc-modalhead{margin-bottom:24px}.sp-edit .sc-modalhead strong{font:600 23px Tektur,sans-serif}.sp-edit .sc-modalhead>button{width:36px;min-height:36px;font-size:28px;border:0;background:transparent;color:var(--fg)}.sp-edit-person{display:flex;align-items:center;gap:12px}.sp-edit-person .sp-avatar{width:44px;height:44px;border-radius:14px;font-size:14px}.sp-edit-person strong{display:block;font-size:16px;font-weight:600}.sp-edit-person small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.sp-edit-date{font-size:14px;margin:20px 0 18px;color:var(--muted)}.sp-edit-choices{display:grid;gap:10px;margin-bottom:24px}.sp-edit-choices button{display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:16px;background:transparent;color:var(--fg);text-align:left;padding:16px 13px;min-height:82px;font-family:'Exo 2',sans-serif}.sp-edit-choices button[aria-checked=true]{background:var(--soft);border-color:var(--fg)}.sp-choice-symbol{display:grid;place-items:center;width:30px;flex:none;font-size:24px}.sp-edit-choices strong{font-size:16px;font-weight:600;display:block}.sp-edit-choices small{display:block;color:var(--muted);font-size:12px;margin-top:6px}.sp-edit-choices i{margin-left:auto;flex:none;width:17px;height:17px;border:1px solid var(--border);border-radius:50%;box-sizing:border-box}.sp-edit-choices [aria-checked=true] i{border:5px solid var(--fg)}.sp-edit-save{width:100%;min-height:50px!important;font-size:16px!important}.sp-edit-note{font-size:11px;color:var(--muted);text-align:center;margin:14px 0 0;line-height:1.4}.sp-edit-choices button:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
.sp-time-fields{display:flex;align-items:center;gap:12px;margin:-6px 0 22px}.sp-time-fields[hidden]{display:none!important}.sp-time-fields>.sp-time-group{flex:1;min-width:0;display:grid;gap:8px;font-size:12px;color:var(--muted)}.sp-time-fields>span{margin-top:22px;color:var(--muted)}.sp-time-fields input{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:48px;border:1px solid var(--border);border-radius:12px;background:var(--soft);color:var(--fg);padding:10px;font:400 16px 'Exo 2',sans-serif;color-scheme:light dark}.sp-time-error{color:#a3493d;font-size:13px;margin:-6px 0 18px;line-height:1.4}.sp-person>b{font-size:12px}.sp-edit-dialog{max-height:calc(100% - 32px)}
.sp-autosave{display:flex;justify-content:center;align-items:center;min-height:30px;margin:4px 0 0;font:400 13px 'Exo 2',sans-serif;color:var(--fg)}.sp-edit .sp-edit-note{margin-top:6px}.sp-edit .sp-time-error{margin:0 0 12px}
.sp-compact-time .sc-modalhead{margin-bottom:20px}.sp-compact-time .sp-time-fields{margin:22px 0 12px}.sp-compact-time .sp-autosave{font-size:12px;color:var(--muted)}.sp-undo{position:absolute;z-index:10;left:20px;right:20px;bottom:88px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:var(--btn);color:var(--btn-fg);border-radius:15px;box-shadow:0 5px 18px #0002;font:400 14px 'Exo 2',sans-serif}.sp-undo button{border:0;background:transparent;color:inherit;font:600 14px 'Exo 2',sans-serif;padding:8px;min-height:36px}.sp-compact-time input{user-select:text}

.sp-schedule{flex:1;min-height:0;padding-bottom:90px}.sp-error{font-size:13px;line-height:1.5;margin:12px 0;color:var(--fg)}.sp-error button{font:inherit;color:inherit;background:transparent;border:0;text-decoration:underline;min-height:44px}.sp-save-status{font-size:13px;color:var(--muted)}.sp-inline-undo{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0;padding:12px 15px;background:var(--btn);color:var(--btn-fg);border-radius:14px;font-size:14px}.sp-inline-undo button{border:0;background:transparent;color:inherit;min-height:44px;font:600 14px 'Exo 2',sans-serif}.sp-grid button:disabled{opacity:1;cursor:default}.sp-grid-person strong{font-size:12px}.sp-grid-person button{overflow-wrap:anywhere}

.work-shell[data-work-section="schedule"] .work-heading>[data-work="new"],.work-shell[data-work-section="schedule"] .work-heading>[data-work="search"]{visibility:hidden;pointer-events:none}

.sp-grid-person>div{overflow:hidden}.sp-grid-person strong{overflow:hidden;overflow-wrap:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

/* Pending presentation does not grant a confirmed shift/version. */
.sp-grid-person button.sp-saving:disabled{opacity:.85;outline:1px dashed currentColor;outline-offset:2px}

.sp-time-input{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;min-height:48px;border:1px solid var(--border);border-radius:12px;background:var(--soft);color:var(--fg);font:400 16px 'Exo 2',sans-serif;font-variant-numeric:tabular-nums}
.sp-time-input input{min-height:46px;border:0;border-radius:10px;padding-inline:0;background:transparent;text-align:center}

/* Shared notice geometry. Uses the phone's established theme/font tokens. */
.phone > .grimm-connection-clip {
  position: absolute;
  z-index: 5;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  height: 54px;
  overflow: hidden;
  pointer-events: none;
}
.phone > .grimm-connection-clip[hidden] { display: none; }
/* The shared capsule owns connection copy; pending/business notices stay inline. */
.phone[data-connection-notice-ready="true"] .sc-banner { display: none; }
.grimm-connection-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 10px 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 20px 20px;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 4px 10px var(--shade);
  font: 600 13px/18px 'Exo 2', sans-serif;
}
.grimm-connection-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.grimm-connection-icon svg { width: 18px; height: 18px; }
.grimm-connection-copy { min-width: 0; white-space: nowrap; }
.grimm-connection-notice[data-state="offline"] .grimm-connection-icon { color: #936326; }
.grimm-connection-notice[data-state="online"] .grimm-connection-icon { color: #27765a; }
.phone[data-theme="dark"] .grimm-connection-notice[data-state="offline"] .grimm-connection-icon { color: #eac489; }
.phone[data-theme="dark"] .grimm-connection-notice[data-state="online"] .grimm-connection-icon { color: #84d4ae; }
.grimm-connection-notice[data-state="connecting"] .grimm-connection-icon svg,
.grimm-connection-notice[data-state="updating"] .grimm-connection-icon svg { animation: grimm-connection-spin 1.1s linear infinite; }
@keyframes grimm-connection-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .grimm-connection-icon svg { animation: none !important; }
}

/* No layout changes; the header owns drag while the body retains normal scrolling. */
.staff-dialog,.sc-modalbg > .sc-modal,.sc-message-panel { overscroll-behavior-y: contain; }
.staff-dialog .sc-modalhead,.sc-modalbg .sc-modalhead,.sc-message-panel-head {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.grimm-sheet-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }

.ga-launch {
  position:absolute; z-index:3; bottom:calc(153px + env(safe-area-inset-bottom,0px)); left:50%; transform:translateX(-50%);
  min-height:44px; border:1px solid var(--border); border-radius:14px; padding:0 14px;
  background:var(--card); color:var(--fg); white-space:nowrap; font:650 13px 'Exo 2',sans-serif;
}
.phone:not([data-view="home"]) .ga-launch { display:none; }
.chat-head button.chat-demo { border:0; min-height:32px; cursor:pointer; }
.ga-user .turn-text { font-size:15px; }
.ga-files { display:grid; gap:7px; }
.ga-file { min-width:0; min-height:44px; text-align:left; color:var(--fg); }
.ga-photo { display:block; border:0; border-radius:12px; overflow:hidden; padding:0; background:var(--soft); }
.ga-photo img { display:block; width:min(100%,260px); height:auto; max-height:164px; object-fit:cover; }
.ga-file.ga-file:not(.ga-photo) {
  display:flex; align-items:center; gap:9px; width:100%; padding:8px; border:1px solid var(--border); border-radius:12px; background:var(--card);
}
.ga-file-icon { display:grid; flex:0 0 32px; place-items:center; width:32px; height:34px; border-radius:8px; background:var(--soft); }
.ga-file-info { display:grid; gap:3px; min-width:0; }
.ga-file-info strong { font-size:13px; overflow-wrap:anywhere; }
.ga-file-info small,.ga-table-head small,.ga-proposal small,.ga-meta { font:500 12px/1.35 'Exo 2',sans-serif; color:var(--muted); }
.ga-file-full { display:block; max-width:100%; max-height:65dvh; margin:auto; object-fit:contain; border-radius:11px; }
.ga-download { display:flex; min-height:44px; align-items:center; justify-content:center; color:var(--fg); }
.chat-form:has(.ga-attach) { flex-wrap:wrap; }
.phone[data-grimm-preview-dialog] .chat-form .send:not([hidden]) { display:grid!important; }
.phone[data-grimm-preview-dialog] .chat-form .voice-button[hidden] { display:none!important; }
.ga-drafts { display:flex; flex-basis:100%; gap:7px; overflow-x:auto; padding-block:3px; }
.ga-drafts[hidden] { display:none; }
.ga-draft { display:flex; align-items:center; flex:0 0 auto; max-width:235px; gap:3px; }
.ga-draft .ga-photo img { width:55px; height:48px; }
.ga-remove,.ga-attach,.ga-expand { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border:0; border-radius:11px; background:transparent; color:var(--fg); }
.ga-remove { font-size:21px; }
.ga-answer { gap:7px; }
.ga-answer-text { font-size:15px; line-height:1.5; margin:0; }
.ga-answer-text[data-waiting] { color:var(--muted); }
.ga-reply-action:empty { display:none; }
.ga-reply-action .ga-review { min-height:36px; }
.ga-review:disabled { opacity:.55; cursor:default; }
.ga-starters {
  display:flex; flex:0 0 auto; gap:6px; padding:4px 13px 6px;
  overflow-x:auto; scrollbar-width:thin; scrollbar-color:var(--border) transparent;
}
.ga-shortcut {
  display:grid; place-items:center; flex:0 0 auto; min-height:32px;
  padding:0 7px; border:1px solid var(--border); border-radius:8px;
  background:var(--card); color:var(--fg); font:600 12px/1.2 'Exo 2',sans-serif;
  white-space:nowrap; cursor:pointer;
}
.ga-shortcut:hover,.ga-shortcut:active { background:var(--soft); }
.ga-shortcut:focus-visible { outline:2px solid var(--fg); outline-offset:-3px; }
@media (max-width:360px) {
  .ga-starters { gap:4px; padding-inline:8px; }
  .ga-shortcut { padding-inline:5px; font-size:11px; }
}
.ga-replies { display:flex; flex-wrap:wrap; gap:6px; }
.ga-replies .ga-review { min-width:44px; }
.ga-table-card,.ga-proposal {
  background:var(--card); border:1px solid var(--border); border-radius:15px; min-width:0; overflow:hidden;
}
.ga-table-head { display:flex; justify-content:space-between; align-items:center; gap:4px; padding:9px 10px 7px 12px; }
.ga-table-head > div,.ga-proposal { display:grid; gap:4px; }
.ga-table-head strong,.ga-proposal strong { font-size:15px; }
.ga-table-wrap { overflow-x:auto; }
.ga-table { width:100%; border-collapse:collapse; text-align:left; font-size:13px; font-variant-numeric:tabular-nums; }
.ga-table thead { background:var(--soft); }
.ga-table th,.ga-table td { padding:8px 7px; border-top:1px solid var(--border); }
.ga-table th:first-child,.ga-table td:first-child { padding-left:12px; width:48%; }
.ga-table th:last-child,.ga-table td:last-child { text-align:right; padding-right:12px; white-space:nowrap; }
.ga-room { min-height:44px; border:0; background:transparent; color:var(--fg); font:650 13px 'Exo 2',sans-serif; padding:0; text-align:left; text-decoration:underline; text-underline-offset:3px; }
.ga-room-note { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.ga-expanded.staff-dialog { top:12px; max-height:calc(100% - 24px)!important; }
.ga-proposal { padding:12px; }
.ga-booking-status { font-size:12px; color:var(--muted); }
.ga-booking-result { display:grid; gap:4px; margin-block:5px; padding:9px 10px; border-inline-start:2px solid currentColor; border-radius:5px 9px 9px 5px; }
.ga-booking-result[data-tone="created"] { color:#23624b; background:color-mix(in srgb,currentColor 9%,var(--card)); }
.ga-booking-result[data-tone="occupied"] { color:#854819; background:color-mix(in srgb,currentColor 9%,var(--card)); }
.phone[data-theme="dark"] .ga-booking-result[data-tone="created"] { color:#9ad6bd; }
.phone[data-theme="dark"] .ga-booking-result[data-tone="occupied"] { color:#f3bf92; }
.ga-booking-note { color:var(--fg); line-height:1.4; }
.ga-review { justify-self:start; border:0; min-height:44px; padding:0 10px; border-radius:10px; background:var(--soft); color:var(--fg); font:600 13px 'Exo 2',sans-serif; cursor:pointer; }
.ga-review:hover { background:color-mix(in srgb,var(--fg) 7%,var(--soft)); }
.ga-review:focus-visible { outline:2px solid var(--fg); outline-offset:2px; }
.ga-dialog .sc-modalhead strong { font-size:18px; overflow-wrap:anywhere; }
.ga-dialog .sc-modalhead button { min-width:44px; min-height:44px; font-size:24px; color:var(--fg); }
.ga-sheet-body { display:grid; gap:12px; }
.ga-meta,.ga-room-title,.ga-booking-details { margin:0; }
.ga-room-title { font:650 21px/1.16 Tektur,'Exo 2',sans-serif; }
.ga-booking-details { display:grid; grid-template-columns:1fr auto; gap:10px; font-size:14px; }
.ga-booking-details dd { margin:0; text-align:right; }
.ga-booking-details dt { color:var(--muted); }
.ga-total { display:flex; justify-content:space-between; align-items:center; gap:8px; border-top:1px solid var(--border); padding-top:12px; font-size:14px; }
.ga-total strong { font-size:20px; white-space:nowrap; }
.ga-booking-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.ga-booking-actions .work-primary { grid-column:1/-1; }
.ga-booking-actions button { min-height:44px; }

.phone[data-grimm-assistant] .odin-layer,
.phone[data-grimm-assistant] .odin-reconnect,
.phone[data-grimm-assistant] .chat-form .chat-input-mark,
.phone[data-grimm-assistant] .ga-starters[hidden],
.phone[data-grimm-assistant] .chat-demo[hidden],
.phone[data-grimm-assistant] .chat-form .send[hidden] {
  display: none !important;
}
.phone[data-grimm-assistant][data-view="conversation"] .home-form { visibility: hidden; }
.phone[data-grimm-assistant] .chat-form .send:not([hidden]) { display: grid !important; }
.phone[data-grimm-assistant] .chat-form .send:disabled { opacity: .5; }
.phone[data-grimm-assistant] .chat-form { padding-inline: 12px; }
.phone[data-grimm-assistant] .chat-form input { flex: 1; min-width: 0; }
.ga-answer-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ga-house-state { margin: 0; font-size: 14px; font-weight: 650; }
.ga-empty { margin: auto; text-align: center; }
.ga-sources { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ga-sources a { display: inline-flex; align-items: center; min-height: 36px; color: var(--fg); text-underline-offset: 3px; overflow-wrap: anywhere; }
.ga-earlier { align-self: center; }

.ga-formatted-answer {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  overflow-wrap: anywhere;
  display: grid;
  gap: 10px;
}

.ga-formatted-answer p,
.ga-formatted-answer ul,
.ga-formatted-answer ol,
.ga-formatted-answer h3 {
  margin: 0;
}

.ga-formatted-answer ul,
.ga-formatted-answer ol {
  padding-inline-start: 1.3em;
}

.ga-formatted-answer li + li { margin-top: 4px; }
.ga-formatted-answer li::marker { color: var(--muted); }
.ga-formatted-answer h3 { font: 720 1em/1.35 'Exo 2', sans-serif; margin-top: 2px; }
.ga-formatted-answer h3 + :is(ul, ol) { margin-top: -4px; }
.ga-formatted-answer strong { font-weight: 720; }

.sc-composer .sc-send[data-schedule-ready] {
  touch-action: manipulation;
  user-select: none;
  -webkit-touch-callout: none;
}
.scheduled-send-menu {
  position: absolute;
  z-index: 12;
  right: 12px;
  bottom: calc(100% + 5px);
  width: min(238px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 4px;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 7px 25px #0003;
  transform-origin: bottom right;
  animation: scheduled-send-menu-in .16s ease-out;
}
@keyframes scheduled-send-menu-in {
  from { opacity: 0; transform: translateY(5px) scale(.96); }
}
@media (prefers-reduced-motion: reduce) {
  .scheduled-send-menu { animation: none; }
}
.scheduled-send-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  color: var(--fg);
  font: 650 15px 'Exo 2', sans-serif;
  text-align: left;
}
.scheduled-entry {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--fg);
}
.scheduled-entry span {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 15px;
  padding: 0 3px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btn-fg);
  font: 650 10px/15px 'Exo 2', sans-serif;
}
.scheduled-schedule-dialog .sc-modalhead strong { font-size: 19px; }
.scheduled-schedule-dialog .sc-modalhead button { min-width: 44px; min-height: 44px; color: var(--fg); }
.scheduled-schedule-body { display: grid; gap: 10px; }
.scheduled-schedule-body p { margin: 0; overflow-wrap: anywhere; }
.scheduled-schedule-body small { font-size: 12px; color: var(--muted); }
.scheduled-schedule-body .scheduled-schedule-text {
  background: var(--soft);
  border-radius: 12px;
  padding: 10px;
}
.scheduled-schedule-body .scheduled-schedule-fields,
.scheduled-schedule-body .scheduled-schedule-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.scheduled-schedule-fields label { flex: 1 1 100px; min-width: 0; display: grid; gap: 4px; font-size: 13px; }
.scheduled-schedule-day { position: relative; flex: 1.3 1 144px; min-width: 0; }
.scheduled-schedule-time { flex: 1 1 100px; min-width: 0; display: grid; gap: 4px; font-size: 13px; }
.scheduled-time-input { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--fg); font: 500 16px 'Exo 2', sans-serif; }
.scheduled-schedule-day input[type="text"] { padding-right: 44px; }
.scheduled-date-picker { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.scheduled-date-picker:focus-within { outline: 2px solid var(--fg); outline-offset: -3px; }
.scheduled-date-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.scheduled-schedule-fields input, .scheduled-schedule-body textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 12px;
  padding: 7px 8px;
  font: 500 16px 'Exo 2', sans-serif;
}
.scheduled-schedule-actions button { flex: 1 1 auto; min-height: 44px; }
.scheduled-time-input input { min-height: 42px; padding-inline: 0; border: 0; border-radius: 10px; background: transparent; text-align: center; }
.scheduled-schedule-body .work-primary { width: 100%; min-height: 44px; }
.scheduled-schedule-body article { display: grid; gap: 7px; border-top: 1px solid var(--border); padding-top: 10px; }
.scheduled-schedule-body .scheduled-schedule-error { color: var(--fg); font-weight: 650; }

.scheduled-recovery-entry {
  display: block;
  margin: 0 0 4px auto;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px 'Exo 2', sans-serif;
}

/* Match the footer to the last line box of a plain text bubble. */
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-message.cf-text-bubble[data-photo-count="0"] .sc-msgcontent{
  padding:6.5px 10px;
}
.sc-message.cf-text-bubble .sc-msgtext{position:relative;min-height:24px}
.sc-message.cf-text-bubble .sc-msgtext::after{content:'';display:inline-block;width:var(--cf-meta-space,64px);height:0;vertical-align:baseline}
.sc-message.cf-text-bubble .sc-msgtext>.sc-message-footer{position:absolute;right:0;bottom:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;width:max-content;min-height:15px;margin:0;font-size:11px;line-height:1;white-space:nowrap;color:var(--muted)}
.sc-message.cf-text-bubble .sc-message-mark:empty{display:none}
.sc-message.cf-text-bubble .sc-message-footer .sc-receipt{display:inline-flex;align-items:center}
.sc-message.cf-text-bubble .sc-message-footer .sc-message-mark{margin-right:0}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .cf-text-bubble .sc-msgtext>.sc-message-footer{
  height:1lh;
  font-size:inherit;
  line-height:inherit;
}
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .cf-text-bubble .sc-msgtext>.sc-message-footer>time{
  font-size:11px;
  line-height:1;
}

/* Keep the identity block between the avatar and the action buttons. */
.grimm-pwa .phone:is([data-view="staff"],[data-live-target="staff"]) .sc-detail-head.sc-detail-dm{
  height:auto;
  min-height:55px;
  flex:0 0 auto;
  padding:5px;
  gap:4px;
}
.sc-detail-dm .sc-room-summary{
  gap:12px;
}
.sc-detail-dm .sc-room-summary .sc-roomicon{
  width:30px;
  height:30px;
  flex-basis:30px;
  border-radius:9px;
  font-size:12px;
}
.sc-detail-dm .sc-detail-title,
.sc-detail-dm .sc-detail-meta{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:1px;
}
.sc-detail-dm .sc-detail-meta :is(.sc-role-badge,[data-dm-status]){
  display:block;
  max-width:100%;
  min-height:0;
  padding:0;
  background:transparent;
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sc-detail-dm .sc-detail-meta:not(:has(.sc-role-badge,[data-dm-status]:not(:empty))),
.sc-detail-dm .sc-detail-meta [data-dm-status]:empty{
  display:none;
}
.sc-detail-dm>.sc-back{
  width:30px;
  flex-basis:30px;
}
.sc-detail-head.sc-detail-dm>:is(.mx-icon,.sc-iconbtn){
  width:36px;
  min-width:36px;
  height:44px;
  padding:0;
}
.sc-detail-head.sc-detail-dm>:is(.sc-back,.mx-icon,.sc-iconbtn) svg{
  width:20px;
  height:20px;
}
@media (min-width:371px){
  .sc-detail-head.sc-detail-dm>:is(.mx-icon,.sc-iconbtn){
    width:40px;
    min-width:40px;
  }
}

.cf-spoiler{border:0;border-radius:5px;background:var(--soft);color:var(--fg);padding:2px 5px;font:inherit;cursor:pointer}
.cf-spoiler>span{filter:blur(6px);user-select:none;pointer-events:none}
.cf-spoiler[aria-expanded=true]>span{filter:none;user-select:text}
.cf-spoiler:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
@media(forced-colors:active){.cf-spoiler{border:1px solid ButtonText}.cf-spoiler>span{visibility:hidden}.cf-spoiler[aria-expanded=true]>span{visibility:visible}}

/* Albums use shared row tracks: adjacent media share their top/bottom edges. */
.sc-message .sc-photo-album:is([data-count="2"],[data-count="3"],[data-count="4"],[data-count="5"],[data-count="6"],[data-count="7"],[data-count="8"]){grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);align-items:stretch;gap:3px}
.sc-message .sc-photo-album[data-count="2"]{aspect-ratio:2/1}
.sc-message .sc-photo-album[data-count="3"]{aspect-ratio:16/17;grid-template-rows:minmax(0,9fr) minmax(0,8fr)}
.sc-message .sc-photo-album[data-count="4"]{aspect-ratio:1/1}
.sc-message .sc-photo-album[data-count="5"]{aspect-ratio:16/25;grid-template-rows:minmax(0,9fr) repeat(2,minmax(0,8fr))}
.sc-message .sc-photo-album[data-count="6"]{aspect-ratio:2/3}
.sc-message .sc-photo-album[data-count="7"]{aspect-ratio:16/33;grid-template-rows:minmax(0,9fr) repeat(3,minmax(0,8fr))}
.sc-message .sc-photo-album[data-count="7"]>.sc-photo:first-child{grid-column:1/-1}
.sc-message .sc-photo-album[data-count="8"]{aspect-ratio:1/2}
.sc-message .sc-photo-album:is([data-count="2"],[data-count="3"],[data-count="4"],[data-count="5"],[data-count="6"],[data-count="7"],[data-count="8"])>.sc-photo{aspect-ratio:auto;min-width:0;min-height:0;height:100%;align-self:stretch}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-photo-media{border-radius:0}
/* Media touches the bubble edge; text, documents and reply actions share a 10px inset. */
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgcontent>.sc-file{width:calc(100% - 20px);margin:8px 10px}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgcontent>.sc-thread-link{margin:0;padding:8px 10px;min-height:38px;box-sizing:border-box;font-size:12px;line-height:18px}
.sc-message[data-photo-count]:not([data-photo-count="0"]) .sc-msgcontent>.sc-message-reactions:not(:empty){padding:6px 10px}
.sc-message .sc-thread-link>span{min-width:0;overflow-wrap:anywhere}

.mx-icon{display:inline-flex;justify-content:center;align-items:center;flex-shrink:0;width:40px;height:40px;padding:9px;border:0;border-radius:12px;background:transparent;color:var(--fg)}.mx-icon:hover{background:var(--soft)}.mx-icon[aria-pressed=true]{background:var(--fg);color:var(--bg)}.mx-icon:disabled{opacity:.4}.mx-caption{color:var(--muted);font-size:12px;line-height:1.45;margin:6px 0 12px}.mx-intro{font-size:14px;line-height:1.5;margin:0 0 20px;color:var(--fg)}.mx-kicker{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:10px;font-weight:650;letter-spacing:.02em;margin:1px 0 9px}.mx-full{width:100%}.mx-solid,.mx-outline{min-height:48px;border:0;border-radius:13px;padding:11px 16px;font:600 14px 'Exo 2',sans-serif}.mx-solid{background:var(--btn);color:var(--btn-fg)}.mx-outline{background:transparent;color:var(--fg);border:1px solid var(--border)}.mx-solid:hover{opacity:.87}.mx-outline:hover{background:var(--soft)}.mx-solid:disabled{opacity:.35}.mx-full+.mx-full{margin-top:9px}
.mx-dialog{padding:0!important;border:1px solid var(--border)!important;color:var(--fg)!important;background:var(--card)!important;border-radius:24px!important;overflow:auto!important}.mx-dialog::backdrop{background:#0a17104f;backdrop-filter:blur(3px)}.mx-sheet{padding:10px 20px 22px}.mx-grab{height:4px;width:34px;background:var(--border);border-radius:5px;margin:0 auto 7px}.mx-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 18px;min-height:42px}.mx-sheet-head h2{font:700 20px Tektur,'Exo 2',sans-serif;margin:0;line-height:1.25;letter-spacing:-.03em}.mx-sheet-body{min-width:0}.mx-sheet-body label{display:block;font-size:12px;font-weight:600;margin:0 0 8px}.mx-sheet-body input:not([type=checkbox]),.mx-sheet-body textarea{font:400 15px 'Exo 2',sans-serif;background:var(--soft);color:var(--fg);border:1px solid var(--border);border-radius:12px;padding:13px 14px;width:100%;min-width:0;resize:none}.mx-sheet-body input:focus,.mx-sheet-body textarea:focus{outline:1px solid var(--fg);outline-offset:1px}.mx-error{font-size:12px;min-height:18px;line-height:1.4;margin:9px 0;color:var(--fg)}.mx-error:not(:empty){border-left:2px solid var(--fg);padding-left:8px}.mx-menu{display:grid}.mx-row{display:flex;align-items:center;gap:12px;min-height:76px;width:100%;padding:12px 2px;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--border);color:var(--fg)}.mx-row:last-child{border-bottom:0}.mx-row:hover{background:var(--soft);border-radius:12px}.mx-row-icon{display:grid;place-items:center;width:42px;height:42px;background:var(--soft);border-radius:13px}.mx-row>span:nth-child(2){flex:1;min-width:0}.mx-row strong{display:block;font-size:15px;font-weight:600}.mx-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.4}.mx-row>svg{color:var(--muted)}
.sc-detail-head .mx-icon{width:36px;height:40px;padding:8px}.mx-online-copy{color:#4c7864}.mx-presence-dot{flex:none;width:11px;height:11px;border-radius:50%;background:#56866c;margin:0 15px 0 12px}.mx-presence-dot[data-status=unavailable]{background:#a2814c}.mx-presence-dot[data-status=offline]{background:var(--muted)}.mx-radio{width:23px;height:23px;display:grid;place-items:center;border:1px solid var(--border);border-radius:50%;margin-right:7px}.mx-row[aria-pressed=true] .mx-radio{background:var(--fg);color:var(--bg);border-color:var(--fg)}.mx-status-form{margin-top:20px}.mx-status-form .mx-solid{margin-top:15px}.mx-info-avatar{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 10px;background:var(--soft);border:1px solid var(--border);border-radius:24px;font-size:25px;font-weight:700}.mx-info-sub{text-align:center;font-size:12px;color:var(--muted);margin-bottom:18px}
.mx-word-list{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.mx-word-list>span{display:flex;align-items:center;gap:3px;font-size:14px;border-radius:10px;background:var(--soft);padding:3px 4px 3px 12px}.mx-word-list .mx-icon{width:32px;height:32px;padding:8px}.mx-word-list .mx-icon svg{width:16px;height:16px}.mx-word-input{display:flex;gap:8px}.mx-word-input input{flex:1}.mx-word-input .mx-solid{font-size:12px;padding:10px}.mx-notice{display:flex;gap:10px;align-items:flex-start;padding:14px 0 20px;color:var(--muted);font-size:12px;line-height:1.5}.mx-keyword-alert{position:absolute;top:10px;left:10px;right:10px;z-index:1000;display:flex;align-items:center;gap:12px;background:var(--fg);color:var(--bg);border:0;border-radius:18px;padding:17px 14px;text-align:left;box-shadow:0 12px 36px #0003;animation:mx-enter 200ms ease both}.mx-keyword-alert>span:nth-child(2){flex:1}.mx-keyword-alert small{display:block;font-size:9px;letter-spacing:.06em;opacity:.65;margin-bottom:6px}.mx-keyword-alert strong{font-size:13px;font-weight:500}.mx-offline-hint{padding:8px 16px;background:var(--soft);font-size:11px;color:var(--muted);text-align:center}
.mx-poll{width:100%;min-width:230px;max-width:310px}.mx-poll h3{font-size:17px;line-height:1.3;font-weight:650;margin:0 0 5px}.mx-poll .mx-caption{font-size:10px;margin-bottom:15px}.mx-poll-options{display:grid;gap:7px}.mx-vote{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;gap:9px;width:100%;min-height:43px;border:1px solid var(--border);border-radius:10px;padding:9px 11px;background:var(--card);color:var(--fg);text-align:left;font-size:14px}.mx-vote-progress{position:absolute;inset:0 auto 0 0;width:var(--vote);background:var(--border);z-index:-1;transition:width 220ms ease}.mx-vote:hover{border-color:var(--muted)}.mx-vote-mark{width:17px;height:17px;border:1px solid var(--muted);border-radius:50%;display:grid;place-items:center;flex:none}.mx-vote[aria-pressed=true] .mx-vote-mark{background:var(--fg);border-color:var(--fg);color:var(--bg)}.mx-vote b{margin-left:auto;font-size:11px}.mx-vote:disabled{color:var(--fg)}.mx-poll-footer{display:flex;gap:8px;align-items:center;justify-content:space-between;font-size:10px;color:var(--muted);margin:12px 0 3px}.mx-poll-footer button{font-size:10px;color:var(--fg);background:transparent;border:0;padding:5px}.sc-message[data-matrix-feature=poll] .sc-msgcontent{max-width:90%;width:310px}.sc-message[data-matrix-feature=poll] .sc-msgtext{line-height:1.4}.mx-poll-form>label{margin-top:18px}.mx-poll-form>label:first-child{margin-top:0}.mx-option-field{display:flex;align-items:center;gap:8px;margin-bottom:8px}.mx-option-field>span{color:var(--muted);font-size:12px;width:12px;flex:none}.mx-option-field input{flex:1}.mx-option-field .mx-icon{width:30px;height:35px;padding:5px}.mx-add-option{border:0;background:transparent;color:var(--fg);font-size:13px;padding:8px 0 10px 20px;min-height:40px}.mx-add-option:disabled{opacity:.35}.mx-toggle-row{display:flex!important;align-items:center;gap:10px;padding:15px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.mx-toggle-row>span:first-child{flex:1;font-size:14px;font-weight:500}.mx-toggle-row input{position:absolute;opacity:0;width:42px;height:26px;right:20px;cursor:pointer}.mx-toggle{height:24px;width:40px;border-radius:15px;background:var(--border);padding:3px}.mx-toggle:after{content:'';display:block;width:18px;height:18px;background:var(--card);border-radius:50%;transition:transform 160ms}.mx-toggle-row input:checked+.mx-toggle{background:var(--fg)}.mx-toggle-row input:checked+.mx-toggle:after{transform:translateX(16px)}.mx-toggle-row input:focus-visible+.mx-toggle{outline:2px solid var(--fg);outline-offset:3px}
.mx-location{position:relative;display:grid;grid-template-columns:1fr 16px;text-align:left;align-items:center;gap:0 6px;width:260px;max-width:100%;padding:0;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--card);color:var(--fg)}.mx-map{position:relative;display:block;overflow:hidden;grid-column:1/-1;width:100%;height:138px;background:color-mix(in srgb,var(--soft) 75%,#c6d7b8);isolation:isolate}.mx-map:before{content:'';position:absolute;width:190px;height:300px;transform:rotate(50deg);background:color-mix(in srgb,var(--bg) 55%,#b5cfa4);left:-110px;top:-100px;border-radius:45%}.mx-road{position:absolute;background:var(--card);border:1px solid var(--border);height:12px;width:120%;left:-10%;transform:rotate(-20deg);top:55%}.mx-road.b{width:12px;height:220%;left:61%;top:-70%;transform:rotate(-30deg)}.mx-road.c{top:110%;transform:rotate(35deg)}.mx-house{position:absolute;background:color-mix(in srgb,var(--soft) 65%,#a4b5a7);border:1px solid color-mix(in srgb,var(--muted) 50%,transparent);width:28px;height:22px;transform:rotate(-18deg);border-radius:3px}.mx-house.h1{left:17%;top:24%}.mx-house.h2{left:37%;top:62%}.mx-house.h3{left:77%;top:39%}.mx-map-pin{position:absolute;left:50%;top:35%;display:grid;place-items:center;width:36px;height:36px;background:var(--fg);color:var(--bg);border:3px solid var(--card);border-radius:50%;box-shadow:0 4px 10px #0003}.mx-map-caption{padding:11px 12px}.mx-map-caption strong{display:block;font-size:14px;font-weight:600}.mx-map-caption small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.mx-location>svg{margin-right:9px;width:14px}.mx-large-map .mx-location{width:100%}.mx-large-map .mx-map{height:225px}.mx-large-map .mx-map-caption,.mx-large-map .mx-location>svg{display:none}.mx-location-copy{display:grid;gap:4px;margin:17px 0}.mx-location-copy strong{font-size:17px}.mx-location-copy span{font-size:13px;color:var(--muted)}.mx-map-note{margin-bottom:20px}
.mx-segment{display:flex;padding:4px;background:var(--soft);border-radius:12px;margin-bottom:21px}.mx-segment button{border:0;border-radius:9px;flex:1;font-size:13px;background:transparent;color:var(--muted);min-height:37px}.mx-segment button[aria-pressed=true]{background:var(--fg);color:var(--bg)}.mx-pack-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}.mx-pack-head strong{font-size:13px}.mx-pack-head span{font-size:10px;color:var(--muted)}.mx-sticker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.mx-sticker-grid button{display:grid;place-items:center;border:0;background:transparent;border-radius:12px;padding:5px;min-width:0}.mx-sticker-grid button:hover{background:var(--soft)}.mx-sticker-grid img{width:100%;height:auto;aspect-ratio:1.25;object-fit:contain}.mx-sent-sticker{display:block;width:160px;height:128px;object-fit:contain}.sc-message[data-matrix-feature=sticker] .sc-msgcontent{background:transparent;border:0;padding-top:0}.mx-emoji-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.mx-emoji-grid button{font-size:28px;padding:12px;background:transparent;border:0;border-radius:12px}.mx-emoji-grid button:hover{background:var(--soft)}.mx-format-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.mx-format-grid button{display:flex;flex-direction:column;align-items:center;gap:9px;border:1px solid var(--border);border-radius:12px;padding:13px 4px;color:var(--fg);background:var(--card);font-size:10px}.mx-format-grid button:hover{background:var(--soft)}.mx-format-example{padding:17px;margin-top:19px;border:1px solid var(--border);border-radius:14px;font-size:14px;line-height:1.5}.mx-format-example p{margin:7px 0 12px}.mx-spoiler{position:relative;display:inline-block;border:0;border-radius:5px;background:var(--soft);color:var(--fg);padding:2px 5px;font:inherit;text-align:left}.mx-spoiler span{filter:blur(6px);user-select:none}.mx-spoiler b{position:absolute;inset:0;display:grid;place-items:center;font-size:11px;font-weight:500}.mx-spoiler[aria-expanded=true] span{filter:none;user-select:auto}.mx-spoiler[aria-expanded=true] b{display:none}.mx-listitem{display:inline-block;padding-left:2px}
.mx-dialog .mx-solid{color:var(--btn-fg);background:var(--btn)}
.mx-dialog .mx-outline{color:var(--fg)}
.mx-dialog .mx-toggle-row{flex-direction:row;justify-content:space-between;text-align:left}
.mx-dialog .mx-toggle-row>span:first-child{width:auto;text-align:left}
.mx-dialog .mx-toggle-row input{margin:0;min-height:0}
.mx-dialog .mx-toggle{flex:0 0 40px}
.sc-message[data-matrix-feature=sticker] .sc-msgcontent{width:160px!important;max-width:70%;border:0;background:transparent;padding:0}
.sc-message[data-matrix-feature=sticker] .sc-photo-media{background:transparent}
.sc-message[data-matrix-feature=sticker] .sc-photo{background:transparent}
.sc-message[data-matrix-feature=poll] .sc-msgtext{white-space:normal}
.cf-location-symbol{display:grid;place-items:center;background:var(--soft);height:110px}
.cf-poll-voters{border:0;background:transparent;color:var(--muted);font:inherit;font-size:11px;padding:6px 0}
.cf-poll-voter-group p{font-size:13px;color:var(--muted);line-height:1.5}
.mx-dialog button:focus-visible,.mx-poll button:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.mx-vote-progress,.mx-toggle:after{transition:none}}

.mx-call-screen{position:absolute;inset:0;z-index:1200;display:flex;flex-direction:column;align-items:center;padding:25px 22px max(28px,env(safe-area-inset-bottom));color:var(--fg);background:var(--bg);animation:mx-enter 200ms ease both;overflow:auto}.mx-call-screen>header{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:40px}.mx-call-screen>header>span{display:flex;align-items:center;gap:7px;font-size:12px}.mx-call-screen>header small{font-size:8px;letter-spacing:.12em;color:var(--muted)}.mx-call-person{display:flex;align-items:center;flex-direction:column;text-align:center;margin-top:4vh}.mx-call-avatar{display:grid;place-items:center;width:112px;height:112px;background:var(--soft);border:1px solid var(--border);border-radius:38px;font-family:Tektur,sans-serif;font-size:34px;position:relative}.mx-call-person h2{font-family:Tektur,sans-serif;font-size:26px;font-weight:650;margin:24px 0 10px}.mx-call-state{font-size:18px;margin:0 0 10px;font-variant-numeric:tabular-nums;min-height:24px}.mx-call-state small{display:block;font-size:12px;color:var(--muted);max-width:260px;margin:8px auto;line-height:1.4}.mx-call-person>span{font-size:12px;color:var(--muted)}.mx-video-sample{display:grid;justify-items:center;border:1px solid var(--border);border-radius:20px;width:100%;margin-top:25px;padding:20px 12px;background:var(--soft);color:var(--muted)}.mx-video-sample[hidden]{display:none}.mx-video-sample p{font-size:13px;margin:12px 0 5px}.mx-video-sample small{font-size:10px}.mx-call-controls{display:flex;gap:28px;justify-content:center;margin:auto 0 26px;padding-top:32px}.mx-call-controls>div{display:flex;flex-direction:column;align-items:center;gap:10px}.mx-call-controls .mx-icon{width:55px;height:55px;background:var(--soft);border-radius:50%;border:1px solid var(--border)}.mx-call-controls .mx-icon[aria-pressed=true]{background:var(--fg);color:var(--bg);border-color:var(--fg)}.mx-call-controls>div>span{font-size:11px;color:var(--muted)}.mx-call-end{display:flex;flex-direction:column;align-items:center;gap:10px}.mx-hangup{width:65px;height:65px;display:grid;place-items:center;background:#c44f49;border:0;border-radius:50%;color:white}.mx-hangup svg{transform:rotate(135deg)}.mx-call-end>span{font-size:11px;color:var(--muted)}.mx-call-demo-note{font-size:10px;color:var(--muted);text-align:center;margin:23px 0 0}.mx-call-answer{margin-bottom:18px}.mx-call-answer[hidden]{display:none}.mx-answer{display:flex;align-items:center;gap:9px;border:0;border-radius:18px;padding:14px 30px;background:#426e56;color:#fff;font-size:14px}.mx-call-log{display:flex;align-items:center;gap:10px}.mx-call-log strong{font-size:14px;display:block}.mx-call-log small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
@keyframes mx-enter{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.mx-keyword-alert,.mx-call-screen{animation:none}.mx-vote-progress,.mx-toggle:after{transition:none}}@media(forced-colors:active){:root{scrollbar-color:auto}.mx-vote-progress{background:Highlight}.mx-spoiler{border:1px solid ButtonText}.mx-spoiler span{visibility:hidden}.mx-spoiler[aria-expanded=true] span{visibility:visible}}@media(max-width:380px){.mx-sheet{padding-inline:16px}.mx-sheet-head h2{font-size:18px}.mx-poll{min-width:210px}.mx-call-person h2{font-size:23px}.mx-format-grid{gap:4px}.mx-format-grid button{font-size:9px}}
/* Explicit variants of the shared StaffDialog avoid its Work form defaults. */
.mx-call-retry{margin-top:20px;min-height:40px;font-size:13px}.mx-call-retry[hidden]{display:none}
/* Connected video owns the entire call viewport. Audio/dialling keep the avatar. */
.mx-video-stage[hidden],.mx-self-preview[hidden]{display:none}
.mx-video-stage{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:#14221b;z-index:0;cursor:pointer}
.mx-video-stage img{display:block;width:100%;height:100%;object-fit:cover;object-position:58% center;pointer-events:none}
.mx-video-stage:focus-visible{outline:2px solid #fff;outline-offset:-4px}
.mx-video-shade{display:none;pointer-events:none}
.mx-self-preview{position:absolute;right:18px;top:130px;width:99px;height:141px;overflow:hidden;border:1px solid #ffffff66;border-radius:17px;background:#344941;box-shadow:0 4px 18px #0003;z-index:2;pointer-events:none}
.mx-self-preview>img{width:100%;height:100%;object-fit:cover}
.mx-self-preview small{position:absolute;bottom:0;left:0;right:0;padding:18px 9px 8px;color:#fff;background:linear-gradient(transparent,#0007);font-size:10px}
.mx-self-camera-off{display:none}
.mx-self-preview[data-camera=off]>img{display:none}
.mx-self-preview[data-camera=off] .mx-self-camera-off{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;font-size:10px;line-height:1.4;text-align:center;color:#fff}
.mx-call-screen.mx-video-connected{overflow:hidden;background:#14221b;color:#fff}
.mx-video-connected>header,.mx-video-connected .mx-call-person,.mx-video-connected .mx-call-controls,.mx-video-connected .mx-call-actions,.mx-video-connected .mx-call-demo-note{position:absolute;z-index:3;transition:opacity 180ms ease,transform 180ms ease}
.mx-video-connected>header{top:max(23px,env(safe-area-inset-top));left:22px;right:22px;width:auto;margin:0}
.mx-video-connected>header small{color:#ffffffb3}
.mx-video-connected .mx-call-person{top:62px;left:22px;right:22px;margin:0;align-items:flex-start;text-align:left;pointer-events:none}
.mx-video-connected .mx-call-avatar,.mx-video-connected .mx-call-person>span{display:none}
.mx-video-connected .mx-call-person h2{font-size:22px;margin:0 0 7px;max-width:100%;text-shadow:0 1px 12px #0005}
.mx-video-connected .mx-call-state{font-size:14px;margin:0;font-variant-numeric:tabular-nums;opacity:.85}
.mx-video-connected .mx-call-controls{left:0;right:0;bottom:155px;margin:0;padding:0}
.mx-video-connected .mx-call-controls .mx-icon{background:#17251f77;border-color:#ffffff26;color:#fff;backdrop-filter:blur(12px)}
.mx-video-connected .mx-call-controls .mx-icon[aria-pressed=true]{background:#f5f7f4;color:#14221b;border-color:#fff}
.mx-video-connected .mx-call-controls>div>span,.mx-video-connected .mx-call-end>span{color:#ffffffdf;text-shadow:0 1px 8px #0007}
.mx-video-connected .mx-call-actions{left:0;right:0;bottom:45px}
.mx-video-connected .mx-call-demo-note{bottom:14px;left:16px;right:16px;margin:0;color:#ffffffa6;font-size:9px}
.mx-video-connected .mx-video-shade{display:block;position:absolute;inset:0;z-index:1;background:linear-gradient(#0009,transparent 29%,transparent 54%,#0009);opacity:1;transition:opacity 180ms ease}
.mx-video-connected[data-controls=hidden]>header,.mx-video-connected[data-controls=hidden] .mx-call-person,.mx-video-connected[data-controls=hidden] .mx-call-controls,.mx-video-connected[data-controls=hidden] .mx-call-actions,.mx-video-connected[data-controls=hidden] .mx-call-demo-note{opacity:0;pointer-events:none;transform:translateY(7px)}
.mx-video-connected[data-controls=hidden] .mx-video-shade{opacity:0}
@media(max-height:620px){.mx-self-preview{top:107px;width:84px;height:118px}.mx-video-connected .mx-call-controls{bottom:134px}.mx-video-connected .mx-call-actions{bottom:34px}.mx-video-connected .mx-call-controls .mx-icon{width:47px;height:47px}.mx-video-connected .mx-hangup{width:57px;height:57px}}
@media(prefers-reduced-motion:reduce){.mx-video-connected>header,.mx-video-connected .mx-call-person,.mx-video-connected .mx-call-controls,.mx-video-connected .mx-call-actions,.mx-video-connected .mx-call-demo-note,.mx-video-connected .mx-video-shade{transition:none}}

/* One primary slot: green answer OR yellow retry. Red end/decline stays right. */
.mx-call-actions{display:flex;justify-content:center;align-items:flex-start;gap:65px;width:100%;flex:none}
.mx-call-primary-slot,.mx-call-actions .mx-call-end{display:flex;flex-direction:column;align-items:center;gap:10px;width:98px}
.mx-call-primary-slot[hidden]{display:none}
.mx-call-primary,.mx-call-actions .mx-hangup{display:grid;place-items:center;flex:none;width:68px;height:68px;border:0;border-radius:50%;padding:0}
.mx-call-primary{background:#3f805e;color:#fff}
.mx-call-primary[data-tone=retry]{background:#e7b84c;color:#292515}
.mx-call-primary:hover,.mx-call-actions .mx-hangup:hover{filter:brightness(1.08)}
.mx-call-primary:active,.mx-call-actions .mx-hangup:active{transform:scale(.97)}
.mx-call-primary-label,.mx-call-actions .mx-call-end>span{font-size:11px;line-height:1.4;min-height:30px;text-align:center;color:var(--muted)}
.mx-video-connected .mx-call-actions .mx-call-end>span{color:#ffffffdf}
.cf-remote-video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.cf-self-video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.mx-self-preview[data-camera=off]>.cf-self-video{display:none}
.mx-call-screen:not(.mx-video-connected) .cf-remote-video{visibility:hidden}
.cf-call-audio-start{position:absolute;z-index:5;top:110px;border:1px solid var(--border);border-radius:12px;padding:10px 16px;background:var(--card);color:var(--fg);font:inherit}
.mx-call-screen .mx-hangup svg{transform:rotate(135deg)}
.mx-call-screen button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.mx-call-screen,.mx-call-screen *{animation:none!important;transition:none!important}}
.mx-call-avatar{overflow:hidden}
.mx-call-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

html.grimm-pwa body { height: 100dvh; display: flex; flex-direction: column; margin: 0; background: #f9f9f8; }
#auth-gate {
  flex: 1 1 auto;
  box-sizing: border-box;
  min-height: 0;
  margin: 0;
  padding: clamp(.75rem, 4dvh, 3rem) clamp(1rem, 4vw, 3rem);
  align-items: center;
  justify-content: safe center;
  overflow: auto;
  text-align: center;
  font-family: 'Exo 2', sans-serif;
}
#auth-gate > * { flex: none; max-width: min(100%, 35rem); }
#auth-gate h1 { font-family: Tektur, sans-serif; }
#staff-web-login, #staff-web-toolbar button { padding: .65rem 1rem; border: 1px solid #141616; border-radius: 1rem; background: #141616; color: white; text-decoration: none; cursor: pointer; }
#staff-web-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .65rem; box-sizing: border-box; min-height: 60px; padding: .45rem 1rem; border-bottom: 1px solid #e2e4e3; font-family: 'Exo 2', sans-serif; }
#staff-web-toolbar label {
  --picker-bg: #fff;
  --picker-hover: #f0f1f0;
  --picker-line: #e2e4e3;
  --picker-label: #596165;
  --picker-value: #141616;
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  padding-inline-start: .8rem;
  border: 1px solid var(--picker-line);
  border-radius: .85rem;
  background: var(--picker-bg);
  color: var(--picker-label);
}
#staff-web-toolbar label:hover { background: var(--picker-hover); }
#staff-web-toolbar label::after {
  content: '';
  position: absolute;
  inset-inline-end: .9rem;
  top: 50%;
  width: .42rem;
  height: .42rem;
  border-inline-end: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
#staff-web-toolbar select {
  appearance: none;
  min-width: 0;
  min-height: 2.55rem;
  max-width: 45vw;
  padding: .4rem 2rem .4rem .64rem;
  border: 0;
  border-inline-start: 1px solid var(--picker-line);
  border-radius: 0 .8rem .8rem 0;
  background: transparent;
  color: var(--picker-value);
  font: 600 1rem 'Exo 2', sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
#staff-web-toolbar option { background: var(--picker-bg); color: var(--picker-value); }
#staff-web-toolbar :focus-visible, #staff-web-login:focus-visible { outline: 2px solid #42619a; outline-offset: 3px; }
#staff-web-toolbar select:focus-visible { outline-offset: -2px; }
#staff-web-toolbar[hidden], #auth-gate[hidden], #workspace[hidden], #staff-web-login[hidden] { display: none !important; }
#workspace { flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
html.grimm-pwa #workspace .phone { height: 100% !important; min-height: 0; max-width: none; }
html.grimm-pwa #workspace .phone .nav, #workspace .sc-call-actions, #workspace [data-sc="room-management"], #workspace [data-cf="audio-call"], #workspace [data-cf="video-call"] { display: none !important; }
html.grimm-pwa #workspace .phone .staff-shell > .sc[data-sc-screen="inbox"] { padding-bottom: env(safe-area-inset-bottom, 0px) !important; }
@media (prefers-color-scheme: dark) {
  #staff-web-toolbar { color: #f6f6f4; background: #111315; border-bottom-color: #25282a; }
  #staff-web-toolbar label {
    --picker-bg: #1b1f21;
    --picker-hover: #22282a;
    --picker-line: #363e41;
    --picker-label: #aeb8bb;
    --picker-value: #f6f6f4;
    color-scheme: dark;
  }
}
@media (forced-colors: active) {
  #staff-web-toolbar select { appearance: auto; padding-inline-end: .45rem; }
  #staff-web-toolbar label::after { display: none; }
}
@media (max-height: 400px) {
  #auth-gate { gap: .55rem; }
  #auth-gate img { width: 2.5rem; height: 2.5rem; }
  #auth-gate p { margin-block: .4rem; }
}
@media (max-width: 440px) { #staff-web-toolbar label { font-size: .85rem; } #staff-web-toolbar { padding-inline: .5rem; } }
@media (max-width: 360px) {
  #staff-web-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #staff-web-toolbar label { grid-row: 2; grid-column: 1 / -1; }
  #staff-web-toolbar select { flex: 1; max-width: none; }
}

.staff-web-sidebar, .staff-web-chat-placeholder { display: none; }

@media (min-width: 850px) {
  #workspace {
    display: grid;
    grid-template-columns: clamp(17rem, 27vw, 24rem) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    --web-surface: #f9f9f8;
    --web-raised: #fff;
    --web-text: #141616;
    --web-secondary: #5e6466;
    --web-line: #e2e4e3;
    --web-selected: #e5ebef;
  }
  #workspace > .stage { grid-area: 1 / 2; min-width: 0; min-height: 0; }
  #workspace[data-web-room-picker] > .stage { visibility: hidden; }
  #workspace[data-web-room-picker] > .staff-web-chat-placeholder {
    display: grid;
    grid-area: 1 / 2;
    place-items: center;
    color: var(--web-secondary);
    background: var(--web-surface);
    font: 500 1rem 'Exo 2', sans-serif;
  }
  .staff-web-sidebar {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-inline-end: 1px solid var(--web-line);
    color: var(--web-text);
    background: var(--web-raised);
    font: .9rem 'Exo 2', sans-serif;
  }
  .staff-web-sidebar-header { flex: none; padding: 1rem .85rem .7rem; border-bottom: 1px solid var(--web-line); }
  .staff-web-sidebar-header input {
    width: 100%; height: 2.65rem; padding-inline: .7rem;
    border: 1px solid var(--web-line); border-radius: .65rem; background: var(--web-surface); color: inherit; font: inherit;
  }
  .staff-web-sidebar-tabs { display: flex; align-items: center; gap: .3rem; margin-top: .65rem; }
  .staff-web-sidebar-tabs button {
    min-height: 2.3rem; padding: .25rem .6rem; border: 0; border-radius: .45rem;
    background: transparent; color: inherit; font: inherit; cursor: pointer;
  }
  .staff-web-sidebar-tabs button[aria-pressed="true"], .staff-web-room-list .sc-room[aria-current="true"] { background: var(--web-selected); }
  .staff-web-sidebar-tabs [data-new-chat] { margin-inline-start: auto; }
  .staff-web-sidebar-tabs button:disabled { cursor: default; opacity: .55; }
  .staff-web-room-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: .45rem .55rem; }
  .staff-web-room-list .sc-room { color: inherit; border-radius: .62rem; }
  .staff-web-room-list :is(.sc-preview, small), .staff-web-sidebar-empty { color: var(--web-secondary); }
  .staff-web-sidebar-empty { margin: 1.1rem .45rem; }
  .staff-web-sidebar :focus-visible { outline: 2px solid #42619a; outline-offset: -2px; }
  html.grimm-pwa #workspace .sc-messages { width: min(100%, 58rem); margin-inline: auto; }
  html.grimm-pwa #workspace .sc-composer { padding-inline: max(1rem, calc((100% - 56rem) / 2)); }
}

@media (min-width: 850px) and (prefers-color-scheme: dark) {
  #workspace {
    --web-surface: #17191b;
    --web-raised: #111315;
    --web-text: #f6f6f4;
    --web-secondary: #aeb4b7;
    --web-line: #2b2e30;
    --web-selected: #293a45;
  }
}
