:root {
  --navy-0: #050a16;
  --navy-1: #0a1530;
  --navy-2: #0e1c3d;
  --ink: #eef3ff;
  --ink-dim: #9fb0d6;

  --c-ready: #3f7ff2;
  --c-ready-soft: #9fc0ff;
  --c-listening: #f2a93b;
  --c-listening-soft: #ffd699;
  --c-processing: #8b7cf6;
  --c-processing-soft: #c9c0fb;
  --c-answering: #1fd6c0;
  --c-answering-soft: #a8f5ea;
  --c-error: #f2555a;
  --c-error-soft: #ffb3b6;
  --c-offline: #5b6b8c;
  --c-offline-soft: #aab6cf;

  --accent: var(--c-ready);
  --accent-soft: var(--c-ready-soft);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--navy-0);
  font-family: "Inter", sans-serif;
  overflow: hidden;
  color: var(--ink);
}
body.state-ready {
  --accent: var(--c-ready);
  --accent-soft: var(--c-ready-soft);
}
body.state-listening {
  --accent: var(--c-listening);
  --accent-soft: var(--c-listening-soft);
}
body.state-processing {
  --accent: var(--c-processing);
  --accent-soft: var(--c-processing-soft);
}
body.state-answering {
  --accent: var(--c-answering);
  --accent-soft: var(--c-answering-soft);
}
body.state-error {
  --accent: var(--c-error);
  --accent-soft: var(--c-error-soft);
}
body.state-offline {
  --accent: var(--c-offline);
  --accent-soft: var(--c-offline-soft);
}
.screen {
  position: relative;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 36px 40px 28px;
  background:
    radial-gradient(
      ellipse 60% 45% at 50% 34%,
      color-mix(in srgb, var(--accent) 22%, transparent),
      transparent 70%
    ),
    linear-gradient(180deg, var(--navy-1) 0%, var(--navy-0) 55%, #030612 100%);
  transition: background 900ms ease;
}
.dotgrid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1.4px
  );
  background-size: 26px 26px;
  mask-image: radial-gradient(
    ellipse 70% 60% at 50% 40%,
    black 20%,
    transparent 75%
  );
}

.topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-name {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
  transition:
    background 600ms ease,
    box-shadow 600ms ease;
}
.brand-sub {
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 500;
}
.clock-wrap {
  text-align: right;
}
.clock {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.date {
  font-size: 12px;
  color: var(--ink-dim);
  margin-top: 2px;
}

.stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: min(94vw, 980px);
  margin-top: -10px;
}
.face-media {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(94vw, 980px);
  height: min(65vh, 510px);
  min-height: 0;
  padding: 0;
  transition:
    border-color 600ms ease,
    box-shadow 600ms ease;
}
.asti-face {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  overflow: visible;
  object-fit: contain;
  color: var(--accent);
  transition: filter 600ms ease;
}
.robot-hardware {
  filter: url(#smallGlow);
}
.robot-body-motion {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: robotBreathing 5.4s ease-in-out infinite;
}
.robot-arm-gesture {
  transform-box: fill-box;
  transform-origin: 50% 8%;
  animation: robotArmSway 5.4s ease-in-out infinite;
}
.robot-arm-gesture-left {
  transform-origin: 90% 8%;
  animation-delay: -2.7s;
}
.robot-arm-gesture-right {
  transform-origin: 10% 8%;
}
.robot-waving-hand {
  transform-box: fill-box;
  transform-origin: 24% 16%;
}
.answer-bubble {
  position: absolute;
  z-index: 4;
  top: 43%;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: clamp(280px, 30vw, 390px);
  max-height: min(300px, 40vh);
  overflow: visible;
  padding: 16px 18px 17px;
  border: 1px solid
    color-mix(in srgb, var(--accent-soft) 48%, rgba(255, 255, 255, 0.18));
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(
    145deg,
    rgba(20, 47, 75, 0.97),
    rgba(7, 17, 35, 0.96)
  );
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 28px color-mix(in srgb, var(--accent) 25%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transform-origin: 100% 100%;
  transition:
    opacity 260ms ease,
    transform 320ms ease,
    visibility 260ms ease,
    border-color 500ms ease,
    box-shadow 500ms ease;
}
.answer-bubble::before {
  position: absolute;
  top: 0;
  left: 18px;
  width: 64px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-soft),
    transparent
  );
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
  content: "";
}
.answer-bubble::after {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid color-mix(in srgb, var(--accent-soft) 72%, transparent);
  border-bottom: 1px solid
    color-mix(in srgb, var(--accent-soft) 72%, transparent);
  background: #0a192f;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}
.answer-bubble__header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.answer-bubble__status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 78%, transparent);
  animation: answerStatusPulse 1.5s ease-in-out infinite;
}
.answer-bubble__label {
  color: var(--accent-soft);
  font:
    700 11px "Sora",
    sans-serif;
  letter-spacing: 0.7px;
  white-space: nowrap;
}
.answer-bubble__label span {
  margin-left: 3px;
  color: #e8f4ff;
  font-size: 9px;
  letter-spacing: 1px;
}
.answer-bubble__voice {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
  margin-left: auto;
  color: var(--accent-soft);
}
.answer-bubble__voice i {
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  animation: answerVoiceBars 650ms ease-in-out infinite alternate;
}
.answer-bubble__voice i:nth-child(2) {
  height: 11px;
  animation-delay: 140ms;
}
.answer-bubble__voice i:nth-child(3) {
  height: 7px;
  animation-delay: 280ms;
}
.answer-bubble__text {
  max-height: min(230px, 32vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-right: 6px;
  padding-top: 9px;
  border-top: 1px solid rgba(210, 230, 255, 0.12);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
  scrollbar-color: color-mix(in srgb, var(--accent) 55%, transparent)
    transparent;
  scrollbar-width: thin;
}
body.state-answering .answer-bubble.is-speaking {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}


@keyframes answerStatusPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}
@keyframes answerVoiceBars {
  from {
    transform: scaleY(0.55);
  }
  to {
    transform: scaleY(1.25);
  }
}
.robot-ear,
.robot-neck,
.robot-base {
  fill: #8fa8cd;
  stroke: #e3edff;
  stroke-width: 3;
}
.robot-arm {
  fill: #aebdd6;
  stroke: #e0ebff;
  stroke-width: 5;
  stroke-linejoin: round;
}
.robot-torso {
  fill: #b9c8df;
  stroke: #f0f6ff;
  stroke-width: 5;
  stroke-linejoin: round;
}
.robot-arm-joint {
  fill: #54749f;
  stroke: #d7e6ff;
  stroke-width: 4;
}
.robot-hand {
  fill: #e2e9f4;
  stroke: #eff5ff;
  stroke-width: 5;
  stroke-linejoin: round;
}
.robot-finger {
  fill: none;
  stroke: #294a79;
  stroke-width: 3;
  stroke-linecap: round;
}
.robot-shoulder {
  fill: #c8d5e8;
  stroke: #f1f6ff;
  stroke-width: 4;
  stroke-linejoin: round;
}
.robot-arm-plate {
  fill: #7894bd;
  stroke: #e4edff;
  stroke-width: 2;
  stroke-linejoin: round;
}
.robot-hand-detail {
  fill: none;
  stroke: #49658f;
  stroke-width: 3;
  stroke-linecap: round;
}
.robot-joint-light {
  fill: var(--accent-soft);
  filter: url(#smallGlow);
}
.robot-chest-panel {
  fill: #31578c;
  stroke: #bfd8ff;
  stroke-width: 4;
}
.robot-chest-line {
  fill: none;
  stroke: color-mix(in srgb, var(--accent-soft) 72%, transparent);
  stroke-width: 3;
  stroke-linecap: round;
}
.robot-chest-light {
  fill: var(--accent-soft);
  filter: url(#smallGlow);
}
@keyframes robotBreathing {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(-1.5px) scaleY(1.008);
  }
}
@keyframes robotArmSway {
  0%,
  100% {
    transform: rotate(-0.55deg);
  }
  50% {
    transform: rotate(0.55deg);
  }
}
.asti-face.expression-idle .robot-arm-gesture-right {
  animation: greetingArm 5.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.asti-face.expression-idle .robot-waving-hand {
  animation: greetingHandWave 1.35s cubic-bezier(0.42, 0, 0.58, 1) infinite
    alternate;
}
@keyframes greetingArm {
  0%,
  100% {
    transform: rotate(-4deg) translateY(-1px);
  }
  28% {
    transform: rotate(-24deg) translateY(-7px);
  }
  44% {
    transform: rotate(-29deg) translateY(-9px);
  }
  64% {
    transform: rotate(-29deg) translateY(-8px);
  }
  86% {
    transform: rotate(-7deg) translateY(-2px);
  }
}
@keyframes greetingHandWave {
  from {
    transform: rotate(-7deg);
  }
  to {
    transform: rotate(8deg);
  }
}
.asti-face.expression-speaking .robot-body-motion {
  animation: answeringBodyMotion 1.8s ease-in-out infinite;
}
.asti-face.expression-speaking .robot-arm-gesture-left {
  animation: answerCounterGesture 2.8s ease-in-out infinite;
}
.asti-face.expression-speaking .robot-arm-gesture-right {
  animation: answerPresentGesture 2.8s ease-in-out infinite;
}
@keyframes answeringBodyMotion {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(-3px) scaleY(1.012);
  }
}
@keyframes answerPresentGesture {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  32% {
    transform: rotate(-12deg) translateY(-5px);
  }
  58% {
    transform: rotate(-8deg) translateY(-3px);
  }
  78% {
    transform: rotate(2deg) translateY(0);
  }
}
@keyframes answerCounterGesture {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  35% {
    transform: rotate(2.8deg) translateY(-2px);
  }
  62% {
    transform: rotate(-0.8deg) translateY(0);
  }
}
.robot-ear-light,
.robot-top-light {
  fill: var(--accent);
  filter: url(#smallGlow);
  transition: fill 600ms ease;
}
.robot-top {
  fill: color-mix(in srgb, var(--navy-0) 92%, var(--accent));
  stroke: color-mix(in srgb, var(--accent-soft) 60%, transparent);
  stroke-width: 2;
}
.face-panel {
  fill: color-mix(in srgb, var(--navy-0) 92%, var(--accent));
  stroke: color-mix(in srgb, var(--accent-soft) 45%, transparent);
  stroke-width: 2;
  box-shadow: inset 0 0 20px var(--accent);
}
.face-outline {
  fill: color-mix(in srgb, var(--navy-2) 72%, var(--accent));
  stroke: color-mix(in srgb, var(--accent-soft) 82%, white 10%);
  stroke-width: 4;
  opacity: 0.96;
  vector-effect: non-scaling-stroke;
}
.face-features {
  transform-origin: center;
}
.brows path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 11;
  stroke-linecap: round;
  transition:
    d 360ms ease,
    transform 360ms ease;
}
.eye-glow {
  fill: var(--accent);
  opacity: 0.34;
  transform-box: fill-box;
  transform-origin: center;
  transform: translateY(var(--eye-y, 0px)) scale(1, var(--eye-scale-y, 1));
  transition:
    rx 360ms ease,
    ry 360ms ease,
    opacity 360ms ease;
}
.eye-core {
  fill: var(--c-ready);
  stroke: var(--accent-soft);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  transform: translateY(var(--eye-y, 0px))
    scale(var(--eye-scale, 1), var(--eye-scale-y, 1));
  transition: transform 360ms ease;
}
.eye-iris {
  fill: #39b9ff;
  stroke: #8ce4ff;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(
      calc(var(--look-x, 0px) + var(--thinking-x, 0px)),
      calc(var(--look-y, 0px) + var(--thinking-y, 0px))
    )
    scale(var(--eye-scale, 1), var(--eye-scale-y, 1));
  transition:
    transform 180ms ease,
    fill 500ms ease;
}
.eye-pupil {
  fill: #07152f;
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(
      calc(var(--look-x, 0px) + var(--thinking-x, 0px)),
      calc(var(--look-y, 0px) + var(--thinking-y, 0px))
    )
    scale(var(--eye-scale, 1), var(--eye-scale-y, 1));
  transition: transform 180ms ease;
}
.eye-highlight {
  fill: white;
  opacity: 0.86;
}
.cheeks circle {
  fill: var(--accent-soft);
  opacity: 0.3;
  transition:
    opacity 360ms ease,
    transform 360ms ease;
}
.mouth-shape {
  display: none;
  fill: none;
  stroke: var(--ink);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}
