/* EVA, Stage 2 prototype (voice on request): launcher, panel, voice controls and the glow layers over the artwork. Tokens live in base.css. */

/* ---- glow layers (canvas over existing art; light only) ---- */
.eva-glow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.hero > .eva-glow--hero { z-index: 2; }
.hero > picture, .hero > .eva-glow--hero { transform-origin: 80% 100%; will-change: transform; }
.hero:not(.has-art) > .eva-glow--hero { display: none; }

/* ---- in-scene opener: EVA lives in the hero ---- */
.eva-meet {
  position: absolute; z-index: 5; right: 22%; top: 30%;
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px;
  background: rgba(3, 12, 20, 0.62); color: var(--text); font: 600 14px var(--font-body);
  border: 1px solid rgba(130, 230, 255, 0.55); border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(52, 200, 244, 0.25);
}
.eva-meet:hover { border-color: var(--highlight); background: rgba(7, 27, 41, 0.8); }
.eva-meet__dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.eva-meet__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--cyan); animation: eva-ping 2.4s ease-out infinite; }
@keyframes eva-ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.eva-meet__tag { font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--warning); }
.hero:not(.has-art) .eva-meet { display: none; }
@media (max-width: 860px) { .eva-meet { top: auto; bottom: auto; top: calc(var(--art-h) - 170px); right: 16px; } }
@media (max-width: 520px) { .eva-meet { top: 318px; } }

/* ---- launcher (bottom-right, public site) ---- */
.eva-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 35;
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 5px 18px 5px 5px;
  background: rgba(7, 27, 41, 0.9); color: var(--text);
  border: 1px solid var(--outline-active); border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(52, 200, 244, 0.08);
  transition: opacity .25s ease, transform .25s ease, border-color .2s ease, visibility 0s linear 0s;
}
.eva-launcher:hover { border-color: var(--cyan); }
.eva-launcher.is-tucked { opacity: 0; transform: translateY(12px); visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.eva-open .eva-launcher { opacity: 0; visibility: hidden; pointer-events: none; }
.eva-launcher__face {
  position: relative; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none;
  border: 1px solid rgba(130, 230, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(52, 200, 244, 0.12), 0 0 18px rgba(52, 200, 244, 0.35);
}
.eva-launcher__face img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; transform: scale(1.7); transform-origin: 30% 58%; }
.eva-launcher__face::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid rgba(130, 230, 255, 0.7); animation: eva-ring 3.6s ease-in-out infinite;
}
@keyframes eva-ring { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: .9; transform: scale(1.04); } }
.eva-launcher__text { display: grid; line-height: 1.1; text-align: left; }
.eva-launcher__text strong { font-family: var(--font-head); font-size: 17px; letter-spacing: 0.08em; }
.eva-launcher__text small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--warning); }

/* ---- panel ---- */
.eva-panel {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: 392px; max-height: min(640px, calc(100vh - 120px)); max-height: min(640px, calc(100dvh - 120px));
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(11, 35, 52, 0.97), rgba(5, 18, 29, 0.98));
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(52, 200, 244, 0.06), 0 0 40px rgba(52, 200, 244, 0.08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  overflow: hidden; color: var(--text); font-size: 14px;
}
.eva-panel[hidden] { display: none; }
.eva-panel::before { content: ""; position: absolute; left: 18px; right: 18px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); opacity: .8; }

