:root{--bg:#f5f3ee;--paper:#fffefb;--ink:#25362f;--muted:#788078;--line:#dfE2d9;--green:#284a3d;--accent:#b88a54;--radius:18px;font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,label.upload-label{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9bb5a2;outline-offset:3px}input,textarea,select{color:var(--ink);border:1px solid var(--line);border-radius:10px;background:var(--paper);padding:13px;max-width:100%;font-size:16px}textarea{resize:vertical;line-height:1.8}label{display:block;font-size:13px;margin:16px 0 9px;font-weight:600}a{color:var(--green);text-underline-offset:4px}h1,h2,h3,p{margin-top:0}h1{font-size:30px;letter-spacing:-1px;font-weight:600;line-height:1.55}h2{font-size:22px;line-height:1.6}p{line-height:1.8}button{transition:background .15s,transform .15s}.primary{background:var(--green);color:white;border-radius:10px;padding:13px 20px;font-size:14px;font-weight:600;min-height:46px}.primary:hover{background:#3b6451}.quiet{background:transparent;color:var(--ink);border-radius:8px;padding:10px 12px;min-height:44px;font-size:13px}.quiet:hover{background:#e7e9e0}.wide{width:100%}.muted{color:var(--muted);font-size:14px;line-height:1.8}.small{font-size:12px}.eyebrow{font-size:10px;letter-spacing:2.2px;font-weight:700;color:var(--accent);margin-bottom:16px}.app{display:flex;min-height:100dvh}.sidebar{width:234px;position:fixed;inset:0 auto 0 0;background:#ebece4;padding:35px 20px 24px;display:flex;flex-direction:column;border-right:1px solid var(--line)}.wordmark{display:flex;align-items:center;color:var(--green);text-decoration:none;font-family:Georgia,serif;font-size:49px;line-height:1;letter-spacing:-3px;margin:0 12px 45px}.wordmark>span{color:var(--accent)}.wordmark strong{font:600 14px/1.5 -apple-system,sans-serif;letter-spacing:-.2px;margin-left:11px}.wordmark small{font-size:14px;font-weight:400;color:var(--muted)}nav{margin-top:26px}.nav-item{display:flex;width:100%;align-items:center;gap:12px;padding:15px 12px;border-radius:9px;color:#6b756d;background:transparent;font-size:13px;margin-bottom:5px;text-align:left}.nav-item.selected{background:#dce3d8;color:var(--green);font-weight:600}.nav-item span{font-size:18px}.nav-item em{font-size:10px;font-style:normal;margin-left:auto;background:#f5f5ef;border-radius:5px;padding:2px 6px}.sidebar-note{margin-top:auto;padding:20px 12px;font-size:11px}.sidebar-note p{font-size:11px;color:var(--muted);line-height:1.9;margin:12px 0 0}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#719077;margin-right:7px}.logout{text-align:left;margin-left:0;color:var(--muted)}main{margin-left:234px;width:calc(100% - 234px);min-width:0}.topbar{height:78px;border-bottom:1px solid var(--line);padding:0 48px;display:flex;align-items:center;justify-content:space-between}.topbar p{font-size:10px;letter-spacing:1.5px;margin:0;color:#7a827b}.topbar p span{padding:0 15px;color:#bbc0b6}.topbar .quiet{color:var(--muted)}.page{padding:48px;max-width:1400px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:35px}.page-heading h1{margin-bottom:9px}.page-heading .muted{margin:0}.page-count{font:italic 18px Georgia,serif;color:var(--muted)}.search-row{display:flex;gap:12px;margin-bottom:28px}.search-box{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;background:var(--paper);flex:1}.search-box>span{font-size:28px;line-height:1;padding:0 14px;color:#8c958c}.search-box input{width:100%;background:transparent;border:0;font-size:13px;padding:15px 10px 15px 0}.search-row select{max-width:220px;font-size:12px}.chat-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.chat-card{background:var(--paper);text-align:left;border:1px solid var(--line);border-radius:var(--radius);padding:24px;min-height:210px;display:flex;flex-direction:column;width:100%;color:var(--ink)}.chat-card:hover{border-color:#aab9a8;transform:translateY(-2px)}.card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.tag{background:#eef0e8;color:#64715f;padding:5px 8px;border-radius:5px;font-size:10px;max-width:78%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-date{font-size:10px;color:#92998e;white-space:nowrap}.chat-card h2{font-size:16px;line-height:1.7;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chat-card p{font-size:12px;color:var(--muted);line-height:1.85;margin:0 0 20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.card-bottom{margin-top:auto;display:flex;justify-content:space-between;color:#8b9388;font-size:10px}.card-bottom b{font-size:18px;font-weight:400;color:var(--green)}.empty{grid-column:1/-1;padding:65px 20px;text-align:center;border:1px dashed #cfd5c9;border-radius:var(--radius);color:var(--muted);line-height:2}.notice{padding:12px 22px;background:#efe6d4;color:#786038;font-size:12px;line-height:1.7;overflow-wrap:anywhere}.thread-page{max-width:940px;margin:auto;padding:25px 42px 0}.thread-heading{border-bottom:1px solid var(--line);padding-bottom:20px}.thread-heading h1{font-size:22px;margin:14px 0 6px;overflow-wrap:anywhere}.thread-meta{font-size:11px}.thread-actions{display:flex;gap:8px;margin:9px -10px 0}.messages{padding:26px 0 0}.message{margin:0 0 32px;scroll-margin-top:20px}.message-head{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:11px;color:var(--muted)}.avatar{height:24px;width:24px;border-radius:7px;display:grid;place-items:center;color:var(--paper);background:var(--green);font-size:12px}.message.user .avatar{background:#bdab8c}.message time{font-size:10px;margin-left:auto}.message-body{font-size:15px;line-height:1.95;overflow-wrap:anywhere}.message.user .message-body{background:#e9eee3;padding:17px 20px;border-radius:3px 15px 15px;margin-left:34px;white-space:pre-wrap}.message.assistant .message-body{padding-left:34px}.prose p{margin:0 0 15px}.prose h1,.prose h2,.prose h3{font-size:18px;margin:25px 0 12px;letter-spacing:0}.prose ul,.prose ol{padding-left:23px}.prose li{margin-bottom:5px}.prose pre{overflow:auto;background:#edf0e8;border:1px solid #dfe4d8;border-radius:10px;padding:16px;font-size:12px;line-height:1.7;white-space:pre}.prose code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#e8ece2;padding:2px 5px;border-radius:3px;font-size:.85em}.prose pre code{padding:0;background:none}.prose blockquote{margin:15px 0;padding:8px 16px;border-left:3px solid #a4b098;color:#6c7965}.prose .table-wrap{overflow-x:auto;margin:16px 0}.prose table{border-collapse:collapse;font-size:12px;width:100%}.prose th,.prose td{padding:10px;border:1px solid var(--line);min-width:100px}.prose th{background:#e9eee3}.tool-summary{font-size:12px;color:var(--muted);padding:10px 0 25px}.tool-summary summary{cursor:pointer;padding:12px 0}.tool-summary li{line-height:1.9}.composer{position:sticky;bottom:0;background:var(--bg);padding:12px 0 max(22px,env(safe-area-inset-bottom));z-index:3}.composer textarea{width:100%;border-radius:14px 14px 0 0;border-bottom:0;display:block;min-height:80px;max-height:240px;resize:vertical;background:var(--paper);font-size:14px}.composer-bottom{border:1px solid var(--line);border-top:0;background:var(--paper);border-radius:0 0 14px 14px;padding:0 12px 10px;display:flex;align-items:center;gap:8px}.composer-bottom>span{font-size:10px;color:var(--muted);margin-right:auto}.composer-bottom .primary{font-size:12px;padding:8px 16px;min-height:38px}.root-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}.root-tabs button{background:#e7eade;color:#67745f;font-size:12px;padding:11px 15px;border-radius:8px;min-height:44px}.root-tabs button.selected{background:var(--green);color:white}.file-toolbar{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding-bottom:17px}.file-toolbar>span{font-size:12px;overflow-wrap:anywhere;margin-right:auto}.upload-label{margin:0;cursor:pointer;font-size:12px;display:flex;align-items:center}.file-list{margin-top:15px}.file-row{display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--line);padding:15px 0}.file-icon{color:var(--accent);font-size:24px;width:28px;flex-shrink:0}.file-name{flex:1;min-width:0;background:none;color:var(--ink);text-align:left;padding:7px 0;font-size:13px;overflow-wrap:anywhere;line-height:1.7}.file-name small{display:block;font-size:10px;color:var(--muted)}.file-actions{display:flex;align-items:center;gap:2px}.file-actions a{font-size:18px;text-decoration:none;min-width:44px;min-height:44px;display:grid;place-items:center}.file-actions button{font-size:18px}.login-screen{min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 20% 10%,#dfe6d6 0,transparent 55%),var(--bg);padding:28px}.login-card{width:380px;max-width:100%}.brand-mark{font:80px/1 Georgia,serif;color:var(--green);letter-spacing:-8px;margin-bottom:35px}.brand-mark span{color:var(--accent)}.login-card h1{font-size:35px;margin:0 0 18px}.login-card .muted{margin-bottom:30px}.login-card input{width:100%}.login-card .primary{margin-top:14px;display:flex;justify-content:space-between}.login-foot{margin-top:40px;padding-top:20px;border-top:1px solid #d8dece;font-size:9px;letter-spacing:2px;color:var(--muted);display:flex;justify-content:space-between}#login-error,.dialog-error{color:#a35342;font-size:12px;line-height:1.7;margin:12px 0 0}dialog{border:1px solid var(--line);border-radius:20px;padding:32px;background:var(--paper);color:var(--ink);width:540px;max-width:calc(100% - 28px);max-height:85dvh;box-shadow:0 25px 100px #12241b25}dialog::backdrop{background:#26382f70;backdrop-filter:blur(4px)}dialog input,dialog textarea{width:100%}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.preview-dialog{width:900px}.preview-header{display:flex;gap:15px;align-items:flex-start;justify-content:space-between}.preview-header h2{font-size:17px;overflow-wrap:anywhere}#preview-body{font-size:14px;line-height:1.9;overflow-wrap:anywhere}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);max-width:90vw;padding:13px 22px;background:#294a3d;color:white;border-radius:10px;box-shadow:0 5px 20px #0002;z-index:100;font-size:13px;line-height:1.7}.mobile-nav,.mobile-brand{display:none}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(min-width:1500px){.chat-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.sidebar{width:205px;padding:30px 15px}main{margin-left:205px;width:calc(100% - 205px)}.page{padding:35px 28px}.topbar{padding:0 28px}.chat-list{grid-template-columns:1fr}.thread-page{padding:22px 28px 0}}
@media(max-width:680px){.sidebar{display:none}main{margin:0;width:100%;padding-bottom:calc(66px + env(safe-area-inset-bottom))}.topbar{height:62px;padding:0 20px;gap:15px}.topbar p{font-size:9px;letter-spacing:.6px;margin-right:auto}.topbar p span{padding:0 7px}.topbar .quiet span{display:none}.mobile-brand{display:block;font:33px Georgia,serif;letter-spacing:-3px}.mobile-brand span{color:var(--accent)}.page{padding:29px 20px}.page-heading{margin-bottom:25px;align-items:flex-start}.page-heading h1{font-size:23px;letter-spacing:-.6px}.page-heading .muted{font-size:12px}.eyebrow{font-size:9px;margin-bottom:11px}.page-count{font-size:14px;margin-top:34px;white-space:nowrap}.search-row{flex-wrap:wrap;gap:9px;margin-bottom:20px}.search-box{flex-basis:100%}.search-row select{max-width:100%;padding:10px;font-size:12px}.chat-card{padding:20px;min-height:190px}.card-top{margin-bottom:15px}.chat-list{gap:12px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;justify-content:space-around;background:#f9faf3f5;backdrop-filter:blur(12px);border-top:1px solid var(--line);padding:7px 15px calc(7px + env(safe-area-inset-bottom));z-index:5}.mobile-nav button{background:transparent;color:#8c9589;font-size:20px;min-width:76px;min-height:48px;border-radius:9px}.mobile-nav button span{display:block;font-size:10px;margin-top:4px}.mobile-nav button.selected{color:var(--green);background:#e7eddf}.thread-page{padding:14px 18px 0}.thread-heading h1{font-size:19px}.thread-heading .muted{font-size:11px}.message-body{font-size:15px}.message.assistant .message-body{padding-left:0}.message.user .message-body{margin-left:14px;padding:14px 16px}.message{margin-bottom:30px}.composer{bottom:calc(66px + env(safe-area-inset-bottom));padding-bottom:10px}.composer-bottom>span{font-size:9px;max-width:180px}.file-toolbar{flex-wrap:wrap;gap:6px}.file-toolbar>span{flex:1;min-width:60%}.file-toolbar .upload-label{margin-left:auto}.file-actions{gap:0}.file-actions .quiet{padding:8px}.root-tabs{gap:6px}.root-tabs button{font-size:11px;padding:9px 12px}.file-row{gap:8px}.file-name{font-size:12px}.file-icon{width:20px;font-size:20px}dialog{padding:23px;max-height:calc(100dvh - 50px)}.toast{bottom:calc(85px + env(safe-area-inset-bottom));width:max-content}.notice{padding:12px 20px}.login-card h1{font-size:32px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.model-controls{display:flex;gap:10px;align-items:end;margin-bottom:8px}.model-controls label{margin:0;min-width:0;font-size:10px;color:var(--muted)}.model-controls label:first-child{flex:1}.model-controls select{display:block;width:100%;padding:9px 10px;margin-top:5px;font-size:12px;min-height:40px}.model-controls>button{padding:7px 10px}#model-notice{font-size:10px;line-height:1.5;margin:4px 0 8px}#model-notice:empty{display:none}#new-model-notice{font-size:11px;margin:8px 0}.composer .model-controls{max-width:100%}#new-form .model-controls{margin-top:16px}

.icon{width:20px;height:20px;display:inline-block;vertical-align:middle;flex-shrink:0}.topbar .quiet{display:flex;gap:7px;align-items:center}.search-box>.icon,.search-box>span .icon{width:21px;height:21px}.mobile-nav .icon{display:block;margin:0 auto}.nav-item .icon{width:18px;height:18px}@media(max-width:680px){.page-heading{display:block}.page-count{display:block;font-family:inherit;font-style:normal;font-size:10px;margin-top:14px;color:var(--muted)}}

.usage-panel{margin:16px clamp(16px,4vw,56px);padding:14px 18px;border:1px solid #d8d5cb;border-radius:14px;background:#fffdf8}.usage-panel summary{cursor:pointer;font-weight:600}.usage-panel summary span{font-size:12px;font-weight:400;margin-left:8px}.usage-window{display:grid;gap:6px;margin:14px 0;overflow-wrap:anywhere}.usage-window span,.usage-window small{font-size:12px}.usage-window progress{width:100%;height:8px;accent-color:#45735e}#run-status{font-size:13px;color:#37694d}#run-status[data-phase="failed"],#run-status[data-phase="disconnected"],#run-status[data-phase="unknown"]{color:#a33d30}

.dismissible{display:flex;align-items:center;gap:12px;touch-action:pan-y}.dismissible>span{flex:1;min-width:0;overflow-wrap:anywhere}.dismissible>button{flex:0 0 44px;width:44px;height:44px;border-radius:8px;color:inherit;background:transparent;font-size:24px}.dismissible>button:hover{background:#ffffff22}.toast{padding:8px 10px 8px 18px}.prompt-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.prompt-heading label{margin:0;font-size:12px}.prompt-heading button{flex-shrink:0;font-size:12px}textarea.prompt-expanded,.composer textarea.prompt-expanded{height:45dvh;min-height:180px;max-height:55dvh}.composer:has(.prompt-expanded){max-height:calc(100dvh - 100px);overflow:auto}dialog:has(#new-prompt.prompt-expanded){width:900px}

.prompt-heading{flex-wrap:wrap;gap:0 8px}
.composer .prompt-heading{position:sticky;top:0;background:var(--bg);z-index:1}
.prompt-heading .usage-inline{background:transparent;color:var(--green);padding:8px 0;min-height:40px;max-width:100%;font-size:11px;text-align:right;line-height:1.6;border-radius:6px;flex:1 1 auto}
.usage-inline:hover{text-decoration:underline;text-underline-offset:4px}
.prompt-heading .usage-stale{color:#94724a}
.prompt-toolbar{display:flex;align-items:center;gap:2px;flex-wrap:wrap;margin-bottom:4px}
.prompt-toolbar .quiet{font-size:12px;padding:6px 10px;min-height:38px}
.prompt-toolbar [aria-controls]{margin-left:auto}
.message-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:8px}
.message>.message-actions{margin-left:25px}
.message-actions .quiet{color:#61745f;font-size:12px}
.file-download{display:inline;overflow-wrap:anywhere}
.attachments{display:flex;gap:6px;flex-wrap:wrap}
.attachments:not(:empty){margin:5px 0 8px;max-height:115px;overflow-y:auto}
.attachment-chip{display:flex;align-items:center;max-width:100%;min-width:0;border:1px solid var(--line);border-radius:9px;background:#eef1e8;font-size:11px;line-height:1.5}
.attachment-chip a{padding:8px 10px;min-width:0;overflow-wrap:anywhere;text-decoration:none}
.attachment-chip button{background:transparent;font-size:20px;min-width:38px;min-height:38px;color:var(--muted)}
.dragging-files{outline:2px dashed var(--green);outline-offset:4px}
.prompt-library-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:15px 0}
.prompt-library-controls input{flex:1 1 180px;min-width:0}
.prompt-library-controls select{font-size:12px;max-width:160px;min-height:44px}
.prompt-library-controls .quiet{margin-left:auto}
#prompts-dialog{width:680px}
.prompt-card{padding:18px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.prompt-card h3{font-size:14px;margin:0 0 4px}
.prompt-card .small{margin:0 0 10px}
.prompt-preview{white-space:pre-wrap;line-height:1.8;font-size:13px;max-height:190px;overflow:auto}
.clipboard-fallback{position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}
#copy-text{font-size:13px}
.usage-window{margin:20px 0}
@media(max-width:680px){
 .prompt-heading label{font-size:11px}
 .prompt-heading .usage-inline{font-size:10px}
 .prompt-toolbar .quiet{padding:6px 8px;font-size:11px}
 .message>.message-actions{margin-left:0}
 .composer:has(.prompt-expanded){max-height:calc(100dvh - 145px)}
}
/* Provider boundary and Gemini's literal-text workspace. */
.provider-tabs{display:flex;gap:8px;padding:12px 24px;border-bottom:1px solid var(--line,#ddd)}
.provider-tabs button{padding:9px 14px;border:1px solid #d6d2c9;border-radius:20px;background:transparent;color:inherit}
.provider-tabs button[aria-pressed="true"]{background:#253e3c;color:white;border-color:#253e3c}
.gemini-toolbar{display:flex;flex-wrap:wrap;gap:8px}
.gemini-composer{margin:24px 0;padding:18px;border:1px solid #d6d2c9;border-radius:16px;background:#fffdf8}
.gemini-composer textarea{width:100%;min-width:0;resize:vertical}
.gemini-composer details{margin:12px 0}.gemini-composer .model-controls{display:grid;grid-template-columns:minmax(0,1fr) auto 140px;gap:10px;align-items:end}
.gemini-composer .model-controls label{min-width:0;max-width:100%}.gemini-composer select{max-width:100%}
.gemini-composer input[type="number"]{display:block;width:100%;margin-top:5px}.gemini-composer .dialog-actions{flex-wrap:wrap}
.gemini-raw{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
.gemini-render{display:flex;align-items:center;gap:8px;font-size:12px}.gemini-render input{width:auto}
#gemini-notice,#gemini-error{overflow-wrap:anywhere}#gemini-error,#gemini-settings-error{color:#9e3934}
#gemini-list,#gemini-messages{margin-top:20px}#gemini-library-list button{white-space:pre-wrap;max-height:240px;overflow:auto}
.gemini-mode-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}.gemini-mode-choice label{display:grid;grid-template-columns:auto 1fr;gap:2px 9px;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--paper);cursor:pointer}.gemini-mode-choice input{grid-row:1/3;margin:3px 0 0;width:auto}.gemini-mode-choice strong{font-size:13px}.gemini-mode-choice span{font-size:11px;color:var(--muted)}.harness-card{margin:14px 0;padding:14px;border:1px solid #c9d5c6;border-radius:14px;background:#eef3ea}.harness-head{display:flex;justify-content:space-between;gap:10px;font-size:12px}.harness-head span{color:var(--muted)}.harness-card>p{margin:9px 0;font-size:13px}.harness-card dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0}.harness-card dl div{min-width:0}.harness-card dt{font-size:9px;text-transform:uppercase;color:var(--muted)}.harness-card dd{margin:2px 0;font-size:11px;overflow-wrap:anywhere}.harness-card details{font-size:11px}.harness-card pre{max-height:240px;overflow:auto;background:#fff;padding:10px;border-radius:8px}.harness-card .dialog-actions{justify-content:flex-start;margin-top:10px;flex-wrap:wrap}
@media(max-width:680px){.provider-tabs{padding:10px 16px}.provider-tabs button{font-size:12px}.gemini-composer{padding:12px}.gemini-composer .model-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.gemini-composer .model-controls label:first-child{grid-column:1/-1}.gemini-composer .model-controls>button{grid-row:2;grid-column:2}.gemini-composer .model-controls label:last-child{grid-row:2;grid-column:1}.gemini-mode-choice{grid-template-columns:1fr}.harness-card dl{grid-template-columns:1fr}}
/* Compact reading-first composer: retain controls and quota detail, remove blank rows. */
.composer{padding:6px 0 8px;border-top:1px solid var(--line);max-height:calc(100dvh - 24px);overflow-y:auto}
.composer .model-controls{gap:8px;margin:0 0 3px}
.composer .model-controls label{font-size:10px;line-height:1.2}
.composer .model-controls select{margin-top:2px;padding:5px 8px;min-height:32px;font-size:12px}
.composer .model-controls>button{padding:6px;min-height:36px;min-width:36px}
.composer .prompt-heading{position:static;gap:0 8px;min-height:28px}
.composer .prompt-heading label{font-size:11px}
.composer .prompt-heading .usage-inline{font-size:11px;min-height:28px;padding:3px 0;line-height:1.5;flex:0 1 auto;margin-left:auto}
.composer .prompt-toolbar{margin:0;gap:2px}
.composer .prompt-toolbar .quiet{min-height:36px;padding:4px 8px;font-size:12px}
.composer-entry{display:flex;align-items:flex-end;gap:4px;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:3px}
.composer .composer-entry textarea{flex:1;min-width:0;width:0;min-height:46px;height:46px;max-height:110px;border:0;border-radius:9px;padding:10px 8px;line-height:1.5;font-size:16px;resize:none;background:transparent}
.composer-buttons{display:flex;gap:3px;align-items:center;flex-shrink:0;padding-bottom:1px}
.composer-buttons .primary,.composer-buttons .quiet{min-height:44px;padding:8px;font-size:12px;white-space:nowrap}
.composer-status{margin:3px 2px 0;font-size:10px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.composer .attachments:not(:empty){margin:3px 0 5px;max-height:84px}
.composer .composer-entry textarea.prompt-expanded{height:45dvh;min-height:180px;max-height:55dvh;resize:vertical}
.composer:has(.prompt-expanded) .composer-entry{display:block}
.composer:has(.prompt-expanded) .composer-entry textarea{width:100%}
.composer:has(.prompt-expanded) .composer-buttons{justify-content:flex-end}
.tool-summary{padding:3px 0 7px}.tool-summary:empty{display:none}.tool-summary summary{padding:6px 0;min-height:32px}
#model-notice:empty,#new-model-notice:empty{display:none}
@media(max-width:680px){
 main{padding-bottom:calc(54px + env(safe-area-inset-bottom))}
 .mobile-nav{padding:5px 12px calc(5px + env(safe-area-inset-bottom));margin-top:0}
 .mobile-nav button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;font-size:18px}
 .mobile-nav .icon{width:18px;height:18px;margin:0}
 .mobile-nav button span{display:inline;margin:0;font-size:11px}
 .composer{bottom:calc(54px + env(safe-area-inset-bottom));max-height:calc(100dvh - 68px - env(safe-area-inset-bottom))}
 .composer:has(.prompt-expanded){max-height:calc(100dvh - 80px - env(safe-area-inset-bottom))}
 .toast{bottom:calc(67px + env(safe-area-inset-bottom))}
}

/* Scheduled tasks share the existing navigation and readable mobile typography. */
.task-toolbar,.task-actions,.task-card-head{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.task-toolbar{margin:16px 0}.task-card-head{justify-content:space-between}.task-card-head h2{font-size:18px;margin:0}
.task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px;margin:24px 0}
.task-card,.task-run,.task-help{padding:18px;border:1px solid var(--line,#dedbd3);border-radius:14px;background:var(--paper,#fffdf8);overflow-wrap:anywhere;min-width:0}
.task-run{margin:12px 0}.task-help{margin:16px 0}.task-help summary{cursor:pointer}.task-artifact{padding:8px;text-decoration:underline}
.task-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}#task-dialog{width:min(680px,calc(100% - 24px))}#task-dialog input,#task-dialog select,#task-dialog textarea{max-width:100%;width:100%;box-sizing:border-box}#task-dialog label{display:block;margin-top:14px}#task-dialog textarea{min-height:140px}#task-runs{padding-bottom:24px}
@media(max-width:680px){.mobile-nav{grid-template-columns:repeat(4,1fr)}.task-form-grid{grid-template-columns:1fr}.task-card,.task-run{padding:14px}.task-actions button{min-height:40px}}
