:root{
    --black:#000;
    --deep-black:#0a0a0a;
    --gray-bg:#ececec;
    --gray-border:#cfcaca;
    --mid-gray:#d6d6d6;
    --soft-gray:#f2f2f2;
    --red:#e00022;
    --dark-red:#c6001d;
    --blue:#2e65cc;
    --white:#fff;
    --text:#111;
    --paper:#fefefe;
    --dot:#2f5f96;
}

*{
    box-sizing:border-box;
}

body.epaper-body{
    margin:0;
    background:#f5f5f5;
    color:var(--text);
    font-family:'Noto Serif Bengali', serif;
}

a{
    color:inherit;
    text-decoration:none;
}

button,
input,
select{
    font:inherit;
}

.epaper-shell{
    width:min(1400px, 92%);
    margin:14px auto;
    background:var(--gray-bg);
    border:1px solid var(--gray-border);
    padding:12px;
}

/* =======================
   TOP HEADER
======================= */

.epaper-top-header{
    min-height:120px;
    display:flex;
    align-items:center;
    padding:8px 18px 16px;
}

.epaper-brand{
    display:inline-block;
    color:var(--red);
    font-size:54px;
    font-weight:800;
    line-height:1.1;
    letter-spacing:-0.03em;
}

/* =======================
   TOOLBAR
======================= */

.epaper-toolbar{
    background:var(--black);
    color:var(--white);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:8px 10px;
    flex-wrap:wrap;
    margin-bottom:8px;
}

.epaper-toolbar-left,
.epaper-toolbar-right{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
}

.toolbar-home,
.toolbar-download,
.toolbar-page-tab,
.toolbar-print{
    border:1px solid #777;
    background:#111;
    color:#fff;
    min-height:32px;
    padding:6px 10px;
    font-size:14px;
    line-height:1;
    cursor:pointer;
}

.toolbar-home{
    width:32px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
}

.toolbar-download{
    border-radius:4px;
    font-weight:700;
}

.toolbar-page-tab{
    background:#746a6a;
    border-color:#b0a8a8;
}

.toolbar-page-tab.is-active{
    background:var(--red);
    border-color:var(--red);
}

.toolbar-share{
    background:#2f64cb;
    color:#fff;
    padding:7px 12px;
    font-size:14px;
    border-radius:6px;
    font-weight:700;
}

.toolbar-link,
.toolbar-print{
    background:transparent;
    border:0;
    padding:0 4px;
    color:#fff;
    font-size:14px;
}

.toolbar-print{
    cursor:pointer;
}

/* =======================
   3 COLUMN MAIN LAYOUT
======================= */

.epaper-main-layout{
    display:grid;
    grid-template-columns:160px 1fr 200px;
    gap:14px;
    align-items:start;
}

/* =======================
   SIDEBAR TITLES
======================= */

.sidebar-title{
    background:#000;
    color:#fff;
    text-align:center;
    padding:8px 10px;
    font-size:15px;
    font-weight:700;
    margin-bottom:8px;
}

.sidebar-gap{
    margin-top:10px;
}

/* =======================
   LEFT SIDEBAR
======================= */

.left-pages-scroll{
    background:#efefef;
    height:720px;
    overflow-y:auto;
    padding:8px 6px;
}

.thumb-card{
    display:block;
    width:100%;
    border:0;
    background:transparent;
    margin:0 0 12px;
    padding:0;
    cursor:pointer;
}

.thumb-paper-frame{
    width:124px;
    height:176px;
    margin:0 auto 8px;
    overflow:hidden;
    background:#fff;
    border:1px solid #ccc;
    position:relative;
}

.thumb-paper-scale{
    width:930px;
    transform:scale(0.133);
    transform-origin:top left;
    pointer-events:none;
}

.thumb-paper-scale .ep-sheet{
    margin:0 !important;
    width:930px !important;
    min-height:1360px !important;
    box-shadow:none !important;
}

.thumb-page-label{
    display:block;
    background:var(--red);
    color:#fff;
    text-align:center;
    font-size:14px;
    font-weight:700;
    padding:5px 8px;
    border-radius:12px;
    width:124px;
    margin:0 auto;
}

