:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0b0b0c;
  --surface: #18181a;
  --surface-hover: #222225;
  --border: #2d2d30;
  --text: #f5f5f2;
  --muted: #919195;
  --accent: #d9ff43;
  --gold: #e8c97a;
  --persona-rgb: 217, 255, 67;
  --persona-secondary: #e8c97a;
  --chat-font-size: 17px;
  --sidebar-width: 286px;
  font-family: 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #141415;
  color: var(--text);
}

button,
textarea,
input {
  font: inherit;
}
button {
  color: inherit;
}

.app-shell {
  position: relative;
  container-type: inline-size;
  display: block;
  overflow: hidden;
  width: min(430px, calc(100vw - 40px));
  height: min(900px, calc(100dvh - 40px));
  border: 1px solid #303033;
  border-radius: 36px;
  background: var(--bg);
  box-shadow: 0 28px 80px #0008;
}

.app-shell[data-theme='indigo'] {
  --bg: #070b13;
  --panel: #0b111d;
  --surface: #151d2a;
  --surface-hover: #1c2737;
  --border: #293447;
}
.app-shell[data-theme='plum'] {
  --bg: #0d070d;
  --panel: #160c15;
  --surface: #21131f;
  --surface-hover: #2c1a29;
  --border: #3c2938;
}
.app-shell[data-theme='earth'] {
  --bg: #0d0d08;
  --panel: #15150d;
  --surface: #202016;
  --surface-hover: #2b2b1e;
  --border: #3a3a28;
}
.app-shell[data-astrologer='veda'] {
  --accent: #d9ff43;
  --gold: #f1c978;
  --persona-rgb: 217, 255, 67;
  --persona-secondary: #e09a46;
}
.app-shell[data-astrologer='acharya'] {
  --accent: #82a8ff;
  --gold: #efb356;
  --persona-rgb: 80, 123, 232;
  --persona-secondary: #ef9d3b;
}
.app-shell[data-astrologer='tara'] {
  --accent: #68e2cd;
  --gold: #f1a6bc;
  --persona-rgb: 59, 196, 173;
  --persona-secondary: #de759d;
}
.app-shell[data-astrologer='mitra'] {
  --accent: #ff8b67;
  --gold: #d8f05e;
  --persona-rgb: 255, 113, 76;
  --persona-secondary: #cbe64c;
}
.app-shell[data-astrologer='aanya'] {
  --accent: #82a8ff;
  --gold: #efc46a;
  --persona-rgb: 70, 112, 223;
  --persona-secondary: #d89b39;
}
.app-shell[data-astrologer='kavya'] {
  --accent: #f39ab7;
  --gold: #e7b16b;
  --persona-rgb: 192, 76, 122;
  --persona-secondary: #ad5886;
}
.app-shell[data-astrologer='riya'] {
  --accent: #ff9a65;
  --gold: #d5f16c;
  --persona-rgb: 247, 119, 68;
  --persona-secondary: #6aaee8;
}
.app-shell[data-font-size='small'] {
  --chat-font-size: 15px;
}
.app-shell[data-font-size='large'] {
  --chat-font-size: 19px;
}

.sidebar {
  position: absolute;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: min(84%, 310px);
  padding: 24px 16px 18px;
  background: #101011;
  border-right: 1px solid #232325;
  transform: translateX(-102%);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.sidebar-open .sidebar {
  transform: translateX(0);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 25px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.brand-row strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.new-chat {
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.new-chat:hover {
  background: var(--surface-hover);
}
.new-chat:active {
  transform: scale(0.98);
}
.new-chat.wide {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  font-weight: 600;
}
.new-chat.wide span {
  color: var(--accent);
  font-size: 21px;
  font-weight: 400;
}

.history-label {
  margin: 28px 10px 8px;
  color: #6f6f73;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history {
  display: grid;
  gap: 3px;
}
.history-item {
  overflow: hidden;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #b7b7ba;
  cursor: pointer;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-item:hover,
.history-item.active {
  background: #1b1b1d;
  color: var(--text);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid #242426;
  color: var(--muted);
  font-size: 12px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px #d9ff4316;
}
.status-dot.offline {
  background: #ff6b57;
  box-shadow: 0 0 0 3px #ff6b5718;
}

.chat-panel {
  position: relative;
  height: 100%;
  min-width: 0;
  isolation: isolate;
  background: radial-gradient(
      circle at 70% 0%,
      rgba(var(--persona-rgb), 0.11) 0,
      transparent 34%
    ),
    var(--bg);
}

.persona-backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.persona-backdrop img {
  width: 100%;
  height: 68%;
  object-fit: cover;
  object-position: 50% 21%;
  opacity: 0.22;
  filter: saturate(0.88) contrast(0.94);
  transform: scale(1.035);
  transition: opacity 280ms ease, filter 280ms ease;
}
.persona-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--bg) 32%, transparent) 0%,
      color-mix(in srgb, var(--bg) 68%, transparent) 30%,
      var(--bg) 67%
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--bg) 72%, transparent),
      transparent 42%,
      color-mix(in srgb, var(--bg) 70%, transparent)
    );
}

