:root {
  --elvy-red: #b50f22;
  --elvy-red-dark: #720817;
  --elvy-gold: #f2bd35;
  --elvy-ink: #130f10;
  --elvy-paper: #fffdf9;
}

#elvy-root,
#elvy-root * { box-sizing: border-box; }

#elvy-root {
  --elvy-safe-offset: 0px;
  --elvy-travel-x: 0px;
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  pointer-events: none;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--elvy-ink);
  line-height: 1.45;
}

#elvy-root button,
#elvy-root textarea,
#elvy-root select { font: inherit; }

.elvy-launcher {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + var(--elvy-safe-offset));
  width: 128px;
  height: 160px;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 17px 18px rgba(38, 10, 14, .22));
  transition: right .5s ease, left .5s ease, bottom .35s ease, opacity .25s ease, transform .25s ease;
  transform: translate3d(var(--elvy-travel-x), 0, 0);
  -webkit-tap-highlight-color: transparent;
}

.elvy-launcher:hover { transform: translate3d(var(--elvy-travel-x), -4px, 0) scale(1.025); }
.elvy-launcher:focus-visible {
  outline: 3px solid var(--elvy-gold);
  outline-offset: 4px;
  border-radius: 48%;
}

#elvy-root.elvy-side-left .elvy-launcher {
  right: auto;
  left: max(18px, env(safe-area-inset-left));
}

.elvy-character {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 85%;
  animation: elvy-float 4.4s ease-in-out infinite;
}

#elvy-root.elvy-movement-off .elvy-character { animation: none; }