.thumb-card.is-active .thumb-page-label{
    background:#c4001c;
}

/* =======================
   CENTER PREVIEW
======================= */

.preview-stage{
    background:#efefef;
    border:1px solid #d8d8d8;
    min-height:760px;
    padding:10px;
}

.preview-page-slot{
    display:none;
}

.preview-page-slot.is-active{
    display:block;
}

.preview-paper-shell{
    display:flex;
    justify-content:center;
    align-items:flex-start;
}

.epaper-empty{
    text-align:center;
    padding:60px 20px;
}

/* =======================
   RIGHT SIDEBAR
======================= */

.archive-box{
    background:#efefef;
    border:1px solid #d7d7d7;
    padding:10px;
}

.calendar-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:#dadada;
    border:1px solid #c4c4c4;
    padding:8px 10px;
    margin-bottom:10px;
}

.calendar-header strong{
    font-size:15px;
}

.calendar-nav{
    width:22px;
    height:22px;
    border:0;
    background:#666;
    color:#fff;
    cursor:pointer;
    border-radius:50%;
    font-size:11px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.calendar-weekdays,
.calendar-grid{
    display:grid;
    grid-template-columns:repeat(7, 1fr);
    gap:4px;
}

.calendar-weekdays{
    margin-bottom:6px;
}

.calendar-weekdays span{
    text-align:center;
    font-size:12px;
    font-weight:700;
    padding:4px 0;
}

.calendar-day{
    min-height:28px;
    border:1px solid #ddd;
    background:#f8f8f8;
    text-align:center;
    font-size:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#888;
}

.calendar-day.is-empty{
    background:transparent;
    border-color:transparent;
}

.calendar-day.has-edition{
    background:#fff;
    color:#333;
    cursor:pointer;
}

.calendar-day.has-edition:hover{
    background:#ececec;
}

.calendar-day.is-selected{
    background:var(--red);
    color:#fff;
    border-color:var(--red);
}

.today-pages-box{
    background:#fff;
    padding:4px 0;
}

.today-page-item{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    border:0;
    background:transparent;
    padding:10px 8px;
    border-bottom:2px dashed var(--dot);
    cursor:pointer;
    text-align:left;
    font-size:15px;
}

.today-page-item:last-child{
    border-bottom:0;
}

.today-page-item.is-active{
    background:#f5f5f5;
}

.today-check{
    width:18px;
    height:18px;
    border-radius:50%;
    background:#000;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    flex-shrink:0;
}

.facebook-box{
    background:#efefef;
    border:1px solid #d7d7d7;
    min-height:120px;
    padding:10px;
}

.facebook-box-inner{
    background:#fff;
    border:1px solid #ddd;
    padding:14px;
    text-align:center;
}

.fb-brand{
    font-size:22px;
    color:var(--red);
    font-weight:800;
    margin-bottom:6px;
}

.fb-sub{
    color:#666;
    font-size:14px;
    margin-bottom:12px;
}

.fb-follow-btn{
    display:inline-block;
    background:#1877f2;
    color:#fff;
    padding:8px 14px;
    border-radius:4px;
    font-size:14px;
    font-weight:700;
}

/* =======================
   SHEET LOOK
======================= */

.ep-sheet{
    width:min(100%, 760px);
    min-height:1180px;
    background:var(--paper);
    border:1px solid #bdbdbd;
    box-shadow:none;
    margin:0 auto;
    padding:18px 18px 16px;
    color:#111;
    font-family:'Noto Serif Bengali', serif;
}

.ep-issue-topline,
.ep-issue-meta,
.ep-paper-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    font-size:10px;
    color:#333;
}

.ep-issue-topline{
    margin-bottom:8px;
}

.ep-masthead{
    text-align:center;
    border-bottom:1px solid #999;
    padding-bottom:8px;
    margin-bottom:8px;
}

.ep-masthead-ornament{
    font-size:10px;
    color:#666;
}

.ep-masthead-name{
    font-size:46px;
    font-weight:800;
    line-height:1.2;
}

.ep-masthead-sub{
    font-size:11px;
    color:#555;
}

.ep-issue-meta{
    border-bottom:1px solid #bbb;
    padding-bottom:6px;
    margin-bottom:8px;
}

