/* PakStudyHub Library Subscription */
.psh-sub,
.psh-paywall,
.psh-badge,
.psh-download,
.psh-lib {
	/* Settings colour → Elementor primary colour → green. */
	--psh-accent: var(--psh-site-accent, var(--e-global-color-primary, #0e7a4b));
	--psh-accent-hover: #0b6340;
	--psh-accent-soft: #e8f5ee;
	--psh-ink: #16211c;
	--psh-muted: #5b6862;
	--psh-line: #dfe6e2;
	--psh-card: #ffffff;
	--psh-bg-soft: #f6f8f7;
	--psh-danger: #b42318;
	--psh-danger-soft: #fdecea;
	--psh-info: #1e5a9c;
	--psh-info-soft: #eaf2fb;
	--psh-warn: #8a5a00;
	--psh-warn-soft: #fff6e0;
	--psh-jazz: #b0122a;
	--psh-radius: 14px;
	box-sizing: border-box;
	color: var(--psh-ink);
	font-family: inherit;
}

/* Derive hover / soft shades from whatever the accent colour is. */
@supports (color: color-mix(in srgb, red 50%, white)) {
	.psh-sub,
	.psh-paywall,
	.psh-badge,
	.psh-download,
	.psh-lib {
		--psh-accent-hover: color-mix(in srgb, var(--psh-accent) 82%, #000);
		--psh-accent-soft: color-mix(in srgb, var(--psh-accent) 10%, #fff);
		--psh-accent-line: color-mix(in srgb, var(--psh-accent) 28%, #fff);
	}
}

.psh-sub *,
.psh-sub *::before,
.psh-sub *::after,
.psh-paywall * {
	box-sizing: border-box;
}

.psh-sub {
	max-width: 640px;
	margin: 0 auto;
	display: grid;
	gap: 16px;
	line-height: 1.55;
}

/* Cards */
.psh-card {
	background: var(--psh-card);
	border: 1px solid var(--psh-line);
	border-radius: var(--psh-radius);
	padding: 22px;
}
.psh-card__title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--psh-ink);
}
.psh-muted { color: var(--psh-muted); margin: 0 0 14px; }
.psh-small { font-size: 0.875rem; }
.psh-center { text-align: center; margin: 14px 0 0; }
.psh-eyebrow {
	margin: 0 0 4px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--psh-accent);
}

/* Notices */
.psh-notice {
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 0.95rem;
	border: 1px solid transparent;
}
.psh-notice--success { background: var(--psh-accent-soft); color: var(--psh-accent-hover); border-color: var(--psh-accent-line, #bfe3cf); }
.psh-notice--error { background: var(--psh-danger-soft); color: var(--psh-danger); border-color: #f6c7c2; }
.psh-notice--info { background: var(--psh-info-soft); color: var(--psh-info); border-color: #c7dcf3; }

/* Status */
.psh-status__row { display: flex; align-items: center; gap: 10px; }
.psh-status__row .psh-card__title { margin: 0; }
.psh-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--psh-muted); flex: none; }
.psh-status--active .psh-dot,
.psh-status--trial .psh-dot { background: var(--psh-accent); box-shadow: 0 0 0 4px var(--psh-accent-soft); }
.psh-status--expired .psh-dot { background: var(--psh-danger); box-shadow: 0 0 0 4px var(--psh-danger-soft); }
.psh-status__big { font-size: 2rem; font-weight: 800; margin: 10px 0 2px; line-height: 1.1; }
.psh-pending {
	margin: 14px 0 0;
	background: var(--psh-warn-soft);
	color: var(--psh-warn);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 0.92rem;
}

/* Plan */
.psh-plan { background: linear-gradient(180deg, var(--psh-accent-soft), var(--psh-card) 70%); border-color: var(--psh-accent-line, #c9e6d6); }
.psh-plan__price { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 14px; }
.psh-plan__amount { font-size: 2.3rem; font-weight: 800; line-height: 1; }
.psh-plan__per { color: var(--psh-muted); font-weight: 600; }
.psh-plan__list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.psh-plan__list li { position: relative; padding-left: 28px; }
.psh-plan__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--psh-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8.1 13.6 4.5 10l-1.4 1.4 5 5 9-9-1.4-1.4z'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Forms */
.psh-form { display: grid; gap: 12px; margin: 0; }
.psh-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.psh-label { display: block; font-weight: 600; font-size: 0.92rem; margin: 0 0 6px; padding: 0; }
.psh-input,
.psh-file {
	width: 100%;
	max-width: 100%;
	font: inherit;
	font-size: 16px; /* Prevents iOS zoom. */
	color: var(--psh-ink);
	background: #fff;
	border: 1px solid #c9d3ce;
	border-radius: 10px;
	padding: 11px 12px;
	min-height: 46px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.psh-file { padding: 9px 10px; background: var(--psh-bg-soft); }
.psh-input:focus,
.psh-file:focus {
	outline: none;
	border-color: var(--psh-accent);
	box-shadow: 0 0 0 3px var(--psh-accent-soft);
}
.psh-input--code { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-weight: 700; }
.psh-hint { margin: 4px 0 0; font-size: 0.82rem; color: var(--psh-muted); }
.psh-grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
	.psh-grid2 { grid-template-columns: 1fr 1fr; }
}

.psh-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.psh-method { position: relative; margin: 0; cursor: pointer; }
.psh-method input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.psh-method span {
	display: inline-block;
	padding: 9px 14px;
	border: 1px solid #c9d3ce;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.92rem;
	background: #fff;
}
.psh-method input:checked + span { border-color: var(--psh-accent); background: var(--psh-accent-soft); color: var(--psh-accent-hover); }
.psh-method input:focus-visible + span { box-shadow: 0 0 0 3px var(--psh-accent-soft); }

/* Buttons */
.psh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 46px;
	padding: 11px 20px;
	border-radius: 10px;
	border: 1px solid transparent;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
}
.psh-btn:active { transform: translateY(1px); }
.psh-btn--block { width: 100%; }
.psh-btn--primary { background: var(--psh-accent); color: #fff !important; }
.psh-btn--primary:hover,
.psh-btn--primary:focus { background: var(--psh-accent-hover); color: #fff !important; }
.psh-btn--jazz { background: var(--psh-jazz); color: #fff !important; }
.psh-btn--jazz:hover,
.psh-btn--jazz:focus { background: #8f0e22; color: #fff !important; }
.psh-btn--ghost { background: #fff; border-color: var(--psh-accent); color: var(--psh-accent) !important; }
.psh-btn[disabled] { opacity: 0.6; cursor: wait; }

/* Payment options */
.psh-option { border: 1px solid var(--psh-line); border-radius: 12px; padding: 16px; background: var(--psh-bg-soft); }
.psh-option__title { font-weight: 700; margin: 0 0 4px; }
.psh-option .psh-form { margin-top: 12px; }
.psh-or { display: flex; align-items: center; gap: 10px; color: var(--psh-muted); font-size: 0.85rem; margin: 12px 0; }
.psh-or::before,
.psh-or::after { content: ""; flex: 1; height: 1px; background: var(--psh-line); }
.psh-steps { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 4px; font-size: 0.93rem; }
.psh-accounts { display: grid; gap: 8px; margin-bottom: 4px; }
.psh-account {
	display: grid;
	gap: 2px;
	background: #fff;
	border: 1px dashed #b9c7c0;
	border-radius: 10px;
	padding: 10px 12px;
}
.psh-account__name { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--psh-muted); }
.psh-account__num { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.psh-account__title { font-size: 0.92rem; overflow-wrap: anywhere; }
.psh-copy {
	font: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--psh-line);
	background: var(--psh-bg-soft);
	color: var(--psh-ink);
	cursor: pointer;
}
.psh-copy.is-done { background: var(--psh-accent-soft); color: var(--psh-accent-hover); border-color: var(--psh-accent-line, #bfe3cf); }

/* History */
.psh-table-wrap { overflow-x: auto; }
.psh-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 6px 0 0; }
.psh-table th,
.psh-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--psh-line); vertical-align: top; }
.psh-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--psh-muted); }
.psh-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--psh-bg-soft); }
.psh-pill--approved { background: var(--psh-accent-soft); color: var(--psh-accent-hover); }
.psh-pill--pending { background: var(--psh-warn-soft); color: var(--psh-warn); }
.psh-pill--rejected,
.psh-pill--failed { background: var(--psh-danger-soft); color: var(--psh-danger); }

/* Paywall (locked pages / [psh_locked]) */
.psh-paywall {
	text-align: center;
	border: 1px solid var(--psh-line);
	border-radius: var(--psh-radius);
	background: linear-gradient(180deg, var(--psh-accent-soft), #fff);
	padding: 28px 20px;
	margin: 16px 0;
}
.psh-paywall__icon { font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.psh-paywall__title { font-weight: 800; font-size: 1.2rem; margin: 0 0 4px; }
.psh-paywall__text { color: var(--psh-muted); margin: 0 0 16px; }
.psh-paywall__login { margin: 12px 0 0; font-size: 0.9rem; }

/* Header badge [psh_status] */
.psh-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none !important;
	background: var(--psh-accent);
	color: #fff !important;
}
.psh-badge--active,
.psh-badge--trial { background: var(--psh-accent-soft); color: var(--psh-accent-hover) !important; }
.psh-badge--expired { background: var(--psh-danger-soft); color: var(--psh-danger) !important; }

.psh-download.is-locked { opacity: 0.92; }

@media (max-width: 480px) {
	.psh-card { padding: 18px 16px; }
	.psh-plan__amount { font-size: 2rem; }
}

/* ================================================================== */
/* Library [psh_library]                                               */
/* ================================================================== */
.psh-lib {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* Never wider than the screen. */
	gap: 16px;
	line-height: 1.5;
	color: var(--psh-ink);
	max-width: 100%;
}
.psh-lib > * { min-width: 0; }
.psh-lib *,
.psh-lib *::before,
.psh-lib *::after { box-sizing: border-box; }

.psh-btn--sm { min-height: 38px; padding: 8px 14px; font-size: 0.9rem; border-radius: 9px; }
.psh-btn--lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.psh-lock { font-size: 0.85em; }

.psh-lib__banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--psh-accent-soft);
	border: 1px solid var(--psh-accent-line, #c9e6d6);
	font-size: 0.95rem;
}
.psh-lib__banner.is-member a { font-weight: 700; color: var(--psh-accent-hover); }

.psh-lib__search { display: flex; gap: 8px; margin: 0; }
.psh-lib__search input[type="search"] {
	flex: 1;
	min-width: 0;
	font: inherit;
	font-size: 16px;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #c9d3ce;
	border-radius: 10px;
	background: #fff;
	color: var(--psh-ink);
}
.psh-lib__search input[type="search"]:focus { outline: none; border-color: var(--psh-accent); box-shadow: 0 0 0 3px var(--psh-accent-soft); }

.psh-lib__chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.psh-chip {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--psh-line);
	background: #fff;
	color: var(--psh-ink) !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
}
.psh-chip span { font-size: 0.75rem; font-weight: 700; color: var(--psh-muted); background: var(--psh-bg-soft); border-radius: 999px; padding: 1px 7px; }
.psh-chip:hover { border-color: var(--psh-accent); }
.psh-chip.is-active { background: var(--psh-accent); border-color: var(--psh-accent); color: #fff !important; }
.psh-chip.is-active span { background: rgba(255, 255, 255, 0.22); color: #fff; }

.psh-lib__count { margin: 0; color: var(--psh-muted); font-size: 0.92rem; }
.psh-lib__count a { color: var(--psh-accent); font-weight: 600; }

.psh-lib__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}
@media (min-width: 700px) { .psh-lib__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1024px) { .psh-lib__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.psh-book {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--psh-line);
	border-radius: var(--psh-radius);
	overflow: hidden;
	transition: box-shadow 0.18s, transform 0.18s;
}
.psh-book:hover { box-shadow: 0 10px 24px rgba(20, 40, 30, 0.10); transform: translateY(-2px); }
.psh-book__cover { display: block; aspect-ratio: 3 / 4; background: var(--psh-bg-soft); overflow: hidden; text-decoration: none !important; }
.psh-book__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Generated cover */
.psh-book__gen {
	--h: 152;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	height: 100%;
	padding: 14px 12px;
	color: #fff;
	background:
		radial-gradient(120% 60% at 100% 0%, hsla(var(--h), 70%, 70%, 0.35), transparent 60%),
		linear-gradient(160deg, hsl(var(--h), 55%, 34%), hsl(calc(var(--h) + 18), 60%, 22%));
	position: relative;
}
.psh-book__gen::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 0;
	bottom: 0;
	width: 3px;
	background: rgba(255, 255, 255, 0.18);
}
.psh-book__gen-cat { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; padding-left: 8px; }
.psh-book__gen-title { font-size: clamp(0.95rem, 2.6vw, 1.15rem); font-weight: 800; line-height: 1.2; padding-left: 8px; overflow-wrap: anywhere; }
.psh-book__gen-brand { font-size: 0.68rem; opacity: 0.7; padding-left: 8px; }

.psh-book__body { display: flex; flex-direction: column; gap: 4px; padding: 12px; flex: 1; }
.psh-book__cat {
	align-self: flex-start;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--psh-accent) !important;
	text-decoration: none !important;
}
.psh-book__title { margin: 0; font-size: 0.98rem; line-height: 1.3; font-weight: 700; }
.psh-book__title a { color: var(--psh-ink) !important; text-decoration: none !important; }
.psh-book__title a:hover { color: var(--psh-accent) !important; }
.psh-book__meta { margin: 0; font-size: 0.82rem; color: var(--psh-muted); }
.psh-book__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; align-items: center; }
.psh-book__actions .psh-btn { flex: 1 1 auto; }
.psh-book__soon { font-size: 0.85rem; color: var(--psh-muted); }
.psh-btn.is-locked { background: var(--psh-ink); }
.psh-btn.is-locked:hover { background: #000; }
.psh-btn--ghost:hover { background: var(--psh-accent-soft); }
.psh-free-tag { font-size: 0.72rem; font-weight: 800; color: var(--psh-accent-hover); background: var(--psh-accent-soft); padding: 3px 8px; border-radius: 999px; }

@media (max-width: 420px) {
	.psh-book__body { padding: 10px; }
	.psh-book__actions .psh-btn { width: 100%; }
}

.psh-lib__pages { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.psh-lib__pages .page-numbers {
	min-width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 10px;
	border-radius: 10px;
	border: 1px solid var(--psh-line);
	background: #fff;
	color: var(--psh-ink) !important;
	text-decoration: none !important;
	font-weight: 600;
}
.psh-lib__pages .page-numbers.current { background: var(--psh-accent); border-color: var(--psh-accent); color: #fff !important; }
.psh-lib__pages .page-numbers.dots { border: 0; background: none; }

.psh-lib__empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--psh-line); border-radius: var(--psh-radius); color: var(--psh-muted); }
.psh-lib__empty span { font-size: 2rem; }

/* Single book page */
.psh-single { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; align-items: start; }
@media (min-width: 640px) { .psh-single { grid-template-columns: 220px 1fr; gap: 28px; } }
.psh-single__cover { aspect-ratio: 3 / 4; border-radius: var(--psh-radius); overflow: hidden; box-shadow: 0 12px 28px rgba(20, 40, 30, 0.16); max-width: 240px; }
.psh-single__info { display: grid; gap: 10px; align-content: start; }
.psh-single__cats { display: flex; flex-wrap: wrap; gap: 10px; }
.psh-single__actions { padding-top: 4px; }
.psh-single__actions .psh-btn { flex: 0 1 auto; }
.psh-single__note { margin: 0; font-size: 0.92rem; color: var(--psh-muted); }
.psh-single__note a,
.psh-single__back a { color: var(--psh-accent) !important; font-weight: 600; }
.psh-single__back { margin: 4px 0 0; font-size: 0.9rem; }

/* ================================================================== */
/* Library v2: hero, emoji chips, animations                           */
/* ================================================================== */

/* Hero — same pattern as the PakStudyHub homepage sections: emoji eyebrow, big heading, tagline. */
.psh-lib__hero {
	position: relative;
	overflow: hidden;
	text-align: center;
	padding: 40px 20px 30px;
	border-radius: 22px;
	border: 1px solid var(--psh-accent-line, #c9e6d6);
	background:
		radial-gradient(60% 80% at 0% 0%, var(--psh-accent-soft), transparent 70%),
		radial-gradient(50% 70% at 100% 100%, var(--psh-accent-soft), transparent 70%),
		#fff;
}
.psh-lib__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--psh-accent-soft);
	color: var(--psh-accent-hover);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.psh-lib__title {
	margin: 0 auto 8px;
	max-width: 22ch;
	font-size: clamp(1.6rem, 4.6vw, 2.5rem);
	line-height: 1.15;
	font-weight: 800;
	color: var(--psh-ink);
}
.psh-lib__subtitle { margin: 0 auto 20px; max-width: 54ch; color: var(--psh-muted); font-size: 1rem; }
.psh-lib__hero .psh-lib__search { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }

.psh-lib__search { position: relative; }
.psh-lib__search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--psh-muted);
	pointer-events: none;
	display: flex;
}
.psh-lib__search input[type="search"] {
	padding-left: 44px !important;
	min-height: 52px !important;
	border-radius: 14px !important;
	box-shadow: 0 6px 18px rgba(20, 40, 30, 0.06);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.psh-lib__search .psh-btn { min-height: 52px; border-radius: 14px; padding: 0 22px; }

.psh-lib__stats {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 34px;
	margin-top: 22px;
	position: relative;
	z-index: 1;
}
.psh-stat { display: grid; justify-items: center; line-height: 1.15; }
.psh-stat b { font-size: 1.6rem; font-weight: 800; color: var(--psh-accent); font-variant-numeric: tabular-nums; }
.psh-stat span { font-size: 0.82rem; color: var(--psh-muted); font-weight: 600; }

/* Floating emojis in the hero */
.psh-lib__float {
	position: absolute;
	font-size: 2rem;
	opacity: 0.16;
	pointer-events: none;
	user-select: none;
}
.psh-lib__float.f1 { left: 6%; top: 18%; }
.psh-lib__float.f2 { right: 7%; top: 14%; font-size: 2.4rem; }
.psh-lib__float.f3 { left: 11%; bottom: 14%; font-size: 1.6rem; }
.psh-lib__float.f4 { right: 12%; bottom: 18%; font-size: 1.8rem; }
@media (max-width: 600px) {
	.psh-lib__hero { padding: 30px 16px 24px; border-radius: 18px; }
	.psh-lib__float.f1, .psh-lib__float.f3 { display: none; }
	.psh-lib__search .psh-btn { padding: 0 16px; }
}

/* Emoji chips */
.psh-lib__filters { display: grid; gap: 8px; min-width: 0; }
.psh-chip em { font-style: normal; font-size: 1rem; line-height: 1; }
.psh-chip { transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s; }
.psh-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 40, 30, 0.08); }
.psh-chip.is-active { box-shadow: 0 6px 16px color-mix(in srgb, var(--psh-accent) 30%, transparent); }
.psh-lib__chips--sub .psh-chip { padding: 5px 12px; font-size: 0.84rem; background: var(--psh-bg-soft); }
.psh-lib__chips--sub .psh-chip.is-active { background: var(--psh-accent-soft); border-color: var(--psh-accent); color: var(--psh-accent-hover) !important; box-shadow: none; }
.psh-lib__chips--sub .psh-chip.is-active span { background: #fff; color: var(--psh-accent-hover); }

/* Card hover: lift, cover zoom, light sweep */
.psh-book { will-change: transform; }
.psh-book__cover { position: relative; }
.psh-book__img,
.psh-book__gen { transition: transform 0.5s cubic-bezier(.2, .7, .2, 1); }
.psh-book:hover .psh-book__img,
.psh-book:hover .psh-book__gen { transform: scale(1.05); }
.psh-book__cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.38) 48%, transparent 66%);
	transform: translateX(-120%);
	pointer-events: none;
}
.psh-book:hover .psh-book__cover::after { transform: translateX(120%); transition: transform 0.85s ease; }
.psh-book:hover { box-shadow: 0 16px 34px rgba(20, 40, 30, 0.14); transform: translateY(-4px); }
.psh-btn.is-locked:hover .psh-lock { display: inline-block; animation: psh-wiggle 0.5s ease; }

