/* MyPujaWorld — styles for PHP server-rendered pages. Mobile-first, 360px min (Doc5 §5).
   Colours match the React app (public_html/src/styles.css). */

:root {
  --saffron: #b4410e;
  --saffron-dark: #8f3209;
  --saffron-soft: #fdf1e8;
  --ink: #141b33;
  --muted: #5b6478;
  --line: #e4ddd6;
  --bg: #faf7f3;
  --card: #ffffff;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
}
a { color: var(--saffron); }
a:hover { color: var(--saffron-dark); }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
/* Full-width layout; only long-form text keeps a comfortable line length */
.page .lead, .page > p, .content-body, .faq, .prose, .page-footer, .page section > p, .notice-page p { max-width: 860px; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* ── Header / footer ───────────────────────────────────────────────────── */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.3rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.brand img { display: block; border-radius: 8px; }
.brand span { color: var(--saffron); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.site-nav a { text-decoration: none; }

.site-footer { margin-top: 48px; padding: 24px 0 32px; background: var(--card); border-top: 1px solid var(--line); font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; }
.footer-note { margin: 0; color: var(--muted); }

/* ── Page content ──────────────────────────────────────────────────────── */
main { padding-top: 16px; }
.breadcrumbs { font-size: 0.875rem; color: var(--muted); margin-bottom: 12px; overflow-wrap: anywhere; }
.breadcrumbs a { color: var(--muted); }
.page h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 12px; }
.page h2 { font-size: 1.3rem; line-height: 1.3; margin: 32px 0 10px; }
.page h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.lead { font-size: 1.1rem; }
.muted { color: var(--muted); }
.answer strong { color: var(--ink); }
.content-body { margin-top: 24px; }

.freshness { margin: 0 0 16px; font-size: 0.9rem; color: var(--muted); }
.badge { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: #ecfdf3; color: #067647; font-weight: 600; font-size: 0.8rem; }

.timings-box { padding: 16px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: var(--radius); }
.timings-box .answer { margin-top: 0; }
.sun { margin: 12px 0 0; }
.note { margin: 12px 0 0; color: var(--muted); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 0.95rem; }
.data-table caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table thead th { background: var(--saffron-soft); font-size: 0.85rem; white-space: nowrap; }
.data-table tbody th { font-weight: 600; }
.samagri-table td:first-child { color: var(--muted); width: 2em; padding-right: 0; }
.samagri-table th[scope="row"] { width: 42%; }
.samagri-table .hindi { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); }
.abroad { color: var(--muted); font-size: 0.875rem; }

/* ── Cards, pills, CTA ─────────────────────────────────────────────────── */
.card-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.card h2 a { text-decoration: none; }
.card p { margin: 6px 0 0; }
.card-date { font-weight: 600; }
.card-img { display: block; margin: -16px -16px 12px; }
.card-img img, img.card-img { display: block; width: 100%; height: 170px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
img.card-img { width: calc(100% + 32px); max-width: none; }
.card-img picture { display: block; }
.card { overflow: hidden; }

.hero { margin: 20px 0 8px; }
.hero img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
@media (min-width: 900px) { .hero img { height: 380px; object-fit: cover; } }
.hero figcaption { margin-top: 6px; font-size: 0.8rem; color: var(--muted); }
.hero figcaption a { color: var(--muted); }
.key-dates { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.95rem; }

.pill-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; }
.pill:hover { border-color: var(--saffron); }

.cta-box { margin: 28px 0; padding: 20px; background: var(--saffron-soft); border-radius: var(--radius); }
.cta-box h2 { margin-top: 0; }
.btn { display: inline-block; margin: 4px 8px 0 0; padding: 10px 18px; border: 2px solid var(--saffron); border-radius: 8px; background: var(--saffron); color: #fff; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--saffron-dark); border-color: var(--saffron-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--saffron); }
.btn-ghost:hover { background: var(--saffron); color: #fff; }

/* ── FAQ & footer of article ───────────────────────────────────────────── */
.faq { margin-top: 32px; }
.faq-item { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.faq-item h3 { margin-bottom: 4px; }
.faq-item p { margin: 0 0 8px; }
.page-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.page-footer p { margin: 4px 0; }

.notice-page { padding: 40px 0; text-align: center; }

@media (min-width: 720px) {
  .page h1 { font-size: 2.1rem; }
}

/* ── Event page ────────────────────────────────────────────────────────── */
.small { font-size: 0.85rem; }
.notice { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius); }
.notice-info { background: #eff8ff; color: #175cd3; }
.notice-alert { background: #fffaeb; color: #93370d; border: 1px solid #fedf89; }
.badges { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.badges .badge { margin: 0; }
.badge-festival { background: var(--saffron-soft); color: var(--saffron-dark); text-decoration: none; }
.badge-community_submitted, .badge-update_required { background: #f2f4f7; color: #475467; }
.badge-organiser_claimed, .badge-published { background: #ecfdf3; color: #067647; }
.badge-postponed { background: #fffaeb; color: #93370d; }
.badge-cancelled, .badge-rejected { background: #fef3f2; color: #b42318; }
.event-when { margin: 0 0 16px; }
.key-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; font-size: 1.1rem; }
.key-time strong { font-size: 1.35rem; color: var(--saffron-dark); }
.actions-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.actions-bar .btn { margin: 0; }
button.btn { font: inherit; cursor: pointer; }
.btn-whatsapp { background: #128c4b; border-color: #128c4b; }
.btn-whatsapp:hover { background: #0d6e3a; border-color: #0d6e3a; }
.btn-small { padding: 6px 12px; font-size: 0.9rem; }
.btn.is-saved { background: #ecfdf3; color: #067647; border-color: #067647; }
.action-msg { min-height: 1.4em; margin: 4px 0 0; color: #067647; font-size: 0.95rem; }
.map-embed { width: 100%; height: 280px; border: 1px solid var(--line); border-radius: var(--radius); }
.programme-list, .update-list { list-style: none; margin: 0; padding: 0; }
.programme-list li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.p-when { font-weight: 600; color: var(--saffron-dark); }
.update-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0; }
.facts div { padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.qa-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.qa-item p { margin: 4px 0; }
.qa-ask, .qa-answer { margin-top: 12px; display: grid; gap: 8px; }
.qa-ask label { font-weight: 600; }
textarea, .modal input, .modal select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.linklike { padding: 0; border: 0; background: none; color: var(--saffron); font: inherit; text-decoration: underline; cursor: pointer; }
.modal { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(20,27,51,.25); }
.modal::backdrop { background: rgba(20,27,51,.55); }
.modal h2 { margin: 0 0 8px; font-size: 1.2rem; }
.modal label { display: block; margin-bottom: 12px; font-weight: 600; }
.modal label input, .modal label select, .modal label textarea { margin-top: 4px; font-weight: 400; }
.modal-close { position: absolute; top: 8px; right: 10px; margin: 0; }
.modal-close button { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.form-error { min-height: 1em; margin: 0 0 8px; color: #b42318; font-size: 0.9rem; }
@media (max-width: 480px) { .programme-list li { grid-template-columns: 1fr; gap: 2px; } }

/* ── Home ──────────────────────────────────────────────────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-hero { padding: 24px 0 8px; }
.home-hero h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 10px; }
.hero-search { display: flex; gap: 8px; margin: 18px 0 12px; }
.hero-search input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.hero-search .btn { margin: 0; }
.near-me { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.btn-near { margin: 0; background: #fff; color: var(--saffron-dark); border-color: var(--saffron); }
.btn-near::before { content: '📍 '; }
.home-grid { display: grid; gap: 16px; margin: 24px 0; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.home-card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.home-card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.date-list, .link-list { list-style: none; margin: 0 0 8px; padding: 0; }
.date-list li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.date-list li span { color: var(--muted); white-space: nowrap; }
.link-list li { padding: 5px 0; }
.mini-panchang { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.mini-panchang dt { font-size: 0.8rem; color: var(--muted); }
.mini-panchang dd { margin: 0; font-weight: 600; }
.home-festivals h2 { margin-top: 32px; }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.card h3 a { text-decoration: none; }
@media (min-width: 720px) { .home-hero h1 { font-size: 2.4rem; } }

/* ── Panchang & calendar ───────────────────────────────────────────────── */
.city-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 0 0 16px; }
.city-picker label { font-size: 0.9rem; font-weight: 600; }
.city-picker select, .city-picker input { display: block; margin-top: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.panchang-table th { width: 38%; white-space: nowrap; }
.observances { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.observances .badge { margin: 0; }
.day-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 16px 0; }
.cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px; }
.cal-toolbar .day-nav { margin: 0 0 16px; gap: 20px; }
.cal-grid { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; background: var(--card); }
.cal-grid th { padding: 6px; background: var(--saffron-soft); font-size: 0.8rem; }
.cal-grid td { height: 92px; padding: 4px 5px; border: 1px solid var(--line); vertical-align: top; font-size: 0.72rem; line-height: 1.3; }
.cal-grid td.empty { background: var(--bg); }
.cal-grid td.is-today { outline: 2px solid var(--saffron); outline-offset: -2px; }
.cal-grid td.has-festival { background: #fffaf5; }
.cal-date { display: block; font-size: 1rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.cal-tithi { display: block; color: var(--muted); }
.cal-fest, .cal-vrat { display: block; margin-top: 2px; padding: 1px 4px; border-radius: 4px; }
.cal-fest { background: var(--saffron); color: #fff; text-decoration: none; font-weight: 600; }
.cal-vrat { background: #f2f4f7; color: #344054; }
.cal-ekadashi { background: #ecfdf3; color: #067647; }
.cal-purnima { background: #fffaeb; color: #93370d; }
.cal-amavasya { background: #eaecf0; color: #1d2939; }
.prose h2 { font-size: 1.2rem; }
.prose ul { padding-left: 20px; }

/* ── Phase 2: volunteers, photos, reviews ──────────────────────────────── */
.volunteer-roles { list-style: none; margin: 0; padding: 0; }
.volunteer-roles li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.photo-grid { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-grid img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 8px; }
.upload-box, .review-form-box { margin: 12px 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.upload-box summary, .review-form-box summary { cursor: pointer; font-weight: 600; color: var(--saffron); }
.upload-box form, .review-form { display: grid; gap: 10px; margin-top: 12px; max-width: 640px; }
.upload-box label, .review-form > label { display: grid; gap: 4px; font-weight: 600; font-size: 0.95rem; }
.upload-box input[name=caption] { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.check-row { display: flex !important; grid-template-columns: none; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.check-row input { margin-top: 4px; }
.rating-bars { display: grid; gap: 4px 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0 0 16px; max-width: 860px; }
.rating-bars div { display: grid; grid-template-columns: 10em 1fr; align-items: center; gap: 8px; font-size: 0.9rem; }
.rating-bars dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.bar-track { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--saffron); }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); max-width: 860px; }
.review p { margin: 4px 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.stars { color: #f79009; letter-spacing: 1px; }
.badge-verified { background: #ecfdf3; color: #067647; margin: 0; }
.organiser-response { padding: 8px 12px; background: var(--saffron-soft); border-radius: 8px; }
.star-input { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 2px; }
.star-input legend { float: left; width: 12em; font-weight: 600; font-size: 0.95rem; }
.star-input label { cursor: pointer; font-size: 1.6rem; line-height: 1; color: #d0d5dd; }
.star-input.small-stars label { font-size: 1.25rem; }
.star-input label.on { color: #f79009; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input input:focus-visible + span { outline: 2px solid var(--saffron); }
.star-badge { margin: 0 0 4px; font-weight: 700; color: var(--saffron-dark); }
.star-grid .card h2 { font-size: 1.2rem; }

/* ── Greeting maker (/greetings) ─────────────────────────────────────── */
.greeting-maker { display: grid; gap: 16px; margin: 16px 0 28px; }
@media (min-width: 900px) { .greeting-maker { grid-template-columns: 320px 1fr; align-items: start; } .greeting-maker .actions-bar, .greeting-maker > .muted { grid-column: 2; } }
.greeting-controls { display: grid; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line, #e5e0d8); border-radius: 12px; }
.greeting-controls label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.greeting-controls select, .greeting-controls input { padding: 9px 10px; border: 1px solid var(--line, #e5e0d8); border-radius: 8px; font: inherit; font-weight: 400; background: #fff; }
.greeting-preview canvas { display: block; width: 100%; max-width: 460px; height: auto; border-radius: 12px; box-shadow: 0 6px 20px rgba(20,27,51,.18); }
.business-greeting img { float: right; margin-left: 10px; border-radius: 8px; object-fit: contain; }

/* ── Phase 2–3 content, directory and marketplace pages ──────────────── */
.narrow { max-width: 760px; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
form[data-api-form] label, .enquiry-form label { display: grid; gap: 4px; margin: 0 0 12px; font-weight: 600; font-size: .92rem; }
form[data-api-form] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), form[data-api-form] select, form[data-api-form] textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; background: var(--card); box-sizing: border-box; }
form[data-api-form] .form-error, form[data-api-form] [data-error-for] { color: #b42318; font-weight: 400; font-size: .85rem; }
.form-msg { min-height: 1.2em; font-weight: 600; color: var(--saffron-dark); }
.enquiry-box { scroll-margin-top: 16px; }
.ask-box { margin: 16px 0; }
.ask-box > summary { list-style: none; display: inline-block; cursor: pointer; margin-bottom: 12px; }
.ask-box > summary::-webkit-details-marker { display: none; }
.pill.is-active { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.hero-figure { margin: 12px 0 20px; }
.hero-figure img { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: var(--radius); }
.steps { padding-left: 1.4em; }
.steps li { margin: 0 0 10px; line-height: 1.55; }
.check-list { list-style: none; padding: 0; display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.check-list li::before { content: "✓"; color: var(--saffron); font-weight: 700; margin-right: 8px; }
.devotional-text { margin: 20px 0; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--saffron); border-radius: var(--radius); }
.devotional-text h2 { margin-top: 0; font-size: 1.05rem; color: var(--muted); }
.verse { font-size: 1.12rem; line-height: 1.8; margin: 0 0 16px; }
.devotional-text[lang="hi"] .verse { font-size: 1.22rem; }
.qa-list { list-style: none; padding: 0; margin: 16px 0; }
.qa-list .qa-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qa-list h2 { font-size: 1.08rem; margin: 0 0 4px; }
.answer { padding: 12px 16px; margin: 0 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.answer.is-accepted { border-color: #12b76a; box-shadow: 0 0 0 1px #12b76a; }
.muhurat-table td { vertical-align: top; }
.muhurat-table tr.is-past { opacity: .5; }
@media print { .site-header, .site-footer, .actions-bar, .breadcrumbs { display: none !important; } .devotional-text { border: 0; padding: 0; } }

/* Brand logo (images/logo-horizontal.png, built by tools/brand/build-logo.php) */
.brand img { width: auto; height: 40px; border-radius: 0; }
@media (max-width: 380px) { .brand img { height: 34px; } }

/* Reserve scrollbar space so the layout doesn't shift between short and long pages */
html { overflow-y: scroll; scrollbar-gutter: stable; }
.site-nav { align-items: center; }
.site-nav a.btn { margin: 0; color: #fff; text-decoration: none; }

/* Homepage sections */
.home-spotlight { margin: 24px 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--saffron); border-radius: var(--radius); }
.home-spotlight h2 { margin: 6px 0 8px; }
.home-section { margin: 32px 0; }
.steps-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps-grid li { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; }
.steps-grid li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 8px; border-radius: 50%; background: var(--saffron); color: #fff; font-weight: 700; }
.home-section .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (min-width: 1000px) { .home-section .card-grid { grid-template-columns: repeat(3, 1fr); } }
.badge-featured { background: #fff4d6; color: #8a5a00; border: 1px solid #f5c451; }
.business-greeting.is-featured { border-color: #f5c451; box-shadow: 0 0 0 2px #fff4d6; }
.lang-switch select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: .9rem; }

/* ── Sister-portal network ("Explore our other free services") ─────────────── */
.sister-portals { margin: 40px 0 8px; padding: 28px 0 0; border-top: 1px solid var(--line); }
.sister-portals h2 { margin-bottom: 4px; }
.portal-grid { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
/* Desktop: 4 + 3 (seven cards; the second row is centred) */
.portal-card { flex: 0 1 calc((100% - 60px) / 4); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 12px); overflow: hidden; border-top: 4px solid var(--accent); transition: transform .15s ease, box-shadow .15s ease; }
.portal-card:hover, .portal-card:focus-within { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20, 27, 51, .10); }
.portal-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.portal-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.portal-body h3 { margin: 0 0 4px; font-size: 1.08rem; }
.portal-body h3 a { color: var(--ink); text-decoration: none; }
.portal-body h3 a:hover { color: var(--accent); }
.portal-benefit { display: inline-block; align-self: flex-start; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-size: .8rem; font-weight: 700; }
.portal-body .small { flex: 1; margin: 0 0 12px; color: var(--muted); }
.portal-cta { align-self: flex-start; font-weight: 700; color: var(--accent); text-decoration: none; }
.portal-cta:hover { text-decoration: underline; }
@media (max-width: 1000px) { .portal-card { flex-basis: calc((100% - 20px) / 2); } }   /* tablet: 2 per row */
@media (max-width: 560px) { /* mobile: one full-width card per row (illustrations stay whole) */
  .portal-grid { gap: 14px; }
  .portal-card { flex-basis: 100%; }
  .portal-body { padding: 12px 14px 14px; }
}
.footer-portals { margin: 14px 0 6px; font-size: .88rem; line-height: 1.9; }
.footer-portals-title { font-weight: 700; }

/* ── Janam Kundli & Kundli Matching ──────────────────────────────────────── */
.kundli-forms { margin: 16px 0; }
.kundli-form legend { font-weight: 700; padding: 0 6px; }
.place-row { display: flex; gap: 8px; }
.place-row input { flex: 1; min-width: 0; }
.place-results { list-style: none; margin: 6px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.place-results li { margin: 4px 0; }
.kundli-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 16px 0 24px; }
.kundli-chart { width: 100%; height: auto; max-width: 420px; display: block; margin: 0 auto; }
.kundli-chart .kc-bg { fill: #fffaf3; stroke: #8a5a2b; stroke-width: 3; }
.kundli-chart .kc-line { stroke: #8a5a2b; stroke-width: 2; fill: none; }
.kundli-chart .kc-cell { fill: #fffaf3; stroke: #8a5a2b; stroke-width: 2; }
.kundli-chart .kc-cell.kc-lagna { fill: #fdeedd; }
.kundli-chart .kc-sign { font: 600 13px system-ui, sans-serif; fill: #b26a2f; text-anchor: middle; }
.kundli-chart .kc-sign.kc-left { text-anchor: start; font-size: 11px; }
.kundli-chart .kc-planet { font: 700 15px system-ui, sans-serif; fill: var(--ink, #141b33); text-anchor: middle; }
.kundli-chart .kc-asc { fill: #c2571a; }
.kundli-chart .kc-title { font: 600 14px system-ui, sans-serif; fill: #8a5a2b; text-anchor: middle; }
.kundli-report .data-table { width: 100%; margin-bottom: 16px; }
.kundli-report caption { text-align: left; font-weight: 700; padding: 6px 0; }
.kundli-report tr.is-current td { background: #fdf1e8; font-weight: 600; }
.kundli-report [aria-pressed="true"] { border-color: var(--saffron, #e07a2e); font-weight: 700; }
.match-score { display: inline-flex; align-items: baseline; gap: 12px; padding: 12px 20px; border-radius: 12px; margin: 8px 0; background: #eef7f1; }
.match-score strong { font-size: 2rem; }
.match-low { background: #fdecec; } .match-average { background: #fff6e0; } .match-good, .match-excellent { background: #e7f6ec; }
@media (max-width: 700px) { .kundli-charts { grid-template-columns: 1fr; } }
@media print { .no-print, .site-header, .site-footer, .kundli-forms, [data-kundli-go], .prose, .faq, .sister-portals { display: none !important; } .kundli-chart { max-width: 320px; } }

/* ── Reminders (/reminders) ── */
.reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.reminder-row p { margin: 2px 0 0; }
.reminder-row .btn { flex: none; white-space: nowrap; }
.reminder-row .btn.is-saved { background: var(--saffron-soft); border-color: var(--saffron); color: var(--saffron-dark); }
.reminder-settings { align-items: end; }
.remind-inline { margin: 12px 0; }

/* ── Bhagavad Gita verses, gemstone finder ── */
.verse { margin: 18px 0; padding: 16px 18px; background: var(--saffron-soft); border-left: 4px solid var(--saffron); border-radius: var(--radius); }
.verse blockquote { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.7; color: var(--ink); }
.verse .translit { margin: 0 0 8px; font-style: italic; color: var(--muted); font-size: .95rem; }
.verse figcaption { font-size: 1rem; }
.chapter-meta { color: var(--muted); }
.gem-result .card-grid { margin-top: 12px; }
.gem-result h3 { margin: 4px 0; }

/* ── Kundli predictions (phalit) ── */
.kundli-phal { margin: 28px 0 8px; }
.phal-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 10px 0; padding: 4px 16px; }
.phal-section summary { cursor: pointer; padding: 8px 0; }
.phal-section summary h4 { display: inline; margin: 0; font-size: 1.05rem; }
.phal-section[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
@media print { .phal-section { break-inside: avoid; } .phal-section:not([open]) > :not(summary) { display: block; } }

/* ── Site search (header box, autocomplete, /search) ── */
.search-form { position: relative; }
.site-search input, .search-form-page input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; }
.site-search input:focus, .search-form-page input:focus { outline: 2px solid var(--saffron); outline-offset: 1px; }
.search-form-page { display: flex; gap: 8px; max-width: 640px; margin: 8px 0 16px; }
.search-form-page input { border-radius: var(--radius); font-size: 1.05rem; }
.search-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 280px; z-index: 50; list-style: none; margin: 0; padding: 4px 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(20, 27, 51, .12); max-height: 70vh; overflow: auto; }
.search-suggest li a { display: flex; flex-direction: column; padding: 8px 12px; text-decoration: none; color: var(--ink); }
.search-suggest li.is-active a, .search-suggest li a:hover { background: var(--saffron-soft); }
.search-suggest .sugg-label { font-size: .8rem; color: var(--muted); }
.search-suggest .sugg-all a { color: var(--saffron); font-size: .9rem; border-top: 1px solid var(--line); }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.search-results li > a { font-weight: 600; }
.search-results p { margin: 4px 0 0; }
.search-group h2 { margin-top: 24px; }

/* ── Header tools row: search box + language (same on PHP pages and React screens) ── */
.header-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1 1 100%; }
.header-tools .site-search { flex: 0 1 460px; max-width: none; margin: 0; }
.header-tools .lang-switch { flex: none; margin: 0; }
@media (max-width: 720px) { .header-tools .site-search { flex: 1 1 auto; order: 0; } }
