/* EIndiaTech Magazine — Reader styles. Developed by EIndiaTech (www.eindiatech.in) */

.eimag-reader,
.eimag-reader * {
	box-sizing: border-box;
}
.eimag-reader-outer,
.eimag-reader-outer * {
	box-sizing: border-box;
}

:root {
	--eimag-accent: #e1306c;
	--eimag-bg: #0b0b0f;
	--eimag-fg: #f5f5f7;
	--eimag-muted: #b5b5be;
}

body.eimag-reader-body {
	margin: 0;
	background: var(--eimag-bg);
	color: var(--eimag-fg);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Outer wrapper: on mobile this simply hugs the reader; on wider screens
   (laptop, desktop, tablet landscape) it fills the surrounding space with
   a backdrop so the app doesn't look like a narrow phone mock stranded on
   a blank page. */
.eimag-reader-outer {
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	background: var(--eimag-bg);
}

.eimag-backdrop {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transform: scale(1.15);
	filter: blur(38px) brightness(0.55);
	opacity: 0;
	transition: opacity 0.4s ease;
}

@media ( min-width: 700px ) {
	.eimag-reader-outer {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100vh;
		height: 100dvh;
		max-height: 900px;
	}
	.eimag-reader-outer[data-backdrop-mode="blurred-cover"] .eimag-backdrop {
		opacity: 1;
	}
	.eimag-reader-outer[data-backdrop-mode="solid"] .eimag-backdrop {
		opacity: 0;
	}
	.eimag-reader-outer[data-backdrop-mode="solid"] {
		background: var(--eimag-bg);
	}
}

.eimag-reader {
	position: relative;
	width: 100%;
	height: 100%;
	max-width: 420px;
	margin: 0 auto;
	background: var(--eimag-bg, #0b0b0f);
	overflow: hidden;
	z-index: 1;
}

@media ( min-width: 700px ) {
	.eimag-reader {
		max-width: 420px;
		height: min(92vh, 860px);
		border-radius: 20px;
		box-shadow: 0 30px 80px rgba( 0, 0, 0, 0.5 );
		border: 1px solid rgba( 255, 255, 255, 0.08 );
	}
}

/* Landscape tablets / small laptops: slightly roomier reader */
@media ( min-width: 1024px ) and ( orientation: landscape ) {
	.eimag-reader {
		max-width: 460px;
	}
}

.eimag-reader-track {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	touch-action: pan-y;
	-webkit-overflow-scrolling: touch;
}

@media ( prefers-reduced-motion: reduce ) {
	.eimag-reader-track {
		scroll-behavior: auto;
	}
}

.eimag-slide {
	position: relative;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
}

/* Cover slide — shows the cover image directly (most covers already have
   the title/headlines designed into them, like a real magazine front page).
   Optionally overlays title/description text for plain photos. */
.eimag-slide-cover {
	justify-content: flex-start;
	background: #0b0b0f;
	padding: 0;
}
.eimag-cover-media {
	position: relative;
	flex: 1;
	min-height: 0;
	background: #0b0b0f;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.eimag-cover-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.eimag-cover-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient( 160deg, #1a1a22, #0b0b0f );
	padding: 24px;
	text-align: center;
}
.eimag-cover-placeholder span {
	font-size: 1.4rem;
	font-weight: 800;
}
.eimag-cover-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba( 0, 0, 0, 0.85 ), rgba( 0, 0, 0, 0 ) 55% );
}
.eimag-cover-overlay-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 28px 24px;
	text-align: center;
}
.eimag-cover-title {
	font-size: 1.7rem;
	font-weight: 800;
	margin: 0 0 10px;
	line-height: 1.15;
}
.eimag-cover-desc {
	color: var(--eimag-muted);
	font-size: 0.95rem;
	margin: 0;
}
.eimag-swipe-hint {
	flex: 0 0 auto;
	text-align: center;
	color: var(--eimag-accent);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.02em;
	padding: 10px;
	margin: 0;
	animation: eimag-bounce 1.6s infinite;
}
@media ( prefers-reduced-motion: reduce ) {
	.eimag-swipe-hint {
		animation: none;
	}
}
@keyframes eimag-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(6px); }
}
.eimag-back-link {
	position: absolute;
	top: 20px;
	left: 20px;
	z-index: 2;
	color: #fff;
	text-decoration: none;
	font-size: 0.9rem;
	background: rgba( 0, 0, 0, 0.4 );
	padding: 6px 12px;
	border-radius: 999px;
}

/* Article slide — default "image on top, content below" layout: simple,
   readable, and never overlaps text on top of the photo. */
.eimag-slide-article {
	background: var(--eimag-bg, #0b0b0f);
	justify-content: flex-start;
}
.eimag-story-media {
	position: relative;
	flex: 0 0 44%;
	background: #17171d;
	overflow: hidden;
}
.eimag-story-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.eimag-story-media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient( 135deg, #26262e, #17171d );
}
.eimag-story-content {
	flex: 1;
	min-height: 0;
	background: var(--eimag-bg, #0b0b0f);
	position: relative;
}
.eimag-story-content-scroll {
	height: 100%;
	overflow-y: auto;
	padding: 20px 22px 26px;
}
.eimag-story-section,
.eimag-story-category {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--eimag-accent);
	margin-right: 8px;
}
.eimag-story-title {
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.25;
	margin: 8px 0 10px;
	color: var(--eimag-fg, #f5f5f7);
}
.eimag-story-summary {
	color: #d9d9e0;
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0 0 14px;
}
.eimag-story-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 0.8rem;
	color: var(--eimag-muted);
	margin-bottom: 16px;
}

.eimag-btn {
	display: inline-block;
	text-decoration: none;
	font-weight: 700;
	padding: 12px 22px;
	border-radius: 999px;
	font-size: 0.95rem;
	border: none;
	cursor: pointer;
}
.eimag-btn-primary {
	background: var(--eimag-accent);
	color: #fff;
}
.eimag-btn-primary:hover,
.eimag-btn-primary:focus-visible {
	filter: brightness(1.08);
}

/* Brand/action toolbar — sits between the image and the headline, like a
   masthead badge (logo + magazine name) with simple round icon buttons for
   Save/Share, similar to how popular short-news apps present a card. */
.eimag-story-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 14px;
}
.eimag-story-toolbar-no-brand {
	justify-content: flex-end;
}
.eimag-story-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.eimag-story-brand-logo {
	width: 20px;
	height: 20px;
	border-radius: 5px;
	object-fit: cover;
	flex: 0 0 auto;
	display: block;
}
.eimag-story-brand-name {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--eimag-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.eimag-story-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}
.eimag-icon-btn {
	background: rgba( 255, 255, 255, 0.08 );
	border: none;
	color: var(--eimag-muted);
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex: 0 0 auto;
}
.eimag-icon-btn svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}
.eimag-icon-btn:hover,
.eimag-icon-btn:focus-visible {
	color: #fff;
	background: rgba( 255, 255, 255, 0.16 );
}
.eimag-bookmark-btn[aria-pressed="true"] {
	color: var(--eimag-accent);
	background: rgba( 255, 255, 255, 0.08 );
}
.eimag-bookmark-btn[aria-pressed="true"] svg {
	fill: currentColor;
}