/* Reveal on scroll (only when JS is running and motion is allowed) */
.psh-lib.psh-anim .psh-book { opacity: 0; transform: translateY(18px) scale(0.98); }
.psh-lib.psh-anim .psh-book.is-in {
	opacity: 1;
	transform: none;
	transition: opacity 0.55s ease calc(var(--i, 0) * 55ms), transform 0.55s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 55ms), box-shadow 0.18s;
}
.psh-lib.psh-anim .psh-book.is-in:hover { transform: translateY(-4px); transition: transform 0.2s, box-shadow 0.2s; }
.psh-lib.psh-anim .psh-lib__hero > * { animation: psh-rise 0.7s cubic-bezier(.2, .7, .2, 1) both; }
.psh-lib.psh-anim .psh-lib__hero > :nth-child(6) { animation-delay: 0.06s; }
.psh-lib.psh-anim .psh-lib__hero > :nth-child(7) { animation-delay: 0.12s; }
.psh-lib.psh-anim .psh-lib__hero > :nth-child(8) { animation-delay: 0.18s; }
.psh-lib.psh-anim .psh-lib__hero > :nth-child(9) { animation-delay: 0.24s; }
.psh-lib.psh-anim .psh-lib__float { animation: psh-float 7s ease-in-out infinite; }
.psh-lib.psh-anim .psh-lib__float.f2 { animation-duration: 8.5s; animation-delay: -2s; }
.psh-lib.psh-anim .psh-lib__float.f3 { animation-duration: 6.5s; animation-delay: -4s; }
.psh-lib.psh-anim .psh-lib__float.f4 { animation-duration: 9s; animation-delay: -1s; }
.psh-lib.psh-anim .psh-lib__banner:not(.is-member) .psh-btn { animation: psh-pulse 2.6s ease-in-out infinite; }
.psh-lib__results.is-fresh { animation: psh-fade 0.35s ease both; }

