:root {
  --bg: #f6f7f7;
  --panel: #ffffff;
  --panel-soft: #f0f3f2;
  --ink: #111313;
  --muted: #626b68;
  --line: #dde3e1;
  --brand: #101214;
  --accent: #0f8f86;
  --accent-strong: #0a6f68;
  --amber: #d89213;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --warning-soft: #fff8e5;
  --ok-soft: #ebf8f5;
  --shadow: 0 18px 48px rgba(20, 24, 24, 0.12);
  --radius: 8px;
  --sidebar-width: 304px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Tahoma,
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  overflow: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  background:
    linear-gradient(90deg, rgba(15, 143, 134, 0.07), transparent 32%),
    var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: #101214;
  color: #f7f8f8;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark,
.empty-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

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

.brand-copy strong {
  font-size: 18px;
  line-height: 1.25;
}

.brand-copy span {
  color: rgba(247, 248, 248, 0.64);
  font-size: 12px;
  line-height: 1.4;
}

.new-chat-button,
.settings-button,
.conversation-item,
.prompt-grid button,
.send-button,
.icon-button,
.message-action,
.follow-up-button,
.settings-card button {
  border: 0;
  border-radius: var(--radius);
}

.new-chat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  color: #101214;
  background: #f7f8f8;
  font-weight: 700;
}

.new-chat-button span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #f7f8f8;
  background: var(--accent);
  font-size: 18px;
  line-height: 20px;
}

.conversation-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-left: 2px;
}

.conversation-item {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: rgba(247, 248, 248, 0.76);
  background: transparent;
  text-align: right;
}

.conversation-item:hover,
.conversation-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.conversation-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.45;
}

.conversation-item span {
  color: rgba(247, 248, 248, 0.48);
  font-size: 11px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(247, 248, 248, 0.72);
  font-size: 12px;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--amber);
}

.connection-state.ok .state-dot {
  background: var(--accent);
}

.connection-state.error .state-dot {
  background: var(--danger);
}

.settings-button {
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 34px;
  color: #f7f8f8;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.chat-panel {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) auto;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  background: rgba(246, 247, 247, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.topbar-title strong {
  font-size: 16px;
}

.topbar-title span {
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
}

.icon-button:hover {
  background: var(--panel-soft);
}

.menu-button {
  display: none;
}

.menu-button span,
.clear-button span,
.send-button span,
.close-button::before {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
}

.menu-button span {
  mask:
    linear-gradient(#000 0 0) top / 100% 2px no-repeat,
    linear-gradient(#000 0 0) center / 100% 2px no-repeat,
    linear-gradient(#000 0 0) bottom / 100% 2px no-repeat;
}

.clear-button span,
.close-button::before {
  mask:
    linear-gradient(45deg, transparent 45%, #000 46% 54%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, #000 46% 54%, transparent 55%);
}

.messages {
  min-width: 0;
  overflow: auto;
  padding: 32px max(22px, calc((100vw - var(--sidebar-width) - 860px) / 2)) 118px;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 100%;
  text-align: center;
}

.empty-state.hidden {
  display: none;
}

.empty-mark {
  width: 58px;
  height: 58px;
  box-shadow: var(--shadow);
}

.empty-state h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.05;
}

.empty-state p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(680px, 100%);
  margin-top: 8px;
}

.prompt-grid button {
  min-height: 54px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: right;
  line-height: 1.5;
}

.prompt-grid button:hover {
  border-color: rgba(15, 143, 134, 0.45);
  box-shadow: 0 10px 24px rgba(17, 19, 19, 0.08);
}

.message-row {
  display: flex;
  gap: 12px;
  width: min(860px, 100%);
  margin: 0 auto 18px;
}

.message-row.user {
  justify-content: flex-start;
}

.message-row.assistant {
  direction: ltr;
  justify-content: flex-start;
}

.message-row.assistant .message-stack,
.message-row.assistant .message-bubble {
  direction: rtl;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.message-row.user .avatar {
  background: var(--accent);
}

.message-bubble {
  min-width: 0;
  max-width: min(720px, calc(100% - 46px));
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(17, 19, 19, 0.06);
}

.message-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: min(720px, calc(100% - 46px));
}

.message-stack .message-bubble {
  max-width: 100%;
}

.message-row.user .message-bubble {
  color: #ffffff;
  background: var(--accent-strong);
  border-color: transparent;
  box-shadow: none;
}

.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  font-size: 15px;
}

.message-row.is-revealing .message-text::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1.15em;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: var(--accent);
  vertical-align: -0.18em;
  animation: assistant-reveal-caret 820ms ease-in-out infinite;
}

@keyframes assistant-reveal-caret {
  0%,
  100% {
    opacity: 0.24;
  }
  48% {
    opacity: 1;
  }
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.risk-badge,
.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.risk-low {
  color: #075e58;
  background: var(--ok-soft);
}

.risk-medium {
  color: #81550a;
  background: var(--warning-soft);
}

.risk-high,
.risk-emergency {
  color: var(--danger);
  background: var(--danger-soft);
}

.source-pill {
  color: var(--muted);
  background: var(--panel-soft);
  font-weight: 600;
}

.safety-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #4d4030;
  background: #fff8e5;
  line-height: 1.7;
  font-size: 13px;
}

.follow-ups,
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.follow-up-button,
.message-action {
  min-height: 32px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--panel-soft);
}

.message-action:hover {
  background: #e5ecea;
}

.follow-up-button {
  cursor: default;
  pointer-events: none;
  user-select: text;
}

.message-action[disabled] {
  cursor: default;
  opacity: 0.72;
}

.feedback-positive {
  color: #075e58;
  background: rgba(16, 163, 127, 0.1);
}

.feedback-negative {
  color: #7a3415;
  background: rgba(244, 183, 64, 0.14);
}

.message-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 7px;
  padding-inline-start: 6px;
}

.message-icon-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  color: #61706c;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(183, 198, 195, 0.72);
  box-shadow: 0 8px 18px rgba(17, 19, 19, 0.08);
}

.message-icon-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-icon-action:hover {
  color: var(--ink);
  background: #ffffff;
  border-color: rgba(15, 143, 134, 0.32);
}

.message-icon-action.is-confirmed,
.feedback-positive.is-selected {
  color: #075e58;
  background: rgba(16, 163, 127, 0.12);
  border-color: rgba(16, 163, 127, 0.24);
}

