:root {
  --brand: #7a1424;
  --brand-dark: #5c0d1a;
  --gold: #b8892f;
  --gold-soft: #f3e3bf;
  --bg: #fffaf3;
  --surface: #ffffff;
  --ink: #2a1a1d;
  --muted: #6e5a5e;
  --line: #ecdcd0;
  --ok: #1f7a4d;
  --danger: #b42318;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(80, 30, 30, 0.08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
img { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 74rem; margin: 0 auto; padding-inline: 1.25rem; }
.eyebrow { margin: 0 0 0.4rem; color: var(--gold); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; }
.hint { margin: 0.25rem 0 0.75rem; color: var(--muted); font-size: 0.88rem; }

/* ---------- nav & footer ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.logo { color: var(--brand); font: 600 1.4rem 'Cinzel', Georgia, serif; text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; }
.logo span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 1.1rem; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
/* Phones: the text links move to a swipeable row under the logo instead of disappearing. */
@media (max-width: 640px) {
  .site-nav .container { flex-wrap: wrap; justify-content: flex-start; row-gap: 0; column-gap: 1.1rem; min-height: 3.25rem; }
  .site-nav .logo { margin-right: auto; }
  .nav-links { display: contents; }
  .nav-links .btn { order: 1; }
  .nav-links a:not(.btn) {
    order: 3;
    padding: 0.15rem 0 0.55rem;
    font-size: 0.88rem;
    white-space: nowrap;
  }
  .nav-row-break { display: block; order: 2; flex-basis: 100%; height: 0; }
}
@media (min-width: 641px) { .nav-row-break { display: none; } }

.site-footer { margin-top: 4rem; padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--muted); }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-whatsapp { background: #1f8f4e; color: #fff; }
.btn-lg { padding: 0.95rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.link-btn { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: 0.88rem; text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--danger); }

.field { display: grid; gap: 0.35rem; min-width: 0; margin-bottom: 1rem; }
.field > span { font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.field small { font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field input::placeholder, .field textarea::placeholder { color: #a8979a; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.field textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; font-size: 0.95rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.grid-2 .field-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.panel {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 1rem; font-size: 1.15rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  background: #2a1a1d;
  color: #fff;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- homepage ---------- */

.hero { padding: 3.5rem 0 2.5rem; background: radial-gradient(ellipse at 80% 0%, #fbe9d0 0%, transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem; }
.hero h1 { margin: 0 0 1rem; font: 600 clamp(2.1rem, 5vw, 3.4rem)/1.12 'Playfair Display', Georgia, serif; }
.hero h1 em { color: var(--brand); }
.hero p { max-width: 36rem; margin: 0 0 1.75rem; color: var(--muted); font-size: 1.08rem; }
.trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.hero-cards { position: relative; height: 26rem; }
.hero-card {
  position: absolute;
  width: 13rem;
  height: auto;
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  box-shadow: 0 24px 50px rgba(60, 15, 20, 0.28);
}
.hero-card.c1 { left: 50%; top: 0; z-index: 2; transform: translateX(-50%); }
.hero-card.c2 { left: 4%; top: 3rem; transform: rotate(-8deg); }
.hero-card.c3 { right: 4%; top: 3rem; transform: rotate(8deg); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cards { height: 20rem; }
  .hero-card { width: 10rem; }
}

.my-cards ul { margin: 0; padding: 0; list-style: none; }
.my-cards li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }

/* padding-block only: a `padding` shorthand here would wipe .container's side gutters. */
.section { padding-block: 3rem; }
.section-title { margin: 0 0 0.5rem; text-align: center; font: 600 clamp(1.7rem, 4vw, 2.3rem)/1.2 'Playfair Display', Georgia, serif; }
.section-sub { max-width: 40rem; margin: 0 auto 2rem; color: var(--muted); text-align: center; }

.chips { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: thin; }
.chip {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  white-space: nowrap;
  cursor: pointer;
}
.chip[aria-selected='true'] { background: var(--brand); border-color: var(--brand); color: #fff; }
.gallery-count { margin: 0.75rem 0 1rem; color: var(--muted); font-size: 0.85rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.5rem 1.1rem; }
@media (max-width: 420px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.75rem; } }
.gallery-item {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.thumb-wrap {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(110deg, #f1e6da 30%, #faf2e8 50%, #f1e6da 70%) 0 0 / 300% 100%;
  box-shadow: 0 8px 22px rgba(60, 20, 20, 0.14);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: shimmer 1.4s linear infinite;
}
.gallery-item:hover .thumb-wrap, .gallery-item:focus-visible .thumb-wrap { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(60, 20, 20, 0.22); }
.gallery-item.selected .thumb-wrap { outline: 3px solid var(--brand); outline-offset: 3px; }
.thumb { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; opacity: 0; transition: opacity 0.3s; }
.thumb.ready { opacity: 1; }
.thumb.a4, .page-canvas.a4, .template-thumb.a4 { aspect-ratio: 1200 / 1697; }
.thumb-wrap:has(.thumb.ready) { animation: none; }
@keyframes shimmer { to { background-position: -300% 0; } }
.gallery-name { display: grid; line-height: 1.3; }
.gallery-name strong { font-size: 0.95rem; font-weight: 500; }
.gallery-name small { color: var(--muted); font-size: 0.78rem; }

.biodata-band { background: linear-gradient(180deg, transparent, #f8ecdc 18%, #f8ecdc 82%, transparent); }
.biodata-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 2.5rem; }
.biodata-grid p { color: var(--muted); }
.section-title.left { text-align: left; }
.biodata-samples { position: relative; height: 28rem; }
.bio-sample { position: absolute; width: 15rem; height: auto; aspect-ratio: 1200 / 1697; border-radius: 6px; box-shadow: 0 24px 50px rgba(60, 15, 20, 0.25); }
.bio-sample:first-child { left: 0; top: 2rem; transform: rotate(-5deg); }
.bio-sample:last-child { left: 9rem; top: 0; }
.ticks { margin: 1.25rem 0 1.75rem; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 0.3rem 0 0.3rem 1.75rem; }
.ticks li::before { content: '✓'; position: absolute; left: 0.2rem; color: var(--ok); font-weight: 700; }
@media (max-width: 820px) {
  .biodata-grid { grid-template-columns: 1fr; }
  .biodata-samples { height: 22rem; }
  .bio-sample { width: 11.5rem; }
  .bio-sample:last-child { left: 7rem; }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; counter-reset: step; }
.step { position: relative; padding: 1.5rem 1.5rem 1.5rem 4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.25rem;
  top: 1.4rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}
.step b { display: block; }
.step p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.93rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.feature { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature b { display: block; margin-bottom: 0.35rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.feature .icon { display: block; margin-bottom: 0.6rem; font-size: 1.6rem; }
.feature-link { color: inherit; text-decoration: none; border-color: var(--gold); background: #fffaf0; }
.feature-link:hover b { color: var(--brand); }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 22rem)); justify-content: center; gap: 1.5rem; }
.price-card { display: flex; flex-direction: column; padding: 2rem; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.price-card.featured { border: 2px solid var(--gold); }
.price-card .price { margin: 0.4rem 0; color: var(--brand); font: 600 3rem/1 'Playfair Display', Georgia, serif; }
.price-card ul { flex: 1; margin: 1.25rem 0 1.5rem; padding: 0; list-style: none; text-align: left; }
.price-card li { position: relative; padding: 0.4rem 0 0.4rem 1.75rem; border-bottom: 1px dashed var(--line); }
.price-card li::before { content: '✓'; position: absolute; left: 0.25rem; color: var(--ok); font-weight: 700; }

.faq { max-width: 44rem; margin: 0 auto; }
.faq details { margin-bottom: 0.75rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq summary { font-weight: 500; cursor: pointer; }
.faq p { margin: 0.6rem 0 0; color: var(--muted); }

/* ---------- editor ---------- */

.editor-tabs { display: none; }
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  gap: 2rem;
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
.preview-pane { position: sticky; top: 4.75rem; align-self: start; max-height: calc(100vh - 5.5rem); overflow-y: auto; padding: 0 0.25rem 1rem; }
.preview-label { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.85rem; text-align: center; }
.pages { display: grid; gap: 1.5rem; }
.page { margin: 0; }
.page-canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; border-radius: 6px; background: #f1e6da; box-shadow: 0 14px 34px rgba(60, 15, 20, 0.2); }
.page figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.82rem; text-align: center; }

.purchased { margin-bottom: 1.25rem; padding: 0.9rem 1.1rem; border-radius: 12px; background: #e3f4ea; color: #134e31; font-size: 0.92rem; }

.kind-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 480px) { .kind-picker { grid-template-columns: 1fr; } }
.kind-option { position: relative; cursor: pointer; }
.kind-option input { position: absolute; opacity: 0; pointer-events: none; }
.kind-option > span { display: grid; gap: 0.15rem; height: 100%; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; }
.kind-option small { color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.kind-option b { margin-top: 0.3rem; color: var(--brand); }
.kind-option input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #fff7f5; }
.kind-option input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.kind-option input:disabled + span { opacity: 0.45; cursor: not-allowed; }

.template-panel { display: flex; align-items: center; gap: 1.25rem; }
.template-panel h2 { margin: 0 0 0.75rem; }
.template-thumb { flex-shrink: 0; width: 5.5rem; height: auto; aspect-ratio: 5 / 7; border-radius: 6px; box-shadow: 0 6px 16px rgba(60, 15, 20, 0.2); }

.event-row { margin-bottom: 1rem; padding: 1rem 1rem 0.25rem; border: 1px dashed var(--line); border-radius: 12px; }
.event-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }

.photo-thumb { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; }
.photo-thumb img { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; }
.file-btn { cursor: pointer; }

.publish-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--bg) 30%);
  text-align: center;
}
.publish-bar .btn { width: 100%; max-width: 28rem; }
/* On phones the sticky bar is just the button, so it doesn't cover the form. */
@media (max-width: 640px) {
  .publish-bar { padding-top: 0.75rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); }
  .publish-bar .hint { font-size: 0.75rem; margin-bottom: 0; }
  .publish-bar .hint .long { display: none; }
}
.form-error { margin: 0 0 0.75rem; padding: 0.75rem 1rem; border-radius: 10px; background: #fbe4e1; color: var(--danger); font-size: 0.92rem; }

@media (max-width: 960px) {
  .editor { grid-template-columns: 1fr; padding-top: 1rem; }
  .editor-tabs {
    position: sticky;
    top: 3.75rem;
    z-index: 25;
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .editor-tabs button {
    flex: 1;
    padding: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
  }
  .editor-tabs button[aria-selected='true'] { background: var(--brand); border-color: var(--brand); color: #fff; }
  body:not([data-view='preview']) .preview-pane { display: none; }
  body[data-view='preview'] .editor-form { display: none; }
  .preview-pane { position: static; max-height: none; overflow: visible; }
  .pages { max-width: 30rem; margin: 0 auto; }
}

/* ---------- biodata editor ---------- */

.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.segmented button { padding: 0.35rem 0.9rem; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 0.85rem; cursor: pointer; }
.segmented button[aria-pressed='true'] { background: var(--brand); color: #fff; }
.bio-section-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.bio-section-title {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: none;
  color: var(--ink);
  font: 600 1.1rem 'Poppins', system-ui, sans-serif;
}
.bio-section-title:focus { outline: none; border-color: var(--brand); }
.bio-rows { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }
.bio-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 2.25rem; gap: 0.5rem; align-items: center; }
.bio-row input {
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* under 16px makes iPhones zoom in on focus */
}
.bio-row .bio-label { background: var(--bg); font-weight: 500; }
.bio-row input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.bio-row input::placeholder { color: #b3a3a6; }
.bio-remove { width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; }
.bio-remove:hover { border-color: var(--danger); color: var(--danger); }
@media (max-width: 480px) {
  .bio-row { grid-template-columns: minmax(0, 1fr) 2.25rem; }
  .bio-row .bio-value { grid-column: 1; }
  .bio-row .bio-remove { grid-row: 1; grid-column: 2; }
}
.add-section { margin-bottom: 0.5rem; }
.photo-thumb img.rect { border-radius: 10px; width: 4.5rem; height: 6rem; }

/* ---------- kundli milan ---------- */

.kundli { max-width: 60rem; padding-block: 2rem 1rem; }
.kundli-hero { margin-bottom: 1.5rem; text-align: center; }
.kundli-hero h1 { margin: 0 0 0.75rem; font: 600 clamp(1.8rem, 5vw, 2.6rem)/1.15 'Playfair Display', Georgia, serif; }
.kundli-hero p { max-width: 40rem; margin: 0 auto; color: var(--muted); }
.kundli-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.kundli-form .person { margin: 0; min-width: 0; }
.kundli-form legend { float: left; width: 100%; margin-bottom: 1rem; padding: 0; font-weight: 600; font-size: 1.1rem; }
.kundli-form legend + * { clear: both; }
.kundli-form input:disabled { opacity: 0.5; }
.place-field { position: relative; }
.place-field label { display: grid; gap: 0.35rem; }
.place-field label > span { font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.place-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 20;
  margin: 0.25rem 0 0;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  list-style: none;
}
.place-suggestions button { width: 100%; padding: 0.6rem 0.7rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; }
.place-suggestions button:hover, .place-suggestions button:focus-visible { background: var(--bg); outline: none; }
.place-suggestions .empty { padding: 0.6rem 0.7rem; color: var(--muted); font-size: 0.88rem; }
.place-picked { color: var(--ok); font-size: 0.8rem; }
.kundli-submit { grid-column: 1 / -1; text-align: center; }
.kundli-submit .btn { width: 100%; max-width: 24rem; }
@media (max-width: 720px) { .kundli-form { grid-template-columns: 1fr; } }

.kundli-result { margin-top: 2rem; scroll-margin-top: 5rem; }
.score-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.score-card h2 { margin: 0 0 0.25rem; font: 600 1.6rem/1.2 'Playfair Display', Georgia, serif; }
.score-card p { margin: 0; color: var(--muted); }
.score-ring {
  --tone: var(--brand);
  display: grid;
  place-items: center;
  align-content: center;
  width: 8rem;
  height: 8rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--tone) calc(var(--pct) * 1%), var(--line) 0);
  text-align: center;
}
.score-ring b { font: 600 2.4rem/1 'Playfair Display', Georgia, serif; color: var(--tone); }
.score-ring span { color: var(--muted); font-size: 0.8rem; }
.tone-great .score-ring, .tone-good .score-ring { --tone: var(--ok); }
.tone-ok .score-ring { --tone: #b8892f; }
.tone-low .score-ring { --tone: var(--danger); }
.koota-table td small { display: block; color: var(--muted); font-size: 0.8rem; }
.koota-table .pts { white-space: nowrap; text-align: right; }
.koota-table tfoot td { font-weight: 600; }
@media (max-width: 520px) {
  .koota-table td small, .koota-table .bar { display: none; }
  .koota-table th, .koota-table td { padding: 0.55rem 0.6rem; }
}
.bar { display: inline-block; width: 4rem; height: 0.4rem; margin-right: 0.5rem; overflow: hidden; border-radius: 999px; background: var(--line); vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--brand); }
.dosha-list { margin: 0; padding-left: 1.1rem; }
.dosha-list li { margin-bottom: 0.6rem; }
.person-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.person-card { margin: 0; }
.person-card h3 { margin: 0 0 0.75rem; }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; text-align: right; }
.notes ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.cta-row p { margin-top: 0; }
.kundli-info { margin-top: 2rem; }
.koota-list { columns: 2; padding-left: 1.1rem; }
@media (max-width: 520px) { .koota-list { columns: 1; } }

/* ---------- SEO landing pages ---------- */

.seo-page { max-width: 62rem; padding-block: 1.5rem 1rem; }
.breadcrumb { margin-bottom: 1.5rem; color: var(--muted); font-size: 0.85rem; }
.breadcrumb a { color: var(--muted); }
.seo-hero { max-width: 44rem; margin: 0 auto 2rem; text-align: center; }
.seo-hero h1 { margin: 0 0 1rem; font: 600 clamp(1.9rem, 5vw, 2.8rem)/1.15 'Playfair Display', 'Noto Serif Devanagari', Georgia, serif; }
.seo-hero .lead { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.08rem; }
.seo-gallery { margin-bottom: 2.5rem; }
.seo-samples { display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.bio-sample-card { width: 13rem; max-width: 30%; height: auto; aspect-ratio: 1200 / 1697; border-radius: 6px; box-shadow: 0 16px 36px rgba(60, 15, 20, 0.22); }
@media (max-width: 520px) { .bio-sample-card { max-width: 46%; } .bio-sample-card:nth-child(3) { display: none; } }
.seo-body { max-width: 44rem; margin: 0 auto; }
.seo-body section { margin-bottom: 2rem; }
.seo-body h2, .seo-faq h2, .seo-related h2 { margin: 0 0 0.75rem; font: 600 1.45rem/1.25 'Playfair Display', 'Noto Serif Devanagari', Georgia, serif; }
.seo-body li { margin-bottom: 0.45rem; }
.seo-body blockquote { margin: 0 0 1rem; padding: 0.9rem 1.1rem; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: var(--surface); font-style: italic; }
.seo-faq { max-width: 44rem; margin: 2.5rem auto; }
.seo-cta { max-width: 44rem; margin: 0 auto 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.seo-cta p { margin: 0; }
.seo-related { max-width: 44rem; margin: 0 auto; }
.seo-related ul, .explore-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.seo-related a, .explore-list a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}
.seo-related a:hover, .explore-list a:hover { border-color: var(--brand); color: var(--brand); }
.explore-list { justify-content: center; max-width: 52rem; margin: 0 auto; }

/* ---------- dialogs ---------- */

.dialog {
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1.5rem;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.dialog-wide { width: min(64rem, calc(100% - 2rem)); }
.dialog::backdrop { background: rgba(30, 10, 15, 0.55); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog-head h2 { margin: 0; font: 600 1.4rem/1.2 'Playfair Display', Georgia, serif; }
.dialog-close { width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 1rem; cursor: pointer; }
.download-actions { display: grid; gap: 0.75rem; margin: 1.25rem 0 0.5rem; }
.download-status { min-height: 1.5em; margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; text-align: center; }
.private-link { padding-top: 1rem; border-top: 1px solid var(--line); }
.private-link input { font-size: 0.85rem; }

/* ---------- legal ---------- */

.legal { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem; }
.legal h1 { font: 600 2rem/1.2 'Playfair Display', Georgia, serif; }
.legal h2 { margin-top: 2rem; font-size: 1.15rem; }
.legal .updated { color: var(--muted); font-size: 0.9rem; }