.mouth-shape.is-active {
  display: block;
  animation: mouthArrive 220ms ease both;
}
#mouthOpen {
  fill: #22c7ff;
  stroke: #a2f2ff;
  stroke-width: 7;
}
#mouthSurprised {
  fill: color-mix(in srgb, var(--navy-0) 88%, var(--accent));
  stroke: var(--accent-soft);
}
#mouthSmile,
#mouthMedium {
  stroke: #38c8ff;
  filter: url(#smallGlow);
}
.face-status circle {
  fill: var(--accent-soft);
  transition: fill 500ms ease;
}
.face-ambient {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid color-mix(in srgb, var(--accent-soft) 65%, transparent);
  border-radius: 50%;
  opacity: 0.7;
  animation: ambientFloat 5s ease-in-out infinite;
}
.face-ambient--one {
  top: 16%;
  left: 14%;
}
.face-ambient--two {
  right: 13%;
  bottom: 20%;
  animation-delay: -2.2s;
}

.expression-idle .face-features {
  animation: idleFloat 4.8s ease-in-out infinite;
}
.expression-listening .eye-core {
  --eye-y: 7px;
  --eye-scale-y: 0.78;
}
.expression-listening .eye {
  --eye-y: 7px;
  --eye-scale-y: 0.78;
}
.expression-listening .eye-iris,
.expression-listening .eye-pupil {
  --eye-scale-y: 0.86;
  --look-y: 5px;
}
.expression-listening .eye-glow {
  opacity: 0.52;
}
.expression-listening .browLeft {
  transform: translateY(8px) rotate(5deg);
}
.expression-listening .browRight {
  transform: translateY(8px) rotate(-5deg);
}
.expression-thinking .eye-left {
  --thinking-x: 5px;
  --thinking-y: -7px;
  animation: thinkingGaze 3.8s ease-in-out infinite;
}
.expression-thinking .eye-right {
  --thinking-x: 5px;
  --thinking-y: -7px;
  animation: thinkingGaze 3.8s ease-in-out infinite reverse;
}
.expression-thinking .browLeft {
  transform: translate(12px, 9px) rotate(10deg);
}
.expression-thinking .browRight {
  transform: translate(-12px, 9px) rotate(-10deg);
}
.expression-thinking .face-features {
  animation: thinkingFocus 3.8s ease-in-out infinite;
}
.expression-thinking #mouthSmall {
  animation: thinkingMouth 2.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.asti-face.expression-speaking .face-status {
  animation: statusPulse 520ms ease-in-out infinite alternate;
}
.asti-face.expression-speaking #mouthOpen {
  animation: speakingMouth 520ms ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.asti-face.expression-speaking .face-outline {
  opacity: 1;
}
.asti-face.expression-speaking .robot-top-light,
.asti-face.expression-speaking .robot-ear-light {
  animation: hardwarePulse 520ms ease-in-out infinite alternate;
}
.expression-happy .eye-core {
  --eye-scale-y: 0.62;
}
.expression-happy .eye {
  --eye-scale-y: 0.62;
}
.expression-happy .eye-iris,
.expression-happy .eye-pupil {
  --eye-scale-y: 0.72;
}
.expression-happy .brows path {
  transform: translateY(-8px);
}
.expression-happy .cheeks circle {
  opacity: 0.75;
  transform: scale(1.35);
}
.expression-happy .face-features {
  animation: happyBounce 1.6s ease-in-out infinite;
}
.expression-surprised .eye-core {
  --eye-scale: 1.28;
  --eye-scale-y: 1.28;
}
.expression-surprised .eye {
  --eye-scale: 1.28;
  --eye-scale-y: 1.28;
}
.expression-surprised .eye-iris,
.expression-surprised .eye-pupil {
  --eye-scale: 1.15;
}
.expression-surprised .eye-glow {
  opacity: 0.62;
}
.expression-surprised .brows path {
  transform: translateY(-18px);
}
.expression-surprised .face-features {
  animation: surprisedPop 520ms ease both;
}
.expression-confused .browLeft {
  transform: translateY(-17px) rotate(-12deg);
}
.expression-confused .browRight {
  transform: translateY(7px) rotate(8deg);
}
.expression-confused .eye-left {
  --eye-y: 3px;
}
.expression-confused .eye-right {
  --eye-y: -2px;
}
.expression-sleepy .eye-core {
  --eye-y: 15px;
  --eye-scale-y: 0.34;
}
.expression-sleepy .eye {
  --eye-y: 15px;
  --eye-scale-y: 0.34;
}
.expression-sleepy .eye-iris,
.expression-sleepy .eye-pupil {
  --look-y: 12px;
  --eye-scale-y: 0.45;
}
.expression-sleepy .eye-glow {
  opacity: 0.18;
}
.expression-sleepy .brows path {
  transform: translateY(8px);
}
.expression-sleepy .face-features {
  animation: sleepyFloat 6s ease-in-out infinite;
}
.is-blinking .eye-core,
.is-blinking .eye-glow,
.is-blinking-double .eye-core,
.is-blinking-double .eye-glow {
  --eye-scale-y: 0.08;
}
.is-blinking .eye,
.is-blinking-double .eye {
  --eye-scale-y: 0.08;
}
.is-blinking .eye-iris,
.is-blinking .eye-pupil,
.is-blinking-double .eye-iris,
.is-blinking-double .eye-pupil {
  --eye-scale-y: 0.08;
  transform-origin: center;
}