.feedback-negative.is-selected {
  color: #8f2419;
  background: rgba(180, 35, 24, 0.1);
  border-color: rgba(180, 35, 24, 0.22);
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 48px;
  height: 24px;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.typing span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 10px;
  width: min(900px, calc(100% - 44px));
  margin: 0 auto 20px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.composer textarea {
  width: 100%;
  max-height: 180px;
  min-height: 46px;
  resize: none;
  padding: 12px 14px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  line-height: 1.7;
}

.send-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: var(--brand);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.send-button span {
  mask:
    linear-gradient(135deg, transparent 48%, #000 49% 57%, transparent 58%) 7px 2px / 20px 20px no-repeat,
    linear-gradient(#000 0 0) 16px 8px / 3px 24px no-repeat,
    linear-gradient(45deg, transparent 48%, #000 49% 57%, transparent 58%) 7px 20px / 20px 20px no-repeat;
}

.settings-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.settings-dialog::backdrop {
  background: rgba(17, 19, 19, 0.42);
}

.settings-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
}

.settings-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-card label {
  color: var(--muted);
  font-size: 13px;
}

.settings-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  direction: ltr;
  text-align: left;
}

.settings-card menu {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.settings-card button {
  min-height: 38px;
  padding: 0 14px;
  background: var(--panel-soft);
}

.settings-card .save-button {
  color: #ffffff;
  background: var(--brand);
}

@media (max-width: 840px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 20;
    width: min(82vw, var(--sidebar-width));
    transform: translateX(105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .menu-button {
    display: grid;
  }

  .messages {
    padding: 22px 14px 116px;
  }

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

  .message-row {
    gap: 8px;
  }

  .avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .message-bubble {
    max-width: calc(100% - 38px);
    padding: 12px 13px;
  }

  .composer {
    width: calc(100% - 20px);
    margin-bottom: 10px;
  }
}

/* Creative product refresh */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(16, 18, 20, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(16, 18, 20, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(120deg, rgba(15, 143, 134, 0.11), transparent 42%),
    linear-gradient(300deg, rgba(216, 146, 19, 0.08), transparent 48%),
    #f7f8f7;
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(247, 248, 247, 0.86), rgba(247, 248, 247, 0.98) 34%, rgba(247, 248, 247, 0.9)),
    transparent;
}

.sidebar {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 34%),
    #101214;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 24px 24px;
  mask-image: linear-gradient(#000, transparent 78%);
}

.sidebar > * {
  position: relative;
}

.brand-block {
  padding: 4px 0 2px;
}

.brand-mark {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.brand-meter {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
}

.brand-meter span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: rgba(247, 248, 248, 0.78);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 700;
}

.new-chat-button {
  min-height: 46px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.conversation-list {
  padding: 2px 0 4px;
}

.conversation-item {
  border: 1px solid transparent;
}

.conversation-item:hover,
.conversation-item.active {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(17, 163, 154, 0.16), transparent),
    rgba(255, 255, 255, 0.07);
}

.clinical-rail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.clinical-rail div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.clinical-rail strong,
.clinical-rail span {
  display: block;
}

.clinical-rail strong {
  color: #f4b740;
  font-size: 18px;
  line-height: 1.1;
}

.clinical-rail span {
  margin-top: 3px;
  color: rgba(247, 248, 248, 0.64);
  font-size: 11px;
}

.topbar {
  position: relative;
  justify-content: center;
  min-height: 70px;
  background: rgba(247, 248, 247, 0.86);
}

.topbar .menu-button {
  position: absolute;
  right: 22px;
}

.topbar .clear-button {
  position: absolute;
  left: 22px;
}

.topbar-center {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
}

.icon-button {
  color: #101214;
  border: 1px solid transparent;
}

.icon-button:hover {
  border-color: rgba(16, 18, 20, 0.08);
}

.messages {
  padding-top: 26px;
  scrollbar-width: none;
}

.messages::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-shell.is-empty .clear-button {
  opacity: 0;
  pointer-events: none;
}

.empty-state {
  align-content: center;
  width: min(880px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 210px);
}

.empty-mark {
  width: 64px;
  height: 64px;
}

.empty-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid rgba(15, 143, 134, 0.18);
  border-radius: 999px;
  color: #0a6f68;
  background: rgba(235, 248, 245, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.empty-state h1 {
  letter-spacing: 0;
}

.empty-state p {
  color: #46524f;
  font-size: 17px;
}

.emotion-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.emotion-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(15, 143, 134, 0.16);
  border-radius: 999px;
  color: #263331;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(17, 19, 19, 0.055);
  font-size: 12px;
  font-weight: 800;
}

.emotion-strip span::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 999px;
  background: #0f8f86;
  box-shadow: 0 0 0 5px rgba(15, 143, 134, 0.12);
  animation: emotionPulse 2.2s ease-in-out infinite;
}

.prompt-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(920px, 100%);
  gap: 12px;
  align-items: stretch;
}

.prompt-grid button {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 148px;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    var(--panel);
  box-shadow: 0 18px 40px rgba(17, 19, 19, 0.075);
  transform-style: preserve-3d;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.prompt-grid button::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(16, 18, 20, 0.035) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(16, 18, 20, 0.028) 1px, transparent 1px) 0 0 / 18px 18px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.prompt-grid button::after {
  content: "";
  position: absolute;
  inset: auto 14px 0 14px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #0f8f86, #f4b740);
  opacity: 0.72;
}

.prompt-grid button:hover {
  transform: translateY(-4px) rotateX(1.2deg);
  box-shadow: 0 24px 54px rgba(17, 19, 19, 0.12);
}

.prompt-grid button:hover::before {
  opacity: 1;
}

.prompt-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: #101214;
  font-size: 12px;
  font-weight: 900;
}

.prompt-grid strong {
  color: #101214;
  font-size: 15px;
}

.prompt-grid button > span:last-child {
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.message-row {
  width: min(910px, 100%);
}

.message-bubble {
  border-color: rgba(16, 18, 20, 0.08);
  box-shadow: 0 18px 46px rgba(17, 19, 19, 0.075);
}

.message-row.assistant .message-bubble {
  position: relative;
  border-top: 3px solid rgba(15, 143, 134, 0.86);
}

.message-row.assistant.error .message-bubble {
  border-top-color: var(--danger);
}

.message-row.user .message-bubble {
  background:
    linear-gradient(135deg, rgba(17, 163, 154, 0.98), rgba(10, 111, 104, 0.98)),
    var(--accent-strong);
}

.avatar {
  box-shadow: 0 10px 24px rgba(17, 19, 19, 0.12);
}

.risk-badge,
.source-pill,
.follow-up-button,
.message-action {
  border: 1px solid rgba(16, 18, 20, 0.06);
}

.safety-note {
  border: 1px solid rgba(216, 146, 19, 0.18);
  background:
    linear-gradient(90deg, rgba(244, 183, 64, 0.16), rgba(255, 248, 229, 0.88)),
    #fff8e5;
}

.follow-up-button {
  color: #075e58;
  background: rgba(235, 248, 245, 0.82);
}

.source-pill {
  background: rgba(240, 243, 242, 0.86);
}

.composer {
  grid-template-columns: minmax(0, 1fr) 48px;
  grid-template-rows: auto auto;
  gap: 8px 10px;
  width: min(940px, calc(100% - 44px));
  padding: 9px;
  border-color: rgba(16, 18, 20, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.composer-toolbar {
  display: flex;
  grid-column: 1 / -1;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 2px 2px;
}

.composer-toolbar button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(16, 18, 20, 0.08);
  border-radius: 999px;
  color: #46524f;
  background: rgba(240, 243, 242, 0.8);
  font-size: 12px;
  font-weight: 800;
}

.composer-toolbar button:hover {
  color: #075e58;
  border-color: rgba(15, 143, 134, 0.28);
  background: rgba(235, 248, 245, 0.95);
}

.composer textarea {
  min-height: 48px;
  padding: 12px 14px;
}

.send-button {
  width: 48px;
  height: 48px;
  background:
    linear-gradient(135deg, #101214, #0a6f68),
    var(--brand);
}

.send-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(10, 111, 104, 0.28);
}

@media (max-width: 1180px) {
  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prompt-grid button {
    min-height: 118px;
  }
}

@media (max-width: 840px) {
  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 20;
    width: min(82vw, var(--sidebar-width));
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .topbar {
    min-height: 64px;
    padding: 0 12px;
  }

  .topbar .menu-button {
    right: 12px;
  }

  .topbar .clear-button {
    left: 12px;
  }

  .empty-state {
    align-content: start;
    min-height: auto;
    gap: 12px;
    padding-top: 6px;
  }

  .empty-mark {
    width: 58px;
    height: 58px;
  }

  .empty-state h1 {
    font-size: 38px;
  }

  .empty-state p {
    font-size: 15px;
  }

  .prompt-grid {
    gap: 10px;
  }

  .prompt-grid button {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 78px;
    padding: 12px;
  }

  .prompt-icon {
    grid-row: 1 / span 2;
  }

  .prompt-grid strong,
  .prompt-grid button > span:last-child {
    min-width: 0;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 46px;
    width: calc(100% - 18px);
    padding: 8px;
  }

  .composer-toolbar {
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .messages {
    padding: 18px 14px 122px;
  }

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

  .prompt-grid button {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    min-height: 118px;
  }

  .clinical-rail {
    grid-template-columns: 1fr;
  }

  .message-text {
    font-size: 14px;
  }
}

/* AI-grade visual layer */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(15, 143, 134, 0.08) 48%, transparent 54% 100%),
    repeating-linear-gradient(90deg, transparent 0 112px, rgba(16, 18, 20, 0.026) 113px 114px);
  opacity: 0.8;
}

.empty-state {
  gap: 12px;
}

.hero-system {
  position: relative;
  display: grid;
  place-items: center;
  width: min(560px, 100%);
  height: 264px;
  margin-bottom: 2px;
  perspective: 900px;
}

.hero-system::before,
.hero-system::after {
  content: "";
  position: absolute;
  width: 118px;
  height: 42px;
  border: 1px solid rgba(16, 18, 20, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(15, 143, 134, 0.18) 19% 22%, transparent 23% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.52));
  box-shadow: 0 20px 46px rgba(17, 19, 19, 0.08);
  transform: skewX(-10deg);
  opacity: 0.82;
}

.hero-system::before {
  right: 44px;
  top: 24px;
  animation: panelDrift 5.8s ease-in-out infinite;
}

.hero-system::after {
  left: 42px;
  bottom: 44px;
  animation: panelDrift 6.6s ease-in-out infinite reverse;
}

.neural-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.neural-path {
  fill: none;
  stroke: rgba(15, 143, 134, 0.24);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 8 12;
  animation: neuralFlow 6s linear infinite;
}

.neural-path-b {
  stroke: rgba(216, 146, 19, 0.22);
  animation-duration: 7.4s;
  animation-direction: reverse;
}

.neural-path-c {
  stroke: rgba(16, 18, 20, 0.15);
  animation-duration: 8.6s;
}

.neural-node {
  fill: #ffffff;
  stroke: rgba(15, 143, 134, 0.72);
  stroke-width: 2;
  transform-origin: center;
  animation: nodePulse 2.8s ease-in-out infinite;
}

.node-b,
.node-f {
  animation-delay: 0.42s;
}

.node-c,
.node-g {
  stroke: rgba(216, 146, 19, 0.75);
  animation-delay: 0.9s;
}

.core-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 292px;
  height: 220px;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(8, 19, 20, 0.78), rgba(8, 19, 20, 0.48) 38%, rgba(8, 19, 20, 0.16) 56%, transparent 72%),
    linear-gradient(rgba(20, 219, 203, 0.07) 1px, transparent 1px) 50% 36% / 18px 18px,
    linear-gradient(90deg, rgba(20, 219, 203, 0.06) 1px, transparent 1px) 50% 36% / 18px 18px,
    radial-gradient(ellipse at 50% 44%, rgba(20, 219, 203, 0.28), rgba(20, 219, 203, 0.06) 42%, transparent 68%),
    radial-gradient(ellipse at 50% 70%, rgba(244, 183, 64, 0.2), transparent 46%);
  box-shadow:
    0 38px 90px rgba(17, 19, 19, 0.14),
    0 0 58px rgba(15, 143, 134, 0.14);
  overflow: visible;
  transform: rotateX(0.8deg) rotateY(-1deg) translateZ(0);
  transform-style: preserve-3d;
}