.elvy-three-stage,
.elvy-character-fallback { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.elvy-three-stage { z-index: 3; opacity: 0; transition: opacity .32s ease; }
.elvy-three-canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.elvy-character-fallback { z-index: 2; transition: opacity .28s ease, visibility .28s ease; }
#elvy-root.elvy-three-ready .elvy-three-stage { opacity: 1; }
#elvy-root.elvy-three-ready .elvy-character-fallback { opacity: 0; visibility: hidden; }
#elvy-root.elvy-three-ready .elvy-character { animation: none; }
#elvy-root.elvy-three-ready.elvy-movement-on:not(.elvy-chat-open)[data-state="walk"] .elvy-launcher { animation: none; }

.elvy-character svg { display: block; width: 100%; height: 100%; overflow: visible; }
.elvy-photo-model { position: relative; display: block; width: 100%; height: 100%; isolation: isolate; }
.elvy-model-image {
  position: absolute;
  z-index: 2;
  inset: -4px -5px 0;
  width: calc(100% + 10px);
  height: calc(100% + 4px);
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  transform-origin: 50% 72%;
  transition: opacity .28s ease, transform .32s ease, filter .32s ease;
}
.elvy-model-idle { opacity: 1; }
.elvy-model-smile { opacity: 0; }
.elvy-model-walk { opacity: 0; }
.elvy-photo-aura {
  position: absolute;
  z-index: 0;
  left: 15%;
  top: 12%;
  width: 70%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.34), rgba(181,15,34,.13) 48%, transparent 72%);
  filter: blur(5px);
  opacity: .62;
}
.elvy-photo-ring {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1px;
  width: 62px;
  height: 10px;
  border: 1.6px solid #ffc526;
  border-radius: 50%;
  opacity: .9;
  transform: translateX(-50%);
  box-shadow: 0 0 9px rgba(255,197,38,.42);
  animation: elvy-photo-ring 3.2s ease-in-out infinite;
}
.elvy-photo-ring.is-secondary { bottom: -3px; width: 43px; height: 7px; border-width: 1px; opacity: .34; animation-direction: reverse; }
.elvy-photo-thinking { position: absolute; z-index: 3; top: 10px; right: 18px; display: flex; gap: 4px; opacity: 0; }
.elvy-photo-thinking i { width: 5px; height: 5px; border-radius: 50%; background: #ffc526; box-shadow: 0 0 6px rgba(255,197,38,.7); }
.elvy-laugh-lines { position: absolute; z-index: 4; top: 20px; left: 11px; width: 32px; height: 30px; opacity: 0; pointer-events: none; }
.elvy-laugh-lines i { position: absolute; display: block; width: 12px; height: 5px; border-top: 2px solid #ffc526; border-radius: 50%; filter: drop-shadow(0 0 3px rgba(255,197,38,.72)); }
.elvy-laugh-lines i:nth-child(1) { left: 2px; top: 4px; transform: rotate(-24deg); }
.elvy-laugh-lines i:nth-child(2) { left: 0; top: 14px; transform: rotate(-10deg) scale(.8); }
.elvy-laugh-lines i:nth-child(3) { left: 10px; top: 23px; transform: rotate(14deg) scale(.65); }
#elvy-root[data-state="happy"] .elvy-model-idle,
#elvy-root[data-state="happy-look"] .elvy-model-idle { opacity: 0; }
#elvy-root[data-state="happy"] .elvy-model-smile,
#elvy-root[data-state="happy-look"] .elvy-model-smile { opacity: 1; transform: translateY(-2px) scale(1.025); }
#elvy-root[data-state="look"] .elvy-photo-model { animation: elvy-photo-look 1.8s ease-in-out 2; }
#elvy-root[data-state="wave"] .elvy-photo-model { animation: elvy-photo-wave .8s ease-in-out 3; }
#elvy-root[data-state="listening"] .elvy-photo-aura { animation: elvy-photo-aura 1s ease-in-out infinite; }
#elvy-root[data-state="listening"] .elvy-model-idle { transform: translateY(-2px) scale(1.018); }
#elvy-root[data-state="thinking"] .elvy-photo-thinking { opacity: 1; animation: elvy-photo-thinking 1.1s ease-in-out infinite; }
#elvy-root[data-state="thinking"] .elvy-model-idle { filter: saturate(.9) brightness(.96); }
#elvy-root[data-state="speaking"] .elvy-model-image { animation: elvy-photo-speaking .46s ease-in-out infinite alternate; }
#elvy-root[data-state="alert"] .elvy-model-image { transform: translateY(-2px) scale(1.02); }
#elvy-root[data-state="sleep"] .elvy-model-image { filter: grayscale(.55) saturate(.45); opacity: .72; }
#elvy-root[data-state="walk"] .elvy-model-idle,
#elvy-root[data-state="walk"] .elvy-model-smile { opacity: 0; }
#elvy-root[data-state="walk"] .elvy-model-walk { transition: opacity .12s linear; }
#elvy-root[data-state="walk"] .elvy-model-walk-left { animation: elvy-walk-frame-left .92s ease-in-out infinite; }
#elvy-root[data-state="walk"] .elvy-model-walk-right {
  transform: scaleX(-1);
  animation: elvy-walk-frame-right .92s ease-in-out infinite;
}
#elvy-root[data-state="walk"] .elvy-photo-model { animation: elvy-walk-hips .92s ease-in-out infinite; }
#elvy-root.elvy-movement-on:not(.elvy-chat-open)[data-state="walk"] .elvy-launcher { animation: elvy-walk-route 9.6s linear both; }
#elvy-root.elvy-side-left.elvy-movement-on:not(.elvy-chat-open)[data-state="walk"] .elvy-launcher { animation-name: elvy-walk-route-from-left; }
#elvy-root[data-state="walk"] .elvy-character { animation: elvy-walk-bob .46s ease-in-out infinite; }
#elvy-root[data-state="walk"] .elvy-photo-ring { animation-duration: .46s; }
#elvy-root[data-state="laugh"] .elvy-model-idle,
#elvy-root[data-state="dance"] .elvy-model-idle { opacity: 0; }
#elvy-root[data-state="laugh"] .elvy-model-smile,
#elvy-root[data-state="dance"] .elvy-model-smile { opacity: 1; }
#elvy-root[data-state="laugh"] .elvy-photo-model { animation: elvy-human-laugh .52s ease-in-out 5; }
#elvy-root[data-state="laugh"] .elvy-laugh-lines { opacity: 1; animation: elvy-laugh-lines .7s ease-out 3; }
#elvy-root[data-state="dance"] .elvy-photo-model { animation: elvy-human-dance .82s ease-in-out 4; }
#elvy-root[data-state="dance"] .elvy-photo-ring { animation: elvy-dance-ring .82s ease-in-out 4; }
#elvy-root[data-state="stretch"] .elvy-photo-model { animation: elvy-human-stretch 1.45s ease-in-out 2; }
.elvy-character .elvy-head { transform-origin: 64px 52px; animation: elvy-head-tilt 9s ease-in-out infinite; }
.elvy-character .elvy-eye { transform-box: fill-box; transform-origin: center; animation: elvy-blink 6.4s infinite; }
.elvy-character .elvy-pupils { animation: elvy-look 8s ease-in-out infinite; }
.elvy-character .elvy-arm-right { transform-origin: 89px 91px; }
.elvy-character .elvy-mouth-idle { opacity: 1; }
.elvy-character .elvy-mouth-talk { opacity: 0; }
.elvy-character .elvy-happy-face { opacity: 0; transform-box: fill-box; transform-origin: center; }
.elvy-character .elvy-thinking-orbit { opacity: 0; transform-origin: 64px 39px; }
.elvy-character .elvy-hover-ring { transform-origin: center; animation: elvy-ring 3.2s ease-in-out infinite; }
.elvy-character .elvy-hover-ring-secondary { transform-origin: center; animation: elvy-ring-secondary 3.2s ease-in-out infinite reverse; }
.elvy-character .elvy-torso-light { animation: elvy-soft-light 3.8s ease-in-out infinite; }
.elvy-character .elvy-sparkles { opacity: 0; transform-origin: center; }

#elvy-root[data-state="wave"] .elvy-arm-right { animation: elvy-wave .72s ease-in-out 3; }
#elvy-root[data-state="look"] .elvy-pupils { animation: elvy-look-fast 1.8s ease-in-out 2; }
#elvy-root[data-state="listening"] .elvy-hover-ring { animation: elvy-listening-ring 1s ease-in-out infinite; }
#elvy-root[data-state="listening"] .elvy-eye { transform: scaleY(1.12); animation: none; }
#elvy-root[data-state="thinking"] .elvy-thinking-orbit { opacity: 1; animation: elvy-spin 1.1s linear infinite; }
#elvy-root[data-state="thinking"] .elvy-pupils { transform: translateY(-1px); }
#elvy-root[data-state="speaking"] .elvy-mouth-idle { opacity: 0; }
#elvy-root[data-state="speaking"] .elvy-mouth-talk { opacity: 1; animation: elvy-mouth .32s ease-in-out infinite alternate; }
#elvy-root[data-state="happy"] .elvy-character { animation: elvy-happy .58s ease-in-out 2; }
#elvy-root[data-state="happy"] .elvy-pupils { opacity: 0; animation: none; }
#elvy-root[data-state="happy"] .elvy-mouth-idle { opacity: 0; }
#elvy-root[data-state="happy"] .elvy-happy-face { opacity: 1; animation: elvy-smile-pop .42s ease-out both; }
#elvy-root[data-state="happy-look"] .elvy-character { animation: elvy-happy-touch .72s ease-in-out 2; }
#elvy-root[data-state="happy-look"] .elvy-pupils { opacity: 0; animation: none; }
#elvy-root[data-state="happy-look"] .elvy-mouth-idle { opacity: 0; }
#elvy-root[data-state="happy-look"] .elvy-happy-face { opacity: 1; animation: elvy-smile-pop .42s ease-out both; }
#elvy-root[data-state="happy-look"] .elvy-happy-eyes { animation: elvy-happy-eye-look .72s ease-in-out 2; }
#elvy-root[data-state="happy-look"] .elvy-hover-ring { animation: elvy-listening-ring .72s ease-in-out 2; }
#elvy-root[data-state="happy-look"] .elvy-sparkles,
#elvy-root[data-state="happy"] .elvy-sparkles { opacity: 1; animation: elvy-sparkle-pop .9s ease-in-out 2; }
#elvy-root[data-state="happy-look"] .elvy-launcher { filter: drop-shadow(0 17px 18px rgba(38,10,14,.22)) drop-shadow(0 0 9px rgba(255,197,38,.22)); }
#elvy-root[data-state="alert"] .elvy-eye { transform: scale(1.12); animation: none; }
#elvy-root[data-state="sleep"] .elvy-eye { transform: scaleY(.08); animation: none; }
#elvy-root[data-state="sleep"] .elvy-character { animation-duration: 7s; opacity: .88; }

.elvy-status-pill {
  position: absolute;
  right: 102px;
  bottom: calc(max(65px, env(safe-area-inset-bottom)) + var(--elvy-safe-offset));
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: 220px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 197, 38, .34);
  border-radius: 16px 16px 4px 16px;
  background: rgba(18, 16, 18, .96);
  box-shadow: 0 15px 45px rgba(37, 12, 15, .18);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px) scale(.96);
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.elvy-status-pill::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(255, 197, 38, .34);
  border-right: 1px solid rgba(255, 197, 38, .34);
  background: inherit;
  transform: rotate(45deg);
}

