/* =====================================================================
   AstroKoot — Sacred Fire · Vedic Editorial
   Design system v3.0 · Paper (light) + Midnight (dark) themes
   ===================================================================== */

:root {
    --ink: #2A160E;
    --maroon: #7B1112;
    --maroon-dark: #5C0C0D;
    --indigo: var(--maroon);
    --indigo-dark: var(--maroon-dark);
    --violet: #9A3412;
    --violet-light: #E8915C;
    --gold: #C8943F;
    --gold-glow: #E8B55E;
    --gold-light: #FDF0DD;
    --gold-surface: #FCF5E9;
    --saffron: #D9480F;
    --saffron-deep: #B03A0B;
    --saffron-glow: #F08A1D;
    --paper: #FBF5EA;
    --paper-subtle: #F5ECDA;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 251, 243, 0.88);
    --muted: #7A5C48;
    --line: #EAD9C0;
    --line-subtle: #F0E7D3;
    --success: #19784E;
    --danger: #B8203B;
    --shadow-sm: 0 4px 12px rgba(90, 32, 8, 0.05);
    --shadow: 0 14px 34px rgba(90, 32, 8, 0.08);
    --shadow-lg: 0 24px 56px rgba(90, 32, 8, 0.13);
    --cta: var(--saffron);
    --cta-hover: var(--saffron-deep);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --header-h: 76px;
    --app-tabs-h: 0px;
}

* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    /* iOS inflates body text in landscape without this. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Themed tap flash instead of iOS's default grey box. */
    -webkit-tap-highlight-color: rgba(123, 17, 18, 0.08);
}

/* A single overwide child (bare min-width table, translated fixed panel, etc.)
   must never push the whole document sideways on a phone — clip at the root.
   `clip` (unlike `hidden`) does not create a scroll container, so position:sticky
   keeps working; `hidden` remains the fallback where clip is unsupported. */
html, body { overflow-x: hidden; }
@supports (overflow: clip) {
    html, body { overflow-x: clip; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.6 'Poppins', 'Noto Sans Devanagari', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.35s ease, color 0.35s ease;
}

a { color: inherit; }

::selection { background: rgba(224, 92, 10, 0.22); }

:focus-visible { outline: 3px solid rgba(217, 72, 15, 0.5); outline-offset: 2px; }

[id] { scroll-margin-top: 96px; }

/* =====================================================================
   Header — glassmorphic observatory bar
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: var(--surface-glass);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.header-inner {
    /* Wider than .container: the signed-in row (nav + search + utility
       cluster) needs ~1300px; the page body still reads at 1220. */
    width: min(1440px, calc(100% - 40px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font: 800 21px/1 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand img {
    border-radius: 50%;
    padding: 0;
    display: block;
    box-shadow: 0 3px 12px rgba(123, 17, 18, 0.28);
    transition: transform 0.4s var(--spring);
}

.brand:hover img { transform: rotate(14deg) scale(1.06); }

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-tagline {
    color: var(--muted);
    font-size: 13.5px;
    margin: 0;
    font-weight: 500;
}

.lang-pill {
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--indigo);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 7px 13px;
    border-radius: 999px;
    transition: all 0.18s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.lang-pill:hover {
    border-color: var(--gold);
    background: var(--gold-light);
    transform: translateY(-1px);
}

.user-chip {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--indigo), var(--indigo-dark));
    color: #F3E9D2;
    font: 700 14px/1 'Montserrat', 'Noto Sans Devanagari', sans-serif;
    box-shadow: 0 4px 12px rgba(123, 17, 18, 0.3);
    flex-shrink: 0;
}

.theme-toggle {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--indigo);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s var(--spring);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--gold);
    transform: rotate(18deg) scale(1.05);
    color: var(--gold);
}

.theme-toggle svg { position: absolute; transition: opacity 0.22s ease, transform 0.3s var(--spring); }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="midnight"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="midnight"] .theme-toggle .icon-sun { opacity: 1; transform: none; }

/* =====================================================================
   Navigation
   ===================================================================== */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.nav-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}

.nav-link:hover { background: var(--gold-light); color: var(--indigo-dark); }

.nav-link-admin {
    color: var(--violet);
    border: 1px solid rgba(154, 52, 18, 0.25);
}

.nav-link-btn {
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.nav-logout { margin: 0; }

.nav-group { position: relative; }

.nav-group-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.nav-caret {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.nav-group::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-group:hover .nav-caret,
.nav-group:focus-within .nav-caret { transform: rotate(225deg) translateY(2px); }

.nav-group-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 252px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.24s var(--spring), visibility 0.18s;
    z-index: 40;
}

.nav-group:hover .nav-group-panel,
.nav-group:focus-within .nav-group-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Long menus (Explore) open as a two-column panel so they don't
   run off-screen vertically. */
@media (min-width: 720px) {
    .nav-group-panel.is-wide {
        min-width: 470px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 4px;
    }
    .nav-group-panel.is-wide .nav-drop-link { padding: 8px 12px; }
}

.nav-drop-link {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.14s ease;
}

.nav-drop-link:hover { background: var(--gold-light); }
.nav-drop-link strong { font-size: 13.5px; font-weight: 700; color: var(--indigo); }
.nav-drop-link small { font-size: 12px; color: var(--muted); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 20px;
    border-radius: 999px;
    background: var(--cta);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(123, 17, 18, 0.24);
    transition: all 0.24s var(--spring);
    white-space: nowrap;
}

.nav-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

.nav-mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--indigo);
    transition: transform 0.24s var(--spring), opacity 0.18s ease;
}

.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   Layout container
   ===================================================================== */
.container {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
    padding: 44px 0 80px;
}

/* Breathing room between stacked page sections — tool/calculator pages were
   rendering their cards flush against each other. */
.container > section + section { margin-top: 26px; }

/* =====================================================================
   Hero
   ===================================================================== */
.hero, .result-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: center;
    padding: 24px 0 54px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -160px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 40%, rgba(224, 92, 10, 0.16), transparent 55%),
        radial-gradient(circle at 65% 60%, rgba(200, 148, 63, 0.14), transparent 62%);
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

.hero-compact { padding: 28px 0 8px; }

.eyebrow {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--violet);
    margin: 0 0 10px;
    text-transform: uppercase;
}

.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 17px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--saffron-glow), var(--saffron));
    border: 0;
    color: #FFF7EC;
    box-shadow: 0 6px 18px rgba(217, 72, 15, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font: 700 11px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 18px;
    width: fit-content;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(200, 148, 63, 0.5);
    animation: pulseDot 2.4s ease-out infinite;
    flex-shrink: 0;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(200, 148, 63, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(200, 148, 63, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 148, 63, 0); }
}

.hero h1, .result-hero h1, .report-header h1 {
    font: 800 clamp(38px, 5.2vw, 66px)/1.02 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.045em;
    margin: 0;
    max-width: 780px;
    color: var(--indigo);
    text-wrap: balance;
}

.hero h1, .result-hero h1 {
    background: linear-gradient(115deg, var(--maroon) 20%, var(--saffron) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-glyph { color: var(--gold); }

.lead {
    font-size: 18.5px;
    color: var(--muted);
    max-width: 640px;
    margin: 18px 0;
    line-height: 1.6;
}

.lead a { color: var(--violet); font-weight: 600; }

.text-link {
    color: var(--violet);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: var(--indigo);
    font-size: 13.5px;
    font-weight: 600;
}

.hero-notes i { color: var(--gold); font-style: normal; }

.hero-notes a { color: inherit; text-decoration: none; }
.hero-notes a:hover { color: var(--violet); }
.hero-notes a:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.result-hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 26px;
    flex-wrap: wrap;
}

/* ---- Astrolabe hero card ---- */
.hero-card {
    align-self: stretch;
    background:
        radial-gradient(420px 300px at 85% -10%, rgba(232, 181, 94, 0.18), transparent 60%),
        radial-gradient(360px 260px at 0% 110%, rgba(217, 72, 15, 0.3), transparent 60%),
        linear-gradient(150deg, #57180E 0%, #1C0905 100%);
    color: #fff;
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../img/starfield.jpg') center 40%/cover no-repeat;
    opacity: 0.24;
    pointer-events: none;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px dashed rgba(230, 179, 90, 0.3);
    border-radius: 50%;
    right: -110px;
    bottom: -140px;
    animation: slowSpin 60s linear infinite;
}

@keyframes slowSpin { to { transform: rotate(360deg); } }

.hero-card-top { position: relative; z-index: 1; }

.hero-telemetry-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #F3E9D2;
    font: 600 10.5px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-telemetry-tag .pulse-dot { background: var(--gold-glow); }

.astrolabe-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    place-items: center;
    padding: 18px 0;
}

.astrolabe-svg {
    width: min(230px, 70%);
    height: auto;
    animation: astrolabeFloat 7s ease-in-out infinite;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35));
}

@keyframes astrolabeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-9px) rotate(2.5deg); }
}

.hero-card-Bottom { position: relative; z-index: 1; margin-top: auto; }

.hero-card p {
    font: 400 25px/1.25 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
}

.hero-card p strong { color: #F7CE7E; }

.hero-card-meta {
    display: block;
    margin-top: 12px;
    font: 500 12px/1.5 'Poppins', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.04em;
}

/* =====================================================================
   Stat strip
   ===================================================================== */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 28px 4px 32px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 40px;
}

.stat-item { display: grid; gap: 3px; }

.stat-item strong {
    font: 700 clamp(30px, 3.4vw, 42px)/1 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat-item span { font-size: 14px; font-weight: 600; color: var(--ink); }
.stat-item small { font-size: 12.5px; color: var(--muted); }

/* =====================================================================
   Live sky strip — always-midnight observatory band
   ===================================================================== */
.sky-strip {
    position: relative;
    overflow: hidden;
    margin: 8px 0 44px;
    padding: 30px 34px 32px;
    border-radius: 28px;
    background:
        radial-gradient(620px 240px at 88% -50%, rgba(200, 148, 63, 0.24), transparent 62%),
        radial-gradient(520px 280px at 8% 130%, rgba(217, 72, 15, 0.38), transparent 62%),
        linear-gradient(150deg, #4A0E0E 0%, #1C0905 100%);
    color: #F7EDE0;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: var(--shadow-lg);
}

.sky-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 30%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(1px 1px at 34% 64%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1.6px 1.6px at 56% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 72% 76%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1.3px 1.3px at 89% 36%, rgba(255, 255, 255, 0.65), transparent 60%),
        radial-gradient(1px 1px at 45% 86%, rgba(255, 255, 255, 0.45), transparent 60%),
        radial-gradient(1.2px 1.2px at 25% 12%, rgba(255, 255, 255, 0.5), transparent 60%),
        radial-gradient(1px 1px at 64% 52%, rgba(255, 255, 255, 0.4), transparent 60%),
        radial-gradient(1.4px 1.4px at 8% 8%, rgba(255, 255, 255, 0.6), transparent 60%);
    pointer-events: none;
    animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: 0.75; } to { opacity: 1; } }

.sky-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.sky-head .eyebrow { color: var(--gold-glow); margin-bottom: 8px; }
.sky-head h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 30px)/1.15 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: #fff; }

.sky-head-right { display: grid; gap: 6px; justify-items: end; }

.sky-meta { margin: 0; font-size: 13px; font-weight: 600; color: rgba(247, 237, 224, 0.72); }

.sky-link {
    font-size: 12.5px;
    font-weight: 700;
    color: #F7CE7E;
    text-decoration: none;
    border-bottom: 1px solid rgba(247, 206, 126, 0.4);
    padding-bottom: 2px;
    transition: border-color 0.18s ease;
}

.sky-link:hover { border-color: #F7CE7E; }

.sky-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.sky-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, transform 0.25s var(--spring);
}

.sky-item:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-3px); }

.sky-item dt {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(247, 237, 224, 0.58);
    margin-bottom: 7px;
}

.sky-item dt span { color: var(--gold-glow); margin-right: 4px; }

.sky-item dd {
    margin: 0;
    font: 700 16.5px/1.3 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: #fff;
}

.sky-item dd small {
    display: block;
    font: 500 11.5px/1.4 'Poppins', system-ui, sans-serif;
    color: rgba(247, 237, 224, 0.6);
    margin-top: 4px;
}

/* =====================================================================
   Action cards
   ===================================================================== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 44px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--ink);
    position: relative;
    overflow: hidden;
    transition: transform 0.26s var(--spring), box-shadow 0.24s ease, border-color 0.24s ease;
}

.action-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(200, 148, 63, 0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--gold);
}

.action-card:hover::after { opacity: 1; }
.action-card:active { transform: translateY(-1px) scale(0.98); }

.action-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    border: 0;
    box-shadow: 0 6px 16px rgba(217, 72, 15, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.3s var(--spring);
}

.action-card:hover .action-icon { transform: scale(1.08) rotate(-4deg); }
.action-icon svg { width: 22px; height: 22px; }
.action-text { display: grid; gap: 3px; min-width: 0; }
.action-text strong { font: 700 15px/1.25 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.action-text small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.action-arrow { margin-left: auto; color: var(--gold); font-weight: 700; transition: transform 0.24s var(--spring); }
.action-card:hover .action-arrow { transform: translateX(4px); }

/* =====================================================================
   Activity ticker
   ===================================================================== */
.activity-ticker {
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding: 11px 0;
    margin-bottom: 28px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.activity-ticker-track {
    display: flex;
    gap: 38px;
    width: max-content;
    animation: ticker 44s linear infinite;
}

.activity-ticker:hover .activity-ticker-track { animation-play-state: paused; }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.ticker-item i { color: var(--gold); font-style: normal; font-size: 11px; }

@keyframes ticker { to { transform: translateX(-50%); } }

/* =====================================================================
   Section headings
   ===================================================================== */
.section-heading h2 {
    font: 700 clamp(24px, 2.8vw, 34px)/1.14 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    margin: 0;
    text-wrap: balance;
}

.section-heading h3 {
    font: 700 20px/1.2 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    margin: 0;
}

.section-heading p:not(.eyebrow) {
    color: var(--muted);
    margin: 8px 0 0;
    font-size: 15px;
    max-width: 680px;
}

/* Closing call-to-action band */
.cta-final {
    text-align: center;
    padding: 24px 0 12px;
}

.cta-final .eyebrow { color: var(--saffron-deep); }

.cta-final h2 {
    font: 800 clamp(30px, 3.6vw, 46px)/1.06 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.04em;
    color: var(--indigo);
    margin: 0;
}

.cta-final p:not(.eyebrow) {
    color: var(--muted);
    font-size: 16px;
    margin: 12px auto 0;
    max-width: 560px;
}

.cta-final .hero-actions { justify-content: center; margin-top: 22px; }

/* Legal pages */
.legal-stack { display: grid; gap: 18px; margin-bottom: 40px; }

.legal-block { padding: 26px 28px; }

.legal-block h2 {
    font: 700 19px/1.2 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.02em;
    color: var(--indigo);
    margin: 0 0 8px;
}

.legal-block p { color: var(--muted); font-size: 15px; margin: 0; }

/* Share-card preview on /share/{id} */
.share-card-preview {
    margin: 0 auto 28px;
    max-width: 720px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}

.share-card-preview img { display: block; width: 100%; height: auto; }

.count-pill {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--gold-glow), var(--gold));
    color: #241A08;
    font: 700 14px/1 'Poppins', sans-serif;
    vertical-align: middle;
    margin-left: 8px;
    box-shadow: 0 4px 10px rgba(200, 148, 63, 0.35);
}

/* =====================================================================
   Dashboard — saved Kundalis
   ===================================================================== */
.dashboard-shell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 32px 34px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.dashboard-empty {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 18px;
    padding: 56px 34px;
}

.empty-state-art { color: var(--gold); opacity: 0.75; }
.empty-state-art svg { width: 84px; height: 84px; }

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dashboard-foot { margin-top: 18px; display: flex; justify-content: center; }

.dashboard-search .input-icon > input {
    min-width: 280px;
    max-width: 380px;
    height: 46px;
    border-radius: 999px;
    font-size: 14px;
    padding: 8px 16px 8px 42px;
}

.kundali-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}

.kundali-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--gold-surface) 160%);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.28s var(--spring), box-shadow 0.24s ease, border-color 0.24s ease;
    position: relative;
    overflow: hidden;
}

.kundali-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--saffron), var(--gold-glow), var(--saffron));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kundali-card:hover {
    border-color: rgba(200, 148, 63, 0.5);
    box-shadow: 0 16px 34px rgba(200, 148, 63, 0.14), var(--shadow-sm);
    transform: translateY(-4px);
}

.kundali-card:hover::before { opacity: 1; }

.kundali-card-identity { display: flex; align-items: center; gap: 14px; }

.kundali-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--saffron), var(--maroon));
    color: #FFF3E0;
    font: 700 18px/1 'Montserrat', 'Noto Sans Devanagari', sans-serif;
    box-shadow: 0 6px 14px rgba(123, 17, 18, 0.28);
}

.kundali-card-name {
    margin: 0;
    font: 700 18px/1.25 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.kundali-card-name a { text-decoration: none; transition: color 0.16s ease; }
.kundali-card-name a:hover { color: var(--gold); }

.kundali-card-date {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.kundali-card-place {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    color: var(--ink);
    margin: 14px 0 10px;
    font-weight: 500;
}

.kundali-card-place svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }

.kundali-card-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-pill {
    display: grid;
    gap: 2px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--paper-subtle);
    border: 1px solid var(--line-subtle);
    flex: 1;
    min-width: 110px;
}

.stat-pill small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.stat-pill strong { font-size: 13.5px; color: var(--indigo); font-weight: 700; }

.kundali-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--line-subtle);
}

/* =====================================================================
   Buttons & chips
   ===================================================================== */
.button-chip {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--indigo);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.button-chip:hover {
    background: var(--gold-light);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.button-chip-primary {
    background: var(--cta);
    color: #fff;
    border-color: var(--cta);
}

.button-chip-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }

.button-chip-danger {
    color: var(--danger);
    border-color: rgba(184, 32, 59, 0.25);
    padding: 7px 10px;
}

.button-chip-danger:hover {
    background: rgba(184, 32, 59, 0.08);
    border-color: var(--danger);
}

.delete-inline-form { display: inline; margin: 0; }

