/* AstroGuru Chat - styles
   Palette: night-sky indigo + saffron/marigold (brand) on clean paper. */
:root {
  --night: #170d24;
  --night-2: #3b0764;
  --ink: #241c3f;
  --muted: #6b6080;
  --saffron: #f97316;
  --saffron-dark: #c2560c;
  --marigold: #f5b40c;
  --sindoor: #c0262d;
  --paper: #fffdf9;
  --tint: #fff3e4;
  --line: #ece2d3;
  --ok: #15803d;
  --wa: #1fa855;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --shadow: 0 12px 40px rgba(29, 24, 71, .12);
  /* Same fonts as astroguru.online (Tailwind font-serif / font-sans); Mukta only fills in Hindi letters */
  --font-display: ui-serif, Georgia, Cambria, 'Times New Roman', Times, 'Mukta', serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Mukta', 'Noto Sans Devanagari', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; touch-action: manipulation; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden; max-width: 100%;
}
/* iPhone zooms into any field with text smaller than 16px: keep every field at 16px */
input, select, textarea { font-size: 16px !important; }
button, a { touch-action: manipulation; }
.nowrap { white-space: nowrap; }
img, svg { max-width: 100%; display: block; }
a { color: var(--saffron-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--night); }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  min-height: 48px;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-primary { background: var(--saffron); color: #fff; box-shadow: 0 6px 18px rgba(249, 115, 22, .35); }
.btn-primary:hover { background: var(--saffron-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--saffron); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-danger-text { background: none; color: var(--sindoor); border: 0; font-weight: 600; cursor: pointer; padding: 10px; }
.btn-lg { padding: 16px 28px; font-size: 1.15rem; min-height: 56px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--saffron-dark); font-weight: 600; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; background: rgba(23, 13, 36, .97); border-bottom: 1px solid rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo img { width: 36px; height: 36px; flex: none; object-fit: contain; }
.logo-text { font-family: ui-serif, Georgia, Cambria, 'Times New Roman', serif; font-weight: 700; font-size: 1.5rem; letter-spacing: .2px; line-height: 1; }
@media (max-width: 380px) { .logo-text { font-size: 1.2rem; } .logo img { width: 30px; height: 30px; } .lang button { padding: 6px 9px; } .topbar .btn { padding: 8px 12px; } }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: none; color: #d9d4f0; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; min-height: 36px; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--night); }
.topbar .btn { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--marigold);
  background: var(--saffron); color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}

/* ---------- Hero ---------- */
.hero {
  color: #fff; position: relative; overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 12% 20%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 12%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 40% 70%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 60%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 25% 88%, #fff6 50%, transparent 51%),
    radial-gradient(ellipse at 75% 40%, #2e0b52, var(--night) 70%);
}
.hero-inner { display: grid; gap: 4px; padding: 16px 0 44px; align-items: center; }
.hero-art { margin: 0 auto; width: min(210px, 56vw); order: -1; }
.hero-art img { width: 100%; height: auto; }
.hero h1 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -.3px; font-size: clamp(2.1rem, 7vw, 3.6rem);
  line-height: 1.1; margin-bottom: 16px; color: #fff;
}
.hero-sub { color: #dcd7f2; font-size: 1.1rem; max-width: 34em; }
.hero-actions { margin: 24px 0 10px; }
.hero-note { color: #ffd987; font-weight: 600; margin: 0 0 22px; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #e9e6f8; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust svg { width: 20px; height: 20px; flex: none; color: var(--marigold); }

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 40px; padding: 64px 0 80px; }
  .hero-art { order: 0; width: 100%; max-width: 480px; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 28px; max-width: 40em; }
.section-head p { color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 4px 64px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tint); color: var(--saffron-dark);
  font-family: var(--font-display); font-size: 1.4rem; border: 1.5px solid #f9c995;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

/* Plans */
.plans-bg { background: linear-gradient(180deg, var(--tint), var(--paper)); }
.plans { display: grid; gap: 18px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.plan {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-l); padding: 26px 22px;
  display: flex; flex-direction: column; gap: 6px; position: relative;
}
.plan.best { border-color: var(--saffron); box-shadow: var(--shadow); }
.plan h3 { font-size: 1.35rem; margin: 0; }
.plan-desc { color: var(--muted); margin: 0; }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 18px; flex-wrap: wrap; }
.plan-price strong { font-size: 2.6rem; line-height: 1; color: var(--night); }
.plan-price s { color: var(--muted); }
.plan-off { color: var(--ok); font-weight: 700; font-size: .95rem; }
.plan-tag {
  position: absolute; top: -13px; left: 22px; background: var(--saffron); color: #fff;
  border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 700;
}
.plan .btn { margin-top: auto; }

/* About (GEO) */
.about { display: grid; gap: 8px; max-width: 46em; }
.about p { color: #3d3456; }

/* Services */
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .services { grid-template-columns: repeat(4, 1fr); } }
.services a {
  display: block; height: 100%; padding: 18px; border-radius: var(--r-m); background: #fff;
  border: 1.5px solid var(--line); text-decoration: none; color: var(--ink);
}
.services a:hover { border-color: var(--saffron); }
.services .ico { font-size: 1.8rem; line-height: 1; margin-bottom: 8px; }
.services strong { display: block; }
.services span { color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { max-width: 50em; }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; position: relative; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--saffron); border-bottom: 2.5px solid var(--saffron); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: #3d3456; padding-bottom: 14px; }

.disclaimer { color: var(--muted); font-size: .95rem; border-left: 3px solid var(--marigold); padding-left: 14px; max-width: 50em; }

.footer { background: var(--night); color: #d9d4f0; padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.footer a { color: #fff; }
.footer .btn-wa { min-height: 44px; }

/* ---------- Dialogs ---------- */
dialog {
  border: 0; padding: 0; border-radius: var(--r-l); width: min(440px, calc(100% - 28px));
  max-height: calc(100dvh - 32px); background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(29, 24, 71, .35);
}
dialog::backdrop { background: rgba(20, 16, 50, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg { padding: 28px 24px 24px; position: relative; overflow-y: auto; max-height: calc(100dvh - 32px); }
.dlg h2 { font-size: 1.6rem; margin-bottom: 6px; padding-right: 36px; }
.dlg .lead { color: var(--muted); margin-bottom: 18px; }
.dlg-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--tint); color: var(--saffron-dark); cursor: pointer; display: grid; place-items: center;
}
.dlg-close svg { width: 18px; height: 18px; }
.dlg-wide { width: min(560px, calc(100% - 28px)); }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .98rem; }
.field .hint { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.input {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--r-s);
  background: var(--paper); font-size: 16px; min-height: 50px;
}
.input:focus { border-color: var(--saffron); outline: none; box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); }
.input[aria-invalid="true"] { border-color: var(--sindoor); }
.phone-wrap { display: flex; align-items: stretch; }
.phone-wrap .cc { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--r-s) 0 0 var(--r-s); background: var(--tint); font-weight: 600; }
.phone-wrap .input { border-radius: 0 var(--r-s) var(--r-s) 0; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 76px; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  color: var(--saffron-dark); font-weight: 700; cursor: pointer; padding: 8px 10px; font-size: .9rem;
}
.err { color: var(--sindoor); font-size: .92rem; margin: 6px 0 0; min-height: 0; }
.err:empty { display: none; }
.form-err { background: #fdecec; color: var(--sindoor); border-radius: var(--r-s); padding: 10px 12px; margin-bottom: 14px; font-size: .95rem; }
.form-err:empty { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; flex-wrap: wrap; gap: 8px; }
.stepper { display: flex; gap: 6px; margin-bottom: 14px; }
.stepper span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.stepper span.on { background: var(--saffron); }
.step-label { color: var(--muted); font-size: .9rem; margin-bottom: 4px; }

.city-wrap { position: relative; }
.city-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-s); box-shadow: var(--shadow); max-height: 200px; overflow-y: auto; list-style: none; margin: 0; padding: 4px;
}
.city-list[hidden] { display: none; }
.city-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.city-list li[aria-selected="true"], .city-list li:hover { background: var(--tint); }