.elvy-status-pill.is-visible { opacity: 1; transform: translate3d(var(--elvy-travel-x), 0, 0); visibility: visible; }
.elvy-status-dismiss { border: 0; background: transparent; color: #ffc526; padding: 0; cursor: pointer; line-height: 1; }
.elvy-intro-actions { display: none; grid-column: 1 / -1; grid-template-columns: repeat(3, auto); gap: 5px; width: 100%; }
.elvy-status-pill.is-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; max-width: min(320px, calc(100vw - 132px)); padding: 13px; }
.elvy-status-pill.is-intro .elvy-intro-actions { display: grid; }
.elvy-intro-actions button {
  min-height: 30px;
  border: 1px solid rgba(255, 197, 38, .34);
  border-radius: 9px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
}
.elvy-intro-actions button:first-child { border-color: #ffc526; background: #ffc526; color: #1d1608; }
.elvy-intro-actions button:hover { border-color: #ffc526; }
#elvy-root.elvy-side-left .elvy-status-pill { right: auto; left: 102px; border-radius: 16px 16px 16px 4px; }
#elvy-root.elvy-side-left .elvy-status-pill::after { right: auto; left: -7px; border: 0; border-bottom: 1px solid rgba(255, 197, 38, .34); border-left: 1px solid rgba(255, 197, 38, .34); }

.elvy-panel {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(max(28px, env(safe-area-inset-bottom)) + 142px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(404px, calc(100vw - 32px));
  height: min(650px, calc(100dvh - 180px));
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(103, 15, 27, .16);
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 28px 90px rgba(31, 8, 12, .28), 0 3px 18px rgba(31, 8, 12, .1);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.975);
  transform-origin: 90% 100%;
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
}

#elvy-root.elvy-side-left .elvy-panel { right: auto; left: max(24px, env(safe-area-inset-left)); transform-origin: 10% 100%; }
#elvy-root.elvy-chat-open .elvy-panel { opacity: 1; visibility: visible; transform: none; }
#elvy-root.elvy-chat-open .elvy-status-pill { opacity: 0; visibility: hidden; }
#elvy-root.elvy-minimized .elvy-panel { opacity: 0; visibility: hidden; transform: translateY(18px) scale(.975); }

.elvy-panel-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 197, 38, .18), transparent 25%),
    linear-gradient(135deg, #b80f24 0%, #d7192c 58%, #9b0b1d 100%);
}