.core-frame .corner {
  filter: drop-shadow(0 0 8px rgba(15, 143, 134, 0.4));
}

.ai-ring {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

.ai-ring-a {
  inset: 8px 0 18px;
  background:
    conic-gradient(
      from 0deg,
      transparent 0 13deg,
      rgba(15, 143, 134, 0.58) 13deg 21deg,
      transparent 21deg 74deg,
      rgba(216, 146, 19, 0.48) 74deg 84deg,
      transparent 84deg 166deg,
      rgba(15, 143, 134, 0.46) 166deg 176deg,
      transparent 176deg 280deg,
      rgba(16, 18, 20, 0.22) 280deg 292deg,
      transparent 292deg 360deg
    );
  mask: radial-gradient(ellipse, transparent 0 64%, #000 65% 68%, transparent 69%);
  transform: rotateX(64deg) translateY(56px);
  animation: orbitSpin 15s linear infinite;
}

.ai-ring-b {
  inset: 28px 28px 44px;
  background:
    conic-gradient(
      from 70deg,
      rgba(16, 18, 20, 0.22) 0 12deg,
      transparent 12deg 94deg,
      rgba(15, 143, 134, 0.5) 94deg 104deg,
      transparent 104deg 220deg,
      rgba(216, 146, 19, 0.5) 220deg 232deg,
      transparent 232deg 360deg
    );
  mask: radial-gradient(ellipse, transparent 0 62%, #000 63% 67%, transparent 68%);
  transform: rotateX(66deg) translateY(38px);
  animation: orbitSpin 11s linear infinite reverse;
}

.ai-ring-c {
  inset: 42px 52px 58px;
  border: 1px solid rgba(15, 143, 134, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(15, 143, 134, 0.04),
    0 0 28px rgba(20, 219, 203, 0.18);
  transform: rotateX(62deg) translateY(28px);
  animation: holoRingBreathe 3.4s ease-in-out infinite;
}

.core-frame::before {
  content: "";
  position: absolute;
  inset: 28px 30px 56px;
  border: 1px solid rgba(20, 219, 203, 0.18);
  border-radius: 999px;
  box-shadow:
    inset 0 0 30px rgba(20, 219, 203, 0.08),
    0 0 26px rgba(20, 219, 203, 0.12);
  transform: rotateX(58deg) translateY(30px);
  animation: holoFrameBreathe 3.8s ease-in-out infinite;
}

.core-frame::after {
  content: "";
  position: absolute;
  inset: 6px 28px 32px;
  border: 1px solid rgba(20, 219, 203, 0.08);
  border-top-color: rgba(20, 219, 203, 0.3);
  border-bottom-color: rgba(244, 183, 64, 0.18);
  border-radius: 999px;
  transform: rotateX(12deg);
  animation: holoShellBreathe 4.4s ease-in-out infinite reverse;
}

.core-frame .empty-mark {
  position: relative;
  z-index: 6;
  width: 76px;
  height: 76px;
  opacity: 0.9;
  box-shadow: 0 18px 46px rgba(17, 19, 19, 0.18);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.brain-canvas {
  position: absolute;
  inset: -10px 10px 18px;
  z-index: 6;
  width: calc(100% - 20px);
  height: calc(100% - 8px);
  border-radius: 8px;
  opacity: 0;
  filter:
    drop-shadow(0 0 12px rgba(20, 219, 203, 0.34))
    drop-shadow(0 0 26px rgba(20, 219, 203, 0.16))
    drop-shadow(0 0 28px rgba(244, 183, 64, 0.12));
  transform: translateZ(12px);
  transition: opacity 0.55s ease;
}

.brain-orbit {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  border-radius: 999px;
  border: 1px solid rgba(20, 219, 203, 0.18);
  box-shadow:
    inset 0 0 18px rgba(20, 219, 203, 0.08),
    0 0 18px rgba(20, 219, 203, 0.08);
}

.brain-orbit-a {
  width: 176px;
  height: 74px;
  transform: rotate(-16deg) rotateX(70deg);
  animation: brainOrbitA 6.5s ease-in-out infinite;
}

.brain-orbit-b {
  width: 136px;
  height: 206px;
  border-color: rgba(244, 183, 64, 0.2);
  transform: rotate(22deg) rotateY(64deg);
  animation: brainOrbitB 7.8s ease-in-out infinite;
}

.brain-base {
  position: absolute;
  right: 50%;
  bottom: 24px;
  z-index: 5;
  width: 156px;
  height: 20px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(20, 219, 203, 0.54), rgba(244, 183, 64, 0.42), transparent),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.72), transparent 64%);
  box-shadow:
    0 0 22px rgba(20, 219, 203, 0.28),
    0 12px 28px rgba(17, 19, 19, 0.12);
  transform: translateX(50%) perspective(120px) rotateX(64deg);
}

.core-frame.brain-ready .brain-canvas {
  opacity: 1;
}

.core-frame.brain-ready .empty-mark {
  visibility: hidden;
  opacity: 0;
  transform: scale(0.72);
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(15, 143, 134, 0.72);
  z-index: 3;
}

.corner-a {
  inset: -7px auto auto -7px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.corner-b {
  inset: -7px -7px auto auto;
  border-top: 2px solid;
  border-right: 2px solid;
}

.corner-c {
  inset: auto auto -7px -7px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.corner-d {
  inset: auto -7px -7px auto;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.scanline {
  position: absolute;
  inset: 14px;
  z-index: 7;
  border-radius: 8px;
  background: linear-gradient(180deg, transparent, rgba(17, 163, 154, 0.32), transparent);
  height: 24px;
  opacity: 0.78;
  animation: scanMove 3.2s ease-in-out infinite;
}

.signal-stack {
  position: absolute;
  display: grid;
  gap: 5px;
  width: 74px;
  padding: 8px;
  border: 1px solid rgba(16, 18, 20, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 40px rgba(17, 19, 19, 0.08);
}

.signal-stack-a {
  right: 30px;
  top: 44px;
}

.signal-stack-b {
  left: 34px;
  bottom: 40px;
}

.signal-stack span {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 143, 134, 0.12), rgba(15, 143, 134, 0.92));
  transform-origin: right center;
  animation: signalLoad 1.9s ease-in-out infinite;
}

.signal-stack span:nth-child(2) {
  animation-delay: 0.22s;
  background: linear-gradient(90deg, rgba(216, 146, 19, 0.1), rgba(216, 146, 19, 0.84));
}

.signal-stack span:nth-child(3) {
  animation-delay: 0.42s;
}

.voice-wave {
  position: absolute;
  inset: auto auto 14px 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 180px;
  height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(16, 18, 20, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(17, 19, 19, 0.08);
  transform: translateX(-50%);
}

.voice-wave span {
  width: 4px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0f8f86, #f4b740);
  animation: voiceWave 1.25s ease-in-out infinite;
}

.voice-wave span:nth-child(2),
.voice-wave span:nth-child(8) {
  animation-delay: 0.08s;
}

.voice-wave span:nth-child(3),
.voice-wave span:nth-child(7) {
  animation-delay: 0.16s;
}

.voice-wave span:nth-child(4),
.voice-wave span:nth-child(6) {
  animation-delay: 0.24s;
}

.voice-wave span:nth-child(5) {
  animation-delay: 0.32s;
}

.data-burst {
  position: absolute;
  display: grid;
  gap: 6px;
}

.data-burst-a {
  right: 116px;
  bottom: 26px;
}

.data-burst-b {
  left: 120px;
  top: 32px;
}

.data-burst span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: rgba(16, 18, 20, 0.18);
  animation: dataBlink 2.4s ease-in-out infinite;
}

.data-burst span:nth-child(2) {
  width: 38px;
  background: rgba(15, 143, 134, 0.52);
  animation-delay: 0.22s;
}

.data-burst span:nth-child(3) {
  width: 18px;
  background: rgba(216, 146, 19, 0.62);
  animation-delay: 0.46s;
}

.prompt-icon {
  position: relative;
  overflow: hidden;
}

.prompt-icon::before,
.prompt-icon::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: #ffffff;
}

.prompt-icon-symptom::before {
  height: 3px;
  inset: 16px 7px auto;
  border-radius: 999px;
  box-shadow:
    -7px 0 0 #ffffff,
    7px 0 0 #ffffff;
}

.prompt-icon-symptom::after {
  inset: 8px 15px;
  border-radius: 999px;
}

.prompt-icon-alert::before {
  inset: 7px 16px 10px;
  border-radius: 999px;
}

.prompt-icon-alert::after {
  inset: auto 14px 7px;
  height: 4px;
  border-radius: 999px;
}

.prompt-icon-lab::before {
  inset: 7px 12px 11px;
  border-radius: 1px 1px 8px 8px;
}

.prompt-icon-lab::after {
  inset: 9px 16px auto;
  height: 8px;
  border-radius: 1px;
  background: #101214;
  box-shadow: 0 12px 0 rgba(244, 183, 64, 0.95);
}

.prompt-icon-child::before {
  inset: 7px 11px 16px;
  border-radius: 999px;
}

.prompt-icon-child::after {
  inset: 18px 9px 7px;
  border-radius: 8px 8px 4px 4px;
}

.prompt-grid button:hover .prompt-icon {
  animation: iconLift 520ms ease;
}

.prompt-grid button:hover .prompt-icon::before,
.prompt-grid button:hover .prompt-icon::after {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.36));
}

.composer {
  position: relative;
  overflow: hidden;
}

.composer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(15, 143, 134, 0.18), transparent);
  transform: translateX(120%);
  animation: composerSweep 5.4s ease-in-out infinite;
}

