.workspace-shell,.workspace-shell *,.workspace-shell *::before,.workspace-shell *::after{box-sizing:border-box}
/* Shared workspace structure. Page-specific forms retain their IDs and behavior. */
body.workspace-shell{margin:0;padding-top:68px;padding-left:252px;font:15px/1.5 var(--font,system-ui,sans-serif);color:var(--text);background:var(--bg)}
.workspace-shell main{width:100%;max-width:1320px;margin:0 auto;padding:30px 32px 70px;min-width:0}
.workspace-shell .shell-topbar{position:fixed;inset:0 0 auto;z-index:50;height:68px;display:flex;align-items:center;gap:20px;padding:12px 24px;background:var(--surface);border-bottom:1px solid var(--border)}
.shell-brand{font-size:22px;font-weight:750;text-decoration:none;color:var(--text)}.shell-page-name{color:var(--muted);flex:1}.shell-topbar #session-name{font-size:14px}.shell-topbar [data-local-only]{font-size:12px}
.workspace-shell .shell-navigation{position:fixed;inset:68px auto 0 0;width:252px;padding:18px 14px;overflow:auto;background:var(--surface);border-right:1px solid var(--border);z-index:45}
.shell-navigation .shell-group{border:0;margin:0 0 16px;background:none;padding:0}.workspace-shell .shell-navigation .shell-group h2{margin:0;font-size:12px;font-weight:750;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:10px 12px}.shell-navigation a{display:block;color:var(--muted);text-decoration:none;padding:10px 12px;border-radius:8px;margin:3px 0;line-height:1.4;min-height:42px}.shell-navigation a:hover{background:var(--raised)}.shell-navigation a[aria-current]{background:var(--bg);color:var(--accentText);font-weight:700}
.workspace-shell h1{font-size:28px;line-height:1.25;margin:0 0 14px}.workspace-shell h2{font-size:20px;line-height:1.3}.workspace-shell h3{font-size:16px}.workspace-shell button{min-height:42px;width:auto;line-height:1.35;padding:10px 16px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);cursor:pointer;max-width:100%;overflow-wrap:anywhere}.workspace-shell button:hover:not(:disabled){background:var(--bg)}.workspace-shell button:disabled{cursor:not-allowed;opacity:.5}
.workspace-shell form button:not([type=button]),.workspace-shell #publish,.workspace-shell #save,.workspace-shell #complete{background:var(--accent);color:var(--onAccent);border-color:var(--accent)}.workspace-shell button.secondary{background:var(--raised);color:var(--text)}.workspace-shell :focus-visible{outline:3px solid var(--control);outline-offset:3px}.workspace-shell input:not([type=checkbox]):not([type=radio]),.workspace-shell select,.workspace-shell textarea{font:inherit;min-height:42px;max-width:100%;border-radius:8px;border:1px solid var(--border);padding:9px 12px;background:var(--surface);color:inherit}.workspace-shell input[type=checkbox]{accent-color:var(--border)}
.workspace-shell dialog{border:1px solid var(--border);border-radius:16px;padding:26px;width:min(780px,94vw);max-height:90dvh;margin:auto;box-shadow:0 20px 70px var(--shadow)}.workspace-shell dialog::backdrop{background:var(--overlay)}.workspace-shell section,.workspace-shell article{min-width:0}.workspace-shell table{font-size:14px}.workspace-shell th{background:var(--raised)}.workspace-shell td{vertical-align:middle}.workspace-shell .scroll{overflow:auto}.workspace-shell .row,.workspace-shell .top{gap:16px}.workspace-shell .top{align-items:flex-start}.workspace-shell .top>div{min-width:0}.workspace-shell .top button{margin:6px 6px 0 0}
.shell-fold{border:1px solid var(--border);border-radius:10px;background:var(--surface);margin:14px 0;padding:0 16px}.shell-fold>summary{cursor:pointer;font-weight:650;padding:14px 0;min-height:46px}.shell-fold>form{padding-bottom:16px}.shell-fold section{border:0;padding:10px 0;margin:0}.shell-metrics{margin:12px 0}.shell-metrics:has(>section[hidden]){display:none}.workspace-shell .shell-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 20px;border-bottom:1px solid var(--border);padding-bottom:12px}.shell-tabs a{padding:9px 16px;text-decoration:none;border-radius:8px;color:var(--muted)}.shell-tabs a[aria-current]{background:var(--raised);color:var(--accentText)}.shell-panel-inactive{display:none!important}.workspace-shell #workspace>.grid{display:block}.workspace-shell #workspace .grid>.card{width:100%}
.shell-tools{margin-top:32px;border-top:1px solid var(--border);padding:16px 0;color:var(--muted)}.shell-tools>summary{cursor:pointer}.shell-tools button{position:static!important;margin:12px 8px 0 0!important}.shell-tools p{font-size:14px}.shell-skip{position:fixed;left:16px;top:-80px;z-index:10000;padding:12px;background:var(--surface)}.shell-skip:focus{top:10px}
@media(max-width:900px){body.workspace-shell{padding-left:0}.workspace-shell .shell-topbar{padding:10px 14px;gap:12px}.shell-page-name{display:none}.shell-brand{flex:1;font-size:20px}.workspace-shell .shell-topbar #session-name{display:none}.workspace-shell main{padding:24px 16px 50px}.workspace-shell .grid{grid-template-columns:1fr}.workspace-shell dialog{padding:20px}.workspace-shell .top select{min-width:0}.workspace-shell .top{display:block}}

.workspace-shell .top{flex-direction:column;align-items:stretch}.workspace-shell .top>div:last-child{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.workspace-shell .top>div:last-child>label{min-width:250px;flex:1;margin:0}.workspace-shell .top>div:last-child button{margin:0}.workspace-shell #workspace .card:has(>.shell-fold){padding:4px 18px}.workspace-shell #workspace .card>.shell-fold{border:0;margin:0;padding:0}

@media(max-width:900px){.workspace-shell .shell-topbar [data-local-only]{display:none!important}.workspace-shell .shell-topbar button{flex-shrink:0;white-space:nowrap}}

/* Five primary destinations; secondary sections stay in the same searchable menu. */
.shell-bottom{display:none}.shell-search{display:block;padding:4px 8px 12px;font-size:13px;font-weight:600}.shell-search input{width:100%;margin-top:6px;box-sizing:border-box}.shell-navigation [hidden],.shell-navigation .shell-filter-empty{display:none!important}.shell-search-empty{padding:8px 12px;color:var(--muted)}
@media(max-width:900px){
 .workspace-shell main{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
 .workspace-shell .shell-bottom{position:fixed;inset:auto 0 0;z-index:85;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:6px max(4px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px));background:var(--surface);border-top:1px solid var(--border);box-shadow:0 -4px 18px var(--shadow)}
 .workspace-shell .shell-bottom>a,.workspace-shell .shell-bottom>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:54px;margin:0;padding:5px 2px;border:0;border-radius:9px;color:var(--muted);background:transparent;text-decoration:none;font:11px/1.3 system-ui;overflow-wrap:normal}
 .shell-bottom svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 .workspace-shell .shell-bottom [aria-current],.workspace-shell .shell-bottom [aria-expanded=true],.workspace-shell .shell-bottom .shell-current-section{color:var(--accentText);background:var(--bg);font-weight:650}
}


.shell-navigation a{display:flex;align-items:center;gap:10px}.shell-link-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;min-width:18px;color:var(--muted);font-size:17px;line-height:1}.shell-navigation a[aria-current] .shell-link-icon{color:inherit}

