:root {
  color-scheme: dark;
  --bg: #06131e;
  --panel: rgba(9, 27, 41, 0.86);
  --panel-strong: #0a2031;
  --line: rgba(139, 193, 218, 0.16);
  --line-strong: rgba(139, 193, 218, 0.28);
  --text: #f4fbff;
  --muted: #92abba;
  --cyan: #08b8e8;
  --cyan-soft: #7bdbf1;
  --purple: #6256d9;
  --green: #49d6a1;
  --danger: #ff7d8e;
  --shadow: 0 28px 70px rgba(0, 4, 10, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(5, 19, 30, 0.94), rgba(5, 19, 30, 0.98)),
    radial-gradient(circle at 30% 0%, #163f58, transparent 44%);
  font-family:
    Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

button,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.16;
  pointer-events: none;
}

.glow-one {
  top: -17rem;
  right: -10rem;
  background: var(--cyan);
}

.glow-two {
  bottom: -22rem;
  left: -12rem;
  background: var(--purple);
}

.topbar {
  width: min(1440px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: auto;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand strong {
  font-size: 1.02rem;
  letter-spacing: 0.015em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.privacy-pill,
.runtime-health,
.live-state,
.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.privacy-pill {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
}

.privacy-dot,
.health-light,
.live-state > span:first-child,
.availability span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(73, 214, 161, 0.75);
}

.back-link {
  color: var(--cyan-soft);
  font-size: 0.82rem;
  text-decoration: none;
}

.app-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0 80px;
}

.intro {
  margin-bottom: 38px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.eyebrow,
.section-kicker {
  color: var(--cyan-soft);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.intro h1 {
  max-width: 1000px;
  margin: 8px 0 10px;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.intro p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.runtime-health {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(7, 21, 33, 0.66);
  font-size: 0.76rem;
}

.runtime-health.error .health-light {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 125, 142, 0.6);
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(440px, 1.05fr);
  gap: 22px;
}

.avatar-panel,
.conversation-panel,
.source-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.avatar-panel {
  padding: 18px;
}

.runtime-selector {
  margin-bottom: 14px;
  padding: 3px 2px 0;
}

.runtime-selector-head {
  margin-bottom: 11px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.runtime-selector-head h2 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.runtime-selection {
  color: var(--cyan-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.runtime-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.runtime-option {
  min-width: 0;
  padding: 11px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(3, 15, 24, 0.52);
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.runtime-option:hover,
.runtime-option.selected {
  border-color: rgba(8, 184, 232, 0.48);
  background: rgba(8, 184, 232, 0.09);
}

.runtime-option.selected {
  box-shadow: inset 0 0 0 1px rgba(8, 184, 232, 0.15);
}

.runtime-option.unavailable {
  border-style: dashed;
  opacity: 0.58;
}

.runtime-option strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-option span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.35;
}

.runtime-option small {
  margin-top: 8px;
  color: var(--green);
  font-size: 0.52rem;
}

.runtime-option.unavailable small {
  color: #f5c66c;
}

.runtime-description {
  min-height: 2.5em;
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.45;
}

.avatar-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(16, 58, 78, 0.42), rgba(5, 14, 24, 0.8)),
    #07131f;
}

#avatar-video {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #02070b;
  opacity: 0.01;
  visibility: visible;
  transition: opacity 180ms ease;
}

#avatar-video.avatar-connecting {
  opacity: 0.01;
}

#avatar-video.visible,
#avatar-video.avatar-visible {
  opacity: 1;
}

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.avatar-fallback::after {
  position: absolute;
  right: 10%;
  bottom: 0;
  left: 10%;
  height: 38%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(9, 184, 232, 0.14), transparent);
  content: "";
  filter: blur(4px);
}

.avatar-logo {
  position: relative;
  z-index: 1;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(105, 215, 242, 0.28);
  border-radius: 50%;
  background: rgba(4, 21, 34, 0.78);
  box-shadow:
    0 0 0 18px rgba(4, 184, 232, 0.04),
    0 0 65px rgba(4, 184, 232, 0.18);
}

.avatar-logo img {
  width: min(84%, 122px);
  height: auto;
  object-fit: contain;
}

.avatar-orbit {
  position: absolute;
  border: 1px solid rgba(91, 210, 239, 0.2);
  border-radius: 50%;
}

.orbit-one {
  width: 230px;
  height: 230px;
  animation: orbit 18s linear infinite;
}

.orbit-two {
  width: 310px;
  height: 310px;
  border-style: dashed;
  animation: orbit 28s linear infinite reverse;
}

.avatar-orbit::before {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 18px var(--purple);
  content: "";
}

.voice-wave {
  position: absolute;
  z-index: 3;
  bottom: 76px;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  opacity: 0.48;
}

.voice-wave i {
  width: 4px;
  height: 8px;
  border-radius: 99px;
  background: var(--cyan-soft);
}

.voice-wave.active i {
  animation: wave 0.75s ease-in-out infinite alternate;
}

.voice-wave.active i:nth-child(2),
.voice-wave.active i:nth-child(4) {
  animation-delay: 0.18s;
}

.voice-wave.active i:nth-child(3) {
  animation-delay: 0.34s;
}

.avatar-overlay {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.avatar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-stream-note {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(2, 10, 16, 0.82);
  border: 1px solid rgba(112, 222, 247, 0.18);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.avatar-stream-note p {
  margin: 0;
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.45;
}

.avatar-stream-note .ghost-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.68rem;
}

.live-state,
.ghost-button {
  min-height: 35px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(2, 10, 16, 0.68);
  backdrop-filter: blur(12px);
  font-size: 0.7rem;
}

.live-state > span:first-child {
  background: #7f94a0;
  box-shadow: none;
}

.live-state.connected > span:first-child {
  background: var(--green);
  box-shadow: 0 0 12px rgba(73, 214, 161, 0.7);
}

.live-state.connecting > span:first-child {
  background: #f5c66c;
  animation: pulse 1s infinite;
}

.ghost-button {
  cursor: pointer;
  transition: 160ms ease;
}

.session-stop-button {
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 125, 142, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 125, 142, 0.18), rgba(255, 86, 110, 0.18));
  color: var(--text);
  backdrop-filter: blur(12px);
  font-size: 0.7rem;
  cursor: pointer;
  transition: 160ms ease;
}