/* Loading skeleton while switching category */
.psh-skel {
	border: 1px solid var(--psh-line);
	border-radius: var(--psh-radius);
	overflow: hidden;
	background: #fff;
	padding-bottom: 12px;
}
.psh-skel__cover { aspect-ratio: 3 / 4; }
.psh-skel__line { height: 12px; margin: 12px 12px 0; border-radius: 6px; }
.psh-skel__line.short { width: 55%; }
.psh-skel__btn { height: 34px; margin: 14px 12px 0; border-radius: 9px; }
.psh-skel__cover,
.psh-skel__line,
.psh-skel__btn {
	background: linear-gradient(90deg, #eef2f0 25%, #f7f9f8 50%, #eef2f0 75%);
	background-size: 200% 100%;
	animation: psh-shimmer 1.2s linear infinite;
}
.psh-lib.is-loading .psh-lib__chips { pointer-events: none; opacity: 0.75; }

@keyframes psh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes psh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes psh-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes psh-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes psh-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@keyframes psh-pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--psh-accent) 45%, transparent); }
	60% { box-shadow: 0 0 0 10px transparent; }
}

@media (prefers-reduced-motion: reduce) {
	.psh-lib *,
	.psh-lib *::before,
	.psh-lib *::after { animation: none !important; transition: none !important; }
	.psh-book:hover { transform: none; }
}
@media (max-width: 600px) {
	.psh-lib__stats { gap: 8px 22px; }
	.psh-stat b { font-size: 1.35rem; }
	.psh-stat span { font-size: 0.75rem; }
}

