/* Divya Granth shared reader player + voice sheet. */
:root{--dgp-bg:#0e2720;--dgp-bg2:#163a2f;--dgp-line:#e5c58b33;--dgp-gold:#e8c88d;--dgp-gold2:#c99d5c;--dgp-ink:#f6eedb;--dgp-mute:#b9c9bd;--dgp-h:calc(96px + env(safe-area-inset-bottom))}
.dg-has-player{padding-bottom:calc(var(--dgp-h) + 18px)!important}
/* The old four-tab dock is replaced by the player on reader pages. */
.dg-has-player #dgMobileDock,.dg-has-player .dgMobileDock,.dg-has-player .dgReaderDock{display:none!important}
.dg-has-player .dg-legacy-voice{display:none!important}

.dg-player{position:fixed;z-index:120;left:0;right:0;bottom:0;padding:6px max(10px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right));
 background:linear-gradient(180deg,#123228f2,#0b221cf7);border-top:1px solid var(--dgp-line);box-shadow:0 -10px 30px #0006;
 -webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);color:var(--dgp-ink);font-family:'DM Sans',system-ui,-apple-system,sans-serif}
.dg-player-status{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11.5px;letter-spacing:.3px;color:var(--dgp-mute);min-height:16px;margin:0 auto 8px;max-width:560px;white-space:nowrap;overflow:hidden}
.dg-status-text{overflow:hidden;text-overflow:ellipsis}
.dg-dot{width:7px;height:7px;border-radius:50%;background:#7f978b;flex:none}
.dg-dot.natural{background:var(--dgp-gold)}
.dg-dot.live{box-shadow:0 0 0 0 #e8c88d99;animation:dgPulse 1.6s infinite}
@keyframes dgPulse{0%{box-shadow:0 0 0 0 #e8c88d88}70%{box-shadow:0 0 0 7px #e8c88d00}100%{box-shadow:0 0 0 0 #e8c88d00}}
.dg-player-row{display:grid;grid-template-columns:1fr 1fr 74px 1fr 1fr;justify-items:stretch;align-items:center;gap:4px;max-width:560px;margin:0 auto}
.dg-pbtn{appearance:none;border:0;background:none;color:var(--dgp-ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:52px;border-radius:14px;font-family:inherit;font-size:11px;font-weight:600;line-height:1.1;letter-spacing:.2px;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s,transform .1s}
.dg-pbtn svg{width:23px;height:23px;opacity:.95}
.dg-pbtn:hover{background:#ffffff0d}
.dg-pbtn:active{transform:scale(.94);background:#ffffff14}
.dg-pbtn:focus-visible,.dg-play:focus-visible,.dg-sheet button:focus-visible{outline:2px solid var(--dgp-gold);outline-offset:2px}
.dg-play{appearance:none;border:0;width:62px;height:62px;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#14352c;margin:0;justify-self:center;
 background:radial-gradient(circle at 35% 30%,#fbe7bd,var(--dgp-gold) 45%,var(--dgp-gold2));box-shadow:0 6px 18px #0007,inset 0 1px 0 #fff8,0 0 0 4px #e8c88d22;transition:transform .12s,box-shadow .2s;-webkit-tap-highlight-color:transparent}
.dg-play svg{width:28px;height:28px}
.dg-play:not(.is-playing) svg{margin-left:3px}
.dg-play:active{transform:scale(.93)}
.dg-play.is-playing{box-shadow:0 6px 18px #0007,inset 0 1px 0 #fff8,0 0 0 6px #e8c88d33}

/* Link into the shared voice sheet from each reader's own listen panel. */
.dg-open-voice{display:inline-flex;align-items:center;gap:8px;margin:12px auto 2px;padding:10px 16px;border-radius:999px;border:1px solid #e8c88d66;background:#e8c88d14;color:#f3dfb4;font:600 14px/1 'DM Sans',system-ui,sans-serif;cursor:pointer}
.dg-open-voice svg{width:18px;height:18px}

/* Bottom sheet */
.dg-sheet{position:fixed;inset:0;z-index:140}
.dg-sheet[hidden]{display:none}
.dg-sheet-backdrop{position:absolute;inset:0;background:#02110dcc;opacity:0;transition:opacity .2s}
.dg-sheet.open .dg-sheet-backdrop{opacity:1}
.dg-sheet-card{position:absolute;left:0;right:0;bottom:0;margin:0 auto;max-width:520px;max-height:88vh;overflow:auto;overscroll-behavior:contain;
 background:linear-gradient(180deg,#1a4335,#0f2a22);color:var(--dgp-ink);border:1px solid var(--dgp-line);border-bottom:0;border-radius:22px 22px 0 0;
 padding:8px 20px calc(22px + env(safe-area-inset-bottom));box-shadow:0 -20px 50px #000a;transform:translateY(100%);transition:transform .24s cubic-bezier(.2,.8,.2,1);font-family:'DM Sans',system-ui,sans-serif}
.dg-sheet.open .dg-sheet-card{transform:none}
.dg-sheet-grip{width:42px;height:5px;border-radius:3px;background:#ffffff33;margin:4px auto 8px}
.dg-sheet-head{display:flex;align-items:center;justify-content:space-between}
.dg-sheet h2{margin:4px 0;font:500 22px 'Playfair Display',Georgia,serif;color:var(--dgp-gold)}
.dg-icon{border:0;background:#ffffff10;color:var(--dgp-ink);width:40px;height:40px;border-radius:50%;display:grid;place-items:center;cursor:pointer}
.dg-icon svg{width:20px;height:20px}
.dg-label{display:block;margin:18px 0 8px;font-size:12px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:#cdb683}
.dg-seg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dg-seg button{border:1px solid #ffffff22;background:#ffffff08;color:var(--dgp-ink);border-radius:14px;padding:12px 10px;text-align:left;cursor:pointer;min-height:58px;transition:background .15s,border-color .15s}
.dg-seg b{display:block;font-size:15px}
.dg-seg small{display:block;margin-top:3px;font-size:12px;color:var(--dgp-mute)}
.dg-seg button[aria-checked="true"]{background:linear-gradient(135deg,#f2d8a2,#d3a865);color:#13352b;border-color:transparent}
.dg-seg button[aria-checked="true"] small{color:#3b4b3f}
.dg-seg button:disabled{opacity:.45;cursor:not-allowed}
.dg-note{margin:8px 2px 0;font-size:12.5px;line-height:1.55;color:var(--dgp-mute)}
.dg-speed{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}
.dg-speed output{font-weight:700;color:var(--dgp-ink);letter-spacing:0;text-transform:none}
.dg-speed input{flex-basis:100%;margin-top:10px;accent-color:var(--dgp-gold);height:28px}
.dg-sheet-actions{display:grid;grid-template-columns:1.4fr 1fr;gap:8px;margin-top:16px}
.dg-gold,.dg-ghost{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:48px;border-radius:14px;font:700 14.5px 'DM Sans',system-ui,sans-serif;cursor:pointer}
.dg-gold{border:0;background:linear-gradient(135deg,#f2d8a2,#c99d5c);color:#13352b}
.dg-ghost{border:1px solid #ffffff26;background:#ffffff0a;color:var(--dgp-ink)}
.dg-gold svg,.dg-ghost svg{width:18px;height:18px}
.dg-sheet-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}

.dg-toast{position:fixed;left:50%;bottom:calc(var(--dgp-h) + 14px);transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:150;background:#f6ecd4;color:#1b3a30;padding:10px 16px;border-radius:12px;box-shadow:0 10px 30px #0007;font:600 14px 'DM Sans',system-ui,sans-serif;transition:opacity .2s,transform .2s;max-width:calc(100% - 32px)}
.dg-toast.show{opacity:1;transform:translate(-50%,0)}

@media (min-width:900px){
 .dg-player{left:50%;right:auto;bottom:14px;transform:translateX(-50%);width:min(620px,calc(100% - 32px));border:1px solid var(--dgp-line);border-radius:22px;padding-bottom:8px}
 .dg-has-player{--dgp-h:104px}
 .dg-sheet-card{bottom:16px;border-radius:22px;border-bottom:1px solid var(--dgp-line)}
}
@media (prefers-reduced-motion:reduce){.dg-sheet-card,.dg-sheet-backdrop,.dg-toast{transition:none}.dg-dot.live{animation:none}}

/* Gita reader overlay on the homepage scrolls inside itself. */
.dg-has-player .readerZone{padding-bottom:calc(var(--dgp-h) + 24px)!important}
.dg-has-player .readerZone .voiceLink{display:none!important}

/* Hindi meaning (भावार्थ) shown under an original passage in any reader. */
.dgMeaning{margin:14px 0 0;padding-top:10px;border-top:1px dashed #b9975c88;font:500 15.5px/1.7 'Noto Sans Devanagari','Noto Serif Devanagari',sans-serif;color:#5b4a32;white-space:normal}
.dgMeaning b{display:inline-block;margin-right:6px;font-size:12px;letter-spacing:.5px;color:#8a6a3a}
.shivDark .dgMeaning,.dark .dgMeaning{color:#d8c7a3;border-top-color:#d8c7a355}
.valDark .dgMeaning,.sahDark .dgMeaning,body.dark .dgMeaning{color:#d8c7a3;border-top-color:#d8c7a355}

/* ---------- आसान पठन (easy reading): one wide page, large text, no inner scrolling ---------- */
html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book,html.dg-easy .openBook.openBook.openBook{
 display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;
 border-width:5px!important;border-radius:16px!important;grid-template-columns:none!important}
html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book>.page.page,html.dg-easy .openBook.openBook.openBook>.paper.paper{
 display:block!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;
 padding:22px 18px 18px!important;box-shadow:none!important;border-left:0!important;transform:none!important}
html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book>.page.page>*,html.dg-easy .openBook.openBook.openBook>.paper.paper>*{
 position:static!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book>.page.page+.page,html.dg-easy .openBook.openBook.openBook>.paper.paper+.paper{border-top:2px dashed #b9975c66!important}
html.dg-easy .openBook.openBook.openBook:before,html.dg-easy .openBook.openBook.openBook:after,html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book:before,html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book:after,html.dg-easy .dg-flip-sheet,html.dg-easy .flipSheet,html.dg-easy .dg-opening-cover,html.dg-easy .openingCover,html.dg-easy .mobilePageLabel{display:none!important}
html.dg-easy .dg-physical-book :is(h2,h3){font-size:21px!important;line-height:1.45!important}
html.dg-easy .dg-physical-book :is(.kicker,.valKicker,.pageTop,.foot,.pageBottom){font-size:12.5px!important}
html.dg-easy :is(.dg-physical-book,.openBook) :is(.lines,.original,.orig,.shloka,.mbPassage,.valmikiVerse,.sahVerse,.mantraOriginal,.shivVerse,.kcText,.pvStep){font-size:20px!important;line-height:1.95!important}
html.dg-easy :is(.dg-physical-book,.openBook) :is(.meaning,.mantraMeaning,.mantraMeaningEnglish,.dgMeaning,.pvEnglish,.translit){font-size:17.5px!important;line-height:1.8!important}
html.dg-easy :is(.dg-physical-book,.openBook) :is(.valmikiVerse p,.mbPassage p){font-size:inherit!important}
/* Reading-mode and text-size controls in the shared sheet */
.dg-size{display:grid;grid-template-columns:52px 1fr 52px;gap:8px;align-items:center}
.dg-size button{min-height:48px;border-radius:14px;border:1px solid #ffffff26;background:#ffffff0a;color:var(--dgp-ink);font:700 18px 'DM Sans',system-ui,sans-serif;cursor:pointer}
.dg-size output{text-align:center;font-weight:700;color:var(--dgp-ink)}
.dg-chips{display:flex;flex-wrap:wrap;gap:8px}
.dg-chips button{flex:1;min-width:64px;min-height:44px;border-radius:12px;border:1px solid #ffffff22;background:#ffffff08;color:var(--dgp-ink);font:700 14px 'DM Sans',system-ui,sans-serif;cursor:pointer}
.dg-chips button[aria-pressed="true"]{background:linear-gradient(135deg,#f2d8a2,#d3a865);color:#13352b;border-color:transparent}
/* In easy reading the small page note and the page's play button each get their own line. */
html.dg-easy .dg-physical-book .page :is(.smallNote,.pageFooter){display:block!important;position:static!important;margin:14px 0 8px!important;transform:none!important}
html.dg-easy .dg-physical-book .page .hc-play{position:static!important;margin:4px 0 0!important;transform:none!important}
.dg-seg.dg-seg3{grid-template-columns:repeat(3,minmax(0,1fr))}
.dg-seg.dg-seg3 button{text-align:center;padding:10px 6px}
.dg-seg.dg-seg3 b{font-size:16px}

/* Comfortable tap targets and readable labels in every reader (for older hands and eyes). */
.dg-book-reader :is(.hc-play,#leftPlay,#rightPlay,#hiPlay,#enPlay,#playOriginal,#playMeaning,#rPlayLeft,#rPlayRight,#valLeftPlay,#valRightPlay,#sahLeftPlay,#sahRightPlay){min-width:44px!important;min-height:44px!important}
.dg-book-reader :is(.toolbar,.hcTools,.controls,.audio,.nav,.navigation,.utilityRow,.rTools,.mbTools,.valTools,.sahTools) :is(button,select,input:not([type=range]):not([type=checkbox])){min-height:42px}
.dg-book-reader :is(summary,.dg-type-title){min-height:40px}
.dg-book-reader :is(.kicker,.valKicker,.pageTop,.foot,.pageBottom,.smallNote,.pageFooter,.mbPageFooter,.valPageFoot,.rPageFooter){font-size:max(12px,1em)!important}
.dg-book-reader a[href^="http"]{display:inline-block;padding:6px 0}
.dg-book-reader button:not(.dg-pbtn):not(.dg-play):not(.dg-icon),.dg-book-reader summary,.dg-book-reader select{min-height:42px}
.dg-book-reader .page button:not(.hc-play){min-height:0}
/* Easy reading: a stanza stays together on one page; an empty second page is hidden. */
html.dg-easy .dg-physical-book.dg-physical-book.dg-physical-book>.page.page.dg-empty{display:none!important}
/* iPhone zooms into any field with text under 16px: keep form fields at 16px on phones. */
@media (max-width:900px){input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}}
/* Six buttons on the bar: मुख्य · पीछे · ▶ · आगे · पाठ · आवाज़ */
.dg-player-row{max-width:620px}
@media (max-width:380px){.dg-pbtn{font-size:10.5px}.dg-pbtn svg{width:21px;height:21px}.dg-play{width:56px;height:56px;margin:0 2px}}
/* पाठ चुनें sheet */
.dg-pick{display:grid;gap:6px;margin:14px 0}
.dg-pick span{font:700 15px 'Noto Sans Devanagari','DM Sans',sans-serif;color:#e8c88d}
.dg-pick select{width:100%;min-height:54px;border-radius:14px;border:2px solid #e8c88d55;background:#f6ecd4;color:#13352b;padding:0 12px;font:600 17px 'Noto Sans Devanagari','DM Sans',sans-serif}
.dg-choose-list{display:grid;gap:8px}
.dg-choose-list button{min-height:52px;padding:10px 14px;border-radius:14px;border:1px solid #ffffff22;background:#ffffff08;color:var(--dgp-ink);text-align:left;font:700 16px 'Noto Sans Devanagari','DM Sans',sans-serif;cursor:pointer}
.dg-choose-list button[aria-current="true"]{background:linear-gradient(135deg,#f2d8a2,#d3a865);color:#13352b;border-color:transparent}
.dg-start-reading{width:100%;margin-top:16px}
/* One set of narration controls: the player bar. The old per-book Listen / Auto / Pause / Stop
   buttons stay in the page (the bar presses them) but are no longer shown. */
.dg-has-player :is(#listen,#auto,#pause,#stop,#startVoice,#stopVoice,#valListen,#valAuto,#valPause,#valStop,#sahListen,#sahAuto,#sahPause,#sahStop){display:none!important}
html body.dg-has-player .dg-empty-row.dg-empty-row{display:none!important}

/* ---- Play button: a raised saffron-gold disc with a label, glowing while it reads ---- */
html .dg-player .dg-play,html.dg3d .dg-player .dg-play{position:relative;width:60px;height:60px;margin:0 8px;color:#fff;
 background:radial-gradient(circle at 34% 28%,#ffe3a1 0,#fbb64a 38%,#ec8a1f 72%,#c9601a 100%);
 box-shadow:0 0 0 4px #12301f,0 0 0 6px #f6c46a,0 10px 22px -4px #f0892499,inset 0 2px 1px #fff7,inset 0 -4px 8px #a8460f55}
html .dg-player .dg-play svg{width:30px;height:30px;filter:drop-shadow(0 1px 1px #8a3a0b99)}
html .dg-player .dg-play:not(.is-playing) svg{margin-left:4px}
html .dg-player .dg-play::before{content:'';position:absolute;inset:-6px;border-radius:50%;pointer-events:none;opacity:0}
html .dg-player .dg-play.is-playing::before{border:2px solid #f6c46a;animation:dgPlayHalo 1.8s ease-out infinite}
@keyframes dgPlayHalo{0%{transform:scale(1);opacity:.85}100%{transform:scale(1.35);opacity:0}}
html .dg-player .dg-play:active,html.dg3d .dg-player .dg-play:active{transform:scale(.94);box-shadow:0 0 0 4px #12301f,0 0 0 6px #f6c46a,0 4px 10px -2px #f0892499,inset 0 2px 6px #a8460f66}
@media (max-width:380px){html .dg-player .dg-play{width:54px;height:54px;margin:0 3px}}
@media (prefers-reduced-motion:reduce){html .dg-player .dg-play.is-playing::before{animation:none;opacity:.6}}

/* ---- "सुनें" button on the book pages: a clear pill instead of a small dark circle ---- */
html body .dg-page-play,html.dg3d body .dg-page-play{display:inline-flex!important;align-items:center;gap:8px;width:auto!important;min-width:0!important;height:40px!important;min-height:40px!important;
 padding:0 16px 0 5px!important;border-radius:999px!important;border:1.5px solid #d39a4c!important;background:linear-gradient(180deg,#fff7e2,#f7e2b4)!important;color:#7a3d0c!important;font-size:0!important;
 box-shadow:0 3px 8px -2px #7a4a1455,inset 0 1px 0 #fff!important;cursor:pointer;line-height:1}
html body .dg-page-play::before{content:'';flex:none;width:30px;height:30px;border-radius:50%;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11a.9.9 0 0 0 1.4.75l8.4-5.5a.9.9 0 0 0 0-1.5l-8.4-5.5A.9.9 0 0 0 9 6.5z' fill='%23fff'/%3E%3C/svg%3E") center/18px no-repeat,radial-gradient(circle at 34% 28%,#ffd88a,#ef9128 70%,#cf6a1c);box-shadow:inset 0 -2px 4px #a8460f55}
html body .dg-page-play::after{content:'सुनें';font:700 15px 'Noto Sans Devanagari','DM Sans',sans-serif}
html body .dg-page-play[data-dg-on]{background:linear-gradient(180deg,#ffe9c2,#f3c77c)!important;border-color:#c06a1c!important}
html body .dg-page-play[data-dg-on]::before{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='7' y='6' width='3.6' height='12' rx='1' fill='%23fff'/%3E%3Crect x='13.4' y='6' width='3.6' height='12' rx='1' fill='%23fff'/%3E%3C/svg%3E") center/18px no-repeat,radial-gradient(circle at 34% 28%,#ffd88a,#ef9128 70%,#cf6a1c)}
html body .dg-page-play[data-dg-on]::after{content:'रोकें'}
html body .dg-page-play:active{transform:scale(.96)}

/* Comfortable touch targets (WCAG 2.5.8): volume sliders and small header links */
input[type=range]{min-height:32px}
body>header>a:first-child{display:inline-block;padding:12px 4px}
