:root {
  color-scheme: dark;
  --bg: #050811;
  --bg-raised: #090e1a;
  --surface: rgba(13, 20, 35, 0.78);
  --surface-strong: rgba(17, 26, 44, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(181, 208, 255, 0.13);
  --line-strong: rgba(181, 208, 255, 0.24);
  --text: #f3f7ff;
  --text-soft: #c4ccdc;
  --muted: #8490a7;
  --cyan: #55e7ff;
  --cyan-bright: #b9f8ff;
  --violet: #8c74ff;
  --green: #4de5ac;
  --amber: #ffca68;
  --red: #ff6f83;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(74, 95, 180, 0.16), transparent 46%),
    linear-gradient(155deg, #050811 0%, #060a12 50%, #070b15 100%);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--text);
  color: #050811;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(85, 231, 255, 0.86);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  opacity: 0.13;
  filter: blur(90px);
}

.ambient-orb-one {
  top: -25rem;
  left: -15rem;
  background: var(--cyan);
}

.ambient-orb-two {
  right: -20rem;
  bottom: -28rem;
  background: var(--violet);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(144, 180, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 180, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 72%);
}

.noscript {
  margin: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 111, 131, 0.45);
  border-radius: 14px;
  background: rgba(255, 111, 131, 0.1);
  text-align: center;
}

.app-root {
  min-height: 100vh;
  min-height: 100dvh;
}

.glass-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 27, 46, 0.82), rgba(8, 13, 24, 0.76));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(85, 231, 255, 0.32);
  border-radius: 13px;
  background: radial-gradient(circle at 35% 30%, rgba(185, 248, 255, 0.2), rgba(85, 231, 255, 0.05) 45%, rgba(140, 116, 255, 0.08));
  box-shadow: inset 0 0 15px rgba(85, 231, 255, 0.08), 0 0 20px rgba(85, 231, 255, 0.06);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.brand-mark::before {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(185, 248, 255, 0.56);
}

.brand-mark::after {
  width: 11px;
  height: 11px;
  background: radial-gradient(circle at 35% 30%, #fff, var(--cyan) 34%, var(--violet));
  box-shadow: 0 0 12px rgba(85, 231, 255, 0.82);
}

.brand-mark span {
  width: 27px;
  height: 10px;
  border-top: 1px solid rgba(140, 116, 255, 0.62);
  transform: rotate(-28deg);
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Login */
.login-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  place-items: center;
}

.login-card {
  width: min(100%, 440px);
  padding: clamp(24px, 7vw, 38px);
  border-radius: var(--radius-xl);
}

.login-brand {
  justify-content: center;
  margin-bottom: 25px;
}

.login-core {
  position: relative;
  display: grid;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  place-items: center;
}

.login-core::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 231, 255, 0.14), transparent 68%);
  filter: blur(8px);
}

.login-core-ring {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(85, 231, 255, 0.35);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: login-spin 7s linear infinite;
}

.login-core-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(140, 116, 255, 0.38);
  border-bottom-color: var(--violet);
  border-radius: 50%;
  animation: login-spin 4s linear infinite reverse;
}

.login-core-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fff, var(--cyan) 30%, var(--violet) 72%, #1b2058);
  box-shadow: 0 0 22px rgba(85, 231, 255, 0.7), 0 0 45px rgba(140, 116, 255, 0.25);
  animation: login-breathe 3.2s ease-in-out infinite;
}

.login-heading {
  margin-bottom: 25px;
  text-align: center;
}