.eva-panel__head { position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 96px 14px 16px; }
.eva-bust {
  position: relative; width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(130, 230, 255, 0.5); background: var(--raised);
  box-shadow: 0 0 0 4px rgba(52, 200, 244, 0.08), 0 0 26px rgba(52, 200, 244, 0.28);
}
.eva-bust img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 100%; }
.eva-bust .eva-glow { z-index: 1; }
.eva-panel__id { flex: 1; min-width: 0; display: grid; gap: 3px; padding-top: 4px; }
.eva-panel__name { font-family: var(--font-head); font-size: 22px; font-weight: 600; letter-spacing: 0.1em; line-height: 1.1; }
.eva-panel__label {
  display: flex; align-items: center; gap: 8px; margin: 0 16px; padding: 7px 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #F6E7BC; border: 1px solid rgba(221, 184, 86, 0.45); background: rgba(221, 184, 86, 0.08); border-radius: var(--r-md);
}
.eva-panel__label .icon { color: var(--warning); }
.eva-state { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.35; }
.eva-state__dot { width: 8px; height: 8px; margin-top: 5px; flex: none; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.eva-state[data-state="thinking"] .eva-state__dot { animation: eva-blip .9s ease-in-out infinite; }
.eva-state[data-state="greeting"] .eva-state__dot, .eva-state[data-state="speaking"] .eva-state__dot { animation: eva-blip .45s ease-in-out infinite; }
.eva-state[data-state="error"] .eva-state__dot { background: var(--danger); box-shadow: 0 0 8px rgba(233, 120, 126, 0.7); }
.eva-state[data-state="interrupted"] .eva-state__dot, .eva-state[data-state="muted"] .eva-state__dot { background: var(--muted); box-shadow: none; }
.eva-state[data-state="error"] { color: var(--text); }
@keyframes eva-blip { 50% { opacity: .35; } }
.eva-panel__win { position: absolute; top: 10px; right: 8px; display: flex; gap: 2px; }
.eva-icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-md); color: var(--text-2); cursor: pointer;
}
.eva-icon-btn:hover { color: var(--highlight); background: var(--raised); }

