/* Shared member-site motion. Values come from the current effective rules. */
:root,:host{--space-control-ease:cubic-bezier(.16,1,.3,1);--space-content-ease:cubic-bezier(.22,.7,.2,1)}
button,.btn,.button,.icon-btn,.seg-btn,.cat-chip,.space-select-trigger,[role=button],input,textarea{transition:background-color 320ms var(--space-control-ease),border-color 320ms var(--space-control-ease),color 320ms var(--space-control-ease),box-shadow 320ms var(--space-control-ease),transform 200ms var(--space-control-ease),opacity 320ms var(--space-control-ease)}
button:not(:disabled):active,.btn:not(:disabled):active,.button:active,.space-select-trigger:not(:disabled):active{transform:scale(.98)}
.space-select-trigger::after{transition:transform 320ms var(--space-control-ease)}
.space-select-list:popover-open{animation:none}.space-select-option{transition:background-color 320ms var(--space-control-ease),color 320ms var(--space-control-ease)}
dialog[open],.modal-card,.login-card{animation:none!important}dialog::backdrop{animation:space-backdrop-in 360ms var(--space-control-ease) both}dialog[data-space-closing]::backdrop{animation:space-backdrop-out 360ms var(--space-control-ease) both}
@keyframes space-backdrop-in{from{opacity:0}to{opacity:1}}@keyframes space-backdrop-out{from{opacity:1}to{opacity:0}}
.space-loading-surface{display:grid;gap:18px;min-width:0;pointer-events:none}.space-loading-bar,.space-loading-card{padding:22px;border:1px solid var(--stroke,var(--line,#dbe7f3));border-radius:16px;background:var(--panel-solid,var(--paper,#fff));display:grid;gap:22px;align-content:start}.space-loading-bar{grid-template-columns:1fr 1.4fr 1fr;min-height:86px;align-items:center}.space-loading-card{min-height:360px}.space-skeleton{display:block;height:14px;position:relative;overflow:hidden;border-radius:5px;background:color-mix(in srgb,var(--muted,#607993) 12%,transparent);max-width:100%}.space-skeleton::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent,color-mix(in srgb,var(--panel-solid,#fff) 70%,transparent),transparent);transform:translateX(-100%);animation:space-shimmer 1400ms var(--space-control-ease) infinite}.space-loading-card .space-skeleton:nth-child(2n){width:72%}.space-loading-card .space-skeleton:first-child{height:32px;width:48%}@keyframes space-shimmer{to{transform:translateX(100%)}}
.destination-stage{padding:8px 0 32px;min-width:0}.destination-stage h1{font-size:28px;line-height:1.35;margin:0 0 26px;color:var(--text);letter-spacing:-.02em}.destination-stage .stage-error{padding:22px;border:1px solid var(--stroke);border-radius:16px;background:var(--panel-solid)}
#codeRoot[data-initial-loading=true] .bar,#codeRoot[data-initial-loading=true] .revision,#codeRoot[data-initial-loading=true] .workspace,#codeRoot[data-initial-loading=true] details.panel{display:none}#codeLoading{margin-top:16px}#codeLoadRetry[hidden]{display:none}
#securityLoading{margin-top:20px}#securityRoot[data-verification=loading]:not([data-ever-ready]) section{display:none}#securityRoot[data-verification=ready] #securityLoading{display:none}
@media(max-width:600px){.space-loading-bar,.space-loading-card{padding:18px}.space-loading-bar{gap:14px;min-height:86px}.destination-stage h1{font-size:24px}.space-loading-card{min-height:360px}}
@media(prefers-reduced-motion:reduce){button,.btn,.button,.icon-btn,.seg-btn,.cat-chip,.space-select-trigger,.space-select-trigger::after,.space-select-option,input,textarea{transition:none!important}.space-skeleton::after,dialog::backdrop{animation:none!important}button:active,.btn:active,.button:active{transform:none!important}}
#securityRoot{position:relative}#securityRoot[data-ever-ready][data-verification=loading] #securityLoading{position:absolute;left:0;right:0;z-index:3}#securityRoot:not([data-ever-ready])[data-verification=retry] section,#securityRoot:not([data-ever-ready])[data-verification=denied] section{display:none}
#codeRoot input[type=checkbox],#codeRoot input[type=checkbox]::before{transition:background-color 320ms var(--space-control-ease),border-color 320ms var(--space-control-ease),box-shadow 320ms var(--space-control-ease),transform 200ms var(--space-control-ease)}
.btn.primary:hover,.btn.ghost:hover,.icon-btn:hover,.cat-chip:hover,.button:hover{transform:none}.btn.primary:not([aria-busy=true]):not(.loading)::after{animation:none!important;display:none!important}
button:not(:disabled):active,.btn:not(:disabled):active,.btn.primary:not(:disabled):active,.btn.ghost:not(:disabled):active,.button:active,.icon-btn:not(:disabled):active{transform:scale(.98)}
.seg-ind{transition:transform 600ms var(--space-content-ease),width 600ms var(--space-content-ease)}
@media(prefers-reduced-motion:reduce){.seg-ind{transition:none!important}button:active,.btn:active,.btn.primary:active,.btn.ghost:active,.icon-btn:active{transform:none!important}}
.destination-stage h1{margin:0}.destination-heading{display:flex;justify-content:space-between;gap:24px;align-items:flex-start}.stage-code-actions{display:flex;gap:10px;flex-shrink:0}.stage-code-actions>.space-skeleton{width:88px;height:44px;border-radius:9px}.stage-code-status{height:57px}.destination-stage[data-view=settings] .stage-code-status{height:24px}
.space-loading-surface[data-view=code]{gap:16px}.space-loading-surface[data-view=code] .space-loading-bar{min-height:104px}.space-loading-surface[data-view=code] .space-loading-card{min-height:420px}.space-loading-note{height:12px;width:48%;margin:6px 0}.space-loading-foot{padding:25px 22px;border:1px solid var(--stroke,var(--line,#dbe7f3));border-radius:16px;background:var(--panel-solid,var(--paper,#fff))}.space-loading-foot .space-skeleton{width:160px}
.space-loading-surface[data-view=settings] .space-loading-card{min-height:480px}.space-loading-surface[data-view=settings] .space-loading-card>.space-skeleton:not(:first-child){height:44px}
@media(max-width:720px){.destination-heading{flex-direction:column;gap:16px}.stage-code-actions{width:100%;flex-wrap:wrap;gap:8px}.stage-code-actions>.space-skeleton{flex:1 1 130px;width:auto}}
.destination-stage[data-view=settings]{padding-top:0}.destination-stage[data-view=settings] .destination-heading{margin-bottom:18px}.stage-settings-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.stage-settings-tabs>span{font-size:14px;font-weight:600;line-height:1.6;min-height:46px;padding:11px 17px;border:1px solid var(--stroke);border-radius:12px;color:var(--muted)}.destination-stage[data-view=settings] .stage-code-status{height:24px;margin-bottom:16px}#securityLoading{margin-top:16px}.space-loading-surface[data-view=settings] .space-loading-card{min-height:454px;gap:18px}.space-loading-surface[data-view=settings] .space-loading-card>.space-skeleton:first-child{height:26px}
@media(max-width:600px){.space-loading-surface[data-view=settings] .space-loading-card{min-height:480px}.stage-settings-tabs>span{padding:10px 12px}}
#sortOptions{animation:none!important}.sort-button svg{transition:transform 320ms var(--space-control-ease)}#sortOptions button{transition:background-color 320ms var(--space-control-ease),color 320ms var(--space-control-ease),transform 200ms var(--space-control-ease)}
.viewer.is-loading .code{background:color-mix(in srgb,var(--muted,#607993) 10%,transparent);opacity:1}
.destination-stage[data-view=settings] h1{font-size:28px;line-height:1.3}
.stage-settings-tabs>span{padding:11px 18px;min-height:44px;border-radius:10px}
.stage-settings-tabs>span:first-child{background:var(--bg-2);color:var(--a1)}
@media(max-width:600px){.stage-settings-tabs{display:grid;grid-template-columns:1fr 1fr}.stage-settings-tabs>span{text-align:center}}
/* Loading is part of the workspace layout, not a second full-page layer. */
#fileWorkspace,#trashWorkspace,#spacePanel{overflow-anchor:none}
.destination-stage[data-view=vault]{padding-top:8px}
.destination-stage[data-view=vault] h1{font-size:28px;line-height:1.3}
#trashWorkspace #trashFiles .trash-row{animation:none}
.destination-stage[data-view=vault] .stage-code-status{height:20px}
.trash-load-status{display:block;min-height:1.5em;margin:8px 0;color:var(--muted)}
.trash-skeleton{height:54px;margin-block:8px;border-radius:12px;background:var(--bg-2);border:1px solid var(--stroke)}

@media(min-width:641px){
 .destination-stage[data-view=vault]:not([data-entry]) .destination-heading{min-height:64px;align-items:center}
}
.destination-stage[data-entry] .stage-entry-back{display:block;width:100px;height:37.6px}
.destination-stage[data-entry] .stage-entry-card{max-width:800px;margin:auto;padding:32px 32px 28px;border:1px solid var(--stroke);border-radius:20px;background:var(--panel)}
.destination-stage[data-entry] h1{font-size:24px;line-height:1.3;margin-bottom:18px}
@media(max-width:640px){.destination-stage[data-entry] .stage-entry-card{padding:26px 20px 24px}}
@media(max-width:600px){.destination-stage[data-entry] .stage-entry-card{padding:20px 16px}}

.panel-content.vault .form-card:hover{transform:none}

/* Data placeholders mirror the destination controls and data slots, not a generic page wash. */
.space-loading-surface>div{min-width:0}.loading-field{display:grid;gap:8px;min-width:0;margin:14px 0 18px}.loading-label{font:inherit;color:var(--text,var(--ink))}.loading-label:empty{display:none}.loading-action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:1px solid var(--stroke,var(--line));border-radius:8px;background:var(--panel-solid,var(--paper));color:var(--text,var(--ink));font-size:14px;white-space:nowrap}.loading-code-bar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;padding:15px;border:1px solid var(--stroke,var(--line));border-radius:12px;background:var(--panel-solid,var(--paper))}.loading-code-bar>div:first-child{width:175px}.loading-code-bar>div:nth-child(2){width:235px}.loading-code-bar .loading-field{margin:0}.loading-code-actions{display:flex;gap:10px;flex-wrap:wrap}.loading-revision{width:65%;margin:16px 0}.loading-code-workspace{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:420px;border:1px solid var(--stroke,var(--line));border-radius:12px;background:var(--panel-solid,var(--paper));overflow:hidden}.loading-code-tree{padding:16px;border-right:1px solid var(--stroke,var(--line));display:grid;align-content:start;gap:16px}.loading-code-tree strong{font-size:15px}.loading-file-title{padding:14px 18px;border-bottom:1px solid var(--stroke,var(--line));font-weight:600}.loading-code-tools{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--stroke,var(--line))}.loading-code-tools>.space-skeleton{flex:1}.loading-code-lines{display:grid;gap:20px;padding:24px}.loading-profile{border:1px solid var(--stroke,var(--line));border-radius:12px;padding:24px;background:var(--panel-solid,var(--paper))}.loading-profile h2,.loading-import h2{margin:0 0 12px;font-size:20px}.loading-profile>.loading-field{margin:14px 0 10px}.loading-profile>.loading-action{margin:8px 0 0}.loading-vault-categories{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 24px}.loading-vault-categories>.space-skeleton{width:100px}.loading-vault-items{display:grid;gap:12px}.loading-vault-item{display:grid;grid-template-columns:40px 1fr;align-items:center;gap:16px;min-height:92px;padding:18px;border:1px solid var(--stroke);border-radius:12px;background:var(--panel-solid)}.loading-vault-item>div{display:grid;gap:12px}.loading-vault-item>div>.space-skeleton:first-child{width:42%}.loading-vault-item>div>.space-skeleton:last-child{width:65%}.loading-import{padding-bottom:20px;border-bottom:1px solid var(--stroke);margin-bottom:24px}.space-skeleton::after{animation-duration:1400ms}.space-loading-surface[data-view=code],.space-loading-surface[data-view=settings]{display:block}.space-loading-surface[data-view=settings] .loading-profile{min-height:0}#securityRoot[data-ever-ready][data-verification=loading] section{visibility:visible}
[data-space-data-host]{position:relative}.space-data-ghost{position:absolute;z-index:3;pointer-events:none;overflow:hidden;background:var(--bg);contain:layout paint}.space-data-ghost>.space-loading-surface{margin:0;width:100%}
@media(max-width:720px){.loading-code-workspace{grid-template-columns:1fr}.loading-code-tree{border-right:0;border-bottom:1px solid var(--stroke);max-height:180px;overflow:hidden}.loading-code-bar>div:first-child,.loading-code-bar>div:nth-child(2){width:100%}.loading-code-actions{width:100%}.loading-code-actions>.loading-action{flex:1 1 130px}.loading-profile{padding:24px}.loading-code-tools .loading-action:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.space-data-ghost{display:none}.space-skeleton::after{animation:none}}

.loading-code-footer{margin-top:18px;min-height:70px;padding:20px;border:1px solid var(--stroke,var(--line));border-radius:12px;background:var(--panel-solid,var(--paper));font-weight:600}

/* Files cold reads occupy real list/card slots from the first static frame. */
#files>.space-loading-surface{grid-column:1/-1;width:100%}.loading-file-list{display:flex;flex-direction:column;gap:7px}.loading-file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:18px}.loading-file-row{animation:none!important;pointer-events:none}.loading-file-row:hover{transform:none!important}.loading-file-row .card-name>.space-skeleton{width:72%}.loading-file-row .card-meta>.space-skeleton{width:70%;min-width:92px}.loading-file-row .thumb>.space-skeleton{width:100%;height:100%!important}.loading-file-row .list-actions>.space-skeleton{flex:none;min-width:32px}.loading-file-grid .list-actions{display:none}.loading-file-grid .card-body{display:grid;gap:12px}
#files.list>.skeleton-card{height:64px;min-height:64px;display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:13px;padding:11px 14px;box-sizing:border-box}#files.list>.skeleton-card::before{grid-column:1;width:40px;height:40px;margin:0;border-radius:8px;background:var(--bg-2);animation:none}#files.list>.skeleton-card::after{grid-column:2;width:65%;height:15px;margin:0;box-shadow:none;background:linear-gradient(100deg,var(--bg-2) 25%,var(--panel-solid) 45%,var(--bg-2) 65%);background-size:200% 100%;animation:files-slot-shimmer 1400ms cubic-bezier(.65,0,.35,1) infinite}@keyframes files-slot-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
.loading-file-row .card-name,.loading-file-row .card-meta{min-height:1.5em}.loading-file-row .card-name{align-items:center}.loading-file-row .list-actions>.space-skeleton{height:32px}
@media(max-width:720px),(hover:none){.loading-file-list .loading-file-row .list-actions>.space-skeleton{height:44px;min-width:44px}#files.list>.skeleton-card{height:128.5px;min-height:128.5px}}
@media(max-width:600px){#files.list>.skeleton-card{height:125.75px;min-height:125.75px;padding:10px;gap:10px}.loading-file-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(prefers-reduced-motion:reduce){#files.list>.skeleton-card::after{animation:none}}