.button-primary {
    border: 0;
    border-radius: 12px;
    min-height: 48px;
    padding: 12px 26px;
    background: var(--cta);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    font: 700 15px/1 'Poppins', 'Noto Sans Devanagari', system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(123, 17, 18, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.button-primary:hover {
    background: var(--cta-hover);
    box-shadow: 0 10px 28px rgba(123, 17, 18, 0.35);
    transform: translateY(-1px);
}

.button-secondary {
    border: 1.5px solid #E4C6A0;
    border-radius: 999px;
    min-height: 48px;
    padding: 12px 24px;
    color: var(--maroon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
    background: #FDF6EA;
    white-space: nowrap;
}

.button-secondary:hover {
    background: var(--gold-light);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.button-gold {
    border: 0;
    border-radius: 999px;
    min-height: 50px;
    padding: 14px 30px;
    background: linear-gradient(180deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font: 800 15px/1 'Poppins', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 26px rgba(217, 72, 15, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.2s var(--spring), box-shadow 0.2s ease, filter 0.2s ease;
}

.button-gold:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(217, 72, 15, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.button-gold:active { transform: scale(0.97); }
.button-gold:disabled { filter: saturate(0.4); opacity: 0.75; }

.button-primary:active,
.button-secondary:active,
.button-chip:active,
.nav-cta:active,
.city-chip:active { transform: scale(0.97); }

.button-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--violet);
    font: 700 14px/1 'Poppins', system-ui, sans-serif;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.logout-form { margin-top: 24px; }

/* =====================================================================
   Panels, forms, inputs
   ===================================================================== */
.form-shell, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.form-shell { padding: 38px; }
.panel { padding: 30px; }

.form-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.form-accuracy-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--gold-surface);
    border: 1px solid rgba(200, 148, 63, 0.3);
    color: #79571b;
    font: 600 12px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.accuracy-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 148, 63, 0.18);
}

.birth-form { margin-top: 28px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px 24px;
}

.birth-form label, .stacked-form label {
    display: grid;
    gap: 7px;
    font-weight: 600;
    font-size: 14px;
    color: var(--indigo);
}

input, select, textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid #E0CBAE;
    background: var(--surface);
    border-radius: 14px;
    padding: 10px 14px;
    font: inherit;
    color: var(--ink);
    transition: border 0.16s, box-shadow 0.16s;
}

input::placeholder, textarea::placeholder { color: #A08B77; }

input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(224, 92, 10, 0.24);
    border-color: var(--saffron);
}

.field-error {
    color: var(--danger);
    font-size: 14px;
    margin: 12px 0 0;
    font-weight: 500;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.form-actions p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    max-width: 600px;
}

.stacked-form { display: grid; gap: 14px; }
.stacked-form input { min-height: 44px; padding: 10px 14px; }

.helper { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

.field-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin: 4px 0 0;
}

.field-hint { color: var(--muted); font-size: 11.5px; font-weight: 500; }

.field-block { display: grid; gap: 7px; align-content: start; }

.field-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--indigo);
}

.birth-form .field-block { font-weight: 600; font-size: 14px; color: var(--indigo); }

/* Password visibility toggle */
.input-pw { position: relative; }

.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--violet);
    font: 700 11px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: color 0.16s ease, background 0.16s ease;
}

.pw-toggle:hover { color: var(--indigo); background: var(--gold-light); }

.input-pw input { padding-right: 64px; }

/* Icon-prefixed inputs */
.input-icon { position: relative; display: block; }

.input-icon > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #B59477;
    pointer-events: none;
    transition: color 0.18s ease;
}

.input-icon > input, form .input-icon > select { padding-left: 42px; }

.input-icon:focus-within > svg { color: var(--gold); }

/* Place autocomplete */
/* Label-level display rules (.panchang-picker label, .birth-form label)
   outrank the UA [hidden] rule — without this both the fallback <select>
   row and the autocomplete row render at once. */
[hidden] { display: none !important; }

.place-autocomplete { position: relative; }

/* Fetch spinner — shown inside the input's right edge while api/cities runs. */
.input-icon.place-loading::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid var(--line);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: place-spin 0.7s linear infinite;
    pointer-events: none;
}
@keyframes place-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .input-icon.place-loading::after { animation: none; border-top-color: var(--gold); }
}

.place-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.place-suggest[hidden] { display: none; }

.place-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    border-radius: var(--radius-sm);
    font: 600 13.5px/1.3 'Poppins', system-ui, sans-serif;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    transition: background 0.14s ease;
}

.place-option:hover, .place-option.active { background: var(--gold-light); }
.place-option small { color: var(--muted); font-weight: 500; }

/* Segmented gender pill */
.seg-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--line-subtle);
    border: 1px solid var(--line);
    border-radius: 999px;
    min-height: 48px;
}

.seg-option { position: relative; flex: 1; }

.seg-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    border: 0;
    cursor: pointer;
    z-index: 1;
}

.seg-option span {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.24s var(--spring);
}

.seg-option:hover span { color: var(--indigo); }

.seg-option input:checked + span {
    background: linear-gradient(160deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    box-shadow: 0 4px 12px rgba(217, 72, 15, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.seg-option input:focus-visible + span {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
}

/* City quick-prefill */
.city-picker-bar {
    margin: 20px 0 26px;
    padding: 16px 18px;
    background: var(--gold-surface);
    border: 1px solid var(--gold-light);
    border-radius: 14px;
}

.city-picker-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #79571b;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.city-picker-label svg { width: 13px; height: 13px; }

.city-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.city-chip {
    background: var(--surface);
    border: 1px solid rgba(200, 148, 63, 0.35);
    color: #63430f;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.city-chip:hover, .city-chip.active {
    background: linear-gradient(160deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    border-color: transparent;
    box-shadow: 0 5px 14px rgba(217, 72, 15, 0.32);
    transform: translateY(-1px);
}

/* Submit bar */
.match-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line-subtle);
    flex-wrap: wrap;
}

.match-submit-bar .form-note {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    max-width: 560px;
}

/* =====================================================================
   Metric cards
   ===================================================================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.metric-grid > article, .metric-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-width: 0;
    transition: transform 0.26s var(--spring), box-shadow 0.24s ease, border-color 0.24s ease;
}

.metric-grid > article::before, .metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent 70%);
    opacity: 0.7;
}

.metric-grid > article:hover, .metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(200, 148, 63, 0.4);
}

.metric-grid p {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--violet);
    margin: 0 0 8px;
    text-transform: uppercase;
}

.metric-grid p span { color: var(--gold); margin-right: 4px; }

.metric-grid strong {
    display: block;
    font: 700 26px/1.15 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.metric-grid small {
    display: block;
    color: var(--muted);
    margin-top: 8px;
    font-size: 13.5px;
}

/* Kaal cards inside panchang metric-grid */
.kaal-card p { margin: 0 0 6px; }
.kaal-grid .kaal-card strong + p { color: var(--danger); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.kaal-grid .kaal-card.kaal-good strong + p { color: var(--success); }
.kaal-grid .kaal-card.is-now {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-light), var(--shadow-sm);
}

/* =====================================================================
   Split layout & detail lists
   ===================================================================== */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 24px;
}

.split > * { min-width: 0; }

.detail-list { margin: 18px 0 0; }

.detail-list div {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-subtle);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.detail-list div:last-child { border-bottom: 0; }

.detail-list dt {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--violet);
    flex-shrink: 0;
}

.detail-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 500;
    text-align: right;
    font-size: 14.5px;
}

.detail-list-wide div { padding: 10px 0; }

.panel-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* =====================================================================
   Charts — viewport, controls, inspector
   ===================================================================== */
.chart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.chart-panel-header .section-heading h3 { font-size: 22px; }

