/* Ashunath biodata maker. Everything is scoped under .ashu-biodata so the theme can't clash with it. */
/* Base tokens and fonts come from tools/common/common.css. */

.ashu-biodata .ab-app { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) }
@media (min-width: 960px) { .ashu-biodata .ab-app { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) } }
.ashu-biodata .ab-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; margin: 0 }
.ashu-biodata .ab-panel, .ashu-biodata fieldset { background: var(--ashu-surface); border: 1px solid var(--ashu-line); border-radius: 12px; padding: 16px; min-width: 0; margin: 0 }
.ashu-biodata legend { font-weight: 700; font-size: 17px; padding: 0 6px; color: var(--ashu-accent) }
.ashu-biodata legend small { font-weight: 400; color: var(--ashu-muted); font-size: 13px; margin-left: 6px }
.ashu-biodata .ab-label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ashu-muted); margin: 0 0 8px; font-weight: 600 }
.ashu-biodata .ab-tag { display: inline-block; font-size: 13px; color: var(--ashu-gold); background: var(--ashu-gold-soft); padding: 4px 10px; border-radius: 99px; margin-bottom: 12px }

.ashu-biodata .ab-thumbs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)) }
.ashu-biodata .ab-thumb { font: inherit; cursor: pointer; border: 2px solid transparent; border-radius: 10px; background: transparent; padding: 4px; color: var(--ashu-fg);
  display: flex; flex-direction: column; gap: 4px; position: relative }
.ashu-biodata .ab-thumb[aria-pressed="true"] { border-color: var(--ashu-accent); background: var(--ashu-accent-soft) }
.ashu-biodata .ab-thumb .sw { aspect-ratio: 3 / 4; border-radius: 5px; padding: 6px; display: grid }
.ashu-biodata .ab-thumb .sw i { background: var(--tp); border-radius: 2px; display: flex; flex-direction: column; align-items: center; padding-top: 5px; gap: 4px }
.ashu-biodata .ab-thumb .sw i svg, .ashu-biodata .ab-thumb .sw i img { width: 22px; height: 22px; object-fit: contain }
.ashu-biodata .ab-thumb .sw i b { display: block; height: 3px; width: 70%; background: var(--tr); opacity: .55; border-radius: 2px }
.ashu-biodata .ab-thumb .sw i b + b { width: 55% }
.ashu-biodata .ab-thumb span { font-size: 13px; line-height: 1.2; text-align: center }
.ashu-biodata .ab-thumb .star { position: absolute; top: 0; right: 0; font-size: 11px; font-weight: 700; background: var(--ashu-gold); color: #fff; border-radius: 6px; padding: 0 5px }

.ashu-biodata .ab-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) }
.ashu-biodata .ab-field { display: flex; flex-direction: column; gap: 3px; min-width: 0 }
.ashu-biodata .ab-field.wide { grid-column: 1 / -1 }
.ashu-biodata .ab-field label { font-size: 15px; font-weight: 500 }
.ashu-biodata .ab-field label small { color: var(--ashu-muted); font-weight: 400; font-size: 12px; margin-left: 4px }
.ashu-biodata input, .ashu-biodata textarea, .ashu-biodata select { font: inherit; font-size: 16px; color: var(--ashu-fg); background: var(--ashu-bg);
  border: 1px solid var(--ashu-line); border-radius: 7px; padding: 8px 10px; width: 100%; min-width: 0; margin: 0 }
.ashu-biodata textarea { min-height: 64px; resize: vertical }
.ashu-biodata input[type=file] { padding: 6px; font-size: 14px }
.ashu-biodata .ab-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px }
.ashu-biodata .ab-checks label { display: flex; gap: 7px; align-items: center; font-size: 15px; cursor: pointer }
.ashu-biodata .ab-checks input { width: 18px; height: 18px; accent-color: var(--ashu-accent) }
.ashu-biodata .ab-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }
.ashu-biodata .ab-hint { font-size: 13px; color: var(--ashu-muted) }
.ashu-biodata .ab-btn { font: inherit; font-size: 15px; font-weight: 600; border-radius: 9px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--ashu-accent); background: var(--ashu-accent); color: #fff; line-height: 1.4 }
.ashu-biodata .ab-btn.ghost { background: transparent; color: var(--ashu-accent) }
.ashu-biodata .ab-btn.warn { background: var(--ashu-gold); border-color: var(--ashu-gold); color: #fff }

.ashu-biodata .ab-preview { min-width: 0 }
@media (min-width: 960px) { .ashu-biodata .ab-preview { position: sticky; top: 90px; align-self: start } }
.ashu-biodata .ab-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px }
.ashu-biodata .ab-preview-head h2 { margin: 0; font-size: 17px }
.ashu-biodata .ab-paper { overflow-x: auto; padding: 6px 4px 12px }
.ashu-biodata .ab-buy { margin-top: 10px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--ashu-surface); border: 1px dashed var(--ashu-gold); border-radius: 12px; padding: 12px 14px }
.ashu-biodata .ab-buy b { color: var(--ashu-gold) }
.ashu-biodata .ab-buy span { font-size: 14px; color: var(--ashu-muted); display: block }
.ashu-biodata .ab-toast { font-size: 14px; color: var(--ashu-accent); min-height: 1.2em; margin-top: 6px }

