:root {
  color-scheme: dark;

  --bg: #070a12;
  --bg-2: #0c1020;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-2: rgba(255, 255, 255, 0.1);
  --panel-strong: rgba(10, 14, 28, 0.88);
  --line: rgba(255, 255, 255, 0.13);
  --line-2: rgba(255, 255, 255, 0.22);
  --text: #f7fbff;
  --muted: #aebbd0;
  --soft: #7d8aa3;
  --cyan: #63f6df;
  --violet: #b89cff;
  --pink: #ff9ccf;
  --gold: #ffd88a;
  --danger: #ff7272;
  --ok: #5df2b1;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --sidebar: 316px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body,
.site-stage {
  height: 100%;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(99, 246, 223, 0.18), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(184, 156, 255, 0.18), transparent 25%),
    linear-gradient(135deg, #070a12 0%, #0c1020 52%, #070a12 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body[data-view="chat"] {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  stroke-width: 2;
}

h1,
h2,
p,
figure {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.site-stage {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
}

.landing-view,
.chat-view {
  min-height: 100svh;
  transition:
    opacity 360ms ease,
    transform 360ms ease,
    filter 360ms ease;
}

body[data-view="chat"] .landing-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.985);
  filter: blur(14px);
  pointer-events: none;
}

body[data-view="landing"] .chat-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(14px);
  pointer-events: none;
}

.landing-view {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(18px, 3vw, 36px);
}

.landing-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 72%);
}

.aurora,
.orbital {
  position: absolute;
  pointer-events: none;
  z-index: -3;
}

.aurora {
  width: 44vw;
  max-width: 620px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.5;
}

.aurora-one {
  left: -12vw;
  top: 12vh;
  background: rgba(99, 246, 223, 0.42);
  animation: floatOne 12s ease-in-out infinite;
}

.aurora-two {
  right: -10vw;
  bottom: 0;
  background: rgba(255, 156, 207, 0.32);
  animation: floatTwo 14s ease-in-out infinite;
}