/* ================================================================== */
/* On-site account: tabs, password field                               */
/* ================================================================== */
.psh-auth { scroll-margin-top: 90px; }
.psh-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	margin: -4px 0 18px;
	border-radius: 12px;
	background: var(--psh-bg-soft);
	border: 1px solid var(--psh-line);
}
.psh-tab {
	text-align: center;
	padding: 10px 8px;
	border-radius: 9px;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--psh-muted) !important;
	text-decoration: none !important;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.psh-tab:hover { color: var(--psh-ink) !important; }
.psh-tab.is-active { background: #fff; color: var(--psh-ink) !important; box-shadow: 0 2px 8px rgba(20, 40, 30, 0.08); }
.psh-pass { position: relative; }
.psh-pass .psh-input { padding-right: 70px; }
.psh-pass__toggle {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	color: var(--psh-accent);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	padding: 6px 10px;
	cursor: pointer;
	border-radius: 8px;
}
.psh-pass__toggle:hover { background: var(--psh-accent-soft); }
.psh-forgot { margin: -4px 0 0; text-align: right; font-size: 0.88rem; }
.psh-forgot a,
.psh-auth .psh-center a,
.psh-whoami a { color: var(--psh-accent) !important; font-weight: 600; }
.psh-whoami { margin: 12px 0 0; font-size: 0.88rem; color: var(--psh-muted); overflow-wrap: anywhere; }
.psh-lib__banner-cta { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.psh-lib__signin { font-weight: 700; font-size: 0.92rem; color: var(--psh-accent-hover) !important; }
.psh-sub > .psh-card,
.psh-sub > .psh-notice { animation: psh-rise 0.5s cubic-bezier(.2, .7, .2, 1) both; }
.psh-sub > :nth-child(2) { animation-delay: 0.05s; }
.psh-sub > :nth-child(3) { animation-delay: 0.1s; }
.psh-sub > :nth-child(4) { animation-delay: 0.15s; }
@media (prefers-reduced-motion: reduce) {
	.psh-sub > * { animation: none !important; }
}

/* ================================================================== */
/* Upload notes page + credits                                         */
/* ================================================================== */
.psh-up__hero { text-align: center; background: linear-gradient(180deg, var(--psh-accent-soft), #fff 75%); border-color: var(--psh-accent-line, #c9e6d6); }
.psh-up__title { margin: 4px 0 16px; font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.2; font-weight: 800; }
.psh-up__steps { display: grid; gap: 10px; text-align: left; }
@media (min-width: 620px) { .psh-up__steps { grid-template-columns: repeat(3, 1fr); } }
.psh-up__steps > div { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--psh-line); border-radius: 12px; padding: 12px; font-size: 0.92rem; }
.psh-up__steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--psh-accent); color: #fff; font-size: 0.9rem; }
.psh-up__stats { display: flex; justify-content: center; gap: 12px 40px; flex-wrap: wrap; padding: 6px 0; }
.psh-up__stats .psh-stat b { font-size: 1.8rem; }
.psh-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.psh-center-card { text-align: center; }

.psh-drop {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 4px;
	padding: 26px 16px;
	border: 2px dashed var(--psh-accent-line, #b9c7c0);
	border-radius: 14px;
	background: var(--psh-bg-soft);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, transform 0.15s;
}
.psh-drop:hover,
.psh-drop.is-over { border-color: var(--psh-accent); background: var(--psh-accent-soft); }
.psh-drop.is-over { transform: scale(1.01); }
.psh-drop.has-file { border-style: solid; border-color: var(--psh-accent); }
.psh-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.psh-drop__icon { font-size: 2rem; line-height: 1; }
.psh-drop__text strong { color: var(--psh-accent); }
.psh-drop__hint { font-size: 0.82rem; color: var(--psh-muted); }
.psh-drop__name { font-weight: 700; font-size: 0.92rem; overflow-wrap: anywhere; }
.psh-drop__name:empty { display: none; }
textarea.psh-input { min-height: 90px; resize: vertical; }
select.psh-input { appearance: auto; }
.psh-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; cursor: pointer; }
.psh-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--psh-accent); flex: none; }
.psh-progress { height: 10px; border-radius: 999px; background: var(--psh-line); overflow: hidden; }
.psh-progress__bar { height: 100%; width: 0; background: var(--psh-accent); border-radius: 999px; transition: width 0.2s; }
.psh-up__status.is-bad { color: var(--psh-danger); font-weight: 600; }
.psh-up__status:empty { display: none; }