/* Profile */
.prof-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-right: 48px; }
.prof-head h2 { overflow-wrap: anywhere; }
.prof-head .avatar { width: 58px; height: 58px; font-size: 1.4rem; cursor: default; }
.prof-head h2 { margin: 0; padding: 0; }
.kv { margin: 0 0 18px; border: 1.5px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.kv div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.kv dt { flex: none; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.support {
  background: #eaf8ef; border-radius: var(--r-m); padding: 14px; margin-bottom: 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.support-text strong { display: block; }
.support-text span { color: #2e5d40; font-size: .92rem; margin-right: 6px; }
.support .btn-wa, .support .btn-wa span { color: #fff; }
.stack { display: grid; gap: 10px; }

/* Kundli */
.kundli-chart { width: min(320px, 100%); margin: 4px auto 18px; }
.kundli-chart svg { width: 100%; height: auto; }
.k-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.k-fact { background: var(--tint); border-radius: var(--r-m); padding: 12px 14px; }
.k-fact small { display: block; color: var(--muted); font-size: .85rem; }
.k-fact strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.k-fact em { display: block; font-style: normal; color: var(--muted); font-size: .85rem; }
.k-fact.wide { grid-column: 1 / -1; background: #efedf9; }
.k-planets { border: 1.5px solid var(--line); border-radius: var(--r-m); margin-bottom: 16px; }
.k-planets summary { cursor: pointer; padding: 12px 14px; font-weight: 700; }
.k-planets ul { list-style: none; margin: 0; padding: 0 14px 10px; }
.k-planets li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .97rem; }
.k-planets li span:last-child { color: var(--muted); text-align: right; }
.k-try { color: var(--muted); font-size: .92rem; margin: 6px 0 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid #f6c08d; background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px;
  cursor: pointer; font-size: .95rem; white-space: nowrap; min-height: 40px;
}
.chip:hover { background: var(--tint); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 30px 0; justify-content: center; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--saffron); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.summary-box { border: 1.5px solid var(--line); border-radius: var(--r-m); margin-bottom: 18px; }
.summary-box div { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.summary-box span { flex: none; color: var(--muted); }
.summary-box strong { text-align: right; }
.sum-account small { display: block; color: var(--muted); font-weight: 400; font-size: .9rem; }
.summary-box div:last-child { border-bottom: 0; font-size: 1.15rem; }
.summary-box div:last-child strong { color: var(--ok); }
.center { text-align: center; }
.big-ico { font-size: 3rem; line-height: 1; margin-bottom: 8px; }

/* ---------- Chat ---------- */
body.chat-open { overflow: hidden; position: fixed; left: 0; right: 0; width: 100%; }
.chat {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; flex-direction: column; background: var(--paper);
  height: auto; overscroll-behavior: none; visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s .2s;
}
.chat.open { visibility: visible; opacity: 1; transition: opacity .2s ease; }
.chat-head {
  background: var(--night); color: #fff; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; flex: none;
}
.chat-head .face { width: 42px; height: 42px; border-radius: 50%; background: var(--night-2); overflow: hidden; flex: none; border: 2px solid var(--marigold); }
.chat-head .face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.5); }
.chat-head .title { flex: 1; min-width: 0; }
.chat-head .title strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.1; }
.chat-head .title span { font-size: .85rem; color: #cfc9ec; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.chat-inner { width: min(760px, 100%); margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  max-width: 86%; padding: 12px 16px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: 1.05rem; line-height: 1.55; animation: rise .2s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bubble.ai { align-self: flex-start; background: #fff; border: 1.5px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.user { align-self: flex-end; background: var(--saffron); color: #fff; border-bottom-right-radius: 6px; }
.bubble.err { background: #fdecec; border-color: #f6c2c2; color: var(--sindoor); }
.bubble time { display: block; font-size: .75rem; opacity: .65; margin-top: 4px; }
.typing { display: inline-flex; gap: 5px; padding: 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); animation: bounce 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-6px); opacity: 1; } }
.chat-chips { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px; scrollbar-width: none; }
.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips[hidden] { display: none; }
.composer {
  flex: none; background: #fff; border-top: 1.5px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.composer-row { width: min(760px, 100%); margin-inline: auto; display: flex; align-items: flex-end; gap: 8px; }
.composer textarea {
  flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 22px; padding: 12px 16px; font-size: 16px;
  line-height: 1.4; max-height: 140px; min-height: 48px; background: var(--paper);
}
.composer textarea:focus { outline: none; border-color: var(--saffron); }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex: none;
}
.round-btn svg { width: 22px; height: 22px; }
.mic-btn { background: var(--tint); color: var(--saffron-dark); }
.mic-btn.on { background: var(--sindoor); color: #fff; animation: ring 1.4s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(192, 38, 45, .5); } 100% { box-shadow: 0 0 0 14px rgba(192, 38, 45, 0); } }
.send-btn { background: var(--saffron); color: #fff; }
.send-btn[disabled] { opacity: .5; }
.mic-status { width: min(760px, 100%); margin: 0 auto 6px; color: var(--sindoor); font-size: .9rem; font-weight: 600; }
.mic-status:empty { display: none; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; width: max-content; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Site footer (same as astroguru.online footer.php) ---------- */
.site-footer {
  background: linear-gradient(to bottom right, #111827, #3b0764, #111827); color: #fff;
  border-top: 4px solid #f97316; padding: 72px 0 calc(32px + env(safe-area-inset-bottom));
}
.ft-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin-bottom: 56px; }
@media (min-width: 768px) { .ft-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ft-grid { grid-template-columns: repeat(4, 1fr); } }
.site-footer h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; color: #fb923c; margin: 0 0 22px; }
.ft-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ft-row svg, .ft-social svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ft-row svg { color: #f97316; margin-top: 3px; }
.ft-row p { margin: 0; color: #d1d5db; }
.ft-row small { display: block; color: #9ca3af; font-size: .875rem; }
.ft-phone { color: #fff; font-weight: 600; text-decoration: none; }
.ft-phone:hover { color: #fb923c; }
.ft-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ft-links a { color: #d1d5db; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: color .15s ease; }
.ft-links a:hover { color: #fff; }
.chev { width: 7px; height: 7px; border-right: 2px solid #f97316; border-top: 2px solid #f97316; transform: rotate(45deg); margin-right: 4px; flex: none; }
.ft-social { display: flex; gap: 14px; flex-wrap: wrap; }
.ft-social a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff;
  display: grid; place-items: center; transition: background-color .15s ease;
}
.ft-social a:hover { background: #f97316; }
.ft-social a.li:hover { background: #2563eb; }
.ft-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 30px; text-align: center; }
.ft-bottom p { color: #9ca3af; font-size: .875rem; line-height: 1.75rem; margin: 0; }
.ft-bottom strong { color: #d1d5db; }
.site-footer .wrap { width: min(1280px, 100% - 40px); }
.ft-social { gap: 12px; }

/* Plan choices inside the "no questions left" box */
.zero-plans { display: grid; gap: 10px; text-align: left; }
.zero-plans .btn { justify-content: space-between; width: 100%; border-radius: var(--r-m); padding: 14px 16px; }
.zero-plans .btn small { font-weight: 600; opacity: .85; }

/* Dasha strip in chat */
.dasha-bar {
  flex: none; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
  width: 100%; border: 0; cursor: pointer; padding: 8px 14px; background: #2a1545; color: #f3eefc; font-size: .88rem; line-height: 1.3;
}
.dasha-bar[hidden] { display: none; }
.dasha-pill { background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.dasha-pill b { color: #ffd987; font-weight: 700; }

/* Upsell note in chat */
.upsell {
  align-self: stretch; background: #fff7ec; border: 1.5px dashed #f6b26b; border-radius: var(--r-m);
  padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: .97rem;
}
.upsell .btn { min-height: 40px; padding: 8px 16px; font-size: .95rem; }

@media (max-width: 400px) {
  .dlg { padding: 24px 18px 20px; }
  .kv div { padding: 9px 12px; }
}

/* Phone: popups start near the top so the keyboard never covers the fields */
@media (max-width: 600px) {
  dialog { margin: 12px auto auto; max-height: calc(100dvh - 24px); }
  .dlg { max-height: calc(100dvh - 24px); scroll-padding: 90px 0; }
}

/* Dasha strip in chat hidden (as requested) */
.dasha-bar { display: none !important; }

/* Chat box: no scrollbar unless the text is long */
.composer textarea { overflow-y: hidden; scrollbar-width: thin; }

/* Chat box: exact one-line height (no jumping cursor) + one-line placeholder */
.composer textarea {
  box-sizing: border-box; height: 48px; min-height: 48px;
  padding: 11.5px 16px; line-height: 22px;
}
.composer textarea::placeholder {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .75;
}

/* WhatsApp-style typing: astrologer photo + dots */
.typing-row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; animation: rise .2s ease-out; }
.typing-avatar {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none;
  border: 2px solid var(--marigold); background: var(--night-2);
}
.typing-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.5); }
.typing-row .bubble.typing { max-width: none; border-bottom-left-radius: 6px; }

/* AI messages with astrologer photo (WhatsApp style) */
.msg-row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 92%; animation: rise .2s ease-out; }
.msg-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg-row .bubble.ai { max-width: 100%; }
.msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; margin-bottom: 2px;
  border: 2px solid var(--marigold); background: var(--night-2);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.5); }

/* Quick replies under the latest answer */
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 38px; animation: rise .2s ease-out; }
.quick-row .chip { font-size: .9rem; min-height: 36px; padding: 6px 12px; }

/* Online in chat header */
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 2px rgba(34, 197, 94, .25); }

/* iPhone: if Safari leaves any gap above the keyboard, show the chat colour (never the page behind) */
.chat::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: #fff; pointer-events: none;
}
html:has(body.chat-open) { overflow: hidden; height: 100%; }

/* "Open in Chrome" bar inside Instagram / Facebook browser */
.inapp-bar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff3e4; color: #7a3b06;
  font-size: .9rem; line-height: 1.3; border-bottom: 1px solid #f6c08d; position: relative; z-index: 60;
}
.inapp-bar span { flex: 1; }
.inapp-open { background: var(--saffron); color: #fff; text-decoration: none; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.inapp-x { border: 0; background: none; font-size: 1rem; color: #7a3b06; cursor: pointer; padding: 4px 6px; }