/* Hidden controls must stay hidden even when page styles set display on labels. */
[hidden]{display:none!important}
/* Keep focused controls clear of the fixed header and mobile navigation. */
.workspace-shell :is(button,input,select,textarea,a,summary){scroll-margin-block:84px 100px}

.shell-profile-setup{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:20px;margin:0 0 20px}.shell-profile-setup h2{margin:0 0 8px}.shell-profile-setup p{margin:8px 0}.shell-profile-setup form{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.shell-profile-setup label{display:grid;gap:4px;flex:1 1 200px}.shell-profile-setup input{width:100%}.shell-profile-setup [role=status]:empty{display:none}

/* Member records stay readable and actionable without sideways scrolling. */
@media(max-width:700px){
 .workspace-shell .member-table,.workspace-shell .member-table tbody,.workspace-shell .member-table tr{display:block;width:100%;min-width:0}
 .workspace-shell .member-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .workspace-shell .member-table tr{padding:12px 0;border-bottom:1px solid var(--border)}
 .workspace-shell .member-table td{display:block;border:0;padding:5px 0;overflow-wrap:anywhere}
 .workspace-shell .member-table td:not(:first-child):not(:last-child)::before{display:block;color:var(--muted);font-size:12px;margin-bottom:2px}
 .workspace-shell .member-table td:nth-child(2)::before{content:'Группы и метки'}
 .workspace-shell .member-table td:nth-child(3)::before{content:'Контакты'}
 .workspace-shell .member-table td:nth-child(4)::before{content:'Состояние'}
 .workspace-shell .member-table td:empty{display:none}
 .workspace-shell .member-table td:first-child{font-weight:700;font-size:16px}
 .workspace-shell .member-table td:last-child button{width:100%;margin:4px 0 0}
}

.member-dialog-heading{position:sticky;top:-24px;z-index:5;display:flex;align-items:start;justify-content:space-between;gap:12px;padding:4px 0 12px;background:var(--surface);border-bottom:1px solid var(--border)}.member-dialog-heading h2{margin:0}.workspace-shell .member-dialog-heading button{flex-shrink:0;min-width:44px;padding:8px}

.shell-profile-reminder{display:block;margin:0 0 16px}
.workspace-shell>.shell-first~header{display:none}
body.workspace-host{height:100dvh;overflow:hidden}
body.workspace-host #panel-main{position:relative;padding:0;margin:0;width:100%;max-width:none;height:calc(100dvh - 68px)}
#workspace-panel{display:block;width:100%;height:100%;border:0;background:var(--bg)}
body.workspace-host.service-workspace{display:flex;flex-direction:column}
body.workspace-host.service-workspace #panel-main{flex:1;min-height:0}
body.workspace-panel.workspace-shell{padding:0}
body.workspace-panel.workspace-shell>header{display:none}
body.workspace-panel.workspace-shell main{padding-bottom:40px}
#route-progress{position:absolute;z-index:5;inset:0 0 auto;height:3px;overflow:hidden;background:var(--raised);pointer-events:none}
#route-progress::after{content:'';display:block;width:36%;height:100%;background:var(--accent);animation:section-loading 1s linear infinite}
@keyframes section-loading{from{transform:translateX(-100%)}to{transform:translateX(280%)}}
@media(prefers-reduced-motion:reduce){#route-progress::after{animation:none;width:100%}}
#route-error:not([hidden]){position:absolute;top:6px;left:12px;right:12px;z-index:6;padding:12px;background:var(--surface);color:var(--text);border:1px solid var(--border)}


/* Shared chrome stays legible over both workspace themes. */
.workspace-host .shell-navigation .shell-group{margin:0 0 6px;padding:0 0 6px;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent}
.workspace-host .shell-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;min-height:40px;cursor:pointer;list-style:none;color:var(--muted);font-size:13px;font-weight:650}
.workspace-host .shell-group>summary::-webkit-details-marker{display:none}
.workspace-host .shell-group>summary::after{content:"";width:7px;height:7px;border-right:1.5px solid;border-bottom:1.5px solid;transform:rotate(-45deg)}
.workspace-host .shell-group[open]>summary::after{transform:rotate(45deg)}
.workspace-host .shell-navigation a{min-height:38px;margin:1px 0;padding:7px 10px}
.workspace-host .shell-navigation{scrollbar-gutter:stable}
@media(max-width:900px){
 .workspace-host .shell-navigation a,.workspace-host .shell-group>summary{min-height:44px}
}
@media(max-width:700px){
 .workspace-host .service-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding-block:8px}
 .workspace-host .service-top .shell-brand{font-size:16px;gap:6px;letter-spacing:-.035em}
 .workspace-host .service-top .shell-brand img{width:26px;height:26px}
 .workspace-host .service-top .cabinet-switch{grid-column:2;grid-row:1;padding-inline:9px;font-size:13px}
 .workspace-host .service-top strong{grid-column:1/-1;font-size:13px}
 .workspace-host .service-navigation{display:flex;flex-wrap:nowrap;gap:16px;overflow-x:auto;scroll-padding-inline:16px}
 .workspace-host .service-navigation a{flex:none;min-height:44px;padding:10px 0}
}

