/* Shared studio navigation and focused creation surfaces. */
.hm-sidebar a{color:inherit;text-decoration:none}
.hm-sidebar button,.hm-notice button{font:inherit;cursor:pointer}
.toolson .ct-page{margin-left:var(--hm-sidebar);padding:0 28px 32px}
.ct-heading{max-width:1520px;margin:0 auto;display:flex;align-items:center;gap:12px;min-height:80px;padding:6px 0 20px}
.ct-heading-icon{width:42px;height:42px;flex:0 0 42px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;background:var(--surf);color:var(--acc)}
.ct-heading-icon>.ui-icon{width:23px;height:23px}.ct-audio-icon{color:#91c7ab}
.ct-eyebrow{display:block;font-size:10px;color:var(--dim);margin-bottom:1px}
.ct-heading h2{margin:0;font-size:21px;font-weight:650;line-height:1.45}
.ct-model{align-self:center;padding:3px 8px;border:1px solid var(--line);border-radius:4px;color:var(--dim);font-size:10px;margin-left:6px}
.ct-workspace{margin-left:auto;font-size:11px;background:transparent;min-height:34px}.ct-workspace>.ui-icon{width:15px;height:15px}
.ct-mobile-views{display:none}
.ct-page .ct-layout{max-width:1520px;grid-template-columns:340px minmax(0,1fr);gap:28px;padding:0;margin:0 auto}
/* overflow 用 clip 不用 hidden：hidden 是个「没有滚动条的滚动容器」，任何一次
   .focus() / scrollIntoView（点开关、复用提示词、切页签）都能把它滚上去，
   而它没滚动条，用户滚不回来——标题和输入框就这么没了。clip 压根不建滚动容器。
   撑出溢出的那个 bug 已在 form.css 修掉，这里是兜底：以后再有元素溢出也不会坍。 */
/* 高度要按「还没滚动时」的位置算：那时面板顶在页面标题下面（比 sticky 的 top 低 66px），
   按 sticky 之后的位置算出来的 88px 会让面板底下出界 48px，
   「生成视频」被视口切掉一截，非得先滚一下页面才点得到。 */
.ct-page .ct-compose{top:calc(var(--hm-notice) + 70px);max-height:calc(100dvh - var(--hm-notice) - 144px);padding:0;overflow:clip;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:8px;background:var(--surf);box-shadow:none}
.ct-compose-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);flex:0 0 auto}
.ct-compose-heading h3{margin:0;font-size:13px;font-weight:600}.ct-compose-heading>span{color:var(--dim);font-size:9px}
/* 唯一负责滚动的那一层：flex:1 让它吃掉标题条和提交条以外的全部高度，
   scrollbar-gutter 预留槽位，免得内容一长就整栏横向抖一下。 */
