/* Short, state-driven motion. All controls remain native and keyboard accessible. */
:root{--motion-ease:cubic-bezier(.22,.75,.2,1);--motion-fast:180ms;--motion-enter:440ms}
body{overscroll-behavior-y:none}
button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}
button{min-height:44px;touch-action:manipulation;transition:background var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast),transform var(--motion-fast) var(--motion-ease)}
button:active:not(:disabled){transform:translateY(1px) scale(.98)}
button:disabled{transform:none}
input,textarea,select{transition:border-color .2s,box-shadow .2s,background .2s}
input:focus-visible,textarea:focus-visible,select:focus-visible{border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 9%,transparent)}
#app-shell:not([inert]) .hero,#app-shell:not([inert]) #content>.panel,#app-shell:not([inert]) #user-body>.panel,#app-shell:not([inert]) #settings-body>.panel{animation:ux-arrive var(--motion-enter) var(--motion-ease) both}
#app-shell:not([inert]) #user-body>.panel{animation-delay:65ms}
#app-shell:not([inert]) .hero-mark{animation:ux-mark 540ms var(--motion-ease) both}
#app-shell:not([inert]) .upload{animation:ux-arrive 400ms var(--motion-ease) both;animation-delay:100ms}
#app-shell:not([inert]) .upload:nth-child(2){animation-delay:150ms}
#app-shell:not([inert]) .upload:nth-child(3){animation-delay:200ms}
.review-row{animation:ux-arrive 360ms var(--motion-ease) both}
.review-row:nth-child(2){animation-delay:35ms}.review-row:nth-child(3){animation-delay:70ms}.review-row:nth-child(n+4){animation-delay:105ms}
@keyframes ux-arrive{from{opacity:0;transform:translate3d(0,12px,0)}to{opacity:1;transform:none}}
@keyframes ux-mark{from{opacity:0;transform:scale(.84) rotate(-5deg)}to{opacity:1;transform:none}}
.hero-mark{box-shadow:0 14px 44px #0004,inset 0 1px #ffffff16,0 0 28px color-mix(in srgb,var(--accent) 8%,transparent)}
#nav{padding:5px;gap:5px;border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 85%,transparent)}
#nav button{border-color:transparent;position:relative}
#nav button.active{background:color-mix(in srgb,var(--accent) 11%,var(--surface));border-color:color-mix(in srgb,var(--accent) 24%,transparent);box-shadow:inset 0 1px #ffffff0c}
#page-progress{position:fixed;inset:0 0 auto;height:3px;z-index:100;overflow:hidden;background:color-mix(in srgb,var(--accent) 10%,var(--bg));pointer-events:none}
#page-progress i{display:block;height:100%;width:35%;background:var(--accent);animation:ux-page-progress 1.2s ease-in-out infinite}
@keyframes ux-page-progress{from{transform:translateX(-110%)}to{transform:translateX(390%)}}
.upload{transition:border-color .22s,background .22s,box-shadow .22s;cursor:pointer}
.upload:focus-within{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:3px;box-shadow:0 0 0 7px color-mix(in srgb,var(--accent) 8%,transparent)}
.upload-icon,.file-state{transition:background .22s,color .22s,box-shadow .22s}
.upload.has-file{border-style:solid;border-color:color-mix(in srgb,var(--accent) 40%,var(--line));background:color-mix(in srgb,var(--accent) 5%,var(--surface))}
.upload.has-file .file-state{color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,transparent)}
.upload.has-file .file-state::before{content:'✓';margin-right:5px;font-weight:800}
.upload.has-file img{animation:ux-preview 320ms var(--motion-ease) both}
@keyframes ux-preview{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
#attachment-progress{height:3px;border-radius:99px;background:color-mix(in srgb,var(--accent) 10%,var(--surface));overflow:hidden;margin:-4px 0 22px}
#attachment-progress i{display:block;height:100%;width:0;border-radius:inherit;background:var(--accent);transition:width .4s var(--motion-ease)}
#files-count{border-radius:999px;padding:4px 9px;font-variant-numeric:tabular-nums;transition:background .25s,color .25s;min-width:48px;text-align:center}
#files-count.complete{background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent)}
#verify-form>[type=submit]{width:100%;min-height:52px;position:relative}
#verify-form>[type=submit].is-ready{box-shadow:0 5px 26px color-mix(in srgb,var(--accent) 19%,transparent)}
#verify-form>[type=submit] .icon{transition:transform .2s var(--motion-ease)}
.is-busy{display:inline-flex;align-items:center;justify-content:center;gap:10px}
.is-busy::before{content:'';display:inline-block;flex:none;width:15px;height:15px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ux-spin .8s linear infinite}
@keyframes ux-spin{to{transform:rotate(360deg)}}
#verify-form[aria-busy=true] .uploads{opacity:.65;transition:opacity .2s}
#verify-form[aria-busy=true] [type=submit]{opacity:1;cursor:wait}
#upload-progress{display:block;text-align:center;margin-top:14px;font-size:12px;animation:ux-arrive .25s var(--motion-ease) both}
#form-error:not(:empty){border:1px solid color-mix(in srgb,var(--danger) 30%,transparent);border-radius:12px;padding:12px 14px;background:color-mix(in srgb,var(--danger) 6%,var(--surface));animation:ux-arrive .22s var(--motion-ease) both}
.status-panel .status-symbol{animation:ux-mark .5s var(--motion-ease) both}
.status-approved .status-symbol{border:1px solid color-mix(in srgb,var(--accent) 28%,transparent);box-shadow:0 0 35px color-mix(in srgb,var(--accent) 10%,transparent)}
dialog[open]{animation:ux-dialog .25s var(--motion-ease) both}
dialog[open]::backdrop{animation:ux-backdrop .2s ease both}
@keyframes ux-dialog{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
@keyframes ux-backdrop{from{opacity:0}to{opacity:1}}
#toast:not([hidden]){animation:ux-toast .28s var(--motion-ease) both}
#toast{padding:14px 20px;border-color:color-mix(in srgb,var(--accent) 36%,var(--line));border-radius:16px;line-height:1.5;bottom:calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 16px 48px #0006}
@keyframes ux-toast{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@media(hover:hover) and (pointer:fine){
 .upload:hover{border-color:color-mix(in srgb,var(--accent) 50%,var(--line));background:color-mix(in srgb,var(--accent) 5%,var(--surface));box-shadow:0 8px 26px #0002}
 .upload:hover .upload-icon{color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}
 #verify-form>[type=submit]:hover:not(:disabled) .icon{transform:translateX(4px)}
 .review-row:hover{border-color:color-mix(in srgb,var(--accent) 28%,var(--line))}
}
@media(max-width:700px){
 input:not([type=color]):not([type=file]),textarea,select{font-size:16px}
 #nav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;scroll-padding:8px}#nav::-webkit-scrollbar{display:none}
 #nav button{min-height:44px;flex-shrink:0}
 #attachment-progress{margin-bottom:18px}
 #toast{width:calc(100% - 32px);max-width:430px;text-align:center}
 footer{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 dialog{max-height:calc(100svh - 32px);padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 #loader .loading-logo-final{opacity:1;clip-path:none;filter:none;transform:none}
 #loader .loading-track{opacity:1}
 #page-progress i{width:100%;opacity:.7}
}
