/* SMV HOROSCOPE V207 — focused UI system for Horoscope, Matching and saved reports. */
:root{
  --smv207-red:#8b1717;--smv207-red-strong:#701010;--smv207-red-soft:#a52a23;
  --smv207-gold:#b88935;--smv207-ivory:#fffaf0;--smv207-surface:#fff;
  --smv207-ink:#2d2522;--smv207-muted:#6e625b;--smv207-line:#e4d7bf;
  --smv207-danger:#9c2525;--smv207-radius-sm:8px;--smv207-radius:12px;--smv207-radius-lg:16px;
  --smv207-shadow-sm:0 4px 14px rgba(69,38,22,.06);--smv207-content:1180px;
  --smv207-body:clamp(15px,.25vw + 14px,16px);--smv207-small:clamp(12px,.18vw + 11px,14px);
  --smv207-h2:clamp(23px,1.8vw,31px);--smv207-h3:clamp(18px,1vw,22px)
}
html{text-size-adjust:100%;-webkit-text-size-adjust:100%}
body.smv-v12-theme{font-family:Inter,"Noto Sans Tamil","Noto Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:var(--smv207-body);line-height:1.6;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
html[lang="ta"] body{font-family:"Noto Sans Tamil","Noto Sans",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;line-height:1.68}

/* Forms and content hierarchy */
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope,#smvMarriageMatching,#smvHoroscopeAuth) :where(h2,h3,h4){font-family:inherit;text-wrap:balance;overflow-wrap:anywhere}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope,#smvMarriageMatching) h2{font-size:var(--smv207-h2)!important;line-height:1.22!important;font-weight:850!important;color:var(--smv207-red)!important;letter-spacing:-.012em!important}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope,#smvMarriageMatching) h3{font-size:var(--smv207-h3)!important;line-height:1.3!important;font-weight:800!important;color:#473a34!important}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope){max-width:var(--smv207-content);margin-inline:auto;padding-inline:clamp(8px,2.2vw,22px)}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope)>.card{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;padding:clamp(14px,2.2vw,22px)!important;border-color:var(--smv207-line)!important;border-radius:var(--smv207-radius)!important;box-shadow:var(--smv207-shadow-sm)!important;background:#fff!important}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope,#smvMarriageMatching,#smvHoroscopeAuth) label{color:#463b35;font-weight:650;line-height:1.35}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope,#smvMarriageMatching,#smvHoroscopeAuth) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea){width:100%;max-width:100%;min-height:44px;box-sizing:border-box;padding:10px 12px;border:1px solid #d8cbb8!important;border-radius:var(--smv207-radius-sm)!important;background:#fff!important;color:var(--smv207-ink)!important;font:inherit;line-height:1.35;box-shadow:0 1px 2px rgba(60,35,20,.025) inset;transition:border-color .16s ease,box-shadow .16s ease}
body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope,#smvMarriageMatching,#smvHoroscopeAuth) :where(input,select,textarea):focus-visible{outline:0!important;border-color:var(--smv207-red)!important;box-shadow:0 0 0 3px rgba(139,23,23,.13)!important}
body.smv-v12-theme :where(input,select,textarea)::placeholder{color:#8c8179;opacity:1}
body.smv-v12-theme .small{font-size:var(--smv207-small);line-height:1.5}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult){margin-top:20px;min-width:0}

/* Actions */
body.smv-v12-theme .btn{min-height:44px;border:1px solid var(--smv207-red-strong)!important;border-radius:var(--smv207-radius-sm)!important;background:linear-gradient(135deg,var(--smv207-red),var(--smv207-red-soft))!important;color:#fff!important;font-family:inherit;font-weight:800!important;line-height:1.15;box-shadow:0 5px 14px rgba(112,16,16,.15)!important;transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}
body.smv-v12-theme .btn.gray,body.smv-v12-theme .btn.alt{background:#fff!important;color:var(--smv207-red)!important;border-color:#cdaaaa!important;box-shadow:none!important}
body.smv-v12-theme .btn.danger,body.smv-v12-theme .smv-dialog-actions .btn.danger{background:var(--smv207-danger)!important;color:#fff!important;border-color:#7e1e1e!important}
body.smv-v12-theme .btn:focus-visible{outline:3px solid rgba(184,137,53,.35)!important;outline-offset:2px}
body.smv-v12-theme .btn:disabled{opacity:.58;transform:none!important;box-shadow:none!important;cursor:not-allowed}
body.smv-v12-theme .action-row{gap:8px!important;align-items:center;flex-wrap:wrap}

/* Auth strip remains temple-themed; form surface is cleaned up only. */
.smv-horoscope-auth{border-color:rgba(184,137,53,.42)!important;box-shadow:none!important}
.smv-horoscope-auth .header-account{gap:8px}.smv-horoscope-auth .action-row{gap:7px!important}.smv-horoscope-auth .small{font-size:12px!important;line-height:1.4!important}

/* Generated Horoscope results */
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.card,.adv-section,.phase1-module,.v5-module,.numerology-module,.birth-time-panchang,.hora-section,.avastha154-section){border-color:var(--smv207-line)!important;border-radius:var(--smv207-radius)!important;box-shadow:none!important}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.adv-section,.phase1-module,.v5-module,.numerology-module,.birth-time-panchang,.hora-section,.avastha154-section){margin-block:12px!important;background:#fff!important}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.home-rule,.smv-part-heading){color:var(--smv207-red)!important;font-weight:850!important;letter-spacing:.015em}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.small,.mm-note){color:var(--smv207-muted)!important}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.adv-table-wrap,.data-table-wrap,.bhava-table-wrap,.smv-viii-table-scroll,.smv-tithi-table-scroll,.adv-scroll){box-sizing:border-box;width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;border-radius:var(--smv207-radius-sm);overscroll-behavior-x:contain}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table{border-collapse:collapse;max-width:100%;font-variant-numeric:tabular-nums}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .smv-shadbala-scroll{overflow-x:auto;overflow-y:hidden;touch-action:pan-x pan-y}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table.smv-shadbala-table{width:max-content;min-width:100%;max-width:none;table-layout:auto;font-size:.78rem;line-height:1.3}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table.smv-shadbala-table :where(th,td){min-width:86px;padding:7px 8px;white-space:nowrap}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table.smv-shadbala-table th:first-child,
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table.smv-shadbala-table td:first-child{min-width:90px}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table.smv-shadbala-table th{white-space:normal;line-height:1.3}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .smv-shadbala-method-note{font-size:.78rem;line-height:1.45;color:#62534a;margin:4px 0 8px}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .smv-shadbala-status{display:inline-block;white-space:normal;font-size:.72rem;line-height:1.3;font-weight:750}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .smv-strength-pass{color:#286341}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .smv-strength-below{color:#8b2727}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .smv-ayurdaya-average-basis{display:block;margin-top:.28em;font-size:.84rem;line-height:1.45;font-weight:450;color:#594c42}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(table,.data-table,.smv-ref-table,.bhava-table,.strength-table,.panchang-data-table) th{font-weight:800!important;color:#4a352d!important;background:#fff7e8!important}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(table,.data-table,.smv-ref-table,.bhava-table,.strength-table,.panchang-data-table) :where(th,td){border-color:#e7dcc9!important;line-height:1.42;vertical-align:top}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) details{border-color:var(--smv207-line)!important;border-radius:var(--smv207-radius-sm)!important}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) summary{font-weight:760;line-height:1.4}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.error,.mm-error){color:var(--smv207-danger)!important;background:#fff5f4;border-color:#ecc8c4!important}
body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) .horoscope-export-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* Marriage Matching */
#smvMarriageMatching{max-width:980px!important;margin:clamp(24px,4vw,42px) auto!important;padding:clamp(14px,2.4vw,24px)!important;border:1px solid var(--smv207-line)!important;border-radius:var(--smv207-radius-lg)!important;background:#fff!important;box-shadow:var(--smv207-shadow-sm)!important}
#smvMarriageMatching .mm-grid{gap:clamp(10px,1.5vw,16px)!important}
#smvMarriageMatching .mm-birth-grid fieldset{padding:12px!important;border:1px solid #eadfca!important;border-radius:var(--smv207-radius)!important;background:#fffdfa}
#smvMarriageMatching .mm-birth-grid legend{color:var(--smv207-red)!important;font-weight:850!important;background:#fffdfa;border-radius:6px}
#smvMarriageMatching #mmCheck{min-height:44px!important;padding:10px 18px!important;border:1px solid var(--smv207-red-strong)!important;border-radius:var(--smv207-radius-sm)!important;background:linear-gradient(135deg,var(--smv207-red),var(--smv207-red-soft))!important;color:#fff!important;font-weight:850!important;box-shadow:0 5px 14px rgba(112,16,16,.14)!important}
#smvMarriageMatching .mm-full-results{gap:14px!important}
#smvMarriageMatching .mm-person-result{padding:14px!important;border:1px solid var(--smv207-line)!important;border-radius:var(--smv207-radius)!important;background:#fff!important}
#smvMarriageMatching .mm-facts>div{grid-template-columns:minmax(130px,30%) 1fr!important;gap:12px!important;padding:9px 0!important;border-bottom-color:#eee3d4!important}
#smvMarriageMatching :where(.mm-verdict,.mm-consult-why,.mm-reality,.mm-human-topic,.mm-strength-matrix,.mm-benefits){border-radius:var(--smv207-radius)!important;border-color:var(--smv207-line)!important}
#smvMarriageMatching .mm-verdict{font-weight:850!important}
#smvMarriageMatching .mm-place-results{margin-top:5px!important;padding:2px 0!important}
#smvMarriageMatching .mm-place-row{padding:4px 2px!important;line-height:1.4!important;text-underline-offset:2px}

/* Saved reports: preserve the compact header-integrated color treatment, only normalize geometry. */
#smvSavedReports.smv-saved-reports{max-width:980px!important;margin:6px auto 12px!important;padding:3px 8px!important;border:0!important;background:transparent!important;box-shadow:none!important}
#smvSavedReports .smv-saved-group{padding:4px 0!important}
#smvSavedReports .smv-saved-group h3{font-size:.9rem!important;line-height:1.2!important;margin:0 0 3px!important}
#smvSavedReports .smv-saved-row{grid-template-columns:minmax(0,1fr) auto auto auto!important;gap:4px!important;min-height:31px!important;padding:4px 0!important}
#smvSavedReports .smv-saved-row b{font-size:.78rem!important;line-height:1.18!important}#smvSavedReports .smv-saved-row small{font-size:.62rem!important;line-height:1.15!important}
#smvSavedReports .smv-saved-row button{min-width:42px!important;min-height:28px!important;padding:4px 6px!important;border-radius:6px!important;font-size:.65rem!important}

@media(max-width:640px){
  :root{--smv207-h2:clamp(21px,5.8vw,26px);--smv207-h3:clamp(17px,4.6vw,21px)}
  body.smv-v12-theme :where(#english-horoscope,#tamil-horoscope){padding-inline:6px}
  body.smv-v12-theme .action-row>.btn{flex:1 1 auto;min-width:min(140px,100%)}
  #smvMarriageMatching{margin:22px 6px!important;padding:12px 10px!important}
  #smvMarriageMatching .mm-birth-grid fieldset{padding:10px!important}
  #smvMarriageMatching .mm-facts>div{grid-template-columns:1fr!important;gap:3px!important}
  body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) :where(.adv-section,.phase1-module,.v5-module,.numerology-module,.birth-time-panchang,.hora-section,.avastha154-section){padding:10px!important}
  body.smv-v12-theme :where(#englishHoroscopeResult,#tamilHoroscopeResult) table{font-size:12px}
  #smvSavedReports.smv-saved-reports{padding-inline:3px!important}#smvSavedReports .smv-saved-row{gap:3px!important}#smvSavedReports .smv-saved-row button{min-width:38px!important;padding-inline:5px!important}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}


/* Nakshatra matching: both date-of-birth and Rasi/star entry use one form layer.
   Keep each person's legend/labels and all actual input borders readable. */
#smvMarriageMatching :is(#mmPublicChoice,#mmFullEntry,#mmManualEntry,
  #mmFullEntry .mm-birth-grid,#mmManualEntry .mm-birth-grid,
  #mmFullEntry .mm-gochar-date,#mmFullEntry .mm-bottom-payment){
  box-sizing:border-box!important;
  max-width:100%!important;
  min-width:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  background-image:none!important;
  outline:0!important;
}
#smvMarriageMatching #mmPublicChoice{
  max-width:680px!important;
  padding:0!important;
  margin:12px auto!important;
}
/* Two person sections remain labelled but never sit in nested cards. */
#smvMarriageMatching :is(#mmFullEntry,#mmManualEntry) .mm-birth-grid fieldset{
  box-sizing:border-box!important;
  min-width:0!important;
  margin:0!important;
  padding:3px 0 10px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  background-image:none!important;
  outline:0!important;
}
#smvMarriageMatching :is(#mmFullEntry,#mmManualEntry) .mm-birth-grid legend{
  background:transparent!important;
  background-image:none!important;
  border:0!important;box-shadow:none!important;
  padding:0 0 3px!important;
}
#smvMarriageMatching :is(#mmFullEntry,#mmManualEntry) .mm-birth-grid{
  margin:10px 0!important;
  gap:clamp(12px,2vw,24px)!important;
}
@media(max-width:620px){
  #smvMarriageMatching :is(#mmFullEntry,#mmManualEntry) .mm-birth-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }
}


