/* ================= Nessa v30 · "Porcelain Night" — the official look =================
   Deep navy (the background of her portrait) + porcelain white. Calm, professional, made for trading.
   Applies when the "Nessa" look is on: body.theme-avatar                                              */

body.theme-avatar {
  --bg: #0a1520; --bg2: #060d16; --surface: #0f1c2b; --surface2: #13243a; --raise: #182c44;
  --panel: rgba(12, 22, 34, .86); --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14);
  --text: #eef2f6; --ink: #eef2f6; --muted: #8b9bb0; --dim: #5d6e84;
  --white: #f4f6f8; --ice: #c9d8ea; --up: #2fbf8f; --down: #f0616d; --gold: #e8b04a;
  --blue: #c9d8ea; --violet: #f4f6f8; --cyan: #c9d8ea;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .04) inset;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.theme-avatar ::selection { background: rgba(255, 255, 255, .18); }

/* ---------- her world: deep navy, a soft light behind her, a faint floor ---------- */
.sky { display: none; }
body.theme-avatar .sky { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky-grad { position: absolute; inset: 0;
  background: radial-gradient(900px 640px at 50% 38%, #18304a 0%, rgba(24,48,74,0) 62%),
              radial-gradient(1400px 900px at 50% 110%, #0d1d2e 0%, rgba(13,29,46,0) 60%),
              linear-gradient(180deg, #08121c 0%, #0a1520 45%, #070f18 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; }
.blob.b1 { width: 40vmax; height: 40vmax; left: -14vmax; top: -12vmax; background: radial-gradient(circle, #1c3654, transparent 65%); animation: nDrift 30s ease-in-out infinite alternate; }
.blob.b2 { width: 36vmax; height: 36vmax; right: -12vmax; top: 10vmax; background: radial-gradient(circle, #16304b, transparent 65%); animation: nDrift 36s ease-in-out infinite alternate-reverse; }
.blob.b3 { display: none; }
@keyframes nDrift { to { transform: translate(6vmax, 5vmax) scale(1.08); } }
.horizon { position: absolute; left: 0; right: 0; top: 70%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); }
.floor { position: absolute; left: -20%; right: -20%; top: 70%; bottom: -10%; transform-origin: top; transform: perspective(700px) rotateX(66deg);
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 70px 70px; animation: nFloor 18s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); mask-image: linear-gradient(to bottom, #000, transparent 70%); }
@keyframes nFloor { to { background-position: 0 70px, 0 0; } }
.mist { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(to top, rgba(6,13,22,.95), rgba(6,13,22,0)); }
.orb3d, .shell, .dust { display: none !important; }

/* calm editorial title behind her, changes with her state */
.bigword { position: absolute; left: 0; right: 0; top: calc(var(--hy, 40vh) - var(--hs, 300px) * 1.05); text-align: center;
  font-family: var(--display); font-size: clamp(54px, 10vw, 168px); line-height: .9; letter-spacing: -.035em; white-space: nowrap; color: rgba(244,246,248,.92); }
.bigword span { position: absolute; left: 0; right: 0; opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform 1s cubic-bezier(.2,.8,.2,1); }
.bigword span i { font-style: normal; font-weight: 300; color: rgba(244,246,248,.38); }
.bigword span b { font-weight: 500; color: rgba(244,246,248,.9); }
body[data-state="asleep"] .bigword .w-asleep, body[data-state="prompter"] .bigword .w-asleep,
body[data-state="listening"] .bigword .w-listening, body[data-state="thinking"] .bigword .w-thinking,
body[data-state="speaking"] .bigword .w-speaking { opacity: 1; transform: none; }

/* thin light rings orbiting behind her head */
.halo-ring { position: absolute; left: var(--hx, 50vw); top: calc(var(--hy, 40vh) - var(--hs, 300px) * .5); width: calc(var(--hs, 300px) * 1.5); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; transform: perspective(900px) rotateX(75deg); animation: nRing 22s linear infinite; }
.halo-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px;
  background: conic-gradient(from 0deg, rgba(255,255,255,0), rgba(255,255,255,.85), rgba(201,216,234,.5) 30%, rgba(255,255,255,0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.45)); }
.halo-ring.r2 { width: calc(var(--hs, 300px) * 2); animation-duration: 34s; animation-direction: reverse; opacity: .35; }
@keyframes nRing { to { transform: perspective(900px) rotateX(75deg) rotateZ(360deg); } }
body[data-state="listening"] .halo-ring, body[data-state="speaking"] .halo-ring { animation-duration: 9s; }
body[data-state="thinking"] .halo-ring { animation-duration: 4s; }

body.theme-avatar #sphere { z-index: 1; }
body.theme-avatar #sphere.avatar-fallback { background: url(assets/nessa/nessa-porcelain.webp) center bottom / auto 86% no-repeat; filter: drop-shadow(0 0 40px rgba(255,255,255,.25)); }

/* ---------- her state path ---------- */
.statepath { display: none; }
body.theme-avatar .statepath { display: block; position: fixed; left: 0; right: 0; bottom: calc(150px + env(safe-area-inset-bottom)); height: 120px; z-index: 1; pointer-events: none; }
.statepath svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.statepath path { fill: none; stroke: url(#spGrad); stroke-width: 1.5; stroke-linecap: round; }
.sp-node { position: absolute; translate: -50% -50%; display: grid; place-items: center; }
.sp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 1.5px solid rgba(255,255,255,.6); display: grid; place-items: center; transition: all .5s cubic-bezier(.2,.8,.2,1); }
.sp-dot svg { width: 0; height: 0; stroke: #0a1520; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: all .4s; }
.sp-lbl { position: absolute; bottom: 22px; white-space: nowrap; text-align: center; font-family: var(--display); }
.sp-lbl small { display: block; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.sp-lbl b { font-size: 13px; font-weight: 500; color: var(--muted); }
body[data-state="asleep"] .sp-asleep .sp-dot, body[data-state="prompter"] .sp-asleep .sp-dot, body[data-state="listening"] .sp-listening .sp-dot,
body[data-state="thinking"] .sp-thinking .sp-dot, body[data-state="speaking"] .sp-speaking .sp-dot {
  width: 42px; height: 42px; border: 0; background: #f4f6f8; box-shadow: 0 0 0 8px rgba(255,255,255,.06), 0 0 30px rgba(255,255,255,.35); }
body[data-state="asleep"] .sp-asleep .sp-dot svg, body[data-state="prompter"] .sp-asleep .sp-dot svg, body[data-state="listening"] .sp-listening .sp-dot svg,
body[data-state="thinking"] .sp-thinking .sp-dot svg, body[data-state="speaking"] .sp-speaking .sp-dot svg { width: 18px; height: 18px; }
body[data-state="asleep"] .sp-asleep .sp-lbl, body[data-state="listening"] .sp-listening .sp-lbl,
body[data-state="thinking"] .sp-thinking .sp-lbl, body[data-state="speaking"] .sp-speaking .sp-lbl { bottom: 36px; }
body[data-state="asleep"] .sp-asleep .sp-lbl b, body[data-state="listening"] .sp-listening .sp-lbl b,
body[data-state="thinking"] .sp-thinking .sp-lbl b, body[data-state="speaking"] .sp-speaking .sp-lbl b { color: var(--white); }
body[data-state="listening"] .sp-listening .sp-dot, body[data-state="speaking"] .sp-speaking .sp-dot { animation: nPulse 1.6s ease-in-out infinite; }
@keyframes nPulse { 50% { box-shadow: 0 0 0 16px rgba(255,255,255,0), 0 0 34px rgba(255,255,255,.4); } }
@media (max-width: 640px) { body.theme-avatar .statepath { display: none; } }

/* ---------- header ---------- */
body.theme-avatar header { z-index: 3; padding: max(16px, env(safe-area-inset-top)) 22px 0; }
body.theme-avatar .brand { font-family: var(--display); font-size: 20px; letter-spacing: .28em; color: var(--white); text-shadow: none; font-weight: 600; }
body.theme-avatar .brand .ver { color: var(--bg); background: var(--white); border-radius: 99px; padding: 2px 7px; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; margin-left: 6px; vertical-align: 3px; }
body.theme-avatar .pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
body.theme-avatar .pill { background: rgba(15,28,43,.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line2); color: var(--muted); font-weight: 600; padding: 5px 12px; }
body.theme-avatar .pill.on { color: var(--up); border-color: rgba(47,191,143,.35); }
body.theme-avatar .pill.warn { color: var(--gold); border-color: rgba(232,176,74,.35); }
body.theme-avatar a.scan-pill { color: #0a1520; background: var(--white); border: 0; box-shadow: none; }
body.theme-avatar a.scan-pill:hover { background: #fff; filter: none; }

/* ---------- live price strip ---------- */
.ticker { display: none; }
body.theme-avatar .ticker:not(:empty) { display: block; position: fixed; left: 0; right: 0; top: calc(62px + env(safe-area-inset-top)); z-index: 2; overflow: hidden; pointer-events: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(8,16,26,.55); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tk-track { display: flex; gap: 34px; width: max-content; padding: 7px 0; animation: tkRun 70s linear infinite; }
.tk { display: inline-flex; gap: 8px; align-items: baseline; font: 600 12px/1.2 "Inter", sans-serif; color: var(--white); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tk b { font-weight: 600; color: var(--white); }
.tk .up { color: var(--up); } .tk .down { color: var(--down); }
@keyframes tkRun { to { transform: translateX(-50%); } }
@media (max-width: 640px) { body.theme-avatar .ticker:not(:empty) { top: calc(96px + env(safe-area-inset-top)); } }

/* ---------- status + caption ---------- */
body.theme-avatar .hud { bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 3; }
body.theme-avatar #status { font-family: var(--display); font-weight: 600; font-size: 10.5px; letter-spacing: .32em; color: var(--white);
  background: rgba(15,28,43,.75); border: 1px solid var(--line2); padding: 4px 14px; border-radius: 99px; backdrop-filter: blur(12px); }
body.theme-avatar #hint { color: var(--muted); }
body.theme-avatar #caption { color: var(--white); text-shadow: none; font-size: 16px; font-weight: 400; max-width: 640px;
  background: rgba(12,22,34,.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line2);
  border-radius: 18px; padding: 0 18px; box-shadow: var(--shadow); mask-image: none; -webkit-mask-image: none; }
body.theme-avatar #caption:not(:empty) { padding: 10px 18px; }
body.theme-avatar #caption.user { color: var(--muted); }
body.theme-avatar #stopBtn { background: var(--white); color: #0a1520; border: 0; }

/* ---------- dock ---------- */
body.theme-avatar .dock { gap: 4px; padding: 6px; border-radius: 999px; background: rgba(12,22,34,.78); border: 1px solid var(--line2);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); bottom: calc(20px + env(safe-area-inset-bottom)); }
body.theme-avatar .dock button, body.theme-avatar .dock a.dock-link { width: 44px; height: 44px; background: transparent; border: 0; color: var(--muted); transition: background .25s, color .25s; }
body.theme-avatar .dock button:hover, body.theme-avatar .dock a.dock-link:hover { background: rgba(255,255,255,.08); color: var(--white); }
body.theme-avatar .dock button.active { color: #0a1520; background: var(--white); box-shadow: none; border: 0; }
@media (max-width: 440px) { body.theme-avatar .dock { gap: 0; padding: 5px; } body.theme-avatar .dock button, body.theme-avatar .dock a.dock-link { width: 38px; height: 38px; } }

/* ---------- ask bar ---------- */
body.theme-avatar #textForm { bottom: calc(88px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 16px; z-index: 5;
  background: rgba(12,22,34,.92); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 18px 50px -16px rgba(0,0,0,.8), 0 0 0 6px rgba(255,255,255,.03); backdrop-filter: blur(16px); }
body.theme-avatar #textForm input { background: transparent !important; border: 0 !important; color: var(--white); font-size: 16px; padding: 11px 12px; }
body.theme-avatar #textForm input::placeholder { color: var(--dim); }
body.theme-avatar #textForm button { background: var(--white); color: #0a1520; border: 0; border-radius: 11px; padding: 9px 16px; font-weight: 600; }
body.theme-avatar:has(#textForm:not([hidden])) .statepath { opacity: .3; }

/* ---------- panels ---------- */
body.theme-avatar .panel { background: rgba(10,19,30,.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-left: 1px solid var(--line2); color: var(--text); box-shadow: -30px 0 80px -30px rgba(0,0,0,.8); }
body.theme-avatar .panel-head b { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--white); }
body.theme-avatar .close { color: var(--muted); width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.05); }
body.theme-avatar .close:hover { background: var(--white); color: #0a1520; }
body.theme-avatar .panel :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea),
body.theme-avatar .card input, body.theme-avatar .copyrow input, body.theme-avatar #marketsBox input:not([type]) {
  background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line2) !important; border-radius: 12px; }
body.theme-avatar .panel :is(input, select, textarea):focus { outline: none; border-color: rgba(255,255,255,.45) !important; box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
body.theme-avatar .wide, body.theme-avatar .card button { background: var(--white); color: #0a1520; border-radius: 12px; font-weight: 600; border: 0; }
body.theme-avatar .wide:hover, body.theme-avatar .card button:hover { background: #fff; }
body.theme-avatar .wide.danger { background: rgba(240,97,109,.1); color: #ff9aa3; border: 1px solid rgba(240,97,109,.35); }
body.theme-avatar #resetBtn, body.theme-avatar .copy, body.theme-avatar .btn-link, body.theme-avatar .cv-row button, body.theme-avatar .msg button.copy {
  background: var(--surface); color: var(--text); border: 1px solid var(--line2); }
body.theme-avatar .trade-box { background: var(--surface); border: 1px solid var(--line2); }
body.theme-avatar .small { color: var(--muted); }
body.theme-avatar .panel label { color: var(--muted); }
body.theme-avatar .panel label.row { color: var(--text); }
body.theme-avatar .panel input[type=checkbox], body.theme-avatar .panel input[type=range] { accent-color: #e8edf2; }

/* conversation */
body.theme-avatar .msg.user { background: var(--white); color: #0a1520; border-radius: 16px 16px 4px 16px; }
body.theme-avatar .msg.nessa { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; color: var(--text); }
body.theme-avatar .msg.nessa::before { content: ""; float: left; width: 26px; height: 26px; margin: -2px 8px 0 -4px; border-radius: 50%;
  background: url(assets/nessa/nessa-porcelain-face.webp) center / cover no-repeat, #13243a; box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 10px rgba(255,255,255,.2); }
body.theme-avatar .cv-list { border-color: var(--line2); background: var(--surface); }
body.theme-avatar .cv-item { border-color: var(--line); }
body.theme-avatar .cv-item:hover, body.theme-avatar .cv-item.on { background: rgba(255,255,255,.05); }

/* lock + wake */
body.theme-avatar .overlay { background: rgba(6,13,22,.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
body.theme-avatar .card { background: rgba(12,22,34,.92); border: 1px solid var(--line2); box-shadow: var(--shadow); border-radius: 24px; color: var(--text); }
body.theme-avatar .card .brand { font-size: 22px; }
body.theme-avatar .card::before { content: ""; display: block; width: 104px; height: 104px; margin: 0 auto 4px; border-radius: 50%;
  background: url(assets/nessa/nessa-porcelain-face.webp) center / cover no-repeat, #13243a;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 40px rgba(255,255,255,.18); animation: nGlow 3.4s ease-in-out infinite; }
@keyframes nGlow { 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 60px rgba(255,255,255,.3); } }
body.theme-avatar .card p { color: var(--muted); }
body.theme-avatar .card.big p { color: var(--white); font-family: var(--display); font-size: 21px; font-weight: 400; }
body.theme-avatar .err { color: #ff9aa3; }

/* chart + lessons */
body.theme-avatar .panel.chart-panel { background: rgba(8,16,26,.97); }
body.theme-avatar .cp-head select { background: var(--surface); color: var(--text); }
body.theme-avatar #chartTfs button, body.theme-avatar #chartFull, body.theme-avatar .cp-inds button { color: var(--muted); border-color: var(--line2); background: transparent; }
body.theme-avatar #chartTfs button.on, body.theme-avatar .cp-inds button.on { color: #0a1520; background: var(--white); border-color: var(--white); }
body.theme-avatar .cp-price { color: var(--up); font-weight: 600; }
body.theme-avatar .cp-tools button { background: rgba(255,255,255,.03); }
body.theme-avatar .cp-tools button.on { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
body.theme-avatar .cp-tools svg { stroke: #c4cfdc; }
body.theme-avatar #chartBox { border-color: var(--line2); background: #08111b; }
body.theme-avatar .panel.board-panel { background: rgba(10,19,30,.96); }
body.theme-avatar .bd-nav button, body.theme-avatar .bd-mini { background: var(--surface); color: var(--text); border-color: var(--line2); }
body.theme-avatar .bd-course { background: var(--surface); border-color: var(--line2); }
body.theme-avatar .bd-bar { background: rgba(255,255,255,.08); }
body.theme-avatar .bd-bar i { background: var(--white); }
body.theme-avatar .bd-course li.done { color: var(--up); }
body.theme-avatar .bd-caption b { color: var(--white); }

body.theme-avatar ::-webkit-scrollbar { width: 8px; height: 8px; }
body.theme-avatar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .blob, .floor, .halo-ring { animation: none !important; } }
@media (max-width: 640px) { .bigword { font-size: 24vw; } .bigword span i { display: none; } }

/* =================== v32 · White glowing stage for the main Nessa (navy text and controls; drawers stay navy) =================== */
body.theme-avatar { background: #f4f7fa; }
.bigword { display: none !important; }          /* no big words behind her */
.sky-grad { background: radial-gradient(760px 620px at 50% 40%, #ffffff 0%, #ffffff 30%, rgba(255,255,255,0) 70%),
                        radial-gradient(1300px 900px at 50% 45%, #eef3f8 0%, rgba(238,243,248,0) 70%),
                        linear-gradient(180deg, #f6f8fb 0%, #eef2f6 55%, #e4eaf1 100%); }
/* the light around her: a soft white bloom with a cool edge, breathing slowly */
.sky-grad::after { content: ""; position: absolute; left: var(--hx, 50vw); top: var(--hy, 42vh); width: calc(var(--hs, 300px) * 2.6); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,.9) 28%, rgba(205,220,236,.55) 52%, rgba(205,220,236,0) 72%);
  filter: blur(8px); animation: wBloom 6s ease-in-out infinite; }
@keyframes wBloom { 50% { transform: scale(1.06); opacity: .85; } }
.blob.b1 { background: radial-gradient(circle, #dde7f2, transparent 65%); opacity: .7; }
.blob.b2 { background: radial-gradient(circle, #e3ebf4, transparent 65%); opacity: .7; }
.horizon { background: linear-gradient(90deg, transparent, rgba(10,21,32,.12), transparent); }
.floor { background-image: linear-gradient(rgba(10,21,32,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(10,21,32,.05) 1px, transparent 1px); }
.mist { background: linear-gradient(to top, rgba(244,247,250,.95), rgba(244,247,250,0)); }
.halo-ring::before { background: conic-gradient(from 0deg, rgba(10,21,32,0), rgba(10,21,32,.35), rgba(120,145,175,.3) 30%, rgba(10,21,32,0) 60%); filter: none; }
.halo-ring.r2 { opacity: .5; }
body.theme-avatar #sphere.avatar-fallback { filter: drop-shadow(0 0 40px rgba(160,180,205,.6)); }

/* state path */
.statepath path { stroke: #0a1520; opacity: .35; }
.sp-dot { background: #f4f7fa; border-color: rgba(10,21,32,.55); }
.sp-dot svg { stroke: #fff; }
.sp-lbl small { color: #8b9bb0; } .sp-lbl b { color: #5b6b7d; }
body[data-state="asleep"] .sp-asleep .sp-dot, body[data-state="prompter"] .sp-asleep .sp-dot, body[data-state="listening"] .sp-listening .sp-dot,
body[data-state="thinking"] .sp-thinking .sp-dot, body[data-state="speaking"] .sp-speaking .sp-dot { background: #0a1520; box-shadow: 0 0 0 8px rgba(10,21,32,.06), 0 10px 24px rgba(10,21,32,.25); }
body[data-state="asleep"] .sp-asleep .sp-lbl b, body[data-state="listening"] .sp-listening .sp-lbl b,
body[data-state="thinking"] .sp-thinking .sp-lbl b, body[data-state="speaking"] .sp-speaking .sp-lbl b { color: #0a1520; }
@keyframes nPulse { 50% { box-shadow: 0 0 0 16px rgba(10,21,32,0), 0 10px 24px rgba(10,21,32,.25); } }

/* header, prices, status, caption, dock, ask bar on white */
body.theme-avatar .brand { color: #0a1520; }
body.theme-avatar .brand .ver { background: #0a1520; color: #fff; }
body.theme-avatar .pill { background: rgba(255,255,255,.8); border-color: rgba(10,21,32,.1); color: #5b6b7d; }
body.theme-avatar .pill.on { color: #0f8f66; border-color: rgba(15,143,102,.3); }
body.theme-avatar .pill.warn { color: #a86f00; border-color: rgba(168,111,0,.3); }
body.theme-avatar a.scan-pill { background: #0a1520; color: #fff; }
body.theme-avatar a.scan-pill:hover { background: #13243a; }
body.theme-avatar .ticker:not(:empty) { background: rgba(255,255,255,.65); border-color: rgba(10,21,32,.08); }
.tk, .tk b { color: #0a1520; } .tk .up { color: #0f8f66; } .tk .down { color: #d63b48; }
body.theme-avatar #status { color: #0a1520; background: rgba(255,255,255,.85); border-color: rgba(10,21,32,.1); }
body.theme-avatar #hint { color: #5b6b7d; }
body.theme-avatar #caption { color: #0a1520; background: rgba(255,255,255,.85); border-color: rgba(10,21,32,.08); box-shadow: 0 18px 40px -22px rgba(10,21,32,.35); }
body.theme-avatar #caption.user { color: #5b6b7d; }
body.theme-avatar #stopBtn { background: #0a1520; color: #fff; }
body.theme-avatar .dock { background: rgba(255,255,255,.82); border-color: rgba(10,21,32,.08); box-shadow: 0 18px 40px -22px rgba(10,21,32,.35); }
body.theme-avatar .dock button, body.theme-avatar .dock a.dock-link { color: #3d4b5c; }
body.theme-avatar .dock button:hover, body.theme-avatar .dock a.dock-link:hover { background: rgba(10,21,32,.06); color: #0a1520; }
body.theme-avatar .dock button.active { background: #0a1520; color: #fff; }
body.theme-avatar #textForm { background: rgba(255,255,255,.95); border-color: rgba(10,21,32,.18); box-shadow: 0 18px 44px -20px rgba(10,21,32,.4), 0 0 0 6px rgba(10,21,32,.03); }
body.theme-avatar #textForm input { color: #0a1520; }
body.theme-avatar #textForm input::placeholder { color: #8b9bb0; }
body.theme-avatar #textForm button { background: #0a1520; color: #fff; }
/* lock + wake cards on white */
body.theme-avatar .overlay { background: rgba(244,247,250,.75); }
body.theme-avatar .card { background: #fff; border-color: rgba(10,21,32,.08); color: #0a1520; box-shadow: 0 30px 70px -30px rgba(10,21,32,.35); }
body.theme-avatar .card .brand { color: #0a1520; }
body.theme-avatar .card p { color: #5b6b7d; }
body.theme-avatar .card.big p { color: #0a1520; }
body.theme-avatar .card input { background: #f4f7fa !important; color: #0a1520 !important; border-color: rgba(10,21,32,.14) !important; }
body.theme-avatar .card button { background: #0a1520; color: #fff; }
body.theme-avatar .card button:hover { background: #13243a; }
body.theme-avatar .card::before { box-shadow: 0 0 0 1px rgba(10,21,32,.12), 0 0 40px rgba(160,180,205,.7); }
body.theme-avatar .err { color: #c0284c; }
/* lip-sync debug readout */
.lip-debug { position: fixed; left: 14px; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 6; margin: 0; padding: 8px 10px; min-width: 210px;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: #e8eef5; background: rgba(10,21,32,.88); border-radius: 10px; pointer-events: none; white-space: pre; }
.lip-debug[hidden] { display: none; }