.session-stop-button:hover:not(:disabled) {
  border-color: rgba(255, 125, 142, 0.56);
  background: linear-gradient(180deg, rgba(255, 125, 142, 0.28), rgba(255, 86, 110, 0.24));
}

.session-stop-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.ghost-button:hover:not(:disabled) {
  border-color: rgba(112, 222, 247, 0.36);
  background: rgba(8, 184, 232, 0.15);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.advisor-card {
  padding: 17px 4px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.advisor-card > div:first-child {
  display: flex;
  flex-direction: column;
}

.advisor-card strong {
  font-size: 0.92rem;
}

.advisor-card span {
  color: var(--muted);
  font-size: 0.72rem;
}

.availability {
  color: var(--muted);
  font-size: 0.72rem;
}

.pipeline-card {
  margin-top: 15px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 15, 24, 0.52);
}

.pipeline-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipeline-heading span {
  font-size: 0.76rem;
  font-weight: 700;
}

.pipeline-heading small {
  color: var(--muted);
  font-size: 0.65rem;
}

.pipeline {
  display: flex;
  align-items: center;
}

.pipeline-step {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0.52;
  transition: 180ms ease;
}

.pipeline-step > span {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.62rem;
}

.pipeline-step p {
  margin: 0;
  overflow: hidden;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.pipeline-step small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 500;
  text-overflow: ellipsis;
}

.pipeline-step.active,
.pipeline-step.done {
  opacity: 1;
}

.pipeline-step.active > span {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(8, 184, 232, 0.16);
  box-shadow: 0 0 17px rgba(8, 184, 232, 0.22);
}

.pipeline-step.done > span {
  border-color: rgba(73, 214, 161, 0.55);
  color: #061d16;
  background: var(--green);
}

.pipeline > b {
  flex: 0 0 10px;
  height: 1px;
  margin: 0 4px;
  background: var(--line-strong);
}

.conversation-panel {
  min-height: 650px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.conversation-head,
.source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conversation-head h2,
.source-heading h2 {
  margin: 3px 0 0;
  font-size: 1.15rem;
}

.icon-button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
}

.messages {
  flex: 1;
  min-height: 340px;
  max-height: 470px;
  margin: 24px -7px 10px 0;
  padding-right: 7px;
  overflow-y: auto;
  scrollbar-color: rgba(128, 179, 201, 0.24) transparent;
}

.message {
  margin-bottom: 23px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.message-avatar {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(9, 42, 60, 0.76);
}

.message-avatar img {
  width: 25px;
  height: auto;
  object-fit: contain;
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-avatar {
  color: #03151d;
  background: var(--cyan-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.user-message .message-body {
  align-items: flex-end;
}

.user-message .message-meta {
  flex-direction: row-reverse;
}

.message-body {
  max-width: min(82%, 620px);
  display: flex;
  flex-direction: column;
}

.message-meta {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-meta strong {
  font-size: 0.72rem;
}

.message-meta span {
  color: var(--muted);
  font-size: 0.6rem;
}

.message-body p {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 5px 15px 15px;
  color: #dbeaf1;
  background: rgba(12, 39, 56, 0.62);
  font-size: 0.87rem;
  white-space: pre-wrap;
}

.user-message .message-body p {
  border-color: rgba(8, 184, 232, 0.25);
  border-radius: 15px 5px 15px 15px;
  color: #eafaff;
  background: rgba(8, 184, 232, 0.13);
}

.message.loading p::after {
  display: inline-block;
  width: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.2s steps(4, end) infinite;
  content: "...";
}

.suggestions {
  margin: 6px 0 14px 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.suggestions button {
  padding: 7px 10px;
  border: 1px solid rgba(82, 196, 226, 0.18);
  border-radius: 999px;
  color: #a9dbea;
  background: rgba(8, 184, 232, 0.055);
  cursor: pointer;
  font-size: 0.66rem;
  transition: 150ms ease;
}

.suggestions button:hover {
  border-color: rgba(82, 196, 226, 0.4);
  background: rgba(8, 184, 232, 0.12);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(3, 15, 24, 0.58);
  transition: 150ms ease;
}

.composer:focus-within {
  border-color: rgba(8, 184, 232, 0.5);
  box-shadow: 0 0 0 3px rgba(8, 184, 232, 0.06);
}

.mic-button,
.send-button {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
}

.mic-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--cyan-soft);
  background: rgba(8, 184, 232, 0.07);
}

.mic-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.mic-button.listening {
  color: #fff;
  background: #dc5369;
  animation: mic-pulse 1.2s infinite;
}

.mic-button.muted {
  color: #f5c66c;
  background: rgba(245, 198, 108, 0.1);
}

.composer-input {
  flex: 1;
  min-width: 0;
}

.composer textarea {
  width: 100%;
  max-height: 120px;
  min-height: 38px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  line-height: 1.5;
  font-size: 0.85rem;
}

.composer textarea::placeholder {
  color: #718895;
}

.send-button {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 11px;
  color: #02161e;
  background: linear-gradient(135deg, #83e7f7, #1cbce8);
  font-size: 0.72rem;
  font-weight: 800;
}

.send-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.send-button:disabled,
.mic-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.composer-note {
  margin: 8px 4px 0;
  color: #718895;
  text-align: center;
  font-size: 0.61rem;
}

.followup-panel {
  margin-top: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(123, 219, 241, 0.05);
}

.followup-panel strong {
  display: block;
  margin-bottom: 4px;
}

.followup-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.source-panel {
  margin-top: 22px;
  padding: 25px;
}

.source-count {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.66rem;
}

.source-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.source-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 15, 24, 0.42);
}

.source-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.source-number {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #06151d;
  background: var(--cyan-soft);
  font-size: 0.62rem;
  font-weight: 800;
}

.source-card strong {
  font-size: 0.76rem;
}

.source-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wave {
  to {
    height: 27px;
  }
}

@keyframes dots {
  0% {
    width: 0;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes mic-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(220, 83, 105, 0.12);
  }
}

@media (max-width: 1040px) {
  .experience-grid {
    grid-template-columns: 1fr;
  }

  .avatar-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    gap: 16px;
  }

  .runtime-selector {
    grid-column: 1 / -1;
  }

  .avatar-stage {
    grid-row: span 2;
  }

  .advisor-card {
    align-self: end;
  }

  .pipeline-card {
    align-self: start;
    margin-top: 0;
  }

  .pipeline {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .pipeline > b {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar,
  .app-shell {
    width: min(100% - 28px, 1320px);
  }

  .topbar {
    min-height: 70px;
  }

  .privacy-pill,
  .back-link {
    display: none;
  }

  .app-shell {
    padding: 38px 0 55px;
  }

  .intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .intro h1 {
    font-size: 2rem;
  }

  .experience-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .avatar-panel {
    display: block;
  }

  .runtime-options {
    grid-template-columns: 1fr;
  }

  .avatar-stage {
    min-height: 380px;
  }

  .pipeline-card {
    margin-top: 14px;
  }

  .pipeline {
    flex-direction: row;
    gap: 0;
  }

  .pipeline-step {
    display: block;
    text-align: center;
  }

  .pipeline-step > span {
    margin: 0 auto 6px;
  }

  .pipeline-step small {
    display: none;
  }

  .pipeline > b {
    display: block;
  }

  .conversation-panel {
    min-height: 620px;
    padding: 20px 16px 16px;
  }

  .messages {
    min-height: 310px;
  }

  .message-body {
    max-width: 88%;
  }

  .suggestions {
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .suggestions button {
    flex: 0 0 auto;
  }

  .send-button span {
    display: none;
  }

  .send-button {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .followup-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand small {
    display: none;
  }

  .avatar-stage {
    min-height: 330px;
  }

  .advisor-card {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

  .pipeline-card {
    padding: 13px 10px;
  }

  .pipeline-heading {
    padding: 0 4px;
  }

  .pipeline-step p {
    font-size: 0.58rem;
  }
}

body.embedded-view .page-glow,
body.embedded-view .topbar {
  display: none;
}

body.embedded-view .app-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

body.embedded-view .intro {
  display: none;
}

body.embedded-view .experience-grid {
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100vh;
}

body.embedded-view .avatar-panel,
body.embedded-view .conversation-panel {
  padding: 0;
}

body.embedded-view .avatar-panel {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.embedded-view .conversation-panel {
  min-height: 0;
  display: none;
}

body.embedded-view .runtime-selector,
body.embedded-view .advisor-card,
body.embedded-view .pipeline-card,
body.embedded-view .source-panel,
body.embedded-view .followup-panel {
  display: none;
}

body.embedded-view .avatar-stage {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(96, 124, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(153, 108, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #f7f8fc 0%, #eef2ff 42%, #edf1fa 100%);
}

body.embedded-view .avatar-overlay {
  inset: 14px 14px auto 14px;
  justify-content: space-between;
}

body.embedded-view .mic-button,
body.embedded-view .composer,
body.embedded-view .composer-note {
  display: none;
}

body.embedded-view #avatar-video {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  background: transparent;
}

body.embedded-view .ghost-button,
body.embedded-view .voice-wave {
  display: none;
}

body.embedded-view .session-stop-button {
  display: inline-flex;
}

body.embedded-view .avatar-fallback::after {
  right: 14%;
  left: 14%;
  background: linear-gradient(180deg, rgba(96, 124, 255, 0.12), transparent);
}

body.embedded-view .avatar-logo {
  border-color: rgba(96, 124, 255, 0.2);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 14px 34px rgba(93, 104, 155, 0.14),
    0 0 0 20px rgba(123, 139, 255, 0.08);
}

body.embedded-view .avatar-orbit {
  border-color: rgba(96, 124, 255, 0.22);
}

body.embedded-view .avatar-orbit::before {
  background: #7064ff;
  box-shadow: 0 0 16px rgba(112, 100, 255, 0.45);
}

body.embedded-view .live-state {
  border-color: rgba(82, 102, 138, 0.18);
  background: rgba(255, 255, 255, 0.76);
  color: #1a2740;
  box-shadow: 0 12px 28px rgba(98, 113, 145, 0.12);
}
