:root{--q-visible-height:100dvh;--q-viewport-top:0px;--q-keyboard-inset:0px}
html body :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--q-focus);outline-offset:3px}
.qol-skip-link{position:fixed;left:12px;top:12px;z-index:10000;padding:12px 16px;background:var(--q-surface);border:2px solid var(--q-focus);border-radius:12px;color:var(--q-ink);transform:translateY(-180%)}.qol-skip-link:focus{transform:none}
html body .word-state-mark{display:inline-grid;place-items:center;flex:none;min-width:16px;font-weight:700;font-size:14px;line-height:1;margin-inline-end:3px}
html body .understanding-token{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:start}
html body .understanding-token small{white-space:normal}
html body dialog{max-width:calc(100vw - 24px);max-height:calc(var(--q-visible-height) - 24px);overscroll-behavior:contain}
html body dialog :is(input,select,textarea){min-width:0;max-width:100%;box-sizing:border-box}
html body dialog :is(.sheet-content,.legal-body,.auth-panel){overscroll-behavior:contain}
html body .session-row{flex-wrap:wrap;overflow-wrap:anywhere}
html body .security-email{overflow-wrap:anywhere}
@media(max-width:1050px){
 html body #screen-studio .studio-grid{grid-template-columns:minmax(0,1fr)!important}
 html body #screen-studio .editor-card{position:static;min-width:0}
 html body .plans-grid,html body .pricing-grid,html body .profile-grid{grid-template-columns:minmax(0,1fr)}
 html body .app-content{min-width:0}
}
@media(max-width:900px){
 html body :is(input:not([type=checkbox]):not([type=range]):not([type=color]),select,textarea){font-size:16px}
 html body .sidebar,html body .sidebar-toggle{display:none!important}
 html body .app-content{margin-left:0!important;width:100%}
 html body .mobile-dock{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:35;padding:0;background:var(--q-surface);border-top:1px solid var(--q-border);pointer-events:auto}
 html body #mobileNav:not([hidden]){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:static;width:100%;gap:4px;padding:4px 8px calc(4px + env(safe-area-inset-bottom));background:var(--q-surface);border:0;box-sizing:border-box}
 html body #mobileNav button{position:relative;min-height:56px;min-width:0;padding:6px 2px;gap:4px;font-size:11px;border-radius:12px;line-height:1.25;color:var(--q-muted)}
 html body #mobileNav button.active{color:var(--q-ink);background:var(--q-soft);font-weight:700}
 html body #mobileNav button.active::after{content:'';position:absolute;inset:auto 25% 2px;height:2px;width:auto;border-radius:2px;background:var(--q-primary)}
 html body #mobileNav svg{width:22px;height:22px}
 html body .mobile-dock-actions:empty{display:none}
 html body:has(.workspace-bar) .main-content{padding:12px 16px calc(100px + env(safe-area-inset-bottom));width:100%;box-sizing:border-box}
 html body:has(.workspace-bar) .topbar{height:56px;min-height:56px;padding:8px 16px}
 html body .topbar .breadcrumb{display:none}
 html body .workspace-bar{display:grid;grid-template-columns:minmax(0,1fr) 40px 40px 44px;align-items:center;gap:8px;margin-bottom:12px}
 html body .work-title-field{grid-column:1;min-width:0;width:100%;margin:0}
 html body #workTitle{font-size:16px;min-height:44px;padding:10px}
 html body .workspace-actions{display:contents}
 html body #workUndo{grid-column:2;grid-row:1;width:40px;padding:8px;min-height:44px}
 html body #workRedo{grid-column:3;grid-row:1;width:40px;padding:8px;min-height:44px}
 html body #workSettings{grid-column:4;grid-row:1;width:44px;min-width:0;min-height:44px;padding:10px}
 html body #workSettings .q-button-label{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
 html body #workSaveStatus{grid-column:1/-1;grid-row:2;line-height:1.35;font-size:11px}
 html body #screen-studio .studio-mode-tabs{margin-bottom:12px;max-width:100%}
 html body #screen-studio .studio-grid{gap:16px}
 html body #screen-studio :is(.editor-card,.preview-card){padding:16px;border-radius:20px}
 html body #screen-studio :is(.card-header,.preview-header){margin-bottom:12px}
 html body #screen-studio #textInput{height:112px;min-height:80px;max-height:200px;resize:vertical;font-size:16px;scroll-margin-block:76px}
 html body #screen-studio #textInput:placeholder-shown{height:80px}
 html body .workspace-empty{padding:0;margin:0 0 8px;border:0}
 html body .workspace-empty p{display:none}
 html body .workspace-empty button{font-size:13px;padding:8px;min-height:40px}
 html body #screen-studio .editor-meta{margin:8px 0 12px;font-size:11px}
 html body #screen-studio .composer-actions{position:static;bottom:auto;padding-top:8px;margin-top:12px;gap:8px}
 html body #screen-studio .composer-actions button{min-height:44px;padding:10px 12px!important;min-width:0!important;font-size:13px}
 html body #screen-studio #avatar3dCanvas{height:clamp(200px,31svh,300px);max-height:none}
 html body #screen-studio .avatar-tools{position:static;bottom:auto;padding-top:8px;gap:8px}
 html body #screen-studio .avatar-tools button{min-height:44px;font-size:13px;min-width:0;flex:1 1 auto}
 html body #screen-studio .avatar-tools #avatarDownload{min-inline-size:160px}
 html body .understanding-header{gap:8px;flex-wrap:wrap}
 html body .understanding-header strong{font-size:13px}
 html body .understanding-token{font-size:12px;min-height:40px;padding:6px 8px}
 html body .understanding-token small{font-size:11px}
 html body .sort-grip{min-height:32px;min-width:24px}
 html body .understanding-scenes .q-button{padding:6px 8px;min-height:40px;font-size:12px}
 html body .understanding-issues{max-height:none}
 html body dialog[open]{position:fixed;top:calc(var(--q-viewport-top) + 12px);bottom:auto;margin:0 auto;max-height:calc(var(--q-visible-height) - 24px)}
 html body #translationSettingsDialog{width:calc(100vw - 24px);max-height:calc(var(--q-visible-height) - 24px)}
 html body #translationSettingsDialog .sheet-header{padding:16px}
 html body #translationSettingsDialog .sheet-content{padding:0 16px 16px;max-height:calc(var(--q-visible-height) - 160px)}
 html body #translationSettingsDialog .sheet-footer{padding:12px 16px}
 html body #authDialog{width:calc(100vw - 24px);overflow:auto}
 html body #authDialog .auth-layout{display:block;min-height:0}
 html body #authDialog .welcome-screen{display:none}
 html body #authDialog .auth-panel{width:100%;max-width:none;padding:20px;box-sizing:border-box;max-height:none}
 html body .word-choice-menu{max-width:calc(100vw - 24px);max-height:calc(var(--q-visible-height) - 32px)}
 html body :is(.motion-words-dialog,.action-dialog,.legal-dialog){width:calc(100vw - 24px);box-sizing:border-box}
 html body .motion-words-dialog .motion-words-list{max-height:calc(var(--q-visible-height) - 210px)}
 html body .avatar-background-dialog .custom-background{min-width:0}
 html body .avatar-background-dialog input[type=range]{width:100%}
 html body .auth-options{gap:12px;flex-wrap:wrap}
 html[data-keyboard] body .mobile-dock{display:none!important}
 html[data-keyboard] body #screen-studio .composer-actions{position:fixed;left:12px;right:12px;bottom:calc(var(--q-keyboard-inset) + 8px);z-index:65;padding:8px;background:var(--q-surface);border:1px solid var(--q-border);border-radius:16px;box-shadow:var(--q-shadow)}
 html[data-keyboard] body #screen-studio .editor-card{padding-bottom:84px}
 html[data-keyboard] body #screen-studio #textInput{height:clamp(80px,calc(var(--q-visible-height)*.3),140px)}
 html[data-keyboard] body:has(dialog[open]) #screen-studio .composer-actions{display:none}
}
@media(max-width:900px){
 html body #screen-studio .studio-grid{width:100%!important;max-width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr)!important}
 html body #screen-studio :is(.editor-card,.preview-card){box-sizing:border-box;width:100%!important;max-width:100%!important;min-width:0!important}
 html body #screen-studio :is(.text-understanding,.understanding-header,.understanding-scenes,.understanding-tokens,.composer-actions,.avatar-tools){min-width:0;max-width:100%;box-sizing:border-box}
 html body #screen-studio .understanding-header{display:flex;flex-wrap:wrap}.understanding-scenes{flex-wrap:wrap}
 html body #screen-studio #textInput{height:96px!important;min-height:72px!important;max-height:200px!important}
 html body #screen-studio #textInput:placeholder-shown{height:72px!important}
 html body #screen-studio .coverage-button{white-space:normal;text-align:start;min-width:0}
 html body #screen-studio #avatar3dCanvas{width:100%!important;height:clamp(200px,31svh,300px)!important}
 html body .auth-dialog .auth-panel{box-sizing:border-box;min-width:0}
}
@media(max-width:900px){html body #screen-studio .composer-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}html body #screen-studio .composer-actions>button{width:100%!important;white-space:normal!important;box-sizing:border-box}}
