/*
Theme Name: Dainik E-Paper
Author: BD Soft INC
Description: Interactive Bangla e-paper theme. Add each newspaper page separately and map clickable news areas with built-in popup content.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dainik-epaper
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
:root{--green:#078f46;--green-dark:#056b35;--red:#d71920;--ink:#17191b;--muted:#687078;--line:#dfe4e7;--viewer:#20272d}
*{box-sizing:border-box}html,body{margin:0;padding:0}
body{font-family:"Noto Sans Bengali","SolaimanLipi","Nirmala UI",Arial,sans-serif;background:#f4f6f7;color:var(--ink)}
a{color:inherit;text-decoration:none}
.container{width:min(1440px,94%);margin:auto}
.topbar{background:#f7f8f8;border-bottom:1px solid var(--line);font-size:13px}
.topbar .container{display:flex;justify-content:space-between;gap:20px;padding:9px 0}
.brandbar{background:#fff}.brandbar .container{display:flex;align-items:center;justify-content:space-between;padding:18px 0 14px}
.brand{font-family:Georgia,"Noto Serif Bengali",serif;font-weight:800;font-size:48px;letter-spacing:-2px}
.tagline{font-size:12px;color:#666;margin-top:-4px}.brand-ad{width:330px;height:68px;border-radius:6px;background:#eef7f1;display:flex;align-items:center;justify-content:center;color:var(--green-dark);font-weight:700}
.nav{background:#fff;border-bottom:1px solid var(--line);border-top:1px solid #f0f0f0}.nav .container{display:flex;gap:27px;overflow:auto;white-space:nowrap}
.nav a{padding:13px 2px;font-size:16px}.nav a:hover,.nav a.active{color:var(--green);border-bottom:3px solid var(--green)}
.ep-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 0 16px}.ep-head h1{margin:0;color:var(--green);font-size:29px}
.controls{display:flex;gap:10px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;gap:7px;padding:10px 16px;border:1px solid var(--line);background:#fff;border-radius:8px;font-weight:700;cursor:pointer}.btn.red{background:var(--red);color:#fff;border-color:var(--red)}
.viewer{background:var(--viewer);border-radius:9px;box-shadow:0 8px 30px rgba(0,0,0,.16);overflow:hidden}
.stage{position:relative;min-height:650px;display:flex;align-items:center;justify-content:center;padding:18px 68px}
.paper-wrap{position:relative;max-width:850px;width:100%;line-height:0;box-shadow:0 3px 22px rgba(0,0,0,.35);background:#fff}
.paper-wrap img{width:100%;height:auto;display:block}
.clip{position:absolute;border:2px solid transparent;cursor:pointer;transition:.15s;background:rgba(7,143,70,.02);padding:0}
.clip:hover,.clip:focus{border-color:var(--green);background:rgba(7,143,70,.10);box-shadow:0 0 0 2px rgba(255,255,255,.7) inset;outline:none}
.nav-arrow{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:50%;border:1px solid #55616a;background:#2c353c;color:#fff;font-size:28px;display:grid;place-items:center;cursor:pointer}.nav-arrow.prev{left:16px}.nav-arrow.next{right:16px}
.thumbs{display:flex;gap:12px;overflow:auto;padding:14px 20px 18px;background:#192026;border-top:1px solid #39434a}
.thumb{min-width:92px;width:92px;color:#dbe0e3;text-align:center;font-size:12px;background:none;border:0;cursor:pointer;padding:0}.thumb img{width:92px;height:120px;object-fit:cover;background:#fff;border:2px solid transparent;border-radius:4px}.thumb.active img{border-color:#20ad63}.thumb span{display:block;padding-top:6px}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.68);z-index:9999;display:none;padding:28px}.modal.open{display:flex;align-items:center;justify-content:center}
.modal-card{background:#fff;border-radius:12px;width:min(900px,100%);max-height:90vh;overflow:auto;padding:28px;position:relative}.modal-close{position:absolute;right:16px;top:8px;border:0;background:none;font-size:32px;cursor:pointer}.modal-card h2{font-size:32px;line-height:1.25;margin:0 35px 10px 0}.modal-meta{color:var(--muted);font-size:14px;margin-bottom:18px}.modal-card img{max-width:100%;height:auto;border-radius:6px;margin-bottom:18px}.modal-content{font-size:18px;line-height:1.9}.modal-content p{margin:0 0 14px}.footer{margin-top:40px;background:#15191c;color:#d7dde0;padding:35px 0}
.notice{padding:25px;background:#fff;border:1px dashed #ccd3d7;border-radius:8px}
@media(max-width:800px){.brand{font-size:35px}.brand-ad{display:none}.topbar .container{font-size:11px}.ep-head{align-items:flex-start;flex-direction:column}.stage{padding:12px 48px;min-height:420px}.modal{padding:10px}.modal-card{padding:20px}.modal-card h2{font-size:24px}}

/* Cropped newspaper article popup */
.crop-modal .modal-card{width:min(980px,96vw);padding:18px;background:#fff}
.crop-stage{background:#20272d;border-radius:8px;padding:18px;display:flex;justify-content:center;align-items:center;min-height:260px;overflow:hidden}
#crop-canvas{display:block;max-width:100%;height:auto;box-shadow:0 2px 18px rgba(0,0,0,.28);background:#fff}
.crop-hint{text-align:center;color:#737b82;font-size:13px;margin:10px 0 0}
@media(max-width:800px){.crop-modal .modal-card{padding:10px}.crop-stage{padding:8px}}

/* v1.5 split-view reader */
.ep-shell{display:grid;grid-template-columns:86px minmax(0,1fr);gap:12px;align-items:start}
.ep-sidebar{background:#fff;border:1px solid var(--line);border-radius:5px;padding:8px;position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}
.ep-sidebar-title{background:var(--red);color:#fff;text-align:center;font-size:12px;font-weight:800;padding:5px 2px;border-radius:2px;margin-bottom:8px}
.ep-side-thumb{display:block;width:100%;border:2px solid transparent;background:#fff;padding:2px;margin:0 0 9px;cursor:pointer;border-radius:3px}
.ep-side-thumb.active{border-color:var(--red)}
.ep-side-thumb img{display:block;width:100%;height:auto}
.ep-side-thumb span{display:block;font-size:10px;text-align:center;margin-top:3px;color:#444}
.ep-reader{display:grid;grid-template-columns:minmax(380px,1fr) minmax(380px,1fr);gap:16px;align-items:start}
.ep-page-pane,.ep-detail-pane{background:#fff;border:1px solid var(--line);border-radius:4px;overflow:hidden}
.ep-pane-head{height:34px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:#f3f5f6;border-bottom:1px solid var(--line);font-size:13px;font-weight:800}
.ep-page-scroll{padding:12px;background:#eef1f2;max-height:calc(100vh - 230px);overflow:auto}
.ep-page-pane .paper-wrap{max-width:none;width:100%;box-shadow:0 2px 10px rgba(0,0,0,.18)}
.ep-detail-pane{min-height:520px;position:sticky;top:12px}
.ep-detail-body{padding:12px;background:#eef1f2;min-height:486px;display:flex;align-items:flex-start;justify-content:center}
.ep-detail-placeholder{width:100%;min-height:460px;display:flex;align-items:center;justify-content:center;text-align:center;color:#70787e;background:#fff;border:1px dashed #cfd5d8}
#crop-canvas{max-width:100%;height:auto;display:block;background:#fff;box-shadow:0 2px 12px rgba(0,0,0,.18)}
.clip{background:rgba(215,25,32,.02);border-color:transparent}
.clip:hover,.clip:focus{border-color:var(--red);background:rgba(215,25,32,.09)}
.ep-mobile-detail{display:none}
@media(max-width:1100px){.ep-reader{grid-template-columns:1fr}.ep-detail-pane{position:relative;top:auto}.ep-detail-body{min-height:360px}.ep-page-scroll{max-height:none}}
@media(max-width:650px){.ep-shell{grid-template-columns:1fr}.ep-sidebar{position:relative;display:flex;gap:8px;max-height:none;overflow-x:auto}.ep-sidebar-title{display:none}.ep-side-thumb{min-width:58px;width:58px;margin:0}.ep-side-thumb span{font-size:9px}.ep-reader{display:block}.ep-page-pane{margin-bottom:12px}.ep-detail-pane{display:block}.ep-detail-body{min-height:300px}}

:root{--accent:#333a40;--reader-bg:#f3f5f6}
.ep-detail-body{position:relative;display:block;min-height:520px;overflow:auto;padding:14px;background:var(--reader-bg)}
.crop-stack{width:100%;display:flex;flex-direction:column;align-items:center;gap:14px}
.crop-item{width:100%;display:flex;flex-direction:column;align-items:center}
.crop-image{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100vh - 250px);object-fit:contain;background:#fff;box-shadow:0 2px 12px rgba(0,0,0,.18)}
.crop-continuation{align-self:stretch;text-align:center;font-size:11px;color:#777;background:#fff;border-bottom:1px solid #ddd;padding:4px}
.detail-zoom{position:absolute;right:12px;top:10px;width:36px;height:36px;border:1px solid #aaa;background:rgba(255,255,255,.92);border-radius:4px;cursor:pointer;font-size:18px;z-index:5}
.detail-zoom:hover{background:#fff}
.ep-archive-head{display:flex;justify-content:space-between;align-items:center;margin:20px 0;padding:16px;background:#fff;border:1px solid var(--line)}
.ep-archive-head h1{margin:0 0 4px}.ep-archive-head p{margin:0;color:#777}
.archive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.calendar-card{background:#fff;border:1px solid var(--line);padding:14px}
.calendar-card h3{text-align:center;margin:0 0 12px}
.cal-week,.cal-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-week b{text-align:center;font-size:11px;color:#777;padding:5px 0}
.cal-days span,.cal-days a{display:flex;align-items:center;justify-content:center;min-height:34px;border:1px solid #eee;text-decoration:none;color:#555;font-size:12px}
.cal-days a{background:#fff7f7;color:var(--red);font-weight:800;border-color:#f0cccc}
.cal-days a:hover{background:var(--red);color:#fff}
@media(max-width:900px){.archive-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.archive-grid{grid-template-columns:1fr}.ep-archive-head{display:block}.ep-archive-head .btn{display:inline-block;margin-top:10px}.crop-image{max-height:none}}

/* v1.7 clean reader + responsive menu + archive */
.nav-inner{position:relative;display:flex;align-items:center}
.nav-links{display:flex;gap:27px;align-items:center;width:100%;overflow-x:auto;white-space:nowrap}
.nav-toggle{display:none;border:0;background:var(--green);color:#fff;border-radius:5px;padding:9px 13px;font-weight:800;cursor:pointer}
.archive-link{margin-left:auto!important;color:var(--red)!important;font-weight:800!important}
.ep-detail-pane{min-height:520px;position:sticky;top:12px}
.ep-detail-body{position:relative;min-height:520px;padding:0;background:var(--reader-bg);overflow:auto}
.ep-detail-placeholder{width:100%;min-height:520px;display:flex;align-items:center;justify-content:center;text-align:center;color:#70787e;background:#fff;border:0}
.crop-stack{width:100%;min-height:520px;display:flex;flex-direction:column;align-items:center;gap:14px;padding:16px}
.crop-item{width:100%;display:flex;flex-direction:column;align-items:center}
.crop-image{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100vh - 130px);object-fit:contain;background:#fff;box-shadow:0 2px 12px rgba(0,0,0,.18)}
.crop-continuation{align-self:stretch;text-align:center;font-size:11px;color:#777;background:#fff;border-bottom:1px solid #ddd;padding:4px}
.reader-toolbar{position:sticky;right:0;bottom:0;display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:8px;background:linear-gradient(transparent,rgba(243,245,246,.96));z-index:10}
.reader-toolbar #clip-counter{font-size:11px;color:#777;margin-right:auto}
.detail-zoom{position:static;width:36px;height:36px;border:1px solid #aaa;background:#fff;border-radius:4px;cursor:pointer;font-size:18px;z-index:5}
.detail-zoom:hover{background:#fff}
.crop-fullscreen{position:fixed;inset:0;background:rgba(10,12,14,.97);z-index:100000;overflow:auto;padding:56px 18px 25px}
.crop-fullscreen[hidden]{display:none}
.crop-fullscreen-inner{width:100%;max-width:1400px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:16px}
.crop-fullscreen .crop-item{width:min(100%,1200px)}
.crop-fullscreen .crop-image{max-width:100%;max-height:none;box-shadow:0 3px 24px rgba(0,0,0,.45)}
.crop-fullscreen-close{position:fixed;right:18px;top:14px;width:42px;height:42px;border:0;border-radius:50%;background:#fff;color:#222;font-size:30px;line-height:1;cursor:pointer;z-index:100001}
body.crop-is-fullscreen{overflow:hidden}
@media(max-width:1100px){
  .nav-links{display:none;position:absolute;left:0;right:0;top:100%;z-index:5000;background:#fff;border:1px solid var(--line);box-shadow:0 8px 18px rgba(0,0,0,.12);padding:7px;flex-direction:column;align-items:stretch;gap:0;white-space:normal}
  .nav-links.open{display:flex}
  .nav-links a{padding:11px 12px;border-bottom:1px solid #eee}
  .nav-links .archive-link{margin-left:0!important}
  .nav-toggle{display:inline-flex;align-items:center;gap:6px}
  .nav{position:relative}
}
@media(max-width:650px){
  .container{width:96%}
  .brandbar .container{padding:11px 0}
  .brand{font-size:34px}
  .nav-links a{font-size:14px}
  .ep-head{padding:14px 0 10px}
  .controls{width:100%}
  .controls .btn{padding:8px 11px}
  .ep-shell{grid-template-columns:1fr}
  .ep-sidebar{position:relative;display:flex;gap:8px;max-height:none;overflow-x:auto;padding:7px}
  .ep-sidebar-title{display:none}
  .ep-side-thumb{min-width:62px;width:62px;margin:0}
  .ep-side-thumb span{font-size:9px}
  .ep-reader{display:block}
  .ep-page-pane{margin-bottom:10px}
  .ep-detail-pane{position:relative;top:auto}
  .ep-detail-body{min-height:330px}
  .ep-detail-placeholder{min-height:330px}
  .crop-stack{min-height:330px;padding:9px}
  .crop-image{max-height:none}
}

/* v1.8 inline archive + top reader toolbar */
.ep-detail-body{display:flex;flex-direction:column;padding:0;overflow:hidden}
.reader-toolbar{order:0;position:sticky;top:0;z-index:30;display:flex;justify-content:flex-start;align-items:center;gap:0;padding:6px 8px;background:#fff;border:1px solid #c7cbd0;border-radius:4px;margin:0 0 8px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.reader-toolbar .reader-tool{width:54px;height:38px;border:0;border-right:1px solid #c7cbd0;background:#e9ebed;color:#222;font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.reader-toolbar .reader-tool:first-child{border-radius:4px 0 0 4px}
.reader-toolbar .reader-tool:last-of-type{border-right:0;border-radius:0 4px 4px 0}
.reader-toolbar .reader-tool:hover{background:#dfe2e5}
.reader-toolbar #clip-counter{font-size:11px;color:#777;margin-left:auto;padding:0 7px}
.ep-detail-placeholder{order:1}
.crop-stack{order:2}
.archive-popover{position:absolute;z-index:6000;top:calc(100% + 8px);left:50%;transform:translateX(-50%);width:290px;background:#fff;border:1px solid #bbb;border-radius:7px;box-shadow:0 10px 30px rgba(0,0,0,.22);padding:9px}
.archive-popover[hidden]{display:none}
.archive-pop-head{display:flex;justify-content:space-between;align-items:center;padding:3px 3px 8px;border-bottom:1px solid #eee}
.archive-pop-head button{border:0;background:none;font-size:22px;cursor:pointer}
.archive-picker{display:grid;grid-template-columns:32px 1fr 1fr 32px;gap:4px;margin:8px 0}
.archive-picker button,.archive-picker select{height:32px;border:1px solid #aaa;background:#f8f8f8;border-radius:4px}
.archive-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.archive-calendar b{text-align:center;font-size:10px;color:#555;padding:3px 0}
.archive-calendar a,.archive-calendar span{min-height:30px;display:flex;align-items:center;justify-content:center;border-radius:3px;text-decoration:none;font-size:12px;border:1px solid #eee}
.archive-calendar a.has-edition{background:var(--red);color:#fff;font-weight:800;border-color:var(--red)}
.archive-calendar a.has-edition:hover{filter:brightness(.9)}
.archive-calendar a.empty-date{background:#f0f0f0;color:#aaa;pointer-events:none}
.archive-note{font-size:10px;color:#777;padding-top:7px;text-align:center}
.controls{position:relative}
@media(max-width:1100px){
 .archive-popover{left:0;transform:none}
}
@media(max-width:650px){
 .reader-toolbar{width:100%;overflow-x:auto}
 .reader-toolbar .reader-tool{width:44px;min-width:44px;height:36px;font-size:17px}
 .archive-popover{width:calc(100vw - 24px);max-width:290px}
}

/* v1.9 — crop reader fit/position fix */
.ep-detail-pane{
  min-height:0;
  display:flex;
  flex-direction:column;
}
.ep-detail-body{
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.ep-detail-body .reader-toolbar{
  flex:0 0 auto;
  position:relative;
  top:auto;
  margin:0 0 8px;
}
.ep-detail-body .ep-detail-placeholder{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.ep-detail-body .crop-stack{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  overflow:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:4px 10px 18px;
  box-sizing:border-box;
}
.ep-detail-body .crop-item{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  flex:0 0 auto;
  box-sizing:border-box;
}
.ep-detail-body .crop-image{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:none;
  margin:0 auto;
  object-fit:contain;
  object-position:top center;
}
.ep-detail-body .crop-stack .crop-image{
  align-self:center;
}
.crop-continuation{
  width:100%;
  text-align:center;
  margin:2px 0 4px;
  font-size:12px;
  color:#777;
}
@media(min-width:1101px){
  .ep-detail-pane{
    height:calc(100vh - 150px);
    min-height:520px;
  }
  .ep-detail-body{
    min-height:0;
  }
}
@media(max-width:1100px){
  .ep-detail-pane{
    min-height:600px;
  }
  .ep-detail-body{
    min-height:600px;
  }
}
@media(max-width:650px){
  .ep-detail-pane{
    min-height:520px;
  }
  .ep-detail-body{
    min-height:520px;
  }
}

/* Fullscreen crop reader: crop begins immediately below the toolbar */
#crop-fullscreen{
  display:flex;
  flex-direction:column;
}
#crop-fullscreen[hidden]{display:none}
#crop-fullscreen-inner{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:16px;
  box-sizing:border-box;
}
#crop-fullscreen-inner .crop-item{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
}
#crop-fullscreen-inner .crop-image{
  width:auto;
  max-width:100%;
  height:auto;
  object-fit:contain;
  object-position:top center;
  margin:0 auto;
}


/* v2.1 header ads, widgets, full-page viewer and clean crop box */
.brandbar-inner{display:grid!important;grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);align-items:center;gap:20px;padding:12px 0 10px!important}
.brand-center{text-align:center;min-width:260px}.brand-logo{display:inline-flex;align-items:center;justify-content:center}.brand-logo img{display:block;max-height:82px;width:auto}.brand-logo .brand{display:block;font-size:48px}.brand-center .tagline{margin-top:2px}
.header-ad{min-height:68px;border:1px dashed #c9ced1;background:#f7f8f8;border-radius:5px;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden}.header-ad-left{text-align:left}.header-ad-right{text-align:right}.header-ad .widget{width:100%;padding:8px}.header-ad .widget-title{display:none}.header-ad img{max-width:100%;height:auto;display:block;margin:auto}
.footer{margin-top:40px;background:#15191c;color:#d7dde0;padding:38px 0 18px}.footer-widgets{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}.footer-widget-col{min-height:110px}.footer-widget-col .widget{margin:0 0 18px}.footer-widget-col .widget-title{margin:0 0 10px;color:#fff;font-size:18px}.footer-widget-col p{margin:6px 0;line-height:1.7}.footer-widget-col ul{margin:0;padding-left:18px}.footer-bottom{border-top:1px solid #343b40;margin-top:22px;padding-top:14px;display:flex;gap:12px;align-items:center;color:#aeb7bd;font-size:13px}
.ep-page-pane{height:calc(100vh - 205px);min-height:560px}.ep-page-scroll{height:calc(100% - 34px);max-height:none;overflow:hidden;padding:10px;display:flex;align-items:center;justify-content:center}.ep-page-pane .paper-wrap{width:auto;max-width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ep-page-pane .paper-wrap img{width:auto;height:100%;max-width:100%;object-fit:contain}
.ep-detail-body .crop-stack{position:relative;background:#fff;border:1px solid #cfd5d8;border-radius:4px;margin:0 10px 12px;padding:10px;min-height:calc(100% - 56px);width:calc(100% - 20px);align-items:center}.crop-empty{width:100%;height:100%;min-height:120px}.ep-detail-body .crop-stack:has(.crop-item) .crop-empty{display:none}
@media(max-width:1100px){.brandbar-inner{grid-template-columns:1fr}.header-ad{display:none}.brand-center{grid-column:1}.ep-page-pane{height:70vh;min-height:480px}.ep-page-scroll{height:calc(100% - 34px)}}
@media(max-width:650px){.brandbar-inner{padding:8px 0!important}.brand-logo img{max-height:58px}.brand-logo .brand{font-size:34px}.footer-widgets{grid-template-columns:1fr;gap:12px}.footer-widget-col{min-height:0}.ep-page-pane{height:72vh;min-height:430px}.ep-page-scroll{padding:6px}.ep-detail-body .crop-stack{margin:0 6px 8px;width:calc(100% - 12px)}}


/* v2.2 Bengali dates, footer color and natural full-page newspaper sizing */
.ep-page-pane{height:auto!important;min-height:0!important;overflow:visible!important}
.ep-page-scroll{height:auto!important;max-height:none!important;overflow:visible!important;padding:10px!important;display:block!important}
.ep-page-pane .paper-wrap{width:100%!important;max-width:none!important;height:auto!important;display:block!important;position:relative}
.ep-page-pane .paper-wrap img{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;object-fit:initial!important}
@media(max-width:1100px){.ep-page-pane{height:auto!important;min-height:0!important}.ep-page-scroll{height:auto!important}.ep-page-pane .paper-wrap{width:100%!important}.ep-page-pane .paper-wrap img{width:100%!important;height:auto!important}}
@media(max-width:650px){.ep-page-pane{height:auto!important;min-height:0!important}.ep-page-scroll{padding:6px!important}.ep-page-pane .paper-wrap{width:100%!important}.ep-page-pane .paper-wrap img{width:100%!important;height:auto!important}}


/* v2.3 page navigation, copyright bar and large-image uploader */
.ep-pane-head{gap:8px}
.page-nav-btn{border:0;background:var(--red);color:#fff;border-radius:4px;padding:5px 10px;font-weight:800;cursor:pointer;line-height:1.2}
.page-nav-btn:disabled{opacity:.35;cursor:not-allowed}
.page-nav-btn:hover:not(:disabled){filter:brightness(.92)}
.copyright-bar{margin-top:0;border-top:1px solid rgba(255,255,255,.08)}
.copyright-inner{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:13px;padding:12px 0}
.ep-large-upload{margin:12px 0;padding:14px;background:#f7f9fa;border:1px solid #d8dee2;border-radius:6px}
.ep-large-upload input[type=file]{display:block;margin:8px 0;width:100%;max-width:560px}
.ep-upload-progress{height:10px;background:#dfe5e8;border-radius:20px;overflow:hidden;margin:10px 0}
.ep-upload-progress span{display:block;width:0;height:100%;background:#078f46;transition:width .2s}
.ep-upload-status{font-size:13px;margin-top:7px;color:#4b565d}
@media(max-width:650px){.page-nav-btn span{display:none}.page-nav-btn{padding:5px 9px}.copyright-inner{display:block;text-align:center}.copyright-inner span{display:block;margin-top:4px}}
/* Force the full newspaper page to use the entire left pane width while preserving aspect ratio. */
.ep-page-pane .ep-page-scroll{width:100%!important}
.ep-page-pane .paper-wrap{width:100%!important;max-width:none!important;height:auto!important;min-height:0!important}
.ep-page-pane .paper-wrap img{width:100%!important;height:auto!important;max-width:none!important;max-height:none!important;display:block!important;object-fit:fill!important}