/* Optional immersive layout: full-bleed image with text overlaid on a
   gradient, for magazines that prefer the moodier look. Enabled by
   choosing "Full-bleed image" as the Card Layout in Settings. */
.eimag-layout-image-full .eimag-slide-article {
	display: block;
}
.eimag-layout-image-full .eimag-story-media {
	position: absolute;
	inset: 0;
	flex-basis: auto;
}
.eimag-layout-image-full .eimag-story-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba( 0, 0, 0, 0.92 ) 15%, rgba( 0, 0, 0, 0.15 ) 60%, rgba( 0, 0, 0, 0.35 ) 100% );
}
.eimag-layout-image-full .eimag-story-content {
	position: absolute;
	inset: 0;
	background: transparent;
	display: flex;
	align-items: flex-end;
}
.eimag-layout-image-full .eimag-story-content-scroll {
	max-height: 80%;
	padding: 24px 24px 32px;
}
.eimag-layout-image-full .eimag-story-summary {
	color: #e8e8ee;
}

/* Reader nav controls (desktop-friendly, always available — never touch-only) */
.eimag-reader-nav {
	position: absolute;
	right: 14px;
	bottom: 50%;
	transform: translateY(50%);
	display: flex;
	flex-direction: column;
	gap: 10px;
	z-index: 3;
}
.eimag-nav-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: rgba( 255, 255, 255, 0.12 );
	color: #fff;
	font-size: 1.1rem;
	cursor: pointer;
	backdrop-filter: blur(6px);
}
.eimag-nav-btn:hover,
.eimag-nav-btn:focus-visible {
	background: var(--eimag-accent);
}

.eimag-reader-progress {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 5px;
	z-index: 3;
}
.eimag-progress-dot {
	width: 4px;
	height: 14px;
	border-radius: 2px;
	background: rgba( 255, 255, 255, 0.25 );
}
.eimag-progress-dot.is-active {
	background: var(--eimag-accent);
}

/* Floating "Share Full Issue" button — visible on every slide/page, top
   corner (nav arrows live at right-middle, progress dots at left-middle,
   so this stays clear of both). */
.eimag-issue-share-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 4;
	width: 38px;
	height: 38px;
	/* Frosted-glass disc: a soft dark tint + blur so the white icon stays
	   readable on light OR dark artwork, while the page behind still shows
	   through. -webkit- prefix is required for Safari / iPhone. */
	background: rgba( 12, 12, 16, 0.32 );
	color: #fff;
	border: 1px solid rgba( 255, 255, 255, 0.28 );
	-webkit-backdrop-filter: blur( 10px ) saturate( 1.4 );
	backdrop-filter: blur( 10px ) saturate( 1.4 );
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.25 );
}
.eimag-issue-share-btn svg {
	filter: drop-shadow( 0 1px 1px rgba( 0, 0, 0, 0.45 ) );
}
.eimag-issue-share-btn:hover,
.eimag-issue-share-btn:focus-visible {
	background: var(--eimag-accent);
	color: #fff;
}
/* Very old browsers with no blur support: use a slightly stronger tint instead. */
@supports not ( ( -webkit-backdrop-filter: blur( 1px ) ) or ( backdrop-filter: blur( 1px ) ) ) {
	.eimag-issue-share-btn {
		background: rgba( 12, 12, 16, 0.55 );
	}
}
.eimag-issue-share-btn svg {
	width: 17px;
	height: 17px;
}

/* Carousel slide inside the vertical reader */
.eimag-slide-carousel {
	justify-content: center;
	background: #101014;
	padding: 24px 0;
}

/* Contents (auto-generated Table of Contents) page */
.eimag-slide-contents {
	background: #101014;
	justify-content: flex-start;
	overflow-y: auto;
	padding: 60px 24px 40px;
}
.eimag-contents-inner {
	width: 100%;
}
.eimag-contents-title {
	font-size: 1.6rem;
	font-weight: 800;
	margin: 0 0 20px;
}
.eimag-contents-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.eimag-contents-list li {
	border-bottom: 1px solid rgba( 255, 255, 255, 0.08 );
}
.eimag-toc-link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	color: #fff;
	padding: 14px 4px;
	cursor: pointer;
	font: inherit;
}
.eimag-toc-link:hover,
.eimag-toc-link:focus-visible {
	color: var(--eimag-accent);
}
.eimag-toc-sublabel {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	color: var(--eimag-accent);
}
.eimag-toc-label {
	font-size: 1rem;
	font-weight: 600;
}
.eimag-contents-empty {
	color: var(--eimag-muted);
}