/* The iframe owns page padding. The outer shell allocates only the actual bars. */
body.workspace-host.workspace-shell > main#panel-main{padding:0!important;margin:0!important;min-height:0}
.shell-account-actions{display:flex;align-items:center;gap:12px}
.workspace-shell dialog.shell-sheet:not([open]){display:none}
@media(max-width:900px){
 html:has(body.workspace-host.workspace-shell){height:100%;overflow:hidden}
 body.workspace-host.workspace-shell{
   display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;
   position:fixed;inset:var(--workspace-visible-top,0px) 0 auto;
   height:100%;height:var(--workspace-visible-height,100dvh);min-height:0;
   padding:env(safe-area-inset-top,0px) 0 0;
 }
 body.workspace-shell:not(.workspace-panel) > .shell-topbar,body.workspace-shell:not(.workspace-panel) > .shell-navigation{display:none}
 body.workspace-shell:not(.workspace-host):not(.workspace-panel){padding-top:env(safe-area-inset-top,0px)}
 body.workspace-host.service-workspace{padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
 body.workspace-host.workspace-shell > main#panel-main{grid-row:1;height:100%;min-width:0;width:auto;margin-left:env(safe-area-inset-left,0px)!important;margin-right:env(safe-area-inset-right,0px)!important}
 body.workspace-host.workspace-shell > .shell-bottom{
   grid-row:2;position:relative;inset:auto;min-height:0;
   padding:3px max(4px,env(safe-area-inset-right,0px)) calc(3px + env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px));
   box-shadow:0 -1px 12px color-mix(in srgb,var(--bg) 18%,transparent)
 }
 .workspace-host .shell-bottom>a,.workspace-host .shell-bottom>button{min-height:49px}
 .workspace-shell dialog.shell-sheet[open]{
   position:fixed;inset:auto 0 max(0px,calc(100dvh - var(--workspace-visible-top,0px) - var(--workspace-visible-height,100dvh)));display:flex;flex-direction:column;
   width:min(100%,560px);max-width:100%;height:min(78dvh,660px);max-height:calc(var(--workspace-visible-height,100dvh) - env(safe-area-inset-top,0px) - 8px);
   margin:0 auto;padding:0;overflow:hidden;color:var(--text);background:var(--surface);
   border:1px solid var(--control);border-bottom:0;border-radius:24px 24px 0 0;
   box-shadow:0 -12px 40px color-mix(in srgb,var(--bg) 35%,transparent)
 }
 .workspace-shell .shell-sheet::backdrop{background:rgb(10 20 31 / .16)}
 .shell-sheet .sheet-heading{display:flex;align-items:center;gap:8px;flex:none;padding:8px 16px 0}
 .shell-sheet .sheet-heading h2{margin:0 auto 0 0;font-size:22px}
 .shell-sheet .sheet-heading button,.shell-sheet .shell-account-actions :is(button,a){min-height:44px;margin:0;padding:6px 12px;font-size:14px}
 .shell-sheet .shell-account-actions{display:flex;flex:none;flex-wrap:wrap;gap:6px;padding:8px 16px;border-bottom:1px solid var(--border)}
 .shell-sheet .shell-account-actions #session-name{display:none}
 .shell-sheet .shell-account-actions>.shell-theme{min-width:0}
 .workspace-shell .shell-sheet .shell-navigation{
   position:static;display:block;transform:none;inset:auto;width:100%;max-width:none;
   flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;background:transparent;backdrop-filter:none;
   padding:8px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
   border:0;scrollbar-gutter:auto
 }
 .shell-sheet .shell-search{margin:0}
 @media(max-height:520px){.workspace-shell dialog.shell-sheet[open]{height:calc(100dvh - env(safe-area-inset-top,0px) - 8px)}}
}
@media(max-width:900px) and (prefers-reduced-motion:no-preference){
 .workspace-shell dialog.shell-sheet[open]{animation:workspace-sheet-in 180ms cubic-bezier(.2,.75,.25,1)}
 @keyframes workspace-sheet-in{from{opacity:.6}to{opacity:1}}
}

