/* ZEKA Statue — design layer (loads LAST).
   Cyrus bust replaces the eye on the landing; chat keeps only the "Think limitless" title.
   Palette is taken from the statue file: charcoal studio, marble white, crown gold, digital cyan.
   Flat, black & white. Colour appears only where a Power level speaks:
   Normal = marble white · X2 = statue red · X3 = statue purple. */

@font-face{font-family:'ZEKA Onest';src:url('/fonts/ZekaOnest-latin.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'ZEKA Vazir';src:url('/fonts/ZekaVazirmatn-Arabic.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}

/* ───────────────────────── 1 · tokens ───────────────────────── */
html:root{
 --zs-marble:#EEECE8; --zs-stone:#8E8B85; --zs-gold:#EABC6E; --zs-cyan:#00DFE8;
 --zs-x2:#FD122E; --zs-x2-line:#FF3B4E;
 --zs-x3:#6407AF; --zs-x3-line:#A36BF0;
 --zs-ease:cubic-bezier(.2,.7,.2,1);
 --z-ui:'ZEKA Onest','ZEKA Vazir',system-ui,sans-serif!important;
 --z-display:'ZEKA Onest','ZEKA Vazir',system-ui,sans-serif!important;
 --sans:var(--z-ui)!important; --display:var(--z-ui)!important; --latin:var(--z-ui)!important;
 --accent-face:var(--z-ui)!important;
 --r:12px!important; --r-lg:16px!important; --r-sm:9px!important;
}
html:root[data-theme="dark"],html:root:not([data-theme]){
 color-scheme:dark;
 --canvas:#0B0B0C!important; --surface:#111112!important; --surface-2:#18181A!important; --surface-3:#212123!important;
 --field:#0E0E0F!important;
 --ink:#EEECE8!important; --ink-2:#CFCBC4!important; --ink-3:#9A968F!important; --ink-4:#6F6C67!important;
 --line:#1E1E20!important; --line-2:#2A2A2D!important; --line-ctl:#47464B!important;
 --key:#EEECE8!important; --key-2:#FFFFFF!important; --key-on:#0B0B0C!important;
 --z-black:#0B0B0C!important; --zs-glass:rgba(17,17,18,.86);
 --zs-off:#EEECE8; --zs-off-line:#EEECE8; --zs-off-on:#0B0B0C;
}
html:root[data-theme="light"]{
 color-scheme:light;
 --canvas:#F4F2EE!important; --surface:#FBFAF8!important; --surface-2:#ECE9E4!important; --surface-3:#E2DED7!important;
 --field:#FFFFFF!important;
 --ink:#111112!important; --ink-2:#34322F!important; --ink-3:#5E5B56!important; --ink-4:#7C7871!important;
 --line:#E3E0DA!important; --line-2:#D5D1CA!important; --line-ctl:#9C978F!important;
 --key:#111112!important; --key-2:#000!important; --key-on:#F4F2EE!important;
 --z-black:#111112!important; --zs-glass:rgba(250,249,247,.9);
 --zs-off:#111112; --zs-off-line:#111112; --zs-off-on:#F4F2EE;
}
/* the accent = the active Power. --zs-fill: filled button · --zs-line: icon/text on canvas · --zs-on: text on fill */
html:root,html:root[data-zs-power="off"]{--zs-fill:var(--zs-off);--zs-line:var(--zs-off-line);--zs-on:var(--zs-off-on)}
html:root[data-zs-power="x2"]{--zs-fill:var(--zs-x2);--zs-line:var(--zs-x2-line);--zs-on:#fff}
html:root[data-zs-power="x3"]{--zs-fill:var(--zs-x3);--zs-line:var(--zs-x3-line);--zs-on:#fff}
html:root{
 --zs-soft:color-mix(in srgb,var(--zs-line) 12%,transparent);
 --brand:var(--zs-line)!important; --brand-2:var(--zs-line)!important; --sand:var(--zs-line)!important;
 --brand-soft:var(--surface-2)!important; --brand-line:var(--line-2)!important;
 --plum:var(--zs-line)!important; --rose:var(--zs-line)!important; --saffron:var(--zs-line)!important;
 --z-blue:var(--zs-line)!important; --z-blue-light:var(--zs-line)!important; --z-focus:var(--ink-3)!important;
 --garnet:var(--zs-x2-line)!important; --garnet-soft:color-mix(in srgb,var(--zs-x2) 12%,transparent)!important;
 /* Power atmosphere (zeka-power.js): a faint wash, not a red room */
 --z-red:#2A0408!important; --z-ember:#1A0630!important;
 --shadow-1:none!important; --shadow-2:none!important; --shadow-pop:0 10px 30px rgba(0,0,0,.45)!important;
}
html:root body{font-family:var(--z-ui)!important;background:var(--canvas)!important;color:var(--ink)!important}
html:root body::before{display:none!important}
/* flat: the guest colour wash (zeka-guest R9) is retired — colour lives in the controls, not over the marble */
html:root body::after{opacity:0!important;display:none!important}
:focus-visible{outline:2px solid var(--zs-line)!important;outline-offset:2px!important}
::selection{background:var(--zs-fill);color:var(--zs-on)}

/* ───────────────────────── 2 · landing: the statue ───────────────────────── */
html:root .zeka-landing.zs-landing{
 --zs-h:min(92svh,152vw); --zs-top:calc((100svh - var(--zs-h)) / 2 + 1svh);
 position:fixed!important; inset:0!important; display:block; overflow:hidden!important;
 padding:0!important; margin:0!important; gap:0!important; isolation:isolate;
 background:var(--canvas)!important; color:var(--ink)!important;
}
body.z-registered .zeka-landing.zs-landing{display:none!important}
html:root .zeka-landing.zs-landing::before{
 content:""!important; position:absolute!important; inset:0!important; z-index:0!important; pointer-events:none;
 background:radial-gradient(ellipse 34% 46% at 50% 54%,#1C1C1E 0%,#131314 48%,transparent 100%)!important;
 opacity:1!important; filter:none!important; mask:none!important; -webkit-mask:none!important; transform:none!important; animation:none!important;
}
html:root[data-theme="light"] .zeka-landing.zs-landing::before{background:radial-gradient(ellipse 34% 46% at 50% 54%,#E6E3DD 0%,#EEEBE6 50%,transparent 100%)!important}
html:root .zeka-landing.zs-landing::after{display:none!important;content:none!important}

/* nav */
html:root .zs-landing .z-land-nav{position:absolute!important;inset:0 0 auto 0!important;z-index:4!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
 padding:26px clamp(18px,3.2vw,44px)!important;margin:0!important;background:none!important;transform:none!important}
html:root .zs-landing .z-brand{display:flex;align-items:center;gap:11px}
html:root .zs-landing .z-brand-square{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;border-radius:9px!important;
 background:var(--ink)!important;color:var(--canvas)!important;font:800 16px/1 var(--z-ui)!important;box-shadow:none!important;border:0!important}
html:root .zs-landing .z-brand strong{font:700 15px/1 var(--z-ui)!important;letter-spacing:.32em!important;color:var(--ink)!important}
html:root .zs-landing .z-land-nav>span{display:block!important;font:600 10.5px/1 var(--z-ui)!important;letter-spacing:.34em!important;color:var(--ink-3)!important;text-transform:uppercase}

/* the words sit BEHIND the bust */
html:root .zs-landing .z-land-type{
 position:absolute!important; z-index:1!important; inset:auto 0 auto 0!important;
 top:calc(var(--zs-top) + var(--zs-h) * .055)!important; transform:none!important;
 margin:0!important; padding:0!important; max-width:none!important; width:100%!important;
 display:flex!important; flex-direction:column!important; align-items:center!important;
 font-family:var(--z-display)!important; font-weight:800!important; font-style:normal!important;
 font-size:min(15.2vw,calc(var(--zs-h) * .262))!important; line-height:.84!important; letter-spacing:-.06em!important;
 text-transform:uppercase!important; text-align:center!important; white-space:nowrap!important;
 color:var(--ink)!important; text-shadow:none!important; background:none!important; -webkit-text-fill-color:currentColor!important;
 pointer-events:none; user-select:none;
}
html:root .zs-landing .z-land-type::before,html:root .zs-landing .z-land-type::after{display:none!important;content:none!important}
html:root .zs-landing .z-land-type .zs-w{display:block}
html:root .zs-landing .z-land-type .zs-dot{display:inline-block;width:.15em;height:.15em;margin-inline-start:.04em;border-radius:50%;
 background:var(--zs-fill);vertical-align:baseline;transition:background-color .7s var(--zs-ease)}
html:root[data-zs-power="off"] .zs-landing .z-land-type .zs-dot{background:var(--ink)}

/* the bust — three aligned layers, exactly like the statue file */
html:root .zs-landing .z-land-center.zs-stage{
 position:absolute!important; z-index:2!important; inset:auto!important; left:50%!important; top:var(--zs-top)!important;
 transform:translateX(-50%)!important; display:block!important; order:initial!important; margin:0!important;
 height:var(--zs-h)!important; aspect-ratio:1006/1448; width:auto!important; max-width:100vw; pointer-events:auto!important;
}
.zs-bust{
 --mx:30%; --my:40%; --reveal:0; --r:calc(var(--zs-h) * .205);
 position:relative; width:100%; height:100%; cursor:crosshair; touch-action:pan-y; pointer-events:auto!important;
 filter:drop-shadow(0 28px 44px rgba(0,0,0,.55));
}
.zs-bust[data-power="x2"]{--r:calc(var(--zs-h) * .278)}
.zs-bust[data-power="x3"]{--r:calc(var(--zs-h) * .362)}
.zs-bust img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;user-select:none;-webkit-user-drag:none;pointer-events:none}
.zs-bust .zs-gold{
 opacity:var(--reveal);
 -webkit-mask-image:radial-gradient(circle calc(var(--r) * 1.2) at var(--mx) var(--my),#000 0%,#000 62%,rgb(0 0 0 / 55%) 80%,transparent 100%);
         mask-image:radial-gradient(circle calc(var(--r) * 1.2) at var(--mx) var(--my),#000 0%,#000 62%,rgb(0 0 0 / 55%) 80%,transparent 100%);
}
.zs-bust .zs-digital{
 opacity:var(--reveal);
 -webkit-mask-image:radial-gradient(circle calc(var(--r) * 1.9) at var(--mx) var(--my),#000 0%,#000 62%,rgb(0 0 0 / 55%) 80%,transparent 100%),linear-gradient(90deg,#000 52%,transparent 86%);
         mask-image:radial-gradient(circle calc(var(--r) * 1.9) at var(--mx) var(--my),#000 0%,#000 62%,rgb(0 0 0 / 55%) 80%,transparent 100%),linear-gradient(90deg,#000 52%,transparent 86%);
 -webkit-mask-composite:source-in; mask-composite:intersect;
}
.zs-bust{opacity:0;transform:translateY(14px);transition:opacity 1.1s var(--zs-ease),transform 1.4s var(--zs-ease)}
.zs-bust.is-ready{opacity:1;transform:none}

/* bottom: tagline · Start · power segment · countdown */
html:root .zs-landing .z-land-bottom{
 position:absolute!important; z-index:3!important; inset:auto 0 0 0!important; left:0!important; right:0!important; bottom:0!important; transform:none!important;
 display:flex!important; flex-direction:column!important; align-items:center!important; justify-content:flex-end!important; gap:14px!important;
 padding:0 clamp(18px,3.2vw,44px) max(18px,env(safe-area-inset-bottom))!important; margin:0!important; width:auto!important;
 background:none!important; pointer-events:none;
}
html:root .zs-landing .z-land-bottom>*{pointer-events:auto}
html:root .zs-landing .z-land-bottom>p{
 margin:0!important; display:flex!important; flex-direction:column!important; gap:5px!important; text-align:start!important; align-items:flex-start!important; max-width:360px!important;
 position:absolute!important; inset-inline-start:clamp(18px,3.2vw,44px)!important; bottom:max(30px,calc(env(safe-area-inset-bottom) + 18px))!important;
}
html:root .zs-landing .z-land-bottom>p>*{margin:0!important;padding:0!important}
html:root .zs-landing .z-land-bottom>p>span{font:600 15px/1.35 var(--z-ui)!important;color:var(--ink)!important;letter-spacing:-.01em!important}
html:root .zs-landing .z-land-bottom>p>small{font:400 12.5px/1.5 var(--z-ui)!important;color:var(--ink-3)!important;letter-spacing:0!important}
html:root .zs-landing .z-land-actions{display:flex!important;flex-direction:column!important;align-items:center!important;gap:8px!important;margin:0!important;width:auto!important}
html:root .zs-landing .z-land-actions>#zekaEnter{order:0!important}
html:root .zs-landing .z-land-actions>.z-land-modes{order:1!important}
html:root .zs-landing .z-land-actions>.zs-slot{order:2!important}

/* Start — dark glass, same height logic as the statue file */
html:root .zs-landing #zekaEnter.z-land-go,
html:root .zs-landing #zekaEnter.z-land-go:hover,
html:root .zs-landing #zekaEnter.z-land-go:focus-visible,
html:root .zs-landing #zekaEnter.z-land-go:active{
 display:inline-flex!important; align-items:center!important; justify-content:center!important; gap:10px!important;
 height:50px!important; min-width:0!important; padding:0 26px!important; border-radius:999px!important;
 font:650 15px/1 var(--z-ui)!important; letter-spacing:.06em!important; text-transform:none!important;
 color:var(--ink)!important; background:var(--zs-glass)!important; border:1px solid color-mix(in srgb,var(--ink) 16%,transparent)!important;
 box-shadow:none!important; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
 transition:border-color .5s var(--zs-ease),background-color .4s ease,transform .25s var(--zs-ease)!important;
}
html:root .zs-landing #zekaEnter.z-land-go>span{color:inherit!important}
html:root .zs-landing #zekaEnter.z-land-go:hover{background:color-mix(in srgb,var(--zs-glass),var(--ink) 8%)!important}
html:root .zs-landing #zekaEnter.z-land-go:active{transform:scale(.985)}
html:root .zs-landing #zekaEnter .zs-arrow{display:inline-block;transition:transform .45s var(--zs-ease)}
html:root .zs-landing #zekaEnter:hover .zs-arrow{transform:translate(3px,-3px)}
html:root .zs-landing #zekaEnter.is-running{border-color:var(--zs-line)!important}

/* the three-way power segment */
html:root .zs-landing .z-land-modes{
 display:flex!important; gap:4px!important; padding:5px!important; border-radius:999px!important; margin:0!important; width:auto!important; height:auto!important;
 background:var(--zs-glass)!important; border:1px solid color-mix(in srgb,var(--ink) 9%,transparent)!important; box-shadow:none!important;
 backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
}
html:root .zs-landing .z-land-modes button,
html:root[data-zeka-guest="1"] .zeka-landing.zs-landing .z-land-modes button[aria-checked]{
 display:inline-flex!important; align-items:center!important; gap:7px!important; height:38px!important; min-width:0!important;
 padding:0 17px!important; border-radius:999px!important; border:1px solid transparent!important;
 font:650 12.5px/1 var(--z-ui)!important; letter-spacing:.06em!important; white-space:nowrap!important;
 color:var(--ink-3)!important; background:transparent!important; box-shadow:none!important; text-shadow:none!important;
 transition:color .45s ease,background-color .55s var(--zs-ease),border-color .55s ease!important; cursor:pointer;
}
html:root .zs-landing .z-land-modes button::before{content:"";width:6px;height:6px;border-radius:50%;flex:none;background:currentColor;opacity:.45;transition:opacity .4s ease,transform .5s var(--zs-ease)}
html:root .zs-landing .z-land-modes button[data-z-mode="x2"]::before{background:var(--zs-x2);opacity:.9}
html:root .zs-landing .z-land-modes button[data-z-mode="x3"]::before{background:var(--zs-x3-line);opacity:.9}
html:root .zs-landing .z-land-modes button:hover{color:var(--ink)!important;background:color-mix(in srgb,var(--ink) 5%,transparent)!important}
html:root .zs-landing .z-land-modes button:hover::before{transform:scale(1.35)}
html:root .zeka-landing.zs-landing .z-land-modes button[data-z-mode="off"][aria-checked="true"]{background:var(--zs-off)!important;color:var(--zs-off-on)!important}
html:root .zeka-landing.zs-landing .z-land-modes button[data-z-mode="off"][aria-checked="true"]::before{background:var(--zs-off-on);opacity:1}
html:root .zeka-landing.zs-landing .z-land-modes button[data-z-mode="x2"][aria-checked="true"]{background:var(--zs-x2)!important;color:#fff!important;border-color:var(--zs-x2)!important}
html:root .zeka-landing.zs-landing .z-land-modes button[data-z-mode="x3"][aria-checked="true"]{background:var(--zs-x3)!important;color:#fff!important;border-color:var(--zs-x3)!important}
html:root .zeka-landing.zs-landing .z-land-modes button:is([data-z-mode="x2"],[data-z-mode="x3"])[aria-checked="true"]::before{background:#fff;opacity:1;animation:zs-beat 1.6s ease-in-out infinite}

/* countdown (statue: "×2 ACTIVE · 12s") — reserved height so nothing jumps */
.zs-slot{display:flex;justify-content:center;height:22px}
.zs-count{width:14rem;display:flex;flex-direction:column;align-items:center;gap:5px;opacity:0;transition:opacity .35s ease}
.zs-count.is-on{opacity:1}
.zs-count-label{font:650 10px/1 var(--z-ui);letter-spacing:.3em;color:var(--zs-line);font-variant-numeric:tabular-nums}
.zs-count-track{width:100%;height:1px;background:var(--line-2)}
.zs-count-bar{height:1px;width:0;background:var(--zs-line)}
.zs-count-bar.is-run{width:100%;animation:zs-drain linear forwards}
@keyframes zs-drain{to{width:0}}
@keyframes zs-beat{50%{transform:scale(1.45);opacity:.6}}

/* tablet & phone */
@media (max-width:820px){
  html:root .zeka-landing.zs-landing{--zs-f:16.4vw;--zs-th:calc(var(--zs-f) * 1.62);--zs-avail:calc(100svh - 76px - 240px);--zs-h:min(calc(var(--zs-avail) - var(--zs-th) - 8px),138vw);--zs-slack:calc(var(--zs-avail) - var(--zs-th) - var(--zs-h));--zs-t:calc(76px + var(--zs-slack) * .4);--zs-top:calc(var(--zs-t) + var(--zs-th))}
 html:root .zs-landing .z-land-type{padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px))!important;box-sizing:border-box!important}
 html:root .zs-landing .z-land-nav>span{display:none!important}
 html:root .zs-landing .z-land-type{top:var(--zs-t)!important;font-size:var(--zs-f)!important}
 html:root .zs-landing .z-land-bottom{gap:12px!important}
 html:root .zs-landing .z-land-bottom>p{position:static!important;align-items:center!important;text-align:center!important;max-width:none!important}
 html:root .zs-landing .z-land-bottom>p>*{margin:0!important;padding:0!important}
html:root .zs-landing .z-land-bottom>p>span{font-size:14px!important}
 html:root .zs-landing .z-land-bottom>p>small{font-size:12px!important}
}
@media (max-width:420px){
 html:root .zs-landing .z-land-modes button,
 html:root[data-zeka-guest="1"] .zeka-landing.zs-landing .z-land-modes button[aria-checked]{padding:0 13px!important;height:36px!important;font-size:12px!important;gap:6px!important}
 html:root .zs-landing #zekaEnter.z-land-go{height:48px!important}
}
@media (max-height:560px) and (min-width:821px){
 html:root .zs-landing .z-land-bottom>p{display:none!important}
}

/* ───────────────────────── 3 · chat: title only, no eye ───────────────────────── */
html:root .z-eye.z-chat-eye,html:root .z-chat-ambient .z-eye,html:root #view-chat .z-eye{display:none!important}
html:root #view-chat .z-chat-hero{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;
 background:none!important;padding:0!important;margin:auto!important;min-height:42svh}
html:root #view-chat .z-chat-hero h2,html:root #view-chat .z-chat-ambient-title{
 display:block!important; margin:0!important; padding:0!important; position:static!important; transform:none!important;
 font-family:var(--z-display)!important; font-weight:800!important; font-style:normal!important;
 font-size:clamp(38px,6.4vw,92px)!important; line-height:.9!important; letter-spacing:-.055em!important;
 text-transform:uppercase!important; text-align:center!important; color:var(--ink)!important; opacity:1!important;
 text-shadow:none!important; background:none!important; -webkit-text-fill-color:currentColor!important;
 animation:zs-rise .9s var(--zs-ease) both;
}
html:root #view-chat .z-chat-hero h2::after,html:root #view-chat .z-chat-ambient-title::after{
 content:""!important; display:inline-block!important; width:.15em; height:.15em; margin-inline-start:.05em; border-radius:50%;
 background:var(--zs-line); position:static!important; transition:background-color .7s var(--zs-ease)}
html:root #view-chat .z-chat-hero h2::before,html:root #view-chat .z-chat-ambient-title::before{display:none!important;content:none!important}
@keyframes zs-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ───────────────────────── 4 · studio skin: flat black & white ───────────────────────── */
html:root .shell,html:root main,html:root .view,html:root #view-chat{background-color:var(--canvas)}
html:root:not([data-atmo="on"]) :is(.shell,main,.view,#view-chat){background:var(--canvas)!important}

/* older skins re-declare navy tokens ON the composers and popovers — reset them there too */
html:root[data-theme="dark"] :is(#view-chat .composer,#view-image .studio .studio-composer,#view-video .studio .studio-composer,#view-music .studio .studio-composer,body>.pop[id^="pop-"],body>.z-compact-pop,.pop,.z-model-pop){
 --surface:#111112!important; --surface-2:#18181A!important; --surface-3:#212123!important; --field:#0E0E0F!important;
 --ink:#EEECE8!important; --ink-2:#CFCBC4!important; --ink-3:#9A968F!important; --ink-4:#6F6C67!important;
 --line:#1E1E20!important; --line-2:#2A2A2D!important; --line-ctl:#47464B!important;
 --key:#EEECE8!important; --key-2:#FFFFFF!important; --key-on:#0B0B0C!important;
 --brand:var(--zs-line)!important; --brand-2:var(--zs-line)!important; --brand-soft:#18181A!important; --brand-line:#2A2A2D!important;
}
html:root[data-theme="dark"] :is(body>.pop[id^="pop-"],body>.z-compact-pop){background:#111112!important;color:#EEECE8!important;border-color:#2A2A2D!important}
html:root[data-theme="dark"] .rail{background:var(--canvas)!important;border-color:var(--line)!important}

/* rail */
html:root .rail{background:var(--canvas)!important;border-inline-end:1px solid var(--line)!important}
html:root .rail .brandline .z{background:var(--ink)!important;color:var(--canvas)!important;border:0!important;border-radius:9px!important}
html:root .rail .brandline .z::after{background:var(--zs-fill)!important;box-shadow:0 0 0 2px var(--canvas)!important}
html:root[data-zs-power="off"] .rail .brandline .z::after{background:var(--ink-3)!important}
html:root .rail .brandline b{color:var(--ink)!important;letter-spacing:.26em!important}
html:root .rail .brandline span{color:var(--ink-4)!important}
html:root .rail-label{color:var(--ink-4)!important;font-weight:600!important;letter-spacing:.14em!important}
html:root .rail .nav{color:var(--ink-3)!important;background:transparent!important;border:1px solid transparent!important}
html:root .rail .nav:hover{color:var(--ink)!important;background:var(--surface)!important}
html:root .rail .nav.on{color:var(--ink)!important;background:var(--surface-2)!important;border-color:var(--line-2)!important;font-weight:600!important}
html:root .rail .nav svg{color:inherit}
html:root .rail .nav.on svg{color:var(--zs-line)!important}
html:root .rail .nav .tip{background:transparent!important}
html:root .rail .nav.on .tip{background:var(--zs-line)!important;box-shadow:none!important}
html:root :is(.newchat,.btn.key){background:var(--surface-2)!important;color:var(--ink)!important;border:1px solid var(--line-2)!important;box-shadow:none!important}
html:root :is(.newchat,.btn.key):hover{background:var(--surface-3)!important;border-color:var(--line-ctl)!important}
html:root .rail-card{background:transparent!important;border:1px solid var(--line-2)!important;color:var(--ink-3)!important;box-shadow:none!important}
html:root .rail-card .k i{background:var(--zs-x2)!important;box-shadow:none!important}
html:root .chats-search,html:root #mediaHistorySearch{background:var(--field)!important;border:1px solid var(--line-2)!important;color:var(--ink)!important}
html:root .chats-search::placeholder{color:var(--ink-4)!important}

/* headings: one family, one weight scale */
html:root .head h1,html:root .head h1 em{font-family:var(--z-ui)!important;font-style:normal!important;font-weight:700!important;letter-spacing:-.035em!important;color:var(--ink)!important}
html:root .head h1 em{color:var(--ink)!important}
html:root .head p{color:var(--ink-3)!important}

/* composer */
html:root[data-theme] :is(#view-chat .composer,#view-image .studio .studio-composer,#view-video .studio .studio-composer,#view-music .studio .studio-composer,.studio .studio-composer){background:var(--surface)!important;border:1px solid var(--line-2)!important;box-shadow:none!important;border-radius:18px!important}
html:root[data-theme] :is(#view-chat .composer,#view-image .studio .studio-composer,#view-video .studio .studio-composer,#view-music .studio .studio-composer,.studio .studio-composer):focus-within{border-color:var(--line-ctl)!important;box-shadow:none!important}
html:root[data-theme] :is(#view-chat .composer,#view-image .studio-composer,#view-video .studio-composer,#view-music .studio-composer) textarea{background:transparent!important;color:var(--ink)!important}
html:root[data-theme] :is(#view-chat .composer,#view-image .studio-composer,#view-video .studio-composer,#view-music .studio-composer) textarea::placeholder{color:var(--ink-4)!important}
html:root .composer .tool{color:var(--ink-2)!important;background:transparent!important;border:1px solid var(--line-2)!important}
html:root .composer .tool:hover{background:var(--surface-2)!important;color:var(--ink)!important}
/* send = the accent: white / red / purple */
html:root[data-theme] :is(#view-chat .composer,#view-image .studio-composer,#view-video .studio-composer,#view-music .studio-composer,.composer) .send:not(.stop){
 background:var(--zs-fill)!important;color:var(--zs-on)!important;border:0!important;box-shadow:none!important;
 transition:background-color .6s var(--zs-ease),transform .2s var(--zs-ease)!important}
html:root :is(.composer,.studio-composer) .send:not(.stop):hover{filter:brightness(1.08)}
html:root :is(.composer,.studio-composer) .send:not(.stop):active{transform:scale(.94)}
html:root .composer .send.stop{background:var(--surface-3)!important;color:var(--ink)!important;border:1px solid var(--line-ctl)!important}
/* model pill */
html:root[data-theme] #view-chat .composer #modelPill,html:root[data-theme] .z-model-trigger{background:transparent!important;border:1px solid var(--line-2)!important;color:var(--ink)!important;box-shadow:none!important}
html:root[data-theme] #view-chat .composer #modelPill:hover{background:var(--surface-2)!important}
html:root[data-theme] #view-chat .composer #modelPill .model-symbol,html:root .z-model-trigger .model-symbol{color:var(--zs-line)!important;transition:color .6s ease}
/* prompt enhancer: neutral outline, the ✦ speaks the power colour */
html:root[data-theme] :is(#view-chat .composer,.studio-composer,body) .z-enhance-btn{color:var(--ink-3)!important;background:transparent!important;border:1px solid var(--line-2)!important;box-shadow:none!important;border-radius:999px!important}
html:root[data-theme] :is(#view-chat .composer,.studio-composer,body) .z-enhance-btn:hover{background:var(--surface-2)!important;color:var(--ink)!important;border-color:var(--line-ctl)!important}
html:root .z-enhance-btn .zs-star{display:inline-block;color:var(--zs-line);transition:transform .6s var(--zs-ease),color .6s ease}
html:root .z-enhance-btn:hover .zs-star{transform:rotate(90deg) scale(1.15)}
html:root .z-enhance-undo{color:var(--ink-3)!important;border-color:var(--line-2)!important;background:transparent!important}

/* power switch in the composer: X3 · Normal · X2, each lamp in its own colour */
html:root .z-power{border:1px solid var(--line-2)!important;background:transparent!important}
html:root .z-power button{--c:var(--zs-off);color:var(--ink-3)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important}
html:root .z-power button[data-power="x2"]{--c:var(--zs-x2)}
html:root .z-power button[data-power="x3"]{--c:var(--zs-x3-line)}
html:root .z-power button i{background:var(--c)!important;opacity:.5;box-shadow:none!important;transition:opacity .4s ease,transform .5s var(--zs-ease),background-color .5s ease!important}
html:root .z-power button[data-power="off"] i{background:var(--ink-4)!important}
html:root .z-power button:hover{color:var(--ink)!important}
html:root .z-power button:hover i{opacity:1;transform:scale(1.3)}
html:root .z-power button[aria-checked="true"]{outline:0!important}
html:root .z-power button[data-power="off"][aria-checked="true"]{background:var(--zs-off)!important;color:var(--zs-off-on)!important}
html:root .z-power button[data-power="off"][aria-checked="true"] i{background:var(--zs-off-on)!important;opacity:1}
html:root .z-power button[data-power="x2"][aria-checked="true"]{background:var(--zs-x2)!important;color:#fff!important}
html:root .z-power button[data-power="x3"][aria-checked="true"]{background:var(--zs-x3)!important;color:#fff!important}
html:root .z-power button:is([data-power="x2"],[data-power="x3"])[aria-checked="true"] i{background:#fff!important;opacity:1;animation:zs-beat 1.6s ease-in-out infinite}
html:root .z-power-note[data-level="x2"]{--c:var(--zs-x2)!important}
html:root .z-power-note[data-level="x3"]{--c:var(--zs-x3-line)!important}
html:root .z-x2-btn{--c:var(--zs-x2)!important}
html:root .z-x2-btn[aria-pressed="true"]{background:color-mix(in srgb,var(--zs-x2) 14%,transparent)!important;border-color:var(--zs-x2)!important;color:var(--ink)!important}
html:root .z-x2-btn[aria-pressed="true"] i{background:var(--zs-x2)!important;box-shadow:none!important}

/* settings power cards — each card carries its own colour */
html:root #powerCards [data-power]{background:var(--surface)!important;border:1px solid var(--line-2)!important;box-shadow:none!important;transition:border-color .5s ease,background-color .5s ease}
html:root #powerCards [data-power] b{color:var(--ink)!important}
html:root #powerCards [data-power] em{color:var(--ink-3)!important;font-style:normal!important}
html:root #powerCards [data-power="off"][aria-checked="true"]{border-color:var(--zs-off)!important}
html:root #powerCards [data-power="x2"][aria-checked="true"]{border-color:var(--zs-x2)!important;background:color-mix(in srgb,var(--zs-x2) 7%,var(--surface))!important}
html:root #powerCards [data-power="x3"][aria-checked="true"]{border-color:var(--zs-x3-line)!important;background:color-mix(in srgb,var(--zs-x3) 10%,var(--surface))!important}
html:root #powerCards [data-power="x2"][aria-checked="true"] em{color:var(--zs-x2-line)!important}
html:root #powerCards [data-power="x3"][aria-checked="true"] em{color:var(--zs-x3-line)!important}

/* chips, pills, pops, fields, tabs, panels */
html:root :is(.chip,.pill){background:transparent!important;border:1px solid var(--line-2)!important;color:var(--ink-2)!important}
html:root :is(.chip,.pill):hover{background:var(--surface-2)!important;color:var(--ink)!important}
html:root :is(.chip,.pill)[aria-expanded="true"]{border-color:var(--line-ctl)!important;color:var(--ink)!important}
html:root .chip .lbl{color:var(--ink-4)!important}
html:root :is(.pop,.z-model-pop,.plus-menu,.z-skill-hint){background:var(--surface)!important;border:1px solid var(--line-2)!important;box-shadow:var(--shadow-pop)!important}
html:root :is(.panel,.card,.stat){background:var(--surface)!important;border-color:var(--line-2)!important;box-shadow:none!important}
html:root :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]){border-color:var(--line-2)!important}
html:root :is(input,select,textarea):focus{border-color:var(--line-ctl)!important;box-shadow:none!important;outline:0}
html:root .families button[aria-pressed="true"],html:root .families button.on,html:root .sc-cats button.on,html:root .sc-cats button[aria-pressed="true"],
html:root .z-settings-tabs button[aria-pressed="true"],html:root .sc-seg button.on,html:root .sc-seg button[aria-pressed="true"]{
 background:var(--ink)!important;color:var(--canvas)!important;border-color:var(--ink)!important}
html:root .models button[aria-selected="true"],html:root .models .on{border-color:var(--zs-line)!important;background:var(--surface-2)!important}
html:root label.check input:checked{accent-color:var(--zs-fill)}
html:root[data-theme="dark"] label.check input:checked{background:var(--zs-fill)!important;border-color:var(--zs-fill)!important}
html:root .zeka-key-notice{background:var(--surface)!important;border:1px solid var(--line-2)!important;color:var(--ink-2)!important;box-shadow:none!important}
html:root .zeka-key-notice strong{color:var(--ink)!important}
html:root .zeka-key-notice button{background:var(--ink)!important;color:var(--canvas)!important;border:0!important}
html:root .toast{background:var(--surface-2)!important;color:var(--ink)!important;border:1px solid var(--line-2)!important;box-shadow:var(--shadow-pop)!important}
html:root .zeka-build-badge{color:var(--ink-4)!important;background:transparent!important;border-color:var(--line)!important}
html:root #zGuestAuthPanel{background:var(--surface)!important;border:1px solid var(--line-2)!important;color:var(--ink)!important;box-shadow:var(--shadow-pop)!important}
html:root #zGuestAuthPanel input{background:var(--field)!important;color:var(--ink)!important}
html:root #zGuestAuthPanel .z-guest-submit{background:var(--ink)!important;color:var(--canvas)!important;border:0!important}
html:root #zGuestAuthPanel .z-guest-google,html:root #zGuestAuthPanel .z-guest-switch{color:var(--ink-2)!important;border-color:var(--line-2)!important;background:transparent!important}

/* phone composer: the model pill takes what is left instead of truncating early */
@media (max-width:480px){html:root #view-chat .composer .bar{gap:6px!important}html:root #view-chat .composer #modelPill{flex:1 1 auto!important;min-width:0!important;max-width:none!important}html:root #view-chat .composer .bar>.grow{display:none!important}html:root #view-chat .composer #powerSwitch{margin-inline-start:auto!important}}

/* ───────────────────────── 5 · icon micro-motion ───────────────────────── */
html:root :is(.rail .nav,.newchat,.tool,.send,.chip,.pill,.btn,.icon-btn,.rail-toggle,.burger,.z-model-trigger) svg{
 transition:transform .45s var(--zs-ease),color .6s ease!important;transform-origin:50% 50%}
html:root .rail .nav:hover svg{transform:translateY(-1px) scale(1.12)}
html:root .rail .nav.on svg{animation:zs-pop .55s var(--zs-ease)}
html:root .rail .nav[data-view="settings"]:hover svg{transform:rotate(60deg) scale(1.08)}
html:root .rail .nav[data-view="music"]:hover svg{transform:rotate(-10deg) scale(1.1)}
html:root .rail .nav[data-view="prompts"]:hover svg,html:root .z-model-trigger:hover .model-symbol svg{transform:rotate(90deg) scale(1.1)}
html:root .rail .nav[data-view="video"]:hover svg{transform:translateX(2px) scale(1.1)}
html:root :is(.newchat,.tool):hover svg{transform:rotate(90deg)}
html:root .send:not(.stop):hover svg{transform:translateY(-2px)}
html:root .send.stop:hover svg{transform:scale(.88)}
html:root :is(.rail-toggle,.burger):hover svg{transform:scale(1.1)}
html:root .chip:hover .caret,html:root .z-model-trigger:hover .model-chevron svg{transform:translateY(2px)}
html:root[data-zs-anim="1"] :is(.rail .nav.on svg,.send:not(.stop),.z-model-trigger .model-symbol,.rail .brandline .z){animation:zs-pop .6s var(--zs-ease)}
@keyframes zs-pop{0%{transform:scale(1)}40%{transform:scale(1.22)}100%{transform:scale(1)}}

@media (prefers-reduced-motion:reduce){
 .zs-bust,.zs-count,.zs-count-bar,html:root *{animation:none!important;transition-duration:.01ms!important}
}

/* startup error card: same flat surface as the rest */
html:root .zeka-boot-error{background:var(--surface)!important;color:var(--ink)!important;border:1px solid color-mix(in srgb,var(--zs-x2) 55%,var(--line-2))!important;box-shadow:var(--shadow-pop)!important}
html:root .zeka-boot-error button{background:var(--ink)!important;color:var(--canvas)!important;border:0!important}

/* ───────────────────────── 6 · round 3 fixes ───────────────────────── */
/* Prompt Enhancer: small, no icon, green */
html:root{--zs-green:#3FCF8E}
html:root[data-theme="light"]{--zs-green:#138A55}
html:root .z-enhance-btn .zs-star{display:none!important}
html:root[data-theme] :is(#view-chat .composer,.studio-composer,body) .z-enhance-btn{
 color:var(--zs-green)!important;border:1px solid color-mix(in srgb,var(--zs-green) 45%,transparent)!important;background:transparent!important;
 height:24px!important;min-height:24px!important;padding:0 10px!important;gap:0!important;font:600 11px/1 var(--z-ui)!important;letter-spacing:.02em!important;border-radius:999px!important}
html:root[data-theme] :is(#view-chat .composer,.studio-composer,body) .z-enhance-btn:hover{color:var(--zs-green)!important;background:color-mix(in srgb,var(--zs-green) 10%,transparent)!important;border-color:var(--zs-green)!important}
html:root .z-enhance-undo{height:24px!important;min-height:24px!important;padding:0 10px!important;font-size:11px!important}

/* API-key chip in the sidebar: removed */
html:root #railCard,html:root .rail .rail-card{display:none!important}

/* mobile menu backdrop */
html:root .scrim{background:rgba(0,0,0,.6)!important}

/* collapsible sidebar: one clean icon column, nothing overlaps */
@media (min-width:1060px){
 html:root body.rail-min .shell{grid-template-columns:64px minmax(0,1fr)!important}
 html:root body.rail-min .rail{width:64px!important;min-width:64px!important;max-width:64px!important;padding:16px 10px!important;align-items:center!important;gap:6px!important;overflow:hidden!important}
 html:root body.rail-min .rail .brandline{flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;height:auto!important;margin:0 0 6px!important;padding:0!important}
 html:root body.rail-min .rail .brandline .z{display:grid!important;width:40px!important;height:40px!important;flex:none!important}
 html:root body.rail-min .rail .brandline .txt{display:none!important}
 html:root body.rail-min .rail .rail-toggle{display:grid!important;place-items:center!important;position:static!important;width:42px!important;height:42px!important;margin:0!important;border-radius:11px!important;border:1px solid var(--line-2)!important;background:transparent!important;color:var(--ink-2)!important}
 html:root body.rail-min .rail :is(.newchat,.nav){width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;margin:0 auto!important;gap:0!important;font-size:0!important;justify-content:center!important;flex:none!important;border-radius:11px!important}
 html:root body.rail-min .rail :is(.newchat,.nav) svg{width:19px!important;height:19px!important;margin:0!important;flex:none!important}
 html:root body.rail-min .rail :is(.rail-label,.chats-search,.threads-list,.z-media-history-pane,.prefs,.tip){display:none!important}
 html:root body:not(.rail-min) .zeka-rail-reopen{display:none!important}
 html:root .rail{transition:width .35s var(--zs-ease),padding .35s var(--zs-ease)}
}

/* music: the Instrumental checkbox was stretched to 100% width */
html:root #musicExtra{overflow-x:hidden!important;max-width:100%!important}
html:root #musicExtra input[type="checkbox"]{width:17px!important;min-width:17px!important;max-width:17px!important;height:17px!important;flex:none!important;accent-color:var(--zs-fill)}
html:root #musicExtra .check{display:flex!important;align-items:center!important;gap:8px!important;width:auto!important;min-width:0!important}
html:root #musicExtra .pair{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;min-width:0!important}

/* model menus & small popovers: no blue */
html:root :is(.pop,.z-model-pop,.z-compact-pop) input[type="search"]{background:var(--field)!important;border:1px solid var(--line-2)!important;color:var(--ink)!important;box-shadow:none!important}
html:root :is(.pop,.z-model-pop,.z-compact-pop) input[type="search"]:focus{border-color:var(--line-ctl)!important;outline:0!important}
html:root :is(.models .model,.mhead){color:var(--ink)!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html:root :is(.models .model,.mhead):hover,html:root .mrow.open>.mhead{background:var(--surface-2)!important}
html:root .models .model.on{background:var(--surface-2)!important}
html:root .models .model.on::after{color:var(--zs-line)!important;border-color:var(--zs-line)!important;background-color:transparent}
html:root .models .model.on svg,html:root .models .model.on .ic{color:var(--zs-line)!important}
html:root .models .mcur{color:var(--ink-3)!important}
html:root .models .z-model-reason,html:root .models small{color:var(--ink-4)!important}
html:root .mrow .sub{background:var(--surface)!important;border:1px solid var(--line-2)!important;box-shadow:var(--shadow-pop)!important}
html:root[data-theme] :is(.chip,.pill,.z-fb-settings-body .chip)[aria-expanded="true"]{border-color:var(--line-ctl)!important;box-shadow:none!important;outline:0!important}
html:root input[type="range"]{accent-color:var(--zs-fill)}
html:root input[type="range"]::-webkit-slider-thumb{background:var(--zs-fill)!important;border-color:var(--zs-fill)!important;box-shadow:none!important}
html:root input[type="range"]::-moz-range-thumb{background:var(--zs-fill)!important;border-color:var(--zs-fill)!important}
html:root .z-fb-settings-details summary svg{color:var(--ink-3)!important}

/* ───────────────────────── 7 · phone & tablet: settings row + bottom sheets ───────────────────────── */
@media (max-width:1059px){
 /* Model settings become one wrapping row of chips above the composer — no card, no collapse, no inner scroll */
 html:root :is(#view-image,#view-video,#view-music) .studio>.z-fb-model-settings{
  position:static!important;inset:auto!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;
  margin:0 0 8px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;overflow:visible!important;align-self:stretch!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-details{max-height:none!important;height:auto!important;overflow:visible!important;border:0!important;background:none!important;box-shadow:none!important;padding:0!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-details>summary{display:none!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-items:center!important;gap:6px!important;padding:0!important;margin:0!important;border:0!important;max-height:none!important;overflow:visible!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .z-fb-field-title{display:none!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body :is(.z-fb-field-group,.chiprow){display:contents!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .note,html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .z-fb-empty{display:none!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body :is(.popwrap,.field,.demo-option){display:inline-flex!important;width:auto!important;min-width:0!important;margin:0!important;flex:0 1 auto!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .chip{height:32px!important;min-height:32px!important;width:auto!important;max-width:100%!important;padding:0 10px!important;gap:6px!important;font-size:12px!important;border-radius:999px!important;justify-content:flex-start!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .chip .lbl{font-size:11px!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .chip .val{max-width:38vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body .chip>svg.ic{width:15px!important;height:15px!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body label.check{display:inline-flex!important;height:32px!important;padding:0 10px!important;border:1px solid var(--line-2)!important;border-radius:999px!important;font-size:12px!important;gap:6px!important;margin:0!important}
 /* music details open as compact fields across the full width */
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra{flex:1 0 100%!important;order:9;padding:6px 0 0!important;display:grid!important;grid-template-columns:1fr auto;gap:8px!important;align-items:end}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra[hidden]{display:none!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra>.field:first-child{grid-column:1 / -1}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra .pair{grid-column:1 / -1;display:grid!important;grid-template-columns:1fr auto!important;align-items:end!important;gap:8px!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra .field{display:grid!important;gap:4px!important;margin:0!important;width:auto!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra .field>span{font-size:11px!important;color:var(--ink-3)!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra textarea{min-height:58px!important;height:58px!important;resize:none!important;padding:8px 10px!important;font-size:13px!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra input[type="text"],html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra input[type="number"]{height:36px!important;min-height:36px!important;padding:0 10px!important;font-size:13px!important}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra #musicFlowControls{grid-column:1 / -1}
 html:root[data-theme] :is(#view-image,#view-video,#view-music) .z-fb-settings-body #musicExtra .check{height:36px!important}

 /* menus open as one bottom sheet at a time, above a dimmed page */
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet{position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;
  width:auto!important;max-width:560px!important;margin-inline:auto!important;max-height:calc(100svh - 72px)!important;z-index:1300!important;
  border-radius:18px!important;transform:none!important;overflow:visible!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet :is(.models,.z-compact-list){max-height:none!important;overflow:visible!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet :is(.models .model,.mhead,.z-compact-choice){min-height:40px!important;padding:8px 12px!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet .mrow>.sub{position:static!important;inset:auto!important;transform:none!important;display:none!important;width:auto!important;min-width:0!important;max-height:none!important;
  margin:2px 0 4px!important;padding:0 0 0 12px!important;background:transparent!important;border:0!important;border-inline-start:1px solid var(--line-2)!important;border-radius:0!important;box-shadow:none!important}
 html:root[dir="rtl"] :is(#chatPickerPane,body>.pop).zs-sheet .mrow>.sub{padding:0 12px 0 0!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet .mrow>.sub::before{display:none!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet .mrow.open>.sub{display:block!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet .mrow .mchev{transition:transform .3s var(--zs-ease)!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet .mrow:not(.open) .mchev{transform:none!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet .mrow.open .mchev{transform:rotate(180deg)!important}
 html:root[data-theme] :is(#chatPickerPane,#zsNoId,body>.pop).zs-sheet input[type="search"]{height:40px!important}
}
#zsSheetBack{position:fixed;inset:0;z-index:1290;background:rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .25s ease;-webkit-tap-highlight-color:transparent}
#zsSheetBack.on{opacity:1;pointer-events:auto}

/* text fields show focus through their own border, never a second ring */
html:root :is(textarea,input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="number"],input[type="url"]):focus-visible{outline:0!important}
html:root[data-theme] #view-chat .composer:focus-within{border-color:var(--line-ctl)!important}

/* settings tabs: one even segmented row; library toolbar: tidy two-column grid on phones */
@media (max-width:640px){
 html:root #view-settings .z-settings-tabs{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px!important;padding:4px!important;margin:0 0 14px!important;
  border:1px solid var(--line-2)!important;border-radius:12px!important;overflow:visible!important;flex-wrap:nowrap!important}
 html:root #view-settings .z-settings-tabs button{min-width:0!important;min-height:34px!important;height:auto!important;padding:4px!important;border:0!important;border-radius:9px!important;
  font-size:11px!important;line-height:1.15!important;white-space:normal!important;overflow:hidden!important;text-align:center!important;background:transparent!important;color:var(--ink-3)!important}
 html:root #view-settings .z-settings-tabs button[aria-pressed="true"]{background:var(--ink)!important;color:var(--canvas)!important}
 html:root #view-settings .z-settings-tabs button:is([data-z-settings-tab="account"]):not([aria-pressed]){display:none}
 html:root #view-library .toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 html:root #view-library .toolbar>#libSearch{grid-column:1 / -1}
 html:root #view-library .toolbar>.grow{display:none!important}
 html:root #view-library .toolbar>*{width:100%!important;min-width:0!important;margin:0!important}
}

/* phone: Power cards sit side by side (name + cost); the model list under them explains the rest */
@media (max-width:640px){
 html:root #powerCards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 html:root #powerCards [data-power]{min-width:0!important;padding:10px 8px!important;gap:4px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;border-radius:12px!important}
 html:root #powerCards [data-power]>span,html:root #powerCards [data-power]>small{display:none!important}
 html:root #powerCards [data-power] b{font-size:13px!important}
 html:root #powerCards [data-power] em{font-size:11px!important;line-height:1.3!important}
 html:root #view-settings #systemPrompt{min-height:84px!important;height:84px!important}
 html:root #view-settings .panel{padding:14px!important}
 html:root #view-settings label.check{font-size:12.5px!important;line-height:1.45!important}
}

/* collapsed sidebar: hide credits chip (prevents "19.credit" clip at 64px) */
@media (min-width:1060px){
 html:root body.rail-min #zwAccount,html:root body.rail-min .z-web-account{display:none!important}
}

/* ZEKA MOBILE M2 SAFE / BEGIN */
/* ZS-M2:BEGIN */
/* ───────────────────── ZS-M2 · phone & tablet: the words run behind the bust ─────────────────────
   Measured from the bust silhouette: the marble is 47% of the box at the crown (y 12-16%),
   drops to 12-32% in the gap between crown and head (y 20-34%), and widens again at the face
   (38%) and shoulders (76%). The two lines are placed across that gap, so the ends of the
   words stay clear of the marble and only their middles pass behind it. */
@media (max-width:820px){
 html:root .zeka-landing.zs-landing{
  --zs-bottom:185px;                                   /* was 240: the controls are 20% smaller */
  --zs-avail:calc(100svh - 76px - var(--zs-bottom));
  --zs-h:min(var(--zs-avail),193vw);                   /* the title no longer steals height: ~ +40% */
  /* the two lines must stay inside the 14%-tall gap, so on a short screen the type follows the bust */
  --zs-f:min(16.4vw,calc(var(--zs-avail) * .115));
  --zs-th:calc(var(--zs-f) * 1.62);
  --zs-slack:calc(var(--zs-avail) - var(--zs-h));
  --zs-top:calc(76px + var(--zs-slack) * .5);
  --zs-t:calc(var(--zs-top) + var(--zs-h) * .305 - var(--zs-th) * .5);  /* centred on the gap */
 }
 html:root .zs-landing .z-land-type{top:var(--zs-t)!important;font-size:var(--zs-f)!important}
 /* controls: 20% smaller, which drops the Start button ~16% closer to the bottom edge */
 html:root .zs-landing .z-land-bottom{gap:10px!important;padding-bottom:max(14px,env(safe-area-inset-bottom))!important}
 html:root .zs-landing .z-land-actions{gap:6px!important}
 html:root .zs-landing #zekaEnter.z-land-go,
 html:root .zs-landing #zekaEnter.z-land-go:hover,
 html:root .zs-landing #zekaEnter.z-land-go:focus-visible,
 html:root .zs-landing #zekaEnter.z-land-go:active{height:40px!important;min-height:40px!important;max-height:40px!important;min-width:0!important;padding:0 22px!important;font:650 12px/1 var(--z-ui)!important;gap:8px!important}
 html:root .zs-landing .z-land-modes button,
 html:root[data-zeka-guest="1"] .zeka-landing.zs-landing .z-land-modes button[aria-checked]{height:29px!important;min-height:29px!important;max-height:29px!important;padding:0 10px!important;font-size:10px!important;gap:5px!important}
}
@media (max-width:420px){
 html:root .zs-landing .z-land-modes button,
 html:root[data-zeka-guest="1"] .zeka-landing.zs-landing .z-land-modes button[aria-checked]{height:29px!important;min-height:29px!important;max-height:29px!important;padding:0 10px!important;font-size:10px!important}
 html:root .zs-landing #zekaEnter.z-land-go{height:40px!important;min-height:40px!important;max-height:40px!important}
}
/* ZS-M2:END */
/* ZEKA MOBILE M2 SAFE / END */