.topbar {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 16px 24px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg) 92%, transparent) 35%,
    transparent
  );
}

.icon-button,
.persona,
.attach-button,
.send-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}
.icon-button:hover,
.persona:hover,
.attach-button:hover {
  background: var(--surface-hover);
}
.icon-button:active,
.persona:active,
.attach-button:active,
.send-button:active {
  transform: scale(0.94);
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}
.menu-button {
  display: grid;
  gap: 4px;
  align-content: center;
}
.menu-button span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}
.persona {
  grid-auto-flow: column;
  gap: 7px;
  min-width: 128px;
  height: 44px;
  padding: 0 12px 0 7px;
  border-radius: 24px;
  font-weight: 700;
}
.persona > span {
  color: var(--muted);
  font-size: 17px;
}
.persona > span:last-child {
  color: var(--gold);
  font-size: 15px;
}
#persona-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(var(--persona-rgb), 0.08);
}
.persona-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-portrait-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  color: var(--gold);
  cursor: pointer;
  font-size: 17px;
  transition: background 160ms ease, transform 160ms ease;
}
.top-portrait-button:hover {
  background: var(--surface-hover);
}
.top-portrait-button:active {
  transform: scale(0.94);
}
.persona-menu {
  position: absolute;
  z-index: 40;
  top: 53px;
  left: 50%;
  width: min(286px, calc(100vw - 44px));
  max-height: min(68dvh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in oklab, var(--panel) 94%, transparent);
  backdrop-filter: blur(20px);
  box-shadow: 0 22px 60px #000b;
  transform: translateX(-50%);
  animation: menu-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.persona-menu button {
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #c8c8c5;
  cursor: pointer;
  text-align: left;
}
.persona-menu button:hover,
.persona-menu button.active {
  background: var(--surface);
  color: var(--text);
}
.persona-orb {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, #494438);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px #0007;
}
.persona-menu button > span:nth-child(2) {
  display: grid;
  gap: 2px;
}
.persona-menu strong {
  font-size: 13px;
}
.persona-menu small {
  color: var(--muted);
  font-size: 11px;
}
.persona-menu i {
  opacity: 0;
  color: var(--accent);
  font-style: normal;
}
.persona-menu button.active i {
  opacity: 1;
}

.conversation {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #343438 transparent;
  scrollbar-width: thin;
}

.empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  padding: 102px 40px 170px;
  text-align: center;
  animation: reveal 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.empty-avatar-stage {
  position: relative;
  display: grid;
  justify-items: center;
  margin-bottom: 28px;
}
.empty-avatar-button {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.empty-avatar-button:focus-visible img {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.empty-avatar-button img {
  position: relative;
  z-index: 1;
  width: 106px;
  height: 106px;
  border: 1px solid color-mix(in srgb, var(--gold) 72%, transparent);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 45px #000a, 0 0 0 7px rgba(var(--persona-rgb), 0.07);
}
.empty-avatar-button .empty-avatar-halo {
  position: absolute;
  inset: -32px;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--persona-rgb), 0.22),
    transparent 67%
  );
  filter: blur(3px);
  box-shadow: none;
}
.empty-avatar-button #empty-personality {
  position: relative;
  z-index: 2;
  margin-top: -8px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  box-shadow: 0 8px 20px #0008;
}
.portrait-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: color 160ms ease, background 160ms ease;
}
.portrait-hint:hover,
.portrait-hint:focus-visible {
  outline: none;
  background: rgba(var(--persona-rgb), 0.09);
  color: var(--text);
}
.portrait-hint > span:first-child {
  color: var(--gold);
  font-size: 14px;
}