/* Saved Reports V1: keep the account list outside the compact header action grid. */
#smvSavedReports.smv-saved-reports{
  display:block!important;box-sizing:border-box!important;width:100%!important;max-width:980px!important;
  margin:12px auto 18px!important;padding:10px 12px!important;
  border:1px solid #e2cdb0!important;border-radius:10px!important;
  background:#fffaf2!important;color:#30251f!important;
}
#smvSavedReports[hidden]{display:none!important}
#smvSavedReports .smv-saved-group{display:block!important;min-width:0!important;padding:6px 0!important}
#smvSavedReports .smv-saved-group+.smv-saved-group{margin-top:8px!important;padding-top:10px!important;border-top:1px solid #e2cdb0!important}
#smvSavedReports .smv-saved-group h3{margin:2px 0 7px!important;color:#701010!important;-webkit-text-fill-color:#701010!important;font-size:1rem!important;line-height:1.35!important;font-weight:850!important}
#smvSavedReports .smv-saved-row{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;
  gap:10px!important;min-width:0!important;min-height:48px!important;padding:9px 0!important;
  border-top:1px solid #eadfca!important;
}
#smvSavedReports .smv-saved-row>span{display:block!important;min-width:0!important;max-width:100%!important}
#smvSavedReports .smv-saved-row b{display:block!important;color:#30251f!important;-webkit-text-fill-color:#30251f!important;font-size:.93rem!important;line-height:1.4!important;font-weight:800!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
#smvSavedReports .smv-saved-row small{display:block!important;margin-top:3px!important;color:#62564d!important;-webkit-text-fill-color:#62564d!important;font-size:.78rem!important;line-height:1.4!important;white-space:normal!important;overflow-wrap:anywhere!important}
#smvSavedReports .smv-saved-actions{display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;flex-wrap:wrap!important;min-width:0!important}
#smvSavedReports .smv-saved-row button,
#smvSavedReports [data-saved-sync-now]{
  display:inline-flex!important;box-sizing:border-box!important;align-items:center!important;justify-content:center!important;
  min-width:58px!important;min-height:36px!important;padding:8px 11px!important;
  border:1px solid #701010!important;border-radius:7px!important;
  background:#8b1717!important;color:#fff!important;-webkit-text-fill-color:#fff!important;
  font-family:inherit!important;font-size:.8rem!important;font-weight:800!important;line-height:1.2!important;
  text-align:center!important;white-space:nowrap!important;box-shadow:none!important;opacity:1!important;
}
#smvSavedReports .smv-saved-row button:hover,
#smvSavedReports [data-saved-sync-now]:hover{background:#701010!important;border-color:#560b0b!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
#smvSavedReports .smv-saved-row button:focus-visible,
#smvSavedReports [data-saved-sync-now]:focus-visible{outline:3px solid #d7a34a!important;outline-offset:2px!important}
#smvSavedReports .smv-saved-row .smv-delete-report{min-width:68px!important;background:#8b1717!important;border-color:#701010!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
#smvSavedReports .smv-saved-sync-bar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important;margin:0 0 8px!important;color:#62564d!important;font-size:.78rem!important;line-height:1.45!important}
#smvSavedReports .smv-saved-sync-bar [data-saved-sync-status]{min-width:0!important;overflow-wrap:anywhere!important}
#smvSavedReports .smv-saved-group>p{margin:4px 0!important;color:#62564d!important;line-height:1.5!important}
@media(max-width:600px){
  #smvSavedReports.smv-saved-reports{width:100%!important;max-width:none!important;margin:9px 0 14px!important;padding:8px 9px!important}
  #smvSavedReports .smv-saved-row{grid-template-columns:minmax(0,1fr)!important;gap:8px!important;min-height:0!important;padding:10px 0!important}
  #smvSavedReports .smv-saved-actions{justify-content:flex-start!important;gap:7px!important}
  #smvSavedReports .smv-saved-row button{min-width:64px!important;min-height:36px!important;padding:8px 10px!important;font-size:.78rem!important}
  #smvSavedReports .smv-saved-row .smv-delete-report{min-width:72px!important}
}
