/* 360ism Publish web reader */
:root {
	--pr-bg: #0b0b0c;
	--pr-panel: #161618;
	--pr-line: #2a2a2e;
	--pr-text: #f4f4f5;
	--pr-dim: #a1a1aa;
	--pr-accent: #ffffff;
	--pr-bar: 56px;
	--pr-foot: 40px;
}

* { box-sizing: border-box; }

html, body.pr-body {
	margin: 0;
	height: 100%;
	background: var(--pr-bg);
	color: var(--pr-text);
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}

a { color: inherit; }

.pr-app {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: var(--pr-bg);
	overflow: hidden;
}

/* ---- top bar ---- */
.pr-bar {
	flex: 0 0 var(--pr-bar);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 12px;
	padding-top: env(safe-area-inset-top);
	border-bottom: 1px solid var(--pr-line);
	background: var(--pr-bg);
	z-index: 5;
}
.pr-brand {
	flex: 0 0 auto;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	font-size: 13px;
}
.pr-brand span { font-weight: 400; color: var(--pr-dim); }
.pr-title {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.pr-title strong, .pr-title span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pr-title strong { font-size: 14px; }
.pr-title span { font-size: 12px; color: var(--pr-dim); text-transform: uppercase; letter-spacing: .06em; }
.pr-tools { display: flex; gap: 2px; flex: 0 0 auto; }

/* Title picker: looks like the title, opens the list of every title on the web reader. */
.pr-title-pick { gap: 1px; }
.pr-pick-wrap { position: relative; display: block; align-self: flex-start; min-width: 0; width: min(520px, 100%); }
.pr-pick {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	margin: 0;
	padding: 4px 28px 4px 8px;
	margin-left: -8px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--pr-text);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}
.pr-pick:hover, .pr-pick:focus-visible { border-color: #3f3f46; background: var(--pr-panel); outline: none; }
.pr-pick option, .pr-pick optgroup { background: #161618; color: var(--pr-text); }
.pr-pick-chev { position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--pr-dim); pointer-events: none; }
.pr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pr-icon {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--pr-text);
	font-size: 20px;
	cursor: pointer;
}
.pr-icon svg { width: 22px; height: 22px; fill: currentColor; }
.pr-icon:hover, .pr-icon[aria-expanded="true"] { background: var(--pr-panel); }
.pr-icon:focus-visible, .pr-btn:focus-visible, .pr-nav:focus-visible, .pr-thumb:focus-visible { outline: 2px solid var(--pr-accent); outline-offset: 2px; }
.pr-icon[hidden] { display: none; }
/* App only: offline download button (states set by the app). */
.pr-dl-btn { position: relative; }
.pr-dl-btn .pr-ico-done, .pr-dl-btn .pr-dl-pct { display: none; }
.pr-dl-btn[data-state="done"] .pr-ico-dl { display: none; }
.pr-dl-btn[data-state="done"] .pr-ico-done { display: block; }
.pr-dl-btn[data-state="progress"] .pr-ico-dl { opacity: .35; }
.pr-dl-btn[data-state="progress"] .pr-dl-pct { display: block; position: absolute; inset: 0; line-height: 40px; font-size: 11px; font-weight: 700; text-align: center; }
.pr-close-btn { flex: 0 0 auto; }
/* Layout button shows what a tap switches to. */
.pr-layout-btn .pr-ico-single { display: none; }
.pr-layout-btn.is-spread .pr-ico-single { display: block; }
.pr-layout-btn.is-spread .pr-ico-spread { display: none; }
.pr-app:not([data-state="ready"]) .pr-layout-btn { display: none; }

.pr-notice {
	padding: 8px 16px;
	background: #3b2f05;
	color: #fde68a;
	font-size: 13px;
	text-align: center;
}