.psh-btn.is-credit { background: #b45309; }
.psh-btn.is-credit:hover { background: #92400e; }
.psh-lib__banner.is-credit { background: #fff7e6; border-color: #f5d9a8; }
.psh-credits-line { margin: 10px 0 0; font-size: 0.9rem; }
.psh-credits-line a { color: var(--psh-accent) !important; font-weight: 600; }

/* ================================================================== */
/* Subscription page v2 — hero, features, tabs, FAQ, mobile polish     */
/* ================================================================== */
.psh-hero {
	position: relative;
	overflow: hidden;
	text-align: center;
	padding: 30px 20px 26px;
	border-radius: 22px;
	border: 1px solid var(--psh-accent-line, #c9e6d6);
	background:
		radial-gradient(70% 90% at 0% 0%, var(--psh-accent-soft), transparent 70%),
		radial-gradient(60% 80% at 100% 100%, var(--psh-accent-soft), transparent 70%),
		#fff;
}
.psh-hero__title { margin: 0 auto 8px; max-width: 18ch; font-size: clamp(1.55rem, 6vw, 2.3rem); line-height: 1.15; font-weight: 800; color: var(--psh-ink); }
.psh-hero__sub { margin: 0 auto 16px; max-width: 46ch; color: var(--psh-muted); font-size: 0.98rem; }
.psh-hero__price { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--psh-line); box-shadow: 0 8px 22px rgba(20, 40, 30, 0.07); }
.psh-hero__amount { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--psh-accent); }
.psh-hero__per { color: var(--psh-muted); font-weight: 600; font-size: 0.95rem; }
.psh-badges { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 0; padding: 0; }
.psh-badges li { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--psh-line); font-size: 0.84rem; font-weight: 600; white-space: nowrap; }

/* Plan card with feature grid */
.psh-plan__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.psh-plan__tag { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--psh-accent); color: #fff; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.02em; }
.psh-feats { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.psh-feats li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--psh-line); min-width: 0; }
.psh-feats__icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--psh-accent-soft); font-size: 1.05rem; }
.psh-feats strong { display: block; font-size: 0.92rem; line-height: 1.25; }
.psh-feats em { display: block; font-style: normal; font-size: 0.8rem; color: var(--psh-muted); line-height: 1.35; margin-top: 2px; }
.psh-plan__note { margin: 0; }