.composer:focus-within {
  border-color: rgba(15, 143, 134, 0.34);
  box-shadow:
    0 24px 70px rgba(17, 19, 19, 0.16),
    0 0 0 4px rgba(15, 143, 134, 0.08);
}

.send-button:not(:disabled) {
  animation: sendReady 2.8s ease-in-out infinite;
}

.message-row.assistant .avatar {
  color: transparent;
  background:
    url("../assets/shagal-mark.svg") center / 100% 100% no-repeat,
    var(--brand);
  box-shadow: 0 14px 34px rgba(15, 143, 134, 0.18);
}

.message-row[data-typing="true"] .message-bubble {
  position: relative;
  overflow: hidden;
  border-color: rgba(15, 143, 134, 0.22);
}

.message-row[data-typing="true"] .message-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent, rgba(15, 143, 134, 0.12), transparent),
    linear-gradient(rgba(16, 18, 20, 0.03) 1px, transparent 1px) 0 0 / 16px 16px;
  animation: thinkingSweep 1.8s ease-in-out infinite;
}

@keyframes neuralFlow {
  to {
    stroke-dashoffset: -120;
  }
}

@keyframes panelDrift {
  0%,
  100% {
    opacity: 0.58;
    transform: translateY(0) skewX(-10deg);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-8px) skewX(-10deg);
  }
}

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

@keyframes orbitSpin {
  from {
    transform: rotateX(64deg) translateY(48px) rotateZ(0deg);
  }

  to {
    transform: rotateX(64deg) translateY(48px) rotateZ(360deg);
  }
}

@keyframes ringBreathe {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes holoRingBreathe {
  0%,
  100% {
    opacity: 0.48;
    transform: rotateX(62deg) translateY(28px) scale(0.98);
  }

  50% {
    opacity: 0.92;
    transform: rotateX(62deg) translateY(28px) scale(1.04);
  }
}

@keyframes holoFrameBreathe {
  0%,
  100% {
    opacity: 0.46;
    transform: rotateX(58deg) translateY(30px) scale(0.97);
  }

  50% {
    opacity: 0.98;
    transform: rotateX(58deg) translateY(30px) scale(1.03);
  }
}

@keyframes holoShellBreathe {
  0%,
  100% {
    opacity: 0.38;
    transform: rotateX(12deg) scale(0.98);
  }

  50% {
    opacity: 0.78;
    transform: rotateX(12deg) scale(1.03);
  }
}

@keyframes brainOrbitA {
  0%,
  100% {
    opacity: 0.42;
    transform: rotate(-18deg) rotateX(70deg) scale(0.96);
  }

  50% {
    opacity: 0.82;
    transform: rotate(14deg) rotateX(70deg) scale(1.03);
  }
}

@keyframes brainOrbitB {
  0%,
  100% {
    opacity: 0.34;
    transform: rotate(24deg) rotateY(64deg) scale(0.98);
  }

  50% {
    opacity: 0.72;
    transform: rotate(-10deg) rotateY(64deg) scale(1.04);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    opacity: 0.52;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.55);
  }
}

@keyframes frameBreathe {
  0%,
  100% {
    opacity: 0.48;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

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

@keyframes scanMove {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0;
  }

  18%,
  82% {
    opacity: 0.8;
  }

  50% {
    transform: translateY(68px);
  }
}

@keyframes signalLoad {
  0%,
  100% {
    transform: scaleX(0.32);
    opacity: 0.46;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes voiceWave {
  0%,
  100% {
    height: 8px;
    opacity: 0.46;
  }

  50% {
    height: 24px;
    opacity: 1;
  }
}

@keyframes dataBlink {
  0%,
  100% {
    opacity: 0.34;
    transform: translateX(0);
  }

  50% {
    opacity: 1;
    transform: translateX(-6px);
  }
}

@keyframes emotionPulse {
  0%,
  100% {
    opacity: 0.56;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.22);
  }
}

@keyframes iconLift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes composerSweep {
  0%,
  72% {
    transform: translateX(120%);
  }

  100% {
    transform: translateX(-120%);
  }
}

@keyframes sendReady {
  0%,
  100% {
    box-shadow: none;
  }

  50% {
    box-shadow: 0 0 0 5px rgba(15, 143, 134, 0.1);
  }
}

@keyframes thinkingSweep {
  0%,
  100% {
    transform: translateX(96%);
    opacity: 0;
  }

  50% {
    transform: translateX(-96%);
    opacity: 1;
  }
}

@media (max-width: 840px) {
  .hero-system {
    height: 198px;
    margin: 10px 0 -2px;
    transform: none;
    overflow: visible;
  }

  .hero-system::before,
  .hero-system::after {
    display: none;
  }

  .neural-map {
    opacity: 0.42;
  }

  .signal-stack {
    display: none;
  }

  .voice-wave {
    width: 128px;
    height: 28px;
    bottom: 0;
    padding: 6px 9px;
  }

  .voice-wave span {
    width: 3px;
  }

  .data-burst {
    display: none;
  }

  .core-frame {
    width: 196px;
    height: 152px;
  }

  .ai-ring-a {
    inset: -22px;
  }

  .ai-ring-b {
    inset: -14px;
  }

  .ai-ring-c {
    inset: -5px;
  }

  .core-frame::before {
    inset: -9px;
  }

  .core-frame::after {
    inset: 8px;
  }

  .core-frame .empty-mark {
    width: 54px;
    height: 54px;
  }

  .brain-canvas {
    inset: -8px 4px 16px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
  }

  .brain-orbit-a {
    width: 126px;
    height: 52px;
  }

  .brain-orbit-b {
    width: 96px;
    height: 146px;
  }

  .brain-base {
    bottom: 18px;
    width: 112px;
    height: 16px;
  }

  .corner {
    width: 18px;
    height: 18px;
  }

  .scanline {
    inset: 10px;
    height: 18px;
  }

  .emotion-strip {
    margin-top: 0;
  }
}

/* Video-led AI hero */
.hero-system {
  height: 286px;
}

.intro-stage .hero-system {
  width: min(560px, 100%);
}

.core-frame {
  width: 390px;
  height: 244px;
  border: 1px solid rgba(20, 219, 203, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(216, 255, 249, 0.06) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(216, 255, 249, 0.05) 1px, transparent 1px) 0 0 / 18px 18px,
    #071313;
  box-shadow:
    0 34px 90px rgba(17, 19, 19, 0.18),
    0 0 48px rgba(20, 219, 203, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: rotateX(0.7deg) rotateY(-1deg);
}

.core-frame::before {
  inset: 14px;
  z-index: 7;
  border: 1px solid rgba(20, 219, 203, 0.2);
  border-radius: 8px;
  box-shadow:
    inset 0 0 34px rgba(20, 219, 203, 0.08),
    0 0 26px rgba(20, 219, 203, 0.1);
  transform: none;
  animation: frameBreathe 4.2s ease-in-out infinite;
}

.core-frame::after {
  inset: auto 86px 18px;
  z-index: 8;
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(20, 219, 203, 0.62), rgba(244, 183, 64, 0.5), transparent);
  opacity: 0.72;
  transform: none;
  animation: stageTrace 2.4s ease-in-out infinite;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  filter: saturate(1.12) contrast(1.08) brightness(0.92);
}

.video-vignette,
.video-glass,
.core-grid,
.core-aura {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.video-vignette {
  z-index: 5;
  background:
    linear-gradient(90deg, rgba(7, 19, 19, 0.72), rgba(7, 19, 19, 0.08) 36%, rgba(7, 19, 19, 0.12) 62%, rgba(7, 19, 19, 0.78)),
    linear-gradient(180deg, rgba(7, 19, 19, 0.58), transparent 35%, rgba(7, 19, 19, 0.6));
}

.video-glass {
  z-index: 6;
  background:
    linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, 0.12) 44%, transparent 50% 100%),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 100% 8px;
  mix-blend-mode: screen;
  opacity: 0.46;
  animation: videoGlassSweep 7.5s ease-in-out infinite;
}

.core-grid {
  z-index: 6;
  background:
    linear-gradient(rgba(20, 219, 203, 0.09) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(20, 219, 203, 0.07) 1px, transparent 1px) 0 0 / 20px 20px;
  opacity: 0.58;
}

.core-aura {
  z-index: 6;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(20, 219, 203, 0.12), transparent 52%),
    radial-gradient(ellipse at 50% 70%, rgba(244, 183, 64, 0.12), transparent 40%);
  opacity: 0.86;
}

.core-pulse {
  position: absolute;
  z-index: 7;
  border: 1px solid rgba(20, 219, 203, 0.24);
  border-radius: 999px;
  pointer-events: none;
}

.core-pulse-a {
  width: 230px;
  height: 66px;
  transform: rotate(-7deg);
  animation: corePulseA 6.5s ease-in-out infinite;
}

.core-pulse-b {
  width: 288px;
  height: 88px;
  border-color: rgba(244, 183, 64, 0.18);
  transform: rotate(7deg);
  animation: corePulseB 8s ease-in-out infinite;
}

.core-pulse-c {
  width: 178px;
  height: 178px;
  border-color: rgba(255, 255, 255, 0.1);
  opacity: 0.52;
  animation: ringBreathe 4s ease-in-out infinite;
}

