/* Ask Jyotish web app. Light and dark themes follow the device setting. */
:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --surface-2: #f5eee6;
  --text: #1f1a17;
  --muted: #6b625b;
  --border: #e9e1d8;
  --primary: #c75a0a;
  --primary-strong: #a44a06;
  --on-primary: #ffffff;
  --primary-soft: #fde9d7;
  --gold: #a87a12;
  --good: #2e7d32;
  --good-soft: #e3f2e4;
  --warn: #9a5b00;
  --warn-soft: #fdf0d8;
  --bad: #c0392b;
  --bad-soft: #fbe5e2;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 4px 16px rgb(60 40 20 / 6%);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110f;
    --surface: #1e1a17;
    --surface-2: #29231f;
    --text: #f3ede7;
    --muted: #a99f96;
    --border: #352e29;
    --primary: #f08a3c;
    --primary-strong: #ffa25e;
    --on-primary: #1b0f05;
    --primary-soft: #3a2616;
    --gold: #d9ab45;
    --good: #66bb6a;
    --good-soft: #1d2e1e;
    --warn: #e0a040;
    --warn-soft: #33281a;
    --bad: #ef7a6c;
    --bad-soft: #3a1f1c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14110f; --surface: #1e1a17; --surface-2: #29231f; --text: #f3ede7; --muted: #a99f96; --border: #352e29;
  --primary: #f08a3c; --primary-strong: #ffa25e; --on-primary: #1b0f05; --primary-soft: #3a2616; --gold: #d9ab45;
  --good: #66bb6a; --good-soft: #1d2e1e; --warn: #e0a040; --warn-soft: #33281a; --bad: #ef7a6c; --bad-soft: #3a1f1c;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .6em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "top" "main" "nav";
}
.top {
  grid-area: top;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--text); }
.brand svg { width: 30px; height: 30px; }
.top .spacer { flex: 1; }
.main { grid-area: main; overflow-y: auto; overscroll-behavior: contain; }
.main.fill { overflow: hidden; display: flex; flex-direction: column; }
.page { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; }
.page > * + * { margin-top: 14px; }
.page-title { display: flex; align-items: center; gap: 10px; }
.page-title h1 { flex: 1; }

.tabs {
  grid-area: nav;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 7px;
  font-size: .72rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a .pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 15px; }
.tabs a[aria-current="page"] { color: var(--primary); }
.tabs a[aria-current="page"] .pill { background: var(--primary-soft); }
.shell.bare .tabs { display: none; }

@media (min-width: 900px) {
  .shell { grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; grid-template-areas: "top nav" "main main"; }
  .top { border-bottom: 1px solid var(--border); }
  .tabs { display: flex; justify-content: flex-end; gap: 4px; border-top: 0; border-bottom: 1px solid var(--border); padding: 0 16px; }
  .tabs a { flex-direction: row; gap: 8px; font-size: .92rem; padding: 0 14px 0 10px; margin: 8px 0; border-radius: 20px; }
  .tabs a .pill { width: auto; height: auto; background: none !important; }
  .tabs a[aria-current="page"] { background: var(--primary-soft); }
  .tabs a:hover { color: var(--primary); }
  .tabs a svg { width: 20px; height: 20px; }
  .shell.bare { grid-template-areas: "top top" "main main"; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: 22px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-strong); }
.btn.block { width: 100%; min-height: 52px; font-size: 1.05rem; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.chip-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 18px; padding: 6px 14px; font-size: .9rem; cursor: pointer;
}
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 5px 12px; font-weight: 600; cursor: pointer; font-size: .9rem; }