.login-heading h1 {
  margin: 8px 0 7px;
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.login-heading > p:last-child {
  max-width: 32ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-form {
  display: grid;
  gap: 9px;
}

.login-form > label {
  margin: 6px 2px 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 650;
}

.field-shell {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 8, 16, 0.66);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-shell:focus-within {
  border-color: rgba(85, 231, 255, 0.54);
  background: rgba(7, 13, 24, 0.86);
  box-shadow: 0 0 0 3px rgba(85, 231, 255, 0.08);
}

.field-shell > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.field-shell input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
}

.field-shell input::placeholder,
.composer-field textarea::placeholder {
  color: #606c83;
}

.field-action {
  min-height: 48px;
  padding: 0 3px 0 10px;
  border: 0;
  background: transparent;
  color: var(--cyan-bright);
  font-size: 0.72rem;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 50px;
  border-radius: 14px;
  font-weight: 720;
  transition: transform 160ms var(--ease), box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  display: flex;
  margin-top: 13px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(85, 231, 255, 0.4);
  background: linear-gradient(120deg, #3fdaf5, #6ca9ff 52%, #8771ef);
  box-shadow: 0 13px 32px rgba(56, 181, 225, 0.2);
  color: #041018;
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-button:not(:disabled):hover,
.primary-button:not(:disabled):focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(56, 181, 225, 0.3);
}

.form-error {
  margin: 6px 2px -2px;
  color: #ff9cac;
  font-size: 0.8rem;
}

.security-note {
  display: flex;
  margin: 23px 0 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.7rem;
}

.security-note svg {
  width: 16px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Shell */
.assistant-view {
  width: min(100%, 1500px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.app-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 1px 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-pill,
.health-badge {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(77, 229, 172, 0.18);
  border-radius: 999px;
  background: rgba(77, 229, 172, 0.07);
}

.connection-pill span,
.health-badge span,
.connection-banner-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(77, 229, 172, 0.7);
}

.connection-pill b,
.health-badge b {
  color: #9af2d2;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.connection-pill[data-connection="booting"],
.connection-pill[data-connection="reconnecting"] {
  border-color: rgba(255, 202, 104, 0.2);
  background: rgba(255, 202, 104, 0.08);
}

.connection-pill[data-connection="booting"] span,
.connection-pill[data-connection="reconnecting"] span {
  background: var(--amber);
  box-shadow: 0 0 9px rgba(255, 202, 104, 0.7);
  animation: status-blink 1.2s ease-in-out infinite;
}

.connection-pill[data-connection="booting"] b,
.connection-pill[data-connection="reconnecting"] b {
  color: #ffe2a9;
}

.connection-pill[data-connection="offline"],
.connection-pill[data-connection="error"] {
  border-color: rgba(255, 111, 131, 0.22);
  background: rgba(255, 111, 131, 0.08);
}

.connection-pill[data-connection="offline"] span,
.connection-pill[data-connection="error"] span {
  background: var(--red);
  box-shadow: 0 0 9px rgba(255, 111, 131, 0.62);
}

.connection-pill[data-connection="offline"] b,
.connection-pill[data-connection="error"] b {
  color: #ffa7b5;
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease);
}

.icon-button.small {
  width: 48px;
  height: 48px;
  margin-left: auto;
  border-radius: 12px;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text-soft);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace {
  display: grid;
  gap: 12px;
}

.agent-stage,
.health-panel,
.restart-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* Animated core */
.agent-stage {
  --agent-accent: var(--cyan);
  position: relative;
  display: grid;
  min-width: 0;
  padding: 22px 18px 20px;
  align-items: stretch;
  gap: 20px;
  isolation: isolate;
}

.agent-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -90px;
  left: -70px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 231, 255, 0.1), rgba(140, 116, 255, 0.035) 44%, transparent 70%);
  filter: blur(8px);
}

.agent-presence {
  display: flex;
  min-width: 0;
  padding-bottom: 20px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.agent-dialogue {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.agent-core {
  --core-a: var(--cyan);
  --core-b: var(--violet);
  --core-glow: rgba(85, 231, 255, 0.55);
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  place-items: center;
  transition: filter 420ms ease, opacity 420ms ease, transform 420ms var(--ease);
}

.core-halo,
.core-orbit,
.core-shell,
.core-depth,
.core-spark,
.core-wave {
  position: absolute;
  border-radius: 50%;
}

.core-halo-outer {
  inset: 2px;
  border: 1px solid color-mix(in srgb, var(--core-a) 32%, transparent);
  box-shadow: inset 0 0 35px color-mix(in srgb, var(--core-b) 8%, transparent);
}

.core-halo-outer::before,
.core-halo-outer::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed color-mix(in srgb, var(--core-b) 24%, transparent);
  border-radius: 50%;
}

.core-halo-outer::after {
  inset: -8px;
  border-style: solid;
  border-color: transparent color-mix(in srgb, var(--core-a) 18%, transparent);
}

.core-halo-inner {
  inset: 27px;
  border: 1px solid color-mix(in srgb, var(--core-a) 28%, transparent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--core-glow) 30%, transparent);
}

.core-orbit-one {
  inset: 15px;
  border-top: 1px solid var(--core-a);
  border-right: 1px solid transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--core-b) 52%, transparent);
  border-left: 1px solid transparent;
}