.core-base {
  display: none;
}

.core-base::before {
  display: none;
}

.core-frame .empty-mark {
  display: none;
}

.voice-wave {
  display: none;
}

.ai-ring-a {
  inset: -44px -20px 12px;
  z-index: 2;
  opacity: 0.54;
}

.ai-ring-b {
  inset: 18px 32px 42px;
  z-index: 3;
  opacity: 0.62;
}

.ai-ring-c {
  inset: 38px 60px 58px;
  z-index: 3;
  opacity: 0.68;
}

.scanline {
  z-index: 10;
  inset: 22px 26px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(28, 226, 210, 0.16), transparent);
}

.corner {
  z-index: 11;
}

@keyframes videoGlassSweep {
  0%,
  100% {
    transform: translateX(18%);
    opacity: 0.34;
  }

  50% {
    transform: translateX(-18%);
    opacity: 0.58;
  }
}

@keyframes corePulseA {
  0%,
  100% {
    opacity: 0.42;
    transform: rotate(-8deg) scale(0.98);
  }

  50% {
    opacity: 0.78;
    transform: rotate(3deg) scale(1.04);
  }
}

@keyframes corePulseB {
  0%,
  100% {
    opacity: 0.36;
    transform: rotate(9deg) scale(0.98);
  }

  50% {
    opacity: 0.68;
    transform: rotate(-4deg) scale(1.03);
  }
}

@keyframes titleNeonFlow {
  from {
    background-position:
      0 0,
      80px 20px,
      170px 0,
      0 0,
      0 0;
  }

  to {
    background-position:
      220px 34px,
      -90px 18px,
      30px 50px,
      -240% 0,
      160% 0;
  }
}

@keyframes titleParticleSweep {
  from {
    background-position: 0 0, 0 0;
    opacity: 0.42;
  }

  50% {
    opacity: 0.72;
  }

  to {
    background-position: -180% 0, 0 -160%;
    opacity: 0.46;
  }
}

@media (max-width: 840px) {
  .hero-system {
    height: 222px;
  }

  .core-frame {
    width: 292px;
    height: 184px;
  }

  .core-pulse-a {
    width: 164px;
    height: 48px;
  }

  .core-pulse-b {
    width: 212px;
    height: 64px;
  }

  .core-pulse-c {
    width: 128px;
    height: 128px;
  }

  .core-base {
    display: none;
  }

  .core-base::before {
    display: none;
  }

  .core-frame::before {
    inset: 12px;
  }

  .core-frame::after {
    inset: auto 56px 14px;
    height: 16px;
  }
}

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

/* Exact AI video hero */
.intro-stage.ai-text-stage {
  display: block !important;
  position: relative !important;
  width: min(1080px, 100%) !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  box-shadow: none !important;
  isolation: isolate !important;
}

.intro-stage.ai-text-stage::before,
.intro-stage.ai-text-stage::after,
.ai-text-stage .stage-field,
.ai-text-stage .stage-video-shade,
.ai-text-stage .hero-system,
.ai-text-stage .stage-copy {
  content: none !important;
  display: none !important;
}

.ai-text-stage .stage-video-bg {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

@media (max-width: 840px) {
  .intro-stage.ai-text-stage {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }
}

/* Actual final immersive AI video override */
.chat-panel {
  position: relative !important;
  overflow: hidden !important;
  background: #02050a !important;
}

.messages {
  position: relative !important;
  z-index: 1 !important;
  padding: 0 clamp(14px, 4vw, 54px) 122px !important;
  background: transparent !important;
}

.empty-state {
  position: relative !important;
  min-height: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
}

.empty-state::after {
  content: "" !important;
  display: block !important;
  position: fixed !important;
  inset: 64px var(--sidebar-width) 0 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgba(2, 5, 10, 0.1), transparent 36%, rgba(2, 5, 10, 0.74)),
    linear-gradient(90deg, rgba(2, 5, 10, 0.28), transparent 30%, transparent 68%, rgba(2, 5, 10, 0.42)) !important;
}

.intro-stage.ai-text-stage {
  display: block !important;
  position: fixed !important;
  inset: 64px var(--sidebar-width) 0 0 !important;
  z-index: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #02050a !important;
  box-shadow: none !important;
}

.intro-stage.ai-text-stage::before,
.intro-stage.ai-text-stage::after {
  content: none !important;
  display: none !important;
}

.ai-text-stage .stage-video-bg {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

.prompt-grid {
  position: fixed !important;
  z-index: 3 !important;
  left: clamp(24px, 6vw, 98px) !important;
  right: calc(var(--sidebar-width) + clamp(24px, 6vw, 98px)) !important;
  bottom: 136px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  width: auto !important;
  max-width: none !important;
  gap: 8px !important;
  margin: 0 !important;
}

.prompt-grid button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
}

.prompt-grid button::before,
.prompt-grid button::after,
.prompt-grid button > span:last-child {
  display: none !important;
}

.prompt-icon {
  width: 20px !important;
  height: 20px !important;
  border-radius: 7px !important;
}