@keyframes mouthArrive {
  from {
    opacity: 0.3;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes speakingMouth {
  0%,
  100% {
    transform: scale(0.72, 0.34);
  }
  28% {
    transform: scale(0.88, 0.66);
  }
  52% {
    transform: scale(1, 1);
  }
  76% {
    transform: scale(0.9, 0.58);
  }
}
@keyframes idleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes lookLeft {
  0%,
  100% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(6px);
  }
}
@keyframes thinkingGaze {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-3px, 2px);
  }
}
@keyframes thinkingFocus {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-2px) rotate(-0.35deg);
  }
}
@keyframes thinkingMouth {
  0%,
  100% {
    transform: scale(0.86, 0.72);
  }
  50% {
    transform: scale(1, 0.46);
  }
}
@keyframes statusPulse {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}
@keyframes happyBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
@keyframes surprisedPop {
  from {
    transform: scale(0.92);
  }
  to {
    transform: scale(1);
  }
}
@keyframes sleepyFloat {
  0%,
  100% {
    transform: translateY(4px);
  }
  50% {
    transform: translateY(10px);
  }
}
@keyframes ambientFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(7px, -9px);
  }
}
@keyframes hardwarePulse {
  from {
    opacity: 0.58;
  }
  to {
    opacity: 1;
  }
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(10, 22, 46, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Sora", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.status-pill .ring {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: ripple 1.8s ease-out infinite;
}
@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  }
  70% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 0%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