.eva-controls { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; }
.eva-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px;
}
.eva-chip:hover { border-color: var(--outline-active); }
.eva-chip[aria-pressed="true"] { border-color: var(--outline-active); background: rgba(52, 200, 244, 0.1); color: var(--highlight); }
.eva-controls__note { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 4px 16px 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid rgba(23, 59, 81, 0.7); }
.eva-details { padding: 6px 16px 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); border-bottom: 1px solid rgba(23, 59, 81, 0.7); }
.eva-details summary { cursor: pointer; min-height: 24px; letter-spacing: 0.04em; }
.eva-details__latency { margin: 4px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.eva-select { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.eva-select__label { font-size: 12.5px; color: var(--text-2); }
.eva-select select {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md); font-size: 13.5px;
}
.eva-select select:focus-visible { border-color: var(--cyan); }

.eva-log { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 10px; align-content: start; overflow-y: auto; flex: 1 1 auto; min-height: 96px; overscroll-behavior: contain; }
.eva-msg { display: grid; gap: 3px; max-width: 88%; }
.eva-msg__who { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.eva-msg__text { padding: 9px 12px; border-radius: 10px; line-height: 1.45; font-size: 14px; overflow-wrap: anywhere; }
.eva-msg--eva .eva-msg__text { background: rgba(52, 200, 244, 0.07); border: 1px solid rgba(38, 115, 152, 0.55); border-top-left-radius: 3px; }
.eva-msg--you { justify-self: end; text-align: right; }
.eva-msg--you .eva-msg__text { background: var(--raised); border: 1px solid var(--border); border-top-right-radius: 3px; text-align: left; }
.eva-msg--error .eva-msg__text { background: rgba(233, 120, 126, 0.08); border-color: rgba(233, 120, 126, 0.45); }
.eva-msg--note .eva-msg__text { background: transparent; border: 1px dashed var(--border); color: var(--text-2); }

.eva-form { display: flex; gap: 8px; align-items: center; padding: 10px 12px 8px; border-top: 1px solid rgba(23, 59, 81, 0.7); }
.eva-form input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md); font-size: 14px;
}
.eva-form input:focus-visible { border-color: var(--cyan); }
.eva-form input::placeholder { color: var(--muted); }
.eva-send, .eva-stop {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: var(--r-md); font-weight: 600; font-size: 13px; cursor: pointer; border: 1px solid transparent;
}
.eva-send { background: var(--cyan); color: #02121D; box-shadow: 0 0 16px rgba(52, 200, 244, 0.3); }
.eva-send:hover { background: var(--highlight); }
.eva-stop { background: transparent; color: var(--text); border-color: var(--border); }
.eva-stop:hover:not([disabled]) { border-color: var(--danger); color: var(--danger); }
.eva-stop[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- Stage 2: voice, pace/volume, adult opt-in, talk ---- */
.eva-controls { flex-wrap: wrap; }
.eva-panel { max-height: min(720px, calc(100vh - 120px)); max-height: min(720px, calc(100dvh - 120px)); }
/* The select keeps its accessible name from the label; the visible word goes, so the choice fits. */
.eva-select__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eva-select select { min-width: 132px; }
.eva-chip--voice[aria-pressed="false"] { color: var(--text-2); }
.eva-tune { display: flex; gap: 14px; padding: 6px 16px 2px; }
.eva-tune[hidden] { display: none; }
.eva-range { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12.5px; color: var(--text-2); }
.eva-range input { flex: 1; min-width: 0; accent-color: var(--cyan); height: 44px; }
.eva-adult { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.eva-adult input { width: 20px; height: 20px; flex: none; accent-color: var(--cyan); }
.eva-talk {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: var(--r-md); font-weight: 600; font-size: 13px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.eva-talk:hover { border-color: var(--outline-active); color: var(--highlight); }
.eva-talk[aria-pressed="true"] { border-color: var(--cyan); background: rgba(52, 200, 244, 0.12); color: var(--highlight); box-shadow: 0 0 14px rgba(52, 200, 244, 0.3); }
.eva-state[data-state="listening"] .eva-state__dot { animation: eva-blip 1.4s ease-in-out infinite; }
.eva-foot { padding: 0 16px 12px; font-size: 11.5px; color: var(--muted); }

/* ---- suggested questions and the inquiry handoff (2026-10-13) ---- */
.eva-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.eva-suggest[hidden] { display: none; }
.eva-suggest__q {
  min-height: 36px; padding: 6px 12px; background: transparent; color: var(--text); text-align: left;
  border: 1px solid rgba(38, 115, 152, 0.7); border-radius: 999px; font-size: 12.5px; line-height: 1.3; cursor: pointer;
}
.eva-suggest__q:hover, .eva-suggest__q:focus-visible { border-color: var(--cyan); color: var(--highlight); background: rgba(52, 200, 244, 0.08); }
.eva-msg--offer .eva-msg__text { background: rgba(52, 200, 244, 0.07); border: 1px dashed var(--cyan); }
.eva-offer__actions { display: flex; margin-top: 8px; }
.eva-offer__btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--cyan); color: #02121D; border: 1px solid transparent; font-weight: 600; font-size: 13px; cursor: pointer;
}
.eva-offer__btn:hover:not([disabled]) { background: var(--highlight); }
.eva-offer__btn[disabled] { opacity: .55; cursor: default; }
@media (max-width: 480px) { .eva-suggest__q { font-size: 12px; } }

/* ---- portal: "Need assistance?" ---- */
.assist__eva { justify-self: start; margin-top: 8px; gap: 10px; }
.assist__eva-tag { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--warning); }
.assist__portrait .eva-glow { -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }

/* ---- phones ---- */
@media (max-width: 600px) {
  .eva-launcher { right: 16px; bottom: 16px; min-height: 52px; padding: 4px 14px 4px 4px; gap: 10px; }
  .eva-launcher__face { width: 42px; height: 42px; }
  .eva-panel {
    left: 8px; right: 8px; bottom: 8px; width: auto;
    max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); /* the 72px header stays visible */
  }
  .eva-panel__head { padding: 12px 96px 10px 12px; gap: 12px; }
  .eva-panel__label { margin: 0 12px; font-size: 10.5px; }
  .eva-controls { padding: 10px 12px 4px; gap: 8px; }
  .eva-chip { padding: 0 11px; }
  .eva-tune { padding: 4px 12px 0; gap: 10px; }
  .eva-adult { padding: 0 12px; font-size: 12px; }
  .eva-form { gap: 6px; padding: 8px 10px 6px; }
  .eva-talk span, .eva-send span, .eva-stop span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .eva-talk, .eva-send, .eva-stop { padding: 0; justify-content: center; }
  .eva-controls__note { padding: 4px 12px 8px; }
  .eva-select__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .eva-bust { width: 64px; height: 64px; }
  .eva-panel__name { font-size: 19px; }
  .assist__portrait .eva-glow { -webkit-mask-image: linear-gradient(0deg, transparent, #000 40%); mask-image: linear-gradient(0deg, transparent, #000 40%); }
}

/* ---- Stage 4: embodiment. One visual treatment per state, blended; static under reduced motion / data saver ---- */
.eva-figure { position: relative; width: 84px; height: 84px; flex: none; --eva-ring: rgba(130, 230, 255, 0.5); --eva-halo: rgba(52, 200, 244, 0.28); }
.eva-figure .eva-bust { width: 100%; height: 100%; border-color: var(--eva-ring); box-shadow: 0 0 0 4px rgba(52, 200, 244, 0.08), 0 0 26px var(--eva-halo); transition: border-color .42s ease, box-shadow .42s ease, filter .42s ease; }
.eva-bust img { scale: 1.06; } /* head micro-motion never shows the crop edge */
/* FPS budget: the panel (97% opaque) and launcher (90%) gain nothing visible from a backdrop blur, but
   re-blurring the animated hero under them every frame was the largest frame cost measured (Stage 4 QA). */
.eva-panel, .eva-launcher { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* without the blur, 3% see-through let the hero's white text ghost through: the panel is opaque now */
.eva-panel { background: linear-gradient(180deg, rgb(11, 35, 52), rgb(5, 18, 29)); }
.eva-launcher { background: rgba(7, 27, 41, 0.96); }
.eva-meet { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(3, 12, 20, 0.8); }
.eva-aura { position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .42s ease; }
.eva-aura::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.eva-badge {
  position: absolute; right: -2px; bottom: -2px; z-index: 3; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); color: var(--text-2);
  opacity: 0; transform: scale(.6); transition: opacity .25s ease, transform .25s ease, background .25s ease, border-color .25s ease;
}
.eva-badge__bars { display: flex; align-items: center; gap: 2px; height: 12px; }
.eva-badge__bars i { display: block; width: 3px; height: 4px; border-radius: 2px; background: currentColor; }
.eva-badge::after { content: ""; position: absolute; inset: 0; font: 700 13px/26px var(--font-body); text-align: center; }

/* listening: steady bright ring, the face holds your eye; with the mic on, a live mic badge */
.eva-panel[data-look="listening"] .eva-figure { --eva-ring: var(--highlight); --eva-halo: rgba(130, 230, 255, 0.42); }
.eva-panel[data-look="listening"] .eva-aura { opacity: 1; }
.eva-panel[data-look="listening"] .eva-aura::before { border-color: rgba(130, 230, 255, 0.35); animation: eva-listen 2.2s ease-in-out infinite; }
@keyframes eva-listen { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.05); opacity: 1; } }
.eva-panel[data-mic="on"] .eva-badge { opacity: 1; transform: none; color: #02121D; background: var(--highlight); border-color: var(--highlight); box-shadow: 0 0 12px rgba(130, 230, 255, 0.6); }
.eva-panel[data-mic="on"] .eva-badge__bars i { animation: eva-bar .9s ease-in-out infinite; }
.eva-panel[data-mic="on"] .eva-badge__bars i:nth-child(2) { animation-delay: .15s; }
.eva-panel[data-mic="on"] .eva-badge__bars i:nth-child(3) { animation-delay: .3s; }
@keyframes eva-bar { 0%, 100% { height: 4px; } 50% { height: 12px; } }

/* thinking: an orbiting arc; the eyes look up and aside (canvas) */
.eva-panel[data-look="thinking"] .eva-aura { opacity: 1; }
.eva-panel[data-look="thinking"] .eva-aura::before { border-color: var(--cyan) transparent transparent transparent; animation: eva-orbit 1.1s linear infinite; }
@keyframes eva-orbit { to { transform: rotate(360deg); } }
.eva-panel[data-slow="true"] .eva-aura::before { animation-duration: 2.4s; border-top-color: var(--warning); }

/* speaking / greeting: a soft ripple from the bust */
.eva-panel[data-look="speaking"] .eva-figure, .eva-panel[data-look="greeting"] .eva-figure { --eva-ring: var(--highlight); --eva-halo: rgba(52, 200, 244, 0.5); }
.eva-panel[data-look="speaking"] .eva-aura, .eva-panel[data-look="greeting"] .eva-aura { opacity: 1; }
.eva-panel[data-look="speaking"] .eva-aura::before, .eva-panel[data-look="greeting"] .eva-aura::before { border-color: rgba(130, 230, 255, 0.5); animation: eva-ripple 1.3s ease-out infinite; }
@keyframes eva-ripple { 0% { transform: scale(.94); opacity: .9; } 100% { transform: scale(1.16); opacity: 0; } }

/* working: a sweeping arc plus the real job's status text */
.eva-panel[data-look="working"] .eva-aura { opacity: 1; }
.eva-panel[data-look="working"] .eva-aura::before { border-color: var(--cyan) var(--cyan) transparent transparent; animation: eva-orbit 2.2s cubic-bezier(.45, .05, .55, .95) infinite; }
.eva-job { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 12.5px; color: var(--text); line-height: 1.35; }
.eva-job[hidden] { display: none; }
.eva-job__bar { position: relative; width: 28px; height: 3px; flex: none; border-radius: 2px; overflow: hidden; background: rgba(52, 200, 244, 0.2); }
.eva-job__bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--cyan); animation: eva-sweep 1.4s ease-in-out infinite; }
@keyframes eva-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.eva-job__text { overflow-wrap: anywhere; }

