.brand .brand-symbol { display: none; }

/* The creator workspace keeps its tools in view and scrolls each working pane. */
.compact-shell { background: var(--paper); }
.compact-shell .shell { display: grid; grid-template-columns: 72px minmax(0, 1fr); }
.compact-shell .rail { position: sticky; top: 0; width: 72px; height: 100dvh; min-height: 0; padding: 16px 12px; gap: 24px; overflow-y: auto; scrollbar-width: none; }
.compact-shell .brand { display: grid; place-items: center; width: 48px; padding: 4px; margin: 0; }
.compact-shell .brand img { display: none; }
.compact-shell .brand .brand-symbol { display: block; width: 32px; height: 32px; }
.compact-shell .rail-footer, .compact-shell .nav-section { display: none; }
.compact-shell #navigation { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; width: 48px; margin: 0; }
.compact-shell .studio-switcher { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0 0 12px; margin: 0 0 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.compact-shell .rail .nav-item, .compact-shell .rail .studio-switch { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; min-height: 44px; padding: 12px; margin: 0 auto; gap: 0; border-radius: 10px; font-size: 0; line-height: 0; flex-shrink: 0; }
.compact-shell .rail .icon { width: 20px; height: 20px; flex: none; }
.compact-shell .rail .nav-item[aria-current="page"], .compact-shell .studio-switch[aria-current="true"] { background: var(--blue-soft); color: var(--blue); }
.compact-shell .nav-submenu, .compact-shell .studio-navigation { display: grid; gap: 8px; padding: 0; margin: 0; border: 0; max-height: none; overflow: visible; }
.compact-shell .nav-course-list { display: grid; gap: 6px; padding: 12px 0 0; margin: 4px 0 0; border-top: 1px solid var(--line); }
.compact-shell .nav-hint { font-size: 0; padding: 0; }
.compact-shell .nav-hint .button { font-size: 10px; padding: 4px; overflow-wrap: anywhere; }
.compact-shell .workspace { min-width: 0; }
.compact-shell .topbar { height: 52px; min-height: 52px; padding: 8px 20px; gap: 16px; flex-wrap: nowrap; background: var(--surface); }
.compact-shell .breadcrumb { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-shell .account-controls { gap: 8px; flex: none; }
.compact-shell .account-name { font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-shell .account-controls .button { min-height: 32px; padding: 6px 10px; font-size: 12px; border-radius: 7px; }
.compact-shell .main:has(> .creation-page) { width: 100%; max-width: none; height: calc(100dvh - 52px); min-height: 0; padding: 10px 16px 16px; background-image: radial-gradient(color-mix(in srgb, var(--line) 55%, transparent) .7px, transparent .7px); background-size: 12px 12px; }
.compact-shell .creation-page[data-workspace] { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
.compact-shell .creation-workspace-toolbar { display: flex; align-items: center; min-height: 34px; justify-content: space-between; gap: 16px; }
.compact-shell .creation-workspace-title { min-width: 0; }
.compact-shell .creation-workspace-title h1 { font: 600 16px/1.4 var(--heading); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.compact-shell .creation-workspace-toolbar > .button-row { flex: none; gap: 14px; }
.compact-shell .creation-chat-tools { position: relative; }
.compact-shell .creation-chat-tools > summary { padding: 6px 0; }
.compact-shell .creation-chat-tools > .button-row { position: absolute; right: 0; top: 100%; z-index: 5; padding: 10px; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #11151c14; }
.compact-shell .creation-layout { grid-template-columns: minmax(300px, var(--creation-chat-width)) 12px minmax(0, 1fr); align-items: stretch; height: 100%; min-height: 0; gap: 0; }
.compact-shell .creation-chat, .compact-shell .creation-draft { display: flex; flex-direction: column; position: static; height: 100%; min-height: 0; border-radius: 12px; box-shadow: 0 2px 6px #11151c03; animation: none; }
.compact-shell .creation-layout[data-mode="workspace"] .creation-draft { animation: none; }
.compact-shell .creation-chat-header, .compact-shell .creation-draft-header { flex: none; padding: 14px 18px; min-height: 65px; }
.compact-shell .creation-chat-header h2, .compact-shell .creation-draft-header h2 { font-size: 14px; }
.compact-shell .creation-ai-mark { width: 34px; height: 34px; border-radius: 9px; }
.compact-shell .creation-ai-mark img { width: 26px; height: 26px; }
.compact-shell .creation-chat-header p, .compact-shell .creation-draft-header .creation-caption { margin-top: 2px; font-size: 11px; }
.compact-shell .creation-chat-scroll { scrollbar-gutter: stable; }
.compact-shell .creation-messages { padding: 20px 16px; gap: 20px; min-height: 0; }
.compact-shell .creation-message { max-width: 94%; }
.compact-shell .creation-message-content { font-size: 13px; line-height: 1.7; }
.compact-shell .creation-message-label { margin-bottom: 6px; font-size: 10px; }
.compact-shell .creation-message-assistant { padding: 14px 16px; border-radius: 3px 14px 14px; background: var(--surface-muted); }
.compact-shell .creation-message-user { padding: 14px 16px; margin-left: 24px; border-radius: 14px 3px 14px 14px; }
.compact-shell .creation-composer { margin: 12px; padding: 12px; gap: 8px; max-height: 50%; overflow-y: auto; scrollbar-width: thin; border-radius: 12px; box-shadow: none; transition: none; }
.compact-shell .creation-composer:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.compact-shell .creation-composer textarea { height: 64px; min-height: 64px; max-height: 120px; padding-block: 6px; font-size: 13px; font-weight: 400; line-height: 1.55; }
.compact-shell .creation-composer textarea::placeholder { color: var(--quiet); opacity: 1; }
.compact-shell .creation-composer .field > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.compact-shell .creation-composer .field { gap: 0; }
.compact-shell .creation-composer > .creation-caption { font-size: 10px; line-height: 1.4; }
.compact-shell .creation-composer > * { flex-shrink: 0; }
.compact-shell .creation-attachments { max-height: 78px; }
.compact-shell .creation-attachment { padding: 5px 8px; }
.compact-shell .creation-composer-actions { gap: 8px; }
.compact-shell .creation-composer-actions .button, .compact-shell .creation-upload-label { min-height: 36px; font-size: 12px; padding: 8px 12px; }
.compact-shell .creation-composer-suggestion { font-size: 11px; line-height: 1.5; color: var(--quiet); }
.compact-shell .creation-composer-suggestion kbd { font-family: inherit; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.compact-shell .creation-prompt-beam { display: none; }
.compact-shell .creation-suggestions { padding: 0 16px 16px; }
.compact-shell .creation-suggestions .button { min-height: 36px; font-size: 12px; }
.compact-shell .creation-turn { margin: 0 16px 16px; padding: 12px; border-radius: 10px; }
.compact-shell .creation-task-details { margin: 0 16px 16px; }
.compact-shell .creation-activity { padding: 12px 16px; }
.compact-shell .creation-divider { display: grid; min-height: 0; }
.compact-shell .creation-context-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; }
.compact-shell .creation-draft .tab-list { padding: 0 18px; gap: 8px; background: var(--surface); position: sticky; top: 0; z-index: 2; }
.compact-shell .creation-draft .button-tab { min-height: 42px; font-size: 12px; padding-inline: 14px; }
.compact-shell .creation-tab-panel { padding: 20px; gap: 20px; min-height: 0; }
.compact-shell .creation-tab-panel .field { font-size: 13px; }
.compact-shell .creation-tab-panel input, .compact-shell .creation-tab-panel textarea, .compact-shell .creation-tab-panel select { font-size: 14px; font-weight: 400; }
.compact-shell .creation-editor-grid { gap: 16px; }
.compact-shell .creation-module { border-radius: 10px; }
.compact-shell .creation-module > summary { padding: 14px 16px; font-size: 13px; }
.compact-shell .creation-module-title { margin-right: 10px; }
.compact-shell .creation-module-status { display: inline-block; vertical-align: middle; padding: 3px 7px; border-radius: 5px; background: var(--paper); color: var(--quiet); font-size: 10px; font-weight: 500; }
.compact-shell .creation-module-content { padding: 4px 16px 16px; }
.compact-shell .creation-source-options { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; }
.compact-shell .creation-source-options > summary { cursor: pointer; font-weight: 600; }
.compact-shell .creation-source-options > fieldset { max-height: 240px; overflow-y: auto; margin-top: 12px; scrollbar-width: thin; }
.compact-shell .creation-module input:disabled, .compact-shell .creation-module textarea:disabled, .compact-shell .creation-tab-panel input:disabled, .compact-shell .creation-tab-panel textarea:disabled { opacity: .8; cursor: default; }
.compact-shell .creation-draft-actions { flex: none; padding: 12px 18px; gap: 8px; background: var(--surface); }
.compact-shell .creation-draft-actions .button { min-height: 36px; font-size: 12px; padding: 8px 12px; }
.compact-shell .creation-status, .compact-shell .creation-error { font-size: 12px; }
.compact-shell .creation-error { padding: 10px 12px; border-radius: 8px; }
.compact-shell .creation-feedback { gap: 6px; }
.compact-shell .creation-context-scroll > .creation-reviews, .compact-shell .creation-context-scroll > .creation-training, .compact-shell .creation-context-scroll > .creation-classic, .compact-shell .creation-context-scroll > .creation-section-suggestion { margin: 0 20px 20px; }
.compact-shell .creation-review-card, .compact-shell .creation-training { padding: 16px; border-radius: 10px; }
.compact-shell .creation-outline { display: grid; gap: 16px; padding: 20px; }
.compact-shell .creation-outline-source-status { color: var(--quiet); font-size: 12px; line-height: 1.6; }
.compact-shell .creation-outline > p { font-size: 13px; line-height: 1.6; }
.compact-shell .creation-upload-label:has(input:disabled) { cursor: default; }

@media (max-width: 1050px) {
    .compact-shell .creation-layout { grid-template-columns: minmax(300px, 38%) 10px minmax(0, 1fr); }
    .compact-shell .creation-workspace-title h1 { font-size: 14px; }
    .compact-shell .creation-editor-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .compact-shell .shell { grid-template-columns: 56px minmax(0, 1fr); }
    .compact-shell .rail { width: 56px; padding: 12px 4px; gap: 18px; }
    .compact-shell .topbar { padding-inline: 12px; gap: 8px; }
    .compact-shell .account-name { display: none; }
    .compact-shell .account-controls { gap: 2px; }
    .compact-shell .account-controls .button { padding: 6px; font-size: 11px; }
    .compact-shell .breadcrumb { font-size: 11px; }
    .compact-shell .main:has(> .creation-page) { height: auto; min-height: calc(100dvh - 52px); padding: 10px; }
    .compact-shell .creation-page[data-workspace] { height: auto; grid-template-rows: auto auto; }
    .compact-shell .creation-workspace-toolbar { gap: 8px; flex-wrap: wrap; }
    .compact-shell .creation-workspace-title { width: 100%; }
    .compact-shell .creation-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; height: auto; }
    .compact-shell .creation-divider { display: none; }
    .compact-shell .creation-chat { height: 75dvh; min-height: 500px; }
    .compact-shell .creation-draft { height: 85dvh; min-height: 500px; }
    .compact-shell .creation-tab-panel { padding: 16px; }
    .compact-shell .creation-draft-actions > .button-row { flex-direction: row; align-items: center; }
    .compact-shell .creation-draft-actions .button { width: auto; }
}

/* Preserve both studio entrances and the current task on narrow screens. */
@media (max-width: 710px) {
    body:not(.compact-shell):has(.studio-switcher) .rail {
        display: flex; flex-direction: row; align-items: center; justify-content: space-between;
        padding: 4px 12px; gap: 8px;
    }
    body:not(.compact-shell):has(.studio-switcher) .rail .brand { width: min(104px, 27vw); margin: 0; }
    body:not(.compact-shell):has(.studio-switcher) .rail nav,
    body:not(.compact-shell):has(.studio-switcher) .studio-switcher {
        display: flex; flex-flow: row nowrap; align-items: center; flex: none;
        margin: 0; padding: 0; gap: 2px; border: 0; background: transparent;
    }
    body:not(.compact-shell):has(.studio-switcher) .rail :is(.nav-item, .studio-switch) {
        width: 44px; min-height: 44px; padding: 0; gap: 0; justify-content: center;
        font-size: 0; border-radius: 8px;
    }
    body:not(.compact-shell):has(.studio-switcher) .rail .icon { width: 20px; height: 20px; }
    body:not(.compact-shell):has(.studio-switcher) .topbar { min-height: 44px; flex-wrap: nowrap; padding: 2px 12px; gap: 4px; }
    body:not(.compact-shell):has(.studio-switcher) .account-controls { gap: 2px; }
    body:not(.compact-shell):has(.studio-switcher) .account-controls .button { padding: 6px 8px; font-size: 12px; }
    body:not(.compact-shell):has(.studio-switcher) .account-name { display: none; }
    .topbar .breadcrumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar:has(.account-controls > :nth-child(4)) {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto;
    }
    .topbar:has(.account-controls > :nth-child(4)) .account-controls {
        grid-column: 1 / -1; min-width: 0; flex-wrap: wrap;
    }
    .account-controls .button { max-width: 100%; overflow-wrap: anywhere; }
}
