/* Lịch Việt Glass v11.9.1 — One centered public app, one theme, one five-tab bar.
   Loaded after all legacy styles on both routed and standalone user-facing pages.
   Admin is intentionally excluded. No changes to JS hooks or source content. */
:root {
  --lvg-app-max:680px;
  --lvg-page:#eaf3ec;--lvg-card:rgba(251,255,251,.94);
  --lvg-text:#193c36;--lvg-subtle:#527168;--lvg-line:rgba(35,110,85,.21);
  --lvg-control:#f5faf5;--lvg-accent:#0e7462;--lvg-accent-tint:rgba(24,125,99,.13);
  --lvg-nav:#f7fcf7;--lvg-shadow:0 12px 30px rgba(15,74,52,.10);
  color-scheme:light;
}
:root[data-theme="dark"] {
  --lvg-page:#052c29;--lvg-card:rgba(13,67,57,.96);
  --lvg-text:#f4f0dc;--lvg-subtle:#bed6c8;--lvg-line:rgba(208,228,201,.21);
  --lvg-control:#174b40;--lvg-accent:#eed28d;--lvg-accent-tint:rgba(217,179,87,.16);
  --lvg-nav:#0b4138;--lvg-shadow:0 13px 36px rgba(0,19,15,.28);
  color-scheme:dark;
}
/* Legacy standalone pages use hard-coded light tokens; map their semantic variables too. */
:root[data-theme="dark"] {
  --ink:#f4f0dc;--title:#f4f0dc;--muted:#bed6c8;--accent:#eed28d;
  --edge:rgba(208,228,201,.21);--line:rgba(208,228,201,.21);
  --teal:#eed28d;--text-primary:#f4f0dc;--text-secondary:#bed6c8;
  --primary:#eed28d;--body:#052c29;--surface:rgba(13,67,57,.96);
  --glass:rgba(13,67,57,.90);--glass-strong:rgba(13,67,57,.97);
  --outline:rgba(208,228,201,.21);--border:rgba(208,228,201,.21);
}
html {scroll-padding-bottom:110px}
html,body {min-width:0;max-width:100%;overflow-x:clip}
body {background-color:var(--lvg-page)!important; color:var(--lvg-text);}
/* Public App Shell; standalone pages use the containers below. */
body .app-shell,body :is(.shell,.mt-shell,.us-shell,.ak-shell,.sync-shell,.saved-shell,.lr-wrap,.wrap,.plans-wrap,.growth-shell) {
  box-sizing:border-box!important;width:100%!important;max-width:var(--lvg-app-max)!important;
  margin-inline:auto!important;min-width:0!important;
  padding-inline:clamp(12px,3vw,20px)!important;
}
body :is(.shell,.mt-shell,.us-shell,.ak-shell,.sync-shell,.saved-shell,.lr-wrap,.wrap,.plans-wrap,.growth-shell) > * {
  min-width:0;max-width:100%;
}
/* Do not allow 2-column desktop compositions within the single-column app shell.
   Small internal 2- or 3-field form rows and seven-day calendar grids are intentionally retained. */