.chart-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.segmented-control {
    display: inline-flex;
    background: var(--line-subtle);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.seg-btn {
    border: 0;
    background: transparent;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.seg-btn.active {
    background: var(--surface);
    color: var(--indigo);
    box-shadow: 0 2px 6px rgba(90, 32, 8, 0.1);
}

.chart-viewport {
    width: 100%;
    margin-top: 14px;
}

.chart-container { display: none; }
.chart-container.active { display: block; animation: chartFade 0.35s ease; }

@keyframes chartFade {
    from { opacity: 0; transform: scale(0.985); }
    to { opacity: 1; transform: scale(1); }
}

.kundali-chart {
    display: block;
    width: min(100%, 440px);
    margin: 0 auto;
    overflow: visible;
}

.chart-frame { fill: #FDFBF4; stroke: #7B1112; stroke-width: 0.85; }
.chart-lines { fill: none; stroke: #A67C2E; stroke-width: 0.65; }
.chart-house { transition: opacity 0.2s ease; }
.chart-viewport.dim-houses .chart-house:not(.house-hot) { opacity: 0.42; }
.chart-house text { text-anchor: middle; }
.chart-rashi-num { font: 700 4.2px 'Montserrat', 'Poppins', sans-serif; fill: #967027; }
.chart-planets { font: 600 3.1px 'Poppins', Arial, sans-serif; fill: #7B1112; }
.chart-retro { font-size: 2.2px; fill: #B4233D; }
.chart-lagna-badge { font: 700 2.6px 'Poppins', sans-serif; letter-spacing: 0.05em; fill: #C8943F; text-anchor: middle; }
.chart-lagna-wash { pointer-events: none; }

.chart-box-cell { fill: none; stroke: none; }
.chart-center-cell { fill: #F6EBD2; stroke: #A67C2E; stroke-width: 0.5; }
.chart-center-title { font: 700 3.6px 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; fill: #7B1112; text-anchor: middle; }
.chart-center-sub { font: 600 2.4px 'Poppins', sans-serif; letter-spacing: 0.08em; fill: #E8915C; text-anchor: middle; }
.chart-south-sign-name { font: 700 2.8px 'Poppins', sans-serif; fill: #9A8A76; text-anchor: middle; }
.chart-south-planets { font: 600 3.1px 'Poppins', sans-serif; fill: #7B1112; text-anchor: middle; }
.chart-lagna-line { stroke: #C8943F; stroke-width: 0.8; }
.chart-south-lagna { font: 700 2.6px 'Poppins', sans-serif; fill: #C8943F; }

.chart-inspector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--gold-surface);
    border: 1px dashed rgba(200, 148, 63, 0.4);
    color: #63430f;
    font-size: 13px;
    font-weight: 500;
    min-height: 46px;
}

.chart-inspector strong { color: var(--indigo); font-weight: 700; }
.inspector-dot { color: var(--gold); font-size: 14px; }

/* =====================================================================
   Report layout
   ===================================================================== */
.report-header { padding: 0 0 32px; }

.report-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.report-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-hero-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.report-hero-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stat-pill {
    display: grid;
    gap: 3px;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    min-width: 118px;
}

.hero-stat-pill small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet);
}

.hero-stat-pill strong {
    font: 700 17px/1.2 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.report-sub {
    color: var(--muted);
    font-size: 14px;
    margin: 10px 0 0;
}

.report-nav {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 15;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
    scrollbar-width: thin;
}

.report-nav a {
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--indigo);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

.report-nav a:hover { background: var(--gold-light); border-color: var(--gold); }

.report-nav a.active {
    background: var(--cta);
    color: #fff;
    border-color: var(--cta);
    box-shadow: 0 4px 10px rgba(123, 17, 18, 0.25);
}

.report-section { margin-top: 48px; }
.report-section > .panel { margin-top: 16px; }

/* =====================================================================
   Tables
   ===================================================================== */
.table-wrap, .table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.table-wrap { margin-top: 16px; }
.table-scroll { margin-top: 14px; }
.panel .table-scroll:first-of-type { margin-top: 18px; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

/* Inside two-column split panels the 640px table minimum would clip the last
   column — let these smaller tables fit their card instead. */
.split .table-wrap table { min-width: 0; }
.split .table-wrap th, .split .table-wrap td { padding: 11px 9px; font-size: 13.5px; }
.split .table-wrap thead { font-size: 11.5px; letter-spacing: 0.03em; }
.split .strength-meter-cell { gap: 6px; }
.split .strength-bar-svg { width: 44px; }
.split .planet-orb { width: 24px; height: 24px; font-size: 11px; }

th, td {
    text-align: left;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line-subtle);
    font-size: 14.5px;
    vertical-align: top;
}

thead {
    background: var(--paper-subtle);
    color: var(--indigo);
    font-size: 12.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

thead th { font-weight: 700; vertical-align: bottom; }

tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.16s ease; }
tbody tr:hover { background: rgba(200, 148, 63, 0.045); }

tfoot th, tfoot td {
    background: var(--gold-surface);
    font-weight: 700;
    border-top: 2px solid var(--gold);
    border-bottom: 0;
}

.planet-cell { display: inline-flex; align-items: center; gap: 9px; }
.planet-title { font-weight: 700; color: var(--indigo); }

.planet-orb {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font: 700 12px/1 'Poppins', sans-serif;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 6px rgba(90, 32, 8, 0.12);
}

.pb-sun { background: radial-gradient(circle at 32% 28%, #FCD34D, #D97706); color: #fff; }
.pb-moon { background: radial-gradient(circle at 32% 28%, #EADDC8, #A98F7E); color: #7B1112; }
.pb-mars { background: radial-gradient(circle at 32% 28%, #F87171, #B91C1C); color: #fff; }
.pb-mercury { background: radial-gradient(circle at 32% 28%, #86EFAC, #059669); color: #fff; }
.pb-jupiter { background: radial-gradient(circle at 32% 28%, #FCD34D, #B45309); color: #fff; }
.pb-venus { background: radial-gradient(circle at 32% 28%, #F9A8D4, #DB2777); color: #fff; }
.pb-saturn { background: radial-gradient(circle at 32% 28%, #A5B4FC, #4338CA); color: #fff; }
.pb-rahu { background: radial-gradient(circle at 32% 28%, #8A7060, #3B2417); color: #fff; }
.pb-ketu { background: radial-gradient(circle at 32% 28%, #E0D5C2, #6E5B4E); color: #fff; }
.pb-asc { background: radial-gradient(circle at 32% 28%, var(--gold-glow), var(--gold)); color: #241A08; }
.pb-default { background: radial-gradient(circle at 32% 28%, #C4B5FD, #7C3AED); color: #fff; }

.pada-pill, .house-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--paper-subtle);
    border: 1px solid var(--line);
    font: 700 11.5px/1.4 ui-monospace, 'Cascadia Code', monospace;
    color: var(--indigo);
    white-space: nowrap;
}

.numeric {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

.dense-table td, .dense-table th { padding: 7px 9px; font-size: 12.5px; white-space: nowrap; }

.flag-dosha { color: var(--danger); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; }
.flag-ok { color: var(--success); font-size: 11.5px; font-weight: 600; }

/* =====================================================================
   Status badges
   ===================================================================== */
.status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-exalted { background: rgba(200, 148, 63, 0.15); color: #8C6016; border: 1px solid rgba(200, 148, 63, 0.4); }
.badge-debilitated { background: rgba(184, 32, 59, 0.1); color: var(--danger); border: 1px solid rgba(184, 32, 59, 0.3); }
.badge-own { background: rgba(123, 17, 18, 0.1); color: var(--indigo); border: 1px solid rgba(123, 17, 18, 0.25); }
.badge-moola { background: rgba(154, 52, 18, 0.1); color: var(--violet); border: 1px solid rgba(154, 52, 18, 0.25); }
.badge-friendly { background: rgba(25, 120, 78, 0.1); color: var(--success); border: 1px solid rgba(25, 120, 78, 0.25); }
.badge-enemy { background: rgba(122, 92, 72, 0.1); color: var(--muted); border: 1px solid rgba(122, 92, 72, 0.2); }
.badge-neutral { background: var(--line-subtle); color: var(--muted); }
.badge-combust { background: rgba(220, 80, 30, 0.12); color: #C44010; border: 1px solid rgba(220, 80, 30, 0.3); }
.badge-retro { background: rgba(200, 148, 63, 0.12); color: #9C6C1B; }
.badge-strong { background: rgba(25, 120, 78, 0.12); color: #176541; }
.badge-moderate { background: rgba(200, 148, 63, 0.15); color: #8C6016; }
.badge-standard { background: rgba(154, 52, 18, 0.1); color: var(--violet); }
.badge-cancelled { background: var(--line-subtle); color: #8F7C6C; text-decoration: line-through; }
.badge-review { background: rgba(184, 32, 59, 0.1); color: var(--danger); }
.badge-mitigated { background: rgba(25, 120, 78, 0.12); color: #176541; }
.badge-info { background: rgba(154, 52, 18, 0.1); color: var(--violet); }
.badge-danger { background: rgba(184, 32, 59, 0.1); color: var(--danger); }

/* =====================================================================
   Rule cards (yogas & doshas)
   ===================================================================== */
.rule-list-enhanced {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 14px;
}

.rule-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    background: linear-gradient(180deg, var(--surface), var(--paper-subtle) 180%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.24s var(--spring);
}

.rule-card:hover {
    border-color: rgba(200, 148, 63, 0.45);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.rule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.rule-card-header strong { font-size: 15.5px; color: var(--indigo); }

.rule-card-desc, .rule-card-evidence {
    font-size: 13.5px;
    color: var(--ink);
    margin: 4px 0 6px;
}

.rule-card-cancel {
    font-size: 12.5px;
    background: var(--gold-light);
    border-radius: 8px;
    padding: 7px 10px;
    color: #63430f;
    margin: 6px 0;
}

.rule-card-id {
    font-size: 11.5px;
    color: var(--muted);
    font-family: ui-monospace, monospace;
}

.empty { color: var(--muted); font-size: 14px; font-style: italic; }

.notice {
    margin-top: 36px;
    border-left: 4px solid var(--gold);
    background: var(--gold-surface);
    padding: 18px 22px;
    border-radius: 0 14px 14px 0;
    color: #553e16;
    font-size: 14px;
    line-height: 1.55;
}

/* =====================================================================
   Strength meters (Shadbala / Koota)
   ===================================================================== */
.strength-meter-cell { display: flex; align-items: center; gap: 10px; }

.strength-bar-svg { flex-shrink: 0; }
.strength-bar-track { fill: var(--line-subtle); }
.strength-bar-fill { fill: var(--gold); }
.fill-strong { fill: var(--success); }
.fill-low { fill: var(--danger); }

.rank-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font: 700 12px/1.4 ui-monospace, monospace;
}

.rank-gold { background: rgba(200, 148, 63, 0.16); color: #8C6016; }
.rank-silver { background: rgba(122, 92, 72, 0.12); color: var(--muted); }
.rank-normal { background: var(--line-subtle); color: var(--muted); }

/* Ashtakavarga bindu cards */
.sav-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.sav-card {
    display: grid;
    gap: 2px;
    padding: 12px 10px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform 0.22s var(--spring), box-shadow 0.2s ease;
}

.sav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.sav-sign { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sav-pts { font: 700 21px/1 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.sav-card small { font-size: 10px; color: var(--muted); }

.bindu-high { background: linear-gradient(180deg, rgba(25, 120, 78, 0.1), var(--surface)); border-color: rgba(25, 120, 78, 0.35); }
.bindu-high .sav-pts { color: var(--success); }
.bindu-mid { background: linear-gradient(180deg, rgba(200, 148, 63, 0.1), var(--surface)); border-color: rgba(200, 148, 63, 0.35); }
.bindu-mid .sav-pts { color: #8C6016; }
.bindu-low { background: var(--surface); }
.bindu-low .sav-pts { color: var(--muted); }

.yogini-code { font-weight: 600; color: var(--muted); font-size: 11px; }

/* =====================================================================
   Match pages
   ===================================================================== */
.score-panel { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 34px 24px; }

.score-ring { position: relative; width: 168px; height: 168px; display: grid; place-content: center; }
.score-ring-svg { position: absolute; inset: 0; }
.score-ring-track { fill: none; stroke: var(--line-subtle); stroke-width: 10; }
.score-ring-arc { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; }
.verdict-excellent .score-ring-arc { stroke: var(--success); }
.verdict-good .score-ring-arc { stroke: var(--gold); }
.verdict-acceptable .score-ring-arc { stroke: var(--violet); }
.verdict-low .score-ring-arc { stroke: var(--danger); }
.score-ring strong, .score-ring > span { position: relative; z-index: 1; }
.score-ring strong { font: 700 34px/1 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.score-ring strong small { font-size: 16px; color: var(--muted); }
.score-ring > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.score-verdict { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }

.koota-full { color: var(--success); font-weight: 700; }
.koota-part { color: var(--gold); font-weight: 700; }
.koota-low { color: var(--danger); font-weight: 700; }
.koota-remark { font-size: 13px; color: var(--muted); white-space: normal; min-width: 220px; }
.match-row-actions { display: flex; gap: 8px; align-items: center; }

.match-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    margin-top: 26px;
    align-items: start;
}

.match-vs-badge {
    align-self: center;
    justify-self: center;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--indigo), var(--indigo-dark));
    color: #F7CE7E;
    box-shadow: 0 10px 26px rgba(123, 17, 18, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    margin-top: 60px;
}

.match-vs-badge span { font-size: 18px; line-height: 1; }
.match-vs-badge small { font: 700 8.5px/1 'Poppins', sans-serif; letter-spacing: 0.18em; color: rgba(247, 206, 126, 0.8); }

.partner-card {
    position: relative;
    border: 1px solid var(--line-subtle);
    border-radius: 22px;
    padding: 26px 26px 20px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--gold-surface) 145%);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 12px;
    align-content: start;
    transition: transform 0.28s var(--spring), box-shadow 0.28s ease, border-color 0.28s ease;
}

.partner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--line);
}

.partner-card:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(200, 148, 63, 0.14), var(--shadow);
}

.partner-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.partner-id { display: flex; align-items: center; gap: 13px; }

.partner-glyph {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, var(--gold-glow), var(--gold));
    color: #fff;
    font-size: 21px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(200, 148, 63, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.partner-card-head .eyebrow { margin: 0; }

.partner-card-head h3 {
    margin: 2px 0 0;
    font: 700 21px/1.15 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.partner-picker {
    display: grid;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
}

.partner-picker select {
    width: auto;
    min-width: 218px;
    min-height: 38px;
    border-radius: 999px;
    padding: 7px 34px 7px 16px;
    background: var(--gold-light);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo);
    box-shadow: var(--shadow-sm);
}

.partner-card .form-grid { gap: 15px 16px; }
.partner-card input[type="number"] { font-variant-numeric: tabular-nums; }

.partner-hint {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

/* =====================================================================
   AI astrologer (explanations + Q&A sidebar)
   ===================================================================== */
.ai-answer { padding: 26px 28px; line-height: 1.75; }
.ai-answer h3, .ai-answer h4 { color: var(--indigo); font-family: 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; margin: 20px 0 8px; }
.ai-answer p { margin: 0 0 12px; }
.ai-answer ul { margin: 0 0 14px; padding-left: 22px; }
.ai-answer li { margin-bottom: 6px; }

.ai-lang-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 10px;
}

.ai-explanation-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: -8px 0 18px;
}

.ai-explain-form { max-width: 520px; }
.ai-explain-form select { min-height: 44px; padding: 10px 14px; }

.qa-fab {
    position: fixed;
    left: 26px;
    right: auto;
    bottom: calc(var(--app-tabs-h, 0px) + 26px);
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border: none;
    border-radius: 999px;
    background: var(--cta);
    color: #fff;
    font: 600 14.5px/1 'Poppins', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(123, 17, 18, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.qa-fab span { color: var(--gold-glow); font-size: 15px; }

.qa-fab:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(123, 17, 18, 0.42);
}

.kundali-qa {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    /* iPhone: keep the composer above the home indicator and the panel off
       the landscape notch (this is a right-docked drawer); --kbd-inset
       lifts it above the on-screen keyboard too. */
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--kbd-inset, 0px));
    padding-right: env(safe-area-inset-right, 0px);
    width: min(420px, 100vw);
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 48px rgba(90, 32, 8, 0.16);
    z-index: 70;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.kundali-qa.open { transform: translateX(0); }

.qa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line-subtle);
    background: linear-gradient(180deg, var(--gold-surface), var(--surface));
}

.qa-header .eyebrow { margin: 0 0 2px; }
.qa-header h2 { margin: 0; font-size: 20px; color: var(--indigo); }

.qa-close {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.16s ease, border-color 0.16s ease, transform 0.2s var(--spring);
}

.qa-close:hover { color: var(--indigo); border-color: var(--gold); transform: rotate(90deg); }

.qa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Subtle paper-grain texture — layered fine dots + a faint diagonal
       weave over the surface, invisible at a glance but keeps the pane
       from feeling flat. */
    background:
        radial-gradient(circle at 1px 1px, rgba(94, 32, 20, 0.05) 1px, transparent 1.6px) 0 0 / 22px 22px,
        repeating-linear-gradient(135deg, rgba(166, 124, 26, 0.028) 0 2px, transparent 2px 9px),
        var(--surface);
}

.qa-msg {
    max-width: 88%;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 13.25px;
    line-height: 1.55;
    box-shadow: 0 1px 3px rgba(90, 32, 8, 0.10), 0 1px 1px rgba(90, 32, 8, 0.06);
    animation: msgIn 0.28s var(--spring);
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.qa-msg p { margin: 0; white-space: pre-wrap; }
.qa-msg p + p, .qa-msg p + ul, .qa-msg ul + p, .qa-msg h3 + p, .qa-msg h4 + p { margin-top: 8px; }
.qa-msg ul { margin: 8px 0 0; padding-left: 18px; }
.qa-msg li { margin-bottom: 4px; }
.qa-msg h3, .qa-msg h4 { margin: 10px 0 4px; font-size: 14.5px; color: var(--indigo); }
.qa-msg strong { color: var(--indigo); }

.qa-msg-user {
    align-self: flex-end;
    background: var(--cta);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.qa-msg-user strong, .qa-msg-user h3, .qa-msg-user h4 { color: #fff; }

.qa-msg-assistant {
    align-self: flex-start;
    background: var(--gold-surface);
    border: 1px solid var(--line-subtle);
    border-bottom-left-radius: 4px;
}

.qa-msg-error {
    align-self: stretch;
    max-width: 100%;
    background: rgba(184, 32, 59, 0.08);
    color: var(--danger);
    border: 1px solid rgba(184, 32, 59, 0.25);
    font-size: 13px;
}

.qa-msg-pending p { color: var(--muted); font-style: italic; }

/* Astrologer persona header — avatar monogram + name/tagline row, mirroring
   the named-astrologer header users see on consultation apps. */
.qa-persona {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.qa-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 28%, var(--gold-glow), var(--cta));
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    box-shadow: 0 0 0 3px var(--gold-surface), 0 3px 10px rgba(90, 32, 8, 0.22);
}

.qa-persona h2 { margin: 0; font-size: 16.5px; color: var(--indigo); }

.qa-tagline {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qa-online { color: #2e9e5b; font-weight: 700; }
.qa-online::before { content: '●'; font-size: 8px; margin-right: 3px; vertical-align: 1px; }

/* Astrologer "joining" beat — amber pulsing status until the pandit lands. */
.qa-joining { color: #b07c1f; font-weight: 700; }
.qa-joining::before { content: '●'; font-size: 8px; margin-right: 3px; vertical-align: 1px; animation: qa-typing-blink 1.2s ease-in-out infinite; }

/* Centred system line inside the chat feed ("Manju Ji is joining…"). */
.qa-note {
    align-self: center;
    max-width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    padding: 2px 10px;
    animation: msgIn 0.28s var(--spring);
}

/* Typing indicator — three pulsing dots beside the "{name} is typing" label. */
.qa-typing-dots { display: inline-flex; gap: 3px; margin-left: 5px; }
.qa-typing-dots i {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
    animation: qa-typing-blink 1.2s ease-in-out infinite;
}
.qa-typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.qa-typing-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes qa-typing-blink {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
}

.qa-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px 0;
}

.qa-chip {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--violet);
    cursor: pointer;
    transition: all 0.16s ease;
    font-family: inherit;
}

.qa-chip:hover { border-color: var(--gold); background: var(--gold-light); }

.qa-form { padding: 10px 14px 12px; border-top: 1px solid var(--line-subtle); }

.qa-input-row { display: flex; gap: 8px; align-items: flex-end; }

/* Language picks in the controls row — 💬 marks the chat reply language,
   📞 the call language, so the two selects can't be confused. The chat pick
   lives outside the form; app.js reads it panel-scoped. */
.qa-langpick {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

.qa-lp-icon { font-size: 12px; line-height: 1; opacity: 0.75; }

.qa-lang-sm {
    min-height: 26px;
    padding: 2px 4px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border-color: var(--line-subtle);
    background: transparent;
    color: var(--muted);
}

/* On the mobile full-screen call UI the chat-language pick is irrelevant. */
.qa-live-call .qa-langpick-chat { display: none; }

/* Pandit chooser — the FAB opens this overlay; each pick loads that
   astrologer's own transcript into the sidebar. */
.qa-chooser {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0; /* edge fallback for inset (iOS <14.1) */
    inset: 0;
    z-index: 75;
    display: none;
    padding: 20px;
    background: rgba(28, 9, 5, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.qa-chooser.open { display: flex; }
.qa-chooser-card {
    /* margin:auto centers it when short; max-height + own scroll when tall. */
    margin: auto;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px); /* iOS: vh hides the shrinking URL bar */
    overflow-y: auto;
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl, 20px);
    box-shadow: var(--shadow, 0 24px 60px rgba(28,9,5,0.3));
    padding: 18px;
}
.qa-chooser-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.qa-chooser-head h3 { margin: 0; font-size: 17px; color: var(--indigo); }
.qa-chooser-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Five pandits in a 2-col grid: the last card stretches full width and
   flips to a landscape layout so the portrait isn't cropped to a sliver. */
.qa-chooser-list .qa-pick:last-child { grid-column: 1 / -1; }
.qa-chooser-sub { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }

/* Portrait post-card pick: tall gradient "photo" up top, details below. */
.qa-pick {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
    font-family: inherit;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.qa-pick:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
.qa-id-photo {
    position: relative;
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(150deg, var(--indigo) 0%, #7a1f12 60%, var(--gold) 150%);
}
/* Blurred color-leak backdrop: the same photo zoomed + blurred behind the
   circular portrait so the card keeps the pandit's palette. */
.qa-id-bg {
    position: absolute;
    inset: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    object-fit: cover;
    filter: blur(16px) saturate(1.35) brightness(0.72);
    transform: scale(1.15);
}
.qa-id-img {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 32%;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 14px rgba(28, 9, 5, 0.35);
    display: block;
}

.qa-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    flex-shrink: 0;
    padding: 0;
    font-size: 0;
}

.qa-call-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.7);
}
.qa-id-body { display: grid; gap: 3px; padding: 11px 13px 13px; }
.qa-id-name { display: block; font-size: 13.5px; font-weight: 700; color: var(--indigo); line-height: 1.25; }
.qa-id-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-left: 5px;
    vertical-align: 0;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}
.qa-id-role { font-size: 11.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-id-meta { font-size: 11px; color: var(--muted); }
.qa-id-meta i { font-style: normal; margin: 0 5px; color: var(--line); }
.qa-id-cta {
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gold);
}
.qa-pick:hover .qa-id-cta { text-decoration: underline; }

/* Profile shortcut — top-right ⓘ on each pandit card opens /pandit/{id}. */
.qa-pick-profile {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 2;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: var(--indigo);
    font-size: 12px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(28, 9, 5, 0.25);
}
.qa-pick-profile:hover { background: var(--gold); color: #fff; }
@media (max-width: 480px) {
    /* Mobile: keep the 2-col grid but shrink the photo band so all five
       pandits fit without a long scroll. */
    .qa-chooser-card { padding: 14px; }
    .qa-chooser-list { gap: 8px; }
    .qa-id-photo { height: 84px; }
    .qa-id-img { width: 58px; height: 58px; }
    .qa-id-body { padding: 9px 10px 10px; gap: 2px; }
    .qa-id-name { font-size: 12px; }
    .qa-id-role, .qa-id-meta, .qa-id-cta { font-size: 10.5px; }
}

/* Public pandit profile — same blurred color-leak idiom as the chooser. */
.pandit-profile { display: grid; gap: 22px; }
.pandit-hero {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 46px 32px 30px;
    display: grid;
    justify-items: center;
    text-align: center;
    background: linear-gradient(150deg, var(--indigo) 0%, #7a1f12 60%, var(--gold) 150%);
    color: #fff;
}
.pandit-hero-bg {
    position: absolute;
    inset: -18px;
    width: calc(100% + 36px);
    height: calc(100% + 36px);
    object-fit: cover;
    filter: blur(16px) saturate(1.35) brightness(0.7);
    transform: scale(1.15);
}
.pandit-hero-face {
    position: relative;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 22px rgba(28, 9, 5, 0.4);
}
.pandit-hero-mono { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); font-size: 44px; }
.pandit-hero-info { position: relative; margin-top: 14px; }
.pandit-hero-info h1 { font-size: 26px; margin: 0; }
.pandit-tag { margin: 4px 0 12px; opacity: 0.85; font-size: 14px; }
.pandit-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pandit-chip {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 600;
}
.pandit-bio p { line-height: 1.7; }
.pandit-cta { margin-top: 18px; }

.pandit-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.pandit-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    display: grid;
    gap: 3px;
}
.pandit-stat strong { font-size: 16px; color: var(--indigo); }
.pandit-stat span { font-size: 11px; color: var(--muted); }

.pandit-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.pandit-spec {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--gold-surface);
    border: 1px solid rgba(200, 148, 63, 0.35);
    color: #79571b;
    font-size: 12.5px;
    font-weight: 600;
}

.pandit-expect { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.pandit-expect li { padding-left: 26px; position: relative; line-height: 1.55; }
.pandit-expect li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--gold);
}
@media (max-width: 560px) { .pandit-stats { grid-template-columns: repeat(2, 1fr); } }
.pandit-others-label { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.pandit-others-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pandit-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
}
.pandit-mini img, .pandit-mini span { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.pandit-mini strong { font-size: 13px; }
.pandit-mini small { color: var(--muted); font-size: 11px; }
.pandit-mini:hover { border-color: var(--gold); }

/* Persona header acts as the "switch astrologer" button. */
.qa-persona-btn {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.qa-persona-btn:hover .qa-tagline::after { content: ' ⇄'; color: var(--gold); }

/* The call button + both language picks must never wrap onto a second line —
   nowrap keeps them in one row; the selects may shrink if the panel narrows. */
.qa-live:not(.qa-live-call) { flex-wrap: wrap; }
/* Session status ("Consultation ended…") takes its own full line under the
   controls instead of squeezing between the buttons on narrow sidebars. */
.qa-live:not(.qa-live-call) .qa-live-status {
    flex: 1 1 100%;
    order: 90;
    min-height: 0;
    font-size: 11.5px;
    color: var(--muted);
}
.qa-live:not(.qa-live-call) .qa-live-status:empty { display: none; }
.qa-live:not(.qa-live-call) .qa-langpick { min-width: 0; flex: 0 1 auto; }
.qa-live:not(.qa-live-call) select { min-width: 0; max-width: 130px; }

.qa-form textarea {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    min-height: 42px;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
}

.qa-lang {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--indigo);
    background: var(--surface);
}

.qa-send {
    border: none;
    border-radius: 12px;
    background: var(--cta);
    color: #fff;
    width: 42px;
    height: 42px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.2s var(--spring);
    flex-shrink: 0;
}

.qa-send:hover { background: var(--cta-hover); transform: scale(1.06); }
.qa-send:disabled { opacity: 0.5; cursor: default; transform: none; }

.qa-offline {
    padding: 14px 18px;
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    border-top: 1px solid var(--line-subtle);
}

.qa-billing {
    display: flex;
    align-items: center;
    gap: 4px 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    border-top: 1px solid var(--line-subtle);
}

/* Coin icon + bare number — the "Balance: N credits" label was too wordy
   for the narrow sidebar footer. */
.qa-billing-balance { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 13px; }
.qa-billing-balance strong { font-weight: 700; }
.qa-coin { width: 15px; height: 15px; color: #B8860B; }
.qa-billing-rates { display: inline-flex; align-items: center; gap: 5px; }
.qa-billing-topup {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--saffron-glow), var(--saffron));
    color: #FFF7EC;
    font: 700 11.5px/1 'Poppins', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(217, 72, 15, 0.28);
}
.qa-end-btn { margin-left: auto; }

/* Off-canvas sidebars translated past the viewport edge still widen the
   page on mobile — fixed elements escape body's overflow clip and the whole
   site then pans/clips horizontally. Visibility flips only after the slide
   finishes so the close animation still plays. */
.kundali-qa:not(.open), .support-qa:not(.open) {
    visibility: hidden;
    transition: transform 0.32s ease, visibility 0s linear 0.32s;
}
.kundali-qa.open, .support-qa.open {
    visibility: visible;
    transition-delay: 0s;
}

/* Ledger tables inside panels — card-like treatment for wallet/orders. */
.panel .table-wrap { border: 1px solid var(--line-subtle); border-radius: 14px; margin-top: 14px; }
.panel .table-wrap table th { background: var(--paper-subtle); }

.qa-billing a { color: var(--violet); font-weight: 600; }

/* Site-wide support bot — an icon-only circle docked bottom-right, above
   the app tab bar; its panel still slides in from the left edge so it can
   coexist with the report-page Q&A sidebar. */
.support-fab {
    left: auto;
    right: 18px;
    bottom: calc(var(--app-tabs-h, 0px) + 18px);
    width: 54px;
    height: 54px;
    padding: 0;
    justify-content: center;
    gap: 0;
}

.support-fab svg { width: 24px; height: 24px; }

.support-qa {
    right: auto;
    left: 0;
    /* Left-docked panel: the notch sits on the left in landscape. */
    padding-right: 0;
    padding-left: env(safe-area-inset-left, 0px);
    border-left: none;
    border-right: 1px solid var(--line);
    box-shadow: 18px 0 48px rgba(90, 32, 8, 0.16);
    transform: translateX(-100%);
}

/* Live voice consultation bar (Gemini Live API, ephemeral token sessions) */

.qa-live {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px 0;
}

.qa-live-cta {
    background: linear-gradient(180deg, var(--gold-glow), var(--gold));
    border-color: transparent;
    color: #241A08;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(200, 148, 63, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.qa-live-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.qa-live-cta.qa-live-on {
    background: linear-gradient(180deg, #e2574b, #b93a30);
    color: #fff;
    box-shadow: 0 8px 20px rgba(185, 58, 48, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.qa-live-lang {
    min-height: 34px;
    border-radius: 999px;
    padding: 6px 10px;
}

.qa-live-lang:disabled { opacity: 0.55; }

.qa-live-send {
    border-color: var(--gold);
    color: var(--gold);
}

.qa-live-send:hover { border-color: var(--cta); background: var(--gold-light); }
.qa-live-send[hidden] { display: none; }

/* Mobile call screen: JS moves .qa-live under <body> and adds .qa-live-call.
   On desktop/inactive the face wrapper is transparent (display:contents) so
   the normal bar layout is untouched; its children stay hidden. */

.qa-call-face { display: contents; }
.qa-call-avatar, .qa-call-name, .qa-call-role, .qa-call-timer { display: none; }

body.qa-call-lock { overflow: hidden; }

.qa-live.qa-live-call {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0; /* edge fallback for inset (iOS <14.1) */
    inset: 0;
    z-index: 300;
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: calc(40px + env(safe-area-inset-top, 0px)) 24px calc(40px + env(safe-area-inset-bottom, 0px));
    background: radial-gradient(130% 100% at 50% 0%, #4A140E 0%, #33160D 52%, #1A0C06 100%);
}

.qa-live.qa-live-call .qa-call-face {
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.qa-live.qa-live-call .qa-call-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #f4d488, #c99a3a);
    color: #4a3405;
    font-size: 52px;
    font-family: 'Noto Serif Devanagari', serif;
    box-shadow: 0 0 0 10px rgba(201, 154, 58, 0.16), 0 0 0 22px rgba(201, 154, 58, 0.06);
    margin-bottom: 14px;
}

.qa-live.qa-live-call[data-tone="listening"] .qa-call-avatar,
.qa-live.qa-live-call[data-tone="speaking"] .qa-call-avatar,
.qa-live.qa-live-call[data-tone="connecting"] .qa-call-avatar {
    animation: qa-call-pulse 1.8s ease-in-out infinite;
}

@keyframes qa-call-pulse {
    0%, 100% { box-shadow: 0 0 0 10px rgba(201, 154, 58, 0.16), 0 0 0 22px rgba(201, 154, 58, 0.06); }
    50% { box-shadow: 0 0 0 18px rgba(201, 154, 58, 0.28), 0 0 0 36px rgba(201, 154, 58, 0.1); }
}

.qa-live.qa-live-call .qa-call-name {
    display: block;
    font: 700 26px/1.2 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: #fff;
    letter-spacing: 0.03em;
}

.qa-live.qa-live-call .qa-call-role {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.qa-live.qa-live-call .qa-call-timer {
    display: block;
    font: 600 15px/1 'Poppins', sans-serif;
    color: #D9BFA4;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
}

.qa-live.qa-live-call .qa-live-status { font-size: 15px; color: #F2C9A0; min-height: 20px; }
.qa-live.qa-live-call .qa-live-status[data-tone="listening"] { color: #F0A860; }
.qa-live.qa-live-call .qa-live-status[data-tone="speaking"] { color: var(--gold-glow); }
.qa-live.qa-live-call .qa-live-status[data-tone="error"] { color: #ff9d94; }
.qa-live.qa-live-call .qa-live-status[data-tone="warn"] { color: #f0c46a; }

.qa-live.qa-live-call .qa-live-btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
}

.qa-live.qa-live-call .qa-live-btn.qa-live-on {
    background: #c2332f;
    color: #fff;
}

.qa-live.qa-live-call .qa-live-btn.qa-live-on:hover { background: #a92b27; }
.qa-live.qa-live-call .qa-live-btn.qa-live-on .qa-live-icon { animation: none; }

.qa-live.qa-live-call .qa-live-send {
    background: var(--gold);
    color: #2a1d04;
}

.qa-live.qa-live-call .qa-live-send:hover { background: var(--gold-glow); }
.qa-live.qa-live-call .qa-live-lang { display: none; }

/* In-call controls (mute / audio route). Outside the call screen they stay
   hidden — the wrapper is transparent to the normal bar layout. */
.qa-call-controls { display: contents; }
.qa-live-callctl { display: none; }

.qa-live.qa-live-call .qa-call-controls {
    order: 1;
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}

.qa-live.qa-live-call .qa-call-controls .qa-live-btn {
    width: auto;
    max-width: none;
    flex: 1;
    padding: 13px 8px;
    font-size: 13px;
    justify-content: center;
}

.qa-live.qa-live-call .qa-live-callctl { display: inline-flex; }

.qa-live.qa-live-call .qa-live-callctl[aria-pressed="true"] {
    background: var(--gold);
    color: #2a1d04;
    border-color: transparent;
}

/* The red End call action sits at the bottom of the call screen, under the
   in-call controls — the way phone dialers lay it out. */
.qa-live.qa-live-call [data-live-toggle] { order: 2; }

.qa-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--indigo);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.16s ease;
}

.qa-live-btn:hover { border-color: var(--gold); background: var(--gold-light); }

.qa-live-icon { font-size: 14px; }

.qa-live-btn.qa-live-on {
    border-color: var(--cta);
    background: var(--cta);
    color: #fff;
}

.qa-live-btn.qa-live-on:hover { background: var(--cta-hover); }

.qa-live-btn.qa-live-on .qa-live-icon { animation: qa-live-pulse 1.6s ease-in-out infinite; }

@keyframes qa-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.qa-live-status {
    font-size: 11.5px;
    color: var(--muted);
    min-height: 14px;
}

.qa-live-status[data-tone="listening"] { color: var(--violet); }
.qa-live-status[data-tone="speaking"] { color: var(--gold); }
.qa-live-status[data-tone="error"] { color: #b3261e; }
.qa-live-status[data-tone="warn"] { color: #8a5a00; }

/* =====================================================================
   Auth screens
   ===================================================================== */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 64px;
    align-items: center;
    min-height: calc(100vh - 320px);
    min-height: calc(100dvh - 320px); /* iOS: vh ignores the shrinking URL bar */
    padding: 30px 0 20px;
}

.auth-intro h1 {
    font: 700 clamp(38px, 5.2vw, 60px)/1.06 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    letter-spacing: -0.04em;
    color: var(--indigo);
    margin: 0;
}

.auth-benefits {
    padding: 0;
    margin: 30px 0 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.auth-benefits li {
    display: grid;
    gap: 3px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--gold);
}

.auth-benefits strong { font-size: 14.5px; color: var(--indigo); }
.auth-benefits span { font-size: 13px; color: var(--muted); }

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 22px;
    padding: 34px;
    display: grid;
    gap: 18px;
}
.auth-card-centered { margin: 40px auto; }
.auth-note-top { margin-top: 12px; }
.credit-balance-num { font-size: 2.2rem; font-weight: 700; margin: 0 0 .5rem; }
.credit-balance-num small { font-size: 1rem; font-weight: 500; }
.admin-credits-num { width: 6rem; }
.admin-testmail-row { margin-top: .6rem; }
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: 600 14px/1 'Poppins', sans-serif;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.google-btn:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(59, 26, 19, 0.08); }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.auth-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-subtle);
}

.auth-card-head img { border-radius: 50%; display: block; box-shadow: 0 3px 12px rgba(123, 17, 18, 0.28); }
.auth-card-head .eyebrow { margin: 0 0 2px; }
.auth-card-head h2 { margin: 0; font: 700 22px/1.2 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }

.auth-card label {
    display: grid;
    gap: 7px;
    color: var(--indigo);
    font-size: 14px;
    font-weight: 700;
}

.auth-card .button-primary { justify-content: center; margin-top: 6px; }

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.auth-card a { color: var(--violet); font-weight: 700; }

.auth-cta { width: 100%; justify-content: center; margin-top: 6px; }

/* =====================================================================
   Flash messages
   ===================================================================== */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    animation: msgIn 0.3s var(--spring);
}

.flash-icon {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    flex-shrink: 0;
}

.flash-success { background: #E9F7F0; color: var(--success); border-color: #BEE3D1; }
.flash-success .flash-icon { background: var(--success); color: #fff; }
.flash-error { background: #FBEEE6; color: var(--danger); border-color: #F5CDB8; }
.flash-error .flash-icon { background: var(--danger); color: #fff; }
.flash-info { background: rgba(154, 52, 18, 0.08); color: var(--violet); border-color: rgba(154, 52, 18, 0.25); }
.flash-info .flash-icon { background: var(--violet); color: #fff; }

/* =====================================================================
   Engine feature grid (landing)
   ===================================================================== */
.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 40px 0;
}

.engine-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.engine-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 148, 63, 0.1), transparent 70%);
    pointer-events: none;
}

.engine-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(200, 148, 63, 0.4);
}

.engine-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.engine-num {
    font: 700 12px/1 ui-monospace, 'Cascadia Code', monospace;
    color: var(--gold);
    letter-spacing: 0.12em;
}

.engine-glyph {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--gold-surface), var(--gold-light));
    border: 1px solid rgba(200, 148, 63, 0.25);
    color: var(--gold);
    font-size: 17px;
}

.engine-card h3 { margin: 0 0 6px; font: 700 17px/1.3 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.engine-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Principles (how it works) */
.principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.principles article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s var(--spring), box-shadow 0.2s ease;
}

.principles article:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.step-badge {
    display: inline-block;
    font: 700 10.5px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.14em;
    color: var(--gold);
    background: var(--gold-light);
    border: 1px solid rgba(200, 148, 63, 0.3);
    padding: 6px 12px;
    border-radius: 999px;
}

.principles h2 {
    font: 700 22px/1.15 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
    margin: 14px 0 8px;
}

.principles p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

/* Trust band */
.trust-band {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;
    padding: 38px 0 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.trust-band span { display: inline-flex; align-items: center; gap: 9px; }
.trust-band i { color: var(--gold); font-style: normal; font-size: 9px; }

/* =====================================================================
   Panchang page
   ===================================================================== */
.panchang-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 22px 26px;
}

.panchang-picker {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.panchang-picker label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font: 700 12px/1 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--violet);
}

.panchang-picker select,
.panchang-picker input {
    width: auto;
    min-width: 220px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--paper);
}

.panchang-picker input { min-width: 150px; }

/* Credits buy form — breathing room below the explainer text. */
form.pack-custom { margin-top: 16px; }

/* Safari renders native date/time inputs with centred values; strip the
   iOS appearance so they align like every other field. */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
    -webkit-appearance: none;
    text-align: left;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value { text-align: left; }

/* Icon-prefixed fields in tool pickers: the generic padding above would
   otherwise cover the icon (same fix as .form-grid selects). */
.panchang-picker .input-icon > select,
.panchang-picker .input-icon > input { padding-left: 42px; }

.panchang-picker select:focus,
.panchang-picker input:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.day-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.button-chip.active {
    background: var(--cta);
    color: #fff;
    border-color: var(--cta);
}

.chip-glyph { color: var(--gold); margin-right: 2px; }
.button-chip.active .chip-glyph { color: var(--gold-glow); }

.tl-item {
    display: inline-block;
    margin: 2px 14px 2px 0;
    font-weight: 600;
    color: var(--indigo);
}

.tl-item small { color: var(--muted); font-weight: 500; }
.tl-item:last-child { margin-right: 0; }

.now-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-glow), var(--gold));
    color: #241A08;
    font: 700 10px/1.5 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

tr.is-now td, tr.is-now th { background: var(--gold-light); }

.nature-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.nature-auspicious { background: rgba(25, 120, 78, 0.12); color: var(--success); }
.nature-neutral { background: var(--line-subtle); color: var(--muted); }
.nature-inauspicious { background: rgba(184, 32, 59, 0.1); color: var(--danger); }

.engine-note {
    margin: 18px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

/* =====================================================================
   Sign tiles & cards (horoscope / calculators)
   ===================================================================== */
.sign-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.sign-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform 0.2s var(--spring), box-shadow 0.18s ease, border-color 0.18s ease;
}

.sign-tile:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.sign-tile-glyph {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: var(--gold-surface);
    border: 1px solid rgba(200, 148, 63, 0.25);
    color: var(--gold);
    font-size: 19px;
    transition: transform 0.26s var(--spring);
}

.sign-tile:hover .sign-tile-glyph { transform: scale(1.1) rotate(-6deg); }

.sign-tile-text { display: grid; gap: 2px; min-width: 0; }
.sign-tile strong { font: 700 17px/1.2 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.sign-tile small { color: var(--muted); font-size: 12px; }
.sign-tile .action-arrow { margin-left: auto; }

.sign-tile-moon {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--surface), var(--gold-surface));
    box-shadow: 0 0 0 2px rgba(200, 148, 63, 0.2), var(--shadow-sm);
}

.sign-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 6px;
    position: relative;
}

.sign-card-glyph {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 34px;
    color: var(--gold);
    opacity: 0.3;
}

.sign-card p {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet);
    margin: 0 0 6px;
}

.sign-card strong { font: 700 30px/1.1 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; color: var(--indigo); }
.sign-card small { color: var(--muted); font-size: 13px; }
.sign-card-primary { border-color: var(--gold) !important; box-shadow: 0 0 0 2px var(--gold-light), var(--shadow) !important; }

.horoscope-prose p { line-height: 1.7; }
.horoscope-prose strong { color: var(--indigo); }

.sign-switcher { margin-bottom: 24px; }

form .form-grid select {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--surface);
}

form .form-grid select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* Icon-prefixed selects inside .form-grid: the generic padding rule above
   would otherwise reset the 42px icon gutter (equal specificity, later
   wins) and the icon lands on top of the text — e.g. birth-time accuracy. */
form .form-grid .input-icon > select { padding-left: 42px; }

/* =====================================================================
   Admin console
   ===================================================================== */
.admin-body { background: var(--paper); }

.admin-shell {
    display: grid;
    grid-template-columns: 232px 1fr;
    gap: 28px;
    width: min(1320px, calc(100% - 40px));
    margin-inline: auto;
    padding: 32px 0 80px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 96px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 12px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 4px;
}

.admin-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 10px 8px;
}

.admin-nav-link {
    display: block;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    padding: 10px 14px;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-link:hover { background: var(--gold-light); }

.admin-nav-link.active {
    background: var(--cta);
    color: #fff;
    box-shadow: 0 4px 12px rgba(123, 17, 18, 0.25);
}

.admin-sidebar-foot {
    margin-top: 14px;
    padding: 12px 10px 4px;
    border-top: 1px solid var(--line-subtle);
    display: grid;
    gap: 2px;
}

.admin-sidebar-foot small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-sidebar-foot span {
    font-size: 12px;
    color: var(--indigo);
    font-weight: 600;
    word-break: break-all;
}

.admin-main { min-width: 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--gold);
    transition: transform 0.22s var(--spring), box-shadow 0.2s ease;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-card p { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.stat-card strong { font-size: 30px; color: var(--indigo); display: block; line-height: 1.1; font-family: 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif; }
.stat-card small { color: var(--muted); font-size: 12px; }

.admin-create-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 2fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.admin-create-form input, .admin-create-form select,
.inline-form select, .inline-form input {
    min-height: 40px;
    width: auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13.5px;
    background: var(--surface);
}

.admin-create-form input, .admin-create-form select { width: 100%; }

.inline-form { display: inline-flex; gap: 6px; margin: 0; align-items: center; flex-wrap: wrap; }
.inline-form input[type="password"] { width: 150px; }

.actions-cell { min-width: 240px; }
.actions-cell .button-chip { margin: 2px 0; }

/* Stacked panels in the admin content column need air between them. */
.admin-main .panel + .panel { margin-top: 22px; }

/* Pandit manager */
.admin-table td { vertical-align: middle; }

.pandit-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }

.pandit-face {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--gold-light);
}

.pandit-face-mono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    color: var(--indigo);
}

.pandit-cell-name { display: grid; gap: 2px; }
.pandit-cell-name .helper { margin: 0; }

.settings-form { display: grid; gap: 20px; }
.settings-panel { padding: 26px; }

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    margin: 10px 0;
}

.check-row input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--indigo); }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    background: var(--paper-subtle);
}

.footer-inner {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 700 16px/1 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.footer-brand img { border-radius: 50%; display: block; }

.footer-brand small {
    display: block;
    margin-top: 4px;
    font: 500 11.5px/1.4 'Poppins', system-ui, sans-serif;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.footer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 24px; align-items: start; max-width: 620px; }
.footer-links a { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color 0.16s ease; }
.footer-links a:hover { color: var(--gold); }
.footer-note { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }

/* =====================================================================
   Motion: reveals, stagger, submission state
   ===================================================================== */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js [data-reveal].is-visible { opacity: 1; transform: none; }

html.js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
html.js .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
html.js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.07s; }
html.js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.12s; }
html.js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.17s; }
html.js .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.22s; }
html.js .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.27s; }
html.js .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.32s; }
html.js .reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.37s; }
html.js .reveal-stagger.is-visible > *:nth-child(n+9) { transition-delay: 0.42s; }

/* AJAX form submission feedback (app.js .is-submitting) */
form.is-submitting {
    opacity: 0.72;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

form.is-submitting :is(button, input[type=submit]) { cursor: progress; }

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(122, 92, 72, 0.28); border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: rgba(200, 148, 63, 0.55); }

/* =====================================================================
   Midnight theme
   ===================================================================== */
[data-theme="midnight"] {
    --ink: #F5E9DC;
    --maroon: #F0A868;
    --maroon-dark: #E8A05C;
    --indigo: var(--maroon);
    --indigo-dark: var(--maroon-dark);
    --violet: #E8915C;
    --violet-light: #D97F45;
    --gold: #DEB064;
    --gold-glow: #EDC57F;
    --gold-light: rgba(222, 176, 100, 0.12);
    --gold-surface: #2A1812;
    --saffron: #F08A1D;
    --saffron-deep: #D9480F;
    --saffron-glow: #F7A84A;
    --paper: #150B07;
    --paper-subtle: #1F120C;
    --surface: #251410;
    --surface-glass: rgba(31, 18, 12, 0.82);
    --muted: #B39B8C;
    --line: #43291A;
    --line-subtle: #3A2414;
    --success: #4FD69B;
    --danger: #F0728B;
    --cta: var(--saffron-deep);
    --cta-hover: var(--saffron);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

[data-theme="midnight"] body {
    background-color: var(--paper);
    background-image:
        radial-gradient(1.2px 1.2px at 12% 22%, rgba(255, 255, 255, 0.28), transparent 60%),
        radial-gradient(1px 1px at 38% 58%, rgba(255, 255, 255, 0.2), transparent 60%),
        radial-gradient(1.4px 1.4px at 62% 14%, rgba(255, 255, 255, 0.24), transparent 60%),
        radial-gradient(1px 1px at 82% 42%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(1.2px 1.2px at 55% 78%, rgba(255, 255, 255, 0.2), transparent 60%),
        radial-gradient(1px 1px at 90% 86%, rgba(255, 255, 255, 0.22), transparent 60%),
        radial-gradient(1px 1px at 28% 90%, rgba(255, 255, 255, 0.16), transparent 60%),
        radial-gradient(900px 520px at 50% -8%, rgba(160, 60, 12, 0.22), transparent 70%);
    background-attachment: fixed;
}

[data-theme="midnight"] .eyebrow-pill {
    background: rgba(222, 176, 100, 0.09);
    border-color: rgba(222, 176, 100, 0.3);
    color: var(--gold-glow);
}

[data-theme="midnight"] .user-chip,
[data-theme="midnight"] .kundali-avatar,
[data-theme="midnight"] .match-vs-badge {
    background: linear-gradient(145deg, #8C2410, #4A140E);
}

[data-theme="midnight"] input,
[data-theme="midnight"] select,
[data-theme="midnight"] textarea {
    border-color: #4A2C1B;
    background: #1F120C;
    color: var(--ink);
}

[data-theme="midnight"] input::placeholder,
[data-theme="midnight"] textarea::placeholder { color: #8A7263; }

[data-theme="midnight"] .hero::before {
    background: radial-gradient(circle, rgba(222, 176, 100, 0.14), transparent 65%);
}

[data-theme="midnight"] .kundali-card,
[data-theme="midnight"] .partner-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--gold-surface) 160%);
}

[data-theme="midnight"] .chart-frame { fill: #2E1A10; stroke: #E8A05C; }
[data-theme="midnight"] .chart-lines { stroke: #8A4A2E; }
[data-theme="midnight"] .chart-rashi-num { fill: #DCB268; }
[data-theme="midnight"] .chart-planets { fill: #F5E4D4; }
[data-theme="midnight"] .chart-retro { fill: #F38BA0; }
[data-theme="midnight"] .chart-lagna-badge, [data-theme="midnight"] .chart-south-lagna { fill: #EDC57F; }
[data-theme="midnight"] .chart-lagna-line { stroke: #EDC57F; }
[data-theme="midnight"] .chart-center-cell { fill: #2C1A12; stroke: #8A4A2E; }
[data-theme="midnight"] .chart-center-title { fill: #F5E4D4; }
[data-theme="midnight"] .chart-south-sign-name { fill: #B39B8C; }
[data-theme="midnight"] .chart-south-planets { fill: #F5E4D4; }

[data-theme="midnight"] .chart-inspector {
    color: var(--gold-glow);
    background: rgba(222, 176, 100, 0.07);
}

[data-theme="midnight"] .form-accuracy-badge { color: var(--gold-glow); }
[data-theme="midnight"] .city-picker-label { color: var(--gold-glow); }
[data-theme="midnight"] .city-chip { color: var(--gold-glow); }
[data-theme="midnight"] .rule-card-cancel { color: var(--gold-glow); }
[data-theme="midnight"] .notice { color: var(--gold-glow); }
[data-theme="midnight"] .step-badge { color: var(--gold-glow); }

[data-theme="midnight"] .badge-exalted,
[data-theme="midnight"] .badge-moderate,
[data-theme="midnight"] .badge-retro,
[data-theme="midnight"] .koota-part,
[data-theme="midnight"] .bindu-mid .sav-pts,
[data-theme="midnight"] .rank-gold { color: var(--gold-glow); }

[data-theme="midnight"] .badge-debilitated,
[data-theme="midnight"] .badge-combust,
[data-theme="midnight"] .badge-review,
[data-theme="midnight"] .badge-danger,
[data-theme="midnight"] .koota-low,
[data-theme="midnight"] .nature-inauspicious { color: var(--danger); }

[data-theme="midnight"] .badge-own { background: rgba(240, 168, 104, 0.12); border-color: rgba(240, 168, 104, 0.3); }

[data-theme="midnight"] .flash-success {
    background: rgba(79, 214, 155, 0.1);
    border-color: rgba(79, 214, 155, 0.3);
    color: var(--success);
}

[data-theme="midnight"] .flash-error {
    background: rgba(240, 114, 139, 0.1);
    border-color: rgba(240, 114, 139, 0.3);
    color: var(--danger);
}

[data-theme="midnight"] .flash-info {
    background: rgba(232, 145, 92, 0.1);
    border-color: rgba(232, 145, 92, 0.3);
    color: var(--violet);
}

[data-theme="midnight"] .qa-msg-assistant { background: var(--gold-surface); }
[data-theme="midnight"] .seg-btn.active { background: #2C1A12; }
[data-theme="midnight"] .input-icon > svg { color: #9A8A76; }
[data-theme="midnight"] .theme-toggle { color: var(--gold-glow); }

[data-theme="midnight"] .panchang-picker select,
[data-theme="midnight"] .panchang-picker input { background: var(--paper-subtle); }

/* =====================================================================
   Reduced motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
    .activity-ticker-track { animation: none; }
    html.js [data-reveal], html.js .reveal-stagger > * { opacity: 1; transform: none; }
    .astrolabe-svg, .hero-card::after, .pulse-dot { animation: none; }
}

/* =====================================================================
   Public-domain celestial artwork
   ===================================================================== */
/* Framed gallery plates (Cellarius, Harmonia Macrocosmica 1660) */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 40px 0;
}

.archive-plate {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}

.archive-plate:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.archive-plate img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3.1;
    object-fit: cover;
    object-position: center;
    border-bottom: 1px solid var(--line-subtle);
}

.archive-plate figcaption {
    display: grid;
    gap: 3px;
    padding: 15px 18px 17px;
}

.archive-plate figcaption strong {
    font: 700 15px/1.3 'Montserrat', 'Noto Sans Devanagari', system-ui, sans-serif;
    color: var(--indigo);
}

.archive-plate figcaption small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* Antique constellation card thumb inside horoscope sign tiles */
.sign-tile-art {
    width: 58px;
    height: 44px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--paper-subtle);
    flex-shrink: 0;
    transition: transform 0.35s var(--spring);
}

.sign-tile:hover .sign-tile-art { transform: scale(1.08) rotate(-2deg); }

.sign-tile-glyph-inline { color: var(--gold); }

/* Framed celestial plate inside the dark hero card */
.hero-art-frame {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 16px 0;
}

.hero-art-frame img {
    width: 100%;
    max-height: 265px;
    object-fit: cover;
    object-position: center 32%;
    border-radius: 14px;
    border: 1px solid rgba(230, 179, 90, 0.45);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

/* Celestial print under the auth benefits list */
.auth-art {
    margin: 28px 0 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.auth-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    object-position: center 30%;
}

.auth-art figcaption {
    padding: 10px 16px;
    border-top: 1px solid var(--line-subtle);
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.footer-art-credit {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* =====================================================================
   Print
   ===================================================================== */
@media print {
    .site-header, .site-footer, .qa-fab, .kundali-qa, .support-fab, .support-qa,
    .app-tabs, .callpandit-dialog, .header-search,
    .report-nav, .nav-mobile-toggle, .activity-ticker { display: none !important; }
    body { background: #fff; }
    .panel, .form-shell, .dashboard-shell, .metric-grid > article { box-shadow: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
    .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sky-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sign-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero, .result-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hero-card { min-height: 300px; }
    .admin-shell { grid-template-columns: 200px 1fr; }
}

@media (max-width: 980px) {
    .nav-mobile-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        padding: 12px 20px 18px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h)); /* iOS: vh ignores the shrinking URL bar */
        overflow-y: auto;
    }

    .site-nav.nav-open { display: flex; }
    .nav-link { padding: 12px 14px; }
    .nav-group::after { display: none; }

    .nav-group-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 12px;
        display: none;
    }

    .nav-group:hover .nav-group-panel,
    .nav-group:focus-within .nav-group-panel { display: grid; }

    .nav-cta { justify-content: center; margin-top: 8px; }
    .split { grid-template-columns: minmax(0, 1fr); }
    .auth-shell { grid-template-columns: minmax(0, 1fr); gap: 36px; min-height: 0; }
    .match-pair { grid-template-columns: minmax(0, 1fr); }
    .match-vs-badge { margin-top: 0; }
    .sav-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .principles { grid-template-columns: minmax(0, 1fr); }
    .archive-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 12px;
    }
    .admin-sidebar-label, .admin-sidebar-foot { width: 100%; }
    .admin-create-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 640px) {
    :root { --header-h: 64px; }
    .header-inner { width: min(100% - 28px, 1220px); }
    .header-right { gap: 8px; }
    .header-tagline, .user-chip { display: none; }
    .brand { font-size: 18px; }
    .brand img { width: 30px; height: 30px; }
    .container { width: min(100% - 28px, 1220px); padding: 28px 0 56px; }
    .hero, .result-hero { padding: 12px 0 34px; }
    .hero h1, .result-hero h1, .report-header h1 { font-size: clamp(30px, 9vw, 40px); }
    .lead { font-size: 16px; }
    .hero-actions .button-primary, .hero-actions .button-gold,
    .hero-actions .button-secondary { width: 100%; justify-content: center; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
    .sky-strip { padding: 22px 18px; }
    .sky-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .action-grid { grid-template-columns: minmax(0, 1fr); }
    .metric-grid { grid-template-columns: minmax(0, 1fr); }
    .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-shell { padding: 24px 20px; }
    .panel { padding: 22px 18px; }
    .dashboard-shell { padding: 22px 18px; }
    .dashboard-header { flex-direction: column; align-items: stretch; }
    .dashboard-search .input-icon > input { min-width: 0; max-width: none; }
    .kundali-card-grid { grid-template-columns: minmax(0, 1fr); }
    .report-hero-banner { flex-direction: column; align-items: stretch; }
    .report-hero-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-nav { top: calc(var(--header-h) + 6px); }
    th, td { padding: 10px 12px; font-size: 13px; }
    table { min-width: 560px; }
    .sav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .partner-card { padding: 20px 18px 16px; }
    .partner-card-head { flex-direction: column; }
    .partner-picker select { width: 100%; min-width: 0; }
    .match-submit-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .button-gold { width: 100%; }
    .panchang-controls { flex-direction: column; align-items: stretch; }
    .panchang-picker select, .panchang-picker input { min-width: 0; width: 100%; }
    .admin-create-form { grid-template-columns: minmax(0, 1fr); }
    .qa-fab { left: 16px; bottom: calc(var(--app-tabs-h, 0px) + 14px); padding: 12px 18px; }
    .support-fab { right: 14px; left: auto; bottom: calc(var(--app-tabs-h, 0px) + 14px); width: 48px; height: 48px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }

    /* Compact header — the right-side cluster (sign out / theme / language /
       CTA / hamburger) plus the brand exceed a phone's width, so the brand
       truncates and every control shrinks instead of overflowing. */
    .header-inner { gap: 10px; }
    .brand { flex: 0 1 auto; min-width: 0; }
    .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .header-right { gap: 6px; }
    .nav-cta { min-height: 34px; padding: 7px 12px; font-size: 12.5px; }
    .nav-link-btn { padding: 8px 10px; font-size: 12.5px; }
    .lang-pill { padding: 6px 10px; font-size: 12px; }
    .theme-toggle { width: 34px; height: 34px; }
    .nav-mobile-toggle { width: 36px; height: 36px; }
}

/* Below ~480px even a compact "Create workspace" pill can't fit — drop it;
   the hero's primary button carries the same action one scroll away. */
@media (max-width: 480px) {
    .nav-cta { display: none; }
}

/* =====================================================================

/* =====================================================================
   Installed app — JS adds .standalone to <html> (more reliable than the
   display-mode media query, which some WebViews do not evaluate)
   ===================================================================== */

.standalone .auth-intro { display: none; }
.standalone .auth-shell { justify-content: center; }
.standalone .auth-card { margin-inline: auto; }

/* Wide screens: glass header becomes a fixed left rail. */
@media (min-width: 821px) {
    html.standalone body { padding-left: 236px; }
    html.standalone .site-header {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 236px;
        height: auto;
        border-bottom: 0;
        border-right: 1px solid var(--line);
    }
    html.standalone .header-inner {
        flex-direction: column;
        align-items: stretch;
        height: 100%;
        width: 100%;
        padding: 22px 16px;
        gap: 20px;
    }
    html.standalone .site-nav { flex-direction: column; gap: 4px; width: 100%; }
    html.standalone .nav-link { display: block; padding: 11px 14px; border-radius: 12px; }
    html.standalone .nav-group { position: static; }
    html.standalone .nav-group::after { display: none; }
    html.standalone .nav-caret { display: none; }
    html.standalone .nav-group-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: 0;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 2px 0 0 16px;
    }
    html.standalone .header-right {
        margin-top: auto;
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    html.standalone .nav-logout { margin: 0; width: 100%; }
    html.standalone .nav-mobile-toggle { display: none; }
    /* The tab bar clears the fixed left rail in wide app mode. */
    html.standalone .app-tabs { left: 236px; }
}

/* Narrow screens: the opened nav becomes a proper side drawer.
   backdrop-filter/transform on the header creates a containing block for
   position:fixed descendants — it must go or the drawer traps inside it. */
@media (max-width: 820px) {
    html.standalone .site-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
        will-change: auto;
    }
    html.standalone .site-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: min(280px, 82vw);
        height: auto;
        max-height: none;
        overflow-y: auto;
        padding: 78px 14px 18px;
        background: var(--surface);
        border-right: 1px solid var(--line);
        box-shadow: 24px 0 64px rgba(90, 32, 8, 0.28);
        flex-direction: column;
        gap: 4px;
        z-index: 40;
    }
    html.standalone .site-nav .nav-link { display: block; padding: 12px 14px; border-radius: 12px; font-size: 15px; }
    /* Groups stay accordions: caret restored, panel expands inline on tap. */
    html.standalone .nav-group-panel {
        position: static;
        min-width: 0;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 2px 0 0 14px;
    }
    html.standalone .site-footer { padding-bottom: 30px; }
}

/* Anchor targets land below the fixed header. */
[id] { scroll-margin-top: 84px; }

/* Dim + scroll-lock behind the open mobile/PWA nav drawer; tap-outside
   close is wired in app.js. z-index 29 sits under .site-header (30), which
   carries the drawer itself. */
body.nav-drawer-open { overflow: hidden; }
body.nav-drawer-open::after {
    content: "";
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0; /* edge fallback for inset (iOS <14.1) */
    inset: 0;
    background: rgba(28, 9, 5, 0.45);
    z-index: 29;
}

/* Credits chip in the header (visible only when the wallet is enabled). */
.credits-pill { border-color: var(--gold); color: var(--indigo); font-weight: 800; }

/* Clickable account avatar — same letter chip, now an account link. */
a.user-chip { text-decoration: none; cursor: pointer; }
a.user-chip:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,148,63,.25); }

/* Store-style install badges on the guest homepage. */
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.store-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: #14100c; color: #fff; border-radius: 12px;
    padding: 10px 18px; text-decoration: none;
    border: 1px solid rgba(255,255,255,.14);
    transition: transform .18s ease, box-shadow .18s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(24,10,4,.35); }
.store-badge svg { width: 26px; height: 26px; flex: 0 0 auto; }
.store-badge span { display: grid; line-height: 1.15; text-align: left; }
.store-badge small { font-size: 9.5px; letter-spacing: .06em; opacity: .85; }
.store-badge strong { font-size: 15px; font-weight: 700; }

/* /tools cards — themed panels instead of bare white pills. */
.metric-grid > a.tool-card, a.tool-card {
    display: grid; gap: 7px; align-content: start;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; padding: 18px 20px; text-decoration: none;
    color: var(--ink); box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--gold);
    transition: transform .2s var(--spring), box-shadow .2s ease, border-color .18s ease;
}
a.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
a.tool-card p { margin: 0; font-weight: 700; font-size: 15px; color: var(--indigo); }
a.tool-card p span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; margin-right: 7px; border-radius: 9px;
    background: var(--gold-light); color: var(--gold); font-size: 14px;
    vertical-align: -2px;
}
a.tool-card small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* Sign-out + language live at the drawer's foot in app mode. */
.nav-rail-extra { display: none; }

@media (max-width: 820px) {
    html.standalone .nav-rail-extra {
        display: block;
        margin-top: auto;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }
}

/* In app mode Sign out + language live in the drawer foot — not the bar.
   The credits chip (also .lang-pill) and theme toggle stay on top. */
@media (max-width: 820px) {
    html.standalone .header-right .nav-logout,
    html.standalone .header-right .lang-pill:not(.credits-pill) { display: none; }
}

/* Keep the drawer's foot links clear of the floating Support button. */
@media (max-width: 820px) {
    html.standalone .nav-rail-extra { padding-bottom: 84px; }
}

/* ---------------------------------------------------------------------
   Installed app on a phone: the marketing-style hero reads as a website
   landing page, so both hero banners become compact app-header cards —
   greeting + chips + an action grid for the dashboard, and a dark title
   card with glass stat tiles for the kundali report.
--------------------------------------------------------------------- */
@media (max-width: 820px) {
    html.standalone .hero-compact {
        display: block;
        margin: 8px 0 4px;
        padding: 20px 18px;
        border-radius: 22px;
        background:
            radial-gradient(320px 220px at 90% -20%, rgba(232, 181, 94, 0.22), transparent 60%),
            linear-gradient(150deg, #57180E 0%, #1C0905 100%);
        color: #FDF6E9;
        box-shadow: var(--shadow-lg);
    }
    html.standalone .hero-compact::before { display: none; }
    html.standalone .hero-compact .eyebrow-pill,
    html.standalone .report-hero-banner .eyebrow-pill {
        padding: 5px 11px;
        font-size: 9px;
        letter-spacing: 0.12em;
        margin-bottom: 10px;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.16);
        color: #F3E9D2;
    }
    html.standalone .hero-compact h1 {
        font-size: 24px;
        line-height: 1.15;
        letter-spacing: -0.02em;
        background: none;
        color: #FFF7EC;
    }
    html.standalone .hero-compact .lead {
        font-size: 13.5px;
        line-height: 1.5;
        margin: 8px 0 12px;
        color: rgba(255, 255, 255, 0.72);
    }
    html.standalone .hero-compact .lead a { color: #F7CE7E; }
    html.standalone .hero-compact .hero-notes {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 2px;
        color: rgba(255, 255, 255, 0.85);
        scrollbar-width: none;
    }
    html.standalone .hero-compact .hero-notes::-webkit-scrollbar { display: none; }
    html.standalone .hero-compact .hero-notes a {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        font-size: 12px;
    }
    html.standalone .hero-compact .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 14px;
    }
    html.standalone .hero-compact .hero-actions a {
        width: 100%;
        min-height: 46px;
        padding: 11px 8px;
        font-size: 13.5px;
        justify-content: center;
    }
    html.standalone .hero-compact .hero-actions .button-gold { grid-column: 1 / -1; }
    html.standalone .hero-compact .hero-actions .button-secondary {
        background: rgba(255, 255, 255, 0.09);
        border-color: rgba(255, 255, 255, 0.2);
        color: #FDF6E9;
    }
    /* The decorative astrolabe card is landing-page furniture — the app
       chrome already conveys the brand. */
    html.standalone .hero-compact .hero-card { display: none; }

    html.standalone .report-hero-banner {
        display: block;
        padding: 18px;
        border-radius: 20px;
        background:
            radial-gradient(300px 200px at 95% -30%, rgba(232, 181, 94, 0.2), transparent 60%),
            linear-gradient(150deg, #57180E 0%, #1C0905 100%);
        color: #FDF6E9;
        box-shadow: var(--shadow);
    }
    html.standalone .report-hero-banner h1 {
        font-size: 24px;
        letter-spacing: -0.02em;
        color: #FFF7EC;
    }
    html.standalone .report-hero-banner .report-sub {
        color: rgba(255, 255, 255, 0.68);
        font-size: 12px;
        line-height: 1.55;
    }
    html.standalone .report-hero-pills {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
    }
    html.standalone .report-hero-pills .hero-stat-pill {
        min-width: 0;
        padding: 9px 10px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: none;
    }
    html.standalone .report-hero-pills .hero-stat-pill small { color: #E8B55E; font-size: 9px; }
    html.standalone .report-hero-pills .hero-stat-pill strong { color: #FFF7EC; font-size: 14px; }

    html.standalone .report-header-top { gap: 8px; }
    html.standalone .report-header-top .button-chip { font-size: 12px; padding: 8px 12px; }
}

/* Call-Pandit picker dialog — opened from the centre orb of .app-tabs,
   it floats centered just above the bar. */
.callpandit-dialog {
    position: fixed;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: calc(var(--app-tabs-h, 0px) + 14px);
    z-index: 62;
    width: min(320px, calc(100vw - 36px));
    display: none;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}
.callpandit-dialog.is-open { display: block; }
.callpandit-dialog .eyebrow { margin: 0 0 10px; }
.callpandit-dialog .dlg-note { margin: 0 0 14px; font-size: 14px; color: var(--ink); }
.callpandit-dialog label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font: 600 12px/1.4 'Poppins', sans-serif;
    color: var(--muted);
}
.callpandit-dialog select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font: 500 14px/1.3 'Poppins', sans-serif;
}
.callpandit-start { width: 100%; justify-content: center; }

/* Collapsible advanced geodetic fields in the kundali form. */
.form-advanced {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--surface-subtle, var(--paper));
}
.form-advanced > summary {
    cursor: pointer;
    padding: 13px 16px;
    font: 600 12.5px/1.4 'Poppins', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    list-style: none;
}
.form-advanced > summary::before { content: '▸ '; color: var(--gold); }
.form-advanced[open] > summary::before { content: '▾ '; }
.form-advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding: 0 16px 16px;
}

/* Install-app nav item — hidden until a prompt is available (or iOS). */
.nav-install[hidden] { display: none !important; }
html.standalone .nav-install { display: none !important; }

/* =====================================================================
   App tab bar — fixed bottom navigation, icons only, every logged-in page
   ---------------------------------------------------------------------
   App chrome: visible in installed-app (standalone) mode at any width and
   on phone/tablet viewports in a plain browser. On a laptop/desktop
   browser the header nav covers the same destinations, so the bar (and
   its page-bottom padding) stay off.
   ===================================================================== */
body.has-app-tabs { padding-bottom: var(--app-tabs-h); }

@media (max-width: 980px) {
    body.has-app-tabs { --app-tabs-h: calc(60px + env(safe-area-inset-bottom, 0px)); }
}
html.standalone body.has-app-tabs { --app-tabs-h: calc(60px + env(safe-area-inset-bottom, 0px)); }

.app-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 56;
    display: none;
    align-items: stretch;
    height: var(--app-tabs-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface-glass);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(90, 32, 8, 0.1);
}

.app-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.16s ease;
}

.app-tab > svg { width: 25px; height: 25px; }
.app-tab:hover { color: var(--indigo); }
.app-tab.active { color: var(--cta); }

.app-tab.active::after {
    content: "";
    position: absolute;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    border-radius: 99px;
    background: var(--gold);
}

/* Raised centre orb — the Call-Pandit action breaks the bar's top edge. */
.app-tab-call .app-tab-orb {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    transform: translateY(-16px);
    background: linear-gradient(135deg, var(--saffron), var(--maroon));
    color: #fff;
    border: 4px solid var(--paper);
    box-shadow: 0 12px 26px rgba(123, 17, 18, 0.38);
    transition: transform 0.2s var(--spring), box-shadow 0.2s ease;
}

.app-tab-call .app-tab-orb > svg { width: 26px; height: 26px; }
.app-tab-call:hover .app-tab-orb { transform: translateY(-19px); box-shadow: 0 16px 32px rgba(123, 17, 18, 0.45); }
.app-tab-call:active .app-tab-orb { transform: translateY(-14px) scale(0.96); }

@media (max-width: 980px) { .app-tabs { display: flex; } }
html.standalone .app-tabs { display: flex; }

/* =====================================================================
   Header search — saved kundalis / matches / destinations (logged in)
   ===================================================================== */
.header-search {
    position: relative;
    flex: 0 1 280px;
    min-width: 170px;
}

.header-search .input-icon { display: block; width: 100%; }
.header-search .input-icon > svg { left: 12px; }

.header-search input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: 500 13.5px/1.4 'Poppins', 'Noto Sans Devanagari', sans-serif;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.header-search input[type="search"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 148, 63, 0.22);
}

.header-search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: min(310px, calc(100vw - 28px));
    max-height: min(430px, 62vh);
    overflow-y: auto;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 46;
}

.search-results[hidden] { display: none; }

.search-hit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink);
    transition: background 0.13s ease;
}

.search-hit:hover, .search-hit.active { background: var(--gold-light); }

.search-hit-type {
    flex-shrink: 0;
    width: 62px;
    text-align: center;
    padding: 4px 0;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--gold-surface);
    color: var(--violet);
    font: 700 9.5px/1 'Poppins', sans-serif;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.search-hit strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--indigo);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-hit small {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-hit > span:last-child { min-width: 0; }

.search-empty {
    margin: 0;
    padding: 11px 12px;
    font-size: 13px;
    color: var(--muted);
}

/* Crowded headers (the signed-in nav + utility cluster + search exceed a
   row below ~1500px): the search wraps into a full-width second row of
   the sticky bar — the app-pattern "search under the app bar". */
@media (max-width: 1500px) {
    body.has-app-tabs { --header-h: 124px; }
    body.has-app-tabs .header-inner { flex-wrap: wrap; padding-bottom: 10px; }
    body.has-app-tabs .header-search {
        order: 10;
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }
    /* Row 1 must fit brand + nav + utility cluster down to ~1000px: drop the
       install pill (duplicated in the footer and the ≤980px drawer) and the
       decorative avatar chip (account lives under More). */
    body.has-app-tabs .site-nav > .nav-install { display: none; }
    body.has-app-tabs .header-right .user-chip { display: none; }
    body.has-app-tabs .site-nav .nav-link { padding: 9px 10px; }
    .search-results { left: 0; right: 0; }
}

@media (max-width: 640px) {
    body.has-app-tabs { --header-h: 112px; }
    body.has-app-tabs [id] { scroll-margin-top: 122px; }
}

/* =====================================================================
   SEO content pages — FAQ accordions + love-calculator result
   ===================================================================== */
.faq-list { display: grid; gap: 12px; margin-top: 18px; padding: 0 4px; }
.faq-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-subtle, var(--paper));
}
.faq-item > summary {
    cursor: pointer;
    padding: 14px 18px;
    font: 600 14px/1.5 'Poppins', sans-serif;
    color: var(--ink);
    list-style: none;
}
.faq-item > summary::before { content: '▸ '; color: var(--gold); }
.faq-item[open] > summary::before { content: '▾ '; }
.faq-item > p {
    margin: 0;
    padding: 0 18px 16px 34px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.love-result { text-align: center; }
.love-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
    margin: 6px 0 10px;
}
.love-score > strong {
    font: 800 64px/1 'Montserrat', sans-serif;
    color: var(--gold);
}
.love-result .hero-actions { justify-content: center; }

/* ---------- Guest signup nudge ---------- */
.signup-prompt{position:fixed;top:0;right:0;bottom:0;left:0;inset:0;z-index:9990;display:flex;align-items:center;justify-content:center;background:rgba(24,10,4,.58);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);opacity:0;transition:opacity .26s ease}
.signup-prompt.sp-in{opacity:1}
.sp-card{position:relative;max-width:27rem;width:calc(100% - 2.5rem);background:#FDFBF4;border:1px solid rgba(200,148,63,.45);border-radius:22px;padding:2.4rem 2.1rem 1.4rem;box-shadow:0 28px 72px rgba(24,10,4,.38),0 0 0 6px rgba(200,148,63,.08);text-align:center;transform:translateY(14px) scale(.97);transition:transform .26s ease;overflow:hidden}
.sp-in .sp-card{transform:none}
.sp-glow{position:absolute;top:-5.6rem;left:50%;transform:translateX(-50%);width:12rem;height:12rem;border-radius:50%;background:radial-gradient(circle,rgba(200,148,63,.28),transparent 68%);color:#C8943F;font-size:1.7rem;display:flex;align-items:center;justify-content:center;pointer-events:none}
.sp-card h2{font-size:1.6rem;line-height:1.2;margin:.35rem 0 .8rem;color:#3B2A1A}
.sp-card .eyebrow{margin:0;color:#C8943F}
.sp-perks{list-style:none;margin:0 0 1.3rem;padding:0;text-align:left}
.sp-perks li{display:flex;gap:.6rem;align-items:baseline;color:#5a4836;font-size:.9rem;line-height:1.5;padding:.28rem 0}
.sp-perks li span{color:#C8943F;font-size:.8rem}
.sp-form{display:grid;gap:.55rem}
.sp-form input{width:100%;padding:.75rem .9rem;border:1px solid rgba(123,17,18,.22);border-radius:12px;background:#fff;color:#3B2A1A;font:inherit;font-size:.92rem}
.sp-form input:focus{outline:2px solid rgba(200,148,63,.55);border-color:#C8943F}
.sp-form .button-gold{width:100%;justify-content:center;padding:.8rem 1rem}
.sp-signin{margin:.9rem 0 0;color:#8a7a68;font-size:.83rem}
.sp-signin .text-link{color:#7B1112}
.sp-close{position:absolute;top:.7rem;right:.85rem;width:2rem;height:2rem;border:0;border-radius:50%;background:transparent;color:#8a7a68;font-size:1.3rem;line-height:1;cursor:pointer;z-index:2}
.sp-close:hover{background:rgba(123,17,18,.08);color:#3B2A1A}
.sp-later{display:inline;background:none;border:0;color:#8a7a68;font:inherit;font-size:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px;padding:0}
.sp-later:hover{color:#3B2A1A}
[data-theme="midnight"] .sp-card{background:#22140d;border-color:rgba(200,148,63,.4)}
[data-theme="midnight"] .sp-card h2{color:#F4E9D4}
[data-theme="midnight"] .sp-perks li{color:#cbb79b}
[data-theme="midnight"] .sp-form input{background:#150B07;border-color:rgba(200,148,63,.32);color:#F4E9D4}
[data-theme="midnight"] .sp-signin{color:#a08a6c}
[data-theme="midnight"] .sp-signin .text-link{color:#E0B36A}
[data-theme="midnight"] .sp-close,[data-theme="midnight"] .sp-later{color:#a08a6c}
[data-theme="midnight"] .sp-close:hover,[data-theme="midnight"] .sp-later:hover{color:#F4E9D4;background:rgba(200,148,63,.12)}
.signup-prompt[hidden]{display:none}

/* ---------- Custom credits quantity ---------- */
.pack-custom{display:flex;gap:.45rem;align-items:center}
.pack-custom input{width:4.6rem;padding:.42rem .55rem;border-radius:9px;border:1px solid rgba(123,17,18,.22);font:inherit;font-size:.85rem;background:#fff;color:#3B2A1A}
.pack-custom input:focus{outline:2px solid rgba(200,148,63,.55);border-color:#C8943F}
[data-theme="midnight"] .pack-custom input{background:#150B07;border-color:rgba(200,148,63,.32);color:#F4E9D4}

/* ---------- /go ad-traffic gate (BotKavach interstitial) ---------- */
.gate-body{min-height:100vh;min-height:100dvh;display:grid;place-items:center}
.gate-shell{text-align:center;padding:2rem}
.gate-mark{display:block;margin:0 auto 1rem}
.gate-title{margin:0 0 1.1rem;font-size:1.35rem;font-weight:700}
.gate-spinner{display:inline-block;width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--saffron);animation:gate-spin .9s linear infinite}
.gate-note{margin-top:1.2rem;color:var(--muted);font-size:.92rem}
.gate-note a{color:var(--saffron)}
@keyframes gate-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.gate-spinner{animation:none}}

/* ============================================================
   FLAT REDESIGN — appended override block
   Buttons, cards, panels, chips and inputs lose borders, shadows
   and gradients; separation comes from background contrast alone.
   Revert = delete this block (pre-change file backed up at
   backup/pre-flat-design/app.css).
   ============================================================ */
button,
[class*="card"],
[class*="panel"],
[class*="tile"],
[class*="chip"],
[class*="pill"],
[class*="badge"],
[class*="suggest"],
[class*="dropdown"],
[class*="menu"],
[class*="modal"],
[class*="prompt"],
[class*="avatar"],
[class*="banner"],
[class*="toast"],
[class*="callout"],
[class*="notice"],
[class*="flash"],
[class*="alert"],
[class*="stat"],
.eyebrow-pill,
.day-toggle,
.day-toggle a,
input,
select,
textarea {
    border: none !important;
    box-shadow: none !important;
}

/* Gradients become their base colour */
.button-gold,
.eyebrow-pill {
    background-image: none !important;
    background-color: var(--saffron) !important;
}
.button-gold:hover,
.button-chip:hover,
.kundali-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Borderless inputs need a fill or they vanish on the page wash */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.input-icon > input,
form .input-icon > select {
    background-color: var(--paper-subtle) !important;
}
[data-theme="midnight"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="midnight"] select,
[data-theme="midnight"] textarea {
    background-color: var(--ink-subtle, #2A2118) !important;
}

/* Telegram hand-off inside the support widget */
.qa-telegram{padding:8px 14px;border-top:1px solid var(--line-subtle);text-align:center}

/* Chat session meter — live timer + end button in the billing line. */
.qa-timer { font-weight: 600; color: var(--gold); }
.qa-persona-text .qa-timer { display: block; margin-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.qa-header > div > .qa-timer { display: inline-block; margin-top: 2px; font-size: 12px; }
.qa-end-btn {
    border: 1px solid rgba(200, 148, 63, 0.5);
    background: none;
    color: #79571b;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 11px;
    cursor: pointer;
}
.qa-end-btn:hover { background: var(--gold); color: #fff; }
.qa-end-btn:disabled { opacity: 0.5; cursor: default; }

/* =====================================================================
   Astrotalk-style chat reskin — top credit bar, avatar-dot header,
   timestamped bubbles, collapsible kundali drawer.
   ===================================================================== */
.kundali-qa { display: flex; flex-direction: column; background: #FDFBF7; border-left: 1px solid #EAE3D2; }

/* --- top status bar --- */
.qa-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 12px; background: linear-gradient(90deg, #F4EBD5, #FDFBF7);
    border-bottom: 1px solid #EEDFCD; flex: 0 0 auto;
}
.qa-topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qa-credits-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: #FFF3E0; border: 1px solid #FFCC80; border-radius: 999px;
    padding: 3px 10px; font-size: 11.5px; color: #3A2E2B; white-space: nowrap;
}
.qa-credits-pill .qa-coin { width: 14px; height: 14px; color: #B45309; }
.qa-credits-pill strong { font-size: 12px; }
.qa-credits-pill small { font-size: 10px; color: #92400E; font-weight: 500; }
.qa-topbar-rates { font-size: 10px; color: #8C7B75; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-topbar-right { display: flex; align-items: center; gap: 8px; }
.qa-kundali-btn {
    font: 600 11px/1 inherit; font-family: inherit; cursor: pointer;
    color: #D9531E; background: rgba(217,83,30,.10); border: 0;
    border-radius: 999px; padding: 6px 10px; transition: background .15s ease;
}
.qa-kundali-btn:hover { background: rgba(217,83,30,.20); }
.qa-topup-btn {
    font: 700 11px/1 inherit; font-family: inherit; text-decoration: none;
    color: #fff; background: linear-gradient(160deg, #D9531E, #C0392B);
    border-radius: 999px; padding: 7px 12px; letter-spacing: .4px;
    box-shadow: 0 3px 8px rgba(192,57,43,.35);
}
.qa-topup-btn:hover { opacity: .93; }

/* --- astrologer header --- */
.kundali-qa .qa-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-bottom: 1px solid #EAE3D2; background: #FDFBF7; flex: 0 0 auto;
}
.qa-persona { align-items: center; gap: 10px; }
.qa-avatar-wrap { position: relative; flex: 0 0 auto; display: inline-flex; }
.qa-avatar-wrap .qa-avatar-img { width: 44px; height: 44px; border: 2px solid #D9531E; }
.qa-dot {
    position: absolute; bottom: 0; right: 0; width: 11px; height: 11px;
    background: #10B981; border: 2px solid #fff; border-radius: 50%;
}
.qa-persona-text h2 { display: flex; align-items: center; gap: 5px; font-size: 15.5px; }
.qa-tick { color: #3B82F6; font-size: 11px; font-weight: 700; }
.qa-tagline { margin: 1px 0 0; font-size: 11px; color: #8C7B75; }
.qa-persona-text .qa-online { color: #059669; font-size: 10px; }
.qa-persona-text .qa-online::before { content: none; }

/* --- work area: messages + drawer --- */
.qa-work { flex: 1; position: relative; display: flex; min-height: 0; overflow: hidden; background: linear-gradient(180deg, #FDFBF7, #F9F5EC); }
.qa-messages { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 12px; background: none; }

/* --- kundali drawer --- */
.qa-drawer {
    position: absolute; top: 0; bottom: 0; left: 0; z-index: 6;
    width: min(272px, 86%); background: #FFFDF9; border-right: 1px solid #EAE3D2;
    box-shadow: 10px 0 30px rgba(58,46,43,.12);
    transform: translateX(-105%); transition: transform .3s ease;
    display: flex; flex-direction: column;
}
.qa-drawer.open { transform: translateX(0); }
.qa-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; background: #F4EBD5; border-bottom: 1px solid #EAE3D2;
}
.qa-drawer-h { margin: 0; font-size: 12px; font-weight: 700; color: #3A2E2B; }
.qa-drawer-body { padding: 14px; overflow-y: auto; display: grid; gap: 12px; font-size: 12px; }
.qa-drawer-card { background: #F9F5EC; border: 1px solid #EAE3D2; border-radius: 10px; padding: 10px 12px; }
.qa-drawer-card .qa-drawer-h { color: #D9531E; margin-bottom: 6px; }
.qa-drawer-card dl { display: grid; gap: 4px; }
.qa-drawer-card dt { font-size: 10.5px; color: #8C7B75; }
.qa-drawer-card dd { margin: 0; font-size: 12px; color: #3A2E2B; }
.qa-drawer-dasha { background: #FFFBEB; border-color: #FDE68A; }
.qa-drawer-dasha .qa-drawer-h { color: #92400E; }
.qa-drawer-link { font-size: 12px; color: #D9531E; font-weight: 600; text-decoration: none; }

/* --- message bubbles --- */
.qa-messages .qa-msg { display: flex; align-items: flex-end; gap: 7px; max-width: 90%; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.qa-messages .qa-msg-assistant { margin-right: auto; }
.qa-messages .qa-msg-user { margin-left: auto; flex-direction: row-reverse; }
.qa-msg-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid #D9531E; flex: 0 0 auto; }
.qa-msg .qa-bub {
    padding: 9px 12px; font-size: 13.5px; line-height: 1.55; color: #3A2E2B;
    border-radius: 16px; box-shadow: 0 1px 2px rgba(58,46,43,.08); min-width: 0;
}
.qa-msg-assistant .qa-bub { background: #F5EBE0; border: 1px solid #E6D5C3; border-bottom-left-radius: 4px; }
.qa-msg-user .qa-bub { background: #D9531E; color: #fff; border-bottom-right-radius: 4px; }
.qa-msg-error .qa-bub { background: #FDECEC; border: 1px solid #f5c0c0; color: #8f1d1d; }
.qa-msg-pending .qa-bub { background: #F5EBE0; border: 1px solid #E6D5C3; color: #8C7B75; font-style: italic; }
.qa-msg .qa-bub p { margin: 0; white-space: pre-wrap; }
.qa-msg .qa-bub p + p, .qa-msg .qa-bub p + ul, .qa-msg .qa-bub ul + p, .qa-msg .qa-bub h3 + p, .qa-msg .qa-bub h4 + p { margin-top: 7px; }
.qa-msg .qa-bub ul { margin: 7px 0 0; padding-left: 17px; }
.qa-msg .qa-bub li { margin-bottom: 3px; }
.qa-msg-user .qa-bub strong, .qa-msg-user .qa-bub h3, .qa-msg-user .qa-bub h4 { color: #fff; }
.qa-time { display: block; font-size: 9.5px; color: #8C7B75; text-align: right; margin-top: 3px; }
.qa-msg-user .qa-time { color: rgba(255,255,255,.85); }

/* --- centred session notes --- */
.qa-note {
    align-self: center; margin: 4px auto; max-width: none;
    background: rgba(234,227,210,.65); color: #8C7B75;
    font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 14px; border-radius: 999px; text-align: center;
}

/* --- control + composer --- */
.kundali-qa .qa-live { padding: 8px 12px 0; background: none; border: 0; }
.kundali-qa .qa-form { padding: 8px 12px 12px; border-top: 1px solid #EAE3D2; background: #FDFBF7; }
.kundali-qa .qa-input-row { display: flex; align-items: center; gap: 8px; }
.kundali-qa .qa-input-row textarea {
    flex: 1; resize: none; border: 1px solid #EAE3D2; border-radius: 999px;
    background: #F9F5EC; padding: 10px 16px; font: inherit; font-size: 13px;
    color: #3A2E2B; max-height: 90px; line-height: 1.4;
}
.kundali-qa .qa-input-row textarea:focus { outline: none; border-color: #D9531E; box-shadow: 0 0 0 3px rgba(217,83,30,.18); }
.kundali-qa .qa-send {
    width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: linear-gradient(160deg, #D9531E, #C0392B); color: #fff;
    font-size: 15px; cursor: pointer; box-shadow: 0 3px 8px rgba(192,57,43,.35);
}
.kundali-qa .qa-send:hover { opacity: .93; }
.kundali-qa .qa-send:disabled { opacity: .55; cursor: default; }

/* Fallback: legacy messages rendered without a .qa-bub wrapper still get
   the bubble look (support panel variants, future producers). */
.qa-messages .qa-msg:not(:has(.qa-bub)) {
    padding: 9px 12px; font-size: 13.5px; line-height: 1.55; color: #3A2E2B;
    border-radius: 16px; box-shadow: 0 1px 2px rgba(58,46,43,.08);
}
.qa-messages .qa-msg-assistant:not(:has(.qa-bub)) { background: #F5EBE0; border: 1px solid #E6D5C3; border-bottom-left-radius: 4px; }
.qa-messages .qa-msg-user:not(:has(.qa-bub)) { background: #D9531E; color: #fff; border-bottom-right-radius: 4px; }
.qa-messages .qa-msg-error:not(:has(.qa-bub)) { background: #FDECEC; border: 1px solid #f5c0c0; color: #8f1d1d; }
.qa-messages .qa-msg-pending:not(:has(.qa-bub)) { background: #F5EBE0; border: 1px solid #E6D5C3; color: #8C7B75; font-style: italic; }

/* Chat-top tweaks: icon-only Kundali toggle, compact TOP UP, single-line
   composer that grows to two lines max. */
.qa-kundali-btn { padding: 6px 8px; font-size: 13px; }
.qa-topup-btn { font-size: 10px; padding: 5px 9px; }
.kundali-qa .qa-input-row textarea {
    height: 40px; min-height: 40px; max-height: 58px;
    overflow-y: hidden; white-space: pre-wrap;
}

/* Top-bar polish: bare Kundali glyph (no pill background/padding) and
   smaller language dropdowns in the control bar. */
.qa-kundali-btn { background: none; padding: 0 4px; font-size: 15px; }
.qa-kundali-btn:hover { background: none; opacity: .75; }
.kundali-qa .qa-lang { font-size: 11px; padding: 3px 8px; }
.kundali-qa .qa-langpick, .kundali-qa .qa-lang-sm { font-size: 11px; }

/* Slimmer top strip — tighter vertical padding across its pieces. */
.qa-topbar { padding: 4px 10px; }
.qa-credits-pill { padding: 2px 8px; font-size: 11px; }
.qa-topup-btn { padding: 4px 9px; }

/* Ultra-slim top strip + compact bottom control/composer rows. */
.qa-topbar { padding: 3px 10px; }
.kundali-qa .qa-live { padding: 6px 10px 0; gap: 8px; }
.kundali-qa .qa-live-btn { font-size: 11px; padding: 4px 10px; }
.kundali-qa .qa-langpick { font-size: 10.5px; }
.kundali-qa .qa-lang { font-size: 10.5px; padding: 2px 6px; }
.kundali-qa .qa-form { padding: 6px 10px 9px; }
.kundali-qa .qa-input-row textarea { height: 36px; min-height: 36px; padding: 7px 14px; font-size: 12.5px; }
.kundali-qa .qa-send { width: 36px; height: 36px; font-size: 13px; }

/* Restore composer height; slim the Call/language controls bar instead. */
.kundali-qa .qa-live { padding: 4px 10px 0; gap: 6px; }
.kundali-qa .qa-live-btn { font-size: 10.5px; padding: 3px 9px; }
.kundali-qa .qa-langpick { font-size: 10px; }
.kundali-qa .qa-lang { font-size: 10px; padding: 2px 5px; }
.kundali-qa .qa-form { padding: 7px 12px 11px; }
.kundali-qa .qa-input-row textarea { height: 40px; min-height: 40px; padding: 9px 16px; font-size: 13px; }
.kundali-qa .qa-send { width: 40px; height: 40px; font-size: 15px; }

/* Second slimming pass: ~30% off the credit/top-up strip, ~20% off the
   astrologer header bar. */
.qa-topbar { padding: 2px 8px; }
.qa-credits-pill { padding: 1px 7px; font-size: 10px; }
.qa-topbar-rates { font-size: 9.5px; gap: 6px; }
.qa-topup-btn { font-size: 9.5px; padding: 3px 8px; }
.kundali-qa .qa-header { padding: 7px 12px; }
.qa-avatar-wrap .qa-avatar-img { width: 38px; height: 38px; }
.qa-dot { width: 10px; height: 10px; }
.qa-persona-text h2 { font-size: 14.5px; }
.qa-tagline { font-size: 10px; }
.qa-persona-text .qa-timer { font-size: 10.5px; }

/* Instagram-style verified badge on the astrologer name. */
.qa-tick {
    display: inline-grid; place-items: center;
    width: 14px; height: 14px; border-radius: 50%;
    background: #3897F0; color: #fff;
    font-size: 8.5px; line-height: 1; margin-top: 1px;
}

/* WhatsApp-style header call button — 📞 icon pops a language+start menu. */
.kundali-qa .qa-header { gap: 8px; }
.qa-head-left { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.qa-head-meta { display: flex; align-items: center; gap: 8px; }
.qa-head-meta .qa-langpick { font-size: 10px; }
.qa-head-meta .qa-lang { font-size: 10px; padding: 2px 6px; }
.qa-head-meta .qa-timer { display: inline-block; }

.qa-live.qa-callpop { position: relative; flex: 0 0 auto; padding: 0; border: 0; background: none; }
.qa-call-popbtn {
    width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(217,83,30,.10); color: #D9531E;
    display: inline-grid; place-items: center; transition: background .15s ease;
}
.qa-call-popbtn svg { width: 16px; height: 16px; }
.qa-call-popbtn:hover { background: rgba(217,83,30,.22); }
.qa-callpop-menu {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 9;
    background: #FFFDF9; border: 1px solid #EAE3D2; border-radius: 14px;
    box-shadow: 0 12px 28px rgba(58,46,43,.18); padding: 10px;
    flex-direction: column; gap: 8px; min-width: 176px;
}
.qa-callpop.open .qa-callpop-menu { display: flex; }
/* While a call runs the menu stays open so status/timer/Done stay visible. */
.qa-live.qa-callpop:has(.qa-live-on) .qa-callpop-menu { display: flex; }
.qa-callpop-menu .qa-langpick { width: 100%; }
.qa-callpop-menu .qa-lang { width: 100%; font-size: 11px; padding: 5px 8px; }
.qa-callpop-menu .qa-live-cta { font-size: 11.5px; padding: 7px 12px; border-radius: 10px; }
.qa-callpop-menu .qa-call-face { display: grid; justify-items: center; gap: 4px; }

/* Bare language selects — no icons, no padding, transparent; red Call CTA
   centred inside the header popdown. */
.qa-langpick-bare { background: transparent; padding: 0; border: 0; gap: 0; }
.qa-langpick-bare .qa-lang { background: transparent; border: 0; padding: 0; }
.qa-callpop-menu .qa-live-cta {
    background: linear-gradient(160deg, #D9531E, #C0392B); color: #fff;
    border: 0; border-radius: 999px; padding: 8px 14px;
    font-size: 12px; font-weight: 700; text-align: center; width: 100%;
    justify-content: center; display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 3px 8px rgba(192,57,43,.3);
}

/* Truly bare language selects + centred pop dropdown + 30% smaller timer. */
.kundali-qa .qa-langpick-bare {
    background: transparent !important; border: 0 !important;
    padding: 0 !important; box-shadow: none !important;
}
.kundali-qa .qa-langpick-bare .qa-lang {
    background: transparent !important; border: 0 !important;
    box-shadow: none !important; padding: 0 !important;
}
.qa-callpop-menu .qa-langpick-bare { display: block; width: 100%; text-align: center; }
.qa-callpop-menu .qa-langpick-bare .qa-lang { text-align: center; text-align-last: center; }
.qa-head-meta .qa-timer { font-size: 8px; }

/* Composer image attach — 📎 button + thumbnail preview chip + bubble img. */
.kundali-qa .qa-attach {
    width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 50%;
    background: rgba(217,83,30,.10); color: #D9531E; font-size: 15px; cursor: pointer;
}
.kundali-qa .qa-attach:hover { background: rgba(217,83,30,.22); }
.qa-attach-preview { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.qa-attach-preview img { width: 34px; height: 34px; object-fit: cover; border-radius: 9px; border: 1px solid #E6D5C3; }
.qa-attach-preview button { border: 0; background: #EDE3D4; color: #8C7B75; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; cursor: pointer; line-height: 1; }
.qa-msg .qa-bub .qa-msg-img { display: block; max-width: 220px; border-radius: 10px; margin-bottom: 6px; }

/* 60px attachment preview strip above the composer. */
.qa-strip { display: flex; gap: 6px; padding: 6px 12px 0; overflow-x: auto; }
.qa-thumb { position: relative; flex: 0 0 auto; width: 60px; height: 60px; }
.qa-thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 9px; border: 1px solid #E6D5C3; display: block; }
.qa-thumb button {
    position: absolute; top: -5px; right: -5px; width: 16px; height: 16px;
    border-radius: 50%; border: 0; background: #3A2E2B; color: #fff;
    font-size: 10px; line-height: 1; cursor: pointer;
}
.qa-msg .qa-bub .qa-msg-img { display: inline-block; width: 90px; height: 90px; object-fit: cover; border-radius: 10px; margin: 0 4px 6px 0; }

/* Strip visibility fix — explicit .show class (hidden attr vs author
   display:flex was unreliable), and the picker is visually hidden rather
   than display:none so mobile browsers always honour the .click(). */
.qa-strip { display: none; }
.qa-strip.show { display: flex; }
.qa-file-hid { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* Palmistry page — the chat panel rendered as a page, not a drawer. */
.qa-page { position: static; transform: none; inset: auto; width: 100%; max-width: 760px; margin: 0 auto 30px; height: auto; max-height: none; border: 1px solid #EAE3D2; border-radius: 20px; box-shadow: 0 10px 30px rgba(58,46,43,.10); overflow: hidden; }
.qa-page .qa-messages { max-height: 62vh; max-height: 62dvh; }
.qa-palm-cost { margin: 0; padding: 0 14px 10px; font-size: 10.5px; color: #8C7B75; }
.qa-palm-lang { font-size: 10.5px; max-width: 96px; }

/* The palmistry page reuses the sidebar skin but is always visible —
   the :not(.open) hide rule must not apply to it. */
.kundali-qa.qa-page:not(.open) { visibility: visible; transform: none; }

/* Kundali chat: replace rate chips with language + session timer in the
   compact balance strip. */
.kundali-qa .qa-topbar { gap: 5px; }
.kundali-qa .qa-topbar-left { flex: 1 1 auto; gap: 8px; }
.qa-chat-meta { display: flex; align-items: center; gap: 7px; min-width: 0; }
.qa-chat-meta .qa-langpick-bare { flex: 0 1 auto; }
.qa-chat-meta .qa-lang { font-size: 10px; line-height: 1.2; }
.qa-chat-meta .qa-timer { color: #98642f; font-size: 10px; font-weight: 700; white-space: nowrap; }
.qa-chat-meta [data-qa-minutes] { display: none !important; }
@media (max-width: 390px) {
    .kundali-qa .qa-topbar { padding-left: 6px; padding-right: 6px; gap: 4px; }
    .kundali-qa .qa-topbar-left { gap: 5px; }
    .qa-chat-meta { gap: 4px; }
    .qa-topbar-right { gap: 5px; }
    .qa-credits-pill { padding-left: 6px; padding-right: 6px; }
}

/* Thinner Kundali status strip and clear rate notes at the foot of each
   call/chat launcher popover. */
.kundali-qa .qa-topbar { padding: 1px 6px; margin: 0; min-height: 0; }
.kundali-qa .qa-topbar-left { gap: 6px; }
.kundali-qa .qa-credits-pill { padding: 1px 6px; }
.kundali-qa .qa-topup-btn { padding: 3px 7px; }
.qa-pop-rate {
    display: block; width: 100%; box-sizing: border-box;
    margin: 2px 0 0; padding: 7px 4px 1px;
    border-top: 1px solid #EAE3D2; color: #8C7B75;
    font-size: 10px; font-weight: 600; text-align: center;
}
.qa-callpop-menu .qa-pop-rate { margin-top: 1px; }
.callpandit-dialog .qa-pop-rate { margin-top: 10px; }

/* Fix: the header call popdown was hiding the call UI inside the mobile
   fullscreen call screen — while .qa-live-call is active the menu must be
   visible and unboxed (no popover chrome). */
.qa-live.qa-callpop.qa-live-call .qa-callpop-menu {
    display: flex; position: static; top: auto; right: auto;
    width: 100%; min-width: 0; padding: 0; border: 0; box-shadow: none;
    background: none; align-items: center; gap: 14px;
}
.qa-live.qa-callpop.qa-live-call .qa-call-popbtn,
.qa-live.qa-callpop.qa-live-call .qa-callpop-menu > .qa-langpick,
.qa-live.qa-callpop.qa-live-call .qa-pop-rate { display: none; }

/* Call-pop wrapper was overriding the fullscreen call screen (equal
   specificity, later source order) — restore the overlay's layout while
   the node carries .qa-callpop. */
.qa-live.qa-callpop.qa-live-call {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 300;
    flex-direction: column; align-items: center; justify-content: center; gap: 20px;
    padding: calc(40px + env(safe-area-inset-top, 0px)) 24px calc(40px + env(safe-area-inset-bottom, 0px));
    background: radial-gradient(130% 100% at 50% 0%, #4A140E 0%, #33160D 52%, #1A0C06 100%);
}

/* Call-screen controls (mock): LIVE badge, voice waves, control bar, toast. */
.qa-live-badge { display:none; }
.qa-live-call .qa-live-badge {
    display:inline-flex; align-items:center; gap:5px; margin-top:6px;
    background:#34C759; color:#0B2413; font-size:10px; font-weight:800;
    letter-spacing:.6px; border-radius:999px; padding:3px 10px;
}
.qa-live-badge i { width:7px;height:7px;border-radius:50%;background:#0B2413;animation:qa-blink 1.4s infinite; }
@keyframes qa-blink { 0%,100%{opacity:1} 50%{opacity:.25} }
.qa-call-waves { display:none; gap:3px; justify-content:center; align-items:flex-end; height:22px; }
.qa-live-call .qa-call-waves { display:flex; }
.qa-call-waves b { width:3px; border-radius:2px; background:#E9B44C; animation:qa-wave 1.1s infinite ease-in-out; }
.qa-call-waves b:nth-child(2){animation-delay:.18s} .qa-call-waves b:nth-child(3){animation-delay:.36s} .qa-call-waves b:nth-child(4){animation-delay:.54s}
@keyframes qa-wave { 0%,100%{height:6px} 50%{height:20px} }
.qa-call-ctrls { display:none; }
.qa-live-call .qa-call-ctrls {
    display:flex; justify-content:center; align-items:center; gap:22px;
    background:rgba(0,0,0,.22); border:1px solid rgba(255,255,255,.10);
    border-radius:18px; padding:12px 18px;
    backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
}
.qa-ctl { display:flex; flex-direction:column; align-items:center; gap:5px; border:0; background:none; cursor:pointer; color:#E9E2DA; font-size:10.5px; font-weight:600; }
.qa-ctl .qa-live-icon { width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.10);display:inline-grid;place-items:center;font-size:17px;transition:background .15s ease,transform .12s ease; }
.qa-ctl:active .qa-live-icon { transform:scale(.92); }
.qa-ctl[aria-pressed="true"] .qa-live-icon { background:#D4AF37; }
.qa-ctl-rec.on .qa-live-icon { background:#C82333; animation:qa-recpulse 1.6s infinite; }
@keyframes qa-recpulse { 0%,100%{box-shadow:0 0 0 0 rgba(200,35,51,.45)} 60%{box-shadow:0 0 0 12px rgba(200,35,51,0)} }
.qa-live-toast { position:fixed; top:64px; left:50%; transform:translateX(-50%); z-index:310; background:rgba(20,10,10,.92); border:1px solid rgba(212,175,55,.35); color:#E9B44C; font-size:11px; font-weight:600; padding:8px 16px; border-radius:999px; opacity:0; pointer-events:none; transition:opacity .25s ease; white-space:nowrap; }
.qa-live-toast.show { opacity:1; }
.qa-live-call .qa-live-send { width:100%; padding:15px; border-radius:999px; border:0; font-weight:800; font-size:15px; color:#201402; background:linear-gradient(90deg,#C89B3C,#D4AF37,#DFBC52); box-shadow:0 8px 22px rgba(212,175,55,.28); }
.qa-live-call .qa-live-cta { width:100%; padding:15px; font-size:15px; }
.qa-live-call .qa-call-avatar, .qa-live-call .qa-call-avatar-img { box-shadow:0 0 0 5px rgba(212,175,55,.85), 0 0 0 10px rgba(212,175,55,.18); }
.qa-live-call[data-tone="listening"] .qa-call-avatar, .qa-live-call[data-tone="speaking"] .qa-call-avatar { animation:qa-avatar-pulse 2.4s infinite ease-in-out; }
@keyframes qa-avatar-pulse { 0%{box-shadow:0 0 0 5px rgba(212,175,55,.85),0 0 0 10px rgba(212,175,55,.18)} 60%{box-shadow:0 0 0 5px rgba(212,175,55,.85),0 0 0 26px rgba(212,175,55,0)} 100%{box-shadow:0 0 0 5px rgba(212,175,55,.85),0 0 0 10px rgba(212,175,55,.18)} }

/* Align the call screen to the reference mock: LIVE pill pinned top-right,
   wave badge floating under the avatar, status dot, bottom control cluster. */
.qa-live-call .qa-callpop-menu { flex: 1; width: 100%; justify-content: flex-start; }
.qa-live-call .qa-call-face { position: relative; }
.qa-live-call .qa-live-badge { position: absolute; top: -8px; right: 0; margin: 0; }
.qa-live-call .qa-call-waves {
    margin-top: -15px; background: rgba(37,14,14,.92);
    border: 1px solid rgba(233,180,76,.45); border-radius: 999px;
    padding: 5px 11px; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.qa-live-call .qa-live-status { display:flex; align-items:center; gap:7px; justify-content:center; }
.qa-live-call .qa-live-status::before {
    content:""; width:8px; height:8px; border-radius:50%;
    background:#E9B44C; animation:qa-blink 1.2s infinite;
}
.qa-live-call .qa-call-timer { font-size:26px; font-weight:700; letter-spacing:2px; color:#EDE4D6; font-variant-numeric:tabular-nums; }
.qa-live-call .qa-call-ctrls { margin-top: auto; margin-bottom: 10px; width: min(340px, 100%); }
.qa-live-call .qa-call-controls { width: min(340px, 100%); }
.qa-live-call .qa-live-cta { width: min(340px, 100%); }
.qa-live-call .qa-live-cta.qa-live-on { background: linear-gradient(160deg,#C82333,#B01E2B); }

/* SVG icon sizing for the call control buttons. */
.qa-ctl .qa-live-icon svg { width:19px; height:19px; }
.qa-live-icon svg { display:block; }

/* Bubble copy affordance: tap/hold feedback + Copied pill. */
.qa-bub { position: relative; cursor: pointer; }
.kundali-qa .qa-bub::after {
    content: "⧉"; position: absolute; top: 4px; right: 6px;
    font-size: 11px; opacity: 0; transition: opacity .15s ease; color: #8C7B75;
}
.kundali-qa .qa-bub:hover::after { opacity: .7; }
.qa-copied { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: #2B1E18; color: #F3E5AB; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; z-index: 5; }

/* Call recordings embedded in chat bubbles. */
.qa-msg-audio { width: 100%; max-width: 230px; height: 34px; display: block; margin: 2px 0 4px; }

/* Call screen — mock-accurate layout + unmistakable toggle states. */
.qa-live-call .qa-call-avatar, .qa-live-call .qa-call-avatar-img { width:118px; height:118px; }
.qa-live-call .qa-call-face { display:grid; justify-items:center; }
.qa-live-call .qa-call-face > .qa-call-avatar, .qa-live-call .qa-call-face > .qa-call-avatar-img { grid-row:1; }
.qa-live-call .qa-call-waves { grid-row:2; margin-top:-14px; z-index:2; }
.qa-live-call .qa-call-name { grid-row:3; margin-top:6px; }
.qa-live-call .qa-call-role { grid-row:4; }
.qa-live-call .qa-live-status { grid-row:5; }
.qa-live-call .qa-call-timer { grid-row:6; }
.qa-live-call .qa-live-badge { position:fixed; top:16px; right:16px; }
.qa-ctl .qa-live-icon { transition:background .18s ease, box-shadow .18s ease, transform .12s ease; }
.qa-ctl[aria-pressed="true"] .qa-live-icon { background:#D4AF37; color:#231603; box-shadow:0 0 0 4px rgba(212,175,55,.28), 0 4px 14px rgba(212,175,55,.35); }
.qa-ctl[aria-pressed="true"] span { color:#E9B44C; }
.qa-ctl-rec.on .qa-live-icon { color:#fff; }
.qa-ctl:active .qa-live-icon { transform:scale(.9); }

/* Call screen: hide Done-speaking (VAD still auto-commits turns) and stop
   the wave badge clipping the role text — it must tuck under the avatar. */
.qa-live-call .qa-call-controls { display: none !important; }
.qa-live.qa-callpop.qa-live-call .qa-call-face { display: grid; justify-items: center; }
.qa-live.qa-callpop.qa-live-call .qa-call-face > .qa-call-avatar, .qa-live.qa-callpop.qa-live-call .qa-call-face > .qa-call-avatar-img { grid-row: 1; }
.qa-live.qa-callpop.qa-live-call .qa-call-face .qa-call-waves { grid-row: 2; margin-top: -12px; z-index: 2; }
.qa-live.qa-callpop.qa-live-call .qa-call-face .qa-call-name { grid-row: 3; margin-top: 8px; }
.qa-live.qa-callpop.qa-live-call .qa-call-face .qa-call-role { grid-row: 4; }
.qa-live.qa-callpop.qa-live-call .qa-call-face .qa-live-status { grid-row: 5; }
.qa-live.qa-callpop.qa-live-call .qa-call-face .qa-call-timer { grid-row: 6; }

/* WhatsApp-style voice note inside chat bubbles. */
.qa-voice {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px; padding: 6px 12px 6px 6px; margin: 2px 0 4px;
    min-width: 190px;
}
.qa-voice-play {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; border: 0;
    background: #FFF7E8; color: #B8431B; cursor: pointer;
    display: inline-grid; place-items: center;
}
.qa-voice-play svg { width: 15px; height: 15px; }
.qa-voice-track {
    flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.30);
    position: relative; overflow: hidden;
}
.qa-voice-track i { position: absolute; inset: 0 auto 0 0; width: 0; background: #FFF3D6; border-radius: 2px; transition: width .2s linear; }
.qa-voice-time { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.92); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qa-msg-assistant .qa-voice { background: rgba(120,72,32,.10); border-color: #E6DAC4; }
.qa-msg-assistant .qa-voice-play { background: #D9531E; color: #FFF7E8; }
.qa-msg-assistant .qa-voice-track { background: #E6DAC4; }
.qa-msg-assistant .qa-voice-track i { background: #D9531E; }
.qa-msg-assistant .qa-voice-time { color: #8C7B75; }

/* Voice-note kebab menu (download). */
.qa-voice { position: relative; }
.qa-voice-kebab {
    border: 0; background: none; cursor: pointer; color: rgba(255,255,255,.85);
    font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 6px;
}
.qa-msg-assistant .qa-voice-kebab { color: #8C7B75; }
.qa-voice-kebab:hover { background: rgba(255,255,255,.15); }
.qa-voice-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
    background: #FFFBF2; border: 1px solid #EAE3D2; border-radius: 10px;
    box-shadow: 0 8px 22px rgba(58,46,43,.22); overflow: hidden; min-width: 120px;
}
.qa-voice-menu.show { display: block; }
.qa-voice-menu a {
    display: block; padding: 9px 14px; font-size: 12px; font-weight: 600;
    color: #3A2E2B; text-decoration: none;
}
.qa-voice-menu a:hover { background: #F4EBD5; }

/* Voice-note waveform bars — dance to the audio; .done marks played portion. */
.qa-voice-bars { display: flex; align-items: center; gap: 2.5px; flex: 1; height: 22px; }
.qa-voice-bars i { width: 3px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.38); transition: height .12s ease; }
.qa-voice-bars i.done { background: #FFF3D6; }
.qa-msg-assistant .qa-voice-bars i { background: #DECFAF; }
.qa-msg-assistant .qa-voice-bars i.done { background: #D9531E; }

/* ================================================================
   Growth surfaces — landing teaser, pandits, voice, reviews,
   transit/festival/yearly pages, day pillars
   ================================================================ */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.live-stats{margin:0 auto 8px;padding:14px 22px;border:1px solid var(--line-subtle);border-radius:var(--radius-lg);background:var(--paper-subtle)}
.live-stats .eyebrow{margin:0 0 6px}
.live-stats-row{display:flex;flex-wrap:wrap;gap:8px 26px}
.live-stats-row span{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:14px}
.live-stats-row strong{color:var(--ink)}
.live-stats-row i{color:var(--gold);font-style:normal}

.pandit-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px;margin-bottom:8px}
.pandit-card{display:flex;flex-direction:column;gap:12px;padding:18px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper);text-decoration:none;color:inherit;transition:border-color .2s,transform .2s}
.pandit-card:hover{border-color:var(--gold);transform:translateY(-2px)}
.pandit-card-photo{width:64px;height:64px;border-radius:50%;object-fit:cover;border:2px solid var(--gold-light)}
.pandit-card-mono{display:inline-flex;width:64px;height:64px;border-radius:50%;align-items:center;justify-content:center;background:var(--gold-surface);color:var(--gold);font-size:26px;border:2px solid var(--gold-light)}
.pandit-card-info{display:flex;flex-direction:column;gap:4px}
.pandit-card-info strong{font-size:15px}
.pandit-card-info small{color:var(--muted);line-height:1.4}
.pandit-card-meta{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--gold);font-weight:600;margin-top:4px}
.pandit-card-cta{font-size:13px;font-weight:700;color:var(--cta);margin-top:auto}

.voice-band{display:flex;flex-wrap:wrap;align-items:center;gap:20px 40px;margin:32px 0;padding:30px 32px;border-radius:var(--radius-xl);background:linear-gradient(135deg,var(--maroon),var(--indigo-dark));color:#fff}
.voice-band .eyebrow{color:var(--gold-light)}
.voice-band-copy{flex:1 1 320px;min-width:260px}
.voice-band-copy h2{color:#fff;margin:4px 0 10px}
.voice-band-copy p{margin:0;color:rgba(255,255,255,.82);line-height:1.6}
.voice-band-side{display:flex;flex-direction:column;align-items:center;gap:18px}
.voice-wave{display:flex;align-items:center;gap:5px;height:44px}
.voice-wave span{width:5px;border-radius:3px;background:var(--gold-light);animation:voicewave 1.2s ease-in-out infinite}
.voice-wave span:nth-child(odd){animation-delay:.15s}
.voice-wave span:nth-child(3n){animation-delay:.3s}
.voice-wave span:nth-child(4n){animation-delay:.45s}
.voice-wave span:nth-child(1){height:16px}
.voice-wave span:nth-child(2){height:30px}
.voice-wave span:nth-child(3){height:40px}
.voice-wave span:nth-child(4){height:26px}
.voice-wave span:nth-child(5){height:38px}
.voice-wave span:nth-child(6){height:22px}
.voice-wave span:nth-child(7){height:14px}
@keyframes voicewave{0%,100%{transform:scaleY(.5)}50%{transform:scaleY(1.15)}}

.review-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;margin-bottom:8px}
.review-card{margin:0;padding:20px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper);display:flex;flex-direction:column;gap:10px}
.review-stars{color:var(--gold);font-size:16px;letter-spacing:2px}
.review-star-dim{color:var(--line)}
.review-card blockquote{margin:0;color:var(--ink);line-height:1.6;font-size:14.5px}
.review-card figcaption{color:var(--muted);font-size:13px;font-weight:600}
.star-row{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:4px;margin-bottom:14px}
.star-pick input{position:absolute;opacity:0;pointer-events:none}
.star-pick span{font-size:26px;color:var(--line);cursor:pointer;transition:color .12s}
.star-pick:hover span,.star-pick:hover ~ .star-pick span,.star-pick input:checked ~ span,.star-pick input:checked ~ * span{color:var(--gold)}
.star-pick input:checked + span{color:var(--gold)}
.review-form{display:flex;flex-direction:column;gap:14px;max-width:560px}

.pillar-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:16px}
.pillar-meter{display:flex;flex-direction:column;gap:6px}
.pillar-meter-head{display:flex;justify-content:space-between;align-items:baseline;font-size:13px}
.pillar-meter-head span{color:var(--muted);font-size:12px}
.pillar-bar{height:8px;border-radius:4px;background:var(--line-subtle);overflow:hidden}
.pillar-bar i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--gold),var(--saffron))}
.lucky-chips{display:flex;flex-wrap:wrap;gap:10px}

.ask-form{display:flex;flex-direction:column;gap:12px}
.ask-form textarea{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:var(--radius-md);font:inherit;background:var(--paper);color:var(--ink);resize:vertical}
.ask-form-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.ask-answer{margin-top:22px;border-top:1px solid var(--line-subtle);padding-top:18px}
.ask-answer-cta{margin-top:16px;padding:16px 18px;border-radius:var(--radius-lg);background:var(--gold-surface)}
.ask-answer-cta p{margin:0 0 12px}
.tool-place-form{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-bottom:18px}
tr.row-today td{background:var(--gold-surface)}

@media (max-width:640px){
  .voice-band{padding:24px 20px}
}

/* Product shots — split band: copy left, fanned phone stack right. */
.appband {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 48px;
    align-items: center;
    margin: 34px 0 30px;
}
.appband-points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.appband-points strong { display: block; font: 700 15px 'Montserrat', sans-serif; color: var(--indigo); }
.appband-points small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.appband-stack { position: relative; height: 560px; }
.appband-stack .shot-phone {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 230px;
    display: block;
    border-radius: 34px;
    border: 5px solid #1C0905;
    padding: 5px;
    background: #0F0503;
    box-shadow: 0 26px 54px rgba(28, 9, 5, 0.28), 0 4px 14px rgba(28, 9, 5, 0.16);
    overflow: hidden;
}
.shot-phone img { display: block; width: 100%; height: auto; border-radius: 27px; }
/* Each phone (frame + screenshot) bobs as one unit — animating the img
   alone would slide it inside the static border. */
.stack-1 { transform: translate(-118%, -50%) rotate(-8deg); z-index: 1; animation: stackBob1 6.5s ease-in-out infinite; }
.stack-2 { transform: translate(-50%, -52%) rotate(2deg); z-index: 3; animation: stackBob2 6.5s ease-in-out infinite -2.1s; }
.stack-3 { transform: translate(18%, -48%) rotate(9deg); z-index: 2; animation: stackBob3 6.5s ease-in-out infinite -4.2s; }
@keyframes stackBob1 {
    0%, 100% { transform: translate(-118%, -50%) rotate(-8deg); }
    50% { transform: translate(-118%, calc(-50% - 14px)) rotate(-8deg); }
}
@keyframes stackBob2 {
    0%, 100% { transform: translate(-50%, -52%) rotate(2deg); }
    50% { transform: translate(-50%, calc(-52% - 14px)) rotate(2deg); }
}
@keyframes stackBob3 {
    0%, 100% { transform: translate(18%, -48%) rotate(9deg); }
    50% { transform: translate(18%, calc(-48% - 14px)) rotate(9deg); }
}
@media (prefers-reduced-motion: reduce) {
    .appband-stack .shot-phone { animation: none; }
}
@media (max-width: 880px) {
    .appband { grid-template-columns: 1fr; gap: 22px; }
    .appband-stack { height: 430px; }
    .appband-stack .shot-phone { width: 165px; border-width: 4px; border-radius: 28px; }
    .shot-phone img { border-radius: 21px; }
}

/* Hero deck — the six pathway cards as a portrait deck in the right column.
   Front card deals off the top (right + tilt), next rises from behind.
   6 cards x 3s = 18s loop; inline animation-delay staggers each phase. */
.hero-deck { position: relative; min-height: 470px; }
.hero-deck-back {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(300px, 84%);
    height: 78%;
    transform: translate(-50%, -50%) rotate(4deg) scale(0.94);
    background: linear-gradient(160deg, #fffaf0, #f2e0c4);
    border: 1px solid rgba(139, 58, 21, 0.14);
    border-radius: 26px;
    opacity: 0.6;
}
.hero-deck-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(310px, 88%);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 34px 30px;
    background: linear-gradient(160deg, #fffdf8 0%, #fdf1de 60%, #f9e6cc 100%);
    border: 1px solid rgba(139, 58, 21, 0.16);
    border-radius: 26px;
    box-shadow: 0 30px 60px rgba(60, 22, 8, 0.22), 0 6px 16px rgba(60, 22, 8, 0.12);
    text-decoration: none;
    color: inherit;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transform: translate(-66%, -50%) rotate(-8deg) scale(0.88);
    transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}
.hero-deck-card.deck-front {
    opacity: 1;
    visibility: visible;
    z-index: 3;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
.hero-deck-card.deck-exit {
    opacity: 0;
    visibility: visible;
    z-index: 3;
    transform: translate(-14%, -58%) rotate(11deg) scale(0.94);
}
.hero-deck-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(160deg, #E2622B, #C24E1D);
    color: #fff;
    box-shadow: 0 10px 22px rgba(194, 78, 29, 0.38);
}
.hero-deck-icon svg { width: 28px; height: 28px; }
.hero-deck-card > strong {
    font: 700 21px 'Montserrat', sans-serif;
    color: var(--indigo);
    line-height: 1.25;
}
.hero-deck-card > small {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--muted);
}
.hero-deck-arrow {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(194, 78, 29, 0.10);
    color: #C24E1D;
    font-size: 17px;
}
@media (prefers-reduced-motion: reduce) {
    .hero-deck-card { transition: none; }
}
@media (max-width: 880px) {
    .hero-deck { min-height: 380px; margin-top: 10px; }
    .hero-deck-card { min-height: 300px; padding: 28px 24px; }
}

/* PWA install-progress sheet — staged phases until appinstalled fires. */
.am-install-sheet {
    position: fixed; left: 50%; bottom: calc(var(--app-tabs-h, 0px) + 14px);
    transform: translate(-50%, 16px); z-index: 500;
    opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
    width: min(360px, calc(100vw - 28px));
}
.am-install-sheet.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.am-install-card {
    position: relative; display: flex; align-items: center; gap: 10px;
    background: #2B1414; color: #F5EDE0; border: 1px solid rgba(212,175,55,.30);
    border-radius: 16px; padding: 12px 40px 20px 12px;
    box-shadow: 0 14px 38px rgba(0,0,0,.45);
}
.am-install-dot {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
    background: linear-gradient(160deg,#D9531E,#C0392B); color:#fff;
    display: inline-grid; place-items: center;
}
.am-install-dot::before { content:"✦"; font-size:16px; }
.am-install-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.am-install-text strong { font-size: 13.5px; }
.am-install-text small { font-size: 11px; color: #E9B44C; font-weight: 600; }
.am-install-x {
    position: absolute; top: 6px; right: 8px; border: 0; background: none;
    color: rgba(245,237,224,.6); font-size: 16px; cursor: pointer; padding: 2px 6px;
}
.am-install-bar {
    position: absolute; left: 12px; right: 12px; bottom: 10px; height: 4px;
    border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden;
}
.am-install-bar i {
    position: absolute; top: 0; bottom: 0; width: 38%; border-radius: 2px;
    background: linear-gradient(90deg,#C89B3C,#F3E5AB);
    animation: am-install-slide 1.25s ease-in-out infinite;
}
@keyframes am-install-slide {
    0% { left: -38%; } 100% { left: 102%; }
}
.am-install-sheet.done .am-install-bar i { animation: none; left: 0; width: 100%; background: #34C759; }
.am-install-sheet.done .am-install-text small { color: #7BE09A; }

/* Admin email console — tab bar. */
.email-tabs { display: flex; gap: 8px; margin: 18px 0 16px; border-bottom: 1px solid #EAE3D2; padding-bottom: 0; }
.email-tab {
    padding: 9px 16px; font-size: 13px; font-weight: 700; color: #8C7B75;
    text-decoration: none; border: 1px solid transparent; border-bottom: 0;
    border-radius: 10px 10px 0 0; margin-bottom: -1px;
}
.email-tab:hover { color: #3A2E2B; }
.email-tab.active { color: #B8431B; background: #FFFBF2; border-color: #EAE3D2; }

/* Email composer — card grid matching the support-console mock. */
.email-compose .ec-grid { display: grid; grid-template-columns: 1.2fr .95fr; gap: 14px; margin: 14px 0; }
.email-compose .ec-col { display: flex; flex-direction: column; gap: 14px; }
.ec-card { background: #fff; border: 1px solid #EAE3D2; border-radius: 14px; padding: 14px 16px; }
.ec-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ec-card-head h3 { margin: 0; font-size: 14px; }
.ec-card-head small { color: #8C7B75; font-size: 11px; }
.ec-tones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.ec-tone-label { font-size: 11.5px; font-weight: 700; color: #8C7B75; text-transform: uppercase; letter-spacing: .5px; }
.ec-tones .chip.on { background: #B8431B; color: #fff; border-color: #B8431B; }
.ec-card label { display: block; font-size: 12px; font-weight: 700; color: #8C7B75; margin-bottom: 10px; }
.ec-card label input, .ec-card label select, .ec-card textarea { width: 100%; margin-top: 4px; }
.ec-card textarea { font-family: inherit; }
.ec-send { width: 100%; padding: 15px; font-size: 15px; border-radius: 999px; }
.ec-preview { position: sticky; top: 12px; align-self: start; }
.ec-mail { border: 1px solid #EAE3D2; border-radius: 12px; overflow: hidden; background: #F6F1E8; }
.ec-mail-head { background: #2B1414; color: #F3E5AB; padding: 12px 16px; font-size: 13px; letter-spacing: .4px; }
.ec-mail-body { padding: 18px 16px; font-size: 13.5px; line-height: 1.65; color: #3A2E2B; min-height: 120px; }
.ec-mail-body h3.ec-pv-subject { margin: 0 0 10px; font-size: 15px; }
.ec-mail-body p { margin: 0 0 10px; }
.ec-mail-body a { color: #B8431B; }
@media (max-width: 900px) { .email-compose .ec-grid { grid-template-columns: 1fr; } .ec-preview { position: static; } }
.ec-pv-subject { margin: 0 0 4px; font-size: 16px; text-align: center; font-family: Georgia, serif; }
.ec-pv-rule { width: 52px; height: 2px; background: #C89B3C; margin: 10px auto 14px; }
.ec-pv-cta { display: inline-block; background: #B8431B; color: #fff; font-weight: 700; font-size: 12.5px; padding: 9px 22px; border-radius: 999px; margin: 16px auto 4px; }
.ec-pv-signoff { font-size: 11px; color: #8C7B75; font-style: italic; margin-top: 10px; }