.portrait-overlay {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 16px;
  background: #000b;
  backdrop-filter: blur(10px);
  animation: reveal 180ms ease both;
}
.portrait-gallery {
  width: 100%;
  padding: 20px 18px 18px;
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--border));
  border-radius: 28px;
  background: color-mix(in oklab, var(--panel) 96%, transparent);
  box-shadow: 0 24px 70px #000d;
  animation: sheet-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.portrait-gallery-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.portrait-gallery-header p {
  margin: 2px 0 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.portrait-gallery-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}
.portrait-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}
.portrait-gallery-stage {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
}
.portrait-gallery-stage > img {
  width: 100%;
  max-height: min(48dvh, 430px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--border));
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 16px 38px #0009;
}
.portrait-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0 0 4px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--gold);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.portrait-arrow:active,
.portrait-close:active {
  transform: scale(0.94);
}
.portrait-thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.portrait-thumbnail {
  width: 54px;
  height: 54px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}
.portrait-thumbnail.active {
  border-color: var(--accent);
  background: rgba(var(--persona-rgb), 0.1);
}
.portrait-thumbnail img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}
.portrait-gallery-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.intro-copy {
  max-width: 640px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.intro-copy h1 {
  margin: 0;
  font-size: clamp(42px, 12cqw, 52px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 3px 22px var(--bg);
}
.intro-copy > p:last-child {
  max-width: 540px;
  margin: 24px auto 0;
  color: #a7a7aa;
  font-size: 16px;
  line-height: 1.55;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 36px;
}
.suggestions button {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: #c9c9cc;
  cursor: pointer;
  font-size: 12px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.suggestions button:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  background: color-mix(in srgb, var(--surface-hover) 82%, transparent);
  color: var(--text);
}

.messages {
  display: grid;
  gap: 30px;
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 112px 0 254px;
}
.messages:empty {
  display: none;
}

.message {
  animation: message-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.message.user {
  justify-self: end;
  max-width: min(78%, 560px);
  padding: 13px 18px;
  border-radius: 24px;
  border: 1px solid rgba(var(--persona-rgb), 0.14);
  background: linear-gradient(
    135deg,
    rgba(var(--persona-rgb), 0.16),
    color-mix(in srgb, var(--surface) 92%, transparent)
  );
  box-shadow: 0 10px 28px #0003;
  line-height: 1.45;
  font-size: var(--chat-font-size);
}
.message.assistant {
  max-width: 690px;
  color: #ececea;
  font-size: var(--chat-font-size);
  line-height: 1.7;
}
.markdown-body > :first-child {
  margin-top: 0;
}
.markdown-body > :last-child {
  margin-bottom: 0;
}
.markdown-body p {
  margin: 0 0 14px;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 24px 0 9px;
  color: #faf9f2;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.markdown-body h1 {
  font-size: 24px;
}
.markdown-body h2 {
  font-size: 20px;
}
.markdown-body h3 {
  font-size: 17px;
  color: var(--gold);
}
.markdown-body ul,
.markdown-body ol {
  margin: 8px 0 16px;
  padding-left: 22px;
}
.markdown-body li {
  margin: 5px 0;
  padding-left: 3px;
}
.markdown-body li::marker {
  color: var(--gold);
}
.markdown-body strong {
  color: #fffef8;
  font-weight: 750;
}
.markdown-body em {
  color: #d3d3cf;
}
.markdown-body blockquote {
  margin: 16px 0;
  padding: 2px 0 2px 15px;
  border-left: 2px solid var(--gold);
  color: #bdbdb8;
}
.markdown-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #202023;
  color: #e8c97a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
}
.markdown-body pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #111113;
}
.markdown-body pre code {
  padding: 0;
  background: transparent;
}
.markdown-body a {
  color: var(--accent);
  text-underline-offset: 3px;
}
.markdown-body hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #6f6f73;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.message-meta img {
  width: 24px;
  height: 24px;
  border: 1px solid color-mix(in srgb, var(--gold) 46%, transparent);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px #0007;
}

.thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  color: var(--muted);
}
.thinking i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.1s ease-in-out infinite;
}
.thinking i:nth-child(2) {
  animation-delay: 120ms;
}
.thinking i:nth-child(3) {
  animation-delay: 240ms;
}
.thinking span {
  margin-left: 5px;
  font-size: 13px;
}

