/* E-Paper Reader — front-end styles */

.epr {
	--epr-ink: #16181d;
	--epr-muted: #626a75;
	--epr-line: #e3e6ea;
	--epr-soft: #f4f5f7;
	--epr-card: #ffffff;
	--epr-stage: #e8eaee;
	--epr-radius: 10px;
	--epr-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .08);
	--epr-top: 0px;
	color: var(--epr-ink);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
:root { --epr-brand: #c4161c; }
.epr *, .epr *::before, .epr *::after { box-sizing: border-box; }
body.admin-bar .epr { --epr-top: 32px; }
@media (max-width: 782px) { body.admin-bar .epr { --epr-top: 46px; } }
@media (max-width: 600px) { body.admin-bar .epr { --epr-top: 0px; } }

.epr img { max-width: 100%; }
.epr a { color: inherit; text-decoration: none; }
:where(.epr) h1, :where(.epr) h2, :where(.epr) h3 { color: inherit; margin: 0; line-height: 1.25; letter-spacing: 0; }
.epr .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.epr [hidden] { display: none !important; }

.epr-ico { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }

/* ---------- Wrappers & standalone header ---------- */

.epr-wrap { max-width: 1320px; margin: 0 auto; padding: 24px 16px 48px; }
.epr-wrap--viewer { max-width: none; padding: 0; }
body.epr-standalone .epr h1, body.epr-standalone .epr h2, body.epr-standalone .epr h3 { font-family: inherit; }
body.epr-standalone { display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: #f6f7f9; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; color: #16181d; }

.epr-site-header { background: var(--epr-brand); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.epr-site-header-inner { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.epr-brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.epr-brand img { max-height: 48px; width: auto; display: block; }
.epr-brand-name { font-size: 22px; font-weight: 800; color: #fff; }
.epr-site-nav { display: flex; gap: 18px; }
.epr-site-nav a { color: #fff; font-weight: 600; text-decoration: none; opacity: .92; }
.epr-site-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Only the e-paper header, content and footer: hide anything themes/plugins print
   into the page (e.g. Astra's scroll-to-top button) since their CSS is not loaded. */
body.epr-standalone > :not(.epr-site-header):not(main):not(.epr-site-footer):not(#wpadminbar):not(script):not(style):not(link):not(template),
#ast-scroll-top, .ast-scroll-top-icon, #scroll-top, .scroll-to-top, .back-to-top { display: none !important; }
body.epr-standalone > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
.epr-site-footer { text-align: center; padding: 18px 16px; font-size: 13px; color: #6b7280; border-top: 1px solid #e3e6ea; background: #fff; }
.epr-site-footer a { color: inherit; }

/* ---------- Buttons ---------- */

.epr-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 38px; padding: 7px 14px; border-radius: 8px;
	border: 1px solid var(--epr-line); background: #fff; color: var(--epr-ink) !important;
	font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer;
	white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s;
}
.epr-btn:hover { background: var(--epr-soft); border-color: #cfd4da; }
.epr-btn:focus-visible, .epr-icon-btn:focus-visible { outline: 2px solid var(--epr-brand); outline-offset: 2px; }
.epr-btn--primary { background: var(--epr-brand); border-color: var(--epr-brand); color: #fff !important; }
.epr-btn--primary:hover { background: var(--epr-brand); border-color: var(--epr-brand); filter: brightness(.92); }
.epr-btn--block { display: flex; width: 100%; }
.epr-btn[disabled] { opacity: .55; cursor: default; }

.epr-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; padding: 0; border-radius: 8px;
	border: 1px solid transparent; background: transparent; color: var(--epr-ink) !important;
	cursor: pointer; transition: background .15s;
}
.epr-icon-btn:hover { background: var(--epr-soft); }
.epr-icon-btn[disabled] { opacity: .35; cursor: default; background: transparent; }
.epr-icon-btn .epr-ico { width: 20px; height: 20px; }

.epr-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--epr-brand) 12%, #fff); color: var(--epr-brand); font-size: 12px; font-weight: 700; vertical-align: middle; }

.epr-select { height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--epr-line); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--epr-ink); min-width: 120px; }

/* ---------- Archive ---------- */

.epr-archive-hero {
	display: flex; flex-direction: column; align-items: stretch; gap: 16px; text-align: center;
	padding: 22px 24px; border-radius: var(--epr-radius); background: #fff; box-shadow: var(--epr-shadow);
	margin-bottom: 18px;
}
.epr-archive-title { font-size: 30px; font-weight: 800; }
.epr-archive-sub { margin: 4px 0 0; color: var(--epr-muted); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.epr-date-jump { display: flex; gap: 8px; align-items: center; margin: 0; width: 100%; }
.epr-date-jump input[type="date"] { flex: 1; min-width: 0; height: 42px; padding: 0 10px; border: 1px solid var(--epr-line); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: var(--epr-ink); }

.epr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.epr-chip { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--epr-line); font-size: 14px; font-weight: 600; }
.epr-chip:hover { border-color: var(--epr-brand); color: var(--epr-brand); }
.epr-chip.is-active { background: var(--epr-brand); border-color: var(--epr-brand); color: #fff; }

.epr-archive-layout { display: block; }
.epr-section-title { font-size: 20px; font-weight: 800; margin: 4px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.epr-section-title span { font-size: 14px; font-weight: 600; color: var(--epr-muted); }
.epr-section-title--sub { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--epr-line); }

.epr-cards { display: grid; gap: 18px; }
.epr-cards--featured { display: flex; flex-wrap: wrap; justify-content: center; }
.epr-cards--featured .epr-card { width: 100%; max-width: 440px; }
.epr-archive-main > .epr-section-title:first-child { justify-content: center; text-align: center; }
.epr-card > .epr-card-actions { display: flex; gap: 10px; padding: 14px; }
.epr-card > .epr-card-actions .epr-btn { flex: 1; min-height: 42px; }
.epr-cards--grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.epr-card { background: var(--epr-card); border-radius: var(--epr-radius); box-shadow: var(--epr-shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.epr-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,.08), 0 10px 24px rgba(16,24,40,.12); }
.epr-card-thumb { position: relative; display: block; aspect-ratio: 5 / 7; background: var(--epr-soft); overflow: hidden; border-bottom: 1px solid var(--epr-line); }
.epr-card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.epr-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: #b3b9c2; }
.epr-card-noimg .epr-ico { width: 48px; height: 48px; }
.epr-card-pages { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700; }
.epr-card-pages .epr-ico { width: 14px; height: 14px; }
.epr-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1; }
.epr-card-meta { align-self: stretch; }
.epr-card-title { font-size: 17px; font-weight: 800; }
.epr-card-title a:hover { color: var(--epr-brand); }
.epr-card-date { display: flex; align-items: center; gap: 5px; color: var(--epr-muted); font-size: 13px; font-weight: 600; }
.epr-card-date .epr-ico { width: 15px; height: 15px; }
.epr-card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.epr-card-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.epr-card-actions .epr-icon-btn { width: 34px; height: 34px; }
.epr-icon-btn--primary { background: var(--epr-brand); color: #fff !important; }
.epr-icon-btn--primary:hover { background: var(--epr-brand); filter: brightness(.9); }
.epr-icon-btn--outline { border-color: var(--epr-line); background: #fff; }
.epr-icon-btn--outline:hover { background: var(--epr-soft); }
.epr-ico-pdf { width: 22px !important; height: 22px !important; }
.epr-card--sm .epr-card-title { font-size: 14px; }
.epr-card--sm .epr-card-body { padding: 9px 10px 11px; gap: 3px; }
.epr-card--sm .epr-badge { font-size: 11px; align-self: flex-start; }

.epr-empty { background: #fff; border: 1px dashed #cfd4da; border-radius: var(--epr-radius); padding: 40px 20px; text-align: center; color: var(--epr-muted); }
.epr-empty .epr-ico { width: 44px; height: 44px; color: #b3b9c2; }
.epr-empty p { margin: 10px 0 16px; font-size: 16px; }

.epr-panel { background: #fff; border-radius: var(--epr-radius); box-shadow: var(--epr-shadow); padding: 16px; }
.epr-panel + .epr-panel { margin-top: 16px; }
.epr-panel-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.epr-panel-sub { font-size: 14px; font-weight: 700; margin: 18px 0 8px; color: var(--epr-muted); text-transform: uppercase; letter-spacing: .04em; }
.epr-cal-legend { margin: 10px 0 0; font-size: 12px; color: var(--epr-muted); display: flex; align-items: center; gap: 6px; }
.epr-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--epr-brand); display: inline-block; }

.epr-latest-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.epr-latest .epr-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.epr-latest-more { margin: 10px 0 0; font-weight: 700; }
.epr-latest-more a { color: var(--epr-brand); }

/* ---------- Calendar ---------- */

.epr-cal { user-select: none; }
.epr-cal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.epr-cal-head select { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--epr-line); border-radius: 7px; padding: 0 6px; font: inherit; font-size: 14px; font-weight: 600; background: #fff; color: var(--epr-ink); }
.epr-cal-head .epr-icon-btn { width: 34px; height: 34px; }
.epr-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.epr-cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--epr-muted); text-transform: uppercase; padding: 4px 0; }
.epr-cal-day { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 7px; font-size: 13px; font-weight: 600; color: #b0b6bf; border: 1px solid transparent; }
a.epr-cal-day { color: #fff; background: var(--epr-brand); cursor: pointer; }
a.epr-cal-day:hover { filter: brightness(.9); }
.epr-cal-day.is-today { border-color: var(--epr-ink); }
.epr-cal-day.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--epr-ink); }
.epr-cal-day.is-out { visibility: hidden; }
.epr-cal-loading .epr-cal-grid { opacity: .5; }

/* ---------- Viewer ---------- */

.epr-viewer { background: var(--epr-stage); min-height: 70vh; }
.epr-toolbar {
	position: sticky; top: var(--epr-top); z-index: 50;
	display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
	padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--epr-line); box-shadow: 0 2px 8px rgba(16,24,40,.06);
}
.epr-tb-group { display: flex; align-items: center; gap: 4px; }
.epr-tb-info { min-width: 0; flex: 1 1 260px; gap: 10px; }
.epr-tb-title { min-width: 0; }
.epr-tb-title h1 { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epr-tb-title > span { font-size: 13px; color: var(--epr-muted); font-weight: 600; }
.epr-tb-nav { flex: 0 0 auto; }
.epr-tb-tools { flex: 1 1 260px; justify-content: flex-end; }
.epr-tb-sep { width: 1px; height: 24px; background: var(--epr-line); margin: 0 6px; }
.epr-zoom-label { min-width: 54px; height: 32px; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--epr-muted); cursor: pointer; border-radius: 6px; }
.epr-zoom-label:hover { background: var(--epr-soft); }
.epr-btn-clip { margin: 0 4px; }

.epr-pop { position: relative; }
.epr-pop-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; padding: 14px; background: #fff; border-radius: var(--epr-radius); box-shadow: 0 10px 30px rgba(16,24,40,.2); z-index: 60; }

.epr-clipbar {
	position: sticky; top: calc(var(--epr-top) + var(--epr-tb-h, 56px)); z-index: 49;
	display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
	padding: 8px 14px; background: #1f2937; color: #fff; font-weight: 600; font-size: 14px; text-align: center;
}
.epr-clipbar .epr-btn { min-height: 30px; padding: 4px 12px; }

.epr-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; }
.epr-thumbs {
	position: sticky; top: calc(var(--epr-top) + var(--epr-tb-h, 56px));
	max-height: calc(100vh - var(--epr-top) - var(--epr-tb-h, 56px)); overflow-y: auto;
	padding: 12px 14px; background: #fff; border-right: 1px solid var(--epr-line);
	display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin;
}
.epr-thumb { display: block; text-align: center; font-size: 12px; font-weight: 700; color: var(--epr-muted) !important; }
.epr-thumb img { display: block; width: 100%; height: auto; border: 2px solid var(--epr-line); border-radius: 4px; background: var(--epr-soft); transition: border-color .15s; }
.epr-thumb:hover img { border-color: #9aa3ae; }
.epr-thumb.is-active img { border-color: var(--epr-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--epr-brand) 30%, transparent); }
.epr-thumb.is-active { color: var(--epr-brand) !important; }
.epr-thumb span { display: block; margin-top: 4px; }

.epr-stage { position: relative; overflow-x: auto; overflow-y: hidden; padding: 18px; min-height: 60vh; }
.epr-page { position: relative; margin: 0 auto; width: 100%; max-width: 100%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.12); }
.epr-viewer.is-zoomed .epr-page { max-width: none; }
.epr-tiles { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.epr .epr-tiles img { position: absolute; display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.epr-page-img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.epr-viewer:not(.is-clipping) .epr-page-img { cursor: zoom-in; }
.epr-viewer.is-zoomed:not(.is-clipping) .epr-page-img { cursor: zoom-out; }

.epr-loader { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 120px; background: rgba(255,255,255,.55); }
.epr-loader span { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(0,0,0,.12); border-top-color: var(--epr-brand); animation: epr-spin .8s linear infinite; }
@keyframes epr-spin { to { transform: rotate(360deg); } }

.epr-side-nav {
	position: fixed; top: 50%; z-index: 40; transform: translateY(-50%);
	width: 44px; height: 64px; border: 0; border-radius: 8px; background: rgba(17,24,39,.55); color: #fff;
	display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .75; transition: opacity .15s, background .15s;
}
.epr-side-nav:hover { opacity: 1; background: rgba(17,24,39,.8); }
.epr-side-nav .epr-ico { width: 26px; height: 26px; }
.epr-side-nav.is-off { opacity: 0; pointer-events: none; }
.epr-side-nav[disabled] { display: none; }
.epr-viewer.is-clipping .epr-side-nav { display: none; }

/* Clip selection */
.epr-clip-layer { position: absolute; inset: 0; z-index: 5; cursor: crosshair; overflow: hidden; }
.epr-sel { position: absolute; border: 2px solid var(--epr-brand); box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5); cursor: move; touch-action: none; }
.epr-sel::after { content: ""; position: absolute; inset: 0; border: 1px dashed rgba(255,255,255,.9); pointer-events: none; }
.epr-sel-h { position: absolute; background: #fff; border: 1px solid var(--epr-brand); border-radius: 1px; touch-action: none; }
.epr-sel-h::before { content: ""; position: absolute; inset: -12px; }
.epr-sel-h[data-h="nw"], .epr-sel-h[data-h="ne"], .epr-sel-h[data-h="sw"], .epr-sel-h[data-h="se"] { width: 8px; height: 8px; }
.epr-sel-h[data-h="n"], .epr-sel-h[data-h="s"] { width: 18px; height: 6px; left: calc(50% - 9px); }
.epr-sel-h[data-h="w"], .epr-sel-h[data-h="e"] { width: 6px; height: 18px; top: calc(50% - 9px); }
.epr-sel-h[data-h="nw"] { left: -5px; top: -5px; cursor: nwse-resize; }
.epr-sel-h[data-h="ne"] { right: -5px; top: -5px; cursor: nesw-resize; }
.epr-sel-h[data-h="sw"] { left: -5px; bottom: -5px; cursor: nesw-resize; }
.epr-sel-h[data-h="se"] { right: -5px; bottom: -5px; cursor: nwse-resize; }
.epr-sel-h[data-h="n"] { top: -4px; cursor: ns-resize; }
.epr-sel-h[data-h="s"] { bottom: -4px; cursor: ns-resize; }
.epr-sel-h[data-h="w"] { left: -4px; cursor: ew-resize; }
.epr-sel-h[data-h="e"] { right: -4px; cursor: ew-resize; }
.epr-sel-size { position: absolute; right: 4px; bottom: 4px; opacity: .85; padding: 2px 7px; border-radius: 4px; background: var(--epr-brand); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.epr-sel-actions { position: absolute; display: flex; gap: 6px; z-index: 6; white-space: nowrap; }
.epr-sel-actions .epr-btn { min-height: 32px; padding: 5px 12px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.epr-sel-actions .epr-ico { width: 16px; height: 16px; }

/* Modal */
.epr-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.epr-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.6); }
.epr-modal-box { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.epr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--epr-line); }
.epr-modal-head h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.epr-modal-head h2 .epr-ico { color: var(--epr-brand); }
.epr-modal-body { padding: 16px; }
.epr-clip-preview { background: var(--epr-soft); border-radius: 8px; padding: 10px; text-align: center; margin-bottom: 14px; }
.epr-clip-preview img { max-height: 46vh; width: auto; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.epr-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.epr-modal-actions .epr-btn { flex: 1; }

.epr-copy { display: flex; gap: 8px; margin: 12px 0; }
.epr-copy input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--epr-line); border-radius: 8px; font: inherit; font-size: 13px; background: var(--epr-soft); color: var(--epr-ink); }

.epr-share { display: flex; flex-wrap: wrap; gap: 8px; }
.epr-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; color: #fff !important; transition: transform .12s, filter .12s; }
.epr-share-btn:hover { transform: translateY(-1px); filter: brightness(.92); }
.epr-share-btn .epr-ico { width: 22px; height: 22px; }
.epr-share-btn--whatsapp { background: #25d366; }
.epr-share-btn--facebook { background: #1877f2; }
.epr-share-btn--x { background: #111; }
.epr-share-btn--telegram { background: #229ed9; }
.epr-share-btn--mail { background: #6b7280; }

.epr-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 100001; padding: 10px 18px; border-radius: 999px; background: #111827; color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }

.epr-mobilebar { display: none; }

/* Fullscreen */
.epr-viewer:fullscreen { overflow: auto; }
.epr-viewer:fullscreen .epr-toolbar, .epr-viewer:fullscreen .epr-thumbs { top: 0; }

/* ---------- Clip page ---------- */

.epr-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; color: var(--epr-muted); margin-bottom: 14px; }
.epr-crumbs a:hover { color: var(--epr-brand); }
.epr-clip-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.epr-clip-figure { margin: 0; text-align: center; }
.epr-clip-figure img { display: inline-block; width: auto; height: auto; max-width: 100%; border: 1px solid #000; background: #fff; }
.epr-clip-side { position: sticky; top: calc(var(--epr-top) + 16px); }
.epr-clip-title { font-size: 22px; font-weight: 800; }
.epr-clip-meta { display: flex; align-items: center; gap: 4px; color: var(--epr-muted); font-weight: 600; margin: 6px 0 16px; }
.epr-clip-actions { display: flex; gap: 8px; }
.epr-clip-actions .epr-btn { flex: 1; }
.epr-clip-locator { display: flex; gap: 14px; align-items: center; }
.epr-clip-locator-img { position: relative; display: block; width: 110px; flex: 0 0 110px; border: 1px solid var(--epr-line); }
.epr-clip-locator-img img { display: block; width: 100%; height: auto; }
.epr-clip-locator-box { position: absolute; border: 2px solid var(--epr-brand); background: color-mix(in srgb, var(--epr-brand) 22%, transparent); }
.epr-clip-locator-label { font-weight: 700; font-size: 14px; }
.epr-clip-locator:hover .epr-clip-locator-label { color: var(--epr-brand); }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.epr-clip-layout { grid-template-columns: minmax(0, 1fr); }
	.epr-clip-side { position: static; }
	.epr-body { grid-template-columns: 110px minmax(0, 1fr); }
	.epr-thumbs { padding: 10px; }
}

@media (max-width: 782px) {
	.epr-wrap { padding: 14px 12px 32px; }
	.epr-wrap--viewer { padding: 0; }
	.epr-archive-hero { padding: 16px; }
	.epr-archive-title { font-size: 24px; }
	.epr-cards--featured { gap: 12px; }
	.epr-cards--grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
	.epr-card-title { font-size: 15px; }

	.epr-body { grid-template-columns: minmax(0, 1fr); }
	.epr-thumbs { display: none; }
	.epr-toolbar { padding: 6px 8px; gap: 4px; }
	.epr-tb-info { flex: 1 1 100%; }
	.epr-tb-nav, .epr-hide-sm, .epr-btn-clip { display: none !important; }
	.epr-tb-tools { position: absolute; right: 8px; top: 6px; flex: 0 0 auto; }
	.epr-tb-title { padding-right: 150px; }
	.epr-tb-title h1 { font-size: 15px; }
	.epr-stage { padding: 8px 8px 76px; }
	.epr-side-nav { display: none; }
	.epr-pop-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--epr-top) + 60px); width: auto; }

	.epr-mobilebar {
		display: flex; align-items: center; justify-content: space-between; gap: 6px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
		transform: translate3d(0, 0, 0); will-change: transform; backface-visibility: hidden;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--epr-line); box-shadow: 0 -4px 14px rgba(16,24,40,.1);
	}
	.epr-mobilebar .epr-btn { flex: 1; }
	.epr-mobilebar-page { font-weight: 800; font-size: 14px; min-width: 54px; text-align: center; }
	.epr-viewer.is-clipping .epr-mobilebar { display: none; }
	.epr-clipbar { font-size: 13px; padding: 6px 10px; gap: 8px; }
	.epr-clipbar > .epr-ico { display: none; }
	.epr-toast { bottom: 90px; }
	body.epr-page-viewer .epr-site-footer { padding-bottom: 84px; }
	html:has(body.epr-page-viewer), body.epr-page-viewer { overscroll-behavior-y: none; }
	.epr-sel-actions { gap: 4px; }
	.epr-sel-actions .epr-btn { min-height: 26px; padding: 3px 9px; font-size: 12px; border-radius: 6px; }
	.epr-sel-actions .epr-ico { width: 13px; height: 13px; }
	.epr-sel-size { font-size: 10px; padding: 1px 5px; }
}

@media print {
	.epr-toolbar, .epr-thumbs, .epr-mobilebar, .epr-side-nav, .epr-clipbar { display: none !important; }
	.epr-stage { padding: 0; }
	.epr-page { box-shadow: none; }
}
.epr-date-jump .epr-btn { min-height: 42px; padding: 0 22px; }