.field { display: block; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { flex: 1 1 150px; min-width: 0; }
.form { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.input[type="date"], .input[type="time"] { min-width: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.hint { font-size: .85rem; color: var(--muted); }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.seg button {
  flex: 1 0 auto; border: 0; background: transparent; color: var(--muted);
  padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* place picker */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  max-height: 280px; overflow-y: auto;
}
.combo-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.combo-list li small { color: var(--muted); }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--primary-soft); }

/* ---------- cards & data ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card > h2, .card > h3 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fact { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.fact b { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fact span { font-weight: 600; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.list-row { display: flex; gap: 12px; align-items: baseline; }
.list-row > :first-child { flex: 1; min-width: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 0 8px 8px 0; }
table.data td { padding: 9px 8px 9px 0; border-top: 1px solid var(--border); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--primary-soft); color: var(--primary); }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.bar.good > i { background: var(--good); }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }
.score-row { display: grid; grid-template-columns: 90px 1fr 40px; gap: 10px; align-items: center; font-size: .92rem; }
.score-row + .score-row { margin-top: 8px; }
.ring { --p: 50; --c: var(--primary); width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); flex: none; }
.ring > div { width: 88px; height: 88px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring b { font-size: 1.5rem; }
.ring small { color: var(--muted); font-size: .75rem; }
.hero { display: flex; gap: 16px; align-items: center; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--text); font-size: .92rem; }
.note.info { background: var(--primary-soft); }
.error { padding: 14px; border-radius: 10px; background: var(--bad-soft); }
.error .btn { margin-top: 10px; }
details.fold { border-top: 1px solid var(--border); }
details.fold:first-child { border-top: 0; }
details.fold > summary { list-style: none; cursor: pointer; padding: 12px 0; display: flex; gap: 10px; align-items: baseline; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > summary > :first-child { flex: 1; }
details.fold > div { padding: 0 0 12px; }
.chart-box { display: grid; place-items: center; }
.chart-box img { width: 100%; max-width: 440px; height: auto; border-radius: 10px; aspect-ratio: 1; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 4px; border: 0; border-top: 1px solid var(--border); background: none;
  color: var(--text); text-decoration: none; text-align: left; cursor: pointer;
}
.menu li:first-child a, .menu li:first-child button { border-top: 0; }
.menu .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.menu .ico svg { width: 22px; height: 22px; }
.menu .txt { flex: 1; }
.menu .txt small { display: block; color: var(--muted); }
.signs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (max-width: 520px) { .signs { grid-template-columns: repeat(4, 1fr); } }
.signs button {
  border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 8px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .8rem; color: var(--text);
}
.signs button .sym { font-size: 1.4rem; line-height: 1.2; color: var(--primary); }
.signs button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--surface-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.now { background: var(--primary-soft); border-radius: 8px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal button {
  min-height: 64px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  padding: 5px 4px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; overflow: hidden; color: var(--text);
}
.cal button b { font-size: .95rem; }
.cal button small { font-size: .66rem; color: var(--muted); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal button .fest { color: var(--primary); font-weight: 600; }
.cal button .dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-top: 2px; }
@media (max-width: 600px) {
  .cal button { min-height: 54px; padding: 4px 3px; }
  .cal button .fest { display: none; }
  .cal button .dot { display: block; }
}
.cal button.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal button.special { background: var(--primary-soft); }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.chat-inner { max-width: 760px; margin: 0 auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; max-width: 88%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble { padding: 11px 15px; border-radius: 18px; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.bot .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.bubble p:last-child, .bubble ul:last-child { margin-bottom: 0; }
.bubble ul { margin: 0 0 .6em; padding-left: 1.2em; }
.bubble li { margin: 2px 0; }
.msg-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.msg-meta button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .78rem; padding: 2px 4px; }
.msg-meta button:hover { color: var(--primary); }
.msg .cards { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; width: 100%; }
.msg .card { padding: 12px 14px; box-shadow: none; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.suggest { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.suggest .chip-btn { flex: none; }
.composer-wrap { border-top: 1px solid var(--border); background: var(--surface); }
.composer { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; max-height: 140px; min-height: 46px; padding: 11px 16px;
  border-radius: 23px; border: 1px solid var(--border); background: var(--bg); line-height: 1.4;
}
.composer textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; flex: none; }
.send:disabled { opacity: .45; cursor: default; }
.send svg { width: 22px; height: 22px; }
.today-card { display: flex; gap: 12px; align-items: center; }
.today-card .badge { flex: none; }

/* welcome */
.welcome { max-width: 520px; margin: 0 auto; padding: 28px 20px 40px; }
.welcome > * + * { margin-top: 16px; }
.welcome .logo svg { width: 56px; height: 56px; }
.lead { font-size: 1.05rem; color: var(--muted); }
.privacy { text-align: center; font-size: .82rem; color: var(--muted); }

/* ---------- Additions: layout fixes, AI readings, people ---------- */

/* Cards inside a screen's loaded content (Milan results, Panchang, Kundli tabs…) get the same gap as the page. */
.page > div:not([class]) > * + * { margin-top: 14px; }
.page > div:not([class]):empty { display: none; }

/* Icons inside buttons stay icon-sized (the report button showed a giant icon). */
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.block svg { width: 22px; height: 22px; }
.row > .btn { min-height: 46px; flex: 1 1 200px; text-align: center; } /* side by side on wide screens, stacked on phones */

/* Long AI and engine readings: real section headings, comfortable reading width. */
.rt-h { font-size: 1.05rem; font-weight: 700; margin: 1.1em 0 .35em; color: var(--text); }
.rt-h:first-child { margin-top: 0; }
.ai-reading { line-height: 1.65; }
.ai-reading p { margin: 0 0 .7em; }
.ai-reading ul { margin: 0 0 .8em; padding-left: 1.2em; }
.ai-reading .rt-h { color: var(--primary); border-top: 1px solid var(--border); padding-top: .9em; }
.ai-reading .rt-h:first-child, .ai-reading .note + .rt-h { border-top: 0; padding-top: 0; }
.reading-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.reading-actions .btn.primary { flex: 1 1 200px; }

/* The person chip in the header. */
.person-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 150px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 18px; padding: 4px 10px 4px 6px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.person-btn svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.person-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-btn:hover { background: var(--surface-2); }
.people .who { flex: 1; min-width: 0; }
.people .who small { display: block; color: var(--muted); }
.people li { display: flex; align-items: center; gap: 10px; }

/* Western chart: Sun, Moon, rising side by side. */
.facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media print {
  .top, .tabs, .reading-actions, .seg, .page-title .icon-btn { display: none !important; }
  .shell { height: auto; display: block; }
  .main { overflow: visible; }
  .card { box-shadow: none; break-inside: avoid-page; }
}

/* Anything with the hidden attribute stays hidden, even buttons styled with display. */
[hidden] { display: none !important; }
.top .btn, .brand { white-space: nowrap; }
.wallet-shortcut { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 11px; border: 1px solid var(--border);
  border-radius: 18px; background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.wallet-shortcut svg { width: 17px; height: 17px; color: var(--primary); }
.wallet-shortcut:hover { border-color: var(--primary); background: var(--primary-soft); }
/* Phones: the star alone stands for the name, leaving room for New chat, the person and language. */
@media (max-width: 480px) {
  .shell:not(.bare) .brand-name { display: none; }
  .top { gap: 8px; }
}

/* ---------- Design refresh ---------- */
:root { --radius: 16px; --grad: linear-gradient(135deg, var(--primary), var(--primary-strong)); --glow: rgb(199 90 10 / 9%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glow: rgb(240 138 60 / 10%); --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 25%); } }
:root[data-theme="dark"] { --glow: rgb(240 138 60 / 10%); }
body { background: radial-gradient(900px 500px at 85% -10%, var(--glow), transparent 70%), radial-gradient(700px 400px at -10% 110%, var(--glow), transparent 70%), var(--bg); background-attachment: fixed; }

/* Header and tab bar: frosted, so content glides under them. */
.top, .tabs { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.brand-name { letter-spacing: -.01em; }
.tabs a { transition: color .15s; }
.tabs a .pill { transition: background .2s, transform .2s; }
.tabs a[aria-current="page"] .pill { transform: translateY(-1px); }

/* Type and cards */
.page > h1, .page-title h1 { font-size: 1.75rem; letter-spacing: -.02em; }
.card { border-radius: var(--radius); }
.card > h2, .card-head h2 { letter-spacing: -.01em; }

/* Buttons and inputs */
.btn { transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px rgb(199 90 10 / 22%); }
.btn.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.06); }
.btn.primary:disabled { box-shadow: none; }
.input { transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.seg button { transition: background .15s, color .15s; }

/* Facts: a soft accent line on top */
.fact { position: relative; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.fact::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); opacity: .75; }
.fact span { font-size: 1.02rem; }

/* Menus: an arrow shows each row opens something */
.menu a { position: relative; padding-right: 26px; transition: background .15s; }
.menu a::after { content: "›"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--muted); }
.menu a:hover { background: var(--surface-2); border-radius: 12px; }

/* Rashifal signs */
.signs button { transition: border-color .15s, transform .15s, background .15s; }
.signs button:hover { border-color: var(--primary); transform: translateY(-1px); }

/* ---------- Welcome ---------- */
.welcome.first { max-width: 1040px; padding-top: 24px; }
.welcome-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 22px 24px;
  background: radial-gradient(420px 260px at 100% 0, var(--glow), transparent 70%), var(--primary-soft); border: 1px solid var(--border); }