/* ---------- the sheet: a printed document; colours come from the chosen design ---------- */
.ashu-sheet { --paper: #fff7ea; --ink: #5a1e00; --lab: #8a4a1a; --rule: #e07b00; --g1: #ffd27a; --g2: #b33a00; --sw: linear-gradient(135deg, #ff7a00, #ffc93c);
  width: 100%; max-width: 600px; min-width: 300px; margin: 0 auto; background: var(--paper); color: var(--ink);
  font-family: var(--ashu-f-doc); padding: 0; position: relative; box-shadow: 0 10px 30px rgba(40, 10, 0, .2) }
/* Frames use only solid colours, linear gradients, borders and text, so the
   downloaded image (drawn by html2canvas) looks the same as the preview. */
.ashu-sheet .in { position: relative; padding: 26px 28px 16px; overflow: hidden }
.ashu-sheet .cn, .ashu-sheet .zz { display: none }
.ashu-sheet .gan { display: block; width: 92px; height: 92px; margin: 0 auto 2px; object-fit: contain }
.ashu-sheet .inv { text-align: center; font-size: 15px; letter-spacing: .03em; color: var(--lab) }
.ashu-sheet .ttl { text-align: center; font-family: var(--ashu-f-display); font-size: 30px; margin: 2px 0 0; color: var(--ink); line-height: 1.3 }
.ashu-sheet .orn { display: flex; align-items: center; gap: 10px; width: 62%; margin: 4px auto 14px; color: var(--rule); font-size: 13px; line-height: 1 }
.ashu-sheet .orn::before, .ashu-sheet .orn::after { content: ""; flex: 1; height: 1px; background: var(--rule) }
.ashu-sheet .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start }
.ashu-sheet .top.nophoto { grid-template-columns: minmax(0, 1fr) }
.ashu-sheet .ph { width: 116px; aspect-ratio: 4 / 5; max-width: 100%; border: 2px solid var(--rule); padding: 3px; background: #fff; border-radius: 3px }
.ashu-sheet .ph img { width: 100%; height: 100%; object-fit: cover; display: block }
.ashu-sheet .ph .none { width: 100%; height: 100%; display: grid; place-items: center; font-size: 13px; color: var(--lab); text-align: center; background: rgba(0,0,0,.05) }
.ashu-sheet.is-export .ph:has(.none) { display: none }
.ashu-sheet.is-clean .wm, .ashu-sheet.is-clean .foot { display: none }
.ashu-sheet .nm { font-size: 21px; margin: 0 0 6px; color: var(--ink); font-weight: 700 }
.ashu-sheet h3 { font-family: var(--ashu-f-doc); font-size: 17px; margin: 14px 0 5px; color: var(--ink); display: flex; align-items: center; gap: 10px }
.ashu-sheet h3::before { content: "❖"; color: var(--rule); font-size: 13px }
.ashu-sheet h3::after { content: ""; flex: 1; height: 1px; background: var(--rule); opacity: .7 }
.ashu-sheet table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; border: 0 }
.ashu-sheet td { padding: 2.5px 0; vertical-align: top; border: 0; background: transparent }
.ashu-sheet td.k { width: 38%; color: var(--lab); white-space: nowrap; padding-right: 8px }
.ashu-sheet td.k::after { content: " :" }
.ashu-sheet .exp { font-size: 15px; margin: 0 }
.ashu-sheet .foot { margin-top: 16px; padding-top: 7px; border-top: 1px dotted var(--rule); display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--lab); font-family: var(--ashu-f-body) }
.ashu-sheet .wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden }
.ashu-sheet .wm span { transform: rotate(-28deg); font-family: var(--ashu-f-body); font-weight: 700; font-size: 46px; color: var(--ink); opacity: .06; white-space: nowrap }