.ep-cover-kicker,
.ep-section-banner{
    background:#2c5aa0;
    color:#fff;
    padding:6px 8px;
    font-size:12px;
    font-weight:700;
    margin-bottom:8px;
}

.ep-cover-headline{
    font-size:26px;
    line-height:1.32;
    color:var(--red);
    margin:8px 0 8px;
    text-align:left;
    font-weight:800;
}

.ep-cover-deck{
    font-size:14px;
    line-height:1.6;
    margin-bottom:10px;
}

.ep-lead-table,
.ep-story-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
}

.ep-lead-table td,
.ep-story-table td{
    vertical-align:top;
}

.ep-cover-main{
    width:58%;
    padding-right:10px;
}

.ep-cover-rail{
    width:42%;
    padding-left:10px;
}

.ep-cover-photo,
.ep-story-photo{
    width:100%;
    display:block;
    border:1px solid #bbb;
    margin-bottom:5px;
}

.ep-photo-caption{
    font-size:10px;
    color:#666;
    margin-bottom:6px;
}

.ep-story-category{
    color:#2c5aa0;
    font-weight:700;
    font-size:11px;
    margin-bottom:5px;
}

.ep-cover-body p,
.ep-story-cell p,
.ep-rail-story p{
    font-size:12px;
    line-height:1.55;
    margin:0 0 8px;
    text-align:justify;
}

.ep-read-link{
    font-size:11px;
    color:var(--red);
    font-weight:700;
}

.ep-rail-story{
    border-bottom:1px solid #cfcfcf;
    padding-bottom:8px;
    margin-bottom:8px;
}

.ep-rail-story:last-child{
    margin-bottom:0;
    border-bottom:0;
}

.ep-rail-story h2{
    font-size:18px;
    line-height:1.35;
    margin:0 0 6px;
}

.ep-section-banner{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.ep-section-banner small{
    font-size:10px;
    font-weight:400;
}

.ep-story-cell{
    width:50%;
    padding:0 8px 12px;
    border-right:1px solid #ddd;
    border-bottom:1px solid #ddd;
}

.ep-story-cell:nth-child(2n){
    border-right:0;
}

.ep-story-cell h2{
    font-size:19px;
    line-height:1.4;
    margin:0 0 6px;
}

.ep-paper-footer{
    border-top:1px solid #bbb;
    padding-top:7px;
    margin-top:10px;
    font-size:10px;
    color:#555;
}

/* =======================
   RESPONSIVE
======================= */

@media (max-width: 1200px){
    .epaper-main-layout{
        grid-template-columns:150px 1fr 190px;
    }

    .epaper-brand{
        font-size:46px;
    }
}

@media (max-width: 980px){
    .epaper-main-layout{
        grid-template-columns:1fr;
    }

    .epaper-left-sidebar,
    .epaper-right-sidebar{
        order:2;
    }

    .epaper-center-preview{
        order:1;
    }

    .left-pages-scroll{
        height:auto;
        display:flex;
        gap:12px;
        overflow-x:auto;
        overflow-y:hidden;
    }

    .thumb-card{
        min-width:136px;
        margin-bottom:0;
    }
}

@media (max-width: 700px){
    .epaper-shell{
        width:96%;
        padding:8px;
    }

    .epaper-brand{
        font-size:38px;
    }

    .epaper-toolbar{
        padding:8px 6px;
    }

    .toolbar-page-tab{
        font-size:12px;
        padding:6px 8px;
    }

    .preview-stage{
        overflow-x:auto;
    }

    .ep-sheet{
        width:760px;
        max-width:none;
    }
}

@media print{
    .epaper-top-header,
    .epaper-toolbar,
    .epaper-left-sidebar,
    .epaper-right-sidebar{
        display:none !important;
    }

    .epaper-shell{
        width:100%;
        border:0;
        padding:0;
        background:#fff;
    }

    .epaper-main-layout{
        display:block;
    }

    .preview-page-slot{
        display:none !important;
    }

    .preview-page-slot.is-active{
        display:block !important;
    }

    .preview-stage{
        border:0;
        padding:0;
        background:#fff;
    }

    .ep-sheet{
        width:100%;
        border:0;
    }
}