/* Editorial / custom content page */
.eimag-slide-page {
	background: linear-gradient( 160deg, #1a1a22, #0b0b0f );
	justify-content: flex-start;
}
.eimag-page-media {
	display: block;
	flex: 0 0 38%;
	overflow: hidden;
	background: #17171d;
}
.eimag-page-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
a.eimag-page-image-link {
	cursor: pointer;
}
.eimag-page-content-wrap {
	flex: 1;
	min-height: 0;
}
.eimag-page-content-scroll {
	height: 100%;
	overflow-y: auto;
	padding: 32px 24px 40px;
}
.eimag-slide-page:not(:has(.eimag-page-media)) .eimag-page-content-scroll {
	padding-top: 60px;
}
.eimag-page-kicker {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--eimag-accent);
	margin-bottom: 8px;
}
.eimag-page-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0 0 16px;
}
.eimag-page-content {
	color: #d8d8de;
	line-height: 1.7;
	font-size: 0.98rem;
}
.eimag-page-content p {
	margin: 0 0 14px;
}

/* Full-page image-only page (no title/text — prints the image edge-to-edge) */
.eimag-slide-page-imageonly {
	background: #0b0b0f;
	justify-content: center;
	align-items: center;
	padding: 0;
}
.eimag-page-imageonly-media {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.eimag-page-imageonly-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Full-page image carousel (2+ images, swiped through on one page) */
.eimag-slide-page-imagecarousel {
	padding: 0;
}
.eimag-page-imagecarousel-inner.eimag-carousel {
	width: 100%;
	height: 100%;
}
.eimag-page-imagecarousel-inner .eimag-carousel-track {
	height: 100%;
	padding: 0;
	gap: 0;
	scroll-snap-type: x mandatory;
}
.eimag-page-imagecarousel-item.eimag-carousel-item {
	flex: 0 0 100%;
	max-width: 100%;
	height: 100%;
}
.eimag-page-imagecarousel-media {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.eimag-page-imagecarousel-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.eimag-page-imagecarousel-inner .eimag-carousel-arrow {
	top: 50%;
}
.eimag-page-imagecarousel-inner .eimag-carousel-dots {
	position: absolute;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	margin-top: 0;
	z-index: 2;
}

/* Video slides (YouTube or an uploaded file), both layouts */
.eimag-slide-video-card {
	background: linear-gradient( 160deg, #1a1a22, #0b0b0f );
	justify-content: flex-start;
}
.eimag-video-wrap {
	position: relative;
	flex: 0 0 45%;
	overflow: hidden;
	background: #000;
}
.eimag-slide-video-fullscreen {
	background: #000;
	justify-content: center;
	align-items: center;
	padding: 0;
}
.eimag-video-wrap-fullscreen {
	flex: none;
	width: 100%;
	height: 100%;
}
.eimag-video-poster {
	position: absolute;
	inset: 0;
	background-color: #17171d;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
.eimag-video-poster::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.25 );
}
.eimag-video-play-btn {
	position: relative;
	z-index: 1;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 2px solid rgba( 255, 255, 255, 0.85 );
	background: rgba( 0, 0, 0, 0.5 );
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.eimag-video-play-btn:hover,
.eimag-video-play-btn:focus-visible {
	background: var(--eimag-accent);
	border-color: var(--eimag-accent);
}
.eimag-video-play-btn svg {
	width: 26px;
	height: 26px;
	fill: #fff;
	margin-left: 4px;
}
.eimag-video-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}
video.eimag-video-frame {
	object-fit: cover;
}

/* Reels-style Like / Forward / Save strip. Lives inside each slide (not
   the global chrome) so it scrolls away with that slide and shows that
   slide's own counts. Positioned lower-right rather than dead-center to
   stay clear of the nav arrows at right-middle. */
.eimag-reel-actions {
	position: absolute;
	right: 12px;
	bottom: 16%;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}
.eimag-reel-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	padding: 0;
	color: #fff;
	cursor: pointer;
	filter: drop-shadow( 0 1px 3px rgba( 0, 0, 0, 0.5 ) );
}
.eimag-reel-btn svg {
	width: 42px;
	height: 42px;
	padding: 9px;
	box-sizing: border-box;
	border-radius: 50%;
	background: rgba( 12, 12, 16, 0.28 );
	-webkit-backdrop-filter: blur( 8px ) saturate( 1.3 );
	backdrop-filter: blur( 8px ) saturate( 1.3 );
}
.eimag-reel-count {
	text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.7 );
}
.eimag-reel-count {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
}
.eimag-reel-like .eimag-reel-icon-filled,
.eimag-reel-save .eimag-reel-icon-filled {
	display: none;
}
.eimag-reel-like.is-active .eimag-reel-icon-outline,
.eimag-reel-save.is-active .eimag-reel-icon-outline {
	display: none;
}
.eimag-reel-like.is-active .eimag-reel-icon-filled {
	display: block;
	fill: #ff3b5c;
}
.eimag-reel-save.is-active .eimag-reel-icon-filled {
	display: block;
	fill: var(--eimag-accent);
}
.eimag-has-reel .eimag-story-content-scroll,
.eimag-has-reel .eimag-page-content-scroll {
	padding-right: 52px;
}