.welcome-hero > * + * { margin-top: 12px; }
.welcome-hero .hero-wheel { position: absolute; right: -60px; top: -50px; width: 240px; height: 240px; color: var(--primary); opacity: .55; pointer-events: none; animation: turn 120s linear infinite; }
.welcome-hero .logo { color: var(--primary); }
.welcome-hero .logo svg { width: 48px; height: 48px; }
.welcome-hero h1 { font-size: 2rem; letter-spacing: -.02em; position: relative; }
.welcome-hero .lead { color: var(--text); opacity: .8; max-width: 34ch; position: relative; }
.perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; position: relative; }
.perks li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.perks .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); color: var(--primary); flex: none; box-shadow: var(--shadow); }
.perks .ico svg { width: 20px; height: 20px; }
.welcome-fields { display: grid; gap: 16px; }
.welcome-fields.card { padding: 20px; }
.welcome-fields h2 { font-size: 1.2rem; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (min-width: 900px) {
  .welcome.first { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; padding-top: 40px; }
  .welcome.first > * + * { margin-top: 0; }
  .welcome.first .welcome-hero { position: sticky; top: 24px; padding: 40px 34px; min-height: 480px; }
  .welcome.first .welcome-hero .hero-wheel { width: 340px; height: 340px; right: -90px; top: auto; bottom: -90px; }
  .welcome.first .welcome-hero h1 { font-size: 2.6rem; }
}

/* ---------- Chat ---------- */
.msg.bot { position: relative; padding-left: 38px; }
.msg.bot::before { content: ""; position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 2 14.2 8.6 21 9l-5.3 4.2L17.6 20 12 16.2 6.4 20l1.9-6.8L3 9l6.8-.4L12 2Z'/%3E%3C/svg%3E") center / 16px no-repeat, var(--grad); }
.msg.user .bubble { background: var(--grad); box-shadow: 0 3px 10px rgb(199 90 10 / 18%); }
.msg.bot .bubble { box-shadow: var(--shadow); }
.msg { animation: rise .25s ease-out both; }
.suggest { flex-wrap: wrap; overflow: visible; padding-left: 38px; }
.chip-btn { transition: border-color .15s, color .15s, background .15s; }
.today-card { border-left: 4px solid var(--primary); background: radial-gradient(300px 120px at 100% 0, var(--glow), transparent 70%), var(--surface); }
.composer textarea { transition: box-shadow .15s; }
.send { background: var(--grad); box-shadow: 0 4px 12px rgb(199 90 10 / 25%); transition: transform .1s, opacity .15s; }
.send:active:not(:disabled) { transform: scale(.94); }

/* ---------- Kundli profile ---------- */
.profile-card { background: radial-gradient(360px 160px at 100% 0, var(--glow), transparent 70%), var(--surface); }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--grad); color: var(--on-primary); font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.avatar svg { width: 24px; height: 24px; }

/* Gentle entrance for screens (off for people who prefer less motion). */
.page > * { animation: rise .3s ease-out both; }
.page > :nth-child(2) { animation-delay: .03s; }
.page > :nth-child(3) { animation-delay: .06s; }
.page > :nth-child(n+4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Refinements after review: the wheel stays in the corner, behind nothing important. */
.welcome-hero .hero-wheel { right: -95px; top: -95px; opacity: .32; }
@media (min-width: 900px) {
  .welcome.first .welcome-hero { display: flex; flex-direction: column; }
  .welcome.first .welcome-hero .perks { margin-top: auto; padding-top: 24px; }
  .welcome.first .welcome-hero .hero-wheel { width: 300px; height: 300px; right: -110px; top: -110px; bottom: auto; opacity: .35; }
}
/* Suggested questions: one scrolling row on phones, wrapped on wider screens. */
.suggest { flex-wrap: nowrap; overflow-x: auto; }
@media (min-width: 700px) { .suggest { flex-wrap: wrap; overflow: visible; } }

/* ---------- Share cards and reading PDF ---------- */
.share-row { display: flex; justify-content: flex-end; }
.btn.small svg { width: 16px; height: 16px; }
#print-area { display: none; }
@media print {
  body.print-mode > :not(#print-area) { display: none !important; }
  body.print-mode { background: #fff; color: #111; }
  body.print-mode #print-area { display: block; font-size: 11.5pt; line-height: 1.55; }
  #print-area .print-brand { color: #c75a0a; font-weight: 700; letter-spacing: .02em; }
  #print-area h1 { font-size: 22pt; margin: 6pt 0 2pt; }
  #print-area .print-info { color: #555; margin: 0 0 14pt; padding-bottom: 10pt; border-bottom: 2px solid #c75a0a; }
  #print-area .rt-h { color: #a44a06; border-top: 1px solid #ddd; padding-top: 8pt; break-after: avoid; }
  #print-area .rt-h:first-child { border-top: 0; padding-top: 0; }
  #print-area p, #print-area li { orphans: 3; widows: 3; }
  #print-area .print-foot { margin-top: 18pt; padding-top: 8pt; border-top: 1px solid #ddd; color: #666; font-size: 9pt; }
  @page { margin: 18mm 16mm; }
}

/* ---------- Sign in and account ---------- */
.form-error { color: var(--bad); font-size: .9rem; min-height: 0; }
.form-error:empty { display: none; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 74px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--text);
  border-radius: 8px; padding: 6px 10px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.auth-switch { text-align: center; color: var(--muted); }
.auth-switch a { font-weight: 600; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Admin ---------- */
.admin-users > li { display: grid; gap: 8px; }
.admin-users .who { min-width: 0; flex: 1; }
.admin-users .who small { display: block; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-manual-credit { display: grid; gap: 8px; }
.admin-manual-credit summary { cursor: pointer; font-weight: 600; }
.admin-manual-credit .input { max-width: 24rem; margin-top: 4px; }
.admin-credit-confirm { display: flex; align-items: center; gap: 8px; }
.temp-pw { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; user-select: all; }

/* =====================================================================
   Cosmic theme: dark night sky, glass panels, pink→orange accents.
   One look for every device (the site is always dark). The selector
   :root:not(#_) only raises specificity so these tokens win over the
   light/dark tokens at the top of this file.
   ===================================================================== */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Serif Display"; src: url("fonts/dm-serif-display-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root:not(#_) {
  --bg: #0a0820;
  --surface: #17142f;
  --surface-2: #221d40;
  --glass: rgb(255 255 255 / 5%);
  --glass-2: rgb(255 255 255 / 9%);
  --text: #f6f4ff;
  --muted: #aaa4c9;
  --border: rgb(255 255 255 / 11%);
  --primary: #ff4a9a;
  --primary-strong: #fe6c0f;
  --on-primary: #ffffff;
  --primary-soft: rgb(237 6 135 / 16%);
  --gold: #ffc26b;
  --good: #5fe0a0; --good-soft: rgb(95 224 160 / 14%);
  --warn: #ffbf5c; --warn-soft: rgb(255 191 92 / 14%);
  --bad: #ff7b86; --bad-soft: rgb(255 123 134 / 14%);
  --grad: linear-gradient(90deg, #ed0687, #fe6c0f);
  --glow: rgb(160 60 255 / 18%);
  --shadow: 0 10px 40px rgb(0 0 0 / 35%);
  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, "Noto Sans Devanagari", sans-serif;
  --serif-display: "DM Serif Display", Georgia, "Noto Sans Devanagari", "Nirmala UI", serif;
  color-scheme: dark;
}

/* Night sky: deep gradient, nebula glows and two layers of stars. */
body {
  background:
    radial-gradient(1px 1px at 20% 30%, rgb(255 255 255 / 70%), transparent 60%),
    radial-gradient(1px 1px at 70% 80%, rgb(255 255 255 / 55%), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 60%, rgb(255 255 255 / 60%), transparent 60%),
    radial-gradient(1px 1px at 85% 20%, rgb(255 255 255 / 50%), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgb(140 40 220 / 28%), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgb(237 6 135 / 14%), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgb(60 30 140 / 22%), transparent 70%),
    linear-gradient(180deg, #0c0a24 0%, #06061a 100%);
  background-size: 240px 240px, 330px 330px, 410px 410px, 290px 290px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  color: var(--text);
}
h1, h2, h3, .brand-name, .page-title h1, .card-title { font-family: var(--display); letter-spacing: -.01em; }
h1, .page-title h1 { font-family: var(--serif-display); font-weight: 400; letter-spacing: -.02em; }

/* Header: a floating glass bar. */
.top { margin: 10px 12px 0; border: 1px solid var(--border); border-radius: 18px; background: rgb(20 16 44 / 82%);
  box-shadow: 0 8px 30px rgb(0 0 0 / 35%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { font-size: 1.15rem; }
.brand svg { filter: drop-shadow(0 0 10px rgb(255 74 154 / 60%)); }
.lang-btn, .person-btn { background: var(--glass-2); border-color: var(--border); color: var(--text); }
.tabs { background: rgb(14 11 34 / 86%); border-color: var(--border); }
.tabs a[aria-current="page"] { color: #fff; }
.tabs a[aria-current="page"] .pill { background: var(--grad); box-shadow: 0 4px 16px rgb(237 6 135 / 35%); }
@media (min-width: 900px) {
  .shell { grid-template-areas: "top top" "main main"; grid-template-columns: 1fr; }
  .top { margin: 12px auto 0; width: min(1180px, calc(100% - 24px)); }
  .tabs { grid-area: top; justify-self: center; align-self: center; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; z-index: 2; }
  .tabs a { color: var(--text); opacity: .82; }
  .tabs a:hover { opacity: 1; color: #fff; }
  .tabs a[aria-current="page"] { opacity: 1; background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgb(237 6 135 / 35%); }
  .tabs a[aria-current="page"] .pill { background: none; box-shadow: none; }
}

/* Glass panels */
.card, .fact, .msg.bot .bubble, .signs button, .cal button, .welcome-hero, .menu .ico, .perks .ico {
  background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card { box-shadow: var(--shadow); }
.fact { box-shadow: none; }
.fact::before { background: var(--grad); }
.note { background: var(--warn-soft); border: 1px solid rgb(255 191 92 / 22%); }
.note.info { background: var(--primary-soft); border-color: rgb(255 74 154 / 22%); }
.today-card { border-left: 3px solid #ff4a9a; background: linear-gradient(90deg, rgb(237 6 135 / 12%), var(--glass)); }
.profile-card { background: radial-gradient(360px 160px at 100% 0, rgb(160 60 255 / 22%), transparent 70%), var(--glass); }

/* Buttons: pink→orange with a glow; secondary buttons are glass. */
.btn { background: var(--glass-2); border-color: var(--border); color: var(--text); }
.btn:hover { background: rgb(255 255 255 / 14%); }
.btn.primary, .send { background: var(--grad); border: 0; color: #fff; box-shadow: 0 8px 28px rgb(237 6 135 / 38%); }
.btn.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.08); box-shadow: 0 10px 34px rgb(254 108 15 / 40%); }
.btn.primary:disabled { opacity: .45; box-shadow: none; }
.chip-btn { background: var(--glass-2); border-color: var(--border); color: var(--text); }
.chip-btn:hover { border-color: #ff4a9a; color: #fff; }
.seg { background: var(--glass); border: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgb(237 6 135 / 30%); }
.badge.brand { background: var(--primary-soft); color: #ff8cc0; }

/* Inputs: dark glass */
.input, select.input, .composer textarea { background: rgb(255 255 255 / 6%); border-color: var(--border); color: var(--text); border-radius: 14px; }
.input::placeholder, .composer textarea::placeholder { color: rgb(170 164 201 / 80%); }
.input:focus { border-color: #ff4a9a; box-shadow: 0 0 0 3px rgb(237 6 135 / 22%); }
.combo-list { background: #1b1736; border-color: var(--border); }
select.input option { background: #1b1736; }
.composer-wrap { background: rgb(12 10 32 / 80%); border-color: var(--border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.composer textarea { border-radius: 24px; }

/* Chat */
.msg.user .bubble { background: var(--grad); box-shadow: 0 6px 20px rgb(237 6 135 / 30%); }
.msg.bot::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 2 14.2 8.6 21 9l-5.3 4.2L17.6 20 12 16.2 6.4 20l1.9-6.8L3 9l6.8-.4L12 2Z'/%3E%3C/svg%3E") center / 16px no-repeat, var(--grad); box-shadow: 0 0 16px rgb(237 6 135 / 45%); }

/* Rashifal signs, calendar */
.signs button[aria-pressed="true"] { background: var(--primary-soft); border-color: #ff4a9a; box-shadow: 0 0 0 1px #ff4a9a inset; }
.signs button .sym { color: #ff8cc0; }
.cal button.special { background: var(--primary-soft); }

/* Chart image: the engine draws it on a light background, so it sits on a soft card. */
.chart-box img { border-radius: 14px; box-shadow: 0 6px 24px rgb(0 0 0 / 35%); }

/* Text with the accent gradient */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Welcome / sign-in hero ---------- */
.welcome-hero { background: radial-gradient(500px 300px at 100% 0, rgb(160 60 255 / 25%), transparent 70%), var(--glass); }
.welcome-hero .hero-wheel { color: #ff8cc0; opacity: .25; }
.welcome-hero .logo { color: #ff4a9a; filter: drop-shadow(0 0 14px rgb(255 74 154 / 70%)); }
.welcome-hero h1 { font-size: 2.3rem; line-height: 1.08; }
.welcome-hero .lead { color: var(--muted); opacity: 1; }
.perks .ico { box-shadow: none; color: #ff8cc0; }
@media (min-width: 900px) { .welcome.first .welcome-hero h1 { font-size: 3rem; } }

/* Chat preview inside the hero */
.preview { margin-top: 20px; border: 1px solid var(--border); border-radius: 18px; background: rgb(8 6 26 / 55%); overflow: hidden; position: relative; }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .9rem; }
.preview-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 8px #3ee08f; }
.preview-head small { margin-left: auto; color: var(--muted); font-weight: 400; }
.preview-body { display: grid; gap: 10px; padding: 14px; font-size: .9rem; }
.preview-q { justify-self: end; background: var(--grad); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; max-width: 85%; }
.preview-a { justify-self: start; background: var(--glass-2); border: 1px solid var(--border); padding: 9px 12px; border-radius: 14px 14px 14px 4px; max-width: 92%; color: #ddd8f5; }

/* The nine grahas as glowing orbs */
.grahas { display: flex; justify-content: space-between; gap: 6px; margin-top: 22px; position: relative; }
.graha { display: grid; justify-items: center; gap: 4px; font-size: .68rem; color: var(--muted); text-align: center; flex: 1; min-width: 0; }
.graha b { color: var(--text); font-weight: 600; font-size: .72rem; }
.orb { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset -6px -6px 12px rgb(0 0 0 / 55%), 0 0 14px var(--c, rgb(255 255 255 / 25%)); }
.orb.sun { background: radial-gradient(circle at 35% 35%, #ffe08a, #ff8a1f 60%, #b33a00); --c: rgb(255 150 40 / 70%); }
.orb.moon { background: radial-gradient(circle at 35% 35%, #ffffff, #c9c9d6 55%, #6b6b80); --c: rgb(220 220 255 / 45%); }
.orb.mars { background: radial-gradient(circle at 35% 35%, #ff9a6b, #c43d1a 60%, #5a1405); --c: rgb(255 90 50 / 50%); }
.orb.mercury { background: radial-gradient(circle at 35% 35%, #9ee0ff, #3b7fb0 60%, #14304a); --c: rgb(90 180 255 / 45%); }
.orb.jupiter { background: repeating-linear-gradient(170deg, #f3d6a6 0 4px, #c99560 4px 7px, #e9c48e 7px 10px); --c: rgb(240 190 120 / 45%); }
.orb.venus { background: radial-gradient(circle at 35% 35%, #ffe3f0, #e59ab8 55%, #8a3d5d); --c: rgb(255 150 200 / 50%); }
.orb.saturn { background: radial-gradient(circle at 35% 35%, #f6e6b8, #c8a560 60%, #6b5124); --c: rgb(230 200 120 / 45%); }
.orb.rahu { background: radial-gradient(circle at 35% 35%, #7c6ba8, #2a2145 60%, #0b0818); --c: rgb(140 110 220 / 45%); }
.orb.ketu { background: radial-gradient(circle at 35% 35%, #b4b4b4, #4a4a52 60%, #141418); --c: rgb(200 200 200 / 30%); }

/* Phones: the form comes first after a short hero; the preview hides to keep it short. */
@media (max-width: 899px) {
  .welcome-hero .preview { display: none; }
  .welcome-hero h1 { font-size: 2rem; }
}

/* Light-on-dark overrides for earlier blocks */
.avatar { background: var(--grad); color: #fff; box-shadow: 0 0 18px rgb(237 6 135 / 45%); }
.rt-h, .ai-reading .rt-h { color: #ff8cc0; }
.score-ring, .ring > div { background: #120f2a; }
details.fold > summary::after { color: var(--muted); }

/* Cosmic theme: fixes after review */
/* Phones: the nine grahas wrap into two neat rows instead of squeezing their names together. */
@media (max-width: 899px) {
  .grahas { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .graha { flex: 0 0 18%; }
  .welcome-hero { padding: 22px 18px; }
  /* Sign-in on a phone: a short hero (headline and grahas) so the form is close to the top. */
  .welcome.auth .welcome-hero .lead, .welcome.auth .welcome-hero .perks { display: none; }
  .welcome.auth .welcome-hero .logo svg { width: 36px; height: 36px; }
}
/* Mid-size screens: tab labels give way to icons so they never run into the buttons on the right. */
@media (min-width: 900px) and (max-width: 1199px) {
  .tabs a { font-size: 0; gap: 0; padding: 0 11px; }
  .tabs a svg { width: 21px; height: 21px; }
}

/* =====================================================================
   Homepage (#/home)
   ===================================================================== */
.home { --w: 1180px; overflow: hidden; }
.home > section, .home > footer { width: min(var(--w), calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.home h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; }
.home h3 { font-family: var(--display); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-top: 10px; }
.home-section { padding: 70px 0 10px; }

/* Header on the homepage: section links and the two buttons */
.home-actions { display: flex; align-items: center; gap: 8px; }
.home-nav { display: none; gap: 2px; margin-right: 8px; }
.home-nav button { border: 0; background: none; color: var(--text); opacity: .8; font: 500 .95rem var(--font); padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.home-nav button:hover { opacity: 1; background: var(--glass-2); }
.ghost-btn { background: transparent; }
@media (min-width: 1100px) { .home-nav { display: flex; } }
@media (max-width: 480px) { .home-actions .ghost-btn { display: none; } }

/* ---------- Hero ---------- */
.home-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 0 0; position: relative; }
.hero-copy > * + * { margin-top: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgb(255 74 154 / 45%);
  background: rgb(237 6 135 / 10%); font-size: .85rem; font-weight: 600; color: #ffd1e6; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #ff4a9a; box-shadow: 0 0 10px #ff4a9a; }
.home-hero h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); line-height: 1.02; letter-spacing: -.03em; text-shadow: 0 0 40px rgb(160 60 255 / 35%); }
.hero-sub { font-size: 1.15rem; color: #d8d3f2; max-width: 34em; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: center; font-size: 1.02rem; }
.checks svg { width: 20px; height: 20px; color: #ff4a9a; flex: none; }
.hero-ask { display: flex; gap: 10px; max-width: 560px; }
.hero-ask .input { flex: 1; min-height: 58px; border-radius: 999px; padding: 0 22px; font-size: 1rem; background: rgb(255 255 255 / 7%); }
.hero-ask .btn { min-height: 58px; padding: 0 26px; border-radius: 999px; font-size: 1.05rem; }
.hero-ask .btn svg { width: 18px; height: 18px; }
.pricing-inline { margin: 10px 0 0; color: #b8b1d2; font-size: .86rem; }
.pricing-inline a { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.hero-visual { position: relative; }
.hero-visual .hero-wheel { position: absolute; width: 520px; height: 520px; right: -120px; top: -90px; color: #ff8cc0; opacity: .18; animation: turn 160s linear infinite; pointer-events: none; }
.hero-visual .preview { margin: 0; position: relative; box-shadow: 0 30px 80px rgb(0 0 0 / 45%), 0 0 0 1px rgb(255 74 154 / 12%); }
.hero-visual .preview-body { padding: 18px; min-height: 230px; align-content: start; }
.hero-visual .preview-a { font-size: .95rem; }

/* The nine grahas on a glowing arc */
.hero-arc { grid-column: 1 / -1; position: relative; margin-top: 40px; padding-top: 30px; }
.hero-arc::before { content: ""; position: absolute; left: -10%; right: -10%; top: 0; height: 600px; border-radius: 50% 50% 0 0 / 120px 120px 0 0;
  border-top: 2px solid rgb(255 120 200 / 35%); box-shadow: 0 -20px 60px -20px rgb(237 6 135 / 45%) inset; pointer-events: none;
  background: radial-gradient(60% 120px at 50% 0, rgb(160 60 255 / 18%), transparent); }
.hero-arc .grahas { position: relative; margin: 0; padding: 0 10px; }
.hero-arc .graha { gap: 6px; font-size: .8rem; }
.hero-arc .graha b { font-size: .92rem; }
.hero-arc .orb { width: 52px; height: 52px; }
@media (min-width: 900px) {
  .hero-arc .graha:nth-child(1), .hero-arc .graha:nth-child(9) { transform: translateY(-6px); }
  .hero-arc .graha:nth-child(2), .hero-arc .graha:nth-child(8) { transform: translateY(18px); }
  .hero-arc .graha:nth-child(3), .hero-arc .graha:nth-child(7) { transform: translateY(36px); }
  .hero-arc .graha:nth-child(4), .hero-arc .graha:nth-child(6) { transform: translateY(48px); }
  .hero-arc .graha:nth-child(5) { transform: translateY(54px); }
  .hero-arc { padding-bottom: 60px; }
}

/* ---------- Facts marquee ---------- */
.marquee { overflow: hidden; margin-top: 40px; padding: 22px 0; border-top: 1px solid rgb(255 74 154 / 25%); border-bottom: 1px solid rgb(255 74 154 / 25%);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track, .why-track { display: flex; width: max-content; animation: slide 36s linear infinite; }
.marquee-copy { display: flex; }
.fact-item { display: grid; justify-items: center; gap: 4px; padding: 0 42px; border-right: 1px solid var(--border); min-width: 190px; text-align: center; }
.fact-item b { font-family: var(--display); font-size: 2.3rem; line-height: 1; }
.fact-item span { color: var(--muted); font-size: .9rem; }
.marquee:hover .marquee-track, .why-strip:hover .why-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- The two story panels ---------- */
.duo { display: grid; gap: 0; padding-top: 70px; }
.duo-card { position: relative; overflow: hidden; border-radius: 26px; padding: clamp(26px, 5vw, 54px); background: radial-gradient(600px 300px at 100% 0, rgb(160 60 255 / 25%), transparent 70%), var(--glass);
  border: 1px solid var(--border); }
.duo-card p { color: #d8d3f2; font-size: 1.08rem; max-width: 40em; margin-top: 14px; }
.duo-card .topics-line { color: var(--muted); font-size: .95rem; }
.glow-border { border: 1.5px solid transparent; background: linear-gradient(#141030, #141030) padding-box, linear-gradient(120deg, rgb(237 6 135 / 70%), rgb(254 108 15 / 60%), rgb(140 60 255 / 50%)) border-box; }
.duo-link { width: 2px; height: 56px; margin: 0 auto; background: linear-gradient(#ff4a9a, transparent); box-shadow: 0 0 12px #ff4a9a; }
.duo-card:last-child { display: grid; grid-template-columns: .8fr 1.2fr; gap: 34px; align-items: center; }
.duo-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.duo-art .duo-wheel { width: 100%; height: 100%; color: #ffb3d6; opacity: .55; animation: turn 90s linear infinite; }
.duo-star { position: absolute; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff;
  box-shadow: 0 0 60px rgb(237 6 135 / 60%), 0 0 120px rgb(254 108 15 / 35%); }
.duo-star svg { width: 50px; height: 50px; }
.crossed { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; color: var(--muted); }
.crossed li { display: flex; gap: 10px; }
.crossed span { color: #fe6c0f; font-weight: 700; }
.duo-punch { font-family: var(--display); font-size: 1.6rem !important; font-weight: 700; color: var(--text) !important; margin-top: 22px !important; }

/* ---------- Topic cards ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic { --h: 330; position: relative; overflow: hidden; border-radius: 22px; padding: 26px 24px 22px; min-height: 250px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border); background: radial-gradient(320px 220px at 100% 0, hsl(var(--h) 90% 55% / 30%), transparent 70%), linear-gradient(160deg, hsl(var(--h) 60% 22% / 55%), rgb(20 16 48 / 70%));
  transition: transform .2s, border-color .2s, box-shadow .2s; }
.topic:hover { transform: translateY(-4px); border-color: hsl(var(--h) 90% 65% / 55%); box-shadow: 0 18px 50px hsl(var(--h) 90% 40% / 25%); }
.topic.career { --h: 275; } .topic.health { --h: 160; } .topic.family { --h: 30; } .topic.abroad { --h: 200; } .topic.spirit { --h: 250; }
.topic .topic-wheel { position: absolute; width: 230px; height: 230px; right: -70px; top: -70px; color: hsl(var(--h) 90% 75%); opacity: .3; }
.topic-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; position: relative;
  background: linear-gradient(135deg, hsl(var(--h) 90% 58%), hsl(calc(var(--h) + 35) 95% 55%)); box-shadow: 0 8px 26px hsl(var(--h) 90% 50% / 45%); }
.topic-ico svg { width: 28px; height: 28px; }
.topic h3 { font-size: 1.35rem; margin-top: 8px; position: relative; }
.topic p { color: #d8d3f2; position: relative; flex: 1; }
.topic .btn { align-self: flex-start; position: relative; }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; text-align: center; }
.steps::before { content: ""; position: absolute; left: 12%; right: 12%; top: 32px; height: 2px; background: linear-gradient(90deg, transparent, #ff4a9a, #fe6c0f, transparent); opacity: .7; }
.step-ico { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--grad); color: #fff;
  box-shadow: 0 0 0 6px rgb(10 8 32), 0 10px 30px rgb(237 6 135 / 45%); }
.step-ico svg { width: 28px; height: 28px; }
.step-ico small { position: absolute; top: -6px; right: -10px; background: #1b1736; border: 1px solid var(--border); border-radius: 999px; font-size: .7rem; font-weight: 700; padding: 2px 7px; }
.steps h3 { font-size: 1.12rem; }
.steps p { color: var(--muted); margin-top: 6px; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { border-radius: 20px; padding: 22px; background: var(--glass); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.feature:hover { border-color: rgb(255 74 154 / 45%); transform: translateY(-3px); }
.feature-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: #ff8cc0; margin-bottom: 14px; }
.feature-ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: .94rem; margin-top: 6px; }

/* ---------- Why: floating tilted cards ---------- */
.why-strip { overflow: hidden; padding: 30px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.why-track { gap: 22px; animation-duration: 48s; }
.why-track .marquee-copy { gap: 22px; }
.why-card { width: 230px; flex: none; padding: 22px; border-radius: 20px; background: linear-gradient(160deg, rgb(255 255 255 / 9%), rgb(255 255 255 / 3%)); border: 1px solid var(--border);
  transform: rotate(var(--r)); box-shadow: 0 20px 40px rgb(0 0 0 / 35%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.why-card h3 { font-size: 1.05rem; }
.why-card p { color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; max-width: 960px; margin: 0 auto; }
.faq details { border-radius: 20px; border: 1px solid var(--border); background: linear-gradient(90deg, rgb(140 40 160 / 28%), rgb(120 30 120 / 18%)); overflow: hidden; }
.faq summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 22px 26px; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.12rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 1.6rem; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-ico { display: grid; color: #ffb3d6; }
.faq-ico svg { width: 20px; height: 20px; }
.faq details p { padding: 0 26px 22px 60px; color: #d8d3f2; }

/* ---------- Final call to action ---------- */
.final-cta { position: relative; overflow: hidden; text-align: center; margin-top: 80px !important; padding: clamp(40px, 7vw, 80px) 24px; border-radius: 30px;
  background: radial-gradient(600px 300px at 50% 0, rgb(237 6 135 / 30%), transparent 70%), radial-gradient(500px 300px at 50% 100%, rgb(140 60 255 / 30%), transparent 70%), rgb(20 16 48 / 80%);
  border: 1.5px solid rgb(255 74 154 / 35%); }
.final-cta .final-wheel { position: absolute; width: 640px; height: 640px; left: 50%; top: 50%; margin: -320px 0 0 -320px; color: #ff8cc0; opacity: .12; animation: turn 200s linear infinite; pointer-events: none; }
.final-cta h2, .final-cta p, .final-cta .btn { position: relative; }
.final-cta p { color: #d8d3f2; font-size: 1.1rem; margin: 14px 0 26px; }
.btn.big { min-height: 60px; padding: 0 36px; font-size: 1.12rem; border-radius: 999px; }

/* ---------- Footer ---------- */
.home-footer { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; padding: 60px 0 40px; margin-top: 40px; border-top: 1px solid var(--border); }
.foot-brand b { font-family: var(--display); font-size: 1.3rem; }
.foot-logo { display: inline-grid; color: #ff4a9a; margin-right: 8px; vertical-align: -5px; }
.foot-logo svg { width: 26px; height: 26px; }
.foot-brand p { color: var(--muted); margin-top: 10px; max-width: 30em; }
.foot-links { display: grid; gap: 8px; align-content: start; }
.foot-links b { margin-bottom: 4px; }
.foot-links a, .foot-links button { color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.foot-links a:hover, .foot-links button:hover { color: #fff; }
.foot-note { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); padding-top: 20px; }

/* Sections fade in as they scroll into view */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .marquee-track, .why-track { animation: none; flex-wrap: wrap; width: auto; } .marquee-copy { display: none; } }

/* ---------- Homepage on tablets and phones ---------- */
@media (max-width: 999px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-visual .hero-wheel { width: 360px; height: 360px; right: -100px; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .steps::before { display: none; }
  .duo-card:last-child { grid-template-columns: 1fr; }
  .duo-art { max-width: 260px; margin: 0 auto; }
}
@media (max-width: 899px) { .hero-visual .preview { display: block; } }
@media (max-width: 600px) {
  .home-hero h1 { font-size: 2.4rem; }
  .hero-sub { font-size: 1.02rem; }
  .hero-ask { flex-direction: column; }
  .hero-ask .btn { justify-content: center; }
  .hero-arc .orb { width: 34px; height: 34px; }
  .hero-arc .graha b { font-size: .74rem; }
  .topic-grid, .feature-grid { grid-template-columns: 1fr; }
  .home-section { padding-top: 54px; }
  .fact-item { padding: 0 26px; min-width: 160px; }
  .fact-item b { font-size: 1.9rem; }
  .faq summary { padding: 18px; font-size: 1rem; }
  .faq details p { padding: 0 18px 18px; }
  .home-footer { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
/* Homepage hero preview: a typing reply and a pretend input bar */
.hero-visual .preview-body { min-height: 0; }
.typing-bubble { padding: 10px 14px; }
.preview-input { display: flex; align-items: center; gap: 10px; margin: 0 14px 14px; padding: 10px 10px 10px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: rgb(255 255 255 / 5%); color: var(--muted); font-size: .9rem; }
.preview-input span:first-child { flex: 1; }
.preview-send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; }
.preview-send svg { width: 16px; height: 16px; }
.hero-copy .hint a { color: #ff8cc0; font-weight: 600; }

/* ---------- Homepage: top menu with Learn More ▾ ---------- */
.learn-wrap { position: relative; }
.learn-btn { border: 0; background: none; color: var(--text); opacity: .85; font: 500 .95rem var(--font); padding: 8px 12px; border-radius: 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.learn-btn:hover, .learn-btn[aria-expanded="true"] { opacity: 1; background: var(--glass-2); }
.learn-btn .chev { font-size: .8rem; transition: transform .2s; }
.learn-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.learn-menu { position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px; display: grid; padding: 8px; border-radius: 16px; z-index: 30;
  background: rgb(22 18 48 / 96%); border: 1px solid var(--border); box-shadow: 0 20px 50px rgb(0 0 0 / 50%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.learn-menu button, .home-sheet button { border: 0; background: none; color: var(--text); text-align: left; font: 500 .95rem var(--font); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.learn-menu button:hover, .home-sheet button:hover { background: var(--glass-2); }
.home-menu-btn { display: grid; color: var(--text); }
.home-sheet { position: fixed; top: 76px; right: 12px; left: 12px; z-index: 40; display: grid; gap: 2px; padding: 12px; border-radius: 18px;
  background: rgb(22 18 48 / 97%); border: 1px solid var(--border); box-shadow: 0 24px 60px rgb(0 0 0 / 55%); }
.home-sheet .sheet-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.home-sheet .btn { margin-top: 8px; }
@media (min-width: 1100px) { .home-menu-btn, .home-sheet { display: none !important; } }

/* ---------- Homepage: Birth chart ---------- */
.chart-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.chart-figure { margin: 0; text-align: center; }
.chart-figure figcaption { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.sample-kundli { width: 100%; max-width: 420px; border-radius: 22px; padding: 14px; background: radial-gradient(circle at 50% 50%, rgb(160 60 255 / 22%), transparent 70%), rgb(255 255 255 / 4%);
  border: 1px solid var(--border); box-shadow: 0 30px 80px rgb(0 0 0 / 40%), 0 0 60px rgb(237 6 135 / 12%); }
.sample-kundli rect, .sample-kundli line, .sample-kundli polygon { fill: none; stroke: #ff8cc0; stroke-opacity: .55; stroke-width: 1.4; }
.sample-kundli text { text-anchor: middle; dominant-baseline: middle; font-family: var(--font); }
.sample-kundli .k-num { font-size: 11px; fill: var(--muted); }
.sample-kundli .k-pl { font-size: 14px; font-weight: 600; fill: #fff; }
.sample-kundli .k-asc { font-size: 14px; font-weight: 700; fill: #ffb86b; }
.chart-copy > * + * { margin-top: 16px; }
.chart-copy p { color: #d8d3f2; font-size: 1.08rem; }
.chart-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chart-actions .btn { min-height: 50px; padding: 0 22px; border-radius: 999px; }

/* ---------- Homepage: Reports ---------- */
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.report { --h: 330; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border);
  background: linear-gradient(170deg, hsl(var(--h) 70% 30% / 35%), rgb(20 16 48 / 70%)); transition: transform .2s, border-color .2s; }
.report:hover { transform: translateY(-4px); border-color: hsl(var(--h) 90% 65% / 50%); }
.report.ai { --h: 275; } .report.milan { --h: 345; } .report.western { --h: 210; }
.report-doc { position: relative; height: 120px; border-radius: 14px; margin-bottom: 6px; padding: 18px 18px 0 74px; display: grid; gap: 9px; align-content: start;
  background: linear-gradient(160deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 4%)); border: 1px solid var(--border); overflow: hidden; }
.report-doc i { display: block; height: 7px; border-radius: 4px; background: rgb(255 255 255 / 18%); }
.report-doc i:nth-child(3) { width: 80%; } .report-doc i:nth-child(4) { width: 92%; } .report-doc i:nth-child(5) { width: 60%; }
.report-ico { position: absolute; left: 16px; top: 16px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 90% 58%), hsl(calc(var(--h) + 35) 95% 55%)); box-shadow: 0 8px 22px hsl(var(--h) 90% 50% / 40%); }
.report-ico svg { width: 24px; height: 24px; }
.report h3 { font-size: 1.2rem; }
.report p { color: #d8d3f2; font-size: .95rem; }
.report ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; flex: 1; }
.report li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: .9rem; }
.report li svg { width: 16px; height: 16px; color: #ff4a9a; flex: none; margin-top: 2px; }
.report .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- Homepage: Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 860px; margin: 0 auto; }
.pricing-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--border); border-radius: 22px;
  background: linear-gradient(160deg, rgb(255 255 255 / 7%), rgb(20 16 48 / 72%)); }
.pricing-card.featured { border-color: rgb(255 74 154 / 45%); background: radial-gradient(360px 180px at 100% 0, rgb(237 6 135 / 18%), transparent 75%), linear-gradient(160deg, rgb(255 255 255 / 8%), rgb(20 16 48 / 78%)); }
.pricing-card h3 { font-family: var(--display); font-size: 1.3rem; }
.pricing-badge { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: var(--primary-soft); color: #ffb3d6; font-size: .78rem; font-weight: 700; }
.pricing-price { display: flex; align-items: baseline; gap: 8px; margin: 2px 0; }
.pricing-price strong { font-family: var(--display); font-size: clamp(2.7rem, 6vw, 3.5rem); line-height: 1; }
.pricing-price span, .pricing-card > p:last-child { color: var(--muted); }
.pricing-note { max-width: 860px; margin: 18px auto 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- Standalone pricing page ---------- */
.standalone-pricing { --w: 1180px; width: min(var(--w), calc(100% - 32px)); margin: 0 auto; }
.standalone-pricing-hero { max-width: 760px; margin: 0 auto; padding: 68px 0 42px; text-align: center; }
.standalone-pricing-hero h1 { margin: 18px 0 12px; font-family: var(--display); font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; }
.standalone-pricing-hero h1 { max-width: 100%; font-size: clamp(2.5rem, 5vw, 4rem); text-wrap: balance; }
.standalone-pricing-hero p { color: var(--muted); font-size: 1.12rem; }
.standalone-pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.standalone-pricing-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 420px; padding: 28px;
  border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(160deg, rgb(255 255 255 / 8%), rgb(20 16 48 / 78%)); }
.standalone-pricing-card.featured { border-color: rgb(255 74 154 / 55%); box-shadow: 0 20px 60px rgb(237 6 135 / 18%);
  background: radial-gradient(420px 220px at 100% 0, rgb(237 6 135 / 22%), transparent 70%), linear-gradient(160deg, rgb(255 255 255 / 10%), rgb(20 16 48 / 82%)); }
.standalone-pricing-badge { align-self: flex-start; border-radius: 999px; padding: 5px 10px; background: var(--primary-soft); color: #ffb3d6; font-size: .78rem; font-weight: 700; }
.standalone-pricing-card h2 { font-family: var(--display); font-size: 1.35rem; }
.standalone-pricing-price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.standalone-pricing-price strong { font-family: var(--display); font-size: clamp(2.8rem, 6vw, 4.2rem); line-height: 1; }
.standalone-pricing-price span { color: var(--muted); }
.standalone-pricing-description { color: #d8d3f2; min-height: 48px; }
.standalone-pricing-list { list-style: none; display: grid; gap: 9px; padding: 8px 0 12px; margin: 0; flex: 1; }
.standalone-pricing-list li { display: flex; gap: 8px; color: var(--muted); }
.standalone-pricing-list svg { width: 18px; height: 18px; color: #ff4a9a; flex: none; margin-top: 3px; }
.standalone-pricing-card .btn { width: 100%; }
.wallet-topup { display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }
.wallet-topup input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--glass); color: var(--text); font: inherit; }
.standalone-pricing-note { max-width: 760px; margin: 18px auto 0; display: flex; justify-content: center; gap: 8px; color: var(--muted); text-align: center; }
.standalone-pricing-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.standalone-pricing-compare { padding: 74px 0 20px; }
.standalone-pricing-compare > h2 { text-align: center; margin-bottom: 28px; }
.standalone-pricing-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.standalone-pricing-facts article { border: 1px solid var(--border); border-radius: 20px; padding: 24px; background: var(--glass); }
.standalone-pricing-facts article > span { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.standalone-pricing-facts svg { width: 24px; height: 24px; }
.standalone-pricing-facts h3 { margin: 16px 0 6px; }
.standalone-pricing-facts p { color: var(--muted); }
.standalone-pricing-cta { text-align: center; margin-top: 70px; padding: 54px 24px; border: 1px solid rgb(255 74 154 / 35%); border-radius: 28px;
  background: radial-gradient(600px 260px at 50% 0, rgb(237 6 135 / 24%), transparent 70%), rgb(20 16 48 / 70%); }
.standalone-pricing-cta p { color: var(--muted); margin: 12px 0 24px; }
.standalone-pricing-footer { width: 100%; }
.plan-detail-hero { max-width: 760px; margin: 0 auto; padding: 48px 0 32px; text-align: center; }
.plan-detail-back { display: block; width: fit-content; margin: 0 auto 28px; color: var(--muted); text-decoration: none; }
.plan-detail-back:hover { color: #fff; }
.plan-detail-hero h1 { margin: 18px 0 12px; font-family: var(--display); font-size: clamp(2.4rem, 6vw, 4rem); }
.plan-detail-description { color: var(--muted); font-size: 1.1rem; }
.plan-detail-card { max-width: 760px; margin: 0 auto; padding: 28px; border: 1px solid var(--border); border-radius: 24px;
  background: linear-gradient(160deg, rgb(255 255 255 / 8%), rgb(20 16 48 / 78%)); }
.plan-detail-card h2 { margin-bottom: 8px; }
.plan-detail-card .btn { width: 100%; margin-top: 10px; }
.plan-detail-coming { margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); text-align: center; }
@media (max-width: 899px) {
  .standalone-pricing-grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .standalone-pricing-card { min-height: 0; }
  .standalone-pricing-facts { grid-template-columns: 1fr; }
}

/* ---------- Homepage: Astrology basics ---------- */
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.learn-card { position: relative; border-radius: 20px; padding: 24px; background: var(--glass); border: 1px solid var(--border); overflow: hidden; }
.learn-num { position: absolute; right: 16px; top: 8px; font-family: var(--display); font-size: 3.2rem; font-weight: 700; line-height: 1; opacity: .12; }
.learn-card h3 { font-size: 1.25rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.learn-card p { color: #d8d3f2; margin-top: 8px; font-size: .96rem; }

/* ---------- In-app Reports page ---------- */
.report-list { display: grid; gap: 12px; }
.report-row { --h: 330; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.report-row.ai { --h: 275; } .report-row.milan { --h: 345; } .report-row.western { --h: 210; } .report-row.share { --h: 160; }
.report-row .report-ico { position: static; }
.report-row h2 { font-size: 1.1rem; }
.report-row p { margin: 4px 0 0; }
@media (max-width: 640px) { .report-row { grid-template-columns: auto 1fr; } .report-row .btn { grid-column: 1 / -1; justify-self: start; } }

@media (max-width: 999px) {
  .chart-split { grid-template-columns: 1fr; gap: 30px; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .learn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .report-grid, .learn-grid, .pricing-grid { grid-template-columns: 1fr; }
  .home-actions .btn.small.primary { padding: 0 12px; }
}
/* The header (and its dropdown and phone menu) sits above the page, so menus open over the content
   and stay clickable. On wide screens the app's tabs share the header's spot, so they go one higher. */
.top { position: relative; z-index: 20; }
@media (min-width: 900px) { .tabs { position: relative; z-index: 21; } }
/* Menus are solid, so nothing shows through them; a proper chevron; phones hide the brand name to fit the header. */
.learn-menu, .home-sheet { background: #17132f; backdrop-filter: none; -webkit-backdrop-filter: none; }
.learn-btn .chev { display: grid; }
.learn-btn .chev svg { width: 18px; height: 18px; }
.home-menu-btn svg { width: 24px; height: 24px; }
@media (max-width: 480px) { .shell.bare .top:has(.home-actions) .brand-name { display: none; } }

/* ---------- Email screens and legal pages ---------- */
.welcome.recover { max-width: 480px; padding-top: 48px; }
.legal .card > section + section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.legal h2 { font-size: 1.15rem; margin-bottom: 8px; }
.legal p, .legal li { color: #d8d3f2; line-height: 1.65; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
/* Admin: visits for the last 7 days */
.visit-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 170px; margin-top: 8px; }
.visit-col { display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; height: 100%; gap: 4px; }
.visit-bar { width: 70%; min-height: 3px; align-self: end; border-radius: 8px 8px 3px 3px; background: var(--grad); box-shadow: 0 4px 14px rgb(237 6 135 / 30%); }
.visit-n { font-size: .78rem; color: var(--muted); }
.visit-col small { font-size: .7rem; color: var(--muted); }
.visit-signups { color: #5fe0a0 !important; font-weight: 700; }

/* ---------- Usability and polish ---------- */
.top {
  position: sticky;
  top: 8px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.btn {
  transition: transform .16s ease, filter .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.chip-btn { transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.chip-btn:active { transform: scale(.97); }
.card, .feature, .topic, .report, .learn-card {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.chat-inner { max-width: 820px; }
.composer { max-width: 820px; }
.composer-wrap { padding-bottom: env(safe-area-inset-bottom); }
.composer textarea { scrollbar-width: thin; }
.suggest { gap: 8px; }
.faq details { transition: border-color .18s ease, background .18s ease; }
.faq details[open] { border-color: rgb(255 74 154 / 38%); background: linear-gradient(90deg, rgb(140 40 160 / 34%), rgb(120 30 120 / 22%)); }

.home-hero h1 { text-wrap: balance; }
.hero-sub { text-wrap: pretty; }
.topic, .feature, .report, .learn-card { will-change: transform; }
.section-head h2 { text-wrap: balance; }
.topic p, .feature p, .report p, .learn-card p { text-wrap: pretty; }

@media (max-width: 600px) {
  .top {
    margin: 6px 8px 0;
    padding: 8px 9px;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .top .brand { gap: 7px; font-size: 1rem; }
  .top .brand svg { width: 27px; height: 27px; }
  .home-actions { gap: 5px; }
  .wallet-shortcut { display: none; }
  .home-actions .btn.primary { min-height: 38px; }

  .home > section, .home > footer {
    width: calc(100% - 24px);
  }
  .home-hero { padding-top: 20px; gap: 24px; }
  .home-hero h1 { font-size: 2.2rem; }
  .hero-copy > * + * { margin-top: 14px; }
  .eyebrow { max-width: 100%; font-size: .78rem; }
  .hero-sub { font-size: 1rem; line-height: 1.55; }
  .hero-visual { display: none; }
  .hero-arc { margin-top: 18px; padding-top: 20px; }

  .marquee { margin-top: 18px; padding: 16px 0; }
  .home-section { padding-top: 44px; }
  .section-head { margin-bottom: 24px; }
  .section-head p { font-size: 1rem; }
  .duo { padding-top: 44px; }
  .duo-card { border-radius: 20px; padding: 24px 20px; }
  .duo-card:last-child { gap: 20px; }

  .topic { min-height: 230px; }
  .feature { padding: 20px; }
  .steps { gap: 28px 12px; }
  .steps h3 { font-size: 1rem; }
  .steps p { font-size: .92rem; }

  .report-grid { gap: 12px; }
  .learn-grid { gap: 12px; }
  .why-strip { padding: 16px 0; }
  .faq { gap: 10px; }
  .faq summary { gap: 10px; }
  .final-cta { margin-top: 54px !important; border-radius: 22px; }

  .chat-inner { padding: 12px 12px 8px; gap: 12px; }
  .composer { padding: 8px 10px; }
  .msg { max-width: 94%; }
  .msg.bot { padding-left: 34px; }
  .msg.bot::before { width: 28px; height: 28px; }
  .suggest { padding-left: 34px; }
  .today-card { align-items: flex-start; }
  .bubble { padding: 10px 13px; }
}
