/* studio-v1.css — 工作室（工作室组件尺寸参考 ainudez.net /zh/studio） */
/* 三页统一：只靠顶栏 8px 外边距，main 不再额外垫上内边距。 */
body:has(> main > .st-page){background:#0b0d0e}
main:has(> .st-page){padding-block:0 24px}
.st-page{margin:0 auto}
.st-page h1{font-family:Inter,sans-serif;font-size:1.875rem;line-height:1.33334;font-weight:700;letter-spacing:-.025em;margin:0;color:#f0f4f8}
.st-sub{margin:var(--sp-4) 0 16px;font-size:0.875rem;line-height:1.5;color:#9fa6ad}
.st-block{margin:0 0 16px;padding:0;border:0;min-inline-size:0}
/* 区块标题：12px uppercase，来自 joy-rasxvr / joy-11pldiy */
.st-label{display:flex;align-items:center;gap:0;margin:0 0 6px;padding:0;font-family:Inter,sans-serif;font-size:0.75rem;line-height:1.5;font-weight:500;letter-spacing:0;text-transform:uppercase;color:#cdd7e1}
.st-i{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-left:clamp(4px,.375em,.75rem);border-radius:50%;background:#9fa6ad;color:#0b0d0e;font-size:10px;font-weight:700;line-height:1;letter-spacing:0;text-transform:none;cursor:help;flex:none}
/* 首帧上传框：140×140，来自 joy-w2g308 */
.st-frame-wrap{position:relative;display:inline-block}
.st-frame{display:flex;align-items:center;justify-content:center;flex-direction:column;width:140px;height:140px;padding:0;border:1px solid #32383e;border-radius:8px;background:#0b0d0e;color:#9fa6ad;font:inherit;cursor:pointer;overflow:hidden}
.st-frame:hover{border-color:#555e68}
.st-frame.has-img{border:3px solid #0b6bcb}
.st-frame-empty{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:1rem;line-height:1.5;color:#cdd7e1;padding:8px;text-align:center}
.st-frame-empty svg{width:48px;height:48px;fill:#9fa6ad}
.st-frame img{width:100%;height:100%;object-fit:cover}
.st-frame-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.55);border-radius:inherit}
.st-frame-del{position:absolute;top:-7px;right:-7px;width:22px;height:22px;border:0;border-radius:50%;background:#171a1c;color:#cdd7e1;font-size:12px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
/* 与生成器详情页的分段 tab 共用视觉规格。 */
.st-opts{display:inline-flex;flex-wrap:wrap;gap:8px;max-inline-size:100%;padding:0;border-radius:0;background:transparent;vertical-align:top}
.st-opts button{min-inline-size:0;overflow-wrap:anywhere;appearance:none;border:1px solid #3a4046;border-radius:10px;background:transparent;color:#cdd7e1;font:inherit;font-size:16px;font-weight:400;line-height:1.5;padding:6px 16px;cursor:pointer;transition:border-color .15s ease,color .15s ease,box-shadow .15s ease}
.st-opts button:hover{border-color:#55606b}
.st-opts button[aria-pressed="true"]{border-color:var(--brand);color:var(--text);box-shadow:0 0 0 1px var(--brand) inset}
.st-opts button:focus-visible,.st-frame:focus-visible,.st-frame-del:focus-visible,.st-switch input:focus-visible + .st-switch-track{outline:2px solid #97c3f0;outline-offset:2px}
.st-opts button:focus-visible{outline-offset:-3px}
/* 词条 chip：Chip variantSoft colorPrimary dark：bg=#0a2744 color=#c7dff7 */
/* 辅助词按分类在模板中分行；组内宽度不够时继续换行。 */
.st-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0;align-items:flex-start}
.st-helper{display:flex;flex-direction:column;gap:8px;padding-block:4px}
.st-chip-row{display:flex;flex-wrap:wrap;gap:8px}
.st-chip{appearance:none;display:inline-flex;align-items:center;gap:4px;border:0;border-radius:1.5rem;background:#0a2744;color:#c7dff7;font:500 .875rem/1.5 Inter,sans-serif;padding:0 .5rem;cursor:pointer;flex:none;min-height:1.5rem;max-inline-size:100%;white-space:normal;text-align:start;overflow-wrap:anywhere}
.st-chip:hover{background:#12467b}
.st-plus{font-size:16px;line-height:1;display:inline-flex;flex:none}
.st-plus svg{width:1em;height:1em;fill:currentColor;margin-inline-end:-2px}
/* 分组胶囊 — 未选中：Chip variantOutlined neutral dark：border=#32383e bg=#0b0d0e color=#cdd7e1 */
/*              选中：Chip variantSolid neutral dark：bg=#636b74 color=#fff */
.st-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-top:var(--sp-4);overflow-x:auto;scrollbar-width:none}
.st-tabs::-webkit-scrollbar{display:none}
.st-tab{appearance:none;border:1px solid #32383e;border-radius:999px;background:transparent;color:#9fa6ad;font:inherit;font-family:Inter,sans-serif;font-size:1rem;line-height:1.5;padding:0 11px;cursor:pointer;min-height:1.75rem;font-weight:500;white-space:nowrap}
.st-tab:hover{background:#171a1c}
.st-tab[aria-pressed="true"]{background:#636b74;border:0;padding-inline:12px;color:#fff;font-weight:500}
/* 提示词：Textarea variantOutlined neutral dark——border=#32383e bg=#0b0d0e */
.st-page textarea{width:100%;min-height:76px;resize:vertical;border:1px solid #32383e;border-radius:6px;background:#0b0d0e;color:#cdd7e1;font:inherit;font-family:Inter,sans-serif;font-size:0.875rem;line-height:1.5;padding:6px 8px;box-sizing:border-box;margin-bottom:8px}
.st-page textarea:focus{outline:none;box-shadow:inset 0 0 0 2px #0b6bcb}
.st-page textarea::placeholder{color:#cdd7e1;opacity:.64}
.st-prompt-block textarea{display:block}
.st-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
/* 清空/使用方式：Button variantOutlined neutral dark——border=#32383e color=#cdd7e1 */
.st-ghost{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;border:1px solid #32383e;border-radius:6px;background:transparent;color:#cdd7e1;font:inherit;font-family:Inter,sans-serif;font-size:0.875rem;font-weight:600;cursor:pointer;padding:6px 16px;width:100%}
.st-ghost:hover{background:#171a1c}
.st-ghost svg{width:20px;height:20px;fill:currentColor;flex:none}
/* 翻译开关：Switch variantSolid colorNeutral dark——track bg=#636b74 w=26 h=16 thumb=10 */
.st-translate{display:flex;align-items:center;gap:8px;margin:0 0 16px}
.st-translate .st-label{margin:0;font-size:0.75rem;text-transform:uppercase;font-weight:600}
.st-switch{display:inline-flex;cursor:pointer;align-self:center}
.st-switch input{position:absolute;opacity:0;width:0;height:0}
.st-switch-track{position:relative;display:flex;align-items:center;width:26px;height:16px;border-radius:999px;background:#32383e}
.st-switch-track::after{content:"";position:absolute;top:3px;left:3px;width:10px;height:10px;border-radius:50%;background:#fff;transition:transform .18s}
.st-switch input:disabled + .st-switch-track{opacity:.55;cursor:not-allowed}
.st-switch input:checked + .st-switch-track{background:#636b74}
.st-switch input:checked + .st-switch-track::after{transform:translateX(10px)}
/* 生成按钮：Button variantSolid colorPrimary lg——disabled=bg:#171a1c color:#9fa6ad */
.st-generate{appearance:none;display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:44px;padding:8px 24px;margin:0;border:0;border-radius:6px;background:#0b6bcb;color:#fff;font:inherit;font-family:Inter,sans-serif;font-size:1rem;font-weight:600;cursor:pointer;line-height:1.5}
.st-generate:hover:not(:disabled){background:#185ea5}
.st-generate:disabled{background:#171a1c;color:#9fa6ad;cursor:not-allowed;pointer-events:none}
.st-wand{width:24px;height:24px;fill:currentColor;flex:none}
.st-hint{margin:8px 0 0;font-size:12px;line-height:18px;color:#9fa6ad}
.st-output{margin:18px 0 0;padding:12px 14px;border:1px solid #32383e;border-radius:8px;background:#0f1215}
.st-spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:st-spin .8s linear infinite;display:inline-block}
@keyframes st-spin{to{transform:rotate(360deg)}}
.st-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);max-width:min(92vw,520px);padding:10px 16px;border-radius:6px;background:#430a0a;color:#f7c5c5;font-size:14px;z-index:40}
.st-dialog{border:1px solid #32383e;border-radius:12px;background:#11151a;color:#cdd7e1;padding:18px;max-width:min(94vw,560px)}
.st-dialog::backdrop{background:rgba(0,0,0,.72)}
.st-dialog h2{margin:0 0 12px;font-size:17px;color:#f0f4f8}
.st-dialog ul{margin:0;padding-left:18px;font-size:14px;line-height:22px;color:#9fa6ad}
.st-dialog li+li{margin-top:8px}
.st-close{position:absolute;top:8px;right:10px;border:0;background:transparent;color:#9fa6ad;font-size:20px;cursor:pointer}
:is(.st-page,.st-dialog) [hidden],.st-toast[hidden]{display:none!important}
/* 生成流程：提交时按钮内转圈；弹窗保持同一画面区域，由等待切换到视频。 */
.st-generate{position:sticky;bottom:10px;z-index:10}
.st-generate.is-loading .st-wand,.st-generate.is-loading #st-submit-label{visibility:hidden}
.st-generate .st-spinner{position:absolute;width:28px;height:28px}
@media(prefers-reduced-motion:reduce){.st-spinner{animation:none}}