/* Subscribe page: optional image on top, name/email/mobile form below */
.eimag-slide-subscribe {
	background: linear-gradient( 160deg, #1a1a22, #0b0b0f );
	justify-content: flex-start;
}
.eimag-subscribe-media {
	flex: 0 0 34%;
	overflow: hidden;
	background: #17171d;
}
.eimag-subscribe-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.eimag-subscribe-content-wrap {
	flex: 1;
	min-height: 0;
}
.eimag-subscribe-content-scroll {
	height: 100%;
	overflow-y: auto;
	padding: 32px 24px 40px;
}
.eimag-slide-subscribe:not(:has(.eimag-subscribe-media)) .eimag-subscribe-content-scroll {
	padding-top: 60px;
}
.eimag-subscribe-title {
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0 0 8px;
}
.eimag-subscribe-subtext {
	color: #b7b7c0;
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0 0 22px;
}
.eimag-subscribe-field {
	margin: 0 0 14px;
}
.eimag-subscribe-field label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: #9c9ca6;
	margin-bottom: 6px;
}
.eimag-subscribe-field input:not([type="checkbox"]):not([type="radio"]),
.eimag-subscribe-field textarea,
.eimag-subscribe-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid rgba( 255, 255, 255, 0.15 );
	background: rgba( 255, 255, 255, 0.06 );
	color: #fff;
	font-size: 0.95rem;
	font-family: inherit;
}
.eimag-subscribe-field textarea {
	resize: vertical;
	min-height: 96px;
	line-height: 1.45;
}
.eimag-subscribe-field select option {
	color: #1a1a22;
}
.eimag-subscribe-field input:focus,
.eimag-subscribe-field textarea:focus,
.eimag-subscribe-field select:focus {
	outline: none;
	border-color: var(--eimag-accent);
}
.eimag-subscribe-field .eimag-req {
	color: var(--eimag-accent);
}
.eimag-subscribe-field .eimag-field-group {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}
.eimag-subscribe-field .eimag-field-group legend {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: #9c9ca6;
	margin-bottom: 8px;
	padding: 0;
}
.eimag-subscribe-field label.eimag-choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.92rem;
	font-weight: 500;
	color: #e6e6ec;
	margin: 0 0 8px;
	cursor: pointer;
}
.eimag-subscribe-field .eimag-choice input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--eimag-accent);
}
.eimag-subscribe-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.eimag-subscribe-submit {
	width: 100%;
	border: none;
	cursor: pointer;
	margin-top: 4px;
}
.eimag-subscribe-submit:disabled {
	opacity: 0.6;
	cursor: default;
}
.eimag-subscribe-error {
	color: #ff6b6b;
	font-size: 0.85rem;
	margin: 10px 0 0;
}
.eimag-subscribe-success {
	text-align: center;
	padding: 40px 12px;
	color: #fff;
}
.eimag-subscribe-success svg {
	width: 48px;
	height: 48px;
	color: var(--eimag-accent);
	margin-bottom: 12px;
}
.eimag-subscribe-success p {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0;
}

/* End page */
.eimag-slide-end {
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 32px;
	background: linear-gradient( 160deg, #16161d, #0b0b0f );
}
.eimag-end-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0 0 10px;
}
.eimag-end-desc {
	color: var(--eimag-muted);
	margin: 0 0 24px;
}
.eimag-end-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}
.eimag-end-actions .eimag-btn:not(.eimag-btn-primary) {
	background: rgba( 255, 255, 255, 0.1 );
	color: #fff;
}

/* "Explore other editions" style menu on the End page, built from the
   admin-configured list of custom links. */
.eimag-end-menu-title {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--eimag-muted);
	margin: 6px 0 12px;
}
.eimag-end-menu {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	width: 100%;
	max-width: 360px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.eimag-end-menu-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	text-decoration: none;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	padding: 14px 18px;
	border-radius: 12px;
	background: rgba( 255, 255, 255, 0.08 );
	transition: background 0.15s ease;
}
.eimag-end-menu-link:hover,
.eimag-end-menu-link:focus-visible {
	background: rgba( 255, 255, 255, 0.16 );
}
.eimag-end-menu-arrow {
	color: var(--eimag-accent);
	font-weight: 700;
}

/* Advertisement slide (Phase 3) */
.eimag-slide-ad {
	position: relative;
	background: var(--eimag-bg, #0b0b0f);
	justify-content: flex-start;
	padding: 0;
}
.eimag-ad-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	background: rgba( 0, 0, 0, 0.55 );
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 999px;
	backdrop-filter: blur(4px);
}
/* Full image / full video: fills the entire slide, tap anywhere to open link */
.eimag-ad-fill {
	position: absolute;
	inset: 0;
	display: block;
}
.eimag-ad-fill img,
.eimag-ad-fill video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Image + text: same card shape as a magazine story slide */
.eimag-slide-ad-image_caption {
	display: flex;
	flex-direction: column;
}
.eimag-ad-media {
	flex: 0 0 44%;
	background: #17171d;
	overflow: hidden;
}
.eimag-ad-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.eimag-ad-content {
	flex: 1;
	min-height: 0;
	padding: 20px 22px 26px;
	overflow-y: auto;
}
.eimag-ad-title {
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 10px;
	color: var(--eimag-fg, #f5f5f7);
}
.eimag-ad-text {
	color: #d9d9e0;
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0 0 16px;
}
/* Embed (YouTube / Instagram / Facebook / oEmbed) */
.eimag-ad-embed-wrap {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: 20px;
}
.eimag-ad-embed-wrap iframe,
.eimag-ad-embed-wrap embed,
.eimag-ad-embed-wrap blockquote {
	max-width: 100%;
}
.eimag-slide-ad-embed .eimag-ad-link {
	position: absolute;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 2;
}

/* Reusable carousel block (also used standalone via shortcode) */
.eimag-carousel-block {
	width: 100%;
}
.eimag-section-title {
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 14px;
	padding: 0 20px;
	color: var(--eimag-fg, #1a1a1a);
}
.eimag-carousel {
	position: relative;
}
.eimag-carousel-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 0 20px 8px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.eimag-carousel-track::-webkit-scrollbar {
	display: none;
}
.eimag-carousel-item {
	flex: 0 0 90%;
	max-width: 420px;
	scroll-snap-align: start;
}
@media ( max-width: 380px ) {
	.eimag-carousel-item {
		flex-basis: 96%;
	}
}
@media ( min-width: 640px ) {
	.eimag-carousel-item {
		flex-basis: 42%;
	}
}
@media ( min-width: 1000px ) {
	.eimag-carousel-item {
		flex-basis: 30%;
	}
}
.eimag-carousel-arrow {
	display: none;
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: rgba( 0, 0, 0, 0.55 );
	color: #fff;
	font-size: 1.2rem;
	cursor: pointer;
	z-index: 2;
}
@media ( hover: hover ) and ( pointer: fine ) {
	.eimag-carousel-arrow {
		display: block;
	}
}
.eimag-carousel-arrow-prev { left: 4px; }
.eimag-carousel-arrow-next { right: 4px; }
.eimag-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
}
.eimag-carousel-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba( 128, 128, 128, 0.4 );
}
.eimag-carousel-dots span.is-active {
	background: var(--eimag-accent, #e1306c);
}
/* Pagination turned off for this carousel (Issue Builder -> "Show pagination dots"). */
.eimag-carousel.eimag-hide-dots .eimag-carousel-dots {
	display: none !important;
}

/* Standalone article card (used in carousels, [magazine_card], [magazine_section]) */
.eimag-card {
	background: #17171d;
	color: #f2f2f5;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.18 );
}
.eimag-card-media {
	display: block;
	aspect-ratio: 16 / 10;
	background: #26262e;
}
.eimag-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.eimag-card-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.eimag-card-category {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	color: var(--eimag-accent, #e1306c);
}
.eimag-card-title {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.3;
}
.eimag-card-title a {
	color: inherit;
	text-decoration: none;
}
.eimag-card-summary {
	font-size: 0.88rem;
	color: #c7c7d1;
	line-height: 1.5;
	margin: 0;
}
.eimag-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 0.72rem;
	color: #8b8b95;
}
.eimag-card-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 8px;
}
.eimag-card-actions .eimag-btn-primary {
	padding: 8px 16px;
	font-size: 0.82rem;
}