.prompt-grid strong {
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

@media (max-width: 1020px) {
  .intro-stage.ai-text-stage,
  .empty-state::after {
    right: 0 !important;
  }

  .prompt-grid {
    left: 14px !important;
    right: 14px !important;
    bottom: 126px !important;
  }
}

@media (max-width: 840px) {
  .messages {
    padding: 0 14px 120px !important;
  }

  .prompt-grid {
    bottom: 116px !important;
    gap: 7px !important;
  }

  .prompt-grid button {
    min-height: 34px !important;
    padding: 7px 10px !important;
  }
}

/* Final platinum layer for the AI technology video */
html,
body,
.app-shell,
.chat-panel {
  background: #eef2f4 !important;
  color: #111719 !important;
}

.topbar {
  color: #111719 !important;
  background: rgba(248, 251, 252, 0.78) !important;
  border-bottom: 1px solid rgba(20, 37, 41, 0.08) !important;
  box-shadow: 0 18px 50px rgba(20, 37, 41, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.2) !important;
}

.topbar-title strong {
  color: #111719 !important;
}

.topbar-title span {
  color: rgba(27, 45, 49, 0.62) !important;
}

.topbar .icon-button {
  color: #18272a !important;
}

.topbar .icon-button:hover {
  background: rgba(9, 132, 124, 0.08) !important;
}

.empty-state::after {
  background:
    linear-gradient(90deg, rgba(238, 242, 244, 0.86), rgba(238, 242, 244, 0.28) 23%, transparent 58%, rgba(238, 242, 244, 0.14)),
    linear-gradient(180deg, rgba(238, 242, 244, 0.5), transparent 32%, rgba(238, 242, 244, 0.86)),
    radial-gradient(circle at 42% 68%, rgba(9, 132, 124, 0.12), transparent 34%) !important;
}

.intro-stage.ai-text-stage {
  background: #eef2f4 !important;
}

.ai-text-stage .stage-video-bg {
  object-position: center center !important;
  filter: contrast(0.98) brightness(1.03) saturate(0.82) !important;
}

.prompt-grid {
  bottom: 134px !important;
}

.prompt-grid button {
  color: #162326 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.46) !important;
  border: 1px solid rgba(20, 37, 41, 0.12) !important;
  box-shadow:
    0 20px 55px rgba(20, 37, 41, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(18px) saturate(1.25) !important;
}

.prompt-grid button:hover {
  border-color: rgba(9, 132, 124, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.6) !important;
}

.prompt-icon {
  color: #ffffff !important;
  background: linear-gradient(135deg, #101719, #09847c) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 10px 26px rgba(9, 132, 124, 0.22) !important;
}

.prompt-grid strong {
  color: #111719 !important;
}

.composer {
  color: #111719 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.62) !important;
  border: 1px solid rgba(20, 37, 41, 0.12) !important;
  box-shadow:
    0 24px 74px rgba(20, 37, 41, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
}

.composer textarea {
  color: #111719 !important;
}

.composer textarea::placeholder {
  color: rgba(27, 45, 49, 0.54) !important;
}

.composer-toolbar button {
  color: #213437 !important;
  background: rgba(245, 249, 250, 0.78) !important;
  border-color: rgba(20, 37, 41, 0.1) !important;
}

.composer-toolbar button:hover {
  color: #075e58 !important;
  background: rgba(232, 248, 246, 0.94) !important;
}

.send-button {
  color: #ffffff !important;
  background: linear-gradient(135deg, #111719, #09847c 58%, #f4b740) !important;
}

@media (max-width: 840px) {
  .ai-text-stage .stage-video-bg {
    object-position: 72% center !important;
  }

  .prompt-grid {
    bottom: 116px !important;
  }
}

/* Platinum clinical AI surface */
html,
body {
  background: #eef2f4 !important;
  color: #111719 !important;
}

.app-shell {
  background: #eef2f4 !important;
}

.chat-panel {
  background: #eef2f4 !important;
}

.topbar {
  color: #111719 !important;
  background: rgba(248, 251, 252, 0.76) !important;
  border-bottom: 1px solid rgba(20, 37, 41, 0.08) !important;
  box-shadow: 0 18px 50px rgba(20, 37, 41, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.2);
}

.topbar-title strong {
  color: #111719 !important;
}

.topbar-title span {
  color: rgba(27, 45, 49, 0.62) !important;
}

.topbar .icon-button {
  color: #18272a !important;
}

.topbar .icon-button:hover {
  background: rgba(9, 132, 124, 0.08) !important;
}

.messages {
  background: transparent !important;
}

.empty-state::after {
  inset: 64px var(--sidebar-width) 0 0 !important;
  background:
    linear-gradient(90deg, rgba(238, 242, 244, 0.9), rgba(238, 242, 244, 0.34) 22%, transparent 52%, rgba(238, 242, 244, 0.18)),
    linear-gradient(180deg, rgba(238, 242, 244, 0.72), transparent 32%, rgba(238, 242, 244, 0.86)),
    radial-gradient(circle at 42% 66%, rgba(9, 132, 124, 0.13), transparent 34%) !important;
}

.intro-stage.ai-text-stage {
  inset: 64px var(--sidebar-width) 0 0 !important;
  background: #eef2f4 !important;
}

.ai-text-stage .stage-video-bg {
  object-position: center center !important;
  filter: contrast(0.98) brightness(1.02) saturate(0.82) !important;
}

.prompt-grid {
  bottom: 134px !important;
}

.prompt-grid button {
  color: #162326 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.42) !important;
  border: 1px solid rgba(20, 37, 41, 0.12) !important;
  box-shadow:
    0 20px 55px rgba(20, 37, 41, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(18px) saturate(1.25);
}

.prompt-grid button:hover {
  border-color: rgba(9, 132, 124, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.56) !important;
  box-shadow:
    0 24px 64px rgba(20, 37, 41, 0.14),
    0 0 0 1px rgba(9, 132, 124, 0.06) !important;
}

.prompt-icon {
  color: #ffffff !important;
  background:
    linear-gradient(135deg, #101719, #09847c) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 10px 26px rgba(9, 132, 124, 0.22) !important;
}

.prompt-grid strong {
  color: #111719 !important;
}

.composer {
  color: #111719 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
    rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(20, 37, 41, 0.12) !important;
  box-shadow:
    0 24px 74px rgba(20, 37, 41, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(24px) saturate(1.2);
}

.composer textarea {
  color: #111719 !important;
}

.composer textarea::placeholder {
  color: rgba(27, 45, 49, 0.54) !important;
}

.composer-toolbar button {
  color: #213437 !important;
  background: rgba(245, 249, 250, 0.76) !important;
  border-color: rgba(20, 37, 41, 0.1) !important;
}

.composer-toolbar button:hover {
  color: #075e58 !important;
  background: rgba(232, 248, 246, 0.92) !important;
}

.send-button {
  color: #ffffff !important;
  background:
    linear-gradient(135deg, #111719, #09847c 58%, #f4b740) !important;
}

.message-bubble {
  color: #111719 !important;
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(20, 37, 41, 0.1) !important;
  box-shadow: 0 20px 58px rgba(20, 37, 41, 0.12) !important;
}

.message-row.user .message-bubble {
  color: #ffffff !important;
  background: rgba(9, 132, 124, 0.9) !important;
}

@media (max-width: 1020px) {
  .intro-stage.ai-text-stage,
  .empty-state::after {
    right: 0 !important;
  }
}

@media (max-width: 840px) {
  .empty-state::after {
    background:
      linear-gradient(180deg, rgba(238, 242, 244, 0.58), rgba(238, 242, 244, 0.1) 30%, rgba(238, 242, 244, 0.78)),
      linear-gradient(90deg, rgba(238, 242, 244, 0.26), transparent 44%, rgba(238, 242, 244, 0.2)) !important;
  }

  .ai-text-stage .stage-video-bg {
    object-position: 55% center !important;
  }

  .prompt-grid {
    bottom: 116px !important;
  }
}

/* Immersive public AI surface */
html,
body {
  background: #02050a !important;
  color: #effdff;
}

.app-shell {
  background: #02050a !important;
}

.chat-panel {
  position: relative;
  overflow: hidden;
  background: #02050a !important;
  isolation: isolate;
}

.topbar {
  position: relative;
  z-index: 4;
  color: #effdff;
  background: rgba(2, 5, 10, 0.58) !important;
  border-bottom: 1px solid rgba(111, 247, 240, 0.14) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.topbar-title span {
  color: rgba(218, 248, 255, 0.66) !important;
}

.topbar .icon-button {
  color: rgba(238, 253, 255, 0.86);
}

.topbar .icon-button:hover {
  background: rgba(111, 247, 240, 0.1) !important;
}

.messages {
  position: relative;
  z-index: 1;
  padding: 0 clamp(14px, 4vw, 54px) 122px !important;
  background: #02050a !important;
}

.messages::before {
  content: "";
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(111, 247, 240, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(2, 5, 10, 0.1), rgba(2, 5, 10, 0.34) 56%, rgba(2, 5, 10, 0.84));
}

.empty-state {
  position: relative;
  display: grid !important;
  align-content: end !important;
  justify-items: center !important;
  min-height: 100% !important;
  width: 100%;
  padding: clamp(210px, 42vh, 390px) 0 24px !important;
  overflow: hidden;
  text-align: right;
}

.empty-state::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 5, 10, 0.12), transparent 32%, rgba(2, 5, 10, 0.78)),
    linear-gradient(90deg, rgba(2, 5, 10, 0.42), transparent 34%, transparent 64%, rgba(2, 5, 10, 0.42));
}

.intro-stage.ai-text-stage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  background: #02050a !important;
}

.ai-text-stage .stage-video-bg {
  object-fit: cover !important;
  object-position: center center !important;
}

.prompt-grid {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: min(920px, 100%) !important;
  margin: 0 auto !important;
  gap: 12px !important;
}

.prompt-grid button {
  min-height: 116px !important;
  padding: 14px !important;
  color: #effdff !important;
  background:
    linear-gradient(145deg, rgba(8, 17, 27, 0.84), rgba(4, 10, 18, 0.56)),
    rgba(2, 5, 10, 0.58) !important;
  border: 1px solid rgba(111, 247, 240, 0.16) !important;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(18px);
}

.prompt-grid button::before {
  opacity: 0.72 !important;
  background:
    linear-gradient(rgba(111, 247, 240, 0.055) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(111, 247, 240, 0.045) 1px, transparent 1px) 0 0 / 18px 18px !important;
}

.prompt-grid button::after {
  background: linear-gradient(90deg, #53fff1, #f4b740) !important;
  opacity: 0.9 !important;
}

.prompt-grid button:hover {
  border-color: rgba(111, 247, 240, 0.42) !important;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(83, 255, 241, 0.12) !important;
}

.prompt-icon {
  background: rgba(2, 5, 10, 0.72) !important;
  box-shadow:
    inset 0 0 0 1px rgba(111, 247, 240, 0.18),
    0 0 24px rgba(83, 255, 241, 0.12);
}

.prompt-grid strong {
  color: #ffffff !important;
}

.prompt-grid button > span:last-child {
  color: rgba(218, 248, 255, 0.72) !important;
}

.composer {
  position: relative;
  z-index: 5;
  margin-bottom: 18px !important;
  color: #effdff;
  background:
    linear-gradient(145deg, rgba(8, 17, 27, 0.88), rgba(4, 10, 18, 0.72)),
    rgba(2, 5, 10, 0.72) !important;
  border: 1px solid rgba(111, 247, 240, 0.2) !important;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px);
}

.composer::before {
  opacity: 0.42;
}

.composer textarea {
  color: #ffffff !important;
}

.composer textarea::placeholder {
  color: rgba(218, 248, 255, 0.56);
}

.composer-toolbar button {
  color: rgba(236, 253, 255, 0.82) !important;
  background: rgba(111, 247, 240, 0.08) !important;
  border-color: rgba(111, 247, 240, 0.14) !important;
}

.composer-toolbar button:hover {
  color: #ffffff !important;
  background: rgba(111, 247, 240, 0.16) !important;
}

.send-button {
  background:
    linear-gradient(135deg, #53fff1, #0a6f68 56%, #f4b740) !important;
  color: #02050a !important;
}

.message-bubble {
  color: #effdff;
  background: rgba(4, 10, 18, 0.78) !important;
  border-color: rgba(111, 247, 240, 0.18) !important;
  backdrop-filter: blur(18px);
}

.message-row.user .message-bubble {
  background: rgba(10, 111, 104, 0.88) !important;
}

@media (max-width: 1020px) {
  .messages::before {
    inset-inline-start: 0;
  }

  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 840px) {
  .messages {
    padding: 0 14px 120px !important;
  }

  .empty-state {
    min-height: 100% !important;
    padding: clamp(188px, 44vh, 320px) 0 18px !important;
  }

  .prompt-grid {
    gap: 10px !important;
  }

  .prompt-grid button {
    min-height: 132px !important;
    padding: 13px !important;
  }

  .composer {
    width: min(100% - 18px, 940px) !important;
    margin-bottom: 10px !important;
  }
}

/* Fixed full-scene AI video */
.messages {
  background: transparent !important;
}

.empty-state {
  min-height: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
}

.empty-state::after {
  position: fixed;
  inset: 64px var(--sidebar-width) 0 0;
}

.intro-stage.ai-text-stage {
  position: fixed !important;
  inset: 64px var(--sidebar-width) 0 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

.prompt-grid {
  position: fixed !important;
  left: clamp(24px, 6vw, 98px) !important;
  right: calc(var(--sidebar-width) + clamp(24px, 6vw, 98px)) !important;
  bottom: 128px !important;
  width: auto !important;
  max-width: 920px !important;
  justify-self: center;
}

@media (max-width: 1020px) {
  .empty-state::after,
  .intro-stage.ai-text-stage {
    right: 0 !important;
  }

  .prompt-grid {
    left: 14px !important;
    right: 14px !important;
    bottom: 122px !important;
    max-width: none !important;
  }
}

@media (max-width: 840px) {
  .empty-state::after,
  .intro-stage.ai-text-stage {
    inset-block-start: 64px !important;
  }

  .prompt-grid {
    bottom: 118px !important;
  }
}

/* Minimal prompt chips over the AI video */
.prompt-grid {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px !important;
  bottom: 112px !important;
}

.prompt-grid button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
}

.prompt-grid button::before,
.prompt-grid button::after,
.prompt-grid button > span:last-child {
  display: none !important;
}

.prompt-icon {
  width: 20px !important;
  height: 20px !important;
  border-radius: 7px !important;
}

.prompt-icon::before,
.prompt-icon::after {
  inset: 5px !important;
}

.prompt-grid strong {
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

@media (max-width: 840px) {
  .prompt-grid {
    bottom: 108px !important;
    gap: 7px !important;
  }

  .prompt-grid button {
    min-height: 34px !important;
    padding: 7px 10px !important;
  }
}

/* Final AI text reveal mode */
.intro-stage.ai-text-stage {
  grid-template-columns: 1fr;
  justify-items: stretch;
  min-height: 438px;
  padding: 0;
  border: 0;
  background: #05090f;
  box-shadow:
    0 32px 90px rgba(17, 19, 19, 0.12),
    inset 0 0 0 1px rgba(20, 219, 203, 0.1);
}

.ai-text-stage .stage-video-bg {
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.04) brightness(0.96);
}

.ai-text-stage .stage-video-shade {
  background:
    linear-gradient(90deg, rgba(5, 9, 15, 0.44), rgba(5, 9, 15, 0.04) 44%, rgba(5, 9, 15, 0.5)),
    linear-gradient(180deg, rgba(5, 9, 15, 0.28), transparent 46%, rgba(5, 9, 15, 0.36));
}

.ai-text-stage .stage-copy,
.ai-text-stage .stage-field,
.ai-text-stage .hero-system,
.ai-text-stage::before,
.ai-text-stage::after {
  display: none !important;
}

@media (max-width: 840px) {
  .intro-stage.ai-text-stage {
    min-height: 230px;
    margin-top: 0;
    padding: 0;
  }
}

/* Full-video hero trial */
.empty-state {
  width: min(1180px, 100%);
}

.intro-stage {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 430px;
  padding: 54px 36px 58px;
  border: 0;
  border-radius: 0;
  background: #071313;
  box-shadow:
    0 32px 90px rgba(17, 19, 19, 0.12),
    inset 0 0 0 1px rgba(20, 219, 203, 0.12);
  isolation: isolate;
}

.stage-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.12) contrast(1.08) brightness(0.86);
}

.stage-video-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 19, 19, 0.9), rgba(7, 19, 19, 0.5) 26%, rgba(7, 19, 19, 0.26) 50%, rgba(7, 19, 19, 0.72)),
    linear-gradient(180deg, rgba(7, 19, 19, 0.72), rgba(7, 19, 19, 0.24) 44%, rgba(7, 19, 19, 0.8)),
    radial-gradient(ellipse at 50% 42%, rgba(20, 219, 203, 0.16), transparent 54%);
}

.intro-stage::before,
.intro-stage::after {
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(20, 219, 203, 0.64), rgba(244, 183, 64, 0.34), transparent);
}

.intro-stage .hero-system {
  display: none;
}

.stage-field {
  z-index: 1;
  opacity: 0.72;
}

.stage-copy {
  grid-column: 1;
  z-index: 2;
  justify-items: center;
  max-width: 780px;
  text-align: center;
}

.stage-copy .empty-kicker {
  color: #dffff8;
  background: rgba(7, 19, 19, 0.54);
  border-color: rgba(20, 219, 203, 0.24);
  box-shadow: 0 12px 34px rgba(20, 219, 203, 0.1);
}

.stage-copy h1 {
  position: relative;
  z-index: 0;
  color: #ffffff;
  font-size: clamp(64px, 7.8vw, 112px);
  letter-spacing: 0;
  background:
    radial-gradient(circle at 22% 38%, rgba(255, 255, 255, 0.98) 0 5%, transparent 6%),
    radial-gradient(circle at 54% 58%, rgba(244, 183, 64, 0.98) 0 4%, transparent 5%),
    radial-gradient(circle at 78% 34%, rgba(20, 219, 203, 0.95) 0 4%, transparent 5%),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.95) 0 6px, rgba(20, 219, 203, 0.96) 6px 13px, rgba(244, 183, 64, 0.9) 13px 17px, rgba(255, 255, 255, 0.86) 17px 24px),
    linear-gradient(115deg, #ffffff 0%, #9ffff4 36%, #f4b740 58%, #ffffff 100%);
  background-size:
    180px 120px,
    210px 130px,
    190px 120px,
    240% 100%,
    160% 100%;
  background-position:
    0 0,
    80px 20px,
    170px 0,
    0 0,
    0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleNeonFlow 6.8s linear infinite;
  text-shadow:
    0 2px 24px rgba(20, 219, 203, 0.22),
    0 18px 58px rgba(0, 0, 0, 0.36);
}