.orbital {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.orbital-one {
  width: min(760px, 72vw);
  aspect-ratio: 1.8;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.orbital-two {
  width: min(460px, 48vw);
  aspect-ratio: 1.5;
  right: 8vw;
  top: 18vh;
  transform: rotate(24deg);
}

.landing-topbar,
.chat-header,
.sidebar,
.composer,
.identity-panel,
.terms-dialog {
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.landing-topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-lockup.small {
  font-size: 0.98rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #061019;
  background:
    radial-gradient(circle at 30% 20%, #ffffff, transparent 22%),
    linear-gradient(135deg, var(--cyan), var(--violet) 52%, var(--pink));
  box-shadow:
    0 14px 34px rgba(99, 246, 223, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  font-weight: 950;
}

.privacy-badge,
.connection-state,
.ghost-action,
.new-chat,
.conversation-main,
.conversation-menu button,
.attachment-chip,
.prompt-grid button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.privacy-badge {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 999px;
  color: #dcfff7;
  font-size: 0.88rem;
}

.landing-content {
  width: min(840px, 100%);
  place-self: center;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  transform: translateY(-2vh);
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-content h1 {
  font-size: clamp(4.3rem, 12vw, 10rem);
  line-height: 0.86;
  font-weight: 950;
  letter-spacing: -0.09em;
  text-shadow: 0 24px 90px rgba(0, 0, 0, 0.58);
}

.hero-copy {
  width: min(720px, 100%);
  color: #dfe8f8;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.62;
}

.identity-panel {
  width: min(650px, 100%);
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(6, 10, 20, 0.62);
  box-shadow: var(--shadow);
}

.identity-panel label {
  text-align: left;
  color: #f4f8ff;
  font-weight: 780;
}

.name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.name-row input,
.composer textarea {
  width: 100%;
  min-width: 0;
  outline: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(2, 6, 14, 0.62);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.name-row input {
  height: 54px;
  border-radius: 18px;
  padding: 0 16px;
}

.name-row input:focus,
.composer textarea:focus {
  border-color: rgba(99, 246, 223, 0.72);
  box-shadow: 0 0 0 4px rgba(99, 246, 223, 0.12);
  background: rgba(2, 6, 14, 0.82);
}

.field-note {
  min-height: 1.2em;
  color: var(--muted);
  text-align: left;
  font-size: 0.86rem;
}

.field-note.is-error {
  color: var(--danger);
}

.primary-action,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #061019;
  border-radius: 18px;
  background:
    linear-gradient(135deg, var(--cyan), var(--gold) 52%, var(--pink)),
    var(--cyan);
  box-shadow: 0 16px 44px rgba(99, 246, 223, 0.22);
  font-weight: 900;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.primary-action {
  min-height: 54px;
  padding: 0 20px;
  white-space: nowrap;
}

.primary-action.full {
  width: 100%;
}

.primary-action:hover,
.send-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 54px rgba(255, 156, 207, 0.22);
}

.benefit-strip {
  width: min(1180px, 100%);
  place-self: center;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.benefit-item {
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(4, 8, 17, 0.58);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.benefit-item svg {
  color: var(--cyan);
  margin-bottom: 14px;
}

.benefit-item h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.benefit-item p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.chat-view {
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  background:
    radial-gradient(circle at 82% 12%, rgba(184, 156, 255, 0.14), transparent 28%),
    radial-gradient(circle at 20% 92%, rgba(99, 246, 223, 0.12), transparent 30%),
    linear-gradient(135deg, #070a12, #0c1020 56%, #070a12);
}

.sidebar {
  position: relative;
  z-index: 10;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(5, 9, 18, 0.78);
}

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

.new-chat,
.ghost-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 16px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.new-chat {
  width: 100%;
  background: rgba(99, 246, 223, 0.1);
  font-weight: 760;
}

.ghost-action {
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.ghost-action.danger {
  color: #ffd6d6;
}

.new-chat:hover,
.ghost-action:hover,
.conversation-main:hover,
.prompt-grid button:hover,
.icon-button:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
}

.conversation-nav {
  min-height: 0;
  overflow: hidden;
}

.conversation-list {
  height: 100%;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 3px;
}

.conversation-empty {
  margin: 18px 4px;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.conversation-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
}

.conversation-main {
  min-width: 0;
  min-height: 62px;
  padding: 11px 13px;
  border-radius: 18px;
  text-align: left;
}

.conversation-main.is-active {
  border-color: rgba(99, 246, 223, 0.52);
  background:
    linear-gradient(135deg, rgba(99, 246, 223, 0.18), rgba(184, 156, 255, 0.12)),
    rgba(255, 255, 255, 0.07);
}

.conversation-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-date {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.76rem;
}

.conversation-menu-button {
  width: 40px;
  min-height: 62px;
}

.conversation-menu {
  position: absolute;
  top: 54px;
  right: 0;
  width: 172px;
  z-index: 20;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 10, 20, 0.98);
  box-shadow: var(--shadow);
}

.conversation-menu button {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  padding: 0 10px;
  text-align: left;
}

.conversation-menu button[data-action="delete"] {
  color: #ffd6d6;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.profile-box {
  min-width: 0;
}

.profile-box p {
  overflow: hidden;
  color: #f4f8ff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-box span {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 0.78rem;
}

.footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-main {
  min-width: 0;
  min-height: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
}

.chat-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 18, 0.58);
  z-index: 4;
}

.chat-title-block {
  min-width: 0;
}

.chat-header h2 {
  max-width: min(58vw, 760px);
  overflow: hidden;
  font-size: clamp(1.04rem, 2vw, 1.26rem);
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-greeting {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 850;
}

.connection-state {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 18px rgba(93, 242, 177, 0.8);
}

.connection-state.is-busy .status-dot {
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 216, 138, 0.8);
  animation: pulse 1.2s ease-in-out infinite;
}

.message-stream {
  min-height: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  padding: 28px clamp(14px, 4vw, 58px) 210px;
}

.empty-state {
  position: absolute;
  inset: 48% clamp(16px, 4vw, 56px) auto;
  left: 0;
  right: 0;
  width: min(860px, calc(100% - 32px));
  margin-inline: auto;
  display: grid;
  gap: 18px;
  text-align: center;
  transform: translateY(-50%);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.empty-state.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(-50% + 12px));
}

.empty-state h2 {
  font-size: clamp(2rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.prompt-grid button {
  min-height: 98px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  border-radius: var(--radius);
  color: #edf7ff;
  font-weight: 720;
  line-height: 1.25;
  padding: 14px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.prompt-grid button:hover {
  transform: translateY(-2px);
}

.message {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  margin: 0 auto 18px;
  animation: messageIn 260ms ease both;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.message.user .avatar {
  grid-column: 2;
  grid-row: 1;
}

.message.user .bubble {
  grid-column: 1;
  justify-self: end;
  background:
    linear-gradient(135deg, rgba(99, 246, 223, 0.18), rgba(184, 156, 255, 0.12)),
    rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 246, 223, 0.28);
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  font-weight: 900;
}

.message.user .avatar {
  color: #07101a;
  background: linear-gradient(135deg, var(--gold), var(--pink));
}

.bubble {
  min-width: 0;
  max-width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.message-meta {
  display: block;
  margin-top: 11px;
  color: var(--soft);
  font-size: 0.74rem;
}

.message-attachments,
.generated-wrap {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.attachment-preview {
  width: min(270px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.attachment-preview img,
.generated-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.generated-wrap {
  width: min(560px, 100%);
}

.generated-wrap img {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.generated-wrap a {
  width: fit-content;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 760;
}

.generated-wrap a:hover {
  text-decoration: underline;
}

.typing {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.typing span:nth-child(2) {
  animation-delay: 120ms;
  background: var(--violet);
}

.typing span:nth-child(3) {
  animation-delay: 240ms;
  background: var(--pink);
}

.composer-shell {
  position: fixed;
  left: var(--sidebar);
  right: 0;
  bottom: 0;
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 16px clamp(12px, 4vw, 58px) 18px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 10, 18, 0), rgba(7, 10, 18, 0.9) 28%, rgba(7, 10, 18, 0.98));
}

.composer-shell > * {
  pointer-events: auto;
}

.attachment-tray {
  width: min(900px, 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-chip {
  max-width: min(280px, 100%);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 5px 8px 5px 11px;
  color: #eefcff;
  font-size: 0.82rem;
}

.attachment-chip img {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.attachment-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip button {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.composer {
  width: min(900px, 100%);
  min-height: 70px;
  display: grid;
  grid-template-columns: 46px 46px minmax(0, 1fr) 50px;
  gap: 9px;
  align-items: end;
  margin-inline: auto;
  padding: 11px;
  border: 1px solid var(--line-2);
  border-radius: 26px;
  background: rgba(8, 12, 24, 0.84);
  box-shadow: var(--shadow);
}

.composer textarea {
  min-height: 46px;
  max-height: 190px;
  resize: none;
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.5;
}

.icon-button,
.send-button {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
}

.mode-button[aria-pressed="true"] {
  color: #061019;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}

.mode-button[aria-pressed="true"] svg {
  animation: sparkle 1.8s ease-in-out infinite;
}

body[data-image-mode="true"] .composer {
  border-color: rgba(184, 156, 255, 0.45);
  box-shadow:
    var(--shadow),
    0 0 0 4px rgba(184, 156, 255, 0.07);
}

.composer-note {
  width: min(900px, 100%);
  margin-inline: auto;
  color: var(--soft);
  font-size: 0.78rem;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 5, 12, 0.76);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: fadeIn 180ms ease both;
}

.terms-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: min(720px, calc(100svh - 40px));
  overflow: auto;
  display: grid;
  gap: 15px;
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(8, 12, 24, 0.96);
  box-shadow: var(--shadow);
  animation: modalIn 220ms ease both;
}

.terms-dialog h2 {
  font-size: 1.45rem;
}

.terms-copy {
  display: grid;
  gap: 10px;
  color: #dce7f7;
  line-height: 1.6;
}

.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #edf5ff;
  line-height: 1.45;
}

.consent-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--cyan);
}

.floating-close {
  position: absolute;
  top: 13px;
  right: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 140;
  width: min(520px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgba(7, 10, 20, 0.96);
  color: #f4f8ff;
  box-shadow: var(--shadow);
  text-align: center;
  animation: toastIn 180ms ease both;
}

.only-mobile {
  display: none;
}

/* Markdown */

.markdown-body {
  color: #eef5ff;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body p {
  margin: 0 0 0.9em;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.05em 0 0.45em;
  color: #ffffff;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.markdown-body h1 {
  font-size: 1.5rem;
}

.markdown-body h2 {
  font-size: 1.28rem;
}

.markdown-body h3 {
  font-size: 1.08rem;
}

.markdown-body strong {
  color: #ffffff;
  font-weight: 850;
}

.markdown-body em {
  color: #dbe7ff;
}

.markdown-body a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 750;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0.7em 0 0.95em 1.25em;
  padding: 0;
}

.markdown-body li {
  margin: 0.35em 0;
  padding-left: 0.15em;
}

.markdown-body li::marker {
  color: var(--cyan);
}

.markdown-body blockquote {
  margin: 1em 0;
  padding: 0.85em 1em;
  border-left: 3px solid var(--cyan);
  border-radius: 14px;
  background: rgba(99, 246, 223, 0.08);
  color: #dce8f8;
}

.markdown-body code {
  padding: 0.15em 0.38em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  color: #d9fff7;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.markdown-body pre {
  max-width: 100%;
  overflow: auto;
  margin: 1em 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.36);
}

.markdown-body pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d9fff7;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre;
}

.markdown-body hr {
  height: 1px;
  margin: 1.2em 0;
  border: 0;
  background: rgba(255, 255, 255, 0.13);
}

.markdown-body table {
  width: 100%;
  margin: 1em 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  font-size: 0.92rem;
}

.markdown-body th,
.markdown-body td {
  padding: 0.7em 0.8em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.markdown-body td {
  background: rgba(255, 255, 255, 0.045);
}

/* Scrollbar */

.message-stream::-webkit-scrollbar,
.conversation-list::-webkit-scrollbar {
  width: 9px;
}

.message-stream::-webkit-scrollbar-track,
.conversation-list::-webkit-scrollbar-track {
  background: transparent;
}

.message-stream::-webkit-scrollbar-thumb,
.conversation-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  background-clip: content-box;
}

.message-stream::-webkit-scrollbar-thumb:hover,
.conversation-list::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 246, 223, 0.35);
  background-clip: content-box;
}

@keyframes floatOne {
  50% {
    transform: translate(5vw, 3vh) scale(1.08);
  }
}

@keyframes floatTwo {
  50% {
    transform: translate(-4vw, -3vh) scale(1.05);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.55);
    opacity: 0.6;
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

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

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

@keyframes sparkle {
  50% {
    rotate: 12deg;
    scale: 1.08;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  body[data-view="chat"] {
    overflow: hidden;
  }

  .chat-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 330px);
    transform: translateX(-104%);
    transition: transform 240ms ease;
  }

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

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 8;
    background: rgba(0, 0, 0, 0.56);
  }

  .only-mobile {
    display: inline-grid;
  }

  .composer-shell {
    left: 0;
  }

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

@media (max-width: 720px) {
  .landing-view {
    gap: 14px;
    padding: 14px;
  }

  .privacy-badge {
    max-width: 52vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .landing-content {
    transform: none;
    gap: 14px;
  }

  .landing-content h1 {
    font-size: clamp(3.4rem, 18vw, 5.6rem);
  }

  .hero-copy {
    font-size: 0.96rem;
  }

  .identity-panel {
    padding: 13px;
    border-radius: 24px;
  }

  .name-row {
    grid-template-columns: 1fr;
  }

  .benefit-strip {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 76vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .benefit-strip::-webkit-scrollbar {
    display: none;
  }

  .benefit-item {
    min-height: 122px;
  }

  .chat-header {
    min-height: 66px;
    padding: 10px 12px;
  }

  .connection-state {
    display: none;
  }

  .message-stream {
    padding: 18px 12px 170px;
  }

  .message,
  .message.user {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 14px;
  }

  .message.user .avatar {
    grid-column: 1;
  }

  .message.user .bubble {
    grid-column: 2;
    justify-self: stretch;
  }

  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    font-size: 0.84rem;
  }

  .bubble {
    padding: 13px;
    border-radius: 18px;
  }

  .empty-state {
    top: 43%;
  }

  .empty-state h2 {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

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

  .prompt-grid button {
    min-height: 82px;
    font-size: 0.86rem;
  }

  .composer-shell {
    padding: 10px 10px 12px;
  }

  .composer {
    grid-template-columns: 42px 42px minmax(0, 1fr) 44px;
    gap: 6px;
    min-height: 62px;
    padding: 8px;
    border-radius: 22px;
  }

  .icon-button,
  .send-button {
    width: 42px;
    height: 42px;
    border-radius: 15px;
  }

  .composer textarea {
    min-height: 42px;
    padding: 10px 11px;
    border-radius: 15px;
  }

  .composer-note {
    display: none;
  }

  .terms-dialog {
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .brand-lockup {
    font-size: 0.94rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  .privacy-badge {
    padding: 0 10px;
    font-size: 0.78rem;
  }

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

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