/* Interaction controls follow the shared glass surface and blue focus system. */
.chat-cast-container{min-width:0;width:100%}
.chat-cast-tools{display:flex;align-items:center;gap:7px;padding:0 4px 9px;min-width:0}
.chat-cast-search{display:flex;align-items:center;gap:7px;min-width:110px;max-width:240px;flex:1;color:var(--st-muted);background:var(--st-glass-control);border-radius:15px;padding:0 10px}
.chat-cast-search input{background:transparent!important;box-shadow:none!important;padding:8px 0!important;min-height:35px;height:35px;font-size:13px;border-radius:0}
.chat-cast-search>.icon{flex:none}
.chat-cast-tools>.custom-select{width:132px;flex:none}
.chat-cast-tools .gc-trigger{min-height:35px;height:35px;padding:7px 10px;border-radius:15px;font-size:12px;gap:5px}
.chat-cast-tools>.icon-btn,.chat-cast-arrows>.icon-btn{width:33px;min-width:33px;min-height:33px;height:33px;background:var(--st-glass-control)!important;box-shadow:none!important}
.chat-cast-tools .is-active{background:var(--st-hover)!important;color:var(--accent-display)}
.chat-cast-count{font-size:12px;color:var(--st-muted);padding-inline:2px;min-width:20px;text-align:center;font-variant-numeric:tabular-nums}
.chat-cast-arrows{display:flex;gap:4px;margin-left:auto}
.chat-character-row{display:flex!important;grid-template-columns:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;gap:11px;width:100%;margin:0;padding:5px 4px 10px;justify-content:flex-start}
.chat-character-item{position:relative;flex:0 0 146px;min-width:0;width:146px;scroll-snap-align:start}
.chat-character-item>.chat-character-card{width:100%;min-width:0;height:100%;padding:8px 8px 12px;gap:10px;flex:none}
.chat-character-item .chat-character-picture{width:100%;height:166px;aspect-ratio:auto}
.chat-character-actions{display:flex;position:absolute;top:12px;left:12px;right:12px;justify-content:space-between;pointer-events:none}
.chat-character-actions>button{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;pointer-events:auto;color:#eff6ff;background:rgba(10,31,65,.32);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);opacity:.86;transition:opacity .15s,background .15s}
.chat-character-actions>button:hover,.chat-character-actions>button:focus-visible{opacity:1;background:rgba(32,81,164,.7)}
.chat-character-actions>.is-active{color:#a9ccff;background:rgba(27,74,158,.7)}
.chat-character-actions>.is-active>.icon{fill:rgba(125,177,255,.5)}
.chat-character-row.is-compact{justify-content:flex-start;gap:7px;padding:2px 3px 8px}
.chat-character-row.is-compact>.chat-character-item{width:66px;flex-basis:66px}
.chat-character-row.is-compact .chat-character-card{width:100%;min-width:0;padding:5px 5px 7px;gap:5px;border-radius:17px;background:transparent;box-shadow:none}
.chat-character-row.is-compact .chat-character-card.selected{background:var(--st-hover);box-shadow:inset 0 0 0 1.3px rgba(89,149,255,.55)}
.chat-character-row.is-compact .chat-character-picture{width:44px;height:44px;aspect-ratio:1;border-radius:13px;align-self:center}
.chat-character-row.is-compact .chat-character-actions{display:none}
.chat-character-row.is-compact .chat-character-name{font-size:11px}
.chat-cast-container.is-compact .chat-cast-tools{padding-bottom:5px}
.chat-cast-container.is-compact .chat-cast-search input{height:30px;min-height:30px}
.chat-cast-empty{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:35px 10px;color:var(--st-muted);font-size:13px}
.chat-inline-options{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;padding:0 2px 9px;overscroll-behavior-x:contain}
.chat-inline-options::-webkit-scrollbar{display:none}
.chat-option{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:6px 10px;min-height:30px;white-space:nowrap;border-radius:999px;background:var(--st-soft);color:var(--st-muted);font-size:11px;flex:none;transition:background .15s,color .15s}
.chat-option:hover,.chat-option.active{background:var(--st-hover);color:var(--accent-display)}
.chat-task-heading>[data-task-menu]{background:transparent!important;box-shadow:none!important;color:var(--st-muted);width:28px;min-width:28px;min-height:28px}
.chat-top-actions>[data-chat-extra=conversation]{background:transparent!important;box-shadow:none!important;color:var(--st-muted)}
.chat-undo{display:flex;align-items:center;justify-content:center;gap:10px;color:var(--st-muted);font-size:12px;margin-bottom:8px}
.account-extra-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.account-favorite.active{color:var(--accent-display)!important}
.account-favorite.active .icon{fill:var(--st-hover)}
.account-select-check{width:17px!important;height:17px!important;min-height:17px!important;padding:0!important;accent-color:var(--st-accent);flex:none;cursor:pointer}
.account-bulk{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0;padding:8px 12px;border-radius:18px;background:var(--st-hover);font-size:13px}
.account-bulk[hidden]{display:none}
.account-bulk .toolbar{gap:3px}
.account-bulk .btn{min-height:33px;padding:7px 10px;font-size:12px}
.account-queue{display:flex;flex-direction:column;gap:8px}
.account-queue-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:18px;background:var(--st-soft);font-size:13px}
.account-queue-row>div{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.account-queue-row small{color:var(--st-muted);font-size:11px}
.account-queue-row strong{white-space:nowrap;font-weight:500}
.account-queue-row>div>strong{overflow:hidden;text-overflow:ellipsis;max-width:100%}
.account-queue-total{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:13px 0}
.account-queue-total strong{font-size:23px;font-weight:500;letter-spacing:-.03em}
.account-builder-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.account-builder-form{display:flex;flex-direction:column;gap:13px;min-width:0}
.account-builder-preview{display:flex;flex-direction:column;gap:12px;min-width:0}
.account-builder-preview .code-box{margin:0;flex:1;min-height:230px;max-height:430px}
.account-builder-status{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--st-success)}
.account-adjustment{display:flex;flex-direction:column;gap:10px;margin-top:15px}
.account-adjustment>label{display:flex;justify-content:space-between;gap:10px;font-size:14px}
.account-adjustment input[type=range]{width:100%;accent-color:var(--st-accent);padding:0;min-height:28px}
.account-range-preview{padding:12px 14px;background:var(--st-soft);border-radius:18px;font-size:calc(16px * var(--audio-reading-scale,1));line-height:1.55}
.chat-composer #chat-input{font-size:calc(16px * var(--audio-reading-scale,1))!important}
.ac-script,.aw-transcript-text,.aw-source-text{font-size:calc(17px * var(--audio-reading-scale,1))!important}
.storage-scene::after{content:'';position:absolute;inset:0;background:var(--st-bg);opacity:var(--audio-background-soften,0);pointer-events:none}
@media(max-width:1150px){.chat-character-item{width:130px;flex-basis:130px}.chat-character-item .chat-character-picture{height:148px}.chat-cast-tools>.custom-select{width:120px}}
@media(max-width:700px){
 .chat-cast-tools{gap:5px;padding:0 1px 6px}.chat-cast-tools>.custom-select{width:95px}.chat-cast-tools .gc-trigger{font-size:11px;padding:7px 8px}
 .chat-cast-search{min-width:90px;max-width:none;padding:0 8px}.chat-cast-search input{font-size:16px}
 .chat-cast-tools>.icon-btn{width:30px;min-width:30px;min-height:30px;height:30px}.chat-cast-arrows,.chat-cast-count{display:none}
 .chat-character-row{gap:9px;width:100%;padding-inline:1px}.chat-character-item{width:111px;flex-basis:111px}.chat-character-item>.chat-character-card{padding:7px 7px 10px;gap:8px}.chat-character-item .chat-character-picture{height:125px}
 .chat-character-actions{top:11px;left:11px;right:11px}.chat-character-actions>button{width:24px;height:24px}.chat-character-actions>button>.icon{width:13px;height:13px}
 .chat-character-row.is-compact>.chat-character-item{width:60px;flex-basis:60px}.chat-character-row.is-compact .chat-character-picture{width:38px;height:38px;border-radius:11px}
 .chat-character-welcome{gap:17px}.chat-inline-options{gap:4px;padding-bottom:7px}.chat-option{min-height:28px;padding:5px 9px;font-size:10px}
 .chat-suggestions>button:last-child{display:flex}.chat-suggestions{display:flex;overflow:auto}.chat-suggestions>button{flex:1;min-width:105px;flex-direction:column;align-items:flex-start;gap:7px}
 .account-builder-grid{grid-template-columns:1fr}.account-builder-preview .code-box{min-height:180px}.account-bulk{align-items:flex-start;flex-direction:column}
 .account-queue-row{gap:7px;padding:9px 10px;font-size:12px}.account-extra-tools .btn{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.chat-character-card,.chat-character-actions>button,.chat-option{transition:none!important}}

/* One composer, with advanced choices opened deliberately. */
.page-header .page-actions{display:none}
.chat-simple-welcome{align-items:center;text-align:center;max-width:760px;padding:20px}
.chat-simple-welcome h1{max-width:650px;font-size:clamp(32px,4vw,52px);line-height:1.12;letter-spacing:-.055em;font-weight:440;color:var(--st-text)}
.chat-mode-bar{gap:5px}
.chat-mode{font-size:13px;min-height:38px;padding:9px 13px}
.chat-mode-more>.icon:last-child{width:12px;height:12px;opacity:.6}
.chat-parameters,.chat-selected-character{min-height:36px!important;padding:0 10px!important;font-size:13px!important;gap:7px!important;color:var(--st-muted)!important}
.chat-selected-character{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-composer-tools{min-width:0;gap:2px}
.chat-cast-footer{display:flex;justify-content:flex-end;padding:0 3px}
.chat-cast-footer>.btn{min-height:36px;padding:0 9px;font-size:13px;color:var(--st-muted);gap:8px}
.chat-character-welcome{gap:22px}
.chat-catalog-modal{width:min(740px,100%)}
.chat-catalog-controls{display:grid;grid-template-columns:minmax(0,1fr) 155px 44px;gap:9px;align-items:center;margin-bottom:16px}
.chat-catalog-controls .chat-cast-search{max-width:none;min-width:0;padding:0 12px;min-height:44px}
.chat-catalog-controls .chat-cast-search input{height:44px;min-height:44px;font-size:15px}
.chat-catalog-controls .custom-select{min-width:0}
.chat-catalog-controls .is-active,.chat-catalog-actions .is-active{color:var(--accent-display);background:var(--st-hover)!important}
.chat-catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 12px}
.chat-catalog-item{min-width:0}
.chat-catalog-item>.chat-character-card{width:100%;min-width:0;padding:7px;gap:10px;transform:none}
.chat-catalog-item .chat-character-picture{height:auto;aspect-ratio:4/5}
.chat-catalog-item .chat-character-name{padding-bottom:4px;font-size:14px}
.chat-catalog-actions{display:flex;align-items:center;justify-content:space-between;gap:2px;margin-top:4px}
.chat-catalog-actions>.btn{padding:0 7px;min-height:34px;font-size:12px;color:var(--st-muted)}
.chat-catalog-actions>.icon-btn{background:transparent!important;box-shadow:none!important}
.chat-catalog-grid>.chat-cast-empty{grid-column:1/-1;min-height:160px}
@media(max-width:700px){
 .chat-simple-welcome{padding:16px 10px}.chat-simple-welcome h1{font-size:35px;max-width:330px}
 .chat-mode-bar{display:grid;grid-template-columns:auto auto auto minmax(0,1fr);margin:0;gap:2px;padding:0 0 8px;overflow:visible}
 .chat-mode{min-width:0;min-height:38px;padding:8px 8px;font-size:12px;gap:5px}.chat-mode>span{overflow:hidden;text-overflow:ellipsis}.chat-mode>.icon{width:15px;height:15px;flex:none}
 .chat-mode-more>.icon:first-child{display:none}.chat-mode-more>.icon:last-child{width:11px;height:11px}
 .chat-parameters,.chat-selected-character{font-size:12px!important;padding:0 7px!important;gap:5px!important;min-height:36px!important}
 .chat-selected-character{max-width:74px}.chat-composer-tools>.icon-btn{width:32px;min-width:32px;min-height:36px}
 .chat-composer-bottom{gap:4px}.chat-input-count{max-width:42px;overflow:hidden}
 .chat-cast-footer>.btn{font-size:13px;min-height:38px}.chat-character-welcome{gap:18px}
 .chat-catalog-controls{grid-template-columns:minmax(0,1fr) 112px 38px;gap:6px;margin-bottom:12px}
 .chat-catalog-controls .chat-cast-search{padding:0 9px;gap:6px}.chat-catalog-controls .chat-cast-search input{font-size:16px}
 .chat-catalog-controls>.icon-btn{width:38px;min-width:38px;min-height:40px}.chat-catalog-controls .gc-trigger{font-size:12px;padding-inline:9px}
 .chat-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}.chat-catalog-actions>.btn{font-size:13px;padding-inline:6px}
}
@media(max-width:360px){.chat-mode{padding-inline:6px;font-size:11px}.chat-mode>.icon{width:13px;height:13px}.chat-parameters>.icon{display:none}.chat-selected-character{max-width:62px}.chat-catalog-controls{grid-template-columns:minmax(0,1fr) 99px 34px}.chat-catalog-controls>.icon-btn{width:34px;min-width:34px}}

/* Keep the glass surface still; scroll content inside it. */
.modal{display:flex;flex-direction:column;overflow:hidden}
.modal>.modal-header,.modal>.modal-footer{flex-shrink:0}
.modal>.modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.chat-catalog-modal{height:min(820px,calc(100dvh - 40px))}
.chat-catalog-modal>.modal-body{display:flex;flex:1;flex-direction:column;overflow:hidden}
.chat-catalog-controls{flex-shrink:0}
.chat-catalog-grid{min-height:0;overflow-y:auto;align-content:start;overscroll-behavior:contain;scrollbar-width:thin;padding:3px 5px 6px 1px}