.composer-wrap {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 64px;
  left: 0;
  padding: 42px 24px 16px;
  background: linear-gradient(0deg, var(--bg) 65%, transparent);
}
.chart-status {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 110px);
  margin: 0 auto 9px;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid #34342b;
  border-radius: 999px;
  background: #171711e8;
  color: #bdbda8;
  cursor: pointer;
  font-size: 11px;
}
.chart-status span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-status span:last-child {
  color: #77776d;
  font-size: 17px;
  line-height: 10px;
}
.chart-status-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b8b82;
}
.chart-status[data-state='loading'] .chart-status-dot {
  animation: pulse 1s ease-in-out infinite;
}
.chart-status[data-state='ready'] .chart-status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px #d9ff4312;
}
.chart-status[data-state='error'] {
  border-color: #723e35;
  color: #ffb8aa;
}
.chart-status[data-state='error'] .chart-status-dot {
  background: #ff6b57;
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  width: min(790px, 100%);
  margin: 0 auto;
}
.attach-button,
.send-button {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 25px;
  font-weight: 300;
}
.input-pill {
  display: flex;
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
}
.input-pill:focus-within {
  border-color: #454549;
  background: #18181a;
}
textarea {
  width: 100%;
  max-height: 136px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 11px 17px 10px;
  background: transparent;
  color: var(--text);
  font-size: max(16px, calc(var(--chat-font-size) - 1px));
  line-height: 23px;
}
textarea::placeholder {
  color: #77777b;
}
.send-button {
  color: #4f4f53;
  cursor: default;
}
.send-button:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 72%, white);
  background: var(--accent);
  color: #111112;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(var(--persona-rgb), 0.2);
}
.send-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.local-note {
  margin: 9px 0 0;
  color: #5e5e62;
  font-size: 11px;
  text-align: center;
}

.app-tabs {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 64px;
  padding: 6px 24px 7px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(22px);
}
.app-tabs button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #6f6f73;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}
.app-tabs button:hover {
  background: var(--surface);
  color: var(--text);
}
.app-tabs button:active {
  transform: scale(0.96);
}
.app-tabs button.active {
  color: var(--accent);
}
.app-tabs svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.app-tabs circle {
  fill: var(--panel);
}
.app-shell[data-view='timeline'] .persona-backdrop,
.app-shell[data-view='timeline'] .topbar,
.app-shell[data-view='timeline'] .conversation,
.app-shell[data-view='timeline'] .composer-wrap {
  display: none;
}