.ashu-sheet.fr-grad { padding: 12px; background: var(--sw) }
.ashu-sheet.fr-grad .in { background: var(--paper) }
.ashu-sheet.fr-grad .in::before, .ashu-sheet.fr-double .in::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--rule); pointer-events: none }
.ashu-sheet.fr-double { border: 3px solid var(--rule) }
.ashu-sheet.fr-bar { border-top: 12px solid var(--rule); border-bottom: 4px solid var(--rule) }
.ashu-sheet.fr-floral { border: 1px solid var(--rule) }
.ashu-sheet.fr-floral .in { padding: 34px 36px 34px }
.ashu-sheet.fr-floral .cn { display: block; position: absolute; width: 92px; height: 92px; border-radius: 50%; background: var(--g1) }
.ashu-sheet.fr-floral .cn.c2, .ashu-sheet.fr-floral .cn.c3 { background: var(--g3, var(--g1)) }
.ashu-sheet .cn.c1 { top: -46px; left: -46px } .ashu-sheet .cn.c2 { top: -46px; right: -46px }
.ashu-sheet .cn.c3 { bottom: -46px; left: -46px } .ashu-sheet .cn.c4 { bottom: -46px; right: -46px }
.ashu-sheet.fr-paithani { border: 14px solid var(--frame) }
.ashu-sheet.fr-paithani .zz { display: block; position: absolute; left: 0; right: 0; height: 14px; overflow: hidden; white-space: nowrap;
  color: var(--rule); background: var(--frame); font-family: var(--ashu-f-body); font-size: 14px; line-height: 14px; letter-spacing: -1px }
.ashu-sheet.fr-paithani .zz.t { top: 0 } .ashu-sheet.fr-paithani .zz.b { bottom: 0 }
.ashu-sheet.fr-paithani .in { padding-top: 34px; padding-bottom: 28px }

@media (max-width: 460px) {
  .ashu-sheet .in { padding: 22px 16px 14px }
  .ashu-sheet .ph { width: 88px }
  .ashu-sheet table { font-size: 14px }
  .ashu-sheet td.k { width: auto; white-space: normal }
}
@media (prefers-reduced-motion: no-preference) { .ashu-biodata .ab-thumb, .ashu-biodata .ab-btn { transition: border-color .15s, background .15s } }
/* The free view is deliberately incomplete. Full image/PDF is only rendered after purchase verification. */
.ashu-biodata .ab-paper { position: relative; user-select: none; -webkit-user-select: none; }