.stage-copy h1::before,
.stage-copy h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage-copy h1::before {
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(183, 255, 247, 0.56);
  text-shadow:
    0 0 12px rgba(20, 219, 203, 0.66),
    0 0 32px rgba(20, 219, 203, 0.32),
    0 0 42px rgba(244, 183, 64, 0.16);
}

.stage-copy h1::after {
  color: transparent;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255, 255, 255, 0.6) 14px 15px, transparent 15px 29px),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(20, 219, 203, 0.42) 10px 11px, transparent 11px 22px);
  background-size: 180% 100%, 100% 160%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  mix-blend-mode: screen;
  opacity: 0.62;
  animation: titleParticleSweep 3.8s linear infinite;
}

.stage-copy p {
  max-width: 640px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #ffffff !important;
  background: rgba(7, 19, 19, 0.24);
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

.stage-copy .emotion-strip {
  justify-content: center;
}

.emotion-strip span {
  color: rgba(239, 255, 251, 0.92);
  background: rgba(7, 19, 19, 0.5);
  border-color: rgba(20, 219, 203, 0.28);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
}

@media (max-width: 840px) {
  .intro-stage {
    min-height: 424px;
    padding: 44px 18px 48px;
  }

  .stage-video-bg {
    object-position: 48% center;
  }

  .stage-video-shade {
    background:
      linear-gradient(90deg, rgba(7, 19, 19, 0.84), rgba(7, 19, 19, 0.36) 52%, rgba(7, 19, 19, 0.82)),
      linear-gradient(180deg, rgba(7, 19, 19, 0.7), rgba(7, 19, 19, 0.28) 42%, rgba(7, 19, 19, 0.82)),
      radial-gradient(ellipse at 50% 38%, rgba(20, 219, 203, 0.18), transparent 58%);
  }

  .stage-copy h1 {
    font-size: 58px;
    white-space: normal;
  }

  .stage-copy p {
    font-size: 15px;
  }
}

.ai-text-stage {
  min-height: 438px;
  padding: 0;
  background: #05090f;
}

.ai-text-stage .stage-video-bg {
  filter: saturate(1.08) contrast(1.04) brightness(0.92);
}

.ai-text-stage .stage-video-shade {
  background:
    linear-gradient(90deg, rgba(5, 9, 15, 0.72), rgba(5, 9, 15, 0.16) 42%, rgba(5, 9, 15, 0.72)),
    linear-gradient(180deg, rgba(5, 9, 15, 0.42), transparent 44%, rgba(5, 9, 15, 0.58));
}

.ai-text-stage .stage-copy,
.ai-text-stage .stage-field,
.ai-text-stage::before,
.ai-text-stage::after {
  display: none;
}

@media (max-width: 840px) {
  .ai-text-stage {
    min-height: 256px;
  }

  .ai-text-stage .stage-video-bg {
    object-fit: cover;
    object-position: center;
  }

  .ai-text-stage .stage-video-shade {
    background:
      linear-gradient(90deg, rgba(5, 9, 15, 0.54), rgba(5, 9, 15, 0.08) 48%, rgba(5, 9, 15, 0.54)),
      linear-gradient(180deg, rgba(5, 9, 15, 0.36), transparent 46%, rgba(5, 9, 15, 0.5));
  }
}

/* Command surface refresh */
.empty-state {
  width: min(1080px, 100%);
  gap: 18px;
}

.intro-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, 0.92fr) minmax(340px, 1fr);
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 356px;
  padding: 26px 34px;
  overflow: hidden;
  border-top: 1px solid rgba(16, 18, 20, 0.08);
  border-bottom: 1px solid rgba(16, 18, 20, 0.08);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46)),
    linear-gradient(rgba(16, 18, 20, 0.034) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(16, 18, 20, 0.03) 1px, transparent 1px) 0 0 / 22px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(255, 255, 255, 0.66);
}

.intro-stage::before,
.intro-stage::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 143, 134, 0.58), transparent);
  animation: stageTrace 4.8s ease-in-out infinite;
}

.intro-stage::before {
  top: 34px;
}

.intro-stage::after {
  bottom: 38px;
  animation-delay: 1.2s;
}

