/* Workspace chrome: keep the tools close to the work. */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.app-body{--app-banner-offset:0px}
.app-body .app-main{padding-top:var(--app-banner-offset)}
.app-body .app-content{max-width:none;margin:0;padding:24px}
body.app-body .sidebar{top:var(--app-banner-offset);height:calc(100dvh - var(--app-banner-offset));overflow-y:auto;overscroll-behavior:contain;padding-top:22px;padding-bottom:18px}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 4px 24px}
.sidebar-heading .brand{gap:8px}
.sidebar-close,.workspace-menu-toggle{display:none}
.sidebar-preview{margin-top:12px;justify-content:center}

/* The form stays in place while a long creation history scrolls beside it. */
.app-body[data-app-route="create"] .app-content{padding:18px}
.studio-tabs{margin-bottom:16px;padding:4px;border-radius:10px}
.studio-tabs button{font-size:13px;padding:9px 22px}
.studio-layout{grid-template-columns:minmax(290px,330px) minmax(0,1fr);gap:20px}
.app-body[data-app-route="create"] .studio-editor{position:sticky;top:calc(var(--app-banner-offset) + 18px);padding:18px;border-radius:12px}
.studio-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}
.studio-editor-heading h2{font-size:14px;letter-spacing:-.2px;margin:0}
.studio-editor-heading>span{font-size:10px;color:#7b8a72;white-space:nowrap}
.app-body .studio-editor .field{margin-bottom:12px}
.app-body .studio-editor .field>span{font-size:11px;margin-bottom:6px}
.app-body .studio-editor .field select,.app-body .studio-editor .field textarea{font-size:12px;padding:9px 10px}
.app-body .studio-editor .field textarea{height:105px;min-height:80px;resize:vertical;max-height:210px}
.app-body .studio-editor .field small,.app-body .studio-editor .field-help{font-size:10px;line-height:1.5}
.studio-frames{margin:12px 0 8px;gap:10px}
.studio-frame{min-height:108px;gap:6px}
.studio-frame img{height:108px}
.studio-frame>.icon{width:18px;height:18px}
.app-body .studio-editor .field-help{margin:6px 0 12px}
.studio-audio{padding:10px;margin:0 0 10px;gap:9px;font-size:11px}
.studio-audio small{font-size:10px}
.studio-generate{margin-top:6px;min-height:43px;font-size:12px}
.studio-history{min-width:0;display:flex;flex-direction:column;max-height:calc(100dvh - var(--app-banner-offset) - 96px)}
.studio-history-heading{margin:2px 0 8px}
.studio-history-heading h2{font-size:14px;letter-spacing:-.2px}
.studio-history-note{font-size:11px;color:#71816c;max-width:780px;margin-bottom:16px}
#studio-history-content{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:#cfdbc6 transparent;padding:2px 8px 22px 2px;margin-left:-2px}
#studio-history-content:focus-visible{outline:2px solid #89a778;outline-offset:3px;border-radius:8px}
.studio-history-grid{grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:16px}
.studio-card-media video,.studio-card-media img{height:340px}
.studio-card-caption{padding:12px}
.studio-image-trigger{display:block;width:100%;padding:0;border:0;background:transparent;border-radius:11px 11px 0 0;cursor:zoom-in}
.studio-image-trigger:focus-visible{outline:3px solid #689657;outline-offset:3px}
.studio-image-dialog{position:fixed;inset:0;border:0;padding:48px 32px;margin:auto;width:100vw;height:100dvh;max-width:none;max-height:none;background:transparent;color:#fff;overflow:hidden}
.studio-image-dialog[open]{display:flex;align-items:center;justify-content:center}
.studio-image-dialog::backdrop{background:#12251de6;backdrop-filter:blur(7px)}
.studio-image-dialog>img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 16px 80px #0005}
.studio-image-close{position:absolute;right:18px;top:16px;display:grid;place-items:center;width:38px;height:38px;border:1px solid #ffffff40;border-radius:50%;background:#ffffff17;color:white;cursor:pointer}
.studio-image-close:hover{background:#ffffff30}
.studio-image-close:focus-visible{outline:2px solid white;outline-offset:4px}
.studio-image-hint{position:absolute;bottom:16px;left:0;width:100%;text-align:center;font-size:11px;color:#ffffffa6;pointer-events:auto}
body:has(.studio-image-dialog[open]){overflow:hidden}
@media(min-width:1650px){.studio-layout{grid-template-columns:350px minmax(0,1fr)}.studio-history-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.studio-card-media video,.studio-card-media img{height:390px}}
@media(max-width:1100px){.studio-layout{grid-template-columns:290px minmax(0,1fr);gap:16px}.app-body[data-app-route="create"] .studio-editor{padding:15px}.studio-history-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}}
@media(max-width:950px){.sidebar-heading{margin-left:0;margin-right:0}.sidebar-heading .brand{gap:5px}}
@media(max-width:800px){.studio-layout{grid-template-columns:1fr}.app-body[data-app-route="create"] .studio-editor{position:static}.studio-history{max-height:none;margin-top:8px}#studio-history-content{overflow:visible;padding-right:0}.studio-history-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-card-media video,.studio-card-media img{height:300px}.studio-menu{opacity:1}.studio-editor-heading{margin-bottom:18px}.app-body .studio-editor .field select,.app-body .studio-editor .field textarea{font-size:16px}.app-body .studio-editor .field>span{font-size:12px}.app-body .studio-editor .field small,.app-body .studio-editor .field-help{font-size:11px}}
@media(max-width:720px){
 .app-body .app-content{padding:70px 16px 30px}
 .app-body[data-app-route="create"] .app-content{padding:14px 14px 30px}
 .app-body[data-app-route="create"] .studio-tabs{margin-left:52px;min-height:40px;margin-bottom:18px}
 .workspace-menu-toggle{position:fixed;left:14px;top:calc(var(--app-banner-offset) + 16px);z-index:40;display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid #dfe6d5;border-radius:9px;background:#fcfdf9;color:#345941;box-shadow:0 2px 6px #25381a08}
 .sidebar-open .workspace-menu-toggle{visibility:hidden}
 .sidebar-close{display:grid;flex-shrink:0;width:28px;height:32px}
 .app-body .sidebar-heading .wordmark{font-size:19px}
 .sidebar-heading{margin-left:0;margin-bottom:20px}
 .app-body .studio-editor{padding:18px}
 .studio-image-dialog{padding:60px 16px 44px}
}
@media(max-width:500px){.studio-history-grid{grid-template-columns:1fr}.studio-card-media video,.studio-card-media img{height:420px}}

/* Sidebar (2026-09-13): grouped navigation, attention badges, a one-line credit summary and a profile menu. */
.app-body .sidebar .nav-section-label{margin:0 0 6px}
.app-body .sidebar .side-nav+.nav-section-label{margin-top:18px}
.app-body .sidebar .side-nav.secondary{margin:0 0 10px}
.sidebar-preview{margin:0 0 10px}
.nav-alert{background:#f4dcc4;color:#a35d2a;font-weight:700}
.sidebar-credits{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#f5f8ef;color:#5b6b56;font-size:11px;margin-bottom:8px;transition:background .15s}
.sidebar-credits:hover{background:#eef4e4}
.sidebar-credits>.icon{width:15px;height:15px;color:#7e9a67;flex-shrink:0}
.sidebar-credits>span{flex:1;min-width:0;line-height:1.35}
.sidebar-credits strong{font-size:12px;color:#33463a}
.sidebar-credits small{font-size:10px;color:#7a877a}
.sidebar-credits b{display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:650;color:var(--green);white-space:nowrap}
.sidebar-credits b .icon{width:11px;height:11px}
.profile-menu{position:relative}
.profile-menu>summary{list-style:none;cursor:pointer;border-radius:9px;transition:background .15s}
.profile-menu>summary::-webkit-details-marker{display:none}
.profile-menu>summary:hover,.profile-menu[open]>summary{background:#f3f6ee}
.profile-menu>summary>.icon{width:14px;height:14px;color:#8f9a8a;flex-shrink:0;transition:transform .15s}
.profile-menu[open]>summary>.icon{transform:rotate(180deg)}
.app-body .sidebar-profile{padding:8px 6px}
.profile-menu-panel{position:absolute;left:0;right:0;bottom:calc(100% + 6px);display:grid;gap:2px;padding:6px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 12px 30px -12px #1f2f2133;z-index:5}
.profile-menu-panel>a,.profile-menu-panel>button{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:38px;padding:9px 10px;border:0;border-radius:7px;background:none;color:#4b5a4c;font:inherit;font-size:12px;font-weight:500;text-align:left;cursor:pointer}
.profile-menu-panel>a:hover,.profile-menu-panel>button:hover{background:#f3f6ee;color:#256849}
.profile-menu-panel .icon{width:15px;height:15px;flex-shrink:0}
.profile-menu-panel>.theme-toggle{margin:0;width:100%;min-height:38px;padding:9px 10px;border:0;border-radius:7px;justify-content:flex-start;gap:10px;font-size:12px;font-weight:500;color:#4b5a4c;background:none}
.profile-menu-panel>.theme-toggle:hover{background:#f3f6ee;color:#256849}
.profile-menu-panel>.theme-toggle .theme-toggle-track{margin-left:auto}
.settings-tabs{display:inline-flex;gap:4px;background:#edf2e6;padding:4px;border:1px solid #e2e9d9;border-radius:8px;margin-bottom:22px}
.settings-tabs a{display:inline-flex;align-items:center;gap:7px;border-radius:5px;color:#8fa17d;padding:7px 12px;font-size:11px;font-weight:600}
.settings-tabs a.active{background:#fff;color:#5b7546;box-shadow:0 1px 4px #2f4d1810}
.settings-tabs .icon{width:13px;height:13px}