/* approval: neutral and still. No colour that pushes, no pulse that nags; she waits. */
.eva-panel[data-look="approval"] .eva-figure { --eva-ring: rgba(205, 220, 230, 0.55); --eva-halo: rgba(205, 220, 230, 0.12); }
.eva-panel[data-look="approval"] .eva-aura { opacity: 1; }
.eva-panel[data-look="approval"] .eva-aura::before { border-color: rgba(205, 220, 230, 0.3); border-style: dashed; }
.eva-panel[data-look="approval"] .eva-job__bar::after { animation: none; width: 100%; background: rgba(205, 220, 230, 0.45); }

/* success: one bright bloom, then she settles back to rest by herself */
.eva-panel[data-look="success"] .eva-figure { --eva-ring: var(--success); --eva-halo: rgba(54, 200, 148, 0.35); }
.eva-panel[data-look="success"] .eva-aura { opacity: 1; }
.eva-panel[data-look="success"] .eva-aura::before { border-color: rgba(54, 200, 148, 0.7); animation: eva-bloom .9s ease-out 1 both; }
@keyframes eva-bloom { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.22); opacity: 0; } }
.eva-panel[data-look="success"] .eva-badge { opacity: 1; transform: none; background: var(--success); border-color: var(--success); }
.eva-panel[data-look="success"] .eva-badge__bars { display: none; }
.eva-panel[data-look="success"] .eva-badge::after { content: "\2713"; color: #02121D; }

/* error / blocked: dim, warm-red ring, eyes lowered; nothing moves fast */
.eva-panel[data-look="error"] .eva-figure { --eva-ring: rgba(233, 120, 126, 0.75); --eva-halo: rgba(233, 120, 126, 0.18); }
.eva-panel[data-look="error"] .eva-bust { filter: saturate(.7) brightness(.9); }
.eva-panel[data-look="error"] .eva-badge { opacity: 1; transform: none; background: var(--danger); border-color: var(--danger); }
.eva-panel[data-look="error"] .eva-badge__bars { display: none; }
.eva-panel[data-look="error"] .eva-badge::after { content: "!"; color: #02121D; }

/* interrupted: the ring collapses and greys for a beat, then settles */
.eva-panel[data-look="interrupted"] .eva-figure { --eva-ring: var(--muted); --eva-halo: rgba(127, 156, 174, 0.12); }
.eva-panel[data-look="interrupted"] .eva-aura { opacity: 1; }
.eva-panel[data-look="interrupted"] .eva-aura::before { border-color: rgba(127, 156, 174, 0.7); animation: eva-collapse .5s ease-in 1 both; }
@keyframes eva-collapse { 0% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(.98); opacity: 0; } }

/* muted: desaturated, a struck-through badge */
.eva-panel[data-look="muted"] .eva-figure { --eva-ring: rgba(127, 156, 174, 0.6); --eva-halo: rgba(127, 156, 174, 0.1); }
.eva-panel[data-look="muted"] .eva-bust { filter: saturate(.45) brightness(.85); }
.eva-panel[data-look="muted"] .eva-badge { opacity: 1; transform: none; }
.eva-panel[data-look="muted"] .eva-badge__bars i { height: 2px; }
.eva-panel[data-look="muted"] .eva-badge::after { inset: 11px 4px auto; height: 2px; background: var(--danger); transform: rotate(-45deg); }

/* the launcher's face carries the same state colour */
.eva-launcher[data-look="listening"] .eva-launcher__face, .eva-launcher[data-look="speaking"] .eva-launcher__face { border-color: var(--highlight); }
.eva-launcher[data-look="error"] .eva-launcher__face { border-color: rgba(233, 120, 126, 0.75); }
.eva-launcher[data-look="muted"] .eva-launcher__face img { filter: saturate(.45); }

/* QA preview (?eva-qa=1): labelled so a screenshot can never pass for a real job */
.eva-panel[data-qa="preview"] .eva-panel__label { flex-wrap: wrap; }
.eva-panel[data-qa="preview"] .eva-panel__label::after { content: "QA visual preview, not a real job"; flex-basis: 100%; padding-left: 22px; color: var(--warning); }

/* static fallback: reduced motion or data saver. Each state keeps its colour; nothing moves. */
.eva-panel[data-motion="static"] .eva-aura::before, .eva-panel[data-motion="static"] .eva-badge__bars i,
.eva-panel[data-motion="static"] .eva-job__bar::after, .eva-panel[data-motion="static"] .eva-state__dot { animation: none !important; }
.eva-panel[data-motion="static"] .eva-job__bar::after { width: 100%; }
@media (prefers-reduced-motion: reduce) { .eva-aura::before, .eva-badge__bars i, .eva-job__bar::after { animation: none !important; } }

@media (max-width: 600px) { .eva-figure { width: 64px; height: 64px; } }

/* ---- compact mobile: a bottom sheet at 430px and below ---- */
@media (max-width: 430px) {
  .eva-panel {
    left: 0; right: 0; bottom: 0; width: auto; border-radius: 18px 18px 0 0; border-bottom: 0;
    max-height: calc(100vh - 80px); max-height: min(78dvh, calc(100dvh - 80px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .eva-panel::after { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border); }
  .eva-panel__head { padding: 16px 92px 8px 12px; gap: 10px; }
  .eva-figure, .eva-figure .eva-bust { width: 52px; height: 52px; }
  .eva-badge { width: 20px; height: 20px; }
  .eva-badge::after { font-size: 11px; line-height: 20px; }
  .eva-panel[data-look="muted"] .eva-badge::after { inset: 8px 3px auto; }
  .eva-panel__name { font-size: 17px; }
  .eva-state { font-size: 12.5px; margin-top: 2px; }
  .eva-panel__label { padding: 5px 10px; font-size: 10px; }
  .eva-controls { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 12px 2px; }
  .eva-controls::-webkit-scrollbar { display: none; }
  .eva-chip { flex: none; }
  .eva-select { flex: none; }
  .eva-select select { min-width: 120px; }
  .eva-controls__note { font-size: 10.5px; padding: 2px 12px 6px; }
  .eva-foot { font-size: 11px; padding: 0 12px 8px; }
  .eva-launcher { padding: 4px; gap: 0; }
  .eva-launcher__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