.elvy-header-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(242, 189, 53, .44);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #dcd6d2);
  box-shadow: inset 0 -7px 12px rgba(57, 18, 23, .15);
}

.elvy-header-avatar > img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: 50% 18%; }

.elvy-header-avatar .elvy-mini-face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 30px;
  border-radius: 48% 48% 44% 44%;
  background: linear-gradient(135deg, #fff8f3, #dfbeb5);
  border: 3px solid #bd1025;
  box-shadow: inset 0 3px 4px rgba(255,255,255,.68);
}
.elvy-header-avatar .elvy-mini-face i {
  width: 4px;
  height: 4px;
  border: 1px solid #8f4a46;
  border-radius: 50%;
  background: #ffc526;
}
.elvy-header-avatar .elvy-mini-face b {
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 7px;
  height: 3px;
  border-bottom: 1.5px solid #b80f24;
  border-radius: 50%;
  transform: translateX(-50%);
}

.elvy-header-copy { min-width: 0; flex: 1; }
.elvy-header-copy strong { display: block; font-size: 16px; letter-spacing: .12em; }
.elvy-header-copy small { display: block; margin-top: 1px; color: rgba(255,255,255,.72); font-size: 11px; }
.elvy-online { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; color: #f9df91; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.elvy-online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--elvy-gold); box-shadow: 0 0 0 3px rgba(242,189,53,.13); }
.elvy-header-actions { display: flex; align-items: center; gap: 5px; }
.elvy-icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.elvy-icon-button:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.elvy-icon-button:focus-visible,
.elvy-quick-action:focus-visible,
.elvy-send:focus-visible,
.elvy-settings-control:focus-visible,
.elvy-brief-action:focus-visible { outline: 3px solid var(--elvy-gold); outline-offset: 2px; }
.elvy-icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.elvy-messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 10px;
  background:
    linear-gradient(rgba(181, 15, 34, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 15, 34, .025) 1px, transparent 1px),
    #fffdf9;
  background-size: 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(114, 8, 23, .28) transparent;
}