/* Leave breathing room below the iOS status bar in the installed app. */
@supports (-webkit-touch-callout:none){
 @media(max-width:900px) and (display-mode:standalone){
  body.workspace-host.workspace-shell{
   padding-top:calc(env(safe-area-inset-top,0px) + 6px);
  }
  body.workspace-host.workspace-shell > .shell-bottom{
   /* One continuous tab-bar material behind the controls and home indicator. */
   padding-block:0 env(safe-area-inset-bottom,0px);
   box-shadow:none;border-top:0;
  }
  .workspace-host.workspace-shell > .shell-bottom > :is(a,button){
   min-height:44px;padding-block:2px;
  }
 }
}

/* One material for navigation. The tab bar and its safe area share the same surface. */
.workspace-host{
 --chrome-rim:var(--edge);
 --chrome-glint:rgb(255 236 225 / .14);
 --chrome-selected-glint:rgb(255 236 225 / .04);
 --chrome-press:rgb(235 247 255 / .24);
 --chrome-active:color-mix(in srgb,var(--accent) 16%,var(--surface));
 --chrome-seam:color-mix(in srgb,var(--control) 46%,var(--surface));
 --chrome-light:linear-gradient(116deg,var(--chrome-glint),transparent 36%,transparent 76%,color-mix(in srgb,var(--focus) 7%,transparent));
}
[data-theme=light] .workspace-host{
 --chrome-rim:rgb(255 255 255 / .95);
 --chrome-glint:rgb(255 255 255 / .55);
 --chrome-selected-glint:rgb(255 255 255 / .55);
 --chrome-press:color-mix(in srgb,var(--focus) 20%,transparent);
 --chrome-active:color-mix(in srgb,var(--accent) 14%,var(--surface));
}
body.workspace-host > :is(.shell-topbar,.shell-navigation,.service-header),
body.workspace-host.workspace-shell > .shell-bottom,
body.workspace-host.workspace-shell dialog.shell-sheet[open]{
 background:var(--surface);
 border-color:var(--chrome-seam);
}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
 body.workspace-host > :is(.shell-topbar,.shell-navigation,.service-header),
 body.workspace-host.workspace-shell > .shell-bottom,
 body.workspace-host.workspace-shell dialog.shell-sheet[open]{
   background:var(--glass-light),var(--glass-face);
   -webkit-backdrop-filter:blur(12px) saturate(1.18);
   backdrop-filter:blur(12px) saturate(1.18);
   box-shadow:inset 0 1px 0 var(--chrome-rim);
 }
 /* The dock has its own grid row. Give its glass rim a light source even where
    there is no scrolling content behind it. */
 body.workspace-host.workspace-shell > .shell-bottom{
   background:radial-gradient(ellipse at 16% -50%,color-mix(in srgb,var(--focus) 21%,transparent),transparent 62%),var(--chrome-light),var(--glass);
   box-shadow:inset 0 1px 0 var(--chrome-rim),inset 0 3px 8px var(--chrome-selected-glint);
 }
 body.workspace-host.workspace-shell dialog.shell-sheet[open]{
   background:radial-gradient(ellipse at top left,rgb(255 195 160 / .27),transparent 47%),var(--chrome-light),linear-gradient(150deg,color-mix(in srgb,var(--raised) 68%,transparent),color-mix(in srgb,var(--surface) 74%,transparent));
   -webkit-backdrop-filter:blur(26px) saturate(1.48);
   backdrop-filter:blur(26px) saturate(1.48);
   box-shadow:inset 0 1.5px 0 rgb(255 255 255 / .72),inset 1px 0 0 var(--chrome-glint),inset -1px 0 0 var(--chrome-rim),0 -10px 38px rgb(8 22 35 / .24);
 }
}
.workspace-host .shell-bottom > :is(a,button){border-radius:16px}
.workspace-host .shell-bottom > :is([aria-current],[aria-expanded=true],.shell-current-section),
.workspace-host .shell-navigation a[aria-current]{
 color:var(--accentText);
 background:linear-gradient(165deg,var(--chrome-selected-glint),transparent 58%),var(--chrome-active);
 box-shadow:inset 0 1px 0 var(--chrome-rim),inset 0 0 0 1px color-mix(in srgb,var(--accentText) 30%,transparent);
 font-weight:700;
}
.workspace-host .shell-navigation a[aria-current]{box-shadow:inset 3px 0 0 var(--accentText),inset 0 1px 0 var(--chrome-glint)}
.workspace-host .shell-sheet .sheet-heading{padding-block:10px 3px}
.workspace-host .shell-sheet .sheet-heading h2{font-size:24px;letter-spacing:-.025em}
.workspace-host .shell-sheet .sheet-heading button,.workspace-host .shell-account-actions :is(button,a){
 border-radius:14px;border-color:var(--control);
 background:linear-gradient(155deg,var(--chrome-glint),transparent 70%),color-mix(in srgb,var(--surface) 88%,transparent);
}
.workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.sheet-heading,.shell-account-actions,.service-navigation) :is(a,button,summary){
 position:relative;
}
.workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.sheet-heading,.shell-account-actions,.service-navigation) :is(a,button,summary)::before{
 content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
 background:radial-gradient(ellipse at var(--press-x,50%) var(--press-y,50%),var(--chrome-press),transparent 76%);
 opacity:0;transition:opacity 180ms ease-out;
}
.workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.sheet-heading,.shell-account-actions,.service-navigation) :is(a,button,summary):active::before{
 opacity:1;transition:none;
}
.workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.shell-sheet,.service-navigation) :is(a,button,input,summary):focus-visible{
 outline:2px solid var(--focus);outline-offset:-3px;
}
/* Blink paints a separate square tap overlay on links. The rounded contact
   light below supplies touch feedback while the focus-visible outline serves keyboards. */
