/* v16: neutral, borderless wallpaper glass shared by every conversation. */
:root.clear-ui{--clear-fill:.04;--clear-shadow:.12;--clear-frost:0px;background:var(--nest-bg,#111)!important;color:var(--nest-text,#f5f5f5);color-scheme:dark}
:root.clear-ui[data-nest-theme=light]{color-scheme:light}
.clear-ui body,.clear-ui body.social-page,.clear-ui[data-nest-theme=dark] body:not(.nest-page):not(.voice-page){background:transparent!important;background-image:none!important;isolation:isolate}
.clear-ui body::before{display:none!important}
#clear-wallpaper{position:fixed;inset:0 0 auto;height:100lvh;z-index:-10;pointer-events:none;background-position:center;background-size:cover;background-repeat:no-repeat;background-color:var(--nest-bg,#111)}
.clear-ui .crow-glass{position:relative;isolation:isolate;background:transparent!important;border:0!important;box-shadow:0 4px 18px rgba(0,0,0,var(--clear-shadow))!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.crow-glass>.glass-canvas{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;z-index:-2;pointer-events:none;clip-path:inset(0 round inherit)}
.crow-glass::after{content:"";position:absolute;inset:0;border-radius:inherit;background:rgba(0,0,0,var(--clear-fill));z-index:-1;pointer-events:none}
[data-nest-theme=light] .crow-glass::after{background:rgba(255,255,255,var(--clear-fill))}
.clear-ui button{border:0!important;background:#ffffff0c!important;box-shadow:none;color:var(--nest-text)!important;min-height:44px}
.clear-ui button:active{background:#ffffff1c!important}
.clear-ui input,.clear-ui textarea,.clear-ui select{color:var(--nest-text)!important}
.clear-ui input:not([type=range]):not([type=color]):not([type=file]):not([type=checkbox]):not([type=radio]),.clear-ui textarea,.clear-ui select{background:#00000012!important;border:0!important;border-radius:14px}
.clear-ui textarea:focus,.clear-ui input:focus{outline:none!important;box-shadow:none!important}
.clear-ui a:focus-visible,.clear-ui button:focus-visible{outline:2px solid var(--nest-accent);outline-offset:3px}
.clear-ui input[type=range]{display:block;width:100%;accent-color:var(--nest-accent);padding:10px 0;background:transparent}
.clear-ui .chat-bubble,.clear-ui .bubble,.clear-ui body.companions-page .row{border-radius:23px!important;line-height:1.65;overflow-wrap:anywhere;color:var(--nest-text)!important;text-shadow:0 1px 3px #0006;padding:12px 16px}
[data-nest-theme=light] .chat-bubble,[data-nest-theme=light] .bubble,[data-nest-theme=light] .row{text-shadow:0 1px 3px #fff6!important}
.clear-ui .row.user p{color:var(--nest-text)!important}
.clear-ui .chat-meta,.clear-ui .message-actions{display:none!important}
.clear-ui #messages{touch-action:pan-y;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:16px 18px!important;scroll-padding-bottom:18px}
.clear-ui [data-message-id]{position:relative;touch-action:pan-y;transition:translate .14s ease;}
.swipe-time{position:absolute;right:-76px;top:50%;width:66px;transform:translateY(-50%);font-size:11px;color:var(--nest-text);opacity:0;pointer-events:none;white-space:nowrap;text-shadow:0 1px 3px #0008}
.show-times [data-message-id]{translate:-76px 0}
.show-times .swipe-time{opacity:.9}
.clear-ui .message.user .bubble>strong{display:none}
.clear-ui .token-detail,.clear-ui .bubble details{font-size:11px!important;border:0!important;margin:6px 4px 0!important;padding:0!important;opacity:.8}
.clear-ui .token-detail p{font-size:11px;line-height:1.5}
.clear-ui .nest-header,.clear-ui .companion-header,.clear-ui .social-page #app>header{border-radius:0 0 25px 25px;flex-shrink:0;min-height:68px;margin:0!important;padding:10px 16px!important;gap:12px}
.clear-ui .nest-header{justify-content:flex-start}
.clear-ui .nest-header .brand{display:flex;flex-direction:row;gap:10px;text-align:left;flex:1;font-size:17px}
.clear-ui .brand img{width:38px;height:38px}.clear-ui .brand small{font-size:11px}
.clear-ui .header-call,.clear-ui .top-actions{position:static!important;flex-shrink:0}
.clear-ui .header-call{order:3;width:40px;height:40px;background:transparent!important;box-shadow:none!important}
.clear-ui .top-actions{order:4}.clear-ui .chat-details{order:5;padding:0 8px!important;background:transparent!important;letter-spacing:2px;font-size:20px}
.clear-ui .companion-header .identity{margin:0!important;flex:1;min-width:0}
.clear-ui .companion-header .identity img{width:38px;height:38px;cursor:pointer}
.clear-ui .companion-header #model-label{display:none}
.clear-ui .companion-header h1{margin:0;font-size:18px}
.clear-ui .chat-back{display:grid;place-items:center;width:32px;min-height:44px;position:static;font-size:30px;flex-shrink:0}
.clear-ui .nest-shell,.clear-ui body.companions-page>main,.clear-ui #app{position:fixed;inset:auto 0 auto;top:var(--clear-top,0)!important;height:var(--clear-height,100dvh)!important;min-height:0!important;max-width:860px;width:100%;margin:0 auto!important;display:flex;flex-direction:column;overflow:hidden;padding:env(safe-area-inset-top) 0 max(8px,env(safe-area-inset-bottom))!important}
.clear-ui .nest-page main{min-height:0;padding:0!important;max-width:none}
.clear-ui body.companions-page #messages{flex:1;min-height:0;margin:0!important;background:transparent!important}
.clear-ui body.companions-page #approvals{max-height:25vh;overflow:auto;padding:0 14px!important}
.clear-ui #composer{position:relative!important;bottom:auto!important;display:flex;align-items:flex-end;flex-wrap:wrap;gap:7px;margin:6px 14px 0!important;padding:6px 8px!important;border-radius:27px!important;flex-shrink:0;z-index:4}
.clear-ui #composer textarea{flex:1;width:0;min-height:40px;max-height:128px;height:40px;padding:8px 9px!important;line-height:24px!important;border:0!important;border-radius:0!important;background:transparent!important;resize:none;font-size:16px!important}
.clear-ui #composer .entry{flex:1;min-width:0}
.clear-ui #composer .entry textarea{width:100%}
.clear-ui #composer .entry select{background:transparent!important;font-size:12px;padding:0 8px;width:auto}
.clear-ui #composer button[type=submit],.clear-ui #send,.clear-ui #plus{width:40px;height:40px;min-height:40px;padding:0!important;border-radius:50%;display:grid;place-items:center;font-size:23px;background:#ffffff12!important;color:var(--nest-text)!important;flex-shrink:0}
.clear-ui #clear-reply{flex:0 0 100%;font-size:12px;min-height:28px;padding:4px 10px;text-align:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;background:transparent!important}
.clear-ui #runbar{padding:5px 18px;font-size:11px;flex-shrink:0}
.clear-ui #runbar button{min-height:30px;padding:4px 10px}
.clear-ui #content{padding:10px 20px 20px;min-height:0;overflow:auto;flex:1}
.clear-ui #tabs{display:flex;flex-shrink:0;align-items:center;justify-content:space-evenly;gap:4px;width:min(82%,340px);margin:10px auto 4px;padding:5px;border-radius:34px}
.clear-ui #tabs button{flex:1;min-width:0;padding:8px 6px 7px;background:transparent!important;border-radius:29px;font-size:11px;line-height:1.4;color:var(--nest-muted)!important}
.clear-ui #tabs svg{display:block;width:24px;height:24px;margin:0 auto 4px}
.clear-ui #tabs button.selected{color:var(--nest-text)!important;background:#ffffff12!important}
.clear-ui #tabs span{font-size:11px}
.clear-ui .chat-item{border:0!important;border-radius:0!important;box-shadow:none!important;padding:15px 0!important;background:transparent!important;min-height:88px;gap:14px;text-align:left}
.clear-ui .chat-item img{width:54px;height:54px;border-radius:50%;object-fit:cover}
.clear-ui .chat-item .copy{padding-bottom:13px;border-bottom:1px solid #ffffff0e}
.clear-ui .chat-item strong{font-size:17px;font-weight:600}
.clear-ui .chat-item p{font-size:13px;margin-top:3px;text-shadow:0 1px 3px #0008;line-height:1.5}
.clear-ui .setting{display:block;width:100%;padding:15px 18px;margin:10px 0;border-radius:18px;text-align:left;min-height:50px}
.clear-ui .contact-hero{text-align:center;padding:28px 16px;margin:14px 0 24px;border-radius:28px}
.clear-ui .contact-hero img{width:88px;height:88px;object-fit:cover;border-radius:50%;margin-bottom:12px}
.clear-ui .contact-hero p{font-size:13px;margin-top:8px}
.clear-ui dialog{position:fixed!important;margin:auto;border:0!important;border-radius:26px;width:min(92vw,560px);max-height:calc(var(--clear-height,100dvh) - 40px);padding:22px;color:var(--nest-text);overflow:auto;background:transparent!important}
.clear-ui dialog::backdrop{background:#0003;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.clear-ui dialog::after{background:rgba(0,0,0,max(.14,var(--clear-fill)))}
.clear-ui[data-nest-theme=light] dialog::after{background:rgba(255,255,255,max(.14,var(--clear-fill)))}
.clear-editor-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}
.clear-editor-top h2{font-size:19px;margin:0}
.clear-editor label{display:block;font-size:14px;margin:15px 0}
.clear-editor output{float:right;font-variant-numeric:tabular-nums}
.clear-preview{border-radius:24px;padding:18px;margin:20px 0;min-height:94px;overflow:hidden}
.clear-preview p{font-size:15px!important;margin:4px 0;line-height:1.6}
.clear-note{font-size:12px!important;line-height:1.5}
.message-menu{display:flex;flex-direction:column;gap:10px}.message-menu:not([open]){display:none}
.clear-ui body:not(.nest-page):not(.social-page):not(.voice-page) main{padding-top:calc(env(safe-area-inset-top) + 18px)!important}
.clear-ui .card,.clear-ui .connection-card,.clear-ui .segmented,.clear-ui .entry,.clear-ui .bottom-actions,.clear-ui .appearance-actions{background:#0000000a!important;box-shadow:none!important;border:0!important}
.clear-ui .bottom-actions,.clear-ui .appearance-actions{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.clear-ui .appearance-grid{gap:14px}.clear-ui .appearance-grid .wide{min-width:0}
.clear-ui button{white-space:nowrap}.clear-ui .setting{white-space:normal}
.clear-ui #device-panel[open]{background:var(--nest-bg)!important}
.clear-ui.keyboard-open .nest-shell,.clear-ui.keyboard-open body.companions-page>main,.clear-ui.keyboard-open #app{padding-top:0!important;padding-bottom:6px!important}
.clear-ui.keyboard-open .nest-header,.clear-ui.keyboard-open .companion-header,.clear-ui.keyboard-open #app>header{min-height:54px;padding-block:5px!important}
@media(min-width:900px){.clear-ui #app{border:0}.clear-ui .nest-shell,.clear-ui body.companions-page>main{max-width:860px}.clear-ui #messages{padding-inline:32px!important}}
@media(prefers-reduced-motion:reduce){.clear-ui [data-message-id]{transition:none}}
/* Explicitly outrank the legacy user-bubble and header selectors. */
:root.clear-ui body .crow-glass.crow-glass,:root.clear-ui body #messages .crow-glass,:root.clear-ui body #composer.crow-glass,:root.clear-ui body #tabs.crow-glass{background:transparent!important;background-image:none!important;border:0!important;box-shadow:0 4px 18px rgba(0,0,0,var(--clear-shadow))!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
:root.clear-ui.has-wallpaper:not(.embedded-page){background:var(--nest-bg,#111)!important}
.reply-quote{border:0;border-left:2px solid var(--nest-accent);padding:3px 10px;margin:0 0 9px;font-size:12px;white-space:normal;line-height:1.5;max-height:78px;overflow:auto;text-shadow:inherit}
.reply-quote strong,.reply-quote span{display:block}
.reply-quote strong{font-weight:600;margin-bottom:3px}
.crow-glass>.glass-canvas{clip-path:none}
#search-row{display:block;margin:10px 20px 0;flex-shrink:0}
#search-row input{display:block;width:100%;min-height:38px;padding:8px 14px;font-size:14px;background:#0000000a!important;border-radius:20px!important}
.clear-ui .bubble,.clear-ui body.companions-page .row{max-width:min(var(--nest-width,88%),660px);font-size:var(--nest-font,16px)}
.message-reaction{display:block!important;margin-top:5px;width:24px;height:24px}

.clear-ui .token-detail{background:transparent!important;box-shadow:none!important}