.stage-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage-field span {
  position: absolute;
  display: block;
  width: 34%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(15, 143, 134, 0.42), rgba(244, 183, 64, 0.28), transparent);
  animation: laneMove 7s linear infinite;
}

.stage-field span:nth-child(1) {
  top: 28%;
  right: -30%;
}

.stage-field span:nth-child(2) {
  top: 54%;
  left: -30%;
  animation-delay: 1.7s;
  animation-direction: reverse;
}

.stage-field span:nth-child(3) {
  bottom: 22%;
  right: -30%;
  animation-delay: 3.2s;
}

.intro-stage .hero-system {
  grid-column: 1;
  justify-self: center;
  width: min(520px, 100%);
  margin: 0;
  z-index: 1;
}

.stage-copy {
  grid-column: 2;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 12px;
  min-width: 0;
  text-align: right;
}

.stage-copy .empty-kicker {
  margin-bottom: 2px;
}

.stage-copy h1 {
  margin: 0;
  font-size: clamp(52px, 5.2vw, 78px);
  line-height: 0.95;
  white-space: nowrap;
}

.stage-copy p {
  max-width: 560px;
  margin: 0;
  color: #34413e;
  font-size: 18px;
  line-height: 1.9;
}

.stage-copy .emotion-strip {
  justify-content: flex-start;
}

.prompt-grid {
  width: min(980px, 100%);
  margin-top: 4px;
}

.prompt-grid button {
  min-height: 132px;
  border: 1px solid rgba(16, 18, 20, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 248, 0.78)),
    var(--panel);
}

.prompt-grid button:hover {
  border-color: rgba(15, 143, 134, 0.28);
}

.composer {
  border-top: 1px solid rgba(15, 143, 134, 0.16);
}

@keyframes stageTrace {
  0%,
  100% {
    opacity: 0;
    transform: scaleX(0.24);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes laneMove {
  from {
    transform: translateX(0);
    opacity: 0;
  }

  12%,
  82% {
    opacity: 1;
  }

  to {
    transform: translateX(-360%);
    opacity: 0;
  }
}

@media (max-width: 1020px) {
  .intro-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: auto;
    padding: 20px 18px 24px;
  }

  .intro-stage .hero-system,
  .stage-copy {
    grid-column: 1;
  }

  .stage-copy {
    justify-items: center;
    text-align: center;
  }

  .stage-copy .emotion-strip {
    justify-content: center;
  }
}

@media (max-width: 840px) {
  .intro-stage {
    gap: 8px;
    padding: 14px 8px 16px;
    border-top: 0;
  }

  .stage-copy h1 {
    font-size: 44px;
  }

  .stage-copy p {
    font-size: 14px;
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  .empty-state {
    gap: 14px;
  }

  .intro-stage {
    margin-top: -4px;
    padding-inline: 0;
  }

  .prompt-grid button {
    min-height: 112px;
    padding: 12px;
  }
}

/* Premium neural brain, third direction */
.core-frame {
  width: 318px;
  height: 232px;
  border: 1px solid rgba(20, 219, 203, 0.18);
  background:
    linear-gradient(rgba(165, 255, 244, 0.05) 1px, transparent 1px) 50% 50% / 18px 18px,
    linear-gradient(90deg, rgba(165, 255, 244, 0.05) 1px, transparent 1px) 50% 50% / 18px 18px,
    radial-gradient(ellipse at 50% 48%, rgba(10, 29, 30, 0.96), rgba(10, 22, 22, 0.82) 38%, rgba(10, 22, 22, 0.24) 66%, transparent 78%),
    radial-gradient(ellipse at 50% 76%, rgba(244, 183, 64, 0.18), transparent 45%);
  box-shadow:
    0 28px 82px rgba(17, 19, 19, 0.16),
    0 0 52px rgba(20, 219, 203, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.core-frame::before {
  inset: 18px 24px 42px;
  border: 1px solid rgba(20, 219, 203, 0.22);
  border-radius: 8px;
  box-shadow:
    inset 0 0 38px rgba(20, 219, 203, 0.08),
    0 0 26px rgba(20, 219, 203, 0.1);
  transform: none;
  animation: frameBreathe 3.8s ease-in-out infinite;
}

.core-frame::after {
  inset: auto 56px 30px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(20, 219, 203, 0.38), rgba(244, 183, 64, 0.34), transparent);
  transform: perspective(120px) rotateX(66deg);
  animation: none;
}

.brain-canvas {
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 0 14px rgba(20, 219, 203, 0.28))
    drop-shadow(0 0 28px rgba(244, 183, 64, 0.08));
  transform: none;
}

.brain-orbit {
  z-index: 5;
  opacity: 0.76;
}

.brain-orbit-a {
  width: 220px;
  height: 58px;
  border-color: rgba(20, 219, 203, 0.28);
  transform: rotate(-4deg) translateY(28px);
}

.brain-orbit-b {
  width: 166px;
  height: 112px;
  border-color: rgba(244, 183, 64, 0.18);
  transform: rotate(18deg) translateY(4px);
}

.brain-base {
  bottom: 24px;
  z-index: 7;
  width: 162px;
  height: 18px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), rgba(20, 219, 203, 0.58), rgba(244, 183, 64, 0.36), transparent);
  box-shadow:
    0 0 22px rgba(20, 219, 203, 0.26),
    0 12px 28px rgba(17, 19, 19, 0.16);
}

.ai-ring-a {
  inset: -38px -12px 16px;
  opacity: 0.62;
}

.ai-ring-b {
  inset: 20px 30px 46px;
  opacity: 0.68;
}

.ai-ring-c {
  inset: 38px 56px 60px;
  opacity: 0.74;
}

.scanline {
  z-index: 9;
  inset: 28px 34px;
  height: 34px;
  background: linear-gradient(180deg, transparent, rgba(28, 226, 210, 0.18), transparent);
}

.corner {
  z-index: 10;
}

.core-frame.brain-ready .empty-mark {
  display: none;
}

@media (max-width: 840px) {
  .core-frame {
    width: 232px;
    height: 172px;
  }

  .brain-orbit-a {
    width: 158px;
    height: 42px;
  }

  .brain-orbit-b {
    width: 120px;
    height: 78px;
  }

  .brain-base {
    bottom: 18px;
    width: 118px;
    height: 14px;
  }

  .core-frame::before {
    inset: 14px 18px 34px;
  }

  .core-frame::after {
    inset: auto 42px 22px;
  }

  .scanline {
    inset: 22px 26px;
    height: 26px;
  }
}

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

/* Exact AI video hero - last override */
.intro-stage.ai-text-stage {
  display: block !important;
  position: relative !important;
  width: min(1080px, 100%) !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  box-shadow: none !important;
  isolation: isolate !important;
}

.intro-stage.ai-text-stage::before,
.intro-stage.ai-text-stage::after,
.ai-text-stage .stage-field,
.ai-text-stage .stage-video-shade,
.ai-text-stage .hero-system,
.ai-text-stage .stage-copy {
  content: none !important;
  display: none !important;
}

.ai-text-stage .stage-video-bg {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

@media (max-width: 840px) {
  .intro-stage.ai-text-stage {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }
}

/* Actual final immersive AI video override */
.chat-panel {
  position: relative !important;
  overflow: hidden !important;
  background: #02050a !important;
}

.messages {
  position: relative !important;
  z-index: 1 !important;
  padding: 0 clamp(14px, 4vw, 54px) 122px !important;
  background: transparent !important;
}

.empty-state {
  position: relative !important;
  min-height: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
}

.empty-state::after {
  content: "" !important;
  display: block !important;
  position: fixed !important;
  inset: 64px var(--sidebar-width) 0 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgba(2, 5, 10, 0.1), transparent 36%, rgba(2, 5, 10, 0.74)),
    linear-gradient(90deg, rgba(2, 5, 10, 0.28), transparent 30%, transparent 68%, rgba(2, 5, 10, 0.42)) !important;
}

.intro-stage.ai-text-stage {
  display: block !important;
  position: fixed !important;
  inset: 64px var(--sidebar-width) 0 0 !important;
  z-index: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #02050a !important;
  box-shadow: none !important;
}

.intro-stage.ai-text-stage::before,
.intro-stage.ai-text-stage::after {
  content: none !important;
  display: none !important;
}

.ai-text-stage .stage-video-bg {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

.prompt-grid {
  position: fixed !important;
  z-index: 3 !important;
  left: clamp(24px, 6vw, 98px) !important;
  right: calc(var(--sidebar-width) + clamp(24px, 6vw, 98px)) !important;
  bottom: 136px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  width: auto !important;
  max-width: none !important;
  gap: 8px !important;
  margin: 0 !important;
}

.prompt-grid button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
}

.prompt-grid button::before,
.prompt-grid button::after,
.prompt-grid button > span:last-child {
  display: none !important;
}

.prompt-icon {
  width: 20px !important;
  height: 20px !important;
  border-radius: 7px !important;
}

.prompt-grid strong {
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

@media (max-width: 1020px) {
  .intro-stage.ai-text-stage,
  .empty-state::after {
    right: 0 !important;
  }

  .prompt-grid {
    left: 14px !important;
    right: 14px !important;
    bottom: 126px !important;
  }
}

@media (max-width: 840px) {
  .messages {
    padding: 0 14px 120px !important;
  }

  .prompt-grid {
    bottom: 116px !important;
    gap: 7px !important;
  }

  .prompt-grid button {
    min-height: 34px !important;
    padding: 7px 10px !important;
  }
}