.workspace-host :is(.shell-bottom,.shell-topbar,.shell-navigation,.shell-sheet) :is(a,button,summary){
 -webkit-tap-highlight-color:transparent;
}
.shell-touch-light{
 position:absolute;inset:0;border-radius:inherit;pointer-events:none;
 background:radial-gradient(ellipse at var(--press-x,50%) var(--press-y,50%),rgb(255 248 236 / .62),transparent 71%);

 animation:shell-contact-light 440ms ease-out both;
}
[data-theme=light] .shell-touch-light{
 background:radial-gradient(ellipse at var(--press-x,50%) var(--press-y,50%),rgb(255 229 202 / .65),transparent 72%);
}
@keyframes shell-contact-light{
 0%,24%{opacity:1}
 100%{opacity:0}
}
/* In WebKit, a top-layer dialog can composite an iframe separately from its
   backdrop filter. Diffuse the underlying frame while the native modal is open. */
@media(max-width:900px){
 body.workspace-host:has(dialog.shell-sheet[open]) > #panel-main{filter:blur(10px)}
 body.workspace-host:has(dialog.shell-sheet[open]) > .shell-bottom{visibility:hidden}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active){
 body.workspace-host:has(dialog.shell-sheet[open]) > #panel-main{filter:none}
}
@media(prefers-reduced-motion:reduce),(prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active){
 .shell-touch-light{display:none}
}
@media(prefers-reduced-motion:reduce){
 .workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.sheet-heading,.shell-account-actions,.service-navigation) :is(a,button,summary)::before{transition:none}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active){
 body.workspace-host > :is(.shell-topbar,.shell-navigation,.service-header),
 body.workspace-host.workspace-shell > .shell-bottom,
 body.workspace-host.workspace-shell dialog.shell-sheet[open]{
   background:var(--surface);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none;border-color:var(--control)
 }
 .workspace-host .shell-sheet .sheet-heading button,.workspace-host .shell-account-actions :is(button,a){background:var(--surface)}
 .workspace-host .shell-bottom > :is([aria-current],[aria-expanded=true],.shell-current-section),
 .workspace-host .shell-navigation a[aria-current]{background:var(--chrome-active);outline:1px solid var(--accentText);outline-offset:-1px;box-shadow:none}
 .workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.sheet-heading,.shell-account-actions,.service-navigation) :is(a,button,summary)::before{display:none}
 .workspace-host :is(.shell-navigation,.shell-topbar,.shell-bottom,.sheet-heading,.shell-account-actions,.service-navigation) :is(a,button,summary):active{text-decoration:underline}
}
@media(forced-colors:active){
 .workspace-host .shell-bottom > :is([aria-current],[aria-expanded=true],.shell-current-section),.workspace-host .shell-navigation a[aria-current]{outline-color:Highlight}
}