.ct-compose-scroll{flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--dim) 42%,transparent) transparent;scrollbar-gutter:stable;padding:18px;min-height:0}
.ct-compose-scroll::-webkit-scrollbar{width:9px}
.ct-compose-scroll::-webkit-scrollbar-track{background:transparent}
.ct-compose-scroll::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--dim) 42%,transparent);border-radius:99px;border:2px solid var(--surf)}
.ct-page .ct-prompt-label{display:flex;align-items:center;margin-top:0;gap:3px}
.ct-char-count{margin-left:auto;color:var(--dim);font-size:10px;font-weight:400}
.ct-compose label{font-size:11px;font-weight:500;margin-top:16px;margin-bottom:7px}
.ct-compose input[type=text],.ct-compose input[type=number],.ct-compose textarea,.ct-compose select{background:var(--bg);border-color:var(--line);border-radius:5px;box-shadow:none;font-size:12px;padding:9px 10px}
.ct-compose select{height:36px;padding-right:28px;text-overflow:ellipsis}.ct-compose .selwrap::after{right:12px;width:6px;height:6px}
.ct-compose textarea{min-height:136px;line-height:1.8}.ct-compose textarea:focus{outline:1px solid var(--acc);outline-offset:0}
.ct-compose #mlyrics{min-height:104px}.ct-compose #ttsdesc,.ct-compose #ttsreftext{min-height:94px}
.ct-compose .grid2{gap:10px}.ct-compose .grid2>div{display:flex;flex-direction:column}.ct-compose .grid2 label{margin-top:16px}
.ct-compose .chips{gap:4px;flex-wrap:nowrap}.ct-compose .chips button{background:transparent;padding:4px 0;font-size:10px;box-shadow:none;min-height:25px}
.ct-compose .chips button.on{background:var(--soft);border-color:var(--acc)}
.ct-presets{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}
.ct-presets>button{display:inline-flex;align-items:center;gap:4px;min-height:26px;padding:4px 7px;border:1px solid var(--line);border-radius:4px;background:transparent;color:var(--dim);font:inherit;font-size:10px;cursor:pointer}
.ct-presets>button:hover{border-color:var(--dim);color:var(--fg)}.ct-presets .ui-icon{width:12px;height:12px}
.ct-section{padding-top:18px;margin-top:20px;border-top:1px solid var(--line)}
.ct-section>h3{margin:0 0 14px;font-size:12px;font-weight:600}.ct-section>h3+label{margin-top:0}
.ct-section>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:12px;font-weight:550}
.ct-section>summary::-webkit-details-marker{display:none}.ct-section>summary>.ui-icon{width:15px;height:15px;color:var(--dim)}
.ct-section>summary small{color:var(--dim);font-size:10px;font-weight:400;margin-left:auto}
.ct-section .ct-chevron{margin-left:auto;width:13px;height:13px;transition:transform .15s}.ct-section[open]>summary>.ct-chevron{transform:rotate(90deg)}
.ct-tier-detail{margin-top:8px;color:var(--dim);font-size:10px}.ct-tier-detail summary{cursor:pointer;width:max-content}.ct-tier-detail .subhint{font-size:11px;margin-bottom:0}
.ct-compose #durhint{font-size:10px!important;line-height:1.7;margin-bottom:0}
.ct-compose .seedrow .iconbtn{width:36px;flex:0 0 36px;padding:0;border:1px solid var(--line);border-radius:5px;box-shadow:none;background:var(--bg)}
.ct-compose .opt{font-size:11px}.ct-compose .opt .q{margin-left:auto}.ct-compose .q{box-shadow:none;background:var(--hole)}
.ct-compose .refs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.ct-compose .slot{border-radius:5px;background:var(--bg);max-height:96px}
.ct-compose .frow,.ct-compose .grow{border:1px solid var(--line);border-radius:5px;box-shadow:none;background:var(--bg);padding:8px;font-size:11px}
.ct-compose .fadd{min-height:44px;border-style:dashed}.ct-compose .fi,.ct-compose .gkind{box-shadow:none;background:var(--hole);border-radius:3px}
.ct-compose .frow .fx,.ct-compose .frow .tg{box-shadow:none;background:var(--hole);border-radius:4px;padding:3px 6px}
.ct-compose .subhint,.ct-compose label .hint,.ct-compose .seedlock{font-size:10px;color:var(--dim)}
.ct-submit{flex:0 0 auto;border-top:1px solid var(--line);background:var(--surf);padding:14px 18px 12px}
.ct-submit .go{margin-top:0;min-height:42px;font-size:12px;background:var(--acc);color:var(--on-accent);border-radius:5px}
.ct-submit .go:disabled{background:var(--hole);color:var(--dim)}
.ct-submit .est{font-size:10px;margin-top:8px;min-height:0;overflow-wrap:anywhere}.ct-submit .est:empty{display:none}
/* 音频页三种模式各自带提交按钮，按钮长在滚动区里面。让它黏在滚动区底边，
   和视频页那颗固定的「生成视频」看齐——否则表单一长（克隆音色展开后近两屏）
   按钮就滚没了，人以为页面坏了。 */