/* ---- stage ---- */
.pr-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 0;
}
.pr-book-wrap {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
/* Keep the book between the arrows so it never sits on top of them. */
@media (min-width: 700px) {
	.pr-book-wrap { width: calc(100% - 128px); margin: 0 64px; }
}
.pr-book { margin: 0 auto; }
.pr-app[data-state="loading"] .pr-book,
.pr-app[data-state="error"] .pr-book-wrap,
.pr-app[data-state="locked"] .pr-book-wrap { visibility: hidden; }

.pr-page {
	background: #fff;
	overflow: hidden;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}
.pr-page .pr-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #f2f2f2;
	pointer-events: none;
}
.pr-page .pr-img:not([src]) {
	background: linear-gradient(110deg, #ececec 30%, #f7f7f7 50%, #ececec 70%) 0 0 / 300% 100%;
	animation: pr-shimmer 1.4s linear infinite;
}
@keyframes pr-shimmer { to { background-position: -150% 0; } }

.pr-wm {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: .14;
	background-repeat: repeat;
	mix-blend-mode: multiply;
}

/* ---- end card / members card ---- */
.pr-card { background: #111113; color: var(--pr-text); }
.pr-card-inner {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 6px;
	padding: 9% 9%;
}
.pr-card h2, .pr-locked h2 { margin: 0 0 4px; font-size: clamp(20px, 3.2vw, 30px); line-height: 1.15; }
.pr-kicker {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--pr-dim);
}
.pr-card-text { margin: 0 0 12px; color: #d4d4d8; }
.pr-card-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.pr-card-small { margin: 12px 0 0; font-size: 13px; color: var(--pr-dim); }
.pr-card-small a { color: var(--pr-text); }
.pr-app-link { margin-top: 14px; font-size: 13px; color: var(--pr-dim); }

.pr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 18px;
	border: 1px solid #52525b;
	border-radius: 999px;
	background: transparent;
	color: var(--pr-text);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.pr-btn:hover { border-color: #a1a1aa; }
.pr-btn-main { background: var(--pr-accent); border-color: var(--pr-accent); color: #0b0b0c; }
.pr-btn-main:hover { background: #e4e4e7; }

/* ---- prev / next ---- */
.pr-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .06);
	color: var(--pr-text);
	cursor: pointer;
	z-index: 5;
}
.pr-nav svg { width: 26px; height: 26px; }
.pr-nav:hover { background: rgba(255, 255, 255, .14); }
.pr-prev { left: 8px; }
.pr-next { right: 8px; }
.is-first .pr-prev, .is-last .pr-next { opacity: .25; pointer-events: none; }
.pr-app:not([data-state="ready"]) .pr-nav,
.pr-app:not([data-state="ready"]) [data-act="thumbs"],
.pr-app:not([data-state="ready"]) [data-act="zoom"],
.pr-app:not([data-state="ready"]) [data-act="fullscreen"] { display: none; }

/* ---- footer ---- */
.pr-foot {
	flex: 0 0 var(--pr-foot);
	display: flex;
	align-items: center;
	justify-content: center;
	padding-bottom: env(safe-area-inset-bottom);
	color: var(--pr-dim);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

/* ---- thumbnails ---- */
.pr-thumbs {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--pr-foot);
	display: flex;
	gap: 8px;
	padding: 12px;
	overflow-x: auto;
	background: rgba(11, 11, 12, .96);
	border-top: 1px solid var(--pr-line);
	z-index: 6;
	scrollbar-width: thin;
}
.pr-thumbs[hidden] { display: none; }
.pr-thumb {
	position: relative;
	flex: 0 0 auto;
	height: 120px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	background: #26262a;
	overflow: hidden;
	cursor: pointer;
}
.pr-thumb img { display: block; height: 100%; width: 100%; object-fit: cover; }
.pr-thumb.is-current { border-color: var(--pr-accent); }
.pr-thumb.is-locked { background: #1c1c1f; }
.pr-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: .6; }
.pr-thumb-n {
	position: absolute;
	right: 3px;
	bottom: 3px;
	padding: 0 5px;
	border-radius: 3px;
	background: rgba(0, 0, 0, .7);
	color: #fff;
	font-size: 11px;
}

/* ---- zoom ---- */
.pr-zoom {
	position: absolute;
	inset: 0;
	z-index: 10;
	background: #000;
	display: flex;
	flex-direction: column;
}
.pr-zoom[hidden] { display: none; }
.pr-zoom-bar {
	flex: 0 0 auto;
	display: flex;
	justify-content: flex-end;
	gap: 4px;
	padding: 8px;
	padding-top: calc(8px + env(safe-area-inset-top));
}
.pr-zoom-scroll {
	flex: 1 1 auto;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y pinch-zoom;
}
.pr-zoom-row { display: flex; margin: 0 auto; min-width: 100%; }
.pr-zoom-page { position: relative; flex: 1 1 0; background: #fff; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pr-zoom-page img { display: block; width: 100%; height: auto; pointer-events: none; }

/* ---- loading, errors, members-only ---- */
.pr-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pr-dim);
}
.pr-app:not([data-state="loading"]) .pr-loading { display: none; }
.pr-error {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 16px;
	text-align: center;
}
.pr-error[hidden] { display: none; }
.pr-locked {
	display: flex;
	gap: 28px;
	align-items: center;
	max-width: 760px;
	text-align: left;
}
.pr-locked-cover { width: min(260px, 40vw); height: auto; border-radius: 3px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.pr-locked-text { display: flex; flex-direction: column; gap: 6px; }

.pr-message { max-width: 520px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.pr-message h1 { font-size: 24px; }

.pr-share {
	position: absolute;
	top: calc(var(--pr-bar) + 8px);
	right: 12px;
	width: min(380px, calc(100% - 24px));
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 0 12px 12px;
	border: 1px solid var(--pr-line);
	border-radius: 14px;
	background: #161618;
	box-shadow: 0 16px 50px rgba(0, 0, 0, .6);
	z-index: 25;
}
.pr-share .pr-sheet-head { padding: 6px 0 6px 4px; border: 0; }
.pr-share-url {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #3f3f46;
	border-radius: 8px;
	background: #0b0b0c;
	color: var(--pr-text);
	font: inherit;
	font-size: 14px;
}
.pr-share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-share-row .pr-btn { flex: 1 1 auto; min-height: 40px; }

.pr-toast {
	position: absolute;
	left: 50%;
	bottom: calc(var(--pr-foot) + 16px);
	transform: translateX(-50%);
	padding: 10px 16px;
	border-radius: 999px;
	background: #f4f4f5;
	color: #0b0b0c;
	font-size: 14px;
	z-index: 20;
	transition: opacity .4s;
}
.pr-toast.is-out { opacity: 0; }

/* ---- tap links (Phase 2) ---- */
.pr-hot {
	position: absolute;
	z-index: 2;
	display: block;
	padding: 0;
	margin: 0;
	border: 1.5px solid rgba(255, 255, 255, 0);
	border-radius: 4px;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
/* Glow when the page with the link comes into view (class added by the reader). */
.pr-hot.is-glow { animation: pr-hint 1.8s ease-in-out 0.5s 2; }
.pr-hot:hover, .pr-hot:focus-visible {
	border-color: rgba(255, 255, 255, .9);
	background: rgba(255, 255, 255, .12);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
	outline: none;
}
/* A one-time glow when a page with links appears, so readers know the page has extras. */
@keyframes pr-hint {
	0%, 100% { border-color: rgba(255, 255, 255, 0); box-shadow: none; }
	40% { border-color: rgba(255, 255, 255, .95); background-color: rgba(255, 255, 255, .18); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 18px rgba(255, 255, 255, .55); }
}
/* Video picture inside the box (the video's Featured Image). */
.pr-hot-pic {
	background-color: #111;
	background-size: cover;
	background-position: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.pr-hot-pic .pr-hot-badge {
	right: auto;
	bottom: auto;
	left: 50%;
	top: 50%;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	font-size: 20px;
	background: rgba(0, 0, 0, .6);
	border: 2px solid rgba(255, 255, 255, .9);
}
.pr-hot-badge {
	position: absolute;
	right: 6px;
	bottom: 6px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, .65);
	color: #fff;
	font-size: 12px;
	pointer-events: none;
}

.pr-foot { gap: 14px; }
.pr-links-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 12px;
	border: 1px solid #3f3f46;
	border-radius: 999px;
	background: var(--pr-panel);
	color: var(--pr-text);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.pr-links-btn svg { width: 16px; height: 16px; }
.pr-links-btn:hover { border-color: #71717a; }
.pr-links-btn[hidden], .pr-zoom-links[hidden] { display: none; }
.pr-app:not([data-state="ready"]) .pr-links-btn { display: none; }

.pr-sheet {
	position: absolute;
	left: 50%;
	bottom: calc(var(--pr-foot) + 8px);
	transform: translateX(-50%);
	width: min(420px, calc(100% - 24px));
	max-height: 60%;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--pr-line);
	border-radius: 14px;
	background: #161618;
	box-shadow: 0 16px 50px rgba(0, 0, 0, .6);
	z-index: 12;
}
.pr-sheet[hidden] { display: none; }
.pr-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--pr-line); }
.pr-sheet-list { overflow-y: auto; padding: 6px; }
.pr-sheet-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--pr-text);
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.pr-sheet-item:hover, .pr-sheet-item:focus-visible { background: #232327; outline: none; }
.pr-sheet-type { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pr-dim); }
.pr-sheet-label { font-size: 15px; overflow-wrap: anywhere; }

.pr-video {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .85);
}
.pr-video[hidden] { display: none; }
.pr-video-box {
	width: min(960px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
}
.pr-video-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; background: #111113; }
.pr-video-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-video-body { position: relative; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.pr-video-player { display: block; width: 100%; max-height: calc(100vh - 120px); background: #000; }
.pr-video-msg { margin: 0; padding: 40px 16px; color: var(--pr-dim); text-align: center; }
.pr-video-join { padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pr-video-join .pr-card-btns { align-items: stretch; }

@media (prefers-reduced-motion: reduce) {
	.pr-hot { animation: none; }
}

@media (max-width: 699px) {
	.pr-nav { display: none; }
	.pr-brand { display: none; }
	.pr-bar { gap: 6px; padding: 0 6px 0 12px; }
	.pr-icon { width: 38px; }
	.pr-thumb { height: 96px; }
	.pr-locked { flex-direction: column; text-align: center; }
	.pr-locked-text { align-items: center; }
	.pr-card-inner { padding: 10% 8%; }
	.pr-links-btn span { display: none; }
	.pr-links-btn { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.pr-page .pr-img:not([src]) { animation: none; }
}

@media print {
	body * { display: none !important; }
}