.workspace-host :is(.shell-topbar,.shell-navigation,.shell-bottom,.service-header)[inert]{filter:brightness(.55);opacity:.65}
dialog:modal::backdrop{background:rgb(15 14 19 / .52)}

.shell-navigation a:has(.nav-count),.shell-bottom a:has(.nav-count){position:relative}
.shell-navigation .nav-count,.shell-bottom .nav-count{box-sizing:border-box;display:inline-grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:20px;background:#f3a986;color:#332522;font:700 11px/1 system-ui;font-variant-numeric:tabular-nums}
.shell-bottom a .nav-count{position:absolute;top:1px;left:calc(50% + 5px);pointer-events:none}
.shell-navigation a .nav-count{margin-inline-start:auto}
.calendar-palette{border-inline-start:10px solid var(--swatch,var(--muted))!important}
@media(max-width:600px){
 html:has(dialog:modal),body:has(dialog:modal){overflow:hidden;overscroll-behavior:none}
 body:is(.workspace-shell,.workspace-panel) dialog:modal,body.workspace-panel .calendar-layout .calendar-sidebar{
  box-sizing:border-box;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-wrap:anywhere;
  max-inline-size:calc(100% - 12px);min-inline-size:0;
 }
 body:is(.workspace-shell,.workspace-panel) dialog:modal{max-block-size:calc(100dvh - 12px);margin:auto}
 body:is(.workspace-shell,.workspace-panel) dialog:modal :is(form,fieldset,label,input,textarea,select,.settings-grid),
 body.workspace-panel .calendar-sidebar :is(label,input,select){box-sizing:border-box;max-inline-size:100%;min-inline-size:0}
 body.workspace-panel.calendar-only .calendar-layout .calendar-sidebar{max-width:100%;max-height:min(var(--settings-height,70dvh),100dvh)}
 body:is(.workspace-shell,.workspace-panel) dialog:modal .settings-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}
}