.elvy-message { display: flex; gap: 8px; margin: 0 0 14px; animation: elvy-message-in .24s ease both; }
.elvy-message.is-user { justify-content: flex-end; }
.elvy-message-avatar {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  margin-top: 2px;
  border-radius: 9px;
  background: #fff url("../assets/images/elvy-model-avatar.webp") center 18% / cover no-repeat;
  color: transparent;
  font-size: 8px;
  font-weight: 900;
}
.elvy-message-body { max-width: 82%; }
.elvy-message-bubble {
  padding: 10px 12px;
  border: 1px solid rgba(110, 35, 44, .11);
  border-radius: 5px 16px 16px 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(53, 19, 23, .07);
  color: #38292b;
  font-size: 13px;
  line-height: 1.52;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.elvy-message.is-user .elvy-message-bubble { border: 0; border-radius: 16px 16px 5px 16px; background: linear-gradient(135deg, #ffd34d, #ffb900); color: #211a0b; box-shadow: 0 8px 20px rgba(184, 116, 0, .16); }
.elvy-message.is-error .elvy-message-bubble { border-color: rgba(181, 15, 34, .28); background: #fff1f2; color: #7d1220; }
.elvy-message-time { display: block; margin-top: 4px; padding: 0 3px; color: #9b8d8f; font-size: 9px; }
.elvy-message.is-user .elvy-message-time { text-align: right; }
.elvy-message-bubble a { color: #8b0d20; font-weight: 800; text-underline-offset: 2px; }
.elvy-message-bubble p { margin: 0; }
.elvy-message-bubble p + p { margin-top: 7px; }

.elvy-typing { display: inline-flex; gap: 4px; align-items: center; height: 13px; }
.elvy-typing i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #9a6c72; animation: elvy-dot 1s ease-in-out infinite; }
.elvy-typing i:nth-child(2) { animation-delay: .14s; }
.elvy-typing i:nth-child(3) { animation-delay: .28s; }

.elvy-cards { display: grid; gap: 7px; margin-top: 9px; }
.elvy-card {
  display: block;
  padding: 10px;
  border: 1px solid rgba(181, 15, 34, .14);
  border-radius: 11px;
  background: linear-gradient(135deg, #fff, #fff9f2);
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.elvy-card:hover { border-color: rgba(181, 15, 34, .45); transform: translateY(-1px); }
.elvy-card strong { display: block; color: #6d0b19; font-size: 11px; }
.elvy-card small { display: block; margin-top: 2px; color: #77676a; font-size: 10px; }

.elvy-brief { margin-top: 9px; padding: 12px; border: 1px solid rgba(181, 15, 34, .18); border-radius: 13px; background: #fffaf3; }
.elvy-brief h4 { margin: 0 0 8px; color: #750b1a; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.elvy-brief dl { display: grid; grid-template-columns: 82px 1fr; gap: 5px 8px; margin: 0; font-size: 10px; }
.elvy-brief dt { color: #8b787b; font-weight: 700; }
.elvy-brief dd { margin: 0; color: #312326; font-weight: 650; overflow-wrap: anywhere; }
.elvy-brief-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.elvy-brief-action { border: 0; border-radius: 9px; padding: 8px 10px; background: #791020; color: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }
.elvy-brief-action.is-secondary { border: 1px solid rgba(121,16,32,.22); background: #fff; color: #791020; }

.elvy-quick-actions { display: flex; gap: 7px; padding: 9px 14px 8px; overflow-x: auto; border-top: 1px solid rgba(80, 24, 31, .08); background: #fffdf9; scrollbar-width: none; }
.elvy-quick-actions::-webkit-scrollbar { display: none; }
.elvy-quick-action { flex: 0 0 auto; border: 1px solid rgba(225,157,0,.46); border-radius: 999px; padding: 7px 10px; background: #fff; color: #34280b; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: color .18s ease, background .18s ease; }
.elvy-quick-action:hover { background: #ffc526; color: #1b160b; }

.elvy-composer-wrap { border-top: 1px solid rgba(80, 24, 31, .09); background: #fff; }
.elvy-listening-status { display: none; align-items: center; gap: 7px; padding: 7px 14px 0; color: #74101f; font-size: 10px; font-weight: 750; }
.elvy-listening-status.is-visible { display: flex; }
.elvy-listening-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--elvy-red); animation: elvy-listen-dot 1s ease infinite; }
.elvy-composer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 7px; padding: 10px 12px 8px; }
.elvy-composer .elvy-mic {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(121,16,32,.16);
  border-radius: 12px;
  background: #fff9f4;
  color: #791020;
  cursor: pointer;
}
.elvy-composer .elvy-mic[aria-pressed="true"] { background: #791020; color: #fff; animation: elvy-listening-ring 1s ease infinite; }
.elvy-composer .elvy-mic:disabled { opacity: .4; cursor: not-allowed; }
.elvy-composer .elvy-mic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.elvy-input {
  width: 100%;
  max-height: 94px;
  min-height: 39px;
  resize: none;
  border: 1px solid rgba(121,16,32,.15);
  border-radius: 12px;
  padding: 10px 11px;
  background: #fff;
  color: #2e2224;
  outline: 0;
  font-size: 12px;
  line-height: 1.4;
}
.elvy-input:focus { border-color: rgba(181,15,34,.62); box-shadow: 0 0 0 3px rgba(181,15,34,.08); }
.elvy-input::placeholder { color: #aa9b9d; }
.elvy-send { display: grid; place-items: center; width: 39px; height: 39px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #ffd447, #ffb900); color: #241b08; cursor: pointer; box-shadow: 0 6px 15px rgba(181,115,0,.22); }
.elvy-send:disabled { opacity: .45; cursor: default; }
.elvy-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.elvy-composer-note { display: flex; justify-content: space-between; gap: 8px; padding: 0 14px 9px; color: #9a8d8f; font-size: 9px; }

.elvy-settings {
  position: absolute;
  inset: 78px 0 0;
  z-index: 4;
  padding: 18px;
  overflow-y: auto;
  background: rgba(255,253,249,.985);
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.elvy-settings.is-open { opacity: 1; visibility: visible; transform: none; }
.elvy-settings h3 { margin: 0; color: #40151b; font-size: 17px; }
.elvy-settings > p { margin: 4px 0 18px; color: #826f72; font-size: 11px; }
.elvy-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 50px; border-bottom: 1px solid rgba(71,25,31,.08); color: #3d2c2f; font-size: 12px; font-weight: 700; }
.elvy-switch { position: relative; display: inline-flex; width: 44px; height: 24px; flex: 0 0 auto; }
.elvy-switch input { position: absolute; opacity: 0; pointer-events: none; }
.elvy-switch span { width: 100%; border-radius: 999px; background: #ddd3d4; cursor: pointer; transition: background .18s ease; }
.elvy-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.2); transition: transform .18s ease; }
.elvy-switch input:checked + span { background: #8d1021; }
.elvy-switch input:checked + span::after { transform: translateX(20px); }
.elvy-switch input:focus-visible + span { outline: 3px solid var(--elvy-gold); outline-offset: 2px; }
.elvy-settings select { min-width: 108px; border: 1px solid rgba(121,16,32,.16); border-radius: 9px; padding: 7px 9px; background: #fff; color: #3d2c2f; font-size: 11px; }
.elvy-reset { width: 100%; margin-top: 18px; border: 1px solid rgba(142,15,33,.22); border-radius: 11px; padding: 10px; background: #fff; color: #811020; font-size: 11px; font-weight: 800; cursor: pointer; }
.elvy-update-knowledge + .elvy-reset { margin-top: 8px; }
.elvy-reset:disabled { opacity: .55; cursor: wait; }
.elvy-privacy-note { margin-top: 13px !important; color: #95878a !important; font-size: 9px !important; }

.elvy-waveform { display: none; align-items: center; gap: 2px; width: 20px; height: 12px; margin-left: 7px; vertical-align: middle; }
#elvy-root[data-state="speaking"] .elvy-waveform { display: inline-flex; }
.elvy-waveform i { width: 2px; height: 5px; border-radius: 2px; background: currentColor; animation: elvy-waveform .48s ease-in-out infinite alternate; }
.elvy-waveform i:nth-child(2) { animation-delay: .1s; }
.elvy-waveform i:nth-child(3) { animation-delay: .2s; }
.elvy-waveform i:nth-child(4) { animation-delay: .3s; }

@keyframes elvy-float { 0%,100% { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-8px) rotate(.4deg); } }
@keyframes elvy-photo-ring { 0%,100% { transform: translateX(-50%) scaleX(1); opacity: .56; } 50% { transform: translateX(-50%) scaleX(.78); opacity: 1; } }
@keyframes elvy-photo-look { 0%,100% { transform: rotate(0) translateX(0); } 35% { transform: rotate(-1.8deg) translateX(-2px); } 70% { transform: rotate(1.8deg) translateX(2px); } }
@keyframes elvy-photo-wave { 0%,100% { transform: rotate(0); } 45% { transform: rotate(-1.8deg) translateY(-3px); } 72% { transform: rotate(1deg) translateY(-1px); } }
@keyframes elvy-photo-aura { 0%,100% { opacity: .42; transform: scale(.94); } 50% { opacity: .88; transform: scale(1.08); } }
@keyframes elvy-photo-thinking { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes elvy-photo-speaking { from { transform: translateY(0) scale(1); } to { transform: translateY(-2px) scale(1.012); } }
@keyframes elvy-walk-frame-left {
  0%,38%,100% { opacity: 1; }
  50%,88% { opacity: 0; }
}
@keyframes elvy-walk-frame-right {
  0%,38%,100% { opacity: 0; }
  50%,88% { opacity: 1; }
}
@keyframes elvy-walk-hips {
  0%,100% { transform: translateX(-1px) rotate(-.7deg); }
  50% { transform: translateX(1px) rotate(.7deg); }
}
@keyframes elvy-walk-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes elvy-walk-route {
  0% { transform: translateX(0) rotateY(0); }
  45% { transform: translateX(max(-520px, -44vw)) rotateY(0); }
  48% { transform: translateX(max(-520px, -44vw)) rotateY(90deg); }
  51% { transform: translateX(max(-520px, -44vw)) rotateY(180deg); }
  95% { transform: translateX(0) rotateY(180deg); }
  98% { transform: translateX(0) rotateY(270deg); }
  100% { transform: translateX(0) rotateY(360deg); }
}
@keyframes elvy-walk-route-from-left {
  0% { transform: translateX(0) rotateY(180deg); }
  45% { transform: translateX(min(520px, 44vw)) rotateY(180deg); }
  48% { transform: translateX(min(520px, 44vw)) rotateY(270deg); }
  51% { transform: translateX(min(520px, 44vw)) rotateY(360deg); }
  95%,100% { transform: translateX(0) rotateY(360deg); }
}
@keyframes elvy-human-laugh { 0%,100% { transform: translateY(0) rotate(0) scale(1); } 34% { transform: translateY(-5px) rotate(-1.2deg) scale(1.025); } 68% { transform: translateY(-2px) rotate(1deg) scale(1.012); } }
@keyframes elvy-laugh-lines { 0% { opacity: 0; transform: translate(7px, 7px) scale(.45); } 35%,72% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(-5px, -7px) scale(1.15); } }
@keyframes elvy-human-dance { 0%,100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-5px, -5px) rotate(-3deg); } 50% { transform: translate(0, -8px) rotate(0); } 75% { transform: translate(5px, -5px) rotate(3deg); } }
@keyframes elvy-dance-ring { 0%,100% { transform: translateX(-50%) scaleX(.82); opacity: .65; } 50% { transform: translateX(-50%) scaleX(1.12); opacity: 1; } }
@keyframes elvy-human-stretch { 0%,100% { transform: translateY(0) scaleY(1); } 42%,65% { transform: translateY(-7px) scaleY(1.04); } }
@keyframes elvy-head-tilt { 0%,68%,100% { transform: rotate(0); } 74%,83% { transform: rotate(-4deg); } 89% { transform: rotate(2deg); } }
@keyframes elvy-blink { 0%,44%,48%,100% { transform: scaleY(1); } 46% { transform: scaleY(.08); } }
@keyframes elvy-look { 0%,28%,100% { transform: translateX(0); } 36%,52% { transform: translateX(-2px); } 64%,80% { transform: translateX(2px); } }
@keyframes elvy-look-fast { 0%,100% { transform: translateX(0); } 30% { transform: translateX(-3px); } 70% { transform: translateX(3px); } }
@keyframes elvy-wave { 0%,100% { transform: rotate(0); } 45% { transform: rotate(-31deg) translate(-2px, -2px); } 70% { transform: rotate(-14deg); } }
@keyframes elvy-ring { 0%,100% { transform: scaleX(1); opacity: .72; } 50% { transform: scaleX(.84); opacity: 1; } }
@keyframes elvy-ring-secondary { 0%,100% { transform: scaleX(.88); opacity: .25; } 50% { transform: scaleX(1.05); opacity: .5; } }
@keyframes elvy-soft-light { 0%,100% { opacity: .45; } 50% { opacity: .9; } }
@keyframes elvy-listening-ring { 0%,100% { transform: scale(1); filter: drop-shadow(0 0 1px rgba(242,189,53,.4)); } 50% { transform: scale(1.12); filter: drop-shadow(0 0 7px rgba(242,189,53,.9)); } }
@keyframes elvy-spin { to { transform: rotate(360deg); } }
@keyframes elvy-mouth { from { transform: scaleY(.65); } to { transform: scaleY(1.35); } }
@keyframes elvy-happy { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-10px) scale(1.03); } }
@keyframes elvy-happy-touch { 0%,100% { transform: translateY(0) rotate(0) scale(1); } 35% { transform: translateY(-8px) rotate(-2deg) scale(1.035); } 70% { transform: translateY(-4px) rotate(2deg) scale(1.02); } }
@keyframes elvy-smile-pop { 0% { opacity: 0; transform: translateY(2px) scale(.35,.2); } 70% { opacity: 1; transform: translateY(-1px) scale(1.12,1.08); } 100% { opacity: 1; transform: none; } }
@keyframes elvy-happy-eye-look { 0%,100% { transform: translateX(0); } 28% { transform: translateX(-2.5px); } 68% { transform: translateX(2.5px); } }
@keyframes elvy-sparkle-pop { 0%,100% { opacity: 0; transform: scale(.75) rotate(-4deg); } 35%,70% { opacity: 1; transform: scale(1.08) rotate(3deg); } }
@keyframes elvy-message-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes elvy-dot { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes elvy-listen-dot { 0%,100% { box-shadow: 0 0 0 0 rgba(181,15,34,.4); } 50% { box-shadow: 0 0 0 5px rgba(181,15,34,0); } }
@keyframes elvy-waveform { from { height: 3px; } to { height: 11px; } }

@media (max-width: 640px) {
  .elvy-launcher { right: max(10px, env(safe-area-inset-right)); bottom: calc(max(10px, env(safe-area-inset-bottom)) + var(--elvy-safe-offset)); width: 84px; height: 108px; }
  #elvy-root.elvy-side-left .elvy-launcher { left: max(10px, env(safe-area-inset-left)); }
  .elvy-status-pill { right: 73px; bottom: calc(max(43px, env(safe-area-inset-bottom)) + var(--elvy-safe-offset)); max-width: min(190px, calc(100vw - 108px)); padding: 9px 11px; font-size: 10px; }
  .elvy-status-pill.is-intro { max-width: min(250px, calc(100vw - 102px)); }
  .elvy-intro-actions { grid-template-columns: 1fr; }
  #elvy-root.elvy-side-left .elvy-status-pill { left: 73px; }
  .elvy-panel,
  #elvy-root.elvy-side-left .elvy-panel {
    inset: auto max(10px, env(safe-area-inset-right)) calc(max(14px, env(safe-area-inset-bottom)) + 98px) max(10px, env(safe-area-inset-left));
    width: auto;
    height: min(72dvh, 620px);
    min-height: 400px;
    border-radius: 20px;
    transform-origin: 90% 100%;
  }
  #elvy-root.elvy-chat-open .elvy-launcher { opacity: .38; transform: scale(.88); }
  #elvy-root.elvy-chat-open[data-state="happy-look"] .elvy-launcher { opacity: 1; transform: translateY(-3px) scale(1); }
  .elvy-panel-header { min-height: 69px; padding: 10px 12px; }
  .elvy-header-avatar { width: 43px; height: 43px; flex-basis: 43px; }
  .elvy-settings { inset-block-start: 69px; }
  .elvy-message-body { max-width: 86%; }
  .elvy-messages { padding-inline: 12px; }
}

@media (max-height: 620px) and (min-width: 641px) {
  .elvy-panel { bottom: 18px; height: calc(100dvh - 36px); min-height: 0; }
  #elvy-root.elvy-chat-open .elvy-launcher { opacity: .18; }
}

@media (prefers-reduced-motion: reduce) {
  #elvy-root *, #elvy-root *::before, #elvy-root *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print { #elvy-root { display: none !important; } }