.subtitle {
  min-height: 26px;
  font-size: 16px;
  color: var(--ink-dim);
  font-weight: 500;
  text-align: center;
  max-width: 560px;
}
body.state-answering .subtitle {
  visibility: hidden;
}
.subtitle b {
  color: var(--ink);
  font-weight: 600;
}

.audio-dock {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 34px;
}
.bars span {
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
  height: 8px;
  animation: bar 1.1s ease-in-out infinite;
  transition:
    background 600ms ease,
    box-shadow 600ms ease;
}
body.state-ready .bars span,
body.state-processing .bars span,
body.state-error .bars span,
body.state-offline .bars span {
  animation-duration: 2.6s;
  opacity: 0.5;
}
.bars span:nth-child(1) {
  animation-delay: 0s;
}
.bars span:nth-child(2) {
  animation-delay: 0.1s;
}
.bars span:nth-child(3) {
  animation-delay: 0.2s;
}
.bars span:nth-child(4) {
  animation-delay: 0.3s;
}
.bars span:nth-child(5) {
  animation-delay: 0.15s;
}
.bars span:nth-child(6) {
  animation-delay: 0.25s;
}
.bars span:nth-child(7) {
  animation-delay: 0.05s;
}
@keyframes bar {
  0%,
  100% {
    height: 8px;
  }
  50% {
    height: 30px;
  }
}
.hint {
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: 0.2px;
  text-align: center;
  max-width: 500px;
}

.talk-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Sora", sans-serif;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--navy-0);
  padding: 16px 38px 16px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 130%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 -10px 18px rgba(0, 0, 0, 0.08) inset,
    0 14px 28px -8px color-mix(in srgb, var(--accent) 55%, transparent),
    0 6px 14px rgba(0, 0, 0, 0.4);
  transition:
    background 500ms ease,
    box-shadow 260ms ease,
    transform 120ms ease,
    opacity 200ms ease;
  animation: talkPulse 2.6s ease-out infinite;
}
.talk-btn:hover {
  transform: translateY(-2px);
}
.talk-btn:active {
  transform: scale(0.96) translateY(0);
}
.talk-btn.talk-btn--hidden {
  visibility: hidden;
  pointer-events: none;
}

.talk-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--navy-0) 12%, transparent);
  color: var(--navy-0);
}
.talk-btn--start .talk-icon--mic {
  display: flex;
}
.talk-btn--stop .talk-icon--stop {
  display: flex;
}