/* Card layout: image-full (full-bleed image with overlaid text, like the main story slides) */
.eimag-card-image-full {
	position: relative;
	min-height: 260px;
}
.eimag-card-image-full .eimag-card-media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}
.eimag-card-image-full .eimag-card-media img {
	width: 100%;
	height: 100%;
}
.eimag-card-image-full .eimag-card-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba( 0, 0, 0, 0.92 ) 10%, rgba( 0, 0, 0, 0.1 ) 65% );
}
.eimag-card-image-full .eimag-card-body {
	position: relative;
	z-index: 1;
	margin-top: auto;
	background: transparent;
}
.eimag-card-image-full .eimag-card-summary {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Issue archive grid */
.eimag-archive-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: 22px;
}
.eimag-archive-item {
	text-decoration: none;
	color: inherit;
	display: block;
	border-radius: 14px;
	overflow: hidden;
	background: #17171d;
	color: #f2f2f5;
}
.eimag-archive-cover {
	position: relative;
	aspect-ratio: 3 / 4;
	background: #26262e;
}
.eimag-archive-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.eimag-archive-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--eimag-accent, #e1306c);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
}
.eimag-archive-info {
	padding: 14px 16px 18px;
}
.eimag-archive-title {
	margin: 0 0 6px;
	font-size: 1.05rem;
}
.eimag-archive-desc {
	font-size: 0.85rem;
	color: #b5b5be;
	margin: 0 0 10px;
}
.eimag-archive-link {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--eimag-accent, #e1306c);
}

.eimag-notice {
	padding: 16px;
	border-radius: 10px;
	background: rgba( 0, 0, 0, 0.05 );
}