/* Status card */
.psh-meter { height: 8px; border-radius: 999px; background: var(--psh-line); overflow: hidden; margin: 10px 0 8px; }
.psh-meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--psh-accent), color-mix(in srgb, var(--psh-accent) 70%, #fff)); }
.psh-status--trial .psh-meter span { background: linear-gradient(90deg, #d97706, #f59e0b); }
.psh-status__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--psh-line); }
.psh-status__foot .psh-whoami { margin: 0; font-size: 0.82rem; }
.psh-chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #fff7e6; border: 1px solid #f5d9a8; color: #92400e !important; font-size: 0.84rem; font-weight: 700; text-decoration: none !important; }

/* Payment tabs */
.psh-paytabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 14px; border-radius: 12px; background: var(--psh-bg-soft); border: 1px solid var(--psh-line); }
.psh-paytab { font: inherit; font-weight: 700; font-size: 0.9rem; padding: 10px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--psh-muted); cursor: pointer; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.psh-paytab.is-active { background: #fff; color: var(--psh-ink); box-shadow: 0 2px 8px rgba(20, 40, 30, 0.08); }
.psh-tabs-on .psh-paypanel:not(.is-active) { display: none; }
.psh-paypanel.is-active { animation: psh-fade 0.25s ease both; }

.psh-stepchips { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 12px; padding: 0; }
.psh-stepchips li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--psh-line); font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.psh-stepchips b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--psh-accent); color: #fff; font-size: 0.78rem; }