/* ===== Ashunath 4 refresh ===== */
.ashu-biodata .ab-app { gap: clamp(20px, 3vw, 36px) }
.ashu-biodata fieldset legend small, .ashu-biodata .ab-field label small { color: var(--ashu-muted); font-weight: 500 }
.ashu-biodata .ab-thumb { border-radius: 14px !important; box-shadow: var(--ashu-sh-1); transition: transform .15s, box-shadow .15s }
.ashu-biodata .ab-thumb:hover { transform: translateY(-2px); box-shadow: var(--ashu-sh-2) }
.ashu-biodata .ab-thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ashu-accent), var(--ashu-sh-2) !important }
.ashu-biodata .ab-paper { padding: 18px; border-radius: 22px; background: radial-gradient(120% 80% at 50% 0%, #fff4e6 0%, #f6f7fb 60%); border: 1px solid var(--ashu-line) }
.ashu-biodata .ashu-sheet { box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 28px 56px -22px rgba(60, 20, 0, .45) }
.ashu-biodata .ab-field input, .ashu-biodata .ab-field textarea, .ashu-biodata .ab-field select, .ashu-biodata .ab-grid input, .ashu-biodata .ab-grid select { background: #fff; border: 1px solid #d5d9e6; border-radius: 12px; padding: 10px 12px }
.ashu-biodata .ab-tag { background: #eef0ff; color: #4338ca; font-weight: 700 }
.ashu-sheet.is-clean .ashu-wmgrid { display: none !important }
@media (max-width: 460px) { .ashu-biodata .ab-paper { padding: 6px } }

/* ===== Each design has its own layout, not only its own colours ===== */
/* शाही लाल: filled heading bands, bold centred name */
.ashu-sheet.d-lal h3 { justify-content: center; background: var(--g2); color: #fff; padding: 4px 10px; border-radius: 3px; font-size: 16px }
.ashu-sheet.d-lal h3::before, .ashu-sheet.d-lal h3::after { content: "✦"; flex: 0 0 auto; height: auto; background: none; color: var(--g1); opacity: 1; font-size: 11px }
.ashu-sheet.d-lal .nm { font-size: 24px; border-bottom: 2px solid var(--rule); padding-bottom: 4px; display: inline-block }
.ashu-sheet.d-lal td.k { font-weight: 600 }
/* मोरपंखी: coloured header block, headings with side bar */
.ashu-sheet.d-mor .in { padding-top: 0 }
.ashu-sheet.d-mor .gan { margin-top: 18px }
.ashu-sheet.d-mor .ttl { color: var(--g2) }
.ashu-sheet.d-mor h3 { border-left: 5px solid var(--rule); padding: 2px 10px; background: var(--g1); border-radius: 0 6px 6px 0; font-size: 16px }
.ashu-sheet.d-mor h3::before, .ashu-sheet.d-mor h3::after { display: none }
.ashu-sheet.d-mor tr:nth-child(even) td { background: rgba(28, 140, 140, .06) }
/* पैठणी: centred section titles with double rules */
.ashu-sheet.d-paithani h3 { justify-content: center; font-size: 17px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 3px 0; margin-top: 16px }
.ashu-sheet.d-paithani h3::before, .ashu-sheet.d-paithani h3::after { content: "❀"; flex: 0 0 auto; height: auto; background: none; color: var(--rule); opacity: 1 }
/* गुलाबी फुले: soft rounded cards per section */
.ashu-sheet.d-phule h3 { justify-content: center; font-size: 16px; margin-top: 16px }
.ashu-sheet.d-phule h3::before { content: "✿" } .ashu-sheet.d-phule h3::after { content: "✿"; flex: 0 0 auto; height: auto; background: none; color: var(--rule); opacity: 1 }
.ashu-sheet.d-phule table { background: rgba(255, 255, 255, .7); border-radius: 10px; border: 1px solid var(--g1) }
.ashu-sheet.d-phule td { padding: 3px 10px }
/* हिरवा मंगल: tinted heading strips */
.ashu-sheet.d-mangal h3 { background: var(--g1); padding: 3px 10px; border-radius: 99px; font-size: 16px }
.ashu-sheet.d-mangal h3::after { display: none }
.ashu-sheet.d-mangal td { border-bottom: 1px dotted rgba(46, 107, 28, .25) }
/* चंदेरी: formal ledger, label column shaded */
.ashu-sheet.d-chanderi h3 { font-size: 15px; color: var(--g2); text-transform: none; border-bottom: 2px solid var(--g2); padding-bottom: 2px }
.ashu-sheet.d-chanderi h3::before, .ashu-sheet.d-chanderi h3::after { display: none }
.ashu-sheet.d-chanderi table { border: 1px solid var(--g1) }
.ashu-sheet.d-chanderi td { padding: 4px 8px; border-bottom: 1px solid var(--g1) }
.ashu-sheet.d-chanderi td.k { background: var(--g1); color: var(--ink) }
/* आधुनिक: left-aligned modern layout, round photo, pill headings */
.ashu-sheet.d-adhunik .gan { width: 64px; height: 64px }
.ashu-sheet.d-adhunik .ttl { font-size: 26px }
.ashu-sheet.d-adhunik .orn { width: 30%; }
.ashu-sheet.d-adhunik .ph { border-radius: 50%; aspect-ratio: 1; padding: 3px; overflow: hidden }
.ashu-sheet.d-adhunik .ph img, .ashu-sheet.d-adhunik .ph .none { border-radius: 50% }
.ashu-sheet.d-adhunik h3 { display: inline-flex; background: var(--rule); color: #fff; font-size: 14px; padding: 3px 14px; border-radius: 99px }
.ashu-sheet.d-adhunik h3::before, .ashu-sheet.d-adhunik h3::after { display: none }
.ashu-sheet.d-adhunik td { border-bottom: 1px solid var(--g1); padding: 4px 0 }
.ashu-sheet.d-adhunik td.k::after { content: "" }
