:root {
  color-scheme: dark;
  --neo-bg: #050712;
  --neo-panel: rgba(18, 13, 48, 0.84);
  --neo-panel-strong: rgba(31, 16, 74, 0.94);
  --neo-line: rgba(122, 83, 255, 0.48);
  --neo-cyan: #2fe6d1;
  --neo-blue: #37a7ff;
  --neo-magenta: #c954ff;
  --neo-text: #f6f2ff;
  --neo-muted: #c8bbe8;
}

* {
  box-sizing: border-box;
}

body.neo-assistant-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 12%, rgba(201, 84, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 86% 76%, rgba(55, 167, 255, 0.18), transparent 30rem),
    linear-gradient(140deg, #04030d 0%, #0a0520 48%, #07111e 100%);
  color: var(--neo-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.neo-assistant-shell {
  width: min(760px, calc(100vw - 28px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 0 44px;
  display: flex;
  flex-direction: column;
}

.neo-assistant-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.neo-assistant-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.neo-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(197, 182, 175, 0.52);
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 28px rgba(47, 230, 209, 0.24);
}

.neo-mark svg {
  width: 27px;
  height: 27px;
}

.neo-assistant-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.neo-assistant-brand span {
  display: block;
  color: var(--neo-muted);
  font-size: 12px;
  margin-top: 2px;
}

.neo-back-link {
  border: 1px solid rgba(197, 182, 175, 0.32);
  border-radius: 999px;
  color: var(--neo-text);
  padding: 10px 14px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.neo-assistant-stage {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.neo-command-panel,
.neo-phone {
  border: 1px solid var(--neo-line);
  background: var(--neo-panel);
  box-shadow: 0 18px 72px rgba(0, 0, 0, 0.42), inset 0 0 48px rgba(99, 38, 190, 0.18);
}

.neo-command-panel {
  border-radius: 28px;
  padding: 28px;
  min-height: 680px;
}

.neo-kicker {
  margin: 0 0 8px;
  color: var(--neo-cyan);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.neo-command-panel h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.92;
  letter-spacing: 0;
}

.neo-lede {
  margin: 20px 0 24px;
  color: var(--neo-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 60ch;
}

.neo-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.neo-status-card {
  min-height: 92px;
  border: 1px solid rgba(55, 167, 255, 0.32);
  border-radius: 18px;
  background: rgba(5, 10, 30, 0.68);
  padding: 14px;
}

.neo-status-card span {
  display: block;
  color: var(--neo-muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.neo-status-card strong {
  display: block;
  color: var(--neo-text);
  font-size: 18px;
}

.neo-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.neo-tool-grid button,
.neo-send {
  appearance: none;
  border: 1px solid rgba(201, 84, 255, 0.52);
  border-radius: 16px;
  color: var(--neo-text);
  background: linear-gradient(160deg, rgba(74, 31, 142, 0.92), rgba(23, 18, 74, 0.92));
  min-height: 62px;
  padding: 14px;
  font: inherit;
  cursor: pointer;
}

.neo-tool-grid button:hover,
.neo-send:hover,
.neo-back-link:hover {
  border-color: var(--neo-cyan);
}

.neo-console {
  border: 1px solid rgba(47, 230, 209, 0.28);
  border-radius: 18px;
  background: rgba(3, 8, 24, 0.72);
  padding: 14px;
}

.neo-log {
  min-height: 118px;
  max-height: 180px;
  overflow: auto;
  color: #d9f8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.neo-command-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.neo-command-row input {
  width: 100%;
  border: 1px solid rgba(201, 84, 255, 0.44);
  border-radius: 14px;
  color: var(--neo-text);
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  font: inherit;
}

.neo-text-chat {
  margin-top: 14px;
  border: 1px solid rgba(47, 230, 209, 0.34);
  border-radius: 22px;
  background: rgba(3, 8, 24, 0.74);
  padding: 12px;
}

.neo-text-chat .neo-log {
  min-height: 52px;
  max-height: 92px;
  margin-bottom: 10px;
  font-size: 12px;
}

.neo-text-chat .neo-command-row {
  grid-template-columns: 1fr auto;
}

.neo-text-chat .neo-command-row input {
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
}

.neo-text-chat .neo-send {
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
}

.neo-phone {
  position: relative;
  border-radius: 52px;
  width: min(100%, 520px);
  min-height: min(820px, calc(100vh - 150px));
  padding: 38px 22px 26px;
  background:
    linear-gradient(180deg, rgba(99, 34, 175, 0.46), rgba(4, 5, 18, 0.84)),
    var(--neo-panel-strong);
}

.neo-phone:before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-radius: 46px;
  pointer-events: none;
}

.neo-dynamic-island {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 168px;
  height: 42px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #02020a;
  z-index: 2;
}

.neo-phone-inner {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  border: 1px solid rgba(47, 230, 209, 0.42);
  border-radius: 28px;
  padding: 18px;
  background: rgba(10, 5, 37, 0.72);
}

.neo-active-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eef5ff;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.neo-active-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--neo-cyan);
  box-shadow: 0 0 18px var(--neo-cyan);
}

.neo-avatar-frame {
  border: 1px solid rgba(47, 230, 209, 0.58);
  border-radius: 20px;
  overflow: hidden;
  background: #0d0c14;
}

.neo-anam-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5.2;
  overflow: hidden;
  background: #0d0c14;
}

.neo-anam-frame anam-agent,
.neo-anam-frame .neo-anam-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.neo-anam-frame anam-agent {
  display: block;
  z-index: 2;
  overflow: hidden;
  contain: layout paint;
}

.neo-anam-frame .neo-anam-fallback {
  display: block;
  object-fit: cover;
  object-position: 48% 18%;
  z-index: 1;
}

.neo-anam-frame.neo-anam-ready .neo-anam-fallback {
  opacity: 0;
  pointer-events: none;
}

.neo-anam-frame:not(.neo-anam-ready) anam-agent {
  opacity: 0;
}

.neo-talk {
  display: flex;
  justify-content: center;
  margin-top: -72px;
  margin-bottom: 34px;
  position: relative;
}

.neo-talk button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #201829;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 22px;
  cursor: pointer;
}

.neo-chip-row,
.neo-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.neo-chip,
.neo-mode {
  border: 1px solid rgba(55, 167, 255, 0.38);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--neo-muted);
  background: rgba(2, 9, 27, 0.66);
  font-size: 12px;
}

.neo-mode {
  flex: 1 1 120px;
  text-align: center;
  padding: 18px 10px;
  border-color: rgba(201, 84, 255, 0.44);
  background: rgba(60, 22, 115, 0.56);
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.neo-mode:hover,
.neo-mode:focus-visible {
  border-color: var(--neo-cyan);
  color: var(--neo-text);
}

.neo-note {
  margin-top: 16px;
  color: var(--neo-muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .neo-assistant-shell {
    width: min(480px, calc(100vw - 24px));
    padding: 18px 0 28px;
  }

  .neo-phone {
    min-height: calc(100vh - 126px);
    border-radius: 44px;
    padding: 36px 16px 22px;
  }

  .neo-phone:before {
    border-radius: 38px;
  }

  .neo-dynamic-island {
    width: 148px;
    height: 36px;
  }

  .neo-phone-inner {
    padding: 14px;
  }

  .neo-talk {
    margin-top: -62px;
    margin-bottom: 28px;
  }

  .neo-mode {
    flex-basis: 100%;
  }

  .neo-text-chat {
    padding: 10px;
  }

  .neo-text-chat .neo-command-row {
    grid-template-columns: 1fr;
  }

  .neo-text-chat .neo-send {
    width: 100%;
  }
}