@keyframes talkPulse {
  0% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.6) inset,
      0 -10px 18px rgba(0, 0, 0, 0.08) inset,
      0 14px 28px -8px color-mix(in srgb, var(--accent) 60%, transparent),
      0 6px 14px rgba(0, 0, 0, 0.4),
      0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
  70% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.6) inset,
      0 -10px 18px rgba(0, 0, 0, 0.08) inset,
      0 14px 28px -8px color-mix(in srgb, var(--accent) 60%, transparent),
      0 6px 14px rgba(0, 0, 0, 0.4),
      0 0 0 18px color-mix(in srgb, var(--accent) 0%, transparent);
  }
  100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.6) inset,
      0 -10px 18px rgba(0, 0, 0, 0.08) inset,
      0 14px 28px -8px color-mix(in srgb, var(--accent) 60%, transparent),
      0 6px 14px rgba(0, 0, 0, 0.4),
      0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

.talk-btn--stop {
  color: #fff;
  background: linear-gradient(180deg, #ff7a7a 0%, #d64545 130%);
}
.talk-btn--stop .talk-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: min(94vw, 720px);
  opacity: 0.74;
  transition: opacity 180ms ease;
}
.demo-controls:hover,
.demo-controls:focus-within {
  opacity: 1;
}
.demo-controls button {
  border: 1px solid color-mix(in srgb, var(--accent) 44%, transparent);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  font:
    600 11px "Sora",
    sans-serif;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}
.demo-controls button:hover,
.demo-controls button:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent-soft);
  transform: translateY(-1px);
  outline: none;
}



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

.asti-face.lipsync .mouth-shape.is-active { animation: none; transition: none; }
.asti-face.lipsync #mouthMedium { stroke: #22c7ff; fill: color-mix(in srgb, #22c7ff 35%, transparent); stroke-width: 8; }
.asti-face.lipsync #mouthSmall { stroke: #38c8ff; }
.asti-face.expression-speaking #mouthOpen { animation: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 0; margin-bottom: 10px; max-width: 760px; }
.chip {
  font: 500 14px/1 Inter, system-ui, sans-serif; color: var(--ink);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-soft) 55%, transparent);
  border-radius: 999px; padding: 10px 16px; cursor: pointer; transition: transform 120ms ease, background 200ms ease;
}
.chip:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); transform: translateY(-1px); }
.chip:active { transform: scale(0.97); }

.type-form { display: flex; gap: 8px; margin-top: 12px; width: min(520px, 90vw); }
.type-form input {
  flex: 1; font: 400 15px Inter, system-ui, sans-serif; color: var(--ink);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 11px 14px; outline: none;
}
.type-form input:focus { border-color: var(--accent-soft); }
.type-form button {
  font: 600 14px Inter, system-ui, sans-serif; color: #fff; background: var(--accent);
  border: 0; border-radius: 12px; padding: 0 18px; cursor: pointer;
}
body.state-processing .type-form, body.state-offline .type-form { opacity: 0.45; pointer-events: none; }

.ticket {
  margin: 8px auto 4px; padding: 14px 28px; text-align: center; border-radius: 18px;
  background: linear-gradient(160deg, rgba(31,214,192,0.18), rgba(63,127,242,0.18));
  border: 1px solid rgba(168,245,234,0.55); box-shadow: 0 0 36px rgba(31,214,192,0.25);
  animation: ticketIn 420ms cubic-bezier(.2,1.2,.4,1) both;
}
.ticket[hidden] { display: none; }
.ticket__label { font: 600 11px Inter, sans-serif; letter-spacing: 0.18em; color: var(--ink-dim); }
.ticket__number { font: 700 56px/1.05 Sora, Inter, sans-serif; color: var(--ink); letter-spacing: 0.06em; }
.ticket__service { font: 600 16px Inter, sans-serif; color: var(--accent-soft); }
.ticket__meta { font: 400 13px Inter, sans-serif; color: var(--ink-dim); margin-top: 2px; }
@keyframes ticketIn { from { opacity: 0; transform: translateY(14px) scale(0.92); } to { opacity: 1; transform: none; } }

.wake {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: radial-gradient(ellipse at 50% 40%, rgba(20,40,90,0.92), rgba(5,10,28,0.97)); transition: opacity 500ms ease;
}
.wake.is-gone { opacity: 0; pointer-events: none; }
.wake__card { text-align: center; color: var(--ink); padding: 32px; }
.wake__title { font: 700 72px/1 Sora, Inter, sans-serif; letter-spacing: 0.1em; }
.wake__sub { font: 500 15px Inter, sans-serif; color: var(--ink-dim); margin: 8px 0 34px; }
.wake__cta { display: inline-block; font: 600 18px Inter, sans-serif; padding: 16px 34px; border-radius: 999px; background: var(--c-ready); color: #fff; animation: wakePulse 1.8s ease-in-out infinite; }
.wake__note { font: 400 13px Inter, sans-serif; color: var(--ink-dim); margin-top: 22px; max-width: 420px; }
@keyframes wakePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(63,127,242,0.55); } 50% { box-shadow: 0 0 0 18px rgba(63,127,242,0); } }
.demo-controls[hidden] { display: none !important; }

