@font-face{font-family:'Jyotir Tamil';src:url('./fonts/noto-sans-tamil.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap;unicode-range:U+0B80-0BFF,U+200C-200D,U+25CC}
.jv-language{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:7px;max-width:100%}.jv-language label{display:inline-flex}.jv-language select{font:11px/1.6 var(--sans);min-height:32px;max-width:100%;padding:3px 20px 3px 7px;border:1px solid #aab99a;border-radius:6px;color:#304d30;background:#f9f8eb}.jv-language small{font:9px/1.6 var(--sans);letter-spacing:0;color:#61704c;max-width:210px}.jv-language select:focus-visible{outline:3px solid #9d762b;outline-offset:3px}
html[lang=ta] [lang=ta],html[lang=ta] .jv-language{font-family:'Jyotir Tamil',var(--sans),sans-serif;letter-spacing:0}
html[lang=ta] :is(button,a,label,summary,p,h1,h2,h3,small,strong,span)[lang=ta]{overflow-wrap:normal}
html[lang=ta] :is(.om-modes,.om-stops){min-width:0}
html[lang=ta] :is(.om-modes button,.om-stops button,.topic-panels a){white-space:normal}
@media(max-width:600px){.jv-language{gap:3px}.jv-language select{min-height:44px;font-size:11px}.jv-language small{max-width:145px}.learning-brand{min-width:0}html[lang=ta] .topic-return button{white-space:normal}}
/* Tithi already reserves one compact row for script settings: share it, preserving
   the source lesson's prominent Moon, duration and ruler above the fold. */
body[data-topic=tithi] .lab-topline .jv-language{margin:0;flex-wrap:nowrap;flex:none}
body[data-topic=tithi] .lab-topline .jv-language small{display:none}
body[data-topic=tithi] .lab-topline .jv-language select{min-height:44px;max-width:132px;font-size:11px}
/* One selector replaces Names/IAST/Devanagari everywhere. */
.jv-language{margin:0;flex-wrap:nowrap}.jv-language label{align-items:center;gap:7px}.jv-language-label{font:10px/1.4 var(--sans);color:#526443}.jv-language select{min-height:44px;max-width:180px}.jv-language small{max-width:200px}
html[lang=hi] :is([lang=hi],[lang=sa]),html[lang=sa] :is([lang=sa],[lang=hi]){font-family:"Noto Serif Devanagari",serif}
html[lang=ta] [lang=ta]{font-family:'Jyotir Tamil',var(--sans),sans-serif!important}
body[data-term-script=ta] .devanagari{font-family:'Jyotir Tamil',var(--sans),sans-serif!important}
@media(max-width:780px){.jv-language small{display:none}.jv-language-label{font-size:9px}.jv-language select{max-width:174px;font-size:11px}.lab-topline{min-width:0}.jv-language{max-width:100%}}
.learning-brand>.jv-language-note{display:block;font-size:10px;line-height:1.5;color:#73582b;max-width:290px;margin-top:5px}
@media(max-width:370px){.lab-topline .jv-language-label{display:none}.lab-topline .jv-language{min-width:0}.lab-topline .jv-language select{max-width:100px!important;min-width:80px;padding-left:5px;padding-right:17px}}
/* The retired preference must not reappear during loading or catalog failure. */
.script-control{display:none!important}

/* Tamil words retain their grapheme clusters. Compact English allocations must
   grow or stack; explanatory prose continues to wrap at natural word spaces. */
html[lang=ta] :is([lang=ta],.devanagari){word-break:normal;hyphens:none;overflow-wrap:normal}
html[lang=ta] :is(.measure-name,.om-reading>strong){overflow-wrap:normal;word-break:normal}
html[lang=ta] :is(.toolbar-button,.jv-language-label,.slider-heading output,.measure-foot){white-space:nowrap}
html[lang=ta] .jv-language{flex-shrink:0}
html[lang=ta] .jv-language select{width:150px;max-width:180px;min-width:150px;font-size:12px}
html[lang=ta] .toolbar-button{width:auto;min-width:max-content;padding-inline:10px;font-size:12px;line-height:1.6;flex-direction:row}
html[lang=ta] :is(.slider-heading,.band-heading){flex-wrap:wrap;gap:6px 12px}
html[lang=ta] :is(.om-modes,.om-stops){flex-wrap:wrap}
html[lang=ta] :is(.om-modes button,.om-stops button){flex:1 1 150px;min-width:0;line-height:1.7;font-size:12px;padding:8px 12px}
html[lang=ta] :is(.om-diagram>svg){overflow:visible}
html[lang=ta] .date-context small{white-space:normal;overflow:visible;text-overflow:clip;max-width:none;line-height:1.6}
html[lang=ta] .topic-return{flex-wrap:wrap}
html[lang=ta] .topic-return>span{text-align:left;max-width:none}
html[lang=ta] .topic-panels{flex-wrap:wrap;overflow:visible}
html[lang=ta] .topic-panels a{white-space:nowrap}
@media(max-width:780px){
 html[lang=ta] .lab-topline{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between}
 html[lang=ta] .sky-toolbar{flex-wrap:wrap;max-width:100%;gap:4px}
 html[lang=ta] .toolbar-speed select{min-height:44px;font-size:12px}
 html[lang=ta] .lab-topline .jv-language{margin-left:auto}
 html[lang=ta] .lab-topline .jv-language select{max-width:180px!important;min-width:150px}
 html[lang=ta] .lab-topline .jv-language-label{display:inline;font-size:11px}
 html[lang=ta] .om-readings{grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr))}
}
/* Keep the three equal angular cells and their pointer geometry unchanged.
   Long native names use separate annotation rows instead of shrinking or
   crossing each other; the degree ranges remain aligned along the bottom. */
/* Hindi is a translated draft, independently selectable from Sanskrit. */
html[lang=hi] [lang=hi]{font-family:"Noto Serif Devanagari",serif;letter-spacing:0;word-break:normal;overflow-wrap:normal;hyphens:none}
html[lang=hi] :is(.om-reading>strong){overflow-wrap:normal;word-break:normal}
html[lang=hi] :is(.toolbar-button,.jv-language-label){white-space:nowrap}
html[lang=hi] .jv-language select{min-width:150px;max-width:180px;font-size:12px}
html[lang=hi] .toolbar-button{width:auto;min-width:max-content;flex-direction:row;gap:6px;padding-inline:10px;font-size:12px;line-height:1.6}
html[lang=hi] :is(.om-modes,.om-stops,.topic-panels){flex-wrap:wrap;overflow:visible}
html[lang=hi] :is(.om-modes button,.om-stops button){flex:1 1 145px;min-height:44px;font-size:12px;line-height:1.7;padding:8px 12px;white-space:normal}
html[lang=hi] :is(.slider-heading,.band-heading,.topic-return){flex-wrap:wrap;gap:7px 12px}
html[lang=hi] .date-context small{white-space:normal;max-width:none;overflow:visible;line-height:1.6}
html[lang=hi] .topic-panels a{white-space:nowrap}
@media(max-width:780px){
 html[lang=hi] .lab-topline{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 12px}
 html[lang=hi] .sky-toolbar{flex-wrap:wrap;max-width:100%}
 html[lang=hi] .lab-topline .jv-language{margin-left:auto}
 html[lang=hi] .lab-topline .jv-language select{min-width:150px;max-width:180px!important}
}

/* Compact the Hindi Tithi mobile layout, preserving type
   sizes, original content and >=44px controls. The new orbit has two questions. */

@media(max-width:780px){
 /* Fit full translated titles and the switch on one row when their intrinsic
    widths allow it. Wrap rather than shrink or clip either control. */
 .learning-topbar {display:flex;flex-wrap:wrap;align-items:flex-start}
 .learning-brand {flex:1 1 0;min-width:min-content;max-width:100%}
 .learning-topbar>nav {flex:none;align-self:flex-start;margin-left:auto}
 .topic-return {flex-basis:100%;min-width:0}
}
@media(max-width:780px){
 .learning-brand h1 {white-space:normal}
 /* The old100px compact cap clipped the Sanskrit preview label at320px. */
 html[lang=sa] .lab-topline {flex-wrap:wrap}
 html[lang=sa] .lab-topline .jv-language {margin-left:auto}
 html[lang=sa] .lab-topline .jv-language select {min-width:140px;max-width:174px!important}
}

/* These components share geometry and type hierarchy in every interface language.
   Fonts may vary by script; translated text wraps without changing column count. */
#ph-details{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 20px}
#ph-details .ph-value>strong{font-size:25px;line-height:1.4;overflow-wrap:anywhere;word-break:normal}
#ph-details .ph-value>span small{display:inline;margin-left:6px}
#ph-details .ph-calendar .ph-value>span small{margin-left:4px}
#detail-readings .sanskrit-name{line-height:1.4;overflow-wrap:anywhere;word-break:normal}
#ph-details[data-vara-status]:not([data-vara-status=ok]) #ph-vara{font-size:14px;line-height:1.6}
#ph-details[data-month-status=unsupported-naming] .ph-calendar strong{font-size:14px;line-height:1.6}
@media(max-width:780px){#ph-details .ph-value>strong{font-size:23px}}
/* Long translated card words wrap inside the same English grid allocations. */
#learn-library :is(.topic-card-copy,.one-moon-card>div){min-width:0}
#learn-library :is(.topic-card-copy,.one-moon-card) :is(h3,p,span,strong){overflow-wrap:anywhere;word-break:normal}
#detail-readings :is(.measurement,.measure-main,.measure-main>div){min-width:0}
#detail-readings .measure-foot{white-space:normal;overflow-wrap:anywhere}
@media(max-width:780px){#detail-readings{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Preserve prior script leading outside the components in this revision. */
html[lang=ta] [lang=ta]:not(:where(#tithi-learning-workbench,#tithi-learning-workbench *,#ph-details,#ph-details *,#detail-readings,#detail-readings *,.learning-topbar,.learning-topbar *,#learn-library,#learn-library *)){line-height:1.75}
html[lang=hi] [lang=hi]:not(:where(#tithi-learning-workbench,#tithi-learning-workbench *,#ph-details,#ph-details *,#detail-readings,#detail-readings *,.learning-topbar,.learning-topbar *,#learn-library,#learn-library *)){line-height:1.75}
html[lang=hi] [lang=sa]:not(:where(#tithi-learning-workbench *,#ph-details *,#detail-readings *,.learning-topbar *,#learn-library *)),html[lang=sa] :is([lang=sa],[lang=hi]):not(:where(#tithi-learning-workbench *,#ph-details *,#detail-readings *,.learning-topbar *,#learn-library *)){line-height:1.6}
/* Do not inherit another topic's script-specific leading into these roots. */
#ph-details,#detail-readings,#tithi-learning-workbench,#learn-library,.learning-topbar{line-height:1.6}
/* The lesson panel rail keeps the same row and native horizontal scrolling. */
body:is([data-topic=tithi],[data-topic=midday]) .topic-panels{flex-wrap:nowrap;overflow-x:auto;line-height:1.6}
body:is([data-topic=tithi],[data-topic=midday]) .topic-panels a{line-height:1.6}
body:is([data-topic=tithi],[data-topic=midday]) .topic-return{gap:6px 12px}
