/* Shared page navigation: one owner for spacing, vector controls and focus states. */
body>header.dgPageHeader{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:76px;
 padding:calc(12px + var(--dg-inset-top,env(safe-area-inset-top,0px))) max(16px,var(--dg-header-gutter,16px),calc((100% - var(--dg-header-content,948px))/2),env(safe-area-inset-right,0px)) 12px max(16px,var(--dg-header-gutter,16px),calc((100% - var(--dg-header-content,948px))/2),env(safe-area-inset-left,0px));
 color:#f3dfb6;background:linear-gradient(180deg,#14382df5,#102c24f5);border-bottom:1px solid #d7b67440;box-shadow:0 1px 0 #ffffff06 inset,0 8px 22px -18px #000b;isolation:isolate}
/* Match existing content widths without changing reader page layouts. */
body>header.lib-header.dgPageHeader{--dg-header-content:1008px;--dg-header-gutter:clamp(16px,4vw,36px)}
body>header.valHeader.dgPageHeader{--dg-header-content:1068px}
body>header.mbHeader.dgPageHeader{--dg-header-content:1080px}
body>header.pvHeader.dgPageHeader{--dg-header-content:1076px}
body>header.sahHeader.dgPageHeader{--dg-header-content:1078px}
body>header.mantraHeader.dgPageHeader{--dg-header-content:1074px}
body.collection-heritage>header.dgPageHeader{--dg-header-content:1060px}
body>header.dgPageHeader>.dgBack,.dgShelf .dgShelfTop>.dgBack{display:inline-grid;place-items:center;flex:none;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;margin:0;border:1px solid #d7b67470;border-radius:16px;background:linear-gradient(145deg,#f4ddb41c,#fff3d605);color:#f2d49b;text-decoration:none;box-shadow:0 1px 0 #fff1d51a inset,0 5px 12px -9px #000;transition:background-color .15s ease,border-color .15s ease}
.dgUiIcon{display:block;flex:none;width:22px;height:22px;pointer-events:none}
body>header.dgPageHeader .dgPageBrand{display:flex;align-items:center;justify-content:flex-start;justify-self:start;gap:9px;min-width:0;width:100%;max-width:100%;margin:0;color:inherit;text-align:left;text-decoration:none}
body>header.dgPageHeader .dgPageMark{display:block;flex:none;width:32px;height:32px;margin:0;object-fit:contain;border-radius:7px;box-shadow:0 2px 7px #0003}
body>header.dgPageHeader .dgPageTitle{min-width:0;max-width:100%;text-align:left}
body>header.dgPageHeader .dgPageTitle strong{display:block;margin:0;font:500 clamp(18px,4.7vw,22px)/1.25 Georgia,'Noto Serif Devanagari',serif;letter-spacing:0;color:#f1d49b;text-wrap:balance}
body>header.dgPageHeader .dgPageTitle small{display:block;margin-top:3px;font:500 clamp(10px,2.7vw,12px)/1.6 'Noto Sans Devanagari',system-ui,sans-serif;letter-spacing:.1px;color:#c0cfbd;overflow-wrap:anywhere}
body>header.dgPageHeader>.dgPageBrand~*{justify-self:end;min-width:0;max-width:100%}
body>header.dgPageHeader .dgLang{align-items:center;gap:2px;padding:2px;border:1px solid #d7b6744d;border-radius:16px;background:#0c271ee0;box-shadow:0 1px 5px #0002 inset}
body>header.dgPageHeader .dgLang button{display:grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid transparent;border-radius:12px;background:transparent;color:#e9e0c7;font:650 14px/1.2 'Noto Sans Devanagari',system-ui,sans-serif}
body>header.dgPageHeader .dgLang button[aria-pressed=true]{background:linear-gradient(145deg,#f7dfaf,#d2a15c);border-color:#efd498;color:#352910;box-shadow:0 1px 0 #fff6d999 inset,0 2px 6px #0003}
body>header.dgPageHeader>:is(.pgListen,.dgHeaderLink){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 11px;border:1px solid #d7b67470;border-radius:14px;background:#e9c88c12;color:#f2d49b;font:650 14px/1.4 'Noto Sans Devanagari',system-ui,sans-serif;text-align:center;text-decoration:none}
body>header.dgPageHeader>.dg-page-sound{display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;grid-column:3;grid-row:1;border:1px solid #d7b67470;border-radius:14px;background:#e9c88c0c;color:#f2d49b}
body>header.dgPageHeader>.dg-page-sound::before{content:none}
body>header.dgPageHeader>.dg-page-sound[aria-pressed=false]{opacity:.65}
body>header.dgPageHeader>a:is(.valHome,.sahHome,.mbLibraryLink,.pvHome,.mantraLibrary){display:none}
body>header.dgPageHeader :is(button,a):focus-visible,.dgShelfTop>.dgBack:focus-visible{outline:3px solid #ffe3a0;outline-offset:3px}
body>header.dgPageHeader>.dgBack:active,.dgShelf .dgShelfTop>.dgBack:active{background:#e9c88c25;border-color:#f1d49b}
.dgStep{display:inline-grid;place-items:center;min-width:44px;min-height:44px;padding:0;line-height:1}
.dgStep>.dgUiIcon{width:20px;height:20px}
.pgMain{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.readerBack{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.pageEdge .dgUiIcon{margin:auto;width:24px;height:24px}
.dr-library-link{gap:8px}
.dgShelf .dgShelfTop{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;min-height:76px;padding:calc(12px + var(--dg-inset-top,env(safe-area-inset-top,0px))) max(16px,calc((100% - 728px)/2),env(safe-area-inset-right,0px)) 12px max(16px,calc((100% - 728px)/2),env(safe-area-inset-left,0px))}
.dgShelf .dgShelfTop h1{display:flex;align-items:center;gap:10px;min-width:0;margin:0;font-size:clamp(18px,5vw,23px);line-height:1.45}
.dgShelf .dgShelfTop h1 img{flex:none;display:block;width:32px;height:32px;border-radius:7px;object-fit:contain}
@media(min-width:800px){body>header.dgPageHeader .dgPageTitle strong{font-size:24px}}
@media(max-width:359px){body>header.dgPageHeader{gap:8px}body>header.dgPageHeader .dgPageMark{display:none}body>header.dgPageHeader .dgPageTitle strong{font-size:18px}body>header.dgPageHeader .dgPageTitle small{font-size:10px}}
@media(hover:hover) and (pointer:fine){body>header.dgPageHeader>.dgBack:hover,.dgShelf .dgShelfTop>.dgBack:hover{background:#e9c88c20;border-color:#f1d49b}}
@media(prefers-reduced-motion:reduce){body>header.dgPageHeader>.dgBack,.dgShelf .dgShelfTop>.dgBack{transition:none}}

.dgAppLanguage{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:948px;margin:14px auto;padding:14px 16px;border:1px solid #d7b67466;border-radius:18px;background:#153b2ef2;color:#f1d49b;font-family:system-ui,'Noto Sans Devanagari',sans-serif}.dgAppLanguage strong{display:block;font-size:17px}.dgAppLanguage small{display:block;margin-top:4px;max-width:420px;font-size:12px;line-height:1.5;color:#c3d2c2}.dgAppLanguage .dgLang button{padding:8px 14px;min-width:76px;min-height:48px}.dgAppLanguage .dgLang button[aria-pressed=true]{box-shadow:0 2px 8px #0003}@media(max-width:520px){.dgAppLanguage{margin:12px 16px;align-items:flex-start;flex-direction:column}.dgAppLanguage>span,.dgAppLanguage .dgLang{width:100%}.dgAppLanguage .dgLang button{flex:1}}

/* Common iPhone/iPad WebKit intrinsic-size guard for native calendar/time controls.
   Preserve native pickers and avoid clipped fields on every public tool screen. */
body[data-dg-product] input:is([type=date],[type=time],[type=datetime-local]){
  box-sizing:border-box;min-inline-size:0!important;max-inline-size:100%!important;
}
body[data-dg-product] input:is([type=date],[type=time],[type=datetime-local])::-webkit-date-and-time-value{
  min-width:0;max-width:100%;
}

/* Branded navigation is a true homepage link on all scripture/tool headers. */
body>header.dgPageHeader a.dgPageBrand{cursor:pointer;touch-action:manipulation;text-decoration:none;min-height:44px}
body>header.dgPageHeader a.dgPageBrand:focus-visible{outline:3px solid #f5d99e;outline-offset:3px;border-radius:10px}

/* Premium desktop navigation polish shared by all scripture/product pages.
   Preserve route-specific content widths and mobile touch geometry. */
@media(min-width:1100px){
  body>header.dgPageHeader{
    min-height:88px;
    background:
      radial-gradient(ellipse 400px 90px at 52% 0%,#4974521f,transparent 72%),
      linear-gradient(100deg,#0d2b21f5,#173c2df6 52%,#0e2c22f5);
    border-bottom:1px solid #ddbd7d85;
    box-shadow:inset 0 1px 0 #fff3cb16,0 10px 30px -22px #02190c;
  }
  body>header.dgPageHeader .dgPageMark{
    width:39px;height:39px;border-radius:10px;
    box-shadow:0 2px 10px #0005;
  }
  body>header.dgPageHeader .dgPageTitle strong{
    font-size:25px;line-height:1.3;color:#f8dea6;
  }
  body>header.dgPageHeader .dgPageTitle small{
    font-size:12px;color:#ded2b7;
  }
  body>header.dgPageHeader>.dgBack{
    border-radius:15px;
    border-color:#d9ba8188;
    background:linear-gradient(135deg,#fff0c51c,#d4b5740b);
  }
  html.dg-midnight body>header.dgPageHeader{
    background:
      radial-gradient(ellipse 420px 95px at 50% 0%,#65739b28,transparent 75%),
      linear-gradient(100deg,#101a31f5,#202d4bf6 55%,#111a30f5);
    border-color:#c3ae8777;
  }
}