/* Toast used for "Link copied!" feedback */
.eimag-toast {
	position: fixed;
	left: 50%;
	bottom: 30px;
	transform: translate(-50%, 0);
	background: #1a1a1a;
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 0.85rem;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.eimag-toast.is-visible {
	opacity: 1;
}

/* Visible focus states for accessibility */
.eimag-reader-track:focus-visible,
.eimag-carousel-track:focus-visible,
.eimag-nav-btn:focus-visible,
.eimag-icon-btn:focus-visible,
.eimag-btn:focus-visible,
.eimag-carousel-arrow:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* SEO / AI-indexing text: real text in the DOM for search & AI crawlers
   to read, but not shown to readers of the swipe reader itself. Uses the
   standard clip-based technique rather than display:none, since some
   assistive tech and (reportedly) some crawlers skip display:none content. */
.eimag-seo-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---- v2.7.1: video inside a multi-image carousel page ---- */
.eimag-page-imagecarousel-videoitem {
	background: #000;
}
.eimag-page-imagecarousel-videoitem .eimag-video-wrap {
	flex: none;
	width: 100%;
	height: 100%;
}
.eimag-page-imagecarousel-videoitem .eimag-video-poster {
	background-size: contain;
	background-repeat: no-repeat;
	background-color: #000;
}
.eimag-page-imagecarousel-videoitem video.eimag-video-frame {
	object-fit: contain;
}

/* ---- v2.8.0: orientation of a video inside the image carousel ----
   portrait  = 9:16 box (Reels / Shorts): fills the slide on a phone, a centred
               9:16 column on a wide screen. Uploaded video is cropped to fill.
   landscape = a 16:9 box centred in the slide (black bars above / below).
   auto      = what videos saved before v2.8.0 keep using (fit as-is). */
.eimag-page-imagecarousel-videoitem {
	display: flex;
	align-items: center;
	justify-content: center;
}
.eimag-vorient-portrait .eimag-video-wrap {
	width: auto;
	height: 100%;
	max-width: 100%;
	aspect-ratio: 9 / 16;
	margin: 0 auto;
}
.eimag-vorient-portrait .eimag-video-poster {
	background-size: cover;
	background-repeat: no-repeat;
}
.eimag-vorient-portrait video.eimag-video-frame {
	object-fit: cover;
}
.eimag-vorient-landscape .eimag-video-wrap {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	margin: auto 0;
}
.eimag-vorient-landscape .eimag-video-poster {
	background-size: cover;
	background-repeat: no-repeat;
}
.eimag-vorient-landscape video.eimag-video-frame {
	object-fit: contain;
}
.eimag-vorient-portrait .eimag-video-wrap > .eimag-video-frame,
.eimag-vorient-landscape .eimag-video-wrap > .eimag-video-frame {
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
}

/* ---- v2.7.1: Shortcode / Custom Code page ---- */
.eimag-slide-shortcode {
	justify-content: flex-start;
	padding: 0;
}
.eimag-shortcode-scroll {
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	box-sizing: border-box;
	padding: 60px 24px 48px;
}
.eimag-has-reel .eimag-shortcode-scroll {
	padding-right: 52px;
}
.eimag-slide-shortcode-light {
	background: #ffffff;
	color: #1d2327;
}
.eimag-slide-shortcode-light .eimag-page-title {
	color: #1d2327;
}
.eimag-slide-shortcode-dark {
	background: linear-gradient( 160deg, #1a1a22, #0b0b0f );
	color: #f1f1f4;
}
.eimag-shortcode-content {
	line-height: 1.6;
	overflow-wrap: anywhere;
}
.eimag-shortcode-content img,
.eimag-shortcode-content iframe,
.eimag-shortcode-content video,
.eimag-shortcode-content table {
	max-width: 100%;
}
.eimag-shortcode-content iframe {
	border: 0;
}
.eimag-shortcode-content input[type="text"],
.eimag-shortcode-content input[type="email"],
.eimag-shortcode-content input[type="tel"],
.eimag-shortcode-content input[type="url"],
.eimag-shortcode-content input[type="number"],
.eimag-shortcode-content textarea,
.eimag-shortcode-content select {
	max-width: 100%;
	box-sizing: border-box;
}

/* ---- v2.7.3: swipe hint for full-page image carousels ---- */
.eimag-swipe-hint {
	position: absolute;
	left: 50%;
	bottom: 64px;
	transform: translateX( -50% );
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba( 0, 0, 0, 0.62 );
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.2px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	z-index: 3;
	-webkit-backdrop-filter: blur( 6px );
	backdrop-filter: blur( 6px );
}
.eimag-swipe-hint-hand {
	flex: none;
}
.eimag-swipe-hint-arrow {
	font-size: 18px;
	line-height: 1;
	opacity: 0.9;
}

.eimag-page-imagecarousel-inner.is-hinting .eimag-swipe-hint {
	animation: eimag-hint-pill 3s ease both;
}
.eimag-page-imagecarousel-inner.is-hinting .eimag-swipe-hint-hand {
	animation: eimag-hint-hand 2.6s ease-in-out 0.1s 1 both;
}
.eimag-page-imagecarousel-inner.is-hinting .eimag-swipe-hint-arrow {
	animation: eimag-hint-arrow 2.6s ease-in-out 0.1s 1 both;
}
/* One swipe: the pictures slide left, hold a moment with a peek of the
   next slide, then settle back. Plays once. */
.eimag-page-imagecarousel-inner.is-hinting .eimag-carousel-item {
	animation: eimag-hint-nudge 2.6s cubic-bezier( 0.45, 0, 0.25, 1 ) 0.1s 1 both;
}

@keyframes eimag-hint-pill {
	0%   { opacity: 0; transform: translateX( -50% ) translateY( 8px ); }
	10%  { opacity: 1; transform: translateX( -50% ) translateY( 0 ); }
	88%  { opacity: 1; transform: translateX( -50% ) translateY( 0 ); }
	100% { opacity: 0; transform: translateX( -50% ) translateY( 0 ); }
}
@keyframes eimag-hint-hand {
	0%   { transform: translateX( 8px ); }
	25%  { transform: translateX( -8px ); }
	75%  { transform: translateX( -8px ); }
	100% { transform: translateX( 0 ); }
}
@keyframes eimag-hint-arrow {
	0%   { transform: translateX( 0 ); opacity: 0.4; }
	25%  { transform: translateX( 5px ); opacity: 1; }
	75%  { transform: translateX( 5px ); opacity: 1; }
	100% { transform: translateX( 0 ); opacity: 0.4; }
}
@keyframes eimag-hint-nudge {
	0%   { transform: translateX( 0 ); }
	25%  { transform: translateX( -56px ); }
	75%  { transform: translateX( -56px ); }
	100% { transform: translateX( 0 ); }
}

@media ( prefers-reduced-motion: reduce ) {
	.eimag-page-imagecarousel-inner.is-hinting .eimag-carousel-item,
	.eimag-page-imagecarousel-inner.is-hinting .eimag-swipe-hint-hand,
	.eimag-page-imagecarousel-inner.is-hinting .eimag-swipe-hint-arrow {
		animation: none;
	}
}

/* ---- v2.8.1: carousel-style ads, and an ad sitting in the middle of a carousel ---- */
.eimag-slide-ad-carousel { position: relative; }
.eimag-ad-carousel { position: absolute; inset: 0; }
.eimag-ad-carousel .eimag-carousel-track { height: 100%; padding: 0; gap: 0; }
.eimag-ad-carousel .eimag-carousel-item { flex: 0 0 100%; max-width: 100%; height: 100%; position: relative; }
.eimag-ad-carousel .eimag-carousel-arrow { top: 50%; }
.eimag-ad-carousel .eimag-carousel-dots { position: absolute; left: 0; right: 0; bottom: 22px; margin: 0; z-index: 2; justify-content: center; }
.eimag-carousel-ad {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: #17171d;
	min-height: 340px;
}
.eimag-carousel-ad.eimag-page-imagecarousel-item { border-radius: 0; min-height: 0; }
.eimag-carousel-ad .eimag-ad-badge { z-index: 3; }
.eimag-carousel-ad .eimag-ad-media img { width: 100%; display: block; }
.eimag-carousel-ad .eimag-ad-content { padding: 14px 16px 18px; }

/* ---- v2.9.0: loading experience — breathing loader, soft image fade-in, buffering ring ---- */
.eimag-reader { --eimag-breath: 6s; }

.eimag-loader {
	position: absolute;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: var(--eimag-bg, #0b0b0f);
	color: #f4f4f7;
	transition: opacity 0.6s ease, visibility 0.6s ease;
	/* Fail-safe: even if JavaScript never runs, the loader gets out of the way after 12 s. */
	animation: eimag-loader-failsafe 0.01s linear 12s forwards;
}
.eimag-loader[data-tone="light"] { color: #1a1a22; }
.eimag-loader.is-done {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	animation: none;
}
@keyframes eimag-loader-failsafe {
	to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.eimag-loader-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px;
	max-width: 280px;
}

/* Breathing orb */
.eimag-loader-stage {
	position: relative;
	width: 150px;
	height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.eimag-orb-halo {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: radial-gradient( circle, var(--eimag-loader-color) 0%, transparent 68% );
	animation: eimag-breathe-halo var(--eimag-breath) ease-in-out infinite;
}
.eimag-orb-core {
	position: relative;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: radial-gradient( circle at 35% 30%, rgba( 255, 255, 255, 0.55 ), var(--eimag-loader-color) 62% );
	box-shadow: 0 0 44px var(--eimag-loader-color);
	animation: eimag-breathe var(--eimag-breath) ease-in-out infinite;
}
.eimag-orb-core img {
	width: 58%;
	height: 58%;
	object-fit: contain;
	filter: drop-shadow( 0 1px 3px rgba( 0, 0, 0, 0.3 ) );
}
@keyframes eimag-breathe {
	0%, 100% { transform: scale( 0.8 ); }
	50% { transform: scale( 1.18 ); }
}
@keyframes eimag-breathe-halo {
	0%, 100% { transform: scale( 0.7 ); opacity: 0.22; }
	50% { transform: scale( 1.2 ); opacity: 0.55; }
}

/* Breathing logo */
.eimag-loader-logo img {
	display: block;
	max-width: 120px;
	max-height: 120px;
	object-fit: contain;
	filter: drop-shadow( 0 0 22px var(--eimag-loader-color) );
	animation: eimag-breathe var(--eimag-breath) ease-in-out infinite;
}

/* Three pulsing dots */
.eimag-loader-dots {
	display: flex;
	gap: 12px;
	height: 40px;
	align-items: center;
}
.eimag-loader-dots span {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--eimag-loader-color);
	animation: eimag-dot-pulse 1.8s ease-in-out infinite;
}
.eimag-loader-dots span:nth-child( 2 ) { animation-delay: 0.25s; }
.eimag-loader-dots span:nth-child( 3 ) { animation-delay: 0.5s; }
@keyframes eimag-dot-pulse {
	0%, 80%, 100% { transform: scale( 0.6 ); opacity: 0.35; }
	40% { transform: scale( 1.15 ); opacity: 1; }
}

/* Words that follow the breathing */
.eimag-loader-text {
	position: relative;
	width: 240px;
	height: 1.5em;
	margin: 22px 0 0;
	font-size: 0.95rem;
	letter-spacing: 0.08em;
}
.eimag-loader-text span {
	position: absolute;
	left: 0;
	right: 0;
	opacity: 0;
}
.eimag-breathe-in { animation: eimag-txt-in var(--eimag-breath) ease-in-out infinite; }
.eimag-breathe-out { animation: eimag-txt-out var(--eimag-breath) ease-in-out infinite; }
@keyframes eimag-txt-in {
	0%, 6% { opacity: 0; }
	18%, 42% { opacity: 0.9; }
	52%, 100% { opacity: 0; }
}
@keyframes eimag-txt-out {
	0%, 54% { opacity: 0; }
	66%, 92% { opacity: 0.9; }
	100% { opacity: 0; }
}
.eimag-loader-slow {
	margin: 16px 0 0;
	font-size: 0.82rem;
	opacity: 0.75;
	line-height: 1.4;
	animation: eimag-fade-in 0.8s ease both;
}
.eimag-loader-slow[hidden] { display: none; }
@keyframes eimag-fade-in { from { opacity: 0; } to { opacity: 0.75; } }

/* Pictures: a gently breathing placeholder, then a soft fade-in */
.eimag-img-fade { transition: opacity 0.55s ease; }
.eimag-img-pending { opacity: 0; }
.eimag-ph { animation: eimag-ph-breathe 2.8s ease-in-out infinite; }
@keyframes eimag-ph-breathe {
	0%, 100% { background-color: rgba( 255, 255, 255, 0.04 ); }
	50% { background-color: rgba( 255, 255, 255, 0.11 ); }
}

/* Video buffering ring */
.eimag-video-wrap.is-buffering::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	border: 3px solid rgba( 255, 255, 255, 0.75 );
	box-shadow: 0 0 22px rgba( 255, 255, 255, 0.35 );
	pointer-events: none;
	z-index: 3;
	animation: eimag-ring var(--eimag-breath, 6s) ease-in-out infinite;
}
@keyframes eimag-ring {
	0%, 100% { transform: scale( 0.7 ); opacity: 0.4; }
	50% { transform: scale( 1.15 ); opacity: 1; }
}

/* "Some pictures couldn't load" + Retry */
.eimag-toast {
	position: absolute;
	left: 50%;
	bottom: 70px;
	transform: translateX( -50% );
	z-index: 55;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 90%;
	padding: 9px 12px 9px 16px;
	border-radius: 999px;
	font-size: 0.82rem;
	color: #fff;
	background: rgba( 12, 12, 16, 0.78 );
	-webkit-backdrop-filter: blur( 10px );
	backdrop-filter: blur( 10px );
	border: 1px solid rgba( 255, 255, 255, 0.18 );
}
.eimag-toast button {
	border: 0;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #fff;
	background: var(--eimag-accent, #e1306c);
	cursor: pointer;
}

/* People who asked their device for less motion: no growing or shrinking, just a slow fade. */
@media ( prefers-reduced-motion: reduce ) {
	.eimag-orb-halo,
	.eimag-orb-core,
	.eimag-loader-logo img,
	.eimag-loader-dots span,
	.eimag-video-wrap.is-buffering::after {
		animation-name: eimag-calm-fade;
		animation-duration: 3.2s;
	}
	.eimag-ph { animation: none; background-color: rgba( 255, 255, 255, 0.07 ); }
	.eimag-img-fade { transition-duration: 0.2s; }
	@keyframes eimag-calm-fade {
		0%, 100% { opacity: 0.45; transform: none; }
		50% { opacity: 1; transform: none; }
	}
}

/* ---- v2.10.0: split page — two pictures joined edge to edge, each its own link ----
   No padding, no gap: the two halves read as ONE page. */
.eimag-slide-page-split { background: var(--eimag-split-bg, #fff); }
.eimag-split {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	gap: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--eimag-split-bg, #fff);
	container-type: size;
}
.eimag-split-side { flex-direction: row; align-items: center; }
.eimag-split-half {
	position: relative;
	flex: 0 1 auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	line-height: 0;
}
.eimag-split-link {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	line-height: 0;
	text-decoration: none;
	color: inherit;
}
.eimag-split-half img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border: 0;
	/* If the two pictures together are taller than the screen, each is held to
	   half the height (and centred) so they still meet with no gap. */
	max-height: 50cqh;
	object-fit: contain;
}
.eimag-split-side .eimag-split-half { flex: 1 1 0; }
.eimag-split-side .eimag-split-half img { max-height: 100cqh; max-width: 100%; }

/* "Fill the screen": each half takes exactly half; edges may be cropped. */
.eimag-split-fit-fill .eimag-split-half { flex: 1 1 0; }
.eimag-split-fit-fill .eimag-split-half img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.eimag-split-fit-fill.eimag-split-side .eimag-split-half img { max-height: none; }

/* Optional small label ("Buy now") on a half — frosted so it shows on any picture. */
.eimag-split-label {
	position: absolute;
	right: 12px;
	bottom: 12px;
	max-width: calc( 100% - 24px );
	padding: 7px 13px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	background: rgba( 12, 12, 16, 0.42 );
	border: 1px solid rgba( 255, 255, 255, 0.3 );
	-webkit-backdrop-filter: blur( 10px ) saturate( 1.3 );
	backdrop-filter: blur( 10px ) saturate( 1.3 );
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.22 );
	pointer-events: none;
}
.eimag-page-imagecarousel-splititem { position: relative; padding: 0; background: transparent; }

/* ---- v2.12.0: footer ad strip (works with or without Clean Card) ---- */
.eimag-slide { --eimag-footer-ad-h: 72px; }
.eimag-has-footer-ad { padding-bottom: var(--eimag-footer-ad-h); }
.eimag-footer-ad {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--eimag-footer-ad-h);
	z-index: 5;
	overflow: hidden;
	background: #0b0b0f;
}
.eimag-footer-ad img,
.eimag-footer-ad-link {
	display: block;
	width: 100%;
	height: 100%;
}
.eimag-footer-ad img { object-fit: cover; }
.eimag-footer-ad-badge {
	position: absolute;
	top: 6px;
	left: 8px;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.3;
	color: #fff;
	background: rgba( 12, 12, 16, 0.5 );
	-webkit-backdrop-filter: blur( 8px );
	backdrop-filter: blur( 8px );
	pointer-events: none;
}

/* ---- v2.12.0: Clean Card look ----
   Pages are a shorter rounded card; the space above and below shows a blurred,
   darkened copy of the page's own picture (set by magazine-reader.js). */
.eimag-cleancard.eimag-reader { background: #07070a; }
.eimag-cc-backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
	background: #07070a;
}
.eimag-cc-layer {
	position: absolute;
	inset: -10%;
	background-size: cover;
	background-position: center;
	filter: blur( 34px ) saturate( 1.35 ) brightness( 0.55 );
	opacity: 0;
	transition: opacity 0.5s ease;
	will-change: opacity;
}
.eimag-cc-layer.is-on { opacity: 1; }
.eimag-cc-layer.is-blank {
	background: #14141c;
	background: radial-gradient( circle at 50% 30%, color-mix( in srgb, var(--eimag-accent, #e1306c) 50%, #000 ), #06060a 72% );
	filter: none;
}
/* The "little black" at the very top and bottom. */
.eimag-cc-backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( to bottom, rgba( 0, 0, 0, 0.62 ) 0%, rgba( 0, 0, 0, 0.22 ) 14%, rgba( 0, 0, 0, 0 ) 30%, rgba( 0, 0, 0, 0 ) 70%, rgba( 0, 0, 0, 0.3 ) 86%, rgba( 0, 0, 0, 0.66 ) 100% );
}
.eimag-cleancard .eimag-reader-track {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column; /* flex items: vertical margins never collapse, so every page keeps the same pitch */
	background: transparent;
}
.eimag-cleancard .eimag-slide {
	flex: 0 0 auto;
	height: calc( 100% - var(--eimag-cc-top, 52px) - var(--eimag-cc-bottom, 40px) );
	margin: var(--eimag-cc-top, 52px) 0 var(--eimag-cc-bottom, 40px);
	scroll-margin-top: var(--eimag-cc-top, 52px);
	border-radius: 22px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.4 );
}
.eimag-cleancard .eimag-issue-share-btn {
	top: calc( ( var(--eimag-cc-top, 52px) - 38px ) / 2 );
	z-index: 6;
}

/* Nothing scrolls inside a page: magazine-reader.js shrinks, then trims, long text. */
.eimag-cleancard .eimag-story-content-scroll,
.eimag-cleancard .eimag-page-content-scroll,
.eimag-cleancard .eimag-ad-content,
.eimag-cleancard .eimag-shortcode-scroll {
	overflow: hidden;
}

/* Like / Share / Save: one small, quiet tab on the card's bottom edge. */
.eimag-cleancard .eimag-reel-actions {
	right: 14px;
	bottom: 0;
	flex-direction: row;
	align-items: center;
	gap: 2px;
	padding: 8px 12px 7px;
	background: rgba( 255, 255, 255, 0.96 );
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -2px 14px rgba( 0, 0, 0, 0.14 );
}
.eimag-cleancard .eimag-has-footer-ad .eimag-reel-actions { bottom: var(--eimag-footer-ad-h); }
.eimag-cleancard .eimag-reel-btn {
	color: #1a1a22;
	filter: none;
	gap: 0;
	padding: 4px 6px;
}
.eimag-cleancard .eimag-reel-btn svg {
	width: 22px;
	height: 22px;
	padding: 0;
	border-radius: 0;
	background: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.eimag-cleancard .eimag-reel-count { display: none; }
