/* Lịch Việt Glass v12.0 — Native App Experience.
   Progressive enhancement over v11.9.2. Single 680px app model; no admin impact.
   Important: never conceal private data with CSS for access control. */
:root {
  --v120-radius:20px; --v120-space:12px;
  --v120-surface:rgba(255,255,255,.96); --v120-bg:#eaf3ec;
  --v120-ink:#163e34;--v120-secondary:#526e63;
  --v120-line:rgba(13,95,73,.16);--v120-accent:#0b715b;
  --v120-hl:#dfefe5;--v120-nav:rgba(250,254,250,.95);
  --v120-elevation:0 8px 30px rgba(9,57,39,.075);
}
:root[data-theme="dark"] {
  --v120-surface:rgba(12,65,54,.98);--v120-bg:#062b26;
  --v120-ink:#f7f0db;--v120-secondary:#bdd4c8;
  --v120-line:rgba(215,231,207,.17);--v120-accent:#e5c981;
  --v120-hl:#205847;--v120-nav:rgba(8,51,44,.97);
  --v120-elevation:0 9px 26px rgba(0,20,15,.23);
}
html {scroll-padding-top:72px; scroll-padding-bottom:calc(85px + env(safe-area-inset-bottom,0px));}
html,body {overscroll-behavior-x:none}
body {background-color:var(--v120-bg)!important;color:var(--v120-ink);}
body .app-shell, body :is(.shell,.mt-shell,.us-shell,.ak-shell,.sync-shell,.saved-shell,.lr-wrap,.wrap,.plans-wrap,.growth-shell) {
  width:100%!important;max-width:680px!important;margin-inline:auto!important;min-width:0;
}
/* Treat app as a full-screen surface, not a web document with an oversized footer. */
body [data-legacy-web-footer], body:not([data-page]) footer:not(.prayer-reader-footer) {display:none!important}
body .site-header {min-height:60px!important;margin:6px 0 12px!important;border-radius:15px!important;padding:8px 11px!important;box-shadow:none!important}
body .site-header .brand-icon {height:34px!important;width:34px!important}
body .site-header .brand small {font-size:8px;letter-spacing:.04em}
body .site-header .header-actions .round-icon {width:44px;height:44px}
body .intro-row {margin-bottom:10px!important}
body .intro-row h1 {font-size:clamp(22px,4.8vw,30px)!important;margin:3px 0!important;letter-spacing:-.7px}
body .intro-row p {font-size:12px;margin:3px 0 0}
body .intro-date {display:none}
/* Shared tab bar: one inset, same tokenized surface on all standalone and public screens. */
body nav.mobile-bottom-nav.lvg-bottom-nav {background:var(--v120-nav)!important;border-color:var(--v120-line)!important;border-radius:17px 17px 0 0!important;box-shadow:0 -5px 23px rgba(0,34,26,.14)!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;}
body nav.mobile-bottom-nav.lvg-bottom-nav > a {min-height:55px!important;height:55px!important;font-size:11px!important;gap:3px!important;font-weight:500!important}
body nav.mobile-bottom-nav.lvg-bottom-nav > a[aria-current="page"] {font-weight:750!important}
body nav.mobile-bottom-nav.lvg-bottom-nav>a svg {height:23px!important;width:23px!important}
body .app-shell {padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))!important}
/* Cards have real, readable surfaces; blur only on the chrome, not every data card. */
body .app-shell :is(.calendar-panel,.today-card,.hours-panel-wide,.quote-panel,.native-tool-card,.native-tools-hero),
body:not([data-page]) :is(.shell .panel,.shell .glass,.mt-panel,.us-panel,.ak-card) {
  border:1px solid var(--v120-line)!important;border-radius:var(--v120-radius)!important;
  box-shadow:var(--v120-elevation)!important;
}
/* Native Home tab: date -> actions -> compact contextual content. */
body[data-page="daily"] .daily-hero {display:flex!important;flex-direction:column!important;gap:0!important;margin-bottom:12px!important}
body[data-page="daily"] .daily-intro {padding:4px 2px 8px!important}
body[data-page="daily"] .daily-intro h1 {margin:3px 0 4px!important;font-size:clamp(23px,5vw,32px)!important;letter-spacing:-.75px!important}
body[data-page="daily"] .daily-intro p {display:none}
body[data-page="daily"] .daily-chips {margin-top:7px!important;gap:6px!important}
body[data-page="daily"] .daily-chips span {padding:5px 9px!important;font-size:10px!important}
body[data-page="daily"] .daily-date-tile {min-height:0!important;padding:19px 22px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;text-align:left!important;align-items:center;justify-content:stretch;background:linear-gradient(145deg,#115d4d,#083d34)!important;border:1px solid rgba(226,204,138,.29)!important;border-radius:22px!important}
body[data-page="daily"] .daily-date-tile>.eyebrow {grid-column:1/-1;color:#e8d49c!important;font-size:10px}
body[data-page="daily"] .daily-date-tile .daily-number {font-size:clamp(78px,17vw,112px)!important;line-height:.96!important;letter-spacing:-5px!important;color:#f5df9d!important;grid-row:2 / 4}
body[data-page="daily"] .daily-date-tile h2 {font-size:clamp(15px,3.6vw,23px)!important;letter-spacing:0!important;color:#f9f3e5!important;margin:4px 0 0!important;text-align:right!important}
body[data-page="daily"] .daily-date-tile .daily-lunar {padding:5px 8px!important;background:rgba(235,222,159,.12)!important;color:#f4e5b2!important;text-align:right!important;font-size:11px!important}
body[data-page="daily"] .daily-main-grid {display:flex!important;flex-direction:column!important;gap:12px!important}
body[data-page="daily"] .daily-main-grid>.daily-main-stack {display:contents!important}
body[data-page="daily"] .daily-main-grid :is(.daily-facts,.daily-quote-card,.daily-special) {padding:17px!important;border-radius:18px!important;background:var(--v120-surface)!important;box-shadow:var(--v120-elevation)!important;border:1px solid var(--v120-line)!important;color:var(--v120-ink)!important;}
body[data-page="daily"] .daily-facts {order:1!important}
body[data-page="daily"] .daily-quote-card {order:2!important}
body[data-page="daily"] .daily-special {order:3!important}
body[data-page="daily"] .v120-widget-disclosure {order:5!important}
body[data-page="daily"] .v120-poster-disclosure {order:4!important}
body[data-page="daily"] .daily-stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:12px!important}
body[data-page="daily"] .daily-stat-grid>div {padding:10px!important;background:var(--v120-hl)!important;border-radius:11px!important;border-color:var(--v120-line)!important}
body[data-page="daily"] .daily-stat-grid strong {font-size:14px!important;color:var(--v120-ink)!important}
body[data-page="daily"] .daily-quote-mark {display:none}
body[data-page="daily"] .daily-quote-card blockquote {font-size:17px!important;min-height:0!important;line-height:1.55!important;margin:9px 0!important}
body[data-page="daily"] .daily-special h3 {font-size:17px!important;margin:8px 0!important}
body[data-page="daily"] .daily-special p {font-size:12px!important;margin:8px 0!important}
.v120-home-actions {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 15px}
.v120-action {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:81px;padding:9px 2px;border:1px solid var(--v120-line);border-radius:16px;background:var(--v120-surface);text-decoration:none;color:var(--v120-ink)!important;touch-action:manipulation;box-shadow:var(--v120-elevation)}
.v120-action>span {font-size:23px;color:var(--v120-accent);line-height:1}
.v120-action strong {font-size:11px!important;text-align:center;font-weight:650;color:inherit!important}
.v120-action:focus-visible,.v120-action:hover {outline:2px solid var(--v120-accent);outline-offset:1px}
.v120-section-label {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 9px}
.v120-section-label h2 {font-size:16px;margin:0;color:var(--v120-ink)}
.v120-section-label a {color:var(--v120-accent);font-size:12px;font-weight:700}
.v120-disclosure {display:block;width:100%;min-width:0;background:var(--v120-surface);border:1px solid var(--v120-line);border-radius:16px;overflow:hidden;box-shadow:var(--v120-elevation)}
.v120-disclosure>summary {min-height:52px;padding:14px 16px;display:flex;justify-content:space-between;align-items:center;color:var(--v120-ink);font-size:13px;font-weight:700;cursor:pointer;list-style:none}
.v120-disclosure>summary::-webkit-details-marker {display:none}
.v120-disclosure[open]>summary {border-bottom:1px solid var(--v120-line)}
.v120-disclosure>article {padding:16px!important;margin:0!important;box-shadow:none!important;border:0!important;border-radius:0!important;background:transparent!important}
.v120-disclosure:not([open]) iframe {visibility:hidden}
/* Calendar stays 7 columns. selected always readable, no hover overwrites. */
body[data-page="home"] .home-dashboard .calendar-cell.selected,
body[data-page="home"] .home-dashboard .calendar-cell.selected:hover,
body[data-page="home"] .home-dashboard .calendar-cell.selected:focus-visible {background:#0c6957!important;color:#fffaf0!important}
body[data-page="home"] .home-dashboard .calendar-cell.selected :is(.cell-solar,.cell-lunar) {color:#fffaf0!important}
body[data-page="home"] .calendar-panel {padding:15px!important}
body[data-page="home"] .today-card {padding:16px!important}
body[data-page="home"] .calendar-legend {display:none}
body[data-page="home"] .traditional-summary {min-height:58px}
/* Tools hub: one tappable row per utility; no two-column dashboard relics. */
body[data-page="tools"] .native-tools-hub {gap:var(--lvui-space-3)!important}
body[data-page="tools"] .native-tools-hero {padding:var(--lvui-space-4)!important;min-height:0!important}
body[data-page="tools"] .native-tools-hero h1 {font-size:var(--lvui-font-title)!important;overflow-wrap:anywhere}
body[data-page="tools"] .native-tools-hero p {font-size:var(--lvui-font-sm);line-height:1.6;margin:6px 0}
body[data-page="tools"] .native-tools-grid {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
body[data-page="tools"] .native-tool-card {display:flex!important;min-height:66px!important;padding:11px 13px!important;align-items:center!important;gap:11px!important}
body[data-page="tools"] .native-tool-body strong {font-size:14px!important}
body[data-page="tools"] .native-tool-body small {font-size:11px!important;line-height:1.45}
body[data-page="tools"] .native-tools-section {margin:0!important}
/* Profile: visible native-style single flow; JS upgrades sign-in/register/recover. */
body:not([data-page]) .shell>.top {margin-bottom:14px!important;padding:12px 14px!important}
body:not([data-page]) .shell>.top .brand {font-weight:750}
body:not([data-page]) .intro {padding:12px 0 16px!important;min-height:0!important}
body:not([data-page]) .intro h1 {font-size:clamp(26px,6vw,34px)!important;line-height:1.2!important;margin:3px 0 8px!important}
body:not([data-page]) .intro p {font-size:13px!important;line-height:1.65!important}
body:not([data-page]) .intro .stamp {display:none!important}
body:not([data-page]) .shell .panel {padding:18px!important;margin-bottom:10px;border-radius:18px!important}
body:not([data-page]) .shell .panel :is(input,select,button) {min-height:44px;max-width:100%}
body:not([data-page]) .shell .panel label {font-size:13px}
body:not([data-page]) .shell #signed {display:grid;grid-template-columns:minmax(0,1fr)!important}
/* hidden class owned by account.js must always dominate the layout overrides. */
body:not([data-page]) .hidden,
body.v120-auth-ready #guest [data-auth-panel] {display:none!important}
.v120-auth-switch {display:flex;gap:5px;padding:5px;background:var(--v120-hl);border:1px solid var(--v120-line);border-radius:15px;margin:0 0 12px}
.v120-auth-switch>button {flex:1;min-width:0;min-height:43px;line-height:1.2;padding:7px 3px;border:0;border-radius:11px;background:transparent;color:var(--v120-secondary);font:600 12px/1.25 system-ui,sans-serif;cursor:pointer}
.v120-auth-switch>button[aria-pressed="true"] {background:var(--v120-surface);color:var(--v120-accent);box-shadow:var(--v120-elevation)}
body.v120-auth-ready #guest [data-auth-panel].v120-auth-visible {display:block!important}
/* Hidden auth panel and keyboard-open bottom bar use the same visibility contract. */
body.v120-auth-ready #guest [data-auth-panel].hidden,
body.v120-keyboard-open:not(.lvg-admin) nav.lvg-bottom-nav {display:none!important}
body.v120-keyboard-open {padding-bottom:14px!important}
/* Small device readability; dark/light both use same CSS/structure. */
@media(max-width:355px) {
  .v120-home-actions {gap:5px}
  .v120-action {min-height:72px;padding:7px 1px}
  .v120-action strong,
  body nav.mobile-bottom-nav.lvg-bottom-nav>a{font-size:10px!important}
}
@media (hover:none) { .v120-action:active {background:var(--v120-hl)} }
@media (prefers-reduced-motion:no-preference) {
  @supports (view-transition-name:root) { @view-transition {navigation:auto} }
  .v120-action {transition:transform .15s ease,background-color .15s ease}
  .v120-action:active {transform:scale(.98)}
}
@media (prefers-reduced-motion:reduce) { .v120-action {transition:none!important} }
@media print {
  body .site-header,body nav.lvg-bottom-nav,.v120-home-actions,.v120-auth-switch {display:none!important}
  body .app-shell {max-width:none!important}
}

/* Keep the auth segment out of signed-in profile screens. */
body:has(#guest.hidden) .v120-auth-switch {display:none!important}
/* Legibility fix: inherited v11 card copy colors were not theme-aware in Daily. */
body[data-page="daily"] .daily-quote-card blockquote,
body[data-page="daily"] .daily-quote-card .daily-quote-footer,
body[data-page="daily"] .daily-quote-card select,
body[data-page="daily"] .daily-special :is(h3,p) {color:var(--v120-ink)!important}
body[data-page="daily"] .daily-quote-card .daily-quote-footer span,
body[data-page="daily"] .daily-footnote {color:var(--v120-secondary)!important}
/* Clear light-mode action surfaces; no legacy translucent overlay. */
body[data-page="daily"] .v120-action {background:var(--v120-surface)!important;border-color:var(--v120-line)!important;color:var(--v120-ink)!important}
