/* Approved conversation preview. Native status/permissions remain authoritative. */
:root{--chat-bg:#fafcfe;--chat-text:#18242e;--chat-muted:#8b949c;--chat-glass:#ffffffbd;--chat-line:#dbe2e8}
:root.theme-dark{--chat-bg:#17232e;--chat-text:#e0e8ef;--chat-muted:#8d9daa;--chat-glass:#283b4dbd;--chat-line:#405567}
body #chat{background:var(--chat-bg);color:var(--chat-text);grid-template-rows:calc(64px + env(safe-area-inset-top)) minmax(0,1fr) auto auto}
body .topbar{height:calc(64px + env(safe-area-inset-top));padding:calc(7px + env(safe-area-inset-top)) 15px 7px;background:var(--chat-glass);border:0;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
body .topbar .top-actions{min-width:44px;width:44px}
body #settings-access{display:none!important}
body #thread-button{flex-direction:row;align-items:center;justify-content:flex-start;gap:10px;width:100%;padding:0;text-align:left}
.thread-heading{display:block;min-width:0;flex:1}.back-chevron{width:42px;height:42px;min-width:42px;padding:10px;border-radius:50%;background:var(--chat-glass);box-shadow:inset 0 0 0 1px var(--chat-line);stroke:var(--chat-text)}
#thread-name{font-size:16px;line-height:24px;color:var(--chat-text)}#thread-name:after{display:none}#runtime{color:var(--chat-muted);font-size:10px;line-height:17px}
body .thread{padding:12px 19px 20px;gap:18px;color:var(--chat-text)}body .message,body .message .bubble{font-size:16px;line-height:1.6}
body .bubble p{margin:0 0 11px}body .bubble p:last-child{margin:0}body .bubble ul,body .bubble ol{margin:8px 0 11px}body .bubble li{margin:4px 0}body .message.user{padding:9px 13px}
body .reply-tools{display:flex;align-items:center;gap:3px;margin-top:8px;color:var(--chat-muted)}body .reply-tools .icon-button{width:28px;min-width:28px;height:28px;min-height:28px;padding:6px}body .reply-tools .icon-button svg{width:16px;height:16px}
body .reply-tools .command-summary{display:flex;align-items:center;gap:5px;width:auto;padding:0 6px 0 0;margin-right:4px;font-size:12px;line-height:18px;white-space:nowrap}body .reply-tools .command-summary svg{width:15px;height:15px}body .reply-tools .command-summary svg:last-child{width:12px;height:12px}
body .composer-shell{background:transparent;padding:0 16px max(14px,env(safe-area-inset-bottom));border:0;box-shadow:none;backdrop-filter:none;z-index:11}
#chat-accessories{display:flex;flex-direction:column;align-items:center;gap:7px;margin:0 0 10px;background:none}
#jump-latest{width:32px;min-width:32px;height:32px;min-height:32px;padding:7px;background:var(--chat-glass);box-shadow:inset 0 0 0 1px var(--chat-line)}#jump-latest svg{width:18px;height:18px}
#activity-hint{display:flex;align-items:center;justify-content:center;gap:7px;height:31px;max-width:90%;padding:0 13px;border:0;border-radius:18px;background:var(--chat-glass);color:var(--chat-muted);font-size:12px;box-shadow:0 3px 12px #293d5610,inset 0 0 0 1px var(--chat-line);backdrop-filter:blur(20px)}#activity-hint svg{width:15px;height:15px}
body #composer{display:block;min-height:94px;max-height:none;height:auto;width:100%;padding:8px 10px 7px;gap:0;border:0;border-radius:26px;background:var(--chat-glass);box-shadow:0 5px 24px #293d5610,inset 0 0 0 1px var(--chat-line),inset 0 1px 2px #ffffff50;backdrop-filter:blur(22px) saturate(145%);-webkit-backdrop-filter:blur(22px) saturate(145%)}
body #composer #text{display:block;width:100%;height:35px;min-height:35px;max-height:132px;padding:4px 5px 7px;line-height:24px;font-size:16px;color:var(--chat-text);background:transparent;resize:none;overflow-y:auto;scrollbar-width:thin}
body #composer #text::placeholder{color:var(--chat-muted)}
.composer-controls{display:flex;align-items:center;gap:3px;height:40px}.composer-spacer{flex:1}
body #composer .icon-button{display:flex;align-items:center;justify-content:center;width:37px;min-width:37px;min-height:38px;height:38px;padding:7px;border:0;border-radius:50%;box-shadow:none;background:transparent;color:var(--chat-text)}
body #composer .icon-button svg{width:22px;height:22px}body #composer #permissions{color:#e78023}body #composer #context{color:var(--chat-muted)}
body #composer #send,body #composer #stop{width:34px;min-width:34px;min-height:34px;height:34px;padding:7px;border:0;background:var(--agent-accent);color:#fff}body #composer #send:disabled{background:var(--agent-accent);opacity:.45}
body #composer #send svg,body #composer #stop svg{width:20px;height:20px}
body .composer-shell[data-reading=true]{padding-left:35px;padding-right:35px}
body #composer[data-reading=true]{display:grid;grid-template-columns:28px 24px minmax(0,1fr) 24px 26px 32px;align-items:center;gap:2px;min-height:48px;height:48px;padding:5px 7px;border-radius:28px}
#composer[data-reading=true] .composer-controls{display:contents}#composer[data-reading=true] .composer-spacer{display:none}
body #composer[data-reading=true] #text{grid-column:3;grid-row:1;height:34px!important;min-height:34px;padding:5px 2px;font-size:14px;line-height:24px;overflow:hidden;white-space:nowrap}
body #composer[data-reading=true] .icon-button{width:100%;min-width:0;height:32px;min-height:32px;padding:3px}body #composer[data-reading=true] .icon-button svg{width:20px;height:20px}
#composer[data-reading=true] #tools{grid-column:1;grid-row:1}#composer[data-reading=true] #permissions{grid-column:2;grid-row:1}#composer[data-reading=true] #context{grid-column:4;grid-row:1}#composer[data-reading=true] #model{grid-column:5;grid-row:1}
body #composer[data-reading=true] #send,body #composer[data-reading=true] #stop{grid-column:6;grid-row:1;justify-self:center;width:30px;min-width:30px;height:30px;min-height:30px}body #composer[data-reading=true] #send svg,body #composer[data-reading=true] #stop svg{width:18px;height:18px}
@media(min-width:900px){body .thread{padding-left:max(24px,calc((100vw - 300px - 760px)/2));padding-right:max(24px,calc((100vw - 300px - 760px)/2))}body .composer-shell,body .composer-shell[data-reading=true]{padding-left:max(20px,calc((100vw - 300px - 780px)/2));padding-right:max(20px,calc((100vw - 300px - 780px)/2))}body #composer[data-reading=true]{max-width:540px;margin-inline:auto}}
@media(max-width:350px){body .composer-shell[data-reading=true]{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-transparency:reduce){body #composer{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--chat-bg)}}
@supports not(backdrop-filter:blur(1px)){body #composer{background:var(--chat-bg)}}
body #thread-button .back-chevron{width:42px;height:42px;padding:10px;stroke-width:1.7;fill:none;stroke:var(--chat-text)}

/* Full-height reading surface, with only the actual input/controls above it. */
html,body{position:fixed;inset:0;overscroll-behavior:none}
body #chat{position:fixed;inset:0;height:100%;grid-template-rows:calc(64px + env(safe-area-inset-top)) minmax(0,1fr) 0 0}
body .topbar{background:transparent;border:0;box-shadow:none}
body #thread-button,body #thread-button:active,.thread-heading,#thread-name{background:transparent;border:0;box-shadow:none}
body #thread{grid-row:2;padding-bottom:calc(var(--floating-footer-height,108px) + var(--visual-bottom,0px) + 52px);scroll-padding-bottom:calc(var(--floating-footer-height,108px) + var(--visual-bottom,0px) + 52px)}
body .composer-shell{position:fixed;left:0;right:0;bottom:var(--visual-bottom,0px);width:auto;background:transparent;pointer-events:none;padding-bottom:var(--floating-safe-bottom,max(14px,env(safe-area-inset-bottom)));z-index:11}
.composer-shell #composer{pointer-events:auto}
.composer-shell #operation,.composer-shell #requests,.composer-shell #recovery,.composer-shell #attach-container{pointer-events:none}
.composer-shell #operation>*,.composer-shell #requests>*,.composer-shell #recovery>*,.composer-shell #attach-container>*{pointer-events:auto}
#chat-accessories{position:fixed;left:0;right:0;bottom:calc(var(--visual-bottom,0px) + var(--floating-footer-height,108px) + 8px);z-index:12;pointer-events:none;margin:0}
#jump-latest,#activity-hint{pointer-events:auto;flex:none}
body #composer[data-reading=true] #text{font-size:16px}
body #function-dock{position:fixed;bottom:var(--visual-bottom,0px);left:0;right:0;z-index:14}
@media(min-width:900px){body .composer-shell,body #chat-accessories,body #function-dock{left:300px}body .composer-shell,body .composer-shell[data-reading=true]{padding-left:max(20px,calc((100vw - 300px - 780px)/2));padding-right:max(20px,calc((100vw - 300px - 780px)/2))}}
body .topbar{border-bottom:0!important}
body #thread{scroll-behavior:auto!important}