body :is(.dashboard-grid,.traditional-grid,.utility-layout,.studio-layout,.daily-layout,
  .daily-grid,.daily-hero,.finder-layout,.comparison-layout,.comparison-grid,
  .prayer-panel,.iching-layout,.bt-layout,.bt-note-grid,.native-tools-grid,
  .mt-hero,.mt-week-grid,.mt-grid,.us-grid,.us-layout,.grid2,.layout,.ak-columns,
  .sync-grid,.plans-layout,.plan-grid,.task-layout,.growth-layout,
  .lvg-library,.prayer-library-grid) {
  grid-template-columns:minmax(0,1fr)!important;
  grid-auto-columns:minmax(0,1fr)!important;
  align-items:start;
}
body :is(.prayer-panel,.iching-layout,.bt-layout,.finder-layout,.comparison-grid,.traditional-grid) > *,
body :is(.mt-hero,.mt-grid,.us-grid,.layout,.grid2,.ak-columns,.sync-grid) > * {
  min-width:0;max-width:100%;grid-column:1/-1!important;grid-row:auto!important;
  height:auto;min-height:0;align-self:start;
}
body .prayer-library {position:static!important;top:auto!important;max-height:none!important}
body .prayer-list {max-height:340px;overflow:auto}
body .bt-compass-panel {order:0}
body .lvg-library {gap:14px}
body .native-tools-grid {gap:10px}
body .studio-layout .preview-area,body .studio-layout .studio-tools {width:100%;min-width:0}
body .traditional-grid>.assessment-card {grid-column:1 / -1!important}
/* All five tabs are the exact same markup and colors, both in public and private pages. */
body nav.lvg-bottom-nav {
  box-sizing:border-box!important;position:fixed!important;
  inset:auto auto 0 50%!important;left:50%!important;right:auto!important;
  transform:translateX(-50%)!important;display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  width:100%!important;max-width:var(--lvg-app-max)!important;
  align-items:stretch!important;gap:0!important;
  padding:7px max(8px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))!important;
  margin:0!important;border:1px solid var(--lvg-line)!important;border-bottom:0!important;
  border-radius:19px 19px 0 0!important;
  background:var(--lvg-nav)!important;color:var(--lvg-text)!important;
  box-shadow:0 -10px 24px rgba(4,45,34,.16)!important;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);z-index:100!important;
}
body nav.lvg-bottom-nav > a,
body nav.lvg-bottom-nav > a:visited {
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex-direction:column!important;gap:3px!important;text-align:center!important;
  min-height:56px!important;min-width:0!important;padding:5px 2px!important;
  color:var(--lvg-subtle)!important;background:transparent!important;
  text-decoration:none!important;border:0!important;border-radius:12px!important;
  font:700 10px/1.25 'Be Vietnam Pro',system-ui,sans-serif!important;
}
body nav.lvg-bottom-nav > a svg {height:21px!important;width:21px!important;flex:none;stroke:currentColor!important}
body nav.lvg-bottom-nav > a span {font:inherit!important;color:inherit!important}
body nav.lvg-bottom-nav > a[aria-current="page"],
body nav.lvg-bottom-nav > a.is-active {
  background:var(--lvg-accent-tint)!important;color:var(--lvg-accent)!important;
}
body nav.lvg-bottom-nav > a:focus-visible {outline:3px solid #cfb162!important;outline-offset:1px}
body :is(.mt-bottom,.us-bottom,.ak-bottom,.mobile-quick-actions) {display:none!important}
body {padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))!important}
/* Standalone inherited hard-coded LIGHT theme. Normalize surfaces to emerald tokens. */
body:not([data-page]) {
  background:radial-gradient(ellipse at 10% 0%,rgba(46,152,112,.13),transparent 56%),var(--lvg-page)!important;
  color:var(--lvg-text)!important;
}
:root[data-theme="dark"] body:not([data-page]) {
  background:radial-gradient(ellipse at 10% 0%,rgba(7,138,106,.22),transparent 56%),var(--lvg-page)!important;
}
body:not([data-page]) :is(.mt-aurora,.us-aurora,.orb) {opacity:.09!important;pointer-events:none}
body:not([data-page]) :is(.glass,.panel,.card,.mt-panel,.mt-daycard,.mt-week-card,.mt-smart,.us-panel,
  .us-group,.us-status,.us-card,.ak-card,.ak-collection,.ak-status,.sync-card,.lr-card,
  .plan-card,.task-form,.mt-header,.us-top,.top,.login,.hero,.saved-card) {
  background:var(--lvg-card)!important;color:var(--lvg-text)!important;
  border-color:var(--lvg-line)!important;
  box-shadow:var(--lvg-shadow);
}
body:not([data-page]) :is(.mt-brand,.mt-hero h1,.us-brand,.us-hero h1,.ak-hero h1,
  .intro h1,.hero h1,.panel h2,.glass h2,.us-panel h2,.ak-card h2,.mt-panel h2,.card h2,
  h1,h2,h3,strong,legend) {color:var(--lvg-text)}
body:not([data-page]) :is(.muted,.mt-muted,.us-hint,.us-empty,.ak-help,.ak-empty,
  .mt-hero p,.us-hero p,.ak-hero p,.intro p,.footnote,footer,small) {color:var(--lvg-subtle)}
body:not([data-page]) :is(.us-group,.ak-collection,.mt-smart,.mt-week-card,.ak-muted,.us-quick-links a,
  .us-priv,.us-secondary,.us-status,.task-form) {background:var(--lvg-control)!important;border-color:var(--lvg-line)!important}