@media(max-width:600px){
 html:has(.calendar-only .calendar-sidebar:not([hidden])),body.calendar-only:has(.calendar-sidebar:not([hidden])){overscroll-behavior:none;overflow:hidden}
 .calendar-sidebar:not([hidden]),dialog:modal{touch-action:pan-y pinch-zoom}
}

#workspace-heading{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* Operational lists share the workspace gutter. Keep short controls within reach. */
@media(min-width:901px){
  body.workspace-panel.workspace-shell main.records-page {
    max-width:none;
    margin-inline:0;
    padding-inline:clamp(20px,2vw,36px);
  }
  .records-page > p:not([role]):not([id]) {max-width:80ch}
  .records-page .records-toolbar:not([hidden]) {
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:12px;
    margin-block:16px;
  }
  .records-page .records-toolbar > label {
    flex:0 1 22rem;
    min-width:0;
    margin:0;
  }
  .records-page .records-toolbar :is(select,input) {width:100%;max-width:100%}
  .records-page .records-toolbar > button {flex:0 0 auto;margin:0}
}

/* Shared dimensions for workspace actions and segmented navigation. */
.workspace-panel {
  --button-height:44px;
  --button-radius:12px;
  --button-text:.9375rem;
}
body.workspace-panel main :where(button:not(.fc-button,.chat-row,.timeline-event)),
.workspace-panel main .shell-tabs a {
  box-sizing:border-box;
  min-height:var(--button-height);
  border-radius:var(--button-radius);
  font-size:var(--button-text);
  line-height:1.35;
  padding:6px 12px;
}
.workspace-panel main :is(.scope-switch,.category-switch,.task-switch,#communication-tabs) > :is(button,a),
.workspace-panel.calendar-only .calendar-tools #calendar-sidebar-toggle {
  box-sizing:border-box;
  min-height:var(--button-height);
  font-size:var(--button-text);
  line-height:1.35;
  border-radius:var(--button-radius);
  padding:6px 10px;
}
.workspace-panel main :is(.scope-switch,.category-switch,.task-switch,#communication-tabs) {
  padding:2px;
  gap:2px;
  border-radius:14px;
}
@media(max-width:480px) {
  .workspace-panel main :is(.scope-switch,.category-switch,.task-switch,#communication-tabs) > :is(button,a),
  .workspace-panel.calendar-only .calendar-tools #calendar-sidebar-toggle {
    padding-inline:6px;
    font-size:.875rem;
  }
}

.workspace-panel main .shell-tabs a {align-content:center;text-align:center}