.core-orbit-two {
  inset: 38px;
  border-top: 1px solid transparent;
  border-right: 1px solid var(--core-b);
  border-bottom: 1px solid transparent;
  border-left: 1px solid color-mix(in srgb, var(--core-a) 64%, transparent);
}

.core-orbit i {
  position: absolute;
  top: 7%;
  left: 24%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--core-a);
  box-shadow: 0 0 10px var(--core-a);
}

.core-orbit-two i {
  top: auto;
  right: 14%;
  bottom: 13%;
  left: auto;
  background: var(--core-b);
  box-shadow: 0 0 10px var(--core-b);
}

.core-shell {
  inset: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 255, 255, 0.95), color-mix(in srgb, var(--core-a) 92%, white) 8%, var(--core-a) 25%, var(--core-b) 62%, #141944 100%);
  box-shadow:
    0 0 18px var(--core-glow),
    0 0 45px color-mix(in srgb, var(--core-glow) 62%, transparent),
    inset -10px -14px 22px rgba(3, 5, 20, 0.42),
    inset 8px 8px 18px rgba(255, 255, 255, 0.2);
}

.core-depth {
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: radial-gradient(circle at 42% 36%, rgba(255, 255, 255, 0.32), transparent 24%);
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.13);
}

.core-spark {
  top: 12px;
  left: 16px;
  width: 10px;
  height: 7px;
  background: rgba(255, 255, 255, 0.82);
  filter: blur(1px);
  transform: rotate(-28deg);
}

.core-wave {
  inset: 28px;
  border: 1px solid color-mix(in srgb, var(--core-a) 58%, transparent);
  opacity: 0;
}

.agent-core[data-state="booting"] .core-orbit-one,
.agent-core[data-state="thinking"] .core-orbit-one,
.agent-core[data-state="reconnecting"] .core-orbit-one {
  animation: core-spin 2.4s linear infinite;
}

.agent-core[data-state="booting"] .core-orbit-two,
.agent-core[data-state="thinking"] .core-orbit-two,
.agent-core[data-state="reconnecting"] .core-orbit-two {
  animation: core-spin 3.2s linear infinite reverse;
}

.agent-core[data-state="idle"] .core-shell {
  animation: core-breathe 3.8s ease-in-out infinite;
}

.agent-core[data-state="idle"] .core-halo-outer {
  animation: halo-breathe 3.8s ease-in-out infinite;
}

.agent-core[data-state="listening"] {
  --core-a: #50f0c0;
  --core-b: #45bfff;
  --core-glow: rgba(77, 229, 172, 0.7);
}

.agent-core[data-state="listening"] .core-shell {
  animation: listen-pulse 0.9s ease-in-out infinite alternate;
}

.agent-core[data-state="listening"] .core-wave-one,
.agent-core[data-state="listening"] .core-wave-two,
.agent-core[data-state="listening"] .core-wave-three {
  animation: wave-out 1.8s ease-out infinite;
}

.agent-core[data-state="listening"] .core-wave-two {
  animation-delay: 0.6s;
}

.agent-core[data-state="listening"] .core-wave-three {
  animation-delay: 1.2s;
}

.agent-core[data-state="thinking"] {
  --core-a: #70d8ff;
  --core-b: #a576ff;
  --core-glow: rgba(126, 112, 255, 0.64);
}

.agent-core[data-state="thinking"] .core-shell {
  animation: think-morph 1.65s ease-in-out infinite;
}

.agent-core[data-state="thinking"] .core-halo-outer::before {
  animation: core-spin 5s linear infinite reverse;
}

.agent-core[data-state="speaking"] {
  --core-a: #5af2ff;
  --core-b: #9975ff;
  --core-glow: rgba(85, 231, 255, 0.74);
}

.agent-core[data-state="speaking"] .core-shell {
  animation: speaking-pulse 0.48s ease-in-out infinite alternate;
}

.agent-core[data-state="speaking"] .core-orbit-one {
  animation: speak-rock 1.1s ease-in-out infinite alternate;
}

.agent-core[data-state="speaking"] .core-wave-one,
.agent-core[data-state="speaking"] .core-wave-two {
  animation: wave-out 1.15s ease-out infinite;
}

.agent-core[data-state="speaking"] .core-wave-two {
  animation-delay: 0.55s;
}

