:root{color-scheme:dark;--bg:#111413;--panel:#181d1b;--panel2:#1e2421;--line:#2b332f;--text:#f1f0ea;--muted:#9aa59f;--petrol:#287c78;--danger:#d67f72}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:"Avenir Next",Avenir,Inter,system-ui,sans-serif}button,textarea,input,select{font:inherit}button{cursor:pointer}
.shell{display:grid;grid-template-columns:280px minmax(0,1fr) 300px;min-height:100vh}.sidebar,.inspector{background:#141816}.sidebar{border-right:1px solid var(--line);padding:24px 18px;display:flex;flex-direction:column}.inspector{border-left:1px solid var(--line);padding:24px 18px}
.brand{display:flex;gap:12px;align-items:center;margin-bottom:24px}.brandmark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--petrol);font-weight:800}.brand strong,.brand span{display:block}.brand span{font-size:12px;color:var(--muted)}
.primary{background:var(--petrol);border:1px solid var(--petrol);color:white;border-radius:11px;padding:11px 15px;font-weight:700}.full{width:100%}.label{margin:28px 8px 10px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.1em}
#conversationList{display:flex;flex-direction:column;gap:4px;overflow:auto}.conv{border:0;background:transparent;color:var(--text);padding:10px 11px;border-radius:10px;text-align:left}.conv:hover,.conv.active{background:var(--panel2)}.conv b,.conv span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conv span{font-size:11px;color:var(--muted);margin-top:4px}
.sideStatus{margin-top:auto;border-top:1px solid var(--line);padding-top:14px;color:var(--muted);font-size:12px}.sideStatus div{margin:8px}.sideStatus i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#59615d;margin-right:7px}.sideStatus i.ok{background:#5fc58a}.sideStatus i.bad{background:var(--danger)}
main{min-width:0;display:flex;flex-direction:column;min-height:100vh}header{height:92px;border-bottom:1px solid var(--line);padding:20px 32px;display:flex;justify-content:space-between}header small{color:var(--muted);text-transform:uppercase;letter-spacing:.1em}h1{font-size:22px;margin:5px 0}.square{width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:var(--panel);color:var(--muted)}
.empty{margin:auto;max-width:720px;padding:48px 32px 180px;text-align:center}.hero{width:58px;height:58px;margin:0 auto 18px;border-radius:18px;display:grid;place-items:center;background:#287c7830;font-size:30px}.empty h2{font-size:30px;margin:0 0 10px}.empty>p{color:var(--muted);line-height:1.6}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:32px;text-align:left}.cards div{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.cards b,.cards span{display:block}.cards span{color:var(--muted);font-size:11px;margin-top:5px}
.timeline{padding:28px 32px 190px;overflow:auto}.hidden{display:none!important}.msg{max-width:860px;margin:0 auto 20px}.msg .who{font-size:11px;color:var(--muted);margin-bottom:7px}.bubble{white-space:pre-wrap;line-height:1.55;font-size:14px}.user .bubble{margin-left:auto;max-width:78%;padding:14px 16px;background:#222925;border:1px solid #343e39;border-radius:14px}.status{font-size:10px;border:1px solid var(--line);padding:3px 7px;border-radius:999px;margin-left:7px}.error{margin-top:8px;padding:12px;border:1px solid #6f3f39;border-radius:12px;color:#f0b3aa}
.composerWrap{position:fixed;left:280px;right:300px;bottom:0;padding:18px 32px 24px;background:linear-gradient(180deg,transparent,var(--bg) 25%)}#composer{max-width:900px;margin:auto;border:1px solid #37413c;background:#1b211e;border-radius:16px;overflow:hidden}textarea{width:100%;resize:vertical;min-height:84px;max-height:300px;border:0;outline:0;padding:16px;background:transparent;color:var(--text)}.composerFoot{display:flex;justify-content:space-between;align-items:center;padding:8px 10px 10px 16px}.composerFoot span{font-size:11px;color:var(--muted)}
.panel{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:16px;margin-bottom:12px}.panel h3{margin:0 0 14px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.1em}.panel p{display:flex;justify-content:space-between;font-size:12px}.panel p span,.muted,.note{color:var(--muted)}.note{font-size:11px;line-height:1.55}
#toast{position:fixed;right:22px;bottom:22px;background:#242b27;border:1px solid var(--line);padding:11px 14px;border-radius:10px;opacity:0;transition:.2s;z-index:50}#toast.show{opacity:1}
@media(max-width:1100px){.shell{grid-template-columns:240px minmax(0,1fr)}.inspector{display:none}.composerWrap{left:240px;right:0}}
@media(max-width:760px){.shell{display:block}.sidebar{min-height:auto;padding:14px;border-right:0;border-bottom:1px solid var(--line)}.label,#conversationList,.sideStatus{display:none}header{height:78px;padding:16px 18px}.empty{padding:36px 18px 180px}.cards{grid-template-columns:1fr}.timeline{padding:20px 18px 180px}.composerWrap{left:0;right:0;padding:14px}.composerFoot span{display:none}}

.secondary{display:inline-block;text-align:center;background:transparent;border:1px solid var(--line);color:var(--text);border-radius:11px;padding:10px 14px;font-weight:650;text-decoration:none}.navLink{margin-top:8px}
.botsShell{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}.botsMain{min-width:0}.botsContent{max-width:1000px;padding:28px 32px 60px}.botList{display:flex;flex-direction:column;gap:6px}.botChoice{border:1px solid transparent;background:transparent;color:var(--text);border-radius:10px;padding:11px;text-align:left}.botChoice.active,.botChoice:hover{background:var(--panel2);border-color:var(--line)}.botChoice span{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}.field.full{grid-column:1/-1}.field label{color:var(--muted);font-size:12px;font-weight:650}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:10px;padding:11px 12px;outline:none}.field textarea{min-height:120px;resize:vertical}.field textarea.tall{min-height:220px}.field small{color:var(--muted);line-height:1.45}.toggleRow{display:flex;align-items:center;gap:10px;margin:4px 0 18px;color:var(--text)}.toggleRow input{width:18px;height:18px}.adminActions{display:flex;gap:10px;align-items:center;margin:18px 0 28px}.previewBox{border-top:1px solid var(--line);padding-top:24px;margin-top:12px}.previewOutput{min-height:100px;white-space:pre-wrap;line-height:1.55;background:#151a18;border:1px solid var(--line);border-radius:12px;padding:14px;color:var(--text)}.infoStrip{border:1px solid #315753;background:#287c7818;border-radius:12px;padding:12px 14px;color:#b7d6d2;font-size:12px;line-height:1.5;margin-bottom:22px}
@media(max-width:760px){.botsShell{display:block}.botsShell .sidebar{display:none}.botsContent{padding:20px 16px 50px}.formGrid{grid-template-columns:1fr}.field.full{grid-column:auto}}

.ghost{background:transparent;border:1px solid transparent;color:var(--muted);border-radius:9px}.ghost:hover{border-color:var(--line);color:var(--text)}.compact{padding:7px 10px;font-size:11px}.pill{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:4px 8px;color:var(--muted);font-size:11px}
.filesShell{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}.filesMain{min-width:0}.filesContent{padding:28px 32px 70px;max-width:1200px}.workspaceGrid{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;margin-bottom:14px}.workspaceCard{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:18px}.sectionHead{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.sectionHead small{color:var(--muted);text-transform:uppercase;letter-spacing:.09em;font-size:10px}.sectionHead h2{font-size:18px;margin:4px 0 0}.dropZone{min-height:150px;border:1px dashed #45605a;border-radius:13px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:22px;background:#121715;transition:.15s;cursor:pointer}.dropZone:hover,.dropZone.dragging{border-color:var(--petrol);background:#287c7814}.dropZone strong{font-size:15px}.dropZone span{margin-top:7px;color:var(--muted);font-size:11px}.miniStatus{min-height:18px;margin-top:9px;font-size:11px}.checkpointForm{display:flex;flex-direction:column;gap:10px}.checkpointForm input,.checkpointForm textarea{border:1px solid var(--line);background:#121715;color:var(--text);border-radius:10px;padding:11px 12px;outline:none}.checkpointForm textarea{min-height:72px}.fileList,.checkpointList{display:flex;flex-direction:column}.fileRow,.checkpointRow{display:flex;align-items:center;gap:14px;padding:13px 4px;border-top:1px solid var(--line)}.fileRow:first-child,.checkpointRow:first-child{border-top:0}.fileIcon{width:46px;height:46px;flex:0 0 46px;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;background:#121715;color:#9dc3bf;font-size:9px;font-weight:800}.fileInfo{min-width:0;flex:1}.fileInfo b,.fileInfo span,.fileInfo small,.checkpointRow b,.checkpointRow span{display:block}.fileInfo b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fileInfo span,.fileInfo small,.checkpointRow span{color:var(--muted);font-size:11px;margin-top:4px}.fileInfo small{font-size:10px}.fileActions{display:flex;gap:6px;align-items:center}.checkpointRow{justify-content:space-between;align-items:flex-start}.checkpointRow p{margin:7px 0 0;color:#c7cec9;font-size:12px;white-space:pre-wrap}.emptyList{padding:22px 4px}.fileListCard,.checkpointListCard{margin-top:14px}
@media(max-width:1100px){.filesShell{grid-template-columns:240px minmax(0,1fr)}}
@media(max-width:760px){.filesShell{display:block}.filesShell .sidebar{display:none}.filesContent{padding:20px 16px 50px}.workspaceGrid{grid-template-columns:1fr}.fileRow{align-items:flex-start;flex-wrap:wrap}.fileInfo{min-width:calc(100% - 64px)}.fileActions{width:100%;padding-left:60px}}

.composerOptions{display:flex;align-items:center;gap:8px;min-width:0}.composerOptions label{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.composerOptions select{max-width:190px;border:1px solid var(--line);background:#151a18;color:var(--text);border-radius:9px;padding:7px 28px 7px 9px;outline:none}.modelTag{font-size:10px;border:1px solid #315753;background:#287c7812;color:#a7cfca;padding:3px 7px;border-radius:999px;margin-left:5px}
@media(max-width:760px){.composerOptions label,.composerOptions>span{display:none}.composerOptions select{max-width:160px}}

.modelChoices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.modelChoice{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:11px;padding:11px;background:#151a18}.modelChoice input{margin-top:3px}.modelChoice span,.modelChoice b,.modelChoice small{display:block}.modelChoice small{color:var(--muted);margin-top:3px}.inlineToggle{margin:9px 0 0}
@media(max-width:760px){.modelChoices{grid-template-columns:1fr}}

.accessCard{margin-bottom:14px}.accessMaster{font-weight:700}.hardRules{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:10px}.hardRules div{border:1px solid var(--line);background:#121715;border-radius:11px;padding:12px}.hardRules b,.hardRules span{display:block}.hardRules span{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.4}.permissionGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.permissionItem{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:11px;padding:12px;background:#151a18}.permissionItem input{margin-top:4px}.permissionItem span,.permissionItem b,.permissionItem small,.permissionItem code{display:block}.permissionItem small{color:var(--muted);margin-top:4px;line-height:1.4}.permissionItem code{color:#7fa9a5;font-size:10px;margin-top:7px;word-break:break-all}.goodPill{border-color:#315753;color:#a7cfca}.warningStrip{border-color:#66583a;background:#6f5a201a;color:#d9c993}
@media(max-width:760px){.hardRules,.permissionGrid{grid-template-columns:1fr}}

.authBody{min-height:100vh;display:grid;place-items:center;padding:24px}.authCard{width:min(460px,100%);border:1px solid var(--line);background:var(--panel);border-radius:18px;padding:28px}.authBrand{margin-bottom:28px}.authCard h1{font-size:26px;margin:0 0 10px}.authIntro{line-height:1.55;margin:0 0 22px}.authMessage{min-height:22px;margin:12px 2px 0;font-size:12px}.passkeyList{display:flex;flex-direction:column}.passkeyRow{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:13px 4px;border-top:1px solid var(--line)}.passkeyRow:first-child{border-top:0}.passkeyRow b,.passkeyRow span,.passkeyRow small{display:block}.passkeyRow span,.passkeyRow small{color:var(--muted);font-size:11px;margin-top:4px}.passkeyRow button:disabled{opacity:.35;cursor:not-allowed}


/* Owner access toggles */
.masterSwitch{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid var(--line);border-radius:12px;padding:14px;background:#121715;margin:8px 0 14px}.masterSwitch>span{min-width:0}.masterSwitch b,.masterSwitch small{display:block}.masterSwitch small{color:var(--muted);font-size:11px;line-height:1.45;margin-top:4px}.switchWrap{display:flex;align-items:center;gap:9px;flex:0 0 auto;cursor:pointer}.switchInput{appearance:none;-webkit-appearance:none;width:52px!important;height:28px!important;min-width:52px;border:1px solid #8e5149!important;border-radius:999px!important;background:#6f3f39!important;padding:0!important;position:relative;cursor:pointer;outline:none;transition:background .16s,border-color .16s}.switchInput::before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0006;transition:transform .16s}.switchInput:checked{background:#2f7f55!important;border-color:#53ad79!important}.switchInput:checked::before{transform:translateX(24px)}.switchInput:focus-visible{outline:3px solid #8dc9c4;outline-offset:2px}.switchState{min-width:30px;font-size:11px;font-weight:800;letter-spacing:.05em;color:#e5a49b}.switchInput:checked+.switchState{color:#8ed4aa}.compactSwitch{align-self:center}.permissionSwitch{align-items:center;justify-content:space-between}.permissionSwitch>span:first-child{min-width:0;flex:1}.permissionsHead{margin-top:20px}.dangerPill{border-color:#6f3f39;color:#f0a59b}.stickyAdminActions{position:sticky;bottom:0;z-index:10;background:linear-gradient(180deg,transparent,var(--bg) 24%);padding:24px 0 10px;margin-bottom:8px}.emergencySwitch{border-color:#4a423d}
@media(max-width:760px){.masterSwitch{align-items:flex-start}.permissionSwitch{align-items:flex-start}.permissionSwitch .switchWrap{margin-top:2px}.stickyAdminActions{padding-bottom:12px}}


/* Deployment approvals */
.deploymentListCard{margin-top:14px}.deploymentTarget{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.deploymentTarget>div{border:1px solid var(--line);background:#121715;border-radius:11px;padding:12px}.deploymentTarget b,.deploymentTarget span{display:block}.deploymentTarget span{margin-top:4px;font-size:11px;color:var(--muted);word-break:break-word}.deployRequestList{display:flex;flex-direction:column;gap:10px}.deployRequest{border:1px solid var(--line);background:#121715;border-radius:13px;padding:14px}.deployRequestHead{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.deployRequestHead small{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-size:10px}.deployRequestHead h3{margin:4px 0 0;font-size:16px}.deployMeta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.deployMeta>div{border:1px solid var(--line);border-radius:10px;padding:10px;background:#151a18}.deployMeta dt{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.07em}.deployMeta dd{margin:5px 0 0;font-size:12px;word-break:break-word}.deployMeta .fullMeta{grid-column:1/-1}.deployActions{display:flex;gap:8px;flex-wrap:wrap}.goodText{color:#8ed4aa!important}.dangerText{color:#efa79d!important}
@media(max-width:760px){.deploymentTarget,.deployMeta{grid-template-columns:1fr}.deployMeta .fullMeta{grid-column:auto}.deployRequestHead{flex-direction:column}}


.deployWatchBadge{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:9999;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:9px 12px;
  border:1px solid rgba(199,111,97,.45);
  border-radius:999px;
  background:rgba(17,20,19,.96);
  color:#fff;
  text-decoration:none;
  box-shadow:0 14px 36px rgba(0,0,0,.28);
  backdrop-filter:blur(12px);
}
.deployWatchBadge.hidden{display:none}
.deployWatchDot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#C76F61;
  box-shadow:0 0 0 4px rgba(199,111,97,.14);
}
.deployWatchText{font-size:13px;font-weight:700}
.deployWatchCount{
  display:inline-grid;
  place-items:center;
  min-width:24px;
  height:24px;
  padding:0 6px;
  border-radius:999px;
  background:#287C78;
  font-size:12px;
}
.notificationControls{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.notificationControls small{color:var(--muted)}
.autoRefreshState{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  color:var(--muted);
}
.autoRefreshState::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#287C78;
}


/* PWA install + mobile owner shell */
.pwaInstallDesktop{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:9000;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:9px 13px;
  border:1px solid #315753;
  border-radius:999px;
  background:rgba(20,24,22,.96);
  color:var(--text);
  box-shadow:0 12px 34px rgba(0,0,0,.3);
  backdrop-filter:blur(12px);
  font-size:12px;
  font-weight:750;
}
.pwaInstallDesktop>span:first-child{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#287c7830;
  color:#a7cfca;
  font-size:16px;
}
.mobileNav,.mobileSheetBackdrop,.mobileMoreSheet,.installGuideBackdrop,.installGuide,.mobileHeaderAction{display:none}

@media(max-width:760px){
  html,body{min-height:100%;min-height:100dvh}
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  .shell{display:block;min-height:100dvh}
  .shell>.sidebar{display:none}
  .shell main,.botsMain,.filesMain{min-height:calc(100dvh - 64px)}
  header{
    position:sticky;
    top:0;
    z-index:30;
    height:auto;
    min-height:72px;
    padding:calc(12px + env(safe-area-inset-top)) 14px 12px;
    gap:8px;
    align-items:center;
    background:rgba(17,20,19,.96);
    backdrop-filter:blur(14px);
  }
  header>div{min-width:0;flex:1}
  header h1{
    font-size:19px;
    line-height:1.2;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  header small{font-size:9px}
  .mobileHeaderAction{display:inline-grid;place-items:center;flex:0 0 auto;font-size:20px}
  .empty{padding:34px 16px 238px}
  .empty h2{font-size:26px}
  .timeline{padding:18px 14px 238px}
  .msg{margin-bottom:16px}
  .user .bubble{max-width:88%}
  .bubble{font-size:15px}
  .composerWrap{
    left:0;
    right:0;
    bottom:calc(64px + env(safe-area-inset-bottom));
    padding:10px 10px 12px;
    background:linear-gradient(180deg,transparent,var(--bg) 18%);
    z-index:25;
  }
  #composer{border-radius:14px}
  #composer textarea{min-height:68px;max-height:180px;font-size:16px;padding:13px 14px}
  .composerFoot{padding:7px 8px 8px 12px;gap:8px}
  .composerOptions select{font-size:16px;max-width:155px}
  .composerFoot .primary{min-height:42px;padding:9px 14px}
  .botsContent,.filesContent{
    padding:16px 12px calc(88px + env(safe-area-inset-bottom));
    max-width:none;
  }
  .workspaceCard{padding:14px;border-radius:13px}
  .sectionHead{gap:10px}
  .sectionHead h2{font-size:17px}
  .infoStrip{font-size:12px;margin-bottom:14px}
  .field input,.field select,.field textarea,
  .checkpointForm input,.checkpointForm textarea{
    font-size:16px;
  }
  .primary,.secondary,.deployActions button,.adminActions button{min-height:44px}
  .adminActions{flex-wrap:wrap}
  .deployActions{display:grid;grid-template-columns:1fr}
  .deployActions button{width:100%}
  .notificationControls{align-items:stretch}
  .notificationControls button{width:100%}
  .deploymentTarget>div,.deployMeta>div{padding:11px}
  .fileActions{padding-left:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .fileActions>*{min-height:42px}
  .checkpointRow{gap:12px}
  .masterSwitch{padding:12px;gap:12px}
  .switchWrap{min-height:40px}
  .pwaInstallDesktop{display:none!important}

  .mobileNav{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:8000;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    min-height:64px;
    padding:6px 6px max(6px,env(safe-area-inset-bottom));
    border-top:1px solid var(--line);
    background:rgba(17,20,19,.97);
    backdrop-filter:blur(18px);
    box-shadow:0 -10px 28px rgba(0,0,0,.2);
  }
  .mobileNavItem{
    min-width:0;
    min-height:50px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    padding:5px 2px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:var(--muted);
    text-decoration:none;
    font-size:9px;
    font-weight:700;
  }
  .mobileNavItem.active{color:#b8dad6;background:#287c7817}
  .mobileNavIcon{font-size:18px;line-height:1}
  .mobileMoreButton{font-family:inherit}

  .mobileSheetBackdrop,.installGuideBackdrop{
    position:fixed;
    inset:0;
    z-index:8100;
    display:block;
    border:0;
    background:rgba(0,0,0,.52);
    padding:0;
  }
  .mobileMoreSheet{
    position:fixed;
    left:8px;
    right:8px;
    bottom:calc(70px + env(safe-area-inset-bottom));
    z-index:8200;
    display:block;
    max-height:min(520px,70dvh);
    overflow:auto;
    padding:10px 14px 16px;
    border:1px solid var(--line);
    border-radius:20px;
    background:#181d1b;
    box-shadow:0 22px 60px rgba(0,0,0,.45);
  }
  .mobileSheetHandle{
    width:38px;
    height:4px;
    margin:0 auto 10px;
    border-radius:999px;
    background:#46504b;
  }
  .mobileSheetHead{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
  }
  .mobileSheetHead small{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.1em}
  .mobileSheetHead h2{margin:3px 0 0;font-size:20px}
  .mobileSheetLinks{display:flex;flex-direction:column;gap:8px}
  .mobileSheetLinks>a,.pwaInstallAction{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    min-height:52px;
    padding:12px 13px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#121715;
    color:var(--text);
    text-decoration:none;
    text-align:left;
  }
  .pwaInstallAction{
    border-color:#315753;
    background:#287c7812;
  }
  .pwaInstallAction>span:first-child{
    display:grid;
    place-items:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    border-radius:10px;
    background:#287c7830;
    color:#a7cfca;
    font-size:19px;
  }
  .pwaInstallAction b,.pwaInstallAction small{display:block}
  .pwaInstallAction small{margin-top:3px;color:var(--muted);font-size:10px;line-height:1.35}

  .installGuideBackdrop{z-index:8300}
  .installGuide{
    position:fixed;
    left:8px;
    right:8px;
    bottom:calc(8px + env(safe-area-inset-bottom));
    z-index:8400;
    display:block;
    padding:10px 16px 18px;
    border:1px solid var(--line);
    border-radius:20px;
    background:#181d1b;
    box-shadow:0 22px 60px rgba(0,0,0,.5);
  }
  .installGuide p,.installGuide>small{color:var(--muted);line-height:1.5}
  .installGuide>small{display:block;font-size:10px}
  .installSteps{margin:16px 0;padding-left:22px}
  .installSteps li{margin:10px 0;line-height:1.45}

  .deployWatchBadge{
    right:10px;
    bottom:calc(74px + env(safe-area-inset-bottom));
    max-width:calc(100vw - 20px);
  }
  #toast{
    left:10px;
    right:10px;
    bottom:calc(76px + env(safe-area-inset-bottom));
    text-align:center;
  }
}

@media(max-width:420px){
  .mobileNavItem{font-size:8px}
  .mobileNavIcon{font-size:17px}
  .sectionHead{flex-direction:column;align-items:flex-start}
  .sectionHead>.pill,.sectionHead>.autoRefreshState{align-self:flex-start}
}

@media(display-mode:standalone){
  body{overscroll-behavior-y:none}
}


.notificationChannelRow{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.notificationChannelRow>div{display:flex;flex-direction:column;gap:4px}
.notificationChannelRow small{color:var(--muted)}
.deployRequestFocused{
  border-color:#5fa7a1;
  box-shadow:0 0 0 2px rgba(40,124,120,.22),0 14px 34px rgba(0,0,0,.18);
}
.whatsappReturnPanel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-color:#315753;
}
.whatsappReturnPanel h2{margin:4px 0 6px}
.whatsappReturnPanel p{margin:0}
.whatsappReturnPanel .primary{flex:0 0 auto;text-decoration:none}

@media(max-width:760px){
  .notificationChannelRow,.whatsappReturnPanel{
    align-items:stretch;
    flex-direction:column;
  }
  .whatsappReturnPanel .primary{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
  }
}