.psh-accounts { grid-template-columns: 1fr; }
@media (min-width: 560px) { .psh-accounts { grid-template-columns: 1fr 1fr; } .psh-account--bank { grid-column: 1 / -1; } }
.psh-account { border-style: solid; border-color: var(--psh-line); cursor: pointer; position: relative; transition: border-color 0.2s, box-shadow 0.2s; }
.psh-account.is-picked { border-color: var(--brand, var(--psh-accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, var(--psh-accent)) 16%, transparent); }
.psh-account.is-picked::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--brand, var(--psh-accent)); color: #fff; font-size: 0.72rem; font-weight: 800; }
.psh-account__name { display: flex; align-items: center; gap: 6px; }
.psh-account__name i { width: 10px; height: 10px; border-radius: 3px; background: var(--brand, var(--psh-accent)); }

/* FAQ */
.psh-faq__item { border-top: 1px solid var(--psh-line); }
.psh-faq__item:first-of-type { border-top: 0; }
.psh-faq__item summary { list-style: none; cursor: pointer; padding: 13px 28px 13px 0; font-weight: 700; font-size: 0.95rem; position: relative; }
.psh-faq__item summary::-webkit-details-marker { display: none; }
.psh-faq__item summary::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 500; color: var(--psh-accent); transition: transform 0.2s; }
.psh-faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.psh-faq__a { padding: 0 0 14px; color: var(--psh-muted); font-size: 0.92rem; }
.psh-faq__a a { color: var(--psh-accent) !important; font-weight: 600; }
.psh-trustline { text-align: center; font-size: 0.82rem; color: var(--psh-muted); margin: 4px 0 0; }
.psh-trustline a { color: var(--psh-accent) !important; }

.psh-card__title { font-weight: 800; letter-spacing: -0.01em; }

/* Mobile polish */
@media (max-width: 480px) {
	.psh-sub { gap: 12px; }
	.psh-card { padding: 18px 16px; border-radius: 16px; }
	.psh-card__title { font-size: 1.08rem; }
	.psh-muted { font-size: 0.9rem; }
	.psh-hero { padding: 24px 14px 20px; border-radius: 18px; }
	.psh-hero__sub { font-size: 0.92rem; }
	.psh-feats { gap: 8px; }
	.psh-feats li { flex-direction: column; gap: 6px; padding: 10px; }
	.psh-status__big { font-size: 1.7rem; }
	.psh-option { padding: 14px 12px; }
	.psh-tab, .psh-paytab { font-size: 0.86rem; }
	.psh-table th, .psh-table td { padding: 8px 6px; font-size: 0.84rem; }
	.psh-account__num { font-size: 1.1rem; }
}

