#list-heading{display:flex;align-items:center;justify-content:space-between;padding:0 14px 8px;font-size:12px}#toggle-archived{background:#e3f1e9;color:#075e54}.session{user-select:none;-webkit-touch-callout:none;touch-action:pan-y}.session.selected{background:#c4e8dc}#menu-title{flex:1;font-size:13px}#session-menu{gap:3px;padding:8px}#session-menu button{font-size:12px;padding:7px}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none;position:fixed;inset:0;width:100%;font-family:system-ui,-apple-system,sans-serif;color:#19352f;background:#e8efeb}body{height:100dvh}button,input,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:12px;padding:10px 14px;background:#087f6f;color:white;min-height:44px}button:hover{filter:brightness(1.08)}button:disabled{opacity:.5;cursor:default}input,textarea{border:1px solid #d4dfda;border-radius:12px;padding:12px;max-width:100%;background:white;color:#19352f}input:focus,textarea:focus{outline:2px solid #16a98d}button:focus-visible{outline:3px solid #e4b74b;outline-offset:2px}[hidden]{display:none!important}#app{height:100%;max-width:1440px;margin:auto;display:grid;grid-template-columns:330px 1fr;background:#fff;box-shadow:0 0 40px #24493c15}header{height:76px;background:#075e54;color:white;display:flex;align-items:center;gap:10px;padding:12px 18px;flex-shrink:0}header strong{display:block;font-size:18px}header small{display:block;font-size:12px;margin-top:4px;color:#cae9e0}header button{background:transparent;padding:8px}header>div:first-child{flex:1}#sidebar{display:flex;flex-direction:column;min-height:0;border-right:1px solid #d7e1dc}#sessions{overflow-y:auto;flex:1}.search{padding:14px}.search input{width:100%;background:#f0f5f2;border:0}.session{background:white;color:#214139;border-radius:0;text-align:left;width:100%;padding:18px 20px;border-bottom:1px solid #f0f2ef;display:flex;gap:14px;align-items:center}.session.active{background:#e3f1e9}.session .avatar{background:#d8ede3;color:#075e54;flex-shrink:0}.session span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.session small{display:block;font-size:11px;color:#71857d;margin-top:6px}footer{padding:16px;font-size:11px;color:#70857c}#detail{min-width:0;min-height:0;display:flex;flex-direction:column;background-color:#eef1e9;background-image:radial-gradient(#9fbaaa25 1px,transparent 1px);background-size:22px 22px}.heading{flex:1;min-width:0}.heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar{border-radius:50%;width:42px;height:42px;display:grid;place-items:center;font-weight:700;background:#f1d58c;color:#075e54}#back{display:none;font-size:28px}#messages{overflow-y:auto;flex:1;padding:24px;overscroll-behavior:contain;scroll-behavior:smooth}.bubble{padding:10px 15px;margin:0 0 14px;width:fit-content;max-width:86%;background:white;box-shadow:0 1px 2px #143b2620;border-radius:0 14px 14px 14px;overflow-wrap:anywhere;line-height:1.6}.bubble.user{margin-left:auto;background:#d8f4cd;border-radius:14px 0 14px 14px;white-space:pre-wrap}.bubble p{margin:0 0 8px}.bubble p:last-child{margin:0}.bubble h1,.bubble h2,.bubble h3{font-size:1.15em}.bubble pre{position:relative;overflow:auto;background:#163c34;color:#e2f2e8;border-radius:8px;padding:42px 12px 12px;max-width:100%}.bubble code{font-family:ui-monospace,monospace;font-size:.9em}.bubble pre button{position:absolute;right:5px;top:4px;font-size:11px;min-height:28px;padding:4px 9px}.bubble table{display:block;overflow:auto;border-collapse:collapse}.bubble td,.bubble th{padding:5px;border:1px solid #cad7cf}.bubble a{color:#087d70}.empty{text-align:center;margin:15vh auto;color:#6c8377;max-width:300px;line-height:1.8}#composer{display:flex;gap:9px;align-items:flex-end;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:#f8faf8}#text{resize:none;flex:1;min-height:46px;max-height:140px;border:0}#send{border-radius:50%;width:46px;height:46px}#stop{background:#8b4439}#tool-status{font-size:12px;color:#526b5f;padding:0 20px 4px;white-space:pre-wrap}#requests{max-height:45dvh;overflow:auto;background:#fff8df}#requests:empty{display:none}.request{padding:16px;border-top:1px solid #e7dbb5}.request pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:140px;overflow:auto}.request button{margin-right:8px}.request label{display:block;padding:8px 0}.request input[type=text]{display:block;width:100%}.request input[type=checkbox],.request input[type=radio]{margin-right:10px}.request fieldset{border:0;margin:0 0 12px;padding:0}.request legend{font-weight:600}#notice{background:#fff0d6;color:#784827;padding:12px;font-size:13px;white-space:pre-wrap}.login{height:100%;display:grid;place-items:center;background:#eef4ef;padding:24px}.login form{width:min(100%,360px);background:white;padding:28px;border-radius:22px;box-shadow:0 14px 50px #16453115}.brand{width:52px;height:52px;border-radius:16px;background:#075e54;color:#f6d78a;display:grid;place-items:center;font-size:28px;font-weight:bold}.login h1{margin-bottom:4px}.login p{color:#72857d;font-size:14px}.login label{display:block;font-size:13px;margin-top:18px}.login input{display:block;width:100%;margin-top:7px}.login button{width:100%;margin-top:22px}.login #login-error{color:#994936}@media(max-width:700px){#app{display:block}#sidebar,#detail{height:100%}#detail{display:none}#app.chat-open #sidebar{display:none}#app.chat-open #detail{display:flex}#back{display:block}header{height:68px;padding:10px 12px}#messages{padding:16px 12px}.bubble{max-width:92%;font-size:15px}#composer{padding-left:10px;padding-right:10px}#rename{font-size:12px}#requests{max-height:50dvh}}
/* Image input: native file picker/capture, no camera stream. */
#attachments{display:flex;gap:8px;padding:8px 14px;overflow-x:auto;background:#f0f5f2;flex-shrink:0}#attachments>div{position:relative;flex-shrink:0}#attachments img{width:76px;height:76px;object-fit:cover;border-radius:10px}#attachments button{position:absolute;right:0;top:0;min-height:28px;width:28px;padding:0;border-radius:50%;background:#19352f}.chat-image{display:block;max-width:100%;width:auto;max-height:320px;object-fit:contain;border-radius:10px;margin:5px 0}#composer .icon{width:36px;min-width:36px;padding:5px;background:transparent;color:#527569}#composer .icon svg{width:24px;height:24px}#composer textarea{min-width:0}#composer{gap:5px}
/* --- polish: icons, model chip, sheet --- */
header .icon{display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%;flex-shrink:0}
header .icon svg{width:22px;height:22px}
svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
svg .f{fill:currentColor;stroke:none}
button.danger{background:#8b4439}
header .icon:active{background:#ffffff2e}
.avatar{box-shadow:0 1px 3px #143b2622}
.chip{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:4px 10px;min-height:28px;border-radius:999px;background:#ffffff24;color:#e8f7f1;font-size:11px;font-weight:600;max-width:100%}
.chip svg{width:14px;height:14px;opacity:.8}
.chip .dot{width:7px;height:7px;border-radius:50%;background:#7fe0b8;box-shadow:0 0 0 2px #7fe0b833;flex-shrink:0}
.chip #model-chip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#session-menu button.icon{padding:0}
#session-menu{height:68px}
.model-row{display:flex;align-items:center;gap:10px;padding:12px 4px;border-bottom:1px solid #eef2ef;font-size:15px;cursor:pointer}
.model-row input{accent-color:#087f6f;width:20px;height:20px;margin:0;flex-shrink:0}
.model-list fieldset{border:0;margin:0;padding:0}
.model-list legend{position:sticky;top:0;background:#fff;width:100%;padding:14px 4px 6px;font-size:12px;font-weight:700;color:#4b6a5f;text-transform:uppercase;letter-spacing:.03em}
.muted{color:#72857d;text-align:center;padding:24px 8px}
.sheet{position:fixed;inset:0;z-index:40;display:flex;align-items:flex-end;justify-content:center;background:#07231c88;backdrop-filter:blur(2px)}
.sheet-card{background:#fff;width:min(100%,560px);max-height:86dvh;display:flex;flex-direction:column;border-radius:20px 20px 0 0;overflow:hidden;box-shadow:0 -12px 40px #061b1533}
.sheet-card>header{background:#075e54;height:60px}
.sheet-card>header strong{flex:1;font-size:17px}
.sheet-tools{display:flex;gap:8px;padding:12px 14px 6px}
.sheet-tools input{flex:1;background:#f0f5f2;border:0}
#model-status{padding:0 16px;font-size:12px;color:#4b6a5f;min-height:0}
#model-status:not(:empty){padding-bottom:6px}
.model-list{overflow-y:auto;padding:0 16px calc(16px + env(safe-area-inset-bottom))}
#sessions{scrollbar-width:thin}
.bubble{box-shadow:0 1px 2px #143b2618}
.empty::before{content:'💬';display:block;font-size:34px;margin-bottom:10px}
@media(prefers-reduced-motion:reduce){#messages{scroll-behavior:auto}}
.bubble .failed{display:block;margin-top:6px;font-size:11px;font-weight:700;color:#8b4439}
.bubble.pending .chat-image{opacity:.9}
/* --- v5: icon approval choices, send/stop merge, icon session menu --- */
#send.stopping{background:#d63b2f}
#send svg{width:22px;height:22px;display:block}
#send #icon-stop[hidden]{display:none}
.request-actions{display:flex;gap:10px;margin-top:10px}
.request-actions .icon-choice{--choice:#087f6f;width:46px;height:46px;min-height:46px;padding:0;border-radius:50%;background:var(--choice);display:grid;place-items:center}
.request-actions .icon-choice svg{width:24px;height:24px}
.request-actions .icon-choice .i{stroke-width:2.4}
#session-menu button.icon{width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;display:grid;place-items:center;background:#ffffff24;color:#fff;flex-shrink:0}
#session-menu button.icon svg{width:19px;height:19px}
#session-menu button.icon.on{background:#e4b74b;color:#19352f}
#session-menu button.danger{background:#8b4439}
#toggle-archived{min-height:32px;padding:5px 12px;font-size:12px}