body:not([data-page]) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) {
  background:var(--lvg-control)!important;color:var(--lvg-text)!important;
  border:1px solid var(--lvg-line)!important;color-scheme:inherit;
}
body:not([data-page]) input::placeholder,body:not([data-page]) textarea::placeholder {color:var(--lvg-subtle);opacity:.85}
body:not([data-page]) a:not(.lvg-bottom-nav a) {color:var(--lvg-accent)}
body:not([data-page]) :is(.mt-kicker,.us-kicker,.ak-eyebrow,.eyebrow) {color:var(--lvg-accent)!important}
body:not([data-page]) :is(.mt-daycard,.mt-smart,.us-panel,.ak-card,.panel,.glass) {min-width:0}
body:not([data-page]) :is(.mt-header>nav,.us-top>nav,.top>nav,.ak-nav,.shell>.header .nav) {display:none!important}
/* Standalone toggle floats ABOVE layout; never part of the five-tab nav. */
body .lvg-standalone-theme-toggle {
  position:fixed;top:12px;right:max(12px,calc((100vw - 680px) / 2 + 12px));
  z-index:72;min-height:42px;min-width:42px;display:flex;align-items:center;justify-content:center;
  gap:7px;padding:8px 10px;border:1px solid var(--lvg-line)!important;
  background:var(--lvg-nav)!important;color:var(--lvg-accent)!important;
  border-radius:13px;box-shadow:var(--lvg-shadow);
  font:700 11px/1.2 system-ui,sans-serif;
}
body .lvg-standalone-theme-toggle span:first-child {font-size:21px}
body:not([data-page]) :is(.shell,.mt-shell,.us-shell,.ak-shell,.sync-shell,.saved-shell,.lr-wrap,.wrap,.plans-wrap) {padding-top:62px!important}
/* Transparent panel previews are intentional, and high-contrast reading sheets remain ivory. */
:root[data-theme="dark"] body .prayer-reading-sheet,
:root[data-theme="dark"] body .prayer-reader {color:#343e35}
@media(max-width:480px){
  body nav.lvg-bottom-nav > a {font-size:9px!important}
  body .lvg-standalone-theme-toggle {right:12px;top:9px}
  body :is(.prayer-form-grid,.us-two,.ak-pair),
  body .prayer-list {grid-template-columns:minmax(0,1fr)!important}
}
@media print {
  body nav.lvg-bottom-nav,body .lvg-standalone-theme-toggle {display:none!important}
  body {padding-bottom:0!important}
  body :is(.app-shell,.shell,.mt-shell,.us-shell,.ak-shell,.sync-shell,.saved-shell,.lr-wrap,.wrap) {max-width:none!important}
}
@media(prefers-reduced-motion:reduce){body nav.lvg-bottom-nav{backdrop-filter:none;-webkit-backdrop-filter:none}}

/* Remaining legacy text and fields on authenticated pages. */
:root[data-theme="dark"] body:not([data-page]) :is(.mt-hero-copy,.us-hero,.ak-hero,.intro,.hero,
 .event-row,.ak-entry,.us-result,.mt-panel,.us-panel,.ak-card,.panel,.card) {color:var(--lvg-text)!important}
:root[data-theme="dark"] body:not([data-page]) :is(label,.muted,.fine,.lead,.ak-help,.mt-hero-copy>p,.us-group p) {color:var(--lvg-subtle)!important}
:root[data-theme="dark"] body:not([data-page]) :is(.event-row,.tag,.pill,.mt-actions a,.us-quick-links a,.ak-results,.ak-collection) {
  background:var(--lvg-control)!important;color:var(--lvg-text)!important;border-color:var(--lvg-line)!important
}
:root[data-theme="dark"] body:not([data-page]) :is(button:not(.lvg-standalone-theme-toggle),.btn,.us-primary,.ak-btn) {color-scheme:dark}
/* Hero artwork is decoration, never a second layout column in centered mode. */
body .prayer-hero-layout,body:not([data-page]) :is(.hero,.intro) {
  flex-direction:column!important;align-items:stretch!important;
}
body .prayer-hero-mark {display:none!important}
body:not([data-page]) :is(.hero-date,.stamp) {flex:auto!important;max-width:100%!important}