.screen { height: 100dvh; padding: 24px 40px 18px; overflow: hidden; }
.stage { gap: 10px; flex: 1 1 auto; min-height: 0; margin-top: 0; justify-content: center; }
.face-media { height: min(44vh, 470px); flex: 0 1 auto; }
.audio-dock { gap: 10px; flex: 0 0 auto; }
.type-form { margin-top: 2px; }
.bars { transform: scale(0.85); }
.hint { font-size: 12px; }
.ticket { position: absolute; right: 1%; top: 6%; margin: 0; padding: 12px 22px; }
.ticket__number { font-size: 44px; }



.topbar { align-items: center; gap: 12px; }
.top-mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--ink);
  font: 500 13px Inter, sans-serif; padding: 8px 13px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); transition: background 160ms ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.13); }
.icon-btn--x { font-size: 22px; line-height: 1; padding: 2px 11px 5px; }


.ticket-pill {
  display: inline-flex; align-items: baseline; gap: 10px; cursor: pointer; color: var(--ink);
  padding: 7px 18px; border-radius: 999px; border: 1px solid rgba(168,245,234,0.6);
  background: linear-gradient(160deg, rgba(31,214,192,0.22), rgba(63,127,242,0.2)); box-shadow: 0 0 22px rgba(31,214,192,0.25);
}
.ticket-pill[hidden] { display: none; }
.ticket-pill__k { font: 600 10px Inter, sans-serif; letter-spacing: 0.16em; color: var(--ink-dim); }
.ticket-pill__n { font: 700 24px/1 Sora, Inter, sans-serif; letter-spacing: 0.05em; }
.ticket-pill__s { font: 500 12px Inter, sans-serif; color: var(--accent-soft); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.modal {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(3,8,22,0.78); animation: fadeIn 220ms ease both;
}
.modal[hidden], .drawer[hidden] { display: none; }
.modal__card {
  position: relative; color: var(--ink); text-align: center; border-radius: 24px; padding: 28px 34px; max-width: 94vw;
  background: linear-gradient(160deg, rgba(18,42,80,0.98), rgba(6,14,32,0.98));
  border: 1px solid rgba(168,245,234,0.5); box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 60px rgba(31,214,192,0.18);
  animation: ticketIn 420ms cubic-bezier(.2,1.2,.4,1) both;
}
.modal__card--ticket { min-width: min(440px, 92vw); }
.modal__card--ticket .ticket__number { font: 700 clamp(84px, 20vw, 150px)/1 Sora, Inter, sans-serif; letter-spacing: 0.06em; margin: 6px 0 4px; }
.modal__card--ticket .ticket__service { font: 600 22px Inter, sans-serif; color: var(--accent-soft); }
.modal__card--ticket .ticket__meta { font: 500 16px Inter, sans-serif; color: var(--ink); margin-top: 6px; }
.ticket__hint { font: 400 14px Inter, sans-serif; color: var(--ink-dim); margin: 14px 0 18px; }
.ticket__label { font: 600 12px Inter, sans-serif; letter-spacing: 0.2em; color: var(--ink-dim); }
.btn-primary, .btn-ghost { font: 600 14px Inter, sans-serif; border-radius: 12px; padding: 11px 20px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--c-answering); color: #04211d; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(255,255,255,0.25); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal__card--data { text-align: left; width: min(760px, 94vw); max-height: 92vh; overflow: auto; padding: 22px 26px; }
.data__head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.data__kicker { font: 600 11px Inter, sans-serif; letter-spacing: 0.16em; color: var(--accent-soft); }
.data__title { font: 700 20px/1.25 Sora, Inter, sans-serif; margin-top: 4px; }
.data__sub { font: 400 13px Inter, sans-serif; color: var(--ink-dim); margin-top: 2px; }
.data__chart { margin: 14px 0 8px; }
.data__chart svg { width: 100%; height: auto; display: block; }
.data__table-wrap { max-height: 190px; overflow: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); }
.data__table { width: 100%; border-collapse: collapse; font: 400 14px Inter, sans-serif; }
.data__table th, .data__table td { padding: 8px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.08); }
.data__table th { position: sticky; top: 0; background: rgba(12,28,56,0.98); color: var(--ink-dim); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; }
.data__table td.num, .data__table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data__note { font: 400 12px Inter, sans-serif; color: var(--ink-dim); margin: 10px 0 0; min-height: 0; }
.data__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chart-line { fill: none; stroke: var(--c-answering); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#chartFill); }
.chart-dot { fill: #04211d; stroke: var(--c-answering); stroke-width: 2.5; }
.chart-axis { stroke: rgba(255,255,255,0.14); stroke-width: 1; }
.chart-text { fill: var(--ink-dim); font: 500 11px Inter, sans-serif; }
.chart-val { fill: var(--ink); font: 600 11px Inter, sans-serif; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(400px, 100vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(10,22,46,0.99), rgba(4,9,22,0.99)); border-left: 1px solid rgba(255,255,255,0.14);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5); animation: drawerIn 260ms ease both; color: var(--ink);
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.drawer__title { font: 700 16px Sora, Inter, sans-serif; }
.drawer__body { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.drawer__foot { padding: 10px 16px 14px; font: 400 11px Inter, sans-serif; color: var(--ink-dim); border-top: 1px solid rgba(255,255,255,0.08); }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font: 400 14px/1.45 Inter, sans-serif; }
.msg small { display: block; margin-top: 4px; font-size: 10.5px; opacity: 0.6; }
.msg--user { align-self: flex-end; background: rgba(63,127,242,0.28); border-bottom-right-radius: 4px; }
.msg--asti { align-self: flex-start; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-bottom-left-radius: 4px; }
.drawer__empty { color: var(--ink-dim); font: 400 14px Inter, sans-serif; text-align: center; margin-top: 30px; }

.glass-shine { fill: rgba(255,255,255,0.07); pointer-events: none; }
.asti-face .robot-body-motion { animation: robotBreath 4.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.asti-face.expression-speaking .robot-body-motion { animation: answeringBodyMotion 1.8s ease-in-out infinite; }
@keyframes robotBreath { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.018); } }
.asti-face.lipsync .face-features { transform: translateY(calc(var(--talk, 0) * -3px)) rotate(calc(var(--talk, 0) * 0.7deg)); transform-origin: 50% 60%; }
.asti-face.lipsync .face-outline { filter: drop-shadow(0 0 calc(6px + var(--talk, 0) * 22px) var(--accent)); }
.aura { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 0; }
.aura i { position: absolute; left: -150px; top: -150px; width: 300px; height: 300px; border-radius: 50%; border: 2px solid var(--accent-soft); opacity: 0; }
body.state-listening .aura i, body.state-answering .aura i { animation: auraRipple 2.4s ease-out infinite; }
body.state-answering .aura i { border-color: var(--c-answering); }
.aura i:nth-child(2) { animation-delay: 0.8s !important; }
.aura i:nth-child(3) { animation-delay: 1.6s !important; }
@keyframes auraRipple { 0% { transform: scale(0.7); opacity: 0.55; } 100% { transform: scale(1.9); opacity: 0; } }
body.state-processing .face-outline { animation: thinkGlow 1.4s ease-in-out infinite; }
@keyframes thinkGlow { 0%,100% { filter: drop-shadow(0 0 4px var(--accent)); } 50% { filter: drop-shadow(0 0 18px var(--accent)); } }
.face-media::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 46%; height: 16px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%); filter: blur(5px); pointer-events: none;
}
.ticket { display: none; }

.modal__card--rating { width: min(480px, 94vw); }
.rate__title { font: 700 22px Sora, Inter, sans-serif; }
.rate__sub { font: 400 14px Inter, sans-serif; color: var(--ink-dim); margin: 4px 0 14px; }
.rate__invite { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); font: 600 14px/1.4 Inter, sans-serif; color: var(--ink); }
.rate__stars { display: flex; justify-content: center; gap: 6px; }
.rate__stars button { font-size: 52px; line-height: 1; background: none; border: 0; cursor: pointer; color: rgba(255,255,255,0.22); transition: transform 120ms ease, color 120ms ease; padding: 0 4px; }
.rate__stars button.on { color: #f2a93b; text-shadow: 0 0 18px rgba(242,169,59,0.6); }
.rate__stars button:hover { transform: scale(1.15); }
.rate__label { min-height: 24px; font: 600 15px Inter, sans-serif; color: var(--accent-soft); margin: 8px 0 12px; }
.modal__card--rating input { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 11px 14px; color: var(--ink); font: 400 14px Inter, sans-serif; outline: none; }
.rate__actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