.agent-core[data-state="reconnecting"] {
  --core-a: var(--amber);
  --core-b: #ff8a73;
  --core-glow: rgba(255, 202, 104, 0.52);
}

.agent-core[data-state="offline"] {
  --core-a: #647087;
  --core-b: #343b4d;
  --core-glow: rgba(79, 91, 115, 0.28);
  opacity: 0.72;
  filter: grayscale(0.65);
}

.agent-core[data-state="offline"] .core-shell {
  transform: scale(0.88);
}

.agent-core[data-state="error"] {
  --core-a: #ff7a8e;
  --core-b: #b33b66;
  --core-glow: rgba(255, 111, 131, 0.58);
  animation: error-nudge 0.42s ease both;
}

.agent-state-copy {
  position: relative;
  z-index: 2;
  max-width: 34rem;
  margin-top: 14px;
}

.agent-state-copy h1 {
  margin: 8px 0 6px;
  font-size: clamp(1.55rem, 7vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.agent-state-copy > p:last-child {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.agent-state-label {
  display: inline-flex;
  margin: 0;
  align-items: center;
  gap: 8px;
  color: var(--cyan-bright);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.agent-state-label::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 13px currentColor;
}

.agent-core[data-state="listening"] ~ .agent-state-copy .agent-state-label {
  color: #9af2d2;
}

.agent-core[data-state="thinking"] ~ .agent-state-copy .agent-state-label {
  color: #c7baff;
}

.agent-core[data-state="speaking"] ~ .agent-state-copy .agent-state-label {
  color: var(--cyan-bright);
}

.agent-core[data-state="reconnecting"] ~ .agent-state-copy .agent-state-label {
  color: #ffe0a3;
}

.agent-core[data-state="offline"] ~ .agent-state-copy .agent-state-label,
.agent-core[data-state="error"] ~ .agent-state-copy .agent-state-label {
  color: #ffa7b5;
}

/* Health */
.health-panel {
  padding: 22px 18px 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  margin: 5px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.health-badge[data-health="loading"] {
  border-color: var(--line);
  background: var(--surface-soft);
}

.health-badge[data-health="loading"] span {
  background: var(--muted);
  box-shadow: none;
  animation: status-blink 1.2s ease-in-out infinite;
}

.health-badge[data-health="loading"] b {
  color: var(--muted);
}

.health-badge[data-health="warning"] {
  border-color: rgba(255, 202, 104, 0.2);
  background: rgba(255, 202, 104, 0.08);
}

.health-badge[data-health="warning"] span {
  background: var(--amber);
  box-shadow: 0 0 9px rgba(255, 202, 104, 0.66);
}

.health-badge[data-health="warning"] b {
  color: #ffe0a3;
}

.health-badge[data-health="critical"],
.health-badge[data-health="offline"] {
  border-color: rgba(255, 111, 131, 0.22);
  background: rgba(255, 111, 131, 0.08);
}

.health-badge[data-health="critical"] span,
.health-badge[data-health="offline"] span {
  background: var(--red);
  box-shadow: 0 0 9px rgba(255, 111, 131, 0.62);
}

.health-badge[data-health="critical"] b,
.health-badge[data-health="offline"] b {
  color: #ffa7b5;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.metric-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(181, 208, 255, 0.085);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
}

.metric-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.metric-topline span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-topline strong {
  color: var(--text-soft);
  font-size: 1.05rem;
}

.metric-card progress {
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  appearance: none;
}

.metric-card progress::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.metric-card progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #7d9dff);
  transition: width 600ms var(--ease);
}

.metric-card progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), #7d9dff);
}

.metric-card[data-severity="warning"] .metric-topline strong {
  color: var(--amber);
}

.metric-card[data-severity="warning"] progress::-webkit-progress-value {
  background: linear-gradient(90deg, #ffdc83, #ff9c64);
}

.metric-card[data-severity="warning"] progress::-moz-progress-bar {
  background: linear-gradient(90deg, #ffdc83, #ff9c64);
}

.metric-card[data-severity="critical"] .metric-topline strong {
  color: var(--red);
}

.metric-card[data-severity="critical"] progress::-webkit-progress-value {
  background: linear-gradient(90deg, #ff899b, #ff526e);
}

.metric-card[data-severity="critical"] progress::-moz-progress-bar {
  background: linear-gradient(90deg, #ff899b, #ff526e);
}

.resource-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.resource-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.resource-icon {
  display: none;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(85, 231, 255, 0.07);
}

.resource-icon svg,
.alerts-title svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.resource-stat > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.resource-stat small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-stat strong {
  overflow: hidden;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alerts-box {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 202, 104, 0.16);
  border-radius: 13px;
  background: rgba(255, 202, 104, 0.055);
}

.alerts-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffe0a3;
  font-size: 0.8rem;
}

.alerts-title svg {
  stroke: var(--amber);
}

.alerts-box ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding: 0 0 0 18px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.health-updated {
  margin: 13px 0 0;
  color: #69758d;
  font-size: 0.72rem;
  text-align: right;
}

/* Voice-first interaction */
.consultation-progress {
  display: grid;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.consultation-step {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 6px;
  isolation: isolate;
  color: #6f7c94;
  font-size: 0.72rem;
  font-weight: 720;
  text-align: center;
}

.consultation-step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 13px;
  left: calc(50% + 17px);
  width: calc(100% - 34px);
  height: 1px;
  background: var(--line-strong);
}

.consultation-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #0a101d;
  color: #8794aa;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.consultation-step[aria-current="step"],
.consultation-step.is-active {
  color: var(--text);
}

.consultation-step[aria-current="step"] .consultation-marker,
.consultation-step.is-active .consultation-marker {
  border-color: rgba(85, 231, 255, 0.62);
  background: rgba(85, 231, 255, 0.13);
  box-shadow: 0 0 0 5px rgba(85, 231, 255, 0.06);
  color: var(--cyan-bright);
}

.consultation-step.is-complete .consultation-marker {
  border-color: rgba(77, 229, 172, 0.38);
  background: rgba(77, 229, 172, 0.1);
  color: #a8f6db;
}

.current-request {
  min-height: 78px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(181, 208, 255, 0.12);
  border-left: 3px solid rgba(85, 231, 255, 0.7);
  border-radius: 14px;
  background: rgba(4, 9, 18, 0.58);
}

.current-request p {
  margin: 0;
}

#currentRequestLabel {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 740;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#currentRequest {
  margin-top: 5px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.voice-console {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
}

.voice-playback-button {
  display: flex;
  min-height: 50px;
  margin: 0 auto;
  padding: 9px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(140, 116, 255, 0.32);
  border-radius: 999px;
  background: rgba(140, 116, 255, 0.12);
  color: #ded5ff;
  font-size: 0.84rem;
  font-weight: 720;
}

.voice-playback-button:hover,
.voice-playback-button:focus-visible {
  border-color: rgba(85, 231, 255, 0.5);
  background: rgba(85, 231, 255, 0.1);
  color: var(--cyan-bright);
}

.voice-playback-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.voice-playback-button[data-playing="true"] svg {
  animation: status-blink 0.75s ease-in-out infinite;
}

.voice-playback-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.voice-response-controls {
  min-height: 28px;
  margin-top: 14px;
}

.last-reply {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.last-reply summary {
  min-height: 48px;
  padding: 15px 2px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  cursor: pointer;
}

.last-reply[open] summary {
  color: var(--text-soft);
}

.last-reply p {
  margin: 0 0 8px;
  padding: 0 2px 5px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Safe restart card */
.restart-card {
  margin: 0;
  padding: 15px;
  border: 1px solid rgba(255, 202, 104, 0.23);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(56, 42, 17, 0.54), rgba(20, 18, 19, 0.74));
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  animation: message-in 300ms var(--ease) both;
}

.restart-card > header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.restart-card h3 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.restart-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 202, 104, 0.22);
  border-radius: 13px;
  background: rgba(255, 202, 104, 0.08);
}

.restart-icon svg,
.danger-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.restart-summary {
  margin: 13px 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.impact-grid {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

.impact-grid > div {
  display: grid;
  grid-template-columns: minmax(82px, 0.42fr) 1fr;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.impact-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.impact-grid dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.7rem;
}

.confirmation-box {
  display: grid;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 202, 104, 0.16);
}

.confirmation-box label {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 650;
}

.confirmation-box code {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  overflow-x: auto;
  border-radius: 7px;
  background: rgba(255, 202, 104, 0.08);
  color: #ffdda0;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

.confirmation-box input {
  min-height: 49px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  background: rgba(3, 6, 12, 0.62);
  color: var(--text);
}

.confirmation-box input:focus {
  border-color: rgba(255, 202, 104, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 202, 104, 0.08);
}

.confirmation-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
}

.restart-actions {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
  margin-top: 13px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.danger-button {
  display: flex;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 111, 131, 0.3);
  background: rgba(255, 111, 131, 0.12);
  color: #ffc1cb;
}

.danger-button svg {
  width: 17px;
  stroke: currentColor;
}

.danger-button:not(:disabled):hover,
.danger-button:not(:disabled):focus-visible {
  border-color: rgba(255, 111, 131, 0.52);
  background: rgba(255, 111, 131, 0.18);
}

/* Composer */
.composer {
  display: grid;
  gap: 8px;
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.composer-label {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 680;
}

.composer-field {
  display: flex;
  min-height: 54px;
  align-items: flex-end;
  gap: 7px;
  padding: 5px 5px 5px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(3, 7, 14, 0.56);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer-field:focus-within {
  border-color: rgba(85, 231, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(85, 231, 255, 0.055);
}

.composer-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  max-height: 130px;
  padding: 10px 0 8px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.45;
}

.send-button {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(85, 231, 255, 0.3);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(85, 231, 255, 0.24), rgba(140, 116, 255, 0.24));
  transition: transform 160ms var(--ease), background 160ms ease;
}

.send-button:not(:disabled):active {
  transform: scale(0.94);
}

.send-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--cyan-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mic-button {
  position: relative;
  display: flex;
  width: min(100%, 360px);
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 22px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: visible;
  border: 1px solid rgba(85, 231, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(32, 123, 157, 0.26), rgba(92, 72, 166, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 11px 26px rgba(0, 0, 0, 0.2);
  color: #dffbff;
  font-size: 0.96rem;
  font-weight: 720;
  touch-action: none;
  user-select: none;
  transition: transform 160ms var(--ease), border-color 160ms ease, background 160ms ease;
}

.mic-button:not(:disabled):hover,
.mic-button:not(:disabled):focus-visible {
  border-color: rgba(85, 231, 255, 0.5);
  background: linear-gradient(120deg, rgba(32, 145, 181, 0.31), rgba(100, 77, 179, 0.29));
}

.mic-button[aria-pressed="true"] {
  border-color: rgba(77, 229, 172, 0.6);
  background: linear-gradient(120deg, rgba(31, 153, 119, 0.3), rgba(43, 129, 174, 0.28));
  transform: scale(0.985);
}

.mic-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(85, 231, 255, 0.11);
}

.mic-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--cyan-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mic-button[aria-pressed="true"] .mic-icon {
  background: rgba(77, 229, 172, 0.15);
}

.mic-button[aria-pressed="true"] .mic-icon svg {
  stroke: #aff7dd;
}

.mic-ripple {
  position: absolute;
  left: 50%;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(77, 229, 172, 0.44);
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.mic-button[aria-pressed="true"] .mic-ripple {
  animation: mic-ripple 1.3s ease-out infinite;
}

.composer-hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.app-footer {
  display: flex;
  min-height: 38px;
  padding: 9px 3px 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #5e6980;
  font-size: 0.62rem;
}

.app-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-footer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* Feedback */
.connection-banner {
  position: fixed;
  z-index: 100;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  min-height: 40px;
  max-width: calc(100% - 24px);
  padding: 8px 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 202, 104, 0.28);
  border-radius: 999px;
  background: rgba(26, 24, 20, 0.92);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.36);
  color: #ffe2aa;
  font-size: 0.72rem;
  font-weight: 670;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.connection-banner-dot {
  background: var(--amber);
  box-shadow: 0 0 9px rgba(255, 202, 104, 0.66);
  animation: status-blink 1.2s ease-in-out infinite;
}

.toast-region {
  position: fixed;
  z-index: 110;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  width: min(390px, calc(100% - 28px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  min-height: 48px;
  padding: 11px 13px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(13, 20, 34, 0.94);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.38);
  color: var(--text-soft);
  font-size: 0.76rem;
  animation: toast-in 260ms var(--ease) both;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(85, 231, 255, 0.58);
}

.toast[data-tone="error"] {
  border-color: rgba(255, 111, 131, 0.28);
}

.toast[data-tone="error"]::before {
  background: var(--red);
  box-shadow: 0 0 9px rgba(255, 111, 131, 0.58);
}

.toast[data-tone="success"]::before {
  background: var(--green);
  box-shadow: 0 0 9px rgba(77, 229, 172, 0.58);
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

@keyframes login-breathe {
  0%, 100% { transform: scale(0.92); filter: brightness(0.9); }
  50% { transform: scale(1.08); filter: brightness(1.12); }
}

@keyframes core-spin {
  to { transform: rotate(360deg); }
}

@keyframes core-breathe {
  0%, 100% { transform: scale(0.93); filter: brightness(0.9); }
  50% { transform: scale(1.06); filter: brightness(1.1); }
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.52; transform: scale(0.96); }
  50% { opacity: 0.95; transform: scale(1.03); }
}

@keyframes listen-pulse {
  from { transform: scale(0.92); }
  to { transform: scale(1.12); filter: brightness(1.14); }
}

@keyframes wave-out {
  0% { opacity: 0.65; transform: scale(0.42); }
  75%, 100% { opacity: 0; transform: scale(2.2); }
}

@keyframes think-morph {
  0%, 100% { transform: scale(0.94) rotate(-4deg); border-radius: 48% 52% 47% 53%; }
  50% { transform: scale(1.06) rotate(4deg); border-radius: 54% 46% 55% 45%; }
}

@keyframes speaking-pulse {
  from { transform: scale(0.9); filter: brightness(0.93); }
  to { transform: scale(1.12); filter: brightness(1.18); }
}

@keyframes speak-rock {
  from { transform: rotate(-8deg); }
  to { transform: rotate(11deg); }
}

@keyframes error-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes status-blink {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 1; }
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.38; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes mic-ripple {
  from { opacity: 0.7; transform: translateX(-50%) scale(0.75); }
  to { opacity: 0; transform: translateX(-50%) scale(1.45); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 520px) {
  .assistant-view {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .resource-icon {
    display: grid;
  }

  .agent-stage {
    padding: 26px 24px 22px;
  }

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

  .impact-grid > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
  }
}

@media (min-width: 820px) {
  .assistant-view {
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .app-header {
    min-height: 65px;
    padding-bottom: 15px;
  }

  .workspace {
    grid-template-columns: minmax(440px, 1.25fr) minmax(280px, 0.75fr);
    align-items: stretch;
    gap: 16px;
  }

  .agent-stage {
    grid-column: 1;
    grid-row: 1;
    min-height: 540px;
    padding: 28px 24px;
    grid-template-columns: minmax(145px, 0.65fr) minmax(205px, 1.35fr);
    align-items: center;
    gap: 20px;
  }

  .agent-presence {
    height: 100%;
    padding: 0 20px 0 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .agent-state-copy h1 {
    font-size: 1.55rem;
  }

  .agent-dialogue {
    height: 100%;
  }

  .health-panel {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
  }

  .restart-card {
    grid-column: 1 / -1;
  }

  .app-footer {
    padding-top: 5px;
  }
}

@media (min-width: 1200px) {
  .workspace {
    grid-template-columns: minmax(650px, 1.35fr) minmax(380px, 0.65fr);
    gap: 18px;
  }

  .agent-stage {
    min-height: 550px;
    padding: 32px;
    grid-template-columns: minmax(205px, 0.72fr) minmax(360px, 1.28fr);
    gap: 32px;
  }

  .agent-core {
    width: 148px;
    height: 148px;
  }

  .core-shell {
    inset: 43px;
  }

  .agent-state-copy h1 {
    font-size: 1.8rem;
  }

  .health-panel {
    padding: 26px 22px 20px;
  }
}

@media (max-width: 390px) {
  .connection-pill {
    padding-right: 8px;
    padding-left: 8px;
  }

  .brand-copy small {
    display: none;
  }

  .agent-stage {
    padding: 19px 15px 17px;
    gap: 17px;
  }

  .agent-core {
    width: 116px;
    height: 116px;
  }

  .core-shell {
    inset: 34px;
  }

  .agent-state-copy h1 {
    font-size: 1.48rem;
  }

  .agent-state-copy > p:last-child {
    font-size: 0.84rem;
  }

  .consultation-step {
    font-size: 0.67rem;
  }

  .current-request {
    min-height: 72px;
    padding: 12px 13px;
  }

  .mic-button {
    width: 100%;
  }

  .restart-actions {
    grid-template-columns: 1fr;
  }
}

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