/* Shared refinement tokens. Theme colours, fonts and cosmetic layers remain user-owned. */
:root {
  --ss-space-1:4px;--ss-space-2:8px;--ss-space-3:12px;--ss-space-4:16px;--ss-space-6:24px;
  --ss-radius-control:8px;--ss-radius-menu:12px;--ss-radius-dialog:16px;
  --ss-motion-fast:120ms;--ss-motion-ease:cubic-bezier(.2,.75,.25,1);
  --ss-focus:var(--accent,#a89aff);--ss-hairline:var(--border-mid,#777a943d);
}
:where(button,input,select,textarea){font:inherit}
:where(button,.btn,a[role=button],summary){touch-action:manipulation}
:where(button,.btn,a[role=button]):not(:disabled):not([aria-disabled=true]){cursor:pointer}
:where(button,.btn,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--ss-focus);outline-offset:3px}
:where(button,.btn)[aria-busy=true]{cursor:progress}
:where(button,.btn):disabled{cursor:not-allowed}
:where(input,select,textarea)[aria-invalid=true]{border-color:var(--red,#f08b99);outline-color:var(--red,#f08b99)}
:where(input,select,textarea){scroll-margin-block:88px}
:where(.btn,.manager-button,.settings-save,.settings-button){min-height:34px;border-radius:var(--ss-radius-control);line-height:1.35;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none}
:where(.btn-sm){min-height:30px}
:where(.btn,.manager-button,.settings-button)>svg{flex:none}
:where(.form-group,.settings-field,.manager-field)>:where(label){display:block;margin-bottom:7px;font-weight:600;line-height:1.4}
:where(.form-group,.settings-field,.manager-field)>:where(input:not([type=checkbox]):not([type=radio]),select,textarea){box-sizing:border-box;max-width:100%;min-width:0;border-radius:var(--ss-radius-control)}
:where(input[type=checkbox],input[type=radio]){accent-color:var(--accent,#9787ff)}
:where(.settings-section,.manager-section,.employee-main,.employee-main-content,.studio-section,.code-main){min-width:0}
:where(.settings-section,.manager-section,.employee-main,.code-main) :where(h1,h2,h3){text-wrap:balance;line-height:1.25}
:where(.settings-section,.manager-section,.employee-main,.code-main) :where(p,label){overflow-wrap:anywhere}
:where(.settings-section,.manager-section) :where(h2,h3){scroll-margin-block:80px}
:where(.manager-row,.settings-row,.member-row,.role-row){gap:12px;min-width:0}
:where(.manager-row,.settings-row,.member-row,.role-row)>:where(div,span){min-width:0}
:where(.settings-nav-link,.channel-item,.dm-list-item,.employee-tool-link){border-radius:7px;transition:background-color var(--ss-motion-fast),color var(--ss-motion-fast)}
:where(.settings-nav-link,.employee-tool-link)[aria-current=page]{box-shadow:inset 3px 0 var(--accent,#9787ff)}
:where(.chat-header,.chat-header-actions,.dm-header,.thread-header,.server-header){align-items:center;min-width:0}
:where(.chat-header,.dm-header,.thread-header) :where(h1,h2,strong){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
:where(.chat-header-actions,.dm-header-actions,.thread-actions){display:flex;flex-wrap:wrap;align-items:center;gap:6px}
:where(.chat-messages,.dm-messages,.messages-container,.server-messages,.dm-list,.channel-list){overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable}
:where(.msg,.message){min-width:0;scroll-margin-block:70px}
:where(.msg-content,.message-content,.chat-message-content){overflow-wrap:anywhere;line-height:1.5;min-width:0}
:where(.msg-content,.message-content,.chat-message-content) :where(img,video){max-width:100%;height:auto;object-fit:contain}
:where(.msg-content,.message-content) pre{overflow-x:auto;max-width:100%;overscroll-behavior-inline:contain}
:where(.msg-actions,.message-actions){align-items:center;gap:2px;border-radius:8px}
:where(.msg-actions,.message-actions)>button{min-width:30px;min-height:30px;display:inline-flex;align-items:center;justify-content:center}
:where(.msg,.message):focus-within :where(.msg-actions,.message-actions){opacity:1;visibility:visible}
:where(.composer,.message-composer,.chat-input-container,.dm-composer){min-width:0;transition:border-color var(--ss-motion-fast),box-shadow var(--ss-motion-fast)}
:where(.composer,.message-composer,.chat-input-container,.dm-composer):focus-within{border-color:var(--accent,#9787ff)}
:where(.composer,.message-composer,.chat-input-container,.dm-composer) textarea{resize:none;max-height:38dvh}
:where(.popout,.user-popout,.profile-popout,.sauce-user-popout){max-width:calc(100vw - 24px);overflow-wrap:anywhere;isolation:isolate}
:where(.popout-badges,.profile-badges,.badge-row,.badges){display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0}
:where(.badge-svg,.popout-badge-icon){position:relative;isolation:isolate;line-height:1;outline-offset:3px}
:where(.badge-svg,.popout-badge-icon) svg{display:block;overflow:visible;flex:none}
:where(.badge-svg,.popout-badge-icon):focus-visible{outline:2px solid var(--ss-focus)}
:where(.badge-svg,.popout-badge-icon):hover{filter:brightness(1.12);transform:none}
.ss-badge-tooltip{position:fixed;z-index:2147483000;box-sizing:border-box;max-width:min(290px,calc(100vw - 24px));padding:11px 13px;border:1px solid var(--border-mid,#777a9450);border-radius:10px;background:var(--bg-deep,#181b28);color:var(--text-primary,#f3f4fb);box-shadow:0 6px 20px #0004;pointer-events:none;font:12px/1.5 var(--font-stack,system-ui);text-align:start;overflow-wrap:anywhere}
.ss-badge-tooltip strong{display:block;font-size:13px;margin-bottom:3px}.ss-badge-tooltip p{margin:0;color:var(--text-dim,#bfc4d8)}
:where(.profile-avatar,.popout-avatar,.member-avatar,.dm-avatar,.user-avatar) img{object-fit:cover;aspect-ratio:1}
:where(.server-actions-popover,.context-menu,.dropdown-menu,.popover-menu){max-width:min(340px,calc(100vw - 24px));max-height:min(560px,80dvh);overflow-y:auto;overscroll-behavior:contain;border-radius:var(--ss-radius-menu);box-shadow:0 8px 28px #0004}
:where(.server-actions-popover,.context-menu,.dropdown-menu,.popover-menu)>:where(a,button){min-height:32px;box-sizing:border-box;line-height:1.4;gap:9px}
:where(dialog){box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overscroll-behavior:contain;border-radius:var(--ss-radius-dialog);scrollbar-gutter:stable}
:where(dialog)::backdrop{background:#090c18a6}
dialog.collection-preview-dialog[open],dialog.community-create[open],dialog.code-dialog[open]{inset:0;margin:auto;box-sizing:border-box;max-height:calc(100dvh - 32px);overflow-y:auto}
.collection-preview-dialog .preview-info::after{content:none!important}
.collection-preview-dialog .preview-info h2{font-size:23px;line-height:1.25;margin:12px 0 8px}
.collection-preview-dialog .preview-info p{line-height:1.5;max-width:60ch}
.collection-preview-dialog .preview-avatar{object-fit:cover}
.collection-preview-dialog .preview-close{z-index:10;min-width:34px;min-height:34px}
.collection-filterbar{gap:6px;scrollbar-width:thin}.collection-search{min-height:40px}
.collection-filterbar .btn{white-space:nowrap}.collection-filterbar .btn[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 -2px var(--accent)}
.collection-studio .collection-grid{align-items:stretch}.collection-tile{min-width:0;display:flex;flex-direction:column}.collection-tile>form{margin-top:auto}
.collection-tile-art{isolation:isolate}.collection-tile [data-collection-preview]{min-height:32px}
.manager-shell{gap:28px!important;padding:24px!important}.manager-shell>aside{padding-right:18px!important}
.manager-shell nav button{font-family:inherit!important;line-height:1.4;min-height:36px}
.manager-shell .manager-status{min-height:1.5em;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
[data-manager-panel][hidden]{display:none!important}
[data-case-message] [data-workflow-status]{font-size:12px;line-height:1.5;color:var(--text-dim)}
.community-create .type-choices{gap:8px}.community-create .type-choices label{line-height:1.4}.community-create .type-choices label:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.community-explore-heading{gap:20px!important;margin-bottom:20px!important;align-items:center!important}
.community-explore-heading>div{padding:22px!important;border-radius:12px!important}
.community-explore-heading h1{font-size:clamp(26px,3vw,38px)!important;line-height:1.15!important;margin:0 0 12px!important;max-width:22ch}
.community-explore-heading p{font-size:13px!important;line-height:1.6!important;margin:0!important;max-width:65ch}
.community-explore-heading>svg,.community-explore-heading>img{max-width:150px!important;max-height:150px!important}
.community-search-box{margin-block:16px!important;min-width:0}.community-search-box input{min-height:42px;font-size:14px}
.discovery-filters{gap:12px!important;padding:16px!important;border-radius:12px!important}.discovery-filters label{min-width:0;line-height:1.4}.discovery-filters select{min-height:38px;font-size:13px}
.discovery-filter-foot{gap:12px;align-items:center}.discovery-filter-foot p{font-size:12px;line-height:1.5}
.community-categories,.community-sort{gap:6px!important;flex-wrap:wrap}
.community-categories button,.community-sort button{min-height:34px;line-height:1.4}
.community-results-head{flex-wrap:wrap;gap:12px;align-items:center}.community-market-grid{gap:16px!important;align-items:stretch}
.community-market-card{min-width:0;overflow:hidden}.community-market-card[hidden]{display:none!important}.community-market-copy{min-width:0}.community-market-copy h3{line-height:1.3;overflow-wrap:anywhere}.community-market-copy>p{line-height:1.5}
.community-market-meta{flex-wrap:wrap;gap:6px}.community-market-copy footer{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.product-home .home-intro{padding-top:42px!important;gap:30px!important}.product-home .home-intro h1{font-size:clamp(38px,5vw,66px)!important;line-height:1.05!important;letter-spacing:-.035em}
.product-home .home-intro>div>p{max-width:60ch;margin-inline:auto;line-height:1.6}.product-home .home-actions{gap:12px;flex-wrap:wrap}
.product-home .home-photo img,.product-home .home-product-shot img{display:block;width:100%;height:auto;object-fit:contain}
.product-home .home-feature{gap:32px!important}.product-home .home-feature p{max-width:52ch;line-height:1.65}.product-home .home-feature-links{gap:12px;flex-wrap:wrap}
.product-home .home-jump{flex-wrap:wrap;gap:8px 20px}.product-home .home-jump a{min-height:34px;display:inline-flex;align-items:center}
.brand-nav-group>summary{min-height:36px;display:flex;align-items:center;gap:7px;cursor:pointer}.brand-nav-group[open]>summary{color:var(--ss-theme-accent,#b9adff)}
.brand-mega{max-height:calc(100dvh - 130px);overflow:auto;overscroll-behavior:contain}.brand-mega a:focus-visible{outline-offset:1px}.brand-mega small{line-height:1.45}
.brand-footer a{line-height:1.5}.brand-footer-language select{min-height:36px}.sauce-public-contact p{line-height:1.6;max-width:55ch}
.employee-portal .employee-main{min-width:0}.employee-portal table td{overflow-wrap:anywhere}.employee-portal .table-wrap{overflow-x:auto;overscroll-behavior:contain}
.employee-portal :where(input[type=search],select){min-height:36px}.employee-portal :where(textarea){min-height:92px;line-height:1.5}
.employee-portal :where(form){scroll-margin-top:90px}.employee-portal :where(.status-chip,.badge){line-height:1.4;white-space:normal}
#accountReview .review-hero{padding:28px!important}#accountReview h1{font-size:clamp(30px,4vw,46px)!important;line-height:1.15!important}#accountReview :where(.review-card,.evidence-card){min-width:0;overflow-wrap:anywhere}
#accountReview :where(img,video){max-width:100%;height:auto;object-fit:contain}#accountReview :where(button,.btn){min-height:38px}
@media(max-width:760px){.community-explore-heading{grid-template-columns:minmax(0,1fr)!important}.community-explore-heading>svg,.community-explore-heading>img{display:none}.community-market-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))!important}.discovery-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}.product-home .home-intro{padding-top:28px!important;gap:22px!important}.product-home .home-feature{gap:22px!important}.brand-mega{max-width:calc(100vw - 24px)}#accountReview .review-hero{padding:22px!important}}
@media(max-width:760px){.manager-shell{display:block!important;padding:18px!important}.manager-shell>aside{border-right:0!important;border-bottom:1px solid var(--border-mid);padding:0 0 16px!important;margin-bottom:20px}.manager-shell nav{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-filterbar{max-height:180px;overflow:auto}.collection-studio .collection-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr))!important}}
:where(.modal-content,.dialog-content,.sauce-inline-action){overflow-wrap:anywhere;min-width:0}
:where(.modal-footer,.dialog-footer,.manager-actions){display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
:where(.toast,.ct-toast,.sauce-toast){max-width:min(420px,calc(100vw - 24px));overflow-wrap:anywhere;line-height:1.45}
:where(.employee-main,.employee-main-content,.manager-content,.settings-content) table{border-collapse:collapse}
:where(.employee-main,.employee-main-content,.manager-content,.settings-content) :where(th,td){vertical-align:middle;line-height:1.45}
:where(.house-card){align-items:center;gap:16px}
:where(.house-card)>svg,:where(.house-card) .badge-svg{flex:none}
.presence-idle::after{content:'';position:absolute;inset:0 0 3px 3px;border-radius:50%;background:var(--bg-deep,#181a24)}
.presence-offline{background:var(--bg-deep,#181a24)!important;box-shadow:inset 0 0 0 2px #8b94a7}
@media(hover:none){:where(.msg-actions,.message-actions){opacity:1;visibility:visible}:where(.btn,.settings-nav-link,.channel-item,.context-menu button,.dropdown-menu button){min-height:40px}}
@media(max-width:600px){:where(.modal-footer,.dialog-footer){position:sticky;bottom:0;background:var(--bg-panel,#1e2130);padding-block:12px}:where(.chat-header,.dm-header,.thread-header){gap:8px}:where(dialog){margin:auto;padding:18px}:where(input,select,textarea){font-size:max(16px,1em)}:where(.employee-main,.manager-content,.settings-content){overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){:root{--ss-motion-fast:0ms}:where(.badge-svg,.popout-badge-icon){transition:none;transform:none}:where(.msg,.message){scroll-behavior:auto}}
@media(forced-colors:active){:where(button,.btn,input,select,textarea,dialog,.context-menu){border:1px solid CanvasText}:where(.badge-svg,.popout-badge-icon):focus-visible{outline-color:Highlight}.sauce-dm-presence{forced-color-adjust:none}}
