.animation-workspace .model-workspace-main {max-width:1440px}
.animation-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.animation-actions label {display:flex;align-items:center;gap:7px;font-size:13px}
.animation-workspace input:not([type=file]):not([type=range]):not([type=checkbox]) {padding:7px;border:1px solid #d9c8e8;border-radius:4px;background:#fff;color:inherit;font:inherit;min-width:0}
#animation-status {min-height:1.5em;font-size:13px;color:#624f75}
.animation-stage {display:grid;grid-template-rows:minmax(0,1fr) auto;height:clamp(530px,72dvh,860px);overflow:hidden;border:1px solid #e2d7eb;border-radius:6px;background:#fff}
.animation-preview {position:relative;display:grid;grid-template-rows:auto auto auto minmax(0,1fr);min-height:0;overflow:hidden}
.animation-preview .animation-actions {padding:8px 12px}
#animation-canvas {display:block;width:100%;height:100%;min-height:0;touch-action:none}
.animation-preview .edit-overlay {display:none}
#animation-dock {height:var(--motion-dock-height,clamp(230px,38dvh,360px));min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);border-top:1px solid #d9c8e8}
#animation-editor {overflow:auto;padding:12px 16px}
.motion-resize {display:grid;place-items:center;height:13px;background:#f5eefb;cursor:ns-resize;touch-action:none}
.motion-resize::before {content:'';width:30px;height:3px;border-radius:3px;background:#9d88b6}
.motion-resize:hover,.motion-resize:focus-visible,.motion-resize[data-dragging] {background:#ebdff7}
.motion-command {display:flex;flex-wrap:wrap;align-items:end;gap:12px;justify-content:space-between}
.motion-settings {display:flex;flex-wrap:wrap;align-items:end;gap:10px}
.motion-settings input[data-motion="speed"] {width:65px}
.motion-time,.motion-ruler {display:flex;justify-content:space-between}
.motion-ruler {font-size:11px;color:#67547c}
.motion-key-settings .motion-vector {grid-column:auto}
.motion-track-toolbar {display:flex;flex-wrap:wrap;gap:8px 14px;margin:8px 0}
.motion-track-toolbar label {display:flex;align-items:center;gap:5px}
.motion-track-toolbar input {width:88px}
.motion-time {display:flex!important;align-items:center;gap:8px}
.motion-time input {flex:1;min-width:80px}
.motion-scroll {overflow-x:auto;padding:4px 9px 7px}
.motion-track {min-width:100%;height:58px;position:relative;touch-action:pan-x;background:linear-gradient(#d4c3e8,#d4c3e8) left bottom 14px/100% 1px no-repeat}
.motion-tick {position:absolute;top:0;transform:translateX(-50%);font-size:10px;color:#67547c;font-variant-numeric:tabular-nums}
.motion-tick::after {content:'';display:block;height:11px;width:1px;background:#bca8d4;margin:3px auto}
.motion-playhead {position:absolute;top:14px;bottom:0;width:2px;background:#b2496d;pointer-events:none;z-index:1}
.animation-workspace .motion-marker {position:absolute;bottom:1px;transform:translateX(-50%);padding:1px 4px;border:0;background:#eee5fa;color:#694396;touch-action:none;z-index:2}
.animation-workspace .motion-marker[aria-pressed=true] {background:#654395;color:#fff}
.animation-workspace .model-file:focus-within,.motion-marker:focus-visible {outline:2px solid #7553a8}

.animation-workspace {background:#f5f2fa;color:#29213a}
.animation-workspace .model-workspace-main {max-width:1520px;padding-block:20px}
.animation-heading {display:flex;justify-content:space-between;align-items:end;gap:14px;margin-bottom:13px}
.animation-heading h1 {font-size:clamp(22px,3vw,32px);letter-spacing:-.04em;margin:0 0 9px}
.animation-title,.animation-library label {display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650}
.animation-title input {width:min(280px,52vw)}
.animation-library {display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:9px 0 14px;border-top:1px solid #e4ddec}
.animation-library select {max-width:min(250px,48vw)}
.animation-layout {display:grid;grid-template-columns:220px minmax(0,1fr);gap:13px}
.animation-sources,.animation-stage {border:1px solid #e3d9ee;border-radius:7px;background:#fff}
.animation-sources {padding:14px;min-width:0}
.animation-sources h2 {font-size:16px;margin:0 0 13px}
#animation-active-model {display:grid;gap:3px;padding:10px;background:#f3edf9;border-radius:5px;margin-bottom:11px;overflow-wrap:anywhere}
#animation-active-model span,.animation-sources>label[for] {font-size:12px;color:#6a5a80}
#animation-drop {display:grid;gap:5px;padding:14px 9px;margin:0 0 8px;text-align:center;border:1px dashed #a68bc7;background:#faf7fd;border-radius:5px}
#animation-drop small {color:#6a5a80}
#animation-drop:hover,#animation-drop[data-dragging] {background:#ede2f9;border-color:#6b439e}
#animation-browse,#animation-sample {width:100%;margin-bottom:12px}
#animation-sample {margin-top:5px}
#animation-status {line-height:1.55;margin:3px 0}
.animation-stage {height:clamp(570px,76dvh,900px);border-color:#dcd0e8}
.animation-viewport-bar,.animation-tools {display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.animation-viewport-bar {justify-content:space-between;padding:7px 9px;border-bottom:1px solid #e9e0ef;background:#fcf9fe}
.animation-tools button {font-size:12px;padding:5px 8px}
.animation-workspace kbd {font:10px system-ui;opacity:.77}
.animation-canvas-wrap {position:relative;min-height:0;overflow:hidden}
.animation-preview .edit-overlay {display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;touch-action:none}
.animation-preview .handle-hit {pointer-events:stroke;cursor:grab;touch-action:none}
.animation-preview rect.handle-hit {pointer-events:all}
#selection-box {position:absolute;pointer-events:none;border:1px solid #865cb7;background:#865cb72b}
.animation-key-hint {position:absolute;bottom:9px;left:9px;right:9px;display:flex;align-items:center;justify-content:space-between;gap:8px;pointer-events:none}
.animation-key-hint span {background:#ffffffec;padding:6px 8px;font-size:12px;color:#55436a;border-radius:4px}
#animation-key {pointer-events:auto;flex-shrink:0;background:#654395;color:#fff;border-color:#654395}
#animation-dock {background:#fff}
#animation-editor {padding:8px 12px}
.animation-workspace .motion-timeline {border:1px solid #e4d8ee;background:#f8f4fb;border-radius:6px;padding:10px}
.animation-workspace .motion-command {align-items:center}
.animation-workspace .motion-settings {margin-block:3px}
.animation-workspace .motion-key-settings {grid-template-columns:repeat(auto-fit,minmax(105px,1fr))}
.animation-workspace .motion-key-settings .motion-vector {grid-column:span 2}
.animation-workspace button:focus-visible,.animation-workspace a:focus-visible,.animation-workspace select:focus-visible {outline:2px solid #7553a8;outline-offset:2px}
#animation-picker {width:min(480px,calc(100vw - 28px));max-height:75dvh;padding:17px;border:1px solid #d7c7e7;border-radius:8px;color:#302342}
#animation-picker::backdrop {background:#21153170}
#animation-picker header {display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
#animation-picker h2 {font-size:18px;margin:0}
#animation-picker label {display:grid;gap:4px;font-size:13px;margin-bottom:9px}
#animation-model-list {display:grid;gap:5px}
#animation-model-list button {text-align:left;overflow-wrap:anywhere}
#animation-picker-status {font-size:13px;color:#6a5a80}
@media(max-width:850px){
 .animation-layout {grid-template-columns:minmax(0,1fr)}
 .animation-sources {display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
 .animation-sources h2,.animation-sources #animation-status {width:100%;margin:0}
 #animation-active-model,#animation-drop,#animation-browse,#animation-sample {width:auto;margin:0}
 #animation-active-model {padding:6px 8px}
 #animation-drop {padding:6px 9px}
 #animation-drop small {display:none}
}
@media(max-width:520px){
 .animation-heading {align-items:start;flex-wrap:wrap}
 .animation-stage {height:clamp(590px,87dvh,740px)}
 .animation-key-hint span {max-width:60%}
}
.animation-joint-bar {display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 12px;background:#f4eef9;border-top:1px solid #e9e0f0}
.animation-joint-bar strong {margin-right:auto;font-size:13px;color:#402a58}
.animation-joint-bar button {font-size:12px}
.animation-preview .joint-line {stroke:#ae79eb;stroke-opacity:.8;stroke-width:2;stroke-dasharray:4 3;pointer-events:none}
.animation-preview .joint-dot {fill:#6937a7;stroke:#fff;stroke-width:2.5;pointer-events:all;cursor:crosshair}
.animation-preview .joint-dot[data-active=true],.animation-preview .joint-dot:hover {fill:#f9c468;stroke:#3c205c;stroke-width:3}
.animation-workspace .motion-marker[data-joint-key=true]:not([aria-pressed=true]) {background:#dbc2f5;color:#442069}
#animation-avatar {width:100%;margin-block:8px;background:#f2e7fc;color:#512582;border-color:#d4b7ec;font-weight:700}

.animation-navigation {display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;padding:5px 12px;background:#fcf9fe;color:#5c4b71;font-size:12px}
.animation-navigation span {margin-right:auto}
.animation-navigation label {display:flex;align-items:center;gap:5px}
.animation-navigation select {padding:2px 5px;font-size:12px}
#animation-canvas:focus-visible {outline:2px solid #8057ae;outline-offset:-2px}
