/* Keep the source in focus. Detailed choices live in their own sheets. */
body[data-view=create] .studio-layout{display:block;max-width:760px;min-height:0;margin:auto}
body[data-view=create] .view-heading{max-width:760px;margin:0 auto 22px}
body[data-view=create] .date-mark,body[data-view=create] .draft-badge{display:none}
body[data-view=create] .studio-mode-switch{display:flex;margin-left:auto;padding:4px;gap:4px;border:1px solid var(--line);border-radius:18px;background:#edf1e7}
.studio-mode-switch [aria-pressed=true]{background:var(--white);border-radius:13px;box-shadow:0 2px 5px #263a3310}
body[data-view=create][data-studio-panel=build] .chat-panel,body[data-view=create][data-studio-panel=chat] .studio-workbench{display:none}
body[data-view=create] .studio-workbench{padding:22px;min-height:0}
body[data-view=create] .workbench-header{margin-bottom:6px}
body[data-view=create] .source-zone{min-height:0;padding:14px 18px;display:flex;flex-direction:column;gap:4px}
body[data-view=create] .source-zone textarea{height:104px;min-height:80px;padding:6px 0;font-size:20px;line-height:1.5}
body[data-view=create] .source-actions{order:2;justify-content:flex-start;gap:6px;margin:0}
body[data-view=create] .source-actions .icon-button{height:40px;width:40px;background:transparent;border:0}
body[data-view=create] .topic-starter{align-self:flex-start;margin:0;padding:5px 0}
body[data-view=create] .source-count{min-height:0}
body[data-view=create] .source-list:empty,body[data-view=create] .source-count:empty{display:none}
body[data-view=create] .format-choices{grid-template-columns:repeat(7,minmax(0,1fr));margin:16px 0;gap:8px}
body[data-view=create] .format-choice{min-height:56px;padding:10px 4px;border-radius:15px}
body[data-view=create] .format-choice .icon{width:23px;height:23px}
.create-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.create-options>#learning-controls,.create-options>#video-controls{display:contents}
.create-option{display:flex;align-items:center;gap:12px;min-height:82px;text-align:left;padding:12px;background:var(--white);border:1px solid var(--line);border-radius:18px}
.create-option:hover{border-color:#a4b6a6;background:#f2f6ee}
.create-option .option-glyph{display:grid;place-items:center;flex:0 0 40px;height:44px;border-radius:13px;background:#edf2e7;color:var(--green)}
.create-option>span:nth-child(2){min-width:0;flex:1}
.create-option small{display:block;font-size:10px;letter-spacing:.3px;color:#6a766c;margin-bottom:3px}
.create-option strong{display:block;font-size:13px;font-weight:600;line-height:1.35}
.create-option em{display:block;font-size:10px;font-style:normal;color:#657367;margin-top:4px}
.create-option>.icon{width:14px;height:14px;color:#778078}
body[data-view=create] .generate-row{position:static;padding:0;margin:18px 0 0;background:none;pointer-events:auto}
body[data-view=create] .generate-button{height:54px;max-width:none;gap:14px;font-size:16px;border-radius:17px}
body[data-view=create] .generate-button>.icon:last-child{margin-left:auto}
body[data-view=create] .generate-button>.icon:first-child{margin-right:auto}
body[data-view=create] .chat-panel{height:min(680px,calc(100dvh - 210px));max-height:none}
.learning-picker .audience-choices{margin-top:0}
.learning-picker .selected-framework{margin-top:16px}
.voice-speed{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:5px;border-radius:17px;background:#e9eee3;position:sticky;top:0;z-index:1}
.voice-speed button{padding:12px 4px;border-radius:13px;background:transparent;text-align:center}
.voice-speed [aria-pressed=true]{background:var(--white);box-shadow:0 2px 5px #263a3312}
.voice-speed strong,.voice-speed span{display:block;font-size:13px}
.voice-speed span{font-size:11px;color:#66746a;margin-top:4px}
.voice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}
.voice-row{display:flex;align-items:center;border:1px solid var(--line);border-radius:16px;background:var(--white);padding-right:2px}
.voice-row:has([aria-pressed=true]){border-color:var(--green);background:#eef4e9}
.voice-row>button:first-child{display:flex;gap:8px;align-items:center;flex:1;padding:10px 4px 10px 10px;background:none;text-align:left;font-size:13px;min-width:0}
.voice-avatar{width:30px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--voice-color);flex-shrink:0}
.voice-avatar .icon{width:18px;height:18px}
.voice-selected{display:none}.voice-row [aria-pressed=true] .voice-selected{display:block;margin-left:auto}.voice-selected .icon{width:14px;height:14px}
.voice-row>.icon-button{width:38px;height:44px;flex-shrink:0;background:none}
.voice-row>.icon-button .icon{width:17px;height:17px}
.voice-partner{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;margin:12px 0 0}
.voice-partner .icon{width:16px;height:16px}
@media(max-width:560px){
 body[data-view=create] #main{padding:12px 16px 18px;min-height:0}
 body[data-view=create] .view-heading{margin-bottom:12px}
 body[data-view=create] .studio-workbench{padding:12px;border-radius:22px}
 body[data-view=create] .workbench-header{min-height:26px;margin:-4px 0 0}
 body[data-view=create] .source-zone{padding:10px 12px;border-radius:16px}
 body[data-view=create] .source-zone textarea{height:82px;min-height:64px;font-size:17px}
 body[data-view=create] .source-actions .icon-button{min-height:40px;min-width:40px;height:40px;width:40px}
 body[data-view=create] .format-choices{gap:5px;margin:12px 0}
 body[data-view=create] .format-choice{min-height:52px;padding:8px 3px}
 .create-options{gap:7px}.create-option{padding:10px 8px;gap:7px;min-height:76px;border-radius:15px}
 .create-option .option-glyph{flex-basis:29px;height:36px;border-radius:10px}.option-glyph .icon{width:18px;height:18px}
 .create-option strong{font-size:11px}.create-option small{font-size:9px}.create-option em{font-size:9px}.create-option>.icon{display:none}
 body[data-view=create] .generate-row{margin-top:12px}
 .voice-list{gap:6px}.voice-row>button:first-child{font-size:12px;gap:5px;padding-left:7px}.voice-avatar{width:25px}.voice-selected{display:none!important}
 .voice-row>.icon-button{min-width:36px;width:36px}
}
.provider-control{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.provider-control>span{font-size:12px;font-weight:600;min-width:42px}
.provider-control>div{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;padding:4px;background:#e9eee3;border-radius:14px;flex:1;min-width:0}
.provider-control button{background:transparent;padding:10px 8px;border-radius:11px;font-size:13px}
.provider-control button[aria-pressed=true]{background:var(--white);box-shadow:0 2px 5px #263a3312}
.voice-auto{grid-column:1/-1}.voice-auto small{font-weight:400;color:var(--muted);margin-left:8px}
.provider-models{font-size:10px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere;margin:12px 0 0}
.provider-chip{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:999px;background:transparent;font-size:10px;padding:6px 10px;margin-left:auto;min-height:32px}
.provider-chip .icon{width:15px;height:15px}.workbench-header .provider-chip{margin-right:8px}.chat-header .provider-chip{margin-right:8px}
.chat-bubble a{text-decoration:underline;text-underline-offset:3px;color:inherit}
@media(max-width:560px){.provider-chip{min-height:32px;padding:5px 8px}.provider-control{gap:8px}}
.chat-provider{display:block;font-size:10px;letter-spacing:.2px;color:var(--muted);margin-bottom:6px}

.engine-choices{grid-template-columns:repeat(auto-fit,minmax(92px,1fr))}

/* A single scroll surface keeps search reachable above the phone keyboard. */
dialog.learning-dialog{position:fixed;top:calc(var(--visible-top,0px) + 16px);bottom:auto;margin:0 auto;width:min(640px,calc(100vw - 32px));max-width:none;height:min(720px,calc(var(--visible-height,100dvh) - 32px));max-height:none;overflow:hidden;border-radius:24px}
.learning-dialog[open]{display:flex;flex-direction:column}
.learning-dialog .modal-header{position:static;flex-shrink:0}
.learning-dialog .modal-body{padding:0;min-height:0;flex:1;display:flex;flex-direction:column}
.approach-results{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 14px;scrollbar-width:thin}
.approach-result{display:flex;align-items:center;gap:14px;width:100%;min-height:56px;text-align:left;padding:13px 14px;background:none;border-radius:14px;font-size:14px;line-height:1.35}
.approach-result>span{flex:1}.approach-result>.icon{width:22px;height:22px;flex-shrink:0}
.approach-result:hover,.approach-result[aria-pressed=true]{background:var(--white)}
.approach-result[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--line)}
.approach-result:disabled{opacity:.4}.approach-empty{padding:25px 14px;color:var(--muted);text-align:center}
.approach-tools{flex-shrink:0;padding:10px 18px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--paper)}
.approach-count{color:var(--muted);font-size:11px;margin:0 0 8px}
.approach-search-row{display:flex;gap:9px;align-items:stretch}
.approach-search-row select{width:170px;max-width:40%;padding:10px;border:1px solid var(--line);border-radius:13px;background:var(--white);color:var(--ink);font:inherit;font-size:13px;min-height:48px;text-overflow:ellipsis}
.approach-search-row label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:13px;background:var(--white)}
.approach-search-row label>.icon{width:18px;height:18px;flex-shrink:0;color:var(--muted)}
.approach-search-row input{font:inherit;font-size:16px;width:100%;min-width:0;border:0;outline:none;background:none;color:var(--ink)}
.approach-search-row label:focus-within{outline:2px solid var(--green);outline-offset:2px}
.notes-mode-choices,.notes-export-choices{display:flex;gap:10px}
.notes-mode-choices button,.notes-export-choices button{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:12px;padding:22px 10px;border-radius:17px;background:var(--white);border:1px solid var(--line);font-size:13px}
.notes-mode-choices [aria-pressed=true]{border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}
.notes-export-choices small{color:var(--muted)}
dialog.notes-dialog{width:880px}
.notes-document{max-width:680px;margin:0 auto;color:var(--ink);line-height:1.8;font-size:16px}
.notes-intro{font-size:18px;color:var(--muted);margin-bottom:30px}
.notes-section{position:relative;border-top:1px solid var(--line);padding:28px 0 20px}
.notes-section-number{font-size:11px;font-weight:600;color:var(--muted);letter-spacing:2px}
.notes-section h3{font-family:Manrope;font-size:24px;line-height:1.35;margin:8px 0 18px;letter-spacing:-.5px}
.notes-section p{white-space:pre-wrap;margin:12px 0;overflow-wrap:anywhere}
.notes-section ul{padding-left:22px}.notes-section li{margin:6px 0;overflow-wrap:anywhere}
.notes-section figure{margin:24px 0;padding:22px;border:1px solid var(--line);border-radius:20px;background:var(--white)}
.notes-section figcaption{font-weight:600;margin-bottom:16px}.notes-section figure svg{width:100%;max-width:460px;height:auto;display:block;margin:auto}
.notes-section figure p{font-size:13px;color:var(--muted);margin-bottom:0}
@media(max-width:560px){
 body[data-view=create] .format-choices{display:flex;overflow-x:auto;scrollbar-width:thin;gap:5px;padding-bottom:4px;scroll-snap-type:x proximity}
 body[data-view=create] .format-choice{flex:1 0 44px;scroll-snap-align:start}
 dialog.learning-dialog{top:calc(var(--visible-top,0px) + 8px);width:calc(100vw - 16px);height:calc(var(--visible-height,100dvh) - 16px);margin:0 auto;border-radius:22px}
 .learning-dialog .modal-header{padding:12px 16px}.learning-dialog .modal-header:before{display:none}
 .learning-dialog .modal-body{padding:0}.approach-results{padding:8px}.approach-result{min-height:54px;font-size:14px}
 .approach-tools{padding:9px 12px max(12px,env(safe-area-inset-bottom))}.approach-search-row select{width:124px;font-size:16px;padding:8px}.approach-search-row label{padding:10px 8px;gap:5px}
 .notes-document{font-size:15px}.notes-intro{font-size:16px}.notes-section{padding:22px 0 12px}.notes-section h3{font-size:21px}.notes-section figure{padding:14px;margin:18px 0}
}

.engine-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.engine-choices button{font-size:13px;padding:12px 10px;justify-content:flex-start}.engine-choices button:last-child{grid-column:1/-1}
