:root{
  --ep-bg:#ffffff;
  --ep-card:#ffffff;
  --ep-border:#e7e7e7;
  --ep-shadow:0 10px 30px rgba(0,0,0,.06);
  --ep-text:#111;
  --ep-muted:#666;
  --ep-accent:#111;
  --ep-radius:10px;
  --ep-gap:24px;

  --left-w:260px;
  --right-w:260px;
  --max-w:1140px;
}

.epaper-shell{
  max-width: var(--max-w);
  margin: 40px auto;
  padding: 0 16px;
  color: var(--ep-text);
}

.epaper-layout{
  display:grid;
  grid-template-columns: var(--left-w) 1fr var(--right-w);
  gap: var(--ep-gap);
  align-items:start;
}

.panel{
  background: var(--ep-card);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow);
  padding: 16px;
}

.panel-title{
  font-size: 18px;
  margin: 0 0 14px 0;
  font-weight: 700;
}

.field{
  margin-bottom: 14px;
}

.field label{
  display:block;
  font-size: 13px;
  color: var(--ep-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.control{
  width:100%;
  border: 1px solid var(--ep-border);
  border-radius: 8px;
  padding: 10px 12px;
  background:#fafafa;
  outline:none;
}

.control:focus{
  border-color:#bbb;
  background:#fff;
}

.btn{
  border:1px solid var(--ep-border);
  background: var(--ep-accent);
  color:#fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor:pointer;
  font-weight:700;
}

.btn.btn-secondary{
  background:#fff;
  color: var(--ep-text);
}

.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.epaper-main{
  min-width: 0;
}

.epaper-head{
  margin-bottom: 10px;
  display:flex;
  justify-content:center;
}

.epaper-meta{
  color: var(--ep-muted);
  font-size: 12px;
}

#epaper-view{
  background: var(--ep-bg);
}

.epaper-image-container{
  position:relative;
  background:#f7f7f7;
  border:1px solid var(--ep-border);
  border-radius: var(--ep-radius);
  padding: 12px;
  overflow:hidden;
}

.epaper-image{
  width:100%;
  height:auto;
  display:block;
  border-radius: 8px;
}

.epaper-empty{
  padding: 30px;
  text-align:center;
  color: var(--ep-muted);
}

.epaper-hotspot{
  position:absolute;
  display:block;
  border:2px solid transparent;
  z-index: 10;
}

.epaper-hotspot:hover{
  border-color:#e40000;
  background: rgba(228,0,0,.12);
}

.epaper-download{
  display:inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background:#111;
  color:#fff;
  text-decoration:none;
  font-weight:700;
}

.epaper-pagination{
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  gap: 12px;
}

.note{
  margin-top: 10px;
  color:#b10000;
  font-size: 13px;
  min-height: 18px;
}

.epaper-shell.is-loading .epaper-image-container{
  opacity:.65;
  pointer-events:none;
}

/* Admin hotspot tool */
.hotspot-toggle{
  position: sticky;
  top: 110px;
  margin-top: 14px;
  width:100%;
  border:none;
  background:#111;
  color:#fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight:800;
  cursor:pointer;
}

.hotspot-toggle.active{
  background:#e40000;
}

.epaper-image-container.hotspot-mode{
  cursor: crosshair;
}

/* floating selection box */
.hotspot-box{
  position:absolute;
  border:2px dashed #e40000;
  background: rgba(228,0,0,.10);
  pointer-events:none;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 1024px){
  :root{
    --left-w: 1fr;
    --right-w: 1fr;
  }
  .epaper-layout{
    grid-template-columns: 1fr;
  }
  .epaper-pagination{
    justify-content: center;
  }
  .epaper-pagination .btn{
    flex: 1;
  }
}
.hotspot-box{
  position:absolute;
  border:2px dashed #e40000;
  background:rgba(228,0,0,.10);
  pointer-events:none;
  z-index:9999;
}
.hotspot-toggle.active{
  background:#e40000 !important;
}