/* Janam Kundli — vratfestivals.com */
.kundli-shell { max-width: 1060px; }
.kc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; background: var(--surface, #fffaf0); border: 1px solid var(--border, #e5cf9f); border-radius: 14px; padding: 20px; }
.kc-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #6d5322; }
.kc-field input, .kc-field select { width: 100%; padding: 10px 12px; border: 1px solid #d8c491; border-radius: 9px; font-size: 15px; background: #fff; font-family: inherit; box-sizing: border-box; }
.kc-field-wide { grid-column: span 2; }
.kc-manual { display: contents; }
.kc-manual[hidden] { display: none; }
.kc-actions { display: flex; align-items: end; }
.kc-btn { background: #7a1f1f; color: #fff; border: 0; border-radius: 10px; padding: 11px 26px; font-size: 16px; cursor: pointer; font-family: inherit; }
.kc-btn:hover { background: #5f1616; }
.kc-err { color: #b00020; grid-column: 1 / -1; margin: 0; }
.kc-card { background: #fff; border: 1px solid var(--border, #e5cf9f); border-radius: 14px; padding: 22px; margin-top: 22px; box-shadow: 0 4px 18px rgba(122, 82, 10, 0.06); }
.kc-card h2, .kc-card h3 { color: #5a1515; margin-top: 0; }
.kc-card h3 { margin-top: 22px; }
.kc-card h3:first-child { margin-top: 0; }
.kc-card h4 { color: #7a1f1f; margin: 16px 0 4px; }
.kc-card p { line-height: 1.65; }
.kc-keyrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.kc-key { background: linear-gradient(160deg, #fff8ec, #fdf1dc); border: 1px solid #e5cf9f; border-radius: 12px; padding: 12px 14px; }
.kc-key span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #a3761a; }
.kc-key b { display: block; font-size: 21px; color: #4a2f10; margin: 3px 0; }
.kc-key small { color: #6d5322; }
.kc-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; align-items: start; }
.kc-chart { width: 100%; height: auto; max-width: 340px; display: block; margin: 0 auto; }
.kc-frame { fill: #fffdf6; stroke: #7a1f1f; stroke-width: 2; }
.kc-lines { fill: none; stroke: #c9a227; stroke-width: 1.2; }
.kc-pl { font-size: 15px; font-weight: 700; fill: #5a1515; text-anchor: middle; }
.kc-sign { font-size: 11px; fill: #a3761a; text-anchor: middle; }
.kc-chartcap { text-align: center; font-size: 13px; color: #6d5322; margin-top: 6px; }
.kc-south { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid #7a1f1f; max-width: 340px; margin: 0 auto; background: #fffdf6; }
.kc-sc { border: 1px solid #e5cf9f; min-height: 52px; padding: 5px 6px; font-size: 12.5px; font-weight: 600; color: #5a1515; position: relative; line-height: 1.35; }
.kc-sc-sign { position: absolute; top: 2px; right: 5px; font-size: 10px; color: #a3761a; font-weight: 400; }
.kc-sc-lag { background: #fdf1dc; }
.kc-sc-center { display: flex; align-items: center; justify-content: center; text-align: center; color: #7a1f1f; font-size: 13px; border: 1px solid #e5cf9f; }
.kc-tablewrap { overflow-x: auto; }
.kc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kc-table th, .kc-table td { border: 1px solid #e5cf9f; padding: 7px 9px; text-align: left; }
.kc-table th { background: #fdf1dc; color: #5a1515; }
.kc-table tr.kc-now { background: #fff3d6; }
.kc-panchang { margin-top: 14px; }
.kc-current { background: linear-gradient(160deg, #fff8ec, #fdf1dc); border: 1px solid #e5cf9f; border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.kc-note { color: #8a7a5c; font-size: 13px; }
#kundli-print { display: none; }
@media (max-width: 560px) { .kc-field-wide { grid-column: span 1; } .kc-card { padding: 16px; } }
@media print {
  body * { visibility: hidden; }
  #kundli-print, #kundli-print * { visibility: visible; }
  #kundli-print { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 10mm; font-size: 11.5pt; line-height: 1.6; color: #222; }
  #kundli-print h1 { font-size: 24pt; color: #5a1515; margin-bottom: 2mm; }
  #kundli-print h2 { font-size: 15pt; color: #5a1515; border-bottom: 1.5px solid #c9a227; padding-bottom: 1.5mm; margin: 8mm 0 3mm; page-break-after: avoid; }
  #kundli-print h3 { font-size: 12.5pt; color: #7a1f1f; margin: 5mm 0 2mm; page-break-after: avoid; }
  #kundli-print h4 { font-size: 11.5pt; margin: 4mm 0 1.5mm; page-break-after: avoid; }
  #kundli-print .kcp-cover { text-align: center; border: 2px solid #c9a227; padding: 10mm 6mm; margin-bottom: 8mm; }
  #kundli-print .kcp-sub { font-size: 13pt; color: #6d5322; }
  #kundli-print .kcp-name { font-size: 16pt; font-weight: 700; color: #4a2f10; }
  #kundli-print .kc-table th, #kundli-print .kc-table td { border-color: #bbb; font-size: 10.5pt; }
  #kundli-print .kc-table th { background: #f3e9d2; }
  #kundli-print .kc-charts { display: flex; gap: 8mm; }
  #kundli-print .kc-chart { max-width: 72mm; }
  #kundli-print .kcp-disclaimer { font-size: 9.5pt; color: #555; border-top: 1px solid #bbb; margin-top: 8mm; padding-top: 3mm; }
  #kundli-print .kcp-foot { text-align: center; font-size: 9.5pt; color: #777; }
}

/* v1.1: settings + coordinates + print cover */
.kc-or { text-align: center; color: #8a6d1f; font-size: 13px; margin: 2px 0 8px; }
.kc-detected { color: #2e7d32; font-size: 13.5px; margin: 2px 0 8px; font-weight: 600; }
@media print {
  #kundli-print .kc-coverpage { page-break-after: always; }
  #kundli-print .kc-coverpage svg { width: 100%; height: auto; display: block; }
  #kundli-print .kcv-om { font-size: 26px; fill: #7b1e1e; text-anchor: middle; font-family: 'Noto Serif Devanagari', Georgia, serif; }
  #kundli-print .kcv-shloka { font-size: 20px; fill: #7b1e1e; text-anchor: middle; font-family: 'Noto Serif Devanagari', Georgia, serif; }
  #kundli-print .kcv-title { font-size: 46px; font-weight: 700; fill: #7b1e1e; text-anchor: middle; font-family: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', Georgia, serif; }
  #kundli-print .kcv-en { font-size: 18px; letter-spacing: 7px; fill: #8a6d1f; text-anchor: middle; font-family: Georgia, serif; }
  #kundli-print .kcv-sub { font-size: 13.5px; fill: #666; text-anchor: middle; font-family: Georgia, serif; }
  #kundli-print .kcv-name { font-size: 29px; font-weight: 700; fill: #333; text-anchor: middle; font-family: 'Noto Serif Devanagari', Georgia, serif; }
  #kundli-print .kcv-det { font-size: 15.5px; fill: #333; text-anchor: middle; font-family: 'Noto Serif Devanagari', Georgia, serif; }
  #kundli-print .kcv-lab { fill: #7b1e1e; font-weight: 700; }
  #kundli-print .kcv-gen { font-size: 12.5px; fill: #777; text-anchor: middle; font-family: Georgia, serif; }
}
