/* Shared mangosteen theme; exact-selector duplicate declarations consolidated. */
/* Shared web / native WebView presentation. Keep astronomical SVG geometry intact. */
:root{
  color-scheme:light;
  --plum:#321536;--plum-dark:#321536;--plum-soft:#e9dced;
  --bg:#e9dfcc;--card:#fffaf0;--paper:#fffaf0;--paper-deep:#eee3cd;
  --ink:#251b2b;--muted:#57455f;--line:#cbbbd3;
  --accent:#542b60;--accent2:#714580;
  --lacquer:#38203f;--lacquer-2:#542b60;--parchment:#f5f2f7;
  --vermillion:#542b60;--vermillion-deep:#38203f;
  --victorian-ink:#302637;--victorian-wine:#542b60;--victorian-wine-dark:#38203f;
  --victorian-mahogany:#38203f;--victorian-paper:#fff;--victorian-ivory:#f5f2f7;
  --victorian-paper-deep:#f3edf5;--victorian-line:#ded4e3;
  --border-soft:#ded4e3;--focus-ring:#88539a;
  --shadow-raised:0 6px 24px #38203f0c;
}
html{background:var(--plum-dark)}
body{color:var(--ink);line-height:1.65}
body::before,.card::before,.topbar::after{display:none!important}
h1,h2,h3,h4{line-height:1.5;letter-spacing:0}
.wrap{width:100%;max-width:1500px;padding:24px clamp(12px,2.4vw,36px)}
.grid>*,.card-head>*,.actions>*,.result-grid>*{min-width:0}
.card,.collapsible-module,.planet-table-card,.member-dialog,.dasha-aspect-module{border:1px solid var(--line)!important;border-radius:18px!important;
}
.card{padding:clamp(14px,2vw,24px);margin-bottom:20px;content-visibility:visible}
.card-head,.collapsible-module>summary,.dasha-aspect-module>summary{border-bottom:1px solid var(--line)!important;
  padding:14px 16px;gap:12px 18px;flex-wrap:wrap;height:auto!important;
}
.card-head h2,.collapsible-module>summary b,.dasha-section-head h3,.dasha-aspect-module>summary h3{color:var(--plum-dark)!important}
.card-head h2::after,.collapsible-module>summary b::after{content:none!important}
.hint,.card-head p,.collapsible-module>summary small{color:var(--muted)!important;line-height:1.65;opacity:1!important}
.topbar{box-shadow:0 3px 16px #38203f20!important;backdrop-filter:none;-webkit-backdrop-filter:none}
.topbar .brand h1{color:#fff!important;text-shadow:none}
.topbar .brand-mark{background:#efe6d5!important;box-shadow:none!important;border-color:#c2a875!important}
.topbar nav{padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
.nav-btn,.mobile-menu-toggle{border-radius:10px!important;background:#ffffff08!important;color:#fff!important;border-color:#ffffff30!important;box-shadow:none!important}
.nav-btn:hover{background:#ffffff15!important}
.nav-btn.active{background:#eee6f2!important;color:var(--plum-dark)!important;border-color:#eee6f2!important}
.astrology-system-switch{border:1px solid var(--line);box-shadow:none;padding:5px;border-radius:14px;margin:18px auto}
.astrology-system-switch .astrology-system-tab{background:transparent!important;color:var(--plum)!important;border:0!important;box-shadow:none!important;text-shadow:none!important;transform:none!important;border-radius:10px!important;min-height:46px}
.astrology-system-switch .astrology-system-tab.active{box-shadow:none!important;transform:none!important;text-shadow:none!important}
button{border-radius:10px!important;border-color:var(--line)!important;line-height:1.45;white-space:normal}
button.primary,.primary,.enter-chart-button{border-radius:12px!important;box-shadow:none!important;text-shadow:none!important;letter-spacing:0}
button.primary:hover,.primary:hover{background:var(--plum-dark)!important}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{
  background:#fff!important;color:var(--ink)!important;border:1px solid #cfc0d6!important;
  border-radius:10px!important;box-shadow:none!important;min-width:0;max-width:100%;min-height:46px;
}
label{color:#594760;line-height:1.55;min-width:0}
/* Old compact selectors reserved only 30px for Thai text after the arrow. */
.chart-aquarius-lord,.house-lord-head label{
  height:auto!important;min-height:44px!important;max-width:100%;
  flex-wrap:wrap!important;gap:8px!important;line-height:1.6!important;
  white-space:normal!important;color:#38203f!important;font-size:14px!important;
}
.chart-aquarius-lord select,.house-lord-head select{
  flex:0 0 100px!important;width:100px!important;min-width:100px!important;max-width:100%!important;
  height:44px!important;min-height:44px!important;padding:6px 28px 6px 12px!important;
  font-size:16px!important;line-height:1.6!important;color:#251b2b!important;
  background-color:#fff!important;border-color:#94799f!important;
}
.table-card-head{height:auto!important;flex-wrap:wrap;gap:12px!important}
.result-item p,.tanu-sesa-summary span{color:#57455f!important}
input[type=checkbox],input[type=radio]{accent-color:var(--plum);min-height:0!important;flex-shrink:0}
.actions,.tabs,.chart-view-tabs,.yoga-mode-tabs{flex-wrap:wrap;gap:8px}
.chart-view-tab,.tab-btn,.yoga-mode-tab{border:1px solid var(--line)!important;border-radius:10px!important;min-height:44px;box-shadow:none!important}
.chart-view-tab.active,.tab-btn.active,.yoga-mode-tab.active{}
.toggles{gap:10px 16px;flex-wrap:wrap;max-width:100%}
.toggles label{min-height:36px;white-space:normal!important;line-height:1.5!important}
.chart{background:#fff;border-color:var(--line);border-radius:12px;box-shadow:none}
.chart svg{filter:none}
.chart-view-note{background:var(--plum-soft)!important;color:#594760!important;border-left:3px solid #886194!important;border-radius:8px!important;line-height:1.6}
.planet-table-wrap,.house-lord-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff}
table{background:#fff}
th{letter-spacing:0;line-height:1.6}
td{border-color:#e9e0ed!important;line-height:1.6}
.planet-table tbody tr:nth-child(even) td,.house-lord-table tbody tr:nth-child(even){background:#f7f3f9!important}
.planet-table tbody tr:hover td{background:#eee6f2!important}
.house-lord-table tbody tr:nth-child(even) td:first-child{background:#f7f3f9!important}
.thai-kala-yok-table th{background:#f3edf5!important}
.member-gate{overflow-y:auto}
.member-auth-card{color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:20px!important;box-shadow:0 20px 60px #160d2033!important;max-width:calc(100% - 32px)}
.member-auth-card::before{color:var(--plum);letter-spacing:.1em}
.member-dialog{max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto}
.member-dialog-head{border-bottom:0!important;gap:12px}
.member-dialog-head>div{min-width:0;overflow-wrap:anywhere}
.member-dialog-head>button{flex-shrink:0}
.membership-open-plans{background:var(--plum)!important;color:#fff;border-color:var(--plum)!important}
.membership-plan-card{background:#f7f3f9!important;color:var(--ink)!important;box-shadow:none;border-color:var(--line)!important;padding:18px!important}
.membership-plan-card strong,.membership-restore{color:var(--plum)!important}
.membership-plan-card .plan-badge{position:static;justify-self:center;margin-bottom:6px;background:#e5d7ec;color:var(--plum-dark)}
.membership-plan-card.featured{border-color:var(--plum)!important}
.landing-page{}
.landing-copy{padding:24px;max-width:100%}
.site-legal-footer{border-top:1px solid #765482!important}
.dasha-current-major-label,.dasha-now-badge{background:var(--plum)!important;color:#fff!important;border-radius:8px!important}
.member-library-tools{display:flex;flex-wrap:wrap;gap:10px}
.member-library-tools>input,.member-library-tools>select{flex:1 1 180px}
/* Deep old-wine intensity, translated to mangosteen purple and warm brass. */
body{background:linear-gradient(135deg,#efe6d5,#e6dac5 55%,#eee4d2)!important}
.topbar{border-bottom:2px solid #aa8549}
.topbar nav{}
.card,.collapsible-module,.planet-table-card,.member-dialog,.dasha-aspect-module{
  background:#fffaf0!important;border-color:#b9a37c!important;box-shadow:0 5px 18px #2b133514!important;
}
.card-head,.collapsible-module>summary,.dasha-aspect-module>summary{
  background:linear-gradient(100deg,#e7d8bc,#faf1df 55%,#eadfc9)!important;border-bottom-color:#c2a875!important;
}
button.primary,.primary,.enter-chart-button{
  background:linear-gradient(180deg,#65336d,#39153f)!important;border-color:#ac864b!important;color:#fff1d3!important;
}
.astrology-system-switch{background:#dfd1b9;border-color:#b59b70}
.astrology-system-switch .astrology-system-tab.active{
  background:linear-gradient(180deg,#64316d,#39153f)!important;color:#fff1d3!important;
}
.chart-view-tab,.tab-btn,.yoga-mode-tab{background:#f1e5ce!important;color:#47234f!important;border-color:#baa17a!important}
.chart-view-tab.active,.tab-btn.active,.yoga-mode-tab.active{
  background:linear-gradient(180deg,#61316a,#39153f)!important;color:#fff1d3!important;border-color:#a68349!important;
}
th{background:linear-gradient(180deg,#51265a,#301239)!important;color:#fff0cf!important;border-color:#886747!important}
.planet-table tbody tr:nth-child(even) td,.house-lord-table tbody tr:nth-child(even),
.house-lord-table tbody tr:nth-child(even) td:first-child{background:#f0e7d6!important}
.member-gate{}
.member-auth-card{background:#fff8e9!important;border-color:#b59b70!important}
.member-dialog-head{background:linear-gradient(180deg,#51265a,#291130)!important;color:#fff0cf!important}
.landing-page{}
.site-legal-footer{background:#1b0922!important;border-top-color:#aa8549!important}
/* Slightly deeper mangosteen; preserve the readable cream content surfaces. */
.topbar{background:linear-gradient(180deg,#34143f,#1b0922)!important}
.topbar nav{background:#200c29!important}
button.primary,.primary,.enter-chart-button,
.astrology-system-switch .astrology-system-tab.active,
.chart-view-tab.active,.tab-btn.active,.yoga-mode-tab.active{
  background:linear-gradient(180deg,#4b2057,#290d34)!important;
}
th,.member-dialog-head{background:linear-gradient(180deg,#3d1948,#210a2b)!important}
.member-gate{background:radial-gradient(ellipse at top,#492051,#17081e)!important}
.landing-page{background:radial-gradient(ellipse at 50% 25%,#3e194b,#15071c 75%)!important}
/* Ripe mangosteen rind: a single dark purple, without lighter gradients. */
.topbar,.topbar nav,.site-legal-footer,.member-gate,.landing-page,
button.primary,.primary,.enter-chart-button,
.astrology-system-switch .astrology-system-tab.active,
.chart-view-tab.active,.tab-btn.active,.yoga-mode-tab.active,
th,.member-dialog-head{background:#321536!important}
/* Match the image's sampled perimeter without altering the artwork. */
#landingPage{background:#010622!important}
#landingPage .nataraja-welcome-art{background:#010622!important;box-shadow:none!important}
/* One-screen composition: the artwork takes the space left by actual text/buttons. */
#landingPage:not([hidden]){
  display:grid!important;grid-template-rows:minmax(0,1fr) auto auto;
  align-items:center;justify-items:center;align-content:stretch;
  height:100svh;min-height:0;gap:clamp(8px,1.5svh,18px);
  padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  overflow-y:auto;
}
#landingPage .nataraja-welcome-art{
  width:100%!important;height:100%!important;min-height:0;max-height:none!important;
  aspect-ratio:auto;align-self:stretch;margin:0;
}
#landingPage .nataraja-welcome-art>img{width:100%;height:100%;object-fit:contain}
#landingPage .landing-copy{padding:0!important;gap:6px!important;width:100%;max-width:900px}
#landingPage .landing-copy::before,#landingPage .landing-copy::after{display:none!important}
#landingPage .landing-title{font-size:clamp(16px,2.1vw,28px)!important;line-height:1.45;margin:0;padding:0}
#landingPage .landing-subtitle{font-size:clamp(13px,1.4vw,18px)!important;line-height:1.55;margin:0;padding:0}
#landingPage .landing-auth-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:0;width:100%}
/* Mobile text sizing; the shared grid still measures the available artwork space. */
@media(max-width:760px){
  #landingPage{
    justify-content:stretch;
    height:100svh;min-height:0;gap:12px;
    padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
    overflow-y:auto;
  }
  #landingPage .nataraja-welcome-art{
    width:100%!important;height:100%!important;min-height:0;
  }
  #landingPage .landing-copy{padding:0!important;gap:8px!important;flex:none;width:100%;max-width:540px}
  #landingPage .landing-copy::before,#landingPage .landing-copy::after{display:none!important}
  #landingPage .landing-title{font-size:clamp(14px,3.8vw,19px)!important;line-height:1.5;margin:0;padding:0;letter-spacing:0}
  #landingPage .landing-subtitle{font-size:clamp(12px,3.2vw,15px)!important;line-height:1.6;margin:0;padding:0;letter-spacing:0}
  #landingPage .landing-auth-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:0;flex:none;width:100%}
  #landingPage .enter-chart-button{min-height:44px;padding:10px 18px;font-size:14px;flex:0 1 auto;letter-spacing:0}
}

/* Keep the administrator membership link readable on the pale account card. */
.member-account-dialog .admin-members-link,
#adminMembersLink{
  color:#54222a!important;
  background:#fff5d9!important;
  border-color:#b78732!important;
  text-shadow:none!important;
  -webkit-text-fill-color:#54222a!important;
}

/* Exact Old Wine colours from the last pre-purple theme; layout repairs stay intact. */
:root{
  --plum:#5b2028;--plum-dark:#2a1115;--plum-soft:#f2e7cf;
  --bg:#e9dfc8;--card:#fbf6e8;--paper:#fbf6e8;--paper-deep:#eadfc4;
  --ink:#2b201b;--muted:#6f6254;--line:#c4ae7b;
  --accent:#722c34;--accent2:#a44c3f;
  --lacquer:#35171a;--lacquer-2:#5b2028;--parchment:#f5eedc;
  --vermillion:#722c34;--vermillion-deep:#2a1115;
  --victorian-ink:#2b201b;--victorian-wine:#5b2028;--victorian-wine-dark:#2a1115;
  --victorian-mahogany:#35171a;--victorian-paper:#fbf6e8;--victorian-ivory:#f5eedc;
  --victorian-paper-deep:#eadfc4;--victorian-line:#b69a64;
  --border-soft:#d7c7a5;--focus-ring:#8e404b;
}
html{background:#261416}
body{background:linear-gradient(135deg,#efe6d2 0%,#e5d8bc 52%,#eee4ce 100%)!important}
.topbar{
  background:linear-gradient(90deg,rgba(255,255,255,.035),transparent 35%,rgba(255,255,255,.025)),linear-gradient(#3b181d,#251014)!important;
  border-bottom-color:#b68b45!important;box-shadow:0 5px 18px rgba(36,15,13,.38)!important;
}
.topbar nav{background:#251014!important}
.nav-btn.active{color:#2d1518!important;background:linear-gradient(#e6d199,#b98c44)!important;border-color:#f0dca5!important}
.card,.collapsible-module,.planet-table-card,.member-dialog,.dasha-aspect-module{background:#fbf6e8!important;border-color:#bba16d!important}
.card-head,.collapsible-module>summary,.dasha-aspect-module>summary{background:linear-gradient(90deg,#f3e8cc,#fffaf0 48%,#eee0c0)!important;border-bottom-color:#c3a970!important}
.card-head h2,.collapsible-module>summary b,.dasha-section-head h3,.dasha-aspect-module>summary h3{color:#54222a!important}
button.primary,.primary,.enter-chart-button{background:linear-gradient(#7b3440,#4e1d25)!important;color:#fff4d7!important;border-color:#9f7440!important}
.astrology-system-switch .astrology-system-tab.active,.chart-view-tab.active,.tab-btn.active,.yoga-mode-tab.active{background:linear-gradient(#702c36,#451920)!important;color:#fff1d0!important;border-color:#936b32!important}
.chart-view-tab,.tab-btn,.yoga-mode-tab{background:linear-gradient(#fffaf0,#e8dcc1)!important;color:#56302d!important;border-color:#b99c63!important}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{background:#fffaf0!important;color:#31231d!important;border-color:#b9a170!important}
.chart-view-note{background:#f2e7cf!important;color:#594638!important;border-left-color:#9b7432!important}
th,.member-dialog-head{background:linear-gradient(#4d2426,#321416)!important;color:#f0dfb5!important;border-color:#775b36!important}
.planet-table tbody tr:nth-child(even) td,.house-lord-table tbody tr:nth-child(even),.house-lord-table tbody tr:nth-child(even) td:first-child,.membership-plan-card{background:#f0e7d2!important}
.member-gate{background:radial-gradient(circle at 50% 26%,#5b2930 0,#251014 58%,#15090b 100%)!important}
.member-auth-card{background:linear-gradient(145deg,#fffaf0,#eee2c7)!important;border-color:#c9a967!important;box-shadow:0 20px 60px #35171a33!important}
.membership-plan-card .plan-badge{background:#ead9aa;color:#54222a}
.site-legal-footer{background:#241013!important;border-top-color:#a67f3e!important}
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #8e404b!important;outline-offset:3px;box-shadow:none!important}
@media(min-width:1200px){
  #view-chart.active{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
  #view-chart>*{grid-column:1 / -1}
  #view-chart>.suri-calc-card{grid-column:auto;align-self:stretch;display:flex;flex-direction:column;min-width:0;margin:0}
  #view-chart>.suri-calc-card>.actions{margin-top:auto}
  .topbar{grid-template-columns:minmax(0,1fr) auto!important}
  .chart-layout{grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr)}
}

/* v16: high-contrast copyright details on the dark footer. */
.site-legal-footer .legal-detail{
  background:#fff8e7!important;
  color:#38241f!important;
  border-color:#b99658!important;
  box-shadow:0 3px 12px rgba(0,0,0,.2)!important;
  font-size:14px!important;
  line-height:1.75!important;
}
.site-legal-footer .legal-detail :is(p,b,span){color:inherit!important}
.site-legal-footer .legal-detail a{color:#6f1f2c!important;text-decoration:underline;text-underline-offset:2px}
.site-legal-footer .legal-detail .legal-disclaimer{border-top-color:#cdb88e!important}
@media(max-width:760px){
  .wrap{padding:12px max(12px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .card{padding:12px;border-radius:14px!important;margin-bottom:14px}
  .card-head{align-items:flex-start;padding:12px;flex-direction:column}
  .card-head>*,.card-head .toggles{max-width:100%}
  .grid.two,.grid.three,.chart-layout,.result-grid{grid-template-columns:minmax(0,1fr)}
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}
  button,.chart-view-tab{min-height:44px}
  .actions{flex-wrap:wrap}.actions>button{flex:1 1 130px}
  .astrology-system-switch{width:calc(100% - 24px)}
  .astrology-system-switch .astrology-system-tab{min-width:0!important;flex:1;font-size:14px!important;padding:10px 6px!important}
  .member-auth-card{padding:22px 16px!important}
  .member-dialog-head{align-items:flex-start}
  .house-lord-head{grid-template-columns:minmax(0,1fr)}
  .house-lord-head label{justify-self:start!important}
  .membership-plan-list{grid-template-columns:minmax(0,1fr)}
}

/* Keep every remaining interactive accent in the restored wine family. */
.chart-aquarius-lord,.house-lord-head label{color:#54222a!important}
.chart-aquarius-lord select,.house-lord-head select{color:#2b201b!important;border-color:#b99b63!important}
.result-item p,.tanu-sesa-summary span{color:#6f6254!important}
.member-auth-card{box-shadow:0 20px 60px #35171a33!important}

/* Account administration must remain readable on the pale-gold action tile. */
.member-account-dialog #adminMembersLink{
  color:#54222a!important;
  background:#fff5d9!important;
  border-color:#b78732!important;
  text-shadow:none!important;
  -webkit-text-fill-color:#54222a!important;
}