.ct-compose-scroll .ct-submit{position:sticky;bottom:-18px;z-index:3;margin:20px -18px -18px}
/* 配音的结果区排在按钮后面，负的下外边距会压它 18px，补回来 */
.ct-compose-scroll .ct-submit + *{margin-top:32px}
.ct-page .ct-audio-modes{flex:0 0 auto;width:calc(100% - 36px);margin:14px 18px 0;padding:3px;background:var(--bg);border:1px solid var(--line);border-radius:5px}
.ct-page .ct-audio-modes .tab{gap:5px;padding:7px 0;font-size:11px;min-height:32px;border-radius:3px;box-shadow:none}
.ct-page .ct-audio-modes .tab .ui-icon{width:14px;height:14px}.ct-page .ct-audio-modes .tab.on{background:var(--hole);color:var(--fg)}
.ct-page .warnbox{border-left:2px solid var(--warn);border-radius:0;background:transparent;box-shadow:none;font-size:11px;padding:2px 0 2px 10px}
.ct-page #ttsclonewrap{background:transparent;border-radius:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 0;box-shadow:none}
.ct-page .go.sub{box-shadow:none;background:var(--hole);border:1px solid var(--line);color:var(--fg);font-size:11px}
.ct-page .ttsout{box-shadow:none;border:1px solid var(--line);background:var(--bg);border-radius:6px;padding:10px}
.ct-results{min-width:0}.ct-results-heading{display:flex;align-items:center;gap:8px;min-height:38px;margin-bottom:12px}
.ct-results-heading h3{flex:1;margin:0;font-size:14px;font-weight:600;display:flex;align-items:center;gap:9px}.ct-results-heading h3>span{font-size:10px;color:var(--dim);font-weight:400;padding:1px 6px;background:var(--surf);border:1px solid var(--line);border-radius:4px}
.ct-history-caption{font-size:10px;color:var(--dim)}.ct-results-heading .iconbtn{width:30px;height:30px;border:1px solid var(--line);background:transparent}
.ct-results-heading .iconbtn .ui-icon{width:14px;height:14px}.ct-results-heading #clearall:hover,.ct-results-heading #aclearall:hover{color:var(--bad)}
.ct-results-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:18px}
.ct-filters{display:flex;align-items:center;gap:3px}.ct-filters>button{border:0;background:transparent;border-radius:4px;color:var(--dim);font:inherit;font-size:11px;padding:5px 8px;min-height:28px;cursor:pointer}
.ct-filters>button[aria-pressed=true]{color:var(--fg);background:var(--hole)}.ct-filters>button:hover{color:var(--fg)}
.ct-search{display:flex;align-items:center;gap:7px;min-height:30px;width:170px;flex:1 1 130px;margin:0 0 0 auto!important;padding:5px 9px;border:1px solid var(--line);border-radius:5px;background:var(--surf);color:var(--dim)}
.ct-search:focus-within{border-color:var(--acc)}.ct-search .ui-icon{width:13px;height:13px}.ct-search input{width:100%;color:var(--fg);background:transparent;border:0;outline:none;font:inherit;font-size:11px;padding:0}
.ct-results-toolbar .ct-kind-filter{width:100px;min-height:30px;padding:4px 6px;font-size:11px;border-radius:5px;background:var(--surf);appearance:auto}
.ct-page .ct-queue{padding:12px 0 14px;margin-bottom:18px}.ct-queue .qtitle{display:flex;align-items:center;gap:7px;font-size:11px;margin-bottom:6px}.ct-queue .dot{width:6px;height:6px}.ct-queue .qtitle>span:last-child{margin-left:auto;color:var(--dim)}
.ct-queue .qrow{gap:8px;flex-wrap:wrap;padding:8px 0}.ct-queue .qnum{border:1px solid var(--line);box-shadow:none;border-radius:4px;width:23px;height:23px;font-size:10px}
.ct-queue .qtext{font-size:11px;flex-basis:110px}.ct-queue .qeta,.ct-queue .qdur{font-size:10px}.ct-queue .qx{box-shadow:none;background:var(--hole);border-radius:4px}
.ct-page .cards,.ct-page .acards{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));column-gap:16px}
.ct-page .card,.ct-page .acard{padding:0;background:var(--surf);border-color:var(--line);border-radius:7px;box-shadow:none}
.ct-page .thumb{border-radius:6px 6px 0 0;box-shadow:none;background:var(--hole);max-height:min(52vh,440px)}
.ct-page .thumb img,.ct-page .thumb video{background:#141516}.ct-page .cbody{padding:12px;gap:10px}.ct-page .cp{font-size:12px;line-height:1.7;opacity:1}
.ct-page .cmeta{gap:7px;font-size:10px}.ct-page .cmeta .st{background:var(--hole);box-shadow:none;padding:2px 6px;border-radius:4px;font-size:9px}
.ct-page .cmeta .m-size{font-size:10px}.ct-page .cmeta .m-seed{box-shadow:none;font-size:9px;padding:2px 5px;background:var(--bg);border-radius:3px}
.ct-page .cmeta .del,.ct-page .cmeta .cancel,.ct-page .m-dl .enh{box-shadow:none;background:var(--hole);border-radius:4px;font-size:10px;padding:3px 7px}
.ct-page .m-dl a{color:var(--acc);font-size:10px;text-decoration:none}.ct-page .abody{padding:14px;display:flex;flex-direction:column;gap:12px}.ct-page .ap{margin:0;font-size:12px;line-height:1.7}
.ct-page .acard .media{margin:0}.ct-page .acard audio{width:100%;height:38px}.ct-page .acard video{width:100%;max-height:340px}.ct-page .acard .await{font-size:11px;min-height:58px;padding:16px 0;color:var(--dim)}
.ct-reuse{border:0;background:transparent;color:var(--dim);padding:3px;display:grid;place-items:center;cursor:pointer;border-radius:4px}.ct-reuse .ui-icon{width:13px;height:13px}.ct-reuse:hover{color:var(--acc);background:var(--hole)}
.ct-page .cards>.empty,.ct-page .acards>.empty{display:none}
.ct-empty{min-height:340px;padding:58px 12px 28px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;text-align:center}
.ct-empty-icon{width:58px;height:58px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surf);color:var(--dim)}.ct-empty-icon .ui-icon{width:28px;height:28px}
.ct-empty h3{font-size:13px;font-weight:450;color:var(--dim);margin:0}.ct-empty>.mini{font-size:11px;background:transparent}
.ct-starters{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:min(440px,100%);margin-top:12px}
.ct-starters>button{border:1px solid var(--line);padding:0;border-radius:6px;overflow:hidden;background:var(--surf);color:var(--fg);font:inherit;cursor:pointer;text-align:left}
.ct-starters img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block}.ct-starters>button>span{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;font-size:11px}.ct-starters .ui-icon{width:13px;height:13px}.ct-starters>button:hover{border-color:var(--dim)}
.ct-sound-presets{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;margin-top:12px}.ct-sound-presets>button{display:flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--surf);border-radius:5px;padding:9px 11px;color:var(--dim);font:inherit;font-size:11px;cursor:pointer}.ct-sound-presets .ui-icon{width:16px;height:16px}
.ct-load-error{display:flex;align-items:center;justify-content:space-between;gap:12px;border-left:2px solid var(--bad);padding:8px 12px;margin-bottom:16px;color:var(--bad);font-size:12px;background:var(--surf)}.ct-load-error .mini{font-size:11px;min-height:28px;padding:4px 9px}
.studio-shell .fw-modal-box{background:var(--surf);border:1px solid var(--line);border-radius:8px;box-shadow:0 16px 64px #00000055}
.studio-shell .fw-modal-body .fw-m-grp{border-radius:0;box-shadow:none;background:transparent;padding:16px 0;border-top:1px solid var(--line)}
.studio-shell .fw-modal-body input,.studio-shell .fw-modal-body textarea{background:var(--bg);border:1px solid var(--line);border-radius:5px;box-shadow:none;color:var(--fg);font-size:12px}
@media(min-width:1700px){.ct-page .ct-layout{grid-template-columns:370px minmax(0,1fr);gap:32px}}
@media(max-width:1200px){.toolson .ct-page{padding:0 22px 28px}.ct-page .ct-layout{grid-template-columns:310px minmax(0,1fr);gap:20px}.ct-search{width:100%;flex-basis:100%}.ct-results-toolbar .ct-kind-filter{flex:1}.ct-results-toolbar:has(.ct-kind-filter) .ct-search{flex-basis:130px}}
@media(max-width:940px){.ct-page .ct-layout{grid-template-columns:minmax(0,1fr)}.ct-page .ct-compose{position:static;max-height:none;width:100%;border-radius:6px}.ct-compose-scroll{overflow:visible}.ct-compose .ct-submit{position:sticky;bottom:0;z-index:2}.ct-mobile-views{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--line);border-radius:6px;margin-bottom:18px;background:var(--surf)}.ct-mobile-views>button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;min-height:33px;padding:5px;border:0;border-radius:3px;background:transparent;color:var(--dim);font:inherit;font-size:12px;cursor:pointer}.ct-mobile-views>button[aria-pressed=true]{background:var(--hole);color:var(--fg)}.ct-mobile-views .ui-icon{width:15px;height:15px}.ct-search{flex-basis:140px}.ct-empty{min-height:300px}.ct-heading{min-height:72px;padding-bottom:16px}.ct-page .cards,.ct-page .acards{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))}}
@media(max-width:600px){.toolson .ct-page{padding:0 14px 24px}.ct-heading{gap:9px;min-height:76px}.ct-heading-icon{width:35px;height:35px;flex-basis:35px;border-radius:6px}.ct-heading-icon .ui-icon{width:20px;height:20px}.ct-heading h2{font-size:18px}.ct-eyebrow{font-size:9px}.ct-model{font-size:9px;margin-left:0;padding:2px 5px}.ct-workspace{padding:7px;font-size:10px;min-height:32px}.ct-workspace>span{display:none}.ct-workspace>.ui-icon{width:17px;height:17px}.ct-history-caption{font-size:9px}.ct-results-heading h3{font-size:13px}.ct-filters>button{font-size:10px;padding:5px 7px}.ct-results-toolbar{gap:8px}.ct-search{flex-basis:100%}.ct-results-toolbar:has(.ct-kind-filter) .ct-search{flex-basis:150px}.ct-results-toolbar .ct-kind-filter{max-width:115px}.ct-queue .qeta{flex:1 1 100px;white-space:normal}.ct-compose-heading{padding:14px 16px}.ct-compose-scroll{padding:16px}.ct-compose-scroll .ct-submit{margin-left:-16px;margin-right:-16px;margin-bottom:-16px}.ct-compose .ct-submit{padding:12px 16px}.ct-compose input[type=text],.ct-compose input[type=number],.ct-compose textarea,.ct-compose select{font-size:14px}.ct-compose label{font-size:12px}.ct-presets>button{font-size:11px;min-height:29px}.ct-empty{padding-top:40px}.ct-starters{gap:9px}.ct-starters>button>span{font-size:10px}.ct-page .ct-audio-modes .tab{min-height:36px;font-size:12px}}

/* 历史还没拉回来：图标换成转圈，别和「还没有作品」长得一样 */
.ct-empty.ct-loading .ct-empty-icon .ui-icon{display:none}
.ct-empty.ct-loading .ct-empty-icon::after{content:"";width:22px;height:22px;border:2px solid var(--line);
  border-top-color:var(--acc);border-radius:50%;animation:sp 1s linear infinite}
