/* Ebook Studio reader refinements: keep controls readable without changing the
   reader engine, summary data, audio, narration, fullscreen, or scene behavior. */
body.ebook-studio-body{font-family:'Plus Jakarta Sans',Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.ebook-studio-body .aph-logo img{width:116px;height:auto}
.ebook-studio-body .es-stage{--purple:#8050f2;--line:rgba(181,190,255,.14);background:radial-gradient(ellipse at 67% 40%,#111a32 0,#080b16 48%,#03050b 100%)}
.es-reader-brand{gap:11px;padding:8px 9px 19px}.es-reader-mark{width:34px;height:34px;border:1px solid rgba(178,142,255,.3);border-radius:11px;background:linear-gradient(145deg,rgba(125,66,239,.2),rgba(53,77,177,.14));font-size:19px;transform:none}.es-reader-brand strong{font-size:14px}.es-reader-brand small{font-size:9px;color:#a9adbd}
.es-reader-nav{gap:5px}.es-reader-nav-link{min-height:42px;padding:9px 11px;font-size:12px}.es-reader-nav-icon{width:16px;height:16px;flex:0 0 16px;color:#a8a9bb}.es-reader-nav-link:hover .es-reader-nav-icon,.es-reader-nav-link.es-nav-active .es-reader-nav-icon{color:#d0b2ff}
.es-reader-header{grid-template-columns:minmax(130px,.65fr) minmax(180px,1fr) minmax(0,2fr);gap:12px}.es-reader-back{display:inline-flex;align-items:center;gap:5px;width:max-content;max-width:100%;font-size:12px}.es-reader-back span{white-space:nowrap}.es-reader-title{font-family:'Plus Jakarta Sans',Inter,sans-serif;font-size:19px;font-weight:700;letter-spacing:-.035em}.es-reader-header-controls{min-width:0;gap:6px}.es-reader-header-controls button{min-width:72px;height:38px;padding:0 9px;border-radius:10px;font-size:11px;white-space:nowrap}.es-reader-buy-header{display:flex;align-items:center;justify-content:center;gap:7px;min-width:125px;padding:0 12px;border-radius:10px;font-size:11px;white-space:nowrap}
.es-reader-tabs{scrollbar-width:thin;scrollbar-color:#46316f transparent}.es-reader-tab{width:118px;min-height:44px;height:44px;border-radius:11px}.es-reader-tab.es-active{background:linear-gradient(110deg,rgba(116,61,220,.46),rgba(39,28,75,.8));border-color:rgba(168,120,255,.67)}
.es-reader-content{border-color:rgba(177,187,255,.12);background:rgba(5,8,17,.76);box-shadow:0 24px 65px rgba(0,0,0,.28)}.es-reader-point-text{background:linear-gradient(150deg,rgba(11,15,29,.97),rgba(10,12,23,.93))}.es-reader-point-num{font-family:'Plus Jakarta Sans',Inter,sans-serif;font-size:34px;font-weight:750;color:#aa7cff}.es-reader-point-title{font-family:'Plus Jakarta Sans',Inter,sans-serif;font-weight:700;letter-spacing:-.04em}.es-reader-point-statement{font-size:14px}.es-reader-point-desc{font-size:13px;color:#c1c4d2}.es-reader-audiobar{background:rgba(8,10,21,.96);border-color:rgba(181,190,255,.16)}
@media(min-width:801px){
 #ebook-experience.es-stage{height:calc(100vh - 76px);min-height:620px}
 .es-reader-main{grid-template-rows:44px 44px minmax(0,1fr);gap:8px;padding:14px 20px 60px 18px}
 .es-reader-header{grid-template-columns:minmax(140px,.7fr) minmax(180px,1fr) minmax(0,2.2fr)}
 .es-reader-header-controls button{min-width:68px;height:35px;padding:0 8px;font-size:10px}
 .es-reader-buy-header{min-width:115px;height:35px;padding:0 9px;font-size:10px}
 .es-reader-tabs{height:44px;gap:6px}.es-reader-tab{width:108px;height:39px;min-height:39px}
 .es-reader-content{grid-template-columns:minmax(185px,19%) minmax(0,1fr)}
 .es-reader-point-text{padding:25px 19px}.es-reader-point-title{font-size:clamp(23px,1.8vw,31px)}
}
@media(max-width:1200px){.es-reader-header{grid-template-columns:minmax(115px,.6fr) minmax(130px,.8fr) minmax(0,2fr)}.es-reader-back span{font-size:11px}.es-reader-header-controls{gap:5px}.es-reader-header-controls button{min-width:38px;padding:0 8px}.es-reader-header-controls button span{display:none}.es-reader-buy-header{min-width:42px;padding:0 9px}.es-reader-buy-header span{display:none}}
@media(max-width:800px){
 .ebook-studio-body{padding-top:calc(56px + var(--aph-sat,0px))!important}
 .es-stage{min-height:calc(100vh - 56px);background:radial-gradient(ellipse at 50% 20%,#111a32 0,#080b16 55%,#03050b 100%)}
 .es-reader-brand{gap:7px;padding:4px 6px}.es-reader-mark{width:29px;height:29px;font-size:16px}.es-reader-brand strong{font-size:12px}.es-reader-nav{gap:1px}.es-reader-nav-link{min-height:36px;padding:7px 8px;font-size:10px}.es-reader-nav-icon{display:none}
 .es-reader-main{padding:11px 12px 102px}.es-reader-header{gap:7px}.es-reader-title{font-size:20px}.es-reader-header-controls button{width:36px;min-width:36px;height:36px;padding:0;font-size:14px}.es-reader-buy-header{width:38px;min-width:38px;height:36px;padding:0;font-size:13px}
 .es-reader-tabs{gap:7px;padding-bottom:5px}.es-reader-tab{width:125px;height:45px;min-height:45px}.es-reader-content{border-radius:14px}.es-reader-point-title{font-family:'Plus Jakarta Sans',Inter,sans-serif;font-size:clamp(25px,7vw,34px);font-weight:700}.es-reader-point-num{font-size:31px}
 .es-reader-audiobar{border-color:rgba(181,190,255,.18);box-shadow:0 12px 32px #0008}
}
@media(max-width:420px){.es-reader-brand small{display:none}.es-reader-nav-link{padding:7px 6px;font-size:9px}.es-reader-header{grid-template-columns:1fr auto}.es-reader-back{font-size:11px}.es-reader-title{grid-column:1/-1;order:3}.es-reader-header-controls{grid-column:2;grid-row:1}.es-reader-header-controls button{width:33px;min-width:33px;height:33px}.es-reader-buy-header{width:34px;min-width:34px;height:33px}}
/* Final viewport fit: the fixed public header overlays the reader on desktop,
   while phones keep normal document flow and a compact, scrollable layout. */
@media(min-width:801px){
 body.ebook-studio-body{padding-top:0!important}
 #ebook-experience.es-stage{height:100vh;min-height:640px;margin:0;overflow:hidden}
 .es-reader-sidebar{padding-top:78px}
 .es-reader-main{padding-top:82px;padding-bottom:62px;grid-template-rows:44px 44px minmax(0,1fr)}
 .es-reader-point-text{min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#55417c transparent}
 .es-reader-point-image{min-height:0}
 .es-scene-instruction{pointer-events:none;bottom:16px;padding:12px 22px;border-radius:16px}
 .es-scene-instruction-title{font-size:12px}
 .es-scene-instruction-sub{font-size:10px}
 .es-scene-instruction .es-scene-cursor-icon,.es-scene-arrow-row{display:none}
 .es-reader-point-image.es-scene-exploring .es-scene-instruction{opacity:0;visibility:hidden}
 .es-related-card-title{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
}
@media(max-width:800px){
 .es-stage{min-height:0;overflow:visible}
 .es-reader-sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand play" "nav nav";gap:6px 10px;padding:10px 12px;align-items:center}
 .es-reader-brand{grid-area:brand;min-width:0}
 .es-reader-nav{grid-area:nav;display:flex;width:100%;gap:6px;overflow-x:auto;scrollbar-width:none}
 .es-reader-nav::-webkit-scrollbar{display:none}
 .es-reader-nav-link{flex:1 0 auto;justify-content:center;min-width:0;padding:8px 10px;font-size:11px}
 .es-reader-sidebar-footer{grid-area:play;margin:0;padding:0;border:0}
 .es-reader-playall{width:auto;min-height:38px;padding:7px 10px;border:1px solid rgba(180,140,255,.4);border-radius:11px}
 .es-playall-icon{flex-basis:25px;width:25px;height:25px}
 .es-playall-title{font-size:10px}
 .es-playall-sub,.es-playall-status{display:none}
 .es-reader-main{padding:12px 12px 112px}
 .es-reader-header{grid-template-columns:minmax(0,1fr) auto;align-items:center}
 .es-reader-back{min-width:0;overflow:hidden;text-overflow:ellipsis}
 .es-reader-title{grid-column:1/-1;order:3;text-align:left;white-space:normal;overflow:visible;text-overflow:clip;font-size:clamp(19px,5vw,24px);line-height:1.2}
 .es-reader-header-controls{grid-column:2;grid-row:1;gap:4px}
 .es-reader-header-controls button{width:34px;min-width:34px;height:34px;border-radius:9px}
 .es-reader-buy-header{width:36px;min-width:36px;height:34px}
 .es-reader-tabs{margin:8px 0 10px;padding-left:0}
 .es-reader-content{display:flex;flex-direction:column;min-height:0;overflow:visible}
 .es-reader-point-text{order:2;padding:20px 16px;max-height:none;overflow:visible}
 .es-reader-point-image{order:1;width:100%;height:auto;min-height:0;aspect-ratio:1.15;max-height:68vh}
 .es-reader-image-wrap{display:flex;flex-direction:column;height:auto;min-height:0}
 .es-reader-image-wrap .es-reader-point-image{height:auto;min-height:0;flex:none}
 .es-scene-instruction{pointer-events:none;bottom:10px;padding:10px 16px;border-radius:14px;max-width:calc(100% - 28px)}
 .es-scene-instruction-title{font-size:11px}
 .es-scene-instruction-sub{font-size:9px}
 .es-scene-instruction .es-scene-cursor-icon,.es-scene-arrow-row{display:none}
 .es-reader-point-image.es-scene-exploring .es-scene-instruction{opacity:0;visibility:hidden}
 .es-related-ebooks{position:static;width:auto;max-width:100%;margin:10px 0 12px;padding:12px;overflow:visible}
 .es-related-list{display:flex;flex-direction:row;overflow-x:auto;gap:10px;padding-bottom:4px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
 .es-related-card{flex:0 0 118px;min-width:0;flex-direction:column;align-items:stretch;gap:7px;padding:6px;scroll-snap-align:start}
 .es-related-card img{width:100%;height:105px}
 .es-related-card-title{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:11px;line-height:1.35}
 .es-related-card-cta{display:none}
 .es-reader-audiobar{position:fixed;left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px));z-index:30;gap:7px;min-height:52px;padding:6px 8px}
 .es-reader-audiobar button{min-height:38px}
 .es-reader-example{margin:12px;padding:16px}
}
@media(max-width:420px){
 .es-reader-sidebar{padding:8px 9px;gap:5px}
 .es-reader-brand strong{font-size:11px}
 .es-reader-nav{gap:4px}
 .es-reader-nav-link{padding:7px 8px;font-size:10px}
 .es-reader-header-controls button{width:31px;min-width:31px;height:32px;font-size:12px}
 .es-reader-buy-header{width:32px;min-width:32px;height:32px}
 .es-reader-main{padding-right:9px;padding-left:9px}
 .es-reader-point-image{aspect-ratio:1}
 .es-reader-point-text{padding:18px 14px}
 .es-reader-audiobar{left:6px;right:6px}
}
/* Point heading and narration following. The number/title stay accessible in
   the article markup and are mirrored as a compact badge over the visual. */
.es-reader-image-wrap{position:relative}
.es-reader-image-heading{position:absolute;z-index:15;top:12px;left:12px;right:12px;display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100% - 24px);padding:8px 12px;border:1px solid rgba(208,190,255,.3);border-radius:12px;background:rgba(5,7,16,.72);color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.28);backdrop-filter:blur(10px);pointer-events:none}
.es-reader-image-heading span{flex:0 0 auto;color:#c19aff;font-weight:800;font-size:14px}
.es-reader-image-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:650}
.es-reader-point-text>.es-reader-point-num,.es-reader-point-text>.es-reader-point-title{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.es-narration-word{border-radius:3px;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease}
.es-narration-current{background:#ffe68a;color:#16121f!important;box-shadow:0 0 0 2px rgba(255,230,138,.22);}
.es-reader-key-takeaway{margin:14px 0 0;padding:10px 12px;border-left:3px solid #a875ff;border-radius:0 9px 9px 0;background:rgba(129,78,219,.13);color:#eee5ff;font-weight:650;line-height:1.55}
.es-reader-key-takeaway[hidden]{display:none}
.es-btn-narration[aria-pressed="true"]{border-color:rgba(192,149,255,.85)!important;background:rgba(115,69,197,.34)!important;color:#fff}
.es-reader-music-top:disabled{opacity:.48;cursor:not-allowed}
.es-reader-fullscreen-fallback{position:fixed!important;inset:0!important;z-index:100000!important;width:100vw!important;height:100vh!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow-y:auto!important;overscroll-behavior:contain;background:#050711!important}
body.es-reader-fallback-open{overflow:hidden!important}
body.es-reader-fallback-open>.aph,body.es-reader-fallback-open>.aipf{display:none!important}
.es-stage:fullscreen .es-reader-sidebar,.es-stage:-webkit-full-screen .es-reader-sidebar{padding-top:18px}
.es-stage:fullscreen .es-reader-main,.es-stage:-webkit-full-screen .es-reader-main{padding-top:18px}
@media(max-width:800px){
 .es-reader-image-heading{top:9px;left:9px;right:9px;max-width:calc(100% - 18px);gap:7px;padding:7px 9px;border-radius:10px}
 .es-reader-image-heading span{font-size:12px}
 .es-reader-image-heading strong{font-size:11px}
 .es-reader-fullscreen-fallback{display:block!important}
 .es-reader-fullscreen-fallback .es-reader-audiobar{position:fixed!important}
}
@media(prefers-reduced-motion:reduce){.es-narration-word{transition:none}}