/* ================================================================== */
/* Online reader                                                       */
/* ================================================================== */
.psh-reader {
	--psh-accent: var(--psh-site-accent, var(--e-global-color-primary, #0e7a4b));
	--psh-line: #dfe6e2;
	--psh-muted: #5b6862;
	--psh-ink: #16211c;
	position: relative;
	margin: 22px 0;
	border: 1px solid var(--psh-line);
	border-radius: 18px;
	background: #eef1f0;
	overflow: clip;
	scroll-margin-top: 80px;
	color: var(--psh-ink);
	font-family: inherit;
}
.psh-reader *, .psh-reader *::before, .psh-reader *::after { box-sizing: border-box; }
.psh-reader__bar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--psh-line);
}
.admin-bar .psh-reader__bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .psh-reader__bar { top: 0; } }
.psh-reader__title { min-width: 0; font-weight: 800; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psh-reader__tools { display: flex; align-items: center; gap: 6px; flex: none; }
.psh-reader__count { font-size: 0.82rem; font-weight: 700; color: var(--psh-muted); min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.psh-rbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--psh-line);
	border-radius: 10px;
	background: #fff;
	color: var(--psh-ink) !important;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
}
.psh-rbtn:hover { border-color: var(--psh-accent); }
.psh-rbtn--dl { background: var(--psh-accent); border-color: var(--psh-accent); color: #fff !important; font-size: 0.85rem; }
.psh-rbtn--dl.is-locked { background: var(--psh-ink); border-color: var(--psh-ink); }
.psh-rbtn--dl.is-credit { background: #b45309; border-color: #b45309; }
.psh-reader__note { margin: 0; padding: 8px 14px; font-size: 0.82rem; color: var(--psh-muted); background: #fff; border-bottom: 1px solid var(--psh-line); text-align: center; }
.psh-reader__note a { color: var(--psh-accent) !important; font-weight: 700; }

.psh-reader__pages {
	--psh-zoom: 1;
	display: grid;
	justify-items: center;
	gap: 14px;
	padding: 16px 12px 24px;
	max-height: 82vh;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.psh-reader.is-max,
.psh-reader:fullscreen { position: fixed; inset: 0; z-index: 99999; margin: 0; border-radius: 0; display: flex; flex-direction: column; }
.psh-reader.is-max .psh-reader__pages,
.psh-reader:fullscreen .psh-reader__pages { max-height: none; flex: 1; }
.psh-page {
	position: relative;
	width: min(100%, calc(820px * var(--psh-zoom)));
	max-width: calc(100% * var(--psh-zoom));
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(20, 40, 30, 0.12);
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}
.psh-page canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.psh-page:not(.is-drawn)::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #f3f5f4 25%, #fafbfb 50%, #f3f5f4 75%);
	background-size: 200% 100%;
	animation: psh-shimmer 1.2s linear infinite;
}
.psh-page__num { position: absolute; bottom: 6px; right: 8px; z-index: 1; font-size: 0.7rem; color: var(--psh-muted); background: rgba(255, 255, 255, 0.85); padding: 1px 6px; border-radius: 6px; }
.psh-reader__frame { width: 100%; height: 78vh; border: 0; border-radius: 6px; background: #fff; }
.psh-reader__loading,
.psh-reader__msg { display: grid; justify-items: center; gap: 10px; padding: 60px 16px; color: var(--psh-muted); text-align: center; }
.psh-reader__msg span { font-size: 2rem; }
.psh-reader__msg p { margin: 0; max-width: 40ch; }
.psh-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--psh-line); border-top-color: var(--psh-accent); animation: psh-rot 0.8s linear infinite; }
@keyframes psh-rot { to { transform: rotate(360deg); } }

/* Ads */
.psh-ad { position: relative; display: grid; justify-items: center; gap: 4px; width: 100%; max-width: 820px; margin: 0 auto; padding: 10px; text-align: center; overflow: hidden; }
.psh-ad--top { background: #fff; border-bottom: 1px solid var(--psh-line); max-width: none; }
.psh-ad--between { background: #fff; border: 1px dashed #cfd8d3; border-radius: 10px; min-height: 90px; }
.psh-ad__label { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8a958f; }
.psh-ad--sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	max-width: none;
	padding: 6px 36px 6px 6px;
	background: #fff;
	border-top: 1px solid var(--psh-line);
	box-shadow: 0 -6px 18px rgba(20, 40, 30, 0.12);
	display: none;
}
@media (max-width: 782px) { .psh-ad--sticky { display: grid; } }
.psh-ad__close { position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--psh-line); background: #fff; font-size: 1rem; line-height: 1; cursor: pointer; color: var(--psh-ink); }

/* Locked (guest) reader */
.psh-reader--locked { min-height: 380px; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, #eef1f0, #f7f9f8); }
.psh-reader__ghost { position: absolute; inset: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; filter: blur(2px); opacity: 0.55; pointer-events: none; }
.psh-reader__ghost span { background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(20, 40, 30, 0.1); background-image: repeating-linear-gradient(180deg, transparent 0 14px, #e6ebe8 14px 17px); background-size: 80% 100%; background-position: 50% 24px; background-repeat: no-repeat; }
.psh-reader__gate { position: relative; z-index: 1; max-width: 420px; text-align: center; background: #fff; border: 1px solid var(--psh-line); border-radius: 18px; padding: 24px 20px; box-shadow: 0 18px 40px rgba(20, 40, 30, 0.14); }
.psh-reader__gate-icon { font-size: 2.2rem; line-height: 1; }
.psh-reader__gate-title { margin: 8px 0 4px; font-size: 1.2rem; font-weight: 800; }
.psh-reader__gate-text { margin: 0 0 16px; color: var(--psh-muted); font-size: 0.93rem; }

@media (max-width: 480px) {
	.psh-reader { margin: 16px -4px; border-radius: 14px; }
	.psh-reader__bar { padding: 8px; gap: 6px; }
	.psh-reader__title { display: none; }
	.psh-reader__tools { width: 100%; justify-content: space-between; }
	.psh-reader__pages { padding: 10px 6px 18px; gap: 10px; max-height: 78vh; }
	.psh-rbtn { height: 34px; min-width: 34px; padding: 0 8px; }
}
/* Pages stack in a column; each page keeps the PDF's shape (aspect-ratio set per document). */
.psh-reader__pages { display: flex; flex-direction: column; align-items: center; }
.psh-reader__pages > * { flex: none; }
.psh-page { height: auto; }
.psh-page canvas { height: auto; }
/* Scroll with the page (like Scribd); the toolbar stays stuck at the top. Full screen scrolls inside. */
.psh-reader__pages { max-height: none; overflow: visible; }
.psh-reader:fullscreen .psh-reader__pages,
.psh-reader.is-max .psh-reader__pages { overflow: auto; }
@media (max-width: 480px) { .psh-reader__pages { max-height: none; } }
/* End-of-preview gate inside the reader */
.psh-page--gate {
	display: grid;
	place-items: center;
	padding: 16px;
	background:
		repeating-linear-gradient(180deg, transparent 0 18px, #eef2f0 18px 21px) 50% 60px / 76% 70% no-repeat,
		#fff;
}
.psh-page--gate::before { display: none; }
.psh-page--gate::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: rgba(255, 255, 255, 0.35); }
.psh-page--gate .psh-reader__gate { z-index: 1; width: min(100%, 380px); }
.psh-page--gate .psh-row { flex-direction: column; }
.psh-page--gate .psh-btn { width: 100%; }