.timeline-page {
  position: absolute;
  z-index: 4;
  inset: 0 0 64px;
  overflow: hidden;
  background: radial-gradient(
      circle at 92% 8%,
      rgba(var(--persona-rgb), 0.12),
      transparent 25%
    ),
    #09090a;
  animation: page-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.timeline-page::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 42px,
    #ffffff05 43px
  );
}
.timeline-topbar {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 13px 18px;
  border-bottom: 1px solid #29292c;
  background: #0a0a0bea;
  backdrop-filter: blur(18px);
}
.timeline-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline-brand > span {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, #353535);
  border-radius: 50%;
  background: #191817;
  color: var(--gold);
  font-size: 18px;
}
.timeline-brand div {
  display: grid;
  gap: 1px;
}
.timeline-brand strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}
.timeline-brand small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.timeline-profile-button {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 158px;
  height: 38px;
  padding: 4px 9px 4px 5px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.timeline-profile-button > span:first-child {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-hover));
  color: var(--accent);
}
.timeline-profile-button > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-profile-button > span:last-child {
  color: var(--gold);
}
.timeline-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 110px 20px 46px;
  scrollbar-color: #343438 transparent;
  scrollbar-width: thin;
}
.timeline-hero {
  max-width: 560px;
  padding: 18px 2px 30px;
}
.timeline-kicker {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
}
.timeline-hero h1 {
  margin: 0;
  font-size: clamp(40px, 11cqw, 52px);
  line-height: 0.98;
  letter-spacing: -0.058em;
}
.timeline-hero > p:last-child {
  max-width: 520px;
  margin: 20px 0 0;
  color: #a7a7ab;
  font-size: 14px;
  line-height: 1.55;
}
.dasha-band {
  display: grid;
  grid-template-columns: 0.82fr 1.45fr 0.9fr;
  overflow: hidden;
  border: 1px solid #313136;
  border-radius: 17px;
  background: #121214;
}
.dasha-band-item {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px 12px 13px;
}
.dasha-band-item + .dasha-band-item {
  border-left: 1px solid #303034;
}
.dasha-band-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
}
.dasha-band-item.antar::before {
  background: var(--accent);
}
.dasha-band-item.change::before {
  background: #8eb7ff;
}
.dasha-band-item small {
  overflow: hidden;
  color: #737377;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dasha-band-item strong {
  overflow: hidden;
  font-size: 15px;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-chart-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 2px 27px;
  color: #77777c;
  font-size: 10px;
}
.timeline-chart-label > span:first-child {
  color: var(--gold);
}
.year-selector {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 4px;
  padding: 10px 0 13px;
  border-top: 1px solid #28282b;
  border-bottom: 1px solid #28282b;
}
.year-selector > button {
  height: 34px;
  border: 0;
  background: transparent;
  color: #77777c;
  cursor: pointer;
  font-size: 25px;
}
.year-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.year-options button {
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: #66666b;
  cursor: pointer;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: -0.035em;
}
.year-options button.active {
  color: var(--text);
  font-size: 24px;
}
.year-options button.active::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  margin: 7px auto -7px;
  border-radius: 2px;
  background: var(--accent);
}
.timeline-filters {
  display: flex;
  gap: 7px;
  margin: 15px -20px 0;
  padding: 0 20px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.timeline-filters::-webkit-scrollbar {
  display: none;
}
.timeline-filters button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #2c2c30;
  border-radius: 999px;
  background: #111113;
  color: #88888d;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.timeline-filters button.active {
  border-color: color-mix(in srgb, var(--accent) 48%, #343439);
  background: color-mix(in srgb, var(--accent) 12%, #111113);
  color: var(--text);
}
.timeline-ledger {
  margin-top: 42px;
}
.timeline-ledger-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.timeline-ledger-heading p {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.17em;
}
.timeline-ledger-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.04em;
}
.timeline-ledger-heading > span {
  color: #707075;
  font-size: 10px;
}
.timeline-list {
  display: grid;
}
.timeline-entry {
  --entry-color: var(--gold);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  animation: message-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.timeline-entry-rail {
  position: relative;
  display: grid;
  justify-items: center;
}
.timeline-entry-rail span {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border: 3px solid #09090a;
  border-radius: 50%;
  background: var(--entry-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--entry-color) 52%, #36363a);
}
.timeline-entry-rail i {
  position: absolute;
  top: 18px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--entry-color), #303034 25%, #26262a);
}
.timeline-entry:last-child .timeline-entry-rail i {
  bottom: 26px;
}
.timeline-entry-content {
  padding: 0 0 32px 5px;
  border-bottom: 1px solid #26262a;
}
.timeline-entry + .timeline-entry .timeline-entry-content {
  padding-top: 29px;
}
.timeline-entry-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--entry-color);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
}
.timeline-entry-date strong {
  padding: 4px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--entry-color) 16%, #161618);
  color: var(--entry-color);
  font-size: 8px;
  letter-spacing: 0.12em;
}
.timeline-entry h3 {
  margin: 10px 0 5px;
  font-size: 20px;
  letter-spacing: -0.035em;
  line-height: 1.13;
}
.timeline-entry-period {
  margin: 0 0 14px;
  color: #79797e;
  font-size: 10px;
  font-weight: 700;
}
.timeline-entry-guidance,
.timeline-entry-watch {
  margin: 0;
  color: #c6c6c7;
  font-size: 13px;
  line-height: 1.58;
}
.timeline-entry-watch {
  margin-top: 9px;
  color: #8f8f94;
}
.timeline-entry-watch strong {
  color: #b8b8bb;
}
.timeline-transition {
  display: inline-flex;
  margin-top: 13px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--entry-color) 30%, #2e2e32);
  border-radius: 8px;
  background: color-mix(in srgb, var(--entry-color) 8%, #111113);
  color: #b9b9bd;
  font-size: 9px;
  font-weight: 720;
}
.timeline-ask-button {
  display: block;
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
}
.timeline-entry.current .timeline-entry-content {
  margin: -13px -10px 18px -5px;
  padding: 13px 10px 22px 10px;
  border: 1px solid color-mix(in srgb, var(--entry-color) 24%, #303034);
  border-radius: 16px;
  background: color-mix(in srgb, var(--entry-color) 6%, #111113);
}
.timeline-entry.current + .timeline-entry .timeline-entry-content {
  padding-top: 10px;
}
.timeline-empty {
  padding: 34px 18px;
  border-top: 1px solid #2b2b2e;
  border-bottom: 1px solid #2b2b2e;
  color: #85858a;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.timeline-disclosure {
  margin: 34px 4px 0;
  color: #626267;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.settings-page {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  grid-template-rows: 76px 1fr;
  background: var(--bg);
  animation: page-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.settings-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  background: var(--bg);
}
.settings-header h2 {
  margin: 0;
  font-size: 17px;
  text-align: center;
}
.settings-header-spacer {
  width: 44px;
}
.settings-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 22px 44px;
}
.settings-section + .settings-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.settings-section-heading .eyebrow {
  margin-bottom: 7px;
  color: var(--gold);
}
.settings-section-heading h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}
.settings-row,
.settings-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.select-row {
  margin-top: 14px;
}
.settings-row > span,
.settings-control > span {
  display: grid;
  gap: 3px;
}
.settings-row strong,
.settings-control strong {
  font-size: 14px;
}
.settings-row small,
.settings-control small {
  color: var(--muted);
  font-size: 11px;
}
.settings-row select {
  max-width: 138px;
  padding: 8px 26px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}
