.epv-news{
	width:100%;
	max-width:100%;
	box-sizing:border-box;
	display:grid;
	grid-template-columns:var(--epv-ad-width) minmax(0,1fr) var(--epv-thumb-width) var(--epv-ad-width);
	gap:var(--epv-gap);
	align-items:start;
	justify-content:center;
	padding:18px 10px;
	max-width:1900px;
	margin:0 auto;
	background:var(--epv-page-bg);
	overflow:hidden;
}
.epv-center{
	min-width:0;
	width:100%;
	min-width:0;
}
.epv-topbar{
	min-height:52px;
	box-sizing:border-box;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	padding:9px 12px;
	background:var(--epv-toolbar-bg);
	color:var(--epv-toolbar-text);
	border:1px solid rgba(0,0,0,.08);
	border-bottom:0;
	border-radius:8px 8px 0 0;
}
.epv-name{
	font-size:17px;
	font-weight:700;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
}
.epv-toolbar{
	display:flex;
	align-items:center;
	gap:4px;
	flex-shrink:0;
}
.epv-toolbar button,
.epv-toolbar a{
	width:34px;
	height:34px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	border:1px solid #d5d7da;
	background:#fff;
	color:#222;
	border-radius:5px;
	text-decoration:none;
	cursor:pointer;
	font-size:16px;
}
.epv-toolbar button:hover,
.epv-toolbar a:hover{
	background:#f1f3f4;
}
.epv-page-info,
.epv-zoom{
	min-width:54px;
	text-align:center;
	font-size:12px;
	font-weight:600;
}
.epv-loading{
	height:var(--epv-viewer-height);
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	background:var(--epv-viewer-bg);
	color:#fff;
	gap:12px;
}
.epv-spinner{
	width:34px;
	height:34px;
	border:4px solid rgba(255,255,255,.3);
	border-top-color:#fff;
	border-radius:50%;
	animation:epvspin .8s linear infinite;
}
@keyframes epvspin{to{transform:rotate(360deg)}}
.epv-stage{
	width:100%;
	min-height:0;
	height:auto;
	overflow:visible;
	background:var(--epv-viewer-bg);
	display:flex;
	align-items:flex-start;
	justify-content:center;
	padding:10px;
	box-sizing:border-box;
}
.epv-page-wrap{
	background:#fff;
	box-shadow:0 4px 18px rgba(0,0,0,.35);
	flex:0 0 auto;
}
.epv-canvas{
	display:block;
	max-width:none;
	height:auto;
}
.epv-error{
	color:#fff;
	background:#7f1d1d;
	padding:20px;
	margin:auto;
	border-radius:8px;
}
.epv-thumbs{
	height:calc(var(--epv-viewer-height) + 52px);
	overflow:hidden;
	background:#fff;
	border-radius:7px;
	box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.epv-thumbs-title{
	height:44px;
	display:flex;
	align-items:center;
	justify-content:center;
	font-weight:700;
	border-bottom:1px solid #ddd;
	background:#f7f7f7;
}
.epv-thumb-list{
	height:calc(100% - 44px);
	overflow-y:auto;
	padding:9px;
	box-sizing:border-box;
}
.epv-thumb{
	display:block;
	width:100%;
	margin:0 0 10px;
	padding:5px 5px 0;
	border:1px solid #ddd;
	background:#fff;
	cursor:pointer;
	border-radius:3px;
}
.epv-thumb:hover{border-color:#999}
.epv-thumb.active{
	border:3px solid #222;
	padding:3px 3px 0;
}
.epv-thumb-canvas{
	display:block;
	width:100%;
	height:auto;
	background:#fff;
}
.epv-thumb-label{
	display:block;
	background:#8c8c8c;
	color:#fff;
	padding:5px 2px;
	margin:5px -5px 0;
	font-size:12px;
	text-align:center;
}
.epv-thumb.active .epv-thumb-label{
	margin:5px -3px 0;
}
.epv-ad{
	width:var(--epv-ad-width);
	position:sticky;
	top:20px;
}
.epv-ad a,
.epv-ad img{
	display:block;
	width:100%;
}
.epv-ad img{
	height:var(--epv-ad-height);
	object-fit:cover;
	border-radius:2px;
	box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.epv-news-notice{
	padding:20px;
	background:#f3f4f6;
	border-radius:8px;
}
@media(max-width:1500px){
	.epv-news{
		grid-template-columns:var(--epv-ad-width) minmax(0,1fr) var(--epv-thumb-width);
	}
	.epv-ad-right{display:none}
}
@media(max-width:1150px){
	.epv-news{
		grid-template-columns:minmax(0,1fr) var(--epv-thumb-width);
	}
	.epv-ad-left{display:none}
}
@media(max-width:700px){
	.epv-news{
		display:block;
		padding:6px;
	}
	.epv-thumbs{
		height:135px;
		margin-top:7px;
	}
	.epv-thumbs-title{
		height:28px;
		font-size:12px;
	}
	.epv-thumb-list{
		height:107px;
		display:flex;
		overflow-x:auto;
		overflow-y:hidden;
		gap:7px;
		padding:6px;
	}
	.epv-thumb{
		flex:0 0 78px;
		margin:0;
	}
	.epv-thumb-label{
		font-size:10px;
		padding:3px 1px;
	}
	.epv-thumb.active{
		padding:3px 3px 0;
	}
	.epv-stage{
		height:auto;
		min-height:0;
		overflow:visible;
		padding:5px;
	}
	.epv-loading{
		height:180px;
		min-height:180px;
	}
	.epv-topbar{
		display:block;
	}
	.epv-name{
		margin-bottom:7px;
		text-align:center;
	}
	.epv-toolbar{
		justify-content:center;
	}
}

/* v2.1 large-page improvements */
.epv-stage{
	width:100%;
}
.epv-page-wrap{
	max-width:none;
}
.epv-canvas{
	width:auto !important;
}
@media(min-width:1501px){
	.epv-news{
		grid-template-columns:var(--epv-ad-width) minmax(700px,1fr) var(--epv-thumb-width) var(--epv-ad-width);
	}
}

/* v2.2 E-Paper crop tool */
.epv-crop-modal{
	position:fixed;
	inset:0;
	z-index:999999;
	background:rgba(0,0,0,.78);
	display:flex;
	align-items:center;
	justify-content:center;
	padding:20px;
	box-sizing:border-box;
}
.epv-crop-modal[hidden]{display:none}
.epv-crop-dialog{
	width:min(1100px,96vw);
	height:min(900px,94vh);
	background:#fff;
	border-radius:10px;
	overflow:hidden;
	display:flex;
	flex-direction:column;
	box-shadow:0 15px 50px rgba(0,0,0,.45);
}
.epv-crop-head{
	height:52px;
	flex:0 0 52px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	padding:0 14px;
	border-bottom:1px solid #ddd;
}
.epv-crop-head button{
	border:0;
	background:transparent;
	font-size:28px;
	cursor:pointer;
	line-height:1;
}
.epv-crop-body{
	flex:1;
	min-height:0;
	background:#202124;
	display:flex;
	align-items:center;
	justify-content:center;
	overflow:hidden;
	padding:15px;
}
.epv-crop-image{
	display:block;
	max-width:100%;
	max-height:100%;
}
.epv-crop-actions{
	padding:10px 14px;
	display:flex;
	justify-content:flex-end;
	gap:8px;
	border-top:1px solid #ddd;
}
.epv-crop-actions button,
.epv-crop-result-actions a,
.epv-crop-result-actions button{
	border:1px solid #d0d5dd;
	background:#fff;
	color:#222;
	border-radius:6px;
	padding:9px 13px;
	cursor:pointer;
	text-decoration:none;
	font-size:13px;
}
.epv-crop-actions button[data-crop-action="crop"],
.epv-crop-result-actions a{
	background:#111827;
	color:#fff;
	border-color:#111827;
}
.epv-crop-result{
	position:absolute;
	inset:73px 0 0;
	background:#fff;
	padding:20px;
	overflow:auto;
	text-align:center;
}
.epv-cropped-image{
	max-width:100%;
	max-height:calc(100% - 75px);
	display:block;
	margin:0 auto 14px;
}
.epv-crop-result-actions{
	display:flex;
	flex-wrap:wrap;
	justify-content:center;
	gap:7px;
}
.epv-crop-message{
	margin-top:10px;
	font-size:13px;
	color:#15803d;
}
@media(max-width:600px){
	.epv-crop-modal{padding:5px}
	.epv-crop-dialog{width:100%;height:96vh}
	.epv-crop-body{padding:7px}
	.epv-crop-actions{justify-content:center}
}

/* v2.3: full-page scroll + archive calendar */
.epv-page-wrap{
	width:100%;
	max-width:100%;
}
.epv-canvas{
	display:block;
	max-width:100%;
	height:auto;
}
.epv-loading{
	min-height:180px;
	height:180px;
}
.epv-archive-modal{
	position:fixed;
	inset:0;
	z-index:1000000;
	background:rgba(0,0,0,.72);
	display:flex;
	align-items:center;
	justify-content:center;
	padding:15px;
	box-sizing:border-box;
}
.epv-archive-modal[hidden]{display:none}
.epv-archive-dialog{
	width:min(650px,96vw);
	max-height:90vh;
	overflow:auto;
	background:#fff;
	border-radius:10px;
	box-shadow:0 15px 50px rgba(0,0,0,.45);
}
.epv-archive-head{
	height:52px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	padding:0 14px;
	border-bottom:1px solid #ddd;
}
.epv-archive-head button{
	border:0;background:transparent;font-size:28px;cursor:pointer;
}
.epv-archive-controls{
	display:flex;
	align-items:center;
	justify-content:space-between;
	padding:14px 18px;
	font-size:17px;
}
.epv-archive-controls button{
	width:36px;height:36px;border:1px solid #ddd;background:#f7f7f7;border-radius:6px;cursor:pointer;font-size:22px;
}
.epv-calendar-week,
.epv-calendar{
	display:grid;
	grid-template-columns:repeat(7,1fr);
	gap:5px;
	padding:0 15px;
}
.epv-calendar-week span{
	text-align:center;
	font-size:12px;font-weight:700;color:#666;padding:6px 0;
}
.epv-calendar-empty{min-height:52px}
.epv-calendar-day{
	min-height:58px;
	border:1px solid #e2e2e2;
	background:#fafafa;
	border-radius:6px;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	gap:3px;
	color:#aaa;
}
.epv-calendar-day:disabled{opacity:.55;cursor:not-allowed}
.epv-calendar-day.has-paper{
	background:#f3f4f6;
	color:#111;
	cursor:pointer;
	border-color:#c7c7c7;
}
.epv-calendar-day.has-paper:hover{
	background:#e5e7eb;
}
.epv-calendar-day small{
	font-size:9px;
	color:#555;
}
.epv-archive-list{
	padding:15px;
	display:flex;
	flex-direction:column;
	gap:7px;
}
.epv-archive-item{
	border:1px solid #ddd;
	background:#fff;
	padding:11px 13px;
	border-radius:6px;
	display:flex;
	justify-content:space-between;
	gap:10px;
	text-align:left;
	cursor:pointer;
}
.epv-archive-item:hover{background:#f6f6f6}
.epv-archive-item span{font-size:12px;color:#666}
.epv-archive-empty{text-align:center;color:#777;padding:18px}

/* v2.4 sharp rendering + true page scroll */
.epv-page-wrap{
	background:#fff;
	box-shadow:0 4px 18px rgba(0,0,0,.28);
	flex:0 0 auto;
}
.epv-canvas{
	display:block !important;
	max-width:none !important;
	height:auto;
	image-rendering:auto;
}
@media(max-width:700px){
	.epv-stage{
		padding:5px;
	}
	.epv-page-wrap{
		box-shadow:0 2px 10px rgba(0,0,0,.22);
	}
}

/* v2.5 mobile thumbnails stay below the complete newspaper page */
.epv-ad-code{width:100%;min-height:100px;display:flex;align-items:flex-start;justify-content:center;overflow:hidden;}
.epv-ad-code img{max-width:100%;height:auto;}
@media(max-width:700px){
	.epv-center{width:100%;}
	.epv-stage{height:auto !important;min-height:0 !important;overflow:visible !important;}
	.epv-page-wrap{position:relative;z-index:1;}
	.epv-thumbs{position:relative;z-index:2;height:135px;margin:12px 0 0;clear:both;}
	.epv-thumb-list{position:relative;z-index:2;}
}
