/* One workspace layout: cards keep their own height and controls remain in reach. */
html body:has(.workspace-bar) .main-content{padding:16px 24px 32px}
html body:has(.workspace-bar) .topbar{min-height:64px;padding-block:12px}
html body #screen-studio>.page-heading{margin:0 0 12px;padding:0;text-align:left}
html body #screen-studio>.page-heading>:is(.eyebrow,p){display:none}
html body #screen-studio>.page-heading h1{margin:0;font-size:24px;line-height:1.3;letter-spacing:-.025em}
html body #screen-studio .studio-mode-tabs{margin:0 0 16px;min-height:44px;justify-self:start;width:fit-content;padding:4px;border-radius:var(--q-radius-control)}
html body #screen-studio .studio-mode-tabs button{min-height:36px;padding:8px 16px;font-size:14px;border-radius:8px}
.workspace-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.work-title-field{flex:1 1 240px;max-width:440px;min-width:0}
html body #workTitle{width:100%;min-width:0;font-size:16px;font-weight:600;background:var(--q-surface);padding:12px}
#workSaveStatus{font-size:12px;color:var(--q-muted);line-height:1.5;min-width:130px}
#workSaveStatus[data-state=warning]{color:var(--q-warning)}
.workspace-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
html body #screen-studio .studio-grid{align-items:start;gap:24px}
html body #screen-studio .editor-card,html body #screen-studio .preview-card{height:auto;min-height:0;align-self:start}
html body #screen-studio #textInput{flex:none;height:clamp(140px,24dvh,260px);min-height:140px;max-height:360px;resize:vertical;padding:0;overflow:auto}
html body #screen-studio .card-header,html body #screen-studio .preview-header{margin-bottom:16px}
html body #screen-studio .editor-meta{display:flex;justify-content:space-between;margin:12px 0 16px}
html body #screen-studio .word-hints{max-height:96px;overflow:auto;margin-bottom:12px}
html body #screen-studio .ai-word-tools{margin-bottom:12px}
html body #screen-studio .composer-actions{position:sticky;bottom:12px;z-index:3;flex-wrap:wrap;gap:12px;margin-top:16px;padding:12px 0 0;background:var(--q-surface)}
html body #screen-studio .composer-actions>button{flex:1 1 auto}
html body #screen-studio .composer-actions #saveDraft{display:inline-flex!important}
html body #screen-studio #draftStatus{display:none}
html body #screen-studio .preview-stage{flex:none!important}
html body #screen-studio #avatar3dCanvas{height:clamp(260px,calc(100dvh - 370px),460px);max-height:none}
html body #screen-studio #avatar3dPanel{gap:12px}
html body #screen-studio .avatar-tools{position:sticky;bottom:12px;z-index:3;gap:8px;padding:12px 0 0;background:var(--q-surface)}
html body #screen-studio .avatar-tools>button{padding:10px 12px}
html body .avatar-background-button{display:none}
.workspace-empty{padding:12px 0;margin:0 0 12px;border-bottom:1px solid var(--q-border)}
.workspace-empty p{margin:0 0 8px;font-size:14px;color:var(--q-muted);line-height:1.6}
.workspace-empty[hidden]{display:none}
html.qol3d-active #translationSettingsDialog .character-group,html.qol3d-active #subtitleLanguageRow{display:none}
html body #translationSettingsDialog{width:min(620px,calc(100vw - 32px));max-height:86dvh;border-radius:var(--q-radius-dialog)}
html body #translationSettingsDialog .sheet-content{max-height:calc(86dvh - 180px);overflow:auto;overscroll-behavior:contain;padding:0 24px 24px}
html body #translationSettingsDialog .sheet-header{padding:24px;gap:16px}
html body #translationSettingsDialog .sheet-footer{padding:16px 24px;border-top:1px solid var(--q-border);background:var(--q-surface)}
html body #translationSettingsDialog .settings-group{padding:16px 0;margin:0;border-bottom:1px solid var(--q-border)}
html body #translationSettingsDialog .settings-group h3{font-size:16px;margin:0 0 16px}
html body #translationSettingsDialog .format-settings{padding-block:16px}
html body .workspace-export>label{display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:14px}
.workspace-export p{color:var(--q-muted);font-size:12px;margin:8px 0 0}
#workspaceBackground .avatar-background-dialog{padding:0;width:100%;border:0;border-radius:0;background:transparent;box-shadow:none}
#workspaceBackground .avatar-background-dialog>form{display:none}
#workspaceBackground .avatar-background-dialog .custom-background h3{font-size:14px}
html body #avatar3dPanel:fullscreen,html body #avatar3dPanel.workspace-fullscreen{position:fixed!important;inset:0!important;width:100dvw!important;height:100dvh!important;z-index:1000;padding:16px;box-sizing:border-box;gap:12px;background:var(--q-surface);overflow:auto;display:flex;flex-direction:column}
html body #avatar3dPanel:is(:fullscreen,.workspace-fullscreen) #avatar3dCanvas{flex:1;min-height:0;width:100%;height:calc(100dvh - 100px)!important;max-height:none!important;object-fit:contain}
html body #avatar3dPanel:is(:fullscreen,.workspace-fullscreen) .avatar-tools{flex:none;position:static;background:var(--q-surface)}
@media(min-width:1000px){html body #screen-studio .editor-card{position:sticky;top:80px}}
@media(max-width:740px){html body:has(.workspace-bar) .main-content{padding:12px 16px 100px}.workspace-bar{gap:8px}.work-title-field{max-width:none;flex-basis:100%}.workspace-actions{margin-left:auto}#workSaveStatus{min-width:0;flex:1}html body #screen-studio>.page-heading h1{font-size:20px}html body #screen-studio .studio-grid{gap:16px}html body #screen-studio #textInput{height:160px;min-height:140px}html body #screen-studio .composer-actions,html body #screen-studio .avatar-tools{bottom:calc(76px + env(safe-area-inset-bottom))}html body #screen-studio #avatar3dCanvas{height:360px}html body #screen-studio .studio-mode-tabs{width:100%}html body #screen-studio .studio-mode-tabs button{padding-inline:12px}html body #translationSettingsDialog .sheet-content{padding-inline:16px}}

/* The breadcrumb and mode tabs already identify this screen. Keep a semantic h1 without a second hero. */
html body #screen-studio>.page-heading{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%)}
html body:has(.workspace-bar) .topbar{height:64px}
html body #screen-studio .avatar-tools .avatar-background-button{display:none}
html body:has(.workspace-bar) #saveDraft{display:inline-flex!important;width:auto;min-width:120px;padding:12px 16px}
html body:has(.workspace-bar) #saveDraft>.save-button-label{position:static;width:auto;height:auto;overflow:visible;clip:auto}
html body #screen-studio #avatar3dCanvas{height:clamp(240px,calc(100dvh - 360px),380px)}
@media(max-width:740px){html body #screen-studio #avatar3dCanvas{height:340px}.mobile-dock-actions #saveDraft{min-width:100px}}