.segmented-control {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface);
}
.segmented-control button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.segmented-control button:nth-child(1) {
  font-size: 11px;
}
.segmented-control button:nth-child(2) {
  font-size: 14px;
}
.segmented-control button:nth-child(3) {
  font-size: 18px;
}
.segmented-control button.active {
  background: var(--text);
  color: var(--bg);
}
.theme-swatches {
  display: flex;
  gap: 8px;
}
.theme-swatches button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.theme-swatches i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #070708;
}
.theme-swatches [data-theme='indigo'] i {
  background: #101c32;
}
.theme-swatches [data-theme='plum'] i {
  background: #291428;
}
.theme-swatches [data-theme='earth'] i {
  background: #292818;
}
.theme-swatches button.active {
  border-color: var(--accent);
}
.profiles-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.add-profile-button {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.privacy-note {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.profile-list {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
}
.profile-item {
  display: grid;
  grid-template-columns: 36px 1fr 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.profile-item:hover {
  background: var(--surface);
}
.profile-item.active {
  border-color: #484635;
  background: color-mix(in oklab, var(--surface) 80%, #34310f);
}
.profile-initial {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}
.profile-item > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.profile-item strong,
.profile-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-item strong {
  font-size: 13px;
}
.profile-item small {
  color: var(--muted);
  font-size: 10px;
}
.profile-item i {
  opacity: 0;
  color: var(--accent);
  font-style: normal;
}
.profile-item.active i {
  opacity: 1;
}
.profile-form {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.profile-name-field input {
  font-weight: 750;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.field-grid.coordinates {
  grid-template-columns: 1fr 1fr 1fr;
}
.field {
  display: grid;
  gap: 7px;
  margin: 0 0 13px;
  color: #98989d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: 0;
  background: #18181a;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.field input:focus {
  border-color: #66604b;
  box-shadow: 0 0 0 3px #e8c97a0d;
}
.form-error {
  margin: 2px 0 12px;
  color: #ff9c8c;
  font-size: 12px;
  line-height: 1.4;
}
.calculate-button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #11120d;
  cursor: pointer;
  font-weight: 800;
}
.profile-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
}
.delete-profile-button {
  min-width: 76px;
  border: 1px solid #4b2927;
  border-radius: 14px;
  background: #21100f;
  color: #e99a90;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.delete-profile-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.calculate-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.calculation-note {
  margin: 10px 0 0;
  color: #66666b;
  font-size: 10px;
  text-align: center;
}

.scrim {
  position: absolute;
  z-index: 19;
  inset: 0;
  display: block;
  background: #000b;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
body.sidebar-open .scrim {
  opacity: 1;
  pointer-events: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes pulse {
  0%,
  65%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translate(-50%, -7px) scale(0.98);
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}

@media (max-width: 500px), (max-height: 740px) {
  body {
    padding: 0;
    background: var(--bg);
  }
  .app-shell {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .topbar {
    padding-inline: 14px;
  }
  .messages {
    width: calc(100% - 30px);
  }
  .empty-state {
    padding-inline: 22px;
  }
  .intro-copy h1 {
    font-size: clamp(38px, 12vw, 54px);
  }
  .composer-wrap {
    padding-inline: 12px;
  }
  .local-note {
    display: none;
  }
  .settings-content {
    padding-inline: 18px;
  }
}

@media (max-width: 390px) {
  .field-grid.coordinates {
    grid-template-columns: 1fr 1fr;
  }
  .field-grid.coordinates .field:last-child {
    grid-column: 1 / -1;
  }
}

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