
/* ZUNE Smart Assistant Premium visual system */
.z-assistant-overlay{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:2.5vh 3vw;background:rgba(2,20,12,.72);backdrop-filter:blur(12px)}
.z-assistant-panel{position:relative;width:min(100%,980px);height:min(94vh,900px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(8,123,80,.16);border-radius:26px;background:var(--za-bg,#f7fbf8);color:var(--za-text,#17251c);box-shadow:0 28px 90px #001b1080}
.z-assistant-head{position:relative;z-index:4;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:linear-gradient(115deg,#075c3c,#0a8a5a);color:#fff;box-shadow:0 5px 18px #003e2828}
.z-assistant-head>strong{display:flex;align-items:center;gap:7px;font-size:16px;letter-spacing:-.3px}
.z-premium-brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:11px;background:#ffffff24;font-size:20px}
.z-assistant-head-actions{display:flex;align-items:center;gap:7px}
.z-premium-menu-trigger,.z-premium-new-trigger,.z-premium-voice-trigger,.z-assistant-close{width:38px;height:38px;border:1px solid #ffffff45;border-radius:12px;background:#ffffff18;color:#fff;font-size:19px;cursor:pointer}
.z-assistant-close{font-size:25px}
.z-assistant-speech-toggle{height:38px;min-width:92px;border:1px solid #ffffff55;border-radius:11px;background:#ffffff18;color:#fff;font-size:12px;font-weight:800}
.z-assistant-memory{flex:0 0 auto;margin:10px 14px 0;padding:9px 12px;border:1px solid #dce9e1;border-radius:14px;background:#edf6f0;color:#244b36;font-size:11px;line-height:1.45}
.z-assistant-messages{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:22px clamp(14px,4vw,42px);scroll-behavior:smooth}
.z-assistant-message{align-self:flex-start;max-width:min(88%,760px);padding:14px 16px;border:1px solid #e4eee7;border-radius:7px 19px 19px 19px;background:#fff;color:#1d3025;font-size:14px;line-height:1.65;box-shadow:0 4px 18px #123d2410}
.z-assistant-message.user{align-self:flex-end;border-color:#c7e8d4;border-radius:19px 7px 19px 19px;background:#e5f5eb}
.z-assistant-welcome{margin:auto!important;max-width:620px!important;padding:26px!important;text-align:center;font-size:clamp(17px,2vw,22px)!important;font-weight:650;color:#15583b!important;background:transparent!important;border:0!important;box-shadow:none!important}
.z-assistant-chips{flex:0 0 auto;display:flex;gap:8px;flex-wrap:wrap;padding:0 20px 12px}
.z-assistant-chip{padding:9px 13px;border:1px solid #d8e9de;border-radius:99px;background:#fff;color:#17633f;font-size:12px;font-weight:650}
.z-assistant-voice-status{flex:0 0 auto;min-height:0;padding:0 18px;color:#66776c;font-size:11px}
.z-assistant-voice-status:not(:empty){padding-top:6px}
.z-assistant-form{position:relative;flex:0 0 auto;display:flex;align-items:flex-end;gap:8px;padding:12px 15px max(12px,env(safe-area-inset-bottom));border-top:1px solid #e4eee7;background:var(--za-surface,#fff)}
.z-assistant-form input{flex:1;min-width:0;min-height:44px;max-height:120px;padding:12px 15px;border:1px solid #d9e8df;border-radius:17px;background:#f8fbf9;color:#183526;font:inherit;font-size:14px;outline:none}
.z-assistant-form input:focus{border-color:#0b8a59;box-shadow:0 0 0 3px #0b8a5918}
.z-assistant-form>button[type=submit],.z-assistant-mic,.z-premium-tools{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:15px;background:#087b50;color:#fff;font-size:19px}
.z-assistant-mic{border:1px solid #cfe4d6;background:#eff8f2;color:#087b50}
.z-premium-tools{background:#edf6f0;color:#087b50;border:1px solid #d5e8db}
.z-premium-response-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;padding-top:9px;border-top:1px solid #edf1ee}
.z-premium-response-actions button{padding:6px 9px;border:1px solid #dce9e1;border-radius:9px;background:#f7faf8;color:#326047;font-size:10px}
.z-premium-drawer{position:absolute;z-index:20;inset:0 auto 0 0;width:min(82%,310px);padding:18px;background:#fff;color:#183526;box-shadow:18px 0 55px #001b1033;transform:translateX(-110%);transition:transform .24s ease;display:flex;flex-direction:column;gap:8px}
.z-premium-drawer.is-open{transform:translateX(0)}
.z-premium-drawer-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid #e5eee8;margin-bottom:8px}
.z-premium-drawer-head button{border:0;background:transparent;font-size:25px}
.z-premium-drawer>button:not(.z-premium-drawer-head button){display:flex;align-items:center;gap:12px;padding:13px;border:0;border-radius:12px;background:#f4f8f5;color:#175d3d;text-align:left;font-weight:650}
.z-premium-drawer-foot{margin-top:auto;color:#829187;font-size:11px}
.z-premium-drawer-backdrop{display:none;position:absolute;z-index:19;inset:0;border:0;background:#00180d70}
.z-premium-drawer-backdrop.is-open{display:block}
.z-premium-page{position:absolute;z-index:12;inset:65px 0 0;background:var(--za-bg,#f7fbf8);overflow:auto;padding:20px}
.z-premium-page[hidden],.z-premium-orb-stage[hidden]{display:none!important}
.z-premium-page-head{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.z-premium-page-head h2{margin:0;font-size:19px}
.z-premium-back{width:38px;height:38px;border:0;border-radius:12px;background:#e9f5ed;color:#087b50;font-size:25px}
.z-premium-history>input{width:100%;box-sizing:border-box;padding:13px;border:1px solid #d9e8df;border-radius:13px;font:inherit}
.z-premium-history-list{display:grid;gap:10px;margin-top:14px}
.z-premium-history-card{display:grid;gap:7px;padding:13px;border:1px solid #e0ebe4;border-radius:15px;background:#fff}
.z-premium-history-open{border:0;background:transparent;color:#174d34;text-align:left;font-weight:750;font-size:14px}
.z-premium-history-card small{color:#7b8b80;font-size:10px}
.z-premium-history-actions{display:flex;flex-wrap:wrap;gap:6px}
.z-premium-history-actions button,.z-premium-settings button{padding:7px 10px;border:1px solid #dbe8df;border-radius:9px;background:#f5faf6;color:#245b3c;font-size:11px}
.z-premium-settings{display:grid;gap:10px;max-width:520px}
.z-premium-settings select{padding:11px;border:1px solid #dce9e1;border-radius:10px;background:#fff;color:#183526}
.z-premium-settings input[type=checkbox]{width:22px;height:22px;accent-color:#087b50}
.z-premium-danger{color:#b42318!important;border-color:#f0c7c2!important;background:#fff6f5!important}
.z-premium-tool-menu{position:absolute;z-index:8;bottom:66px;left:12px;display:grid;gap:5px;padding:9px;border:1px solid #dce9e1;border-radius:13px;background:#fff;box-shadow:0 10px 30px #0002}
.z-premium-tool-menu button{padding:9px 13px;border:0;border-radius:8px;background:#f3f8f4;color:#15583b;text-align:left}
.z-premium-orb-stage{position:absolute;z-index:10;inset:65px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:radial-gradient(ellipse at center,#e5f7eb 0,#f8fcf9 55%,#fff 100%);color:#15583b}
.z-premium-orb{position:relative;width:clamp(150px,38vw,260px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 30%,#d8ffe7 0,#32ca83 18%,#087b50 50%,#03452d 75%);box-shadow:0 0 35px #0b9d5c66,0 0 100px #13b87535,inset -20px -22px 40px #003b2a88;animation:zPremiumOrb 4s ease-in-out infinite}
.z-premium-orb:before,.z-premium-orb:after,.z-premium-orb span{content:"";position:absolute;inset:-12px;border:1px solid #20a66b66;border-radius:50%;animation:zPremiumOrbit 6s linear infinite}
.z-premium-orb:after{inset:-25px;animation-duration:9s;animation-direction:reverse}
.z-premium-orb span{inset:20%;border-color:#d9ffea77;animation-duration:3s}
.z-premium-voice-controls{display:flex;gap:12px}
.z-premium-voice-controls button{width:50px;height:50px;border:1px solid #b9dfc8;border-radius:50%;background:#fff;color:#087b50;font-size:20px;box-shadow:0 5px 18px #00452b14}
.z-premium-voice-mode .z-assistant-panel{width:100%;height:100%;max-width:none;border:0;border-radius:0}
.z-premium-voice-mode .z-assistant-messages,.z-premium-voice-mode .z-assistant-memory,.z-premium-voice-mode .z-assistant-chips{visibility:hidden}
.z-premium-voice-mode .z-premium-orb-stage{position:absolute}
@keyframes zPremiumOrb{50%{transform:scale(1.045);filter:brightness(1.13)}}
@keyframes zPremiumOrbit{to{transform:rotate(360deg)}}
.z-assistant-overlay[data-assistant-theme=dark]{--za-bg:#101a14;--za-surface:#14231a;--za-text:#edf7ef}
.z-assistant-overlay[data-assistant-theme=dark] .z-assistant-panel,.z-assistant-overlay[data-assistant-theme=dark] .z-premium-page{background:#101a14;color:#edf7ef}
.z-assistant-overlay[data-assistant-theme=dark] .z-assistant-message,.z-assistant-overlay[data-assistant-theme=dark] .z-premium-history-card,.z-assistant-overlay[data-assistant-theme=dark] .z-premium-drawer{background:#1a2a20;color:#edf7ef;border-color:#30483a}
.z-assistant-overlay[data-assistant-theme=dark] .z-assistant-message.user{background:#173e2b}
.z-assistant-overlay[data-assistant-theme=dark] .z-premium-orb-stage{background:radial-gradient(ellipse at center,#173c29,#101a14 70%);color:#e4f8eb}
@media(prefers-color-scheme:dark){.z-assistant-overlay[data-assistant-theme=adaptive]{--za-bg:#101a14;--za-surface:#14231a;--za-text:#edf7ef}.z-assistant-overlay[data-assistant-theme=adaptive] .z-assistant-panel,.z-assistant-overlay[data-assistant-theme=adaptive] .z-premium-page{background:#101a14;color:#edf7ef}.z-assistant-overlay[data-assistant-theme=adaptive] .z-assistant-message,.z-assistant-overlay[data-assistant-theme=adaptive] .z-premium-history-card,.z-assistant-overlay[data-assistant-theme=adaptive] .z-premium-drawer{background:#1a2a20;color:#edf7ef;border-color:#30483a}}
@media(max-width:640px){.z-assistant-overlay{padding:0}.z-assistant-panel{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.z-assistant-head{padding:11px 12px}.z-assistant-head>strong{font-size:14px}.z-assistant-messages{padding:16px 12px}.z-assistant-message{max-width:92%;font-size:13px}.z-assistant-form{padding:9px 10px max(10px,env(safe-area-inset-bottom))}.z-premium-page{inset:60px 0 0}.z-assistant-speech-toggle{min-width:78px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.z-premium-drawer,.z-premium-orb,.z-premium-orb:before,.z-premium-orb:after,.z-premium-orb span{animation:none;transition:none}}

/* Visible conversational hero and persistent AI orb */
.z-assistant-head{position:sticky;top:0;min-height:62px}
.z-assistant-panel{isolation:isolate}
.z-assistant-messages{background:radial-gradient(ellipse at 50% 0%,rgba(17,155,94,.075),transparent 48%),var(--za-bg,#f7fbf8)}
.z-premium-chat-hero{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px 12px 22px;margin:0 auto 4px;max-width:640px;text-align:center}
.z-premium-chat-orb{position:relative;width:clamp(88px,19vw,132px);aspect-ratio:1;margin:0 auto 5px;border-radius:50%;background:radial-gradient(circle at 32% 27%,#e2ffec 0,#76e5a7 12%,#20b875 34%,#087b50 63%,#03452d 86%);box-shadow:0 0 22px #0b9d5c55,0 0 58px #13b87525,inset -10px -12px 22px #003b2a66;animation:zPremiumOrb 4s ease-in-out infinite}
.z-premium-chat-orb:before,.z-premium-chat-orb:after,.z-premium-chat-orb span,.z-premium-chat-orb i{content:"";position:absolute;inset:-8px;border:1px solid #20a66b55;border-radius:50%;animation:zPremiumOrbit 7s linear infinite}
.z-premium-chat-orb:after{inset:-15px;animation-duration:11s;animation-direction:reverse}
.z-premium-chat-orb span{inset:17%;border-color:#d9ffea88;animation-duration:4s}
.z-premium-chat-orb i{inset:7px 22px;border-color:#ffffff66;transform:rotate(35deg);animation-duration:5s}
.z-premium-chat-eyebrow{display:flex;align-items:center;gap:7px;color:#087b50;font-size:10px;font-weight:850;letter-spacing:1.7px}
.z-premium-live-dot{width:7px;height:7px;border-radius:50%;background:#21bd72;box-shadow:0 0 0 4px #21bd7220}
.z-premium-chat-hero h2{margin:2px 0 0;color:#174d34;font-size:clamp(19px,3vw,25px);font-weight:800;letter-spacing:-.6px}
.z-premium-chat-hero p{max-width:440px;margin:0;color:#718278;font-size:12px;line-height:1.6;font-weight:450}
.z-assistant-welcome{max-width:100%!important;width:100%;padding:0 8px 14px!important;background:transparent!important;border:0!important;box-shadow:none!important}
.z-assistant-welcome:not(:has(.z-premium-chat-hero)){display:none}
.z-assistant-welcome .z-premium-chat-hero{width:100%}
.z-premium-orb-stage{z-index:30}
.z-premium-orb-stage .z-premium-orb{filter:drop-shadow(0 0 16px #13b87555)}
.z-premium-voice-mode .z-premium-chat-hero{display:none}
@media(max-width:640px){.z-premium-chat-hero{padding:13px 4px 18px}.z-premium-chat-orb{width:100px}.z-premium-chat-hero p{font-size:11px}}
@media(prefers-reduced-motion:reduce){.z-premium-chat-orb,.z-premium-chat-orb:before,.z-premium-chat-orb:after,.z-premium-chat-orb span,.z-premium-chat-orb i{animation:none}}

/* Premium message composer: persistent, expandable and mobile-safe */
.z-assistant-form{position:sticky;bottom:0;z-index:6;align-items:flex-end;gap:9px;padding:12px 16px max(14px,env(safe-area-inset-bottom));background:var(--za-surface,#fff);box-shadow:0 -8px 28px rgba(12,64,37,.07)}
.z-assistant-form textarea{display:block;flex:1 1 auto;min-width:0;min-height:48px;max-height:132px;resize:none;overflow-y:auto;box-sizing:border-box;padding:13px 16px;border:1px solid #d5e7dc;border-radius:19px;background:#f7fbf8;color:#173b29;font:inherit;font-size:14px;line-height:1.45;outline:none;transition:border-color .18s,box-shadow .18s}
.z-assistant-form textarea:focus{border-color:#0b8a59;box-shadow:0 0 0 4px #0b8a5918}
.z-assistant-form textarea::placeholder{color:#81948a}
.z-assistant-form>button[type=submit]{background:linear-gradient(145deg,#12a768,#087b50);box-shadow:0 5px 14px #087b5033;font-size:21px}
.z-assistant-form .z-premium-tools{flex:0 0 44px;width:44px;height:44px;border-radius:50%;font-size:25px}
.z-assistant-form .z-assistant-mic{flex:0 0 44px;width:44px;height:44px;border-radius:50%;font-size:19px}
.z-assistant-tool-menu{bottom:calc(100% + 8px)}
@media(max-width:640px){.z-assistant-form{gap:7px;padding:10px 11px max(12px,env(safe-area-inset-bottom))}.z-assistant-form textarea{min-height:46px;padding:12px 13px;font-size:14px}.z-assistant-form>button[type=submit],.z-assistant-form .z-assistant-mic,.z-assistant-form .z-premium-tools{flex-basis:42px;width:42px;height:42px}}

/* ChatGPT-inspired single-surface composer for ZUNE */
.z-assistant-form{position:sticky;bottom:0;z-index:6;display:block;flex:0 0 auto;padding:12px 16px max(14px,env(safe-area-inset-bottom));border:0;background:var(--za-bg,#f7fbf8);box-shadow:none}
.z-assistant-composer-shell{position:relative;display:flex;align-items:flex-end;gap:9px;width:min(100%,860px);margin:0 auto;padding:9px 10px;border:1px solid #d7e5dc;border-radius:27px;background:var(--za-surface,#fff);box-shadow:0 3px 16px rgba(10,58,32,.08);transition:border-color .18s,box-shadow .18s}
.z-assistant-composer-shell:focus-within{border-color:#0b8a59;box-shadow:0 0 0 3px #0b8a5914,0 4px 18px rgba(10,58,32,.08)}
.z-assistant-composer-shell textarea{display:block;flex:1 1 auto;min-width:0;min-height:28px;max-height:144px;resize:none;overflow-y:auto;box-sizing:border-box;padding:9px 5px;border:0!important;border-radius:0!important;background:transparent!important;color:var(--za-text,#173b29);font:inherit;font-size:15px;line-height:1.5;outline:none!important;box-shadow:none!important}
.z-assistant-composer-shell textarea::placeholder{color:#819188}
.z-assistant-composer-shell>button{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border:0;border-radius:50%;cursor:pointer}
.z-assistant-composer-shell .z-premium-tools{order:-1;background:transparent;border:0;color:#52665a;font-size:25px}
.z-assistant-composer-shell .z-assistant-mic{background:#edf5ef;color:#176640;font-size:18px}
.z-assistant-composer-shell>button[type=submit]{background:#087b50;color:#fff;font-size:24px;font-weight:700;box-shadow:0 3px 10px #087b5028}
.z-assistant-composer-shell>button[hidden]{display:none!important}
.z-premium-tool-menu{bottom:calc(100% + 12px);left:8px}
@media(max-width:640px){.z-assistant-form{padding:9px 10px max(12px,env(safe-area-inset-bottom))}.z-assistant-composer-shell{gap:6px;padding:7px 8px;border-radius:26px}.z-assistant-composer-shell textarea{font-size:15px;min-height:28px}.z-assistant-composer-shell>button{flex-basis:38px;width:38px;height:38px}}
.z-assistant-overlay[data-assistant-theme=dark] .z-assistant-composer-shell{border-color:#344b3b;background:#1a2a20}
.z-assistant-overlay[data-assistant-theme=dark] .z-assistant-composer-shell textarea{color:#edf7ef}
@media(prefers-color-scheme:dark){.z-assistant-overlay[data-assistant-theme=adaptive] .z-assistant-composer-shell{border-color:#344b3b;background:#1a2a20}.z-assistant-overlay[data-assistant-theme=adaptive] .z-assistant-composer-shell textarea{color:#edf7ef}}

/* Mobile layout corrections identified from the real-device screenshot */
.z-assistant-head{width:100%;min-width:0;box-sizing:border-box;gap:8px}
.z-assistant-head>strong{min-width:0;flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.z-assistant-head-actions{flex:0 0 auto;min-width:0;gap:6px}
.z-assistant-head-actions>button{flex:0 0 auto}
.z-assistant-memory-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.z-assistant-memory-actions button{min-height:34px;padding:7px 12px;border:1px solid #cfe2d5;border-radius:10px;background:#fff;color:#15583b;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.z-assistant-memory-actions button:active{transform:scale(.98)}
.z-assistant-chips{max-height:116px;overflow-y:auto;overscroll-behavior:contain;gap:7px;padding:0 14px 9px}
.z-assistant-chip{min-height:34px;padding:8px 12px;font-size:12px;white-space:nowrap}
.z-assistant-composer-shell{min-width:0}
.z-assistant-composer-shell .z-premium-tools{flex:0 0 38px;width:38px;height:38px;order:0}
.z-assistant-composer-shell textarea{min-width:0}
@media(max-width:640px){
 .z-assistant-head{padding:9px 10px;gap:6px}
 .z-assistant-head>strong{font-size:13px;letter-spacing:-.35px}
 .z-premium-brand-mark{width:29px;height:29px;flex:0 0 29px;font-size:17px}
 .z-assistant-head-actions{gap:5px}
 .z-premium-menu-trigger,.z-premium-new-trigger,.z-premium-voice-trigger,.z-assistant-close{width:34px;height:34px;flex:0 0 34px;border-radius:10px;font-size:17px}
 .z-assistant-close{font-size:23px}
 .z-assistant-speech-toggle{height:34px;min-width:0;width:42px;flex:0 0 42px;overflow:hidden;padding:0;font-size:0}
 .z-assistant-speech-toggle::first-letter{font-size:17px}
 .z-assistant-memory{margin:9px 12px 0;padding:10px 11px;font-size:12px}
 .z-assistant-memory-actions button{min-height:36px;padding:7px 10px;font-size:12px}
 .z-assistant-chips{max-height:104px;gap:6px;padding:0 11px 8px}
 .z-assistant-chip{padding:7px 10px;font-size:11px}
 .z-assistant-form{padding:9px 11px max(12px,env(safe-area-inset-bottom))}
 .z-assistant-composer-shell{gap:5px;padding:6px 7px;border-radius:28px}
 .z-assistant-composer-shell>button{flex-basis:38px;width:38px;height:38px}
}
