/* ==========================================================================
   Pankaj Yogpeeth: gallery.css
   The gallery (gallery.php), in the inner-page language of the blog, FAQ and
   Testimonials pages:
     1. a compact cover on the site's yoga artwork, with four glass counters;
     2. on a soft mint field with the carved jali: the highlights mosaic, a
        bar of moments (pinned under the navbar on phones), then one section
        per category as a masonry of rounded photos;
     3. the viewer: one photo full screen on a deep forest backdrop, its words
        on glass below; on phones it behaves like a photos app (swipe, tap).
   Behaviour: assets/js/gallery.js.
   ========================================================================== */

.pyp-gl {
	--pyp-saffron-deep: #d9822b;
	--pyp-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.28));
	--pyp-glass-edge: 1px solid rgba(255, 255, 255, 0.75);
	--pyp-glass-blur: blur(18px) saturate(180%);
	--pyp-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.2), 0 18px 36px -22px rgba(15, 59, 39, 0.45);
	--pyp-tile: linear-gradient(145deg, #2f8a4c, var(--pyp-forest));
	--pyp-gl-arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' preserveAspectRatio='none'%3E%3Cpath d='M0 130V30C0 20 16 14 30 9C40 5 46 3 50 0C54 3 60 5 70 9C84 14 100 20 100 30V121Q100 130 91 130H9Q0 130 0 121Z'/%3E%3C/svg%3E");
	--pyp-gl-landing: calc(var(--pyp-navbar-h) + 20px);
	color: var(--pyp-ink);
	font-family: var(--pyp-font-sans);
	background: #f4f9ef;
	-webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
	.pyp-gl { --pyp-gutter: 28px; }
}

.pyp-gl-eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font: 600 11px/1 var(--pyp-font-sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pyp-green);
}

/* Om and the lotus are sacred symbols, so they alone take the saffron */
.pyp-gl-om { flex-shrink: 0; width: 18px; height: 18px; color: var(--pyp-saffron-deep); fill: currentColor; }

.pyp-gl :is(h1, h2) em {
	font-style: normal;
	color: var(--pyp-green);
	background: linear-gradient(100deg, #12512f 0%, #1d7044 40%, #2f8a4c 70%, #4a9e45 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}


/* 1. Compact cover
   ========================================================================== */
.pyp-gl-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(20px, 2.4vw, 34px) clamp(24px, 2.8vw, 40px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.pyp-gl-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
}

.pyp-gl-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(248, 251, 244, 0.92) 0%, rgba(248, 251, 244, 0.7) 45%, rgba(248, 251, 244, 0.15) 100%);
}

.pyp-gl-hero__grid { display: grid; gap: 20px; align-items: center; }

.pyp-gl-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.pyp-gl-crumbs ol {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 4px;
	padding: 4px;
	border: var(--pyp-glass-edge);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: inset 0 1px 0 #fff, 0 8px 18px -14px rgba(15, 59, 39, 0.4);
	list-style: none;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1;
}

.pyp-gl-crumbs li { display: inline-flex; align-items: center; min-width: 0; }

.pyp-gl-crumbs li + li::before {
	content: '';
	width: 5px;
	height: 5px;
	margin: 0 5px 0 2px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	color: rgba(15, 59, 39, 0.35);
	transform: rotate(45deg);
}

.pyp-gl-crumbs :is(a, span) {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 999px;
	color: var(--pyp-ink-soft);
	white-space: nowrap;
	text-decoration: none;
	transition: background-color var(--pyp-dur-fast) var(--pyp-ease-out), color var(--pyp-dur-fast) var(--pyp-ease-out);
}

.pyp-gl-crumbs a:hover { background: rgba(29, 112, 68, 0.08); color: var(--pyp-forest); }
.pyp-gl-crumbs [aria-current] span { color: var(--pyp-forest); font-weight: 600; }

.pyp-gl-hero__title {
	margin: 0;
	font: 500 clamp(28px, 3.2vw, 48px)/1.08 var(--pyp-font-menu);
	letter-spacing: -0.015em;
	color: var(--pyp-forest);
	text-wrap: balance;
}

.pyp-gl-hero__lede {
	max-width: 60ch;
	margin: 0;
	font: 400 clamp(14.5px, 1.1vw, 16px)/1.6 var(--pyp-font-sans);
	color: var(--pyp-ink-soft);
	text-wrap: pretty;
}

.pyp-gl-counters {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pyp-gl-counters li {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 12px 14px 12px 12px;
	border: var(--pyp-glass-edge);
	border-radius: 18px;
	background: var(--pyp-glass-bg);
	-webkit-backdrop-filter: var(--pyp-glass-blur);
	backdrop-filter: var(--pyp-glass-blur);
	box-shadow: var(--pyp-glass-shadow);
}

.pyp-gl-counters__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 13px;
	background: var(--pyp-tile);
	box-shadow: 0 10px 18px -10px rgba(15, 59, 39, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 19px;
}

.pyp-gl-counters li > span:last-child { display: grid; gap: 3px; min-width: 0; }

.pyp-gl-counters b {
	overflow: hidden;
	font: 500 clamp(18px, 1.5vw, 22px)/1.1 var(--pyp-font-menu);
	color: var(--pyp-forest);
	white-space: nowrap;
	text-overflow: ellipsis;
	font-variant-numeric: tabular-nums;
}

.pyp-gl-counters small {
	font: 600 10px/1 var(--pyp-font-sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pyp-ink-soft);
}

@media (min-width: 1100px) {
	.pyp-gl-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 40px; }
}

@media (min-width: 1500px) {
	.pyp-gl-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 900px); }
	.pyp-gl-counters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.pyp-gl-none { padding-block: 60px; text-align: center; color: var(--pyp-ink-soft); }


/* 2. The field
   ========================================================================== */
.pyp-gl-field {
	position: relative;
	isolation: isolate;
	/* clip, not hidden: hidden would make a scroll container and unpin the phone bar */
	overflow: clip;
	padding-block: clamp(24px, 3vw, 44px) clamp(48px, 6vw, 88px);
	background:
		radial-gradient(50% 40% at 100% 0%, rgba(156, 207, 104, 0.3), transparent 70%),
		radial-gradient(45% 35% at 0% 60%, rgba(156, 207, 104, 0.22), transparent 70%),
		linear-gradient(180deg, #f6f9f1 0%, #eef5e7 50%, #f6f9f1 100%);
}

.pyp-gl-jali {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: rgba(29, 112, 68, 0.07);
	stroke-width: 1;
	pointer-events: none;
}

.pyp-gl-field__glow {
	position: absolute;
	top: 6%;
	left: 30%;
	z-index: -1;
	width: 560px;
	height: 560px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(200, 230, 160, 0.55), transparent 65%);
	filter: blur(30px);
	pointer-events: none;
}

/* A photo tile: rounded, a soft lift, its words over a gentle shade */
.pyp-gl-tile {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 20px;
	background: #e3eedb;
	box-shadow: 0 1px 2px rgba(15, 59, 39, 0.06), 0 18px 34px -24px rgba(15, 59, 39, 0.55);
	color: #fff;
	text-decoration: none;
	transform: translateZ(0);
	transition: box-shadow 400ms var(--pyp-ease-out), transform 400ms var(--pyp-ease-out);
}

.pyp-gl-tile img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 700ms var(--pyp-ease-out), filter 400ms var(--pyp-ease-out);
}

.pyp-gl-tile:focus-visible {
	outline: 3px solid var(--pyp-green);
	outline-offset: 3px;
}

.pyp-gl-tile__zoom {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: rgba(15, 59, 39, 0.35);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	font-size: 14px;
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 300ms var(--pyp-ease-out), transform 300ms var(--pyp-ease-out);
}

@media (hover: hover) {
	.pyp-gl-tile:hover {
		color: #fff;
		box-shadow: 0 1px 2px rgba(15, 59, 39, 0.06), 0 26px 44px -24px rgba(15, 59, 39, 0.65);
		transform: translateY(-3px);
	}

	.pyp-gl-tile:hover img { transform: scale(1.04); }
	.pyp-gl-tile:hover .pyp-gl-tile__zoom { opacity: 1; transform: none; }
}

.pyp-gl-tile:active { transform: scale(0.985); }

/* Highlights: a mosaic of the featured photos */
.pyp-gl-high { margin-bottom: clamp(24px, 3vw, 40px); }

.pyp-gl-high__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font: 500 clamp(20px, 1.7vw, 24px)/1.2 var(--pyp-font-menu);
	color: var(--pyp-forest);
}

.pyp-gl-high__title span {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: linear-gradient(145deg, #e9a04f, #b8641c);
	color: #fff;
	font-size: 16px;
}

.pyp-gl-mosaic {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(150px, 15vw, 230px);
	gap: clamp(10px, 1.2vw, 16px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pyp-gl-mosaic li { min-width: 0; }
.pyp-gl-mosaic li:first-child { grid-column: span 2; grid-row: span 2; }
.pyp-gl-mosaic--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pyp-gl-mosaic--3 li:first-child { grid-column: span 1; grid-row: span 2; }
.pyp-gl-mosaic--4 li:nth-child(4) { grid-column: span 2; }

.pyp-gl-tile--high { height: 100%; }
.pyp-gl-tile--high img { height: 100%; object-fit: cover; }

.pyp-gl-tile--high::after {
	content: '';
	position: absolute;
	inset: 40% 0 0;
	background: linear-gradient(180deg, transparent, rgba(8, 30, 19, 0.75));
	pointer-events: none;
}

.pyp-gl-tile--high .pyp-gl-tile__text {
	position: absolute;
	right: 14px;
	bottom: 12px;
	left: 14px;
	z-index: 1;
	display: grid;
	gap: 3px;
}

.pyp-gl-tile--high .pyp-gl-tile__text b { font: 500 clamp(16px, 1.4vw, 20px)/1.2 var(--pyp-font-menu); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); }

.pyp-gl-tile__cat {
	font: 600 10px/1 var(--pyp-font-sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #c8e6a0;
}

/* The bar: moments as chips (sideways on phones, pinned under the navbar), centres as a switch */
.pyp-gl-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: clamp(18px, 2vw, 26px);
}

.pyp-gl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pyp-gl-chip {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding: 7px 7px 7px 14px;
	border: var(--pyp-glass-edge);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
	-webkit-backdrop-filter: var(--pyp-glass-blur);
	backdrop-filter: var(--pyp-glass-blur);
	box-shadow: 0 8px 18px -14px rgba(15, 59, 39, 0.5);
	color: var(--pyp-forest);
	font: 500 14.5px/1 var(--pyp-font-menu);
	white-space: nowrap;
	text-decoration: none;
	transition: background-color var(--pyp-dur-fast) var(--pyp-ease-out), color var(--pyp-dur-fast) var(--pyp-ease-out), box-shadow var(--pyp-dur) var(--pyp-ease-out);
}

.pyp-gl-chip b {
	min-width: 24px;
	padding: 4px 7px;
	border-radius: 999px;
	background: rgba(29, 112, 68, 0.08);
	color: var(--pyp-green);
	font: 600 11.5px/1 var(--pyp-font-sans);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.pyp-gl-chip:hover { background: #fff; color: var(--pyp-forest); }

.pyp-gl-chip[aria-current="true"] {
	border-color: transparent;
	background: var(--pyp-tile);
	box-shadow: 0 10px 20px -12px rgba(15, 59, 39, 0.75);
	color: #fff;
}

.pyp-gl-chip[aria-current="true"] b { background: #c8e6a0; color: var(--pyp-forest); }
.pyp-gl-chip.is-empty { opacity: 0.45; }

.pyp-gl-chip:focus-visible,
.pyp-gl-places button:focus-visible {
	outline: 2px solid var(--pyp-green);
	outline-offset: 2px;
}

.pyp-gl-places {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.55);
	box-shadow: inset 0 1px 2px rgba(15, 59, 39, 0.08);
}

.pyp-gl-places button {
	padding: 8px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--pyp-ink-soft);
	font: 500 14px/1 var(--pyp-font-menu);
	white-space: nowrap;
	cursor: pointer;
}

.pyp-gl-places button[aria-pressed="true"] { background: #fff; color: var(--pyp-forest); box-shadow: var(--pyp-neu-raised); }

/* A moment: its heading, then a masonry of photos */
.pyp-gl-section { scroll-margin-top: var(--pyp-gl-landing); }
.pyp-gl-section + .pyp-gl-section { margin-top: clamp(32px, 4vw, 56px); }
.pyp-gl-section[hidden] { display: none; }

.pyp-gl-section__head {
	display: grid;
	gap: 6px;
	max-width: 70ch;
	margin-bottom: 16px;
}

.pyp-gl-section__title {
	margin: 0;
	font: 500 clamp(24px, 2.2vw, 32px)/1.15 var(--pyp-font-menu);
	letter-spacing: -0.015em;
	color: var(--pyp-forest);
}

.pyp-gl-section__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }

.pyp-gl-section__count {
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	color: var(--pyp-green);
	font: 600 12px/1 var(--pyp-font-sans);
	font-variant-numeric: tabular-nums;
}

.pyp-gl-section__desc { margin: 0; color: var(--pyp-ink-soft); font-size: 15.5px; line-height: 1.6; }

.pyp-gl-grid {
	columns: 4 240px;
	column-gap: clamp(12px, 1.4vw, 18px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pyp-gl-item {
	break-inside: avoid;
	margin-bottom: clamp(12px, 1.4vw, 18px);
	scroll-margin-top: var(--pyp-gl-landing);
}

.pyp-gl-item[hidden] { display: none; }
.pyp-gl-item figure { margin: 0; }

.pyp-gl-item .pyp-gl-tile__text {
	display: grid;
	gap: 2px;
	padding: 10px 6px 0;
}

.pyp-gl-item .pyp-gl-tile__text b { color: var(--pyp-forest); font: 500 16px/1.3 var(--pyp-font-menu); }
.pyp-gl-item .pyp-gl-tile__text > span { color: var(--pyp-ink-soft); font-size: 13.5px; line-height: 1.45; }

.pyp-gl-tile__place {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 2px;
	color: var(--pyp-green) !important;
	font-size: 12px !important;
	font-weight: 600;
}

/* Arrival: each photo rises in as it reaches the screen (once the script runs) */
.pyp-gl.is-armed .pyp-gl-item {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 600ms var(--pyp-ease-out), transform 700ms var(--pyp-ease-out);
}

.pyp-gl.is-armed .pyp-gl-item.is-in { opacity: 1; transform: none; }

/* Invitation */
.pyp-gl-invite {
	display: grid;
	justify-items: center;
	gap: 10px;
	margin-top: clamp(40px, 5vw, 72px);
	padding: clamp(28px, 4vw, 52px) clamp(18px, 4vw, 48px);
	border: var(--pyp-glass-edge);
	border-radius: 30px;
	background:
		radial-gradient(70% 70% at 50% 0%, rgba(200, 230, 160, 0.55), transparent 70%),
		var(--pyp-glass-bg);
	-webkit-backdrop-filter: var(--pyp-glass-blur);
	backdrop-filter: var(--pyp-glass-blur);
	box-shadow: var(--pyp-glass-shadow);
	text-align: center;
}

.pyp-gl-invite__mark {
	display: grid;
	place-items: center;
	width: 44px;
	height: 54px;
	padding-top: 6px;
	background: linear-gradient(180deg, #2f8a4c 0%, #1d7044 55%, #12512f 100%);
	-webkit-mask: var(--pyp-gl-arch) center / 100% 100% no-repeat;
	mask: var(--pyp-gl-arch) center / 100% 100% no-repeat;
}

.pyp-gl-invite__mark svg { width: 22px; height: 22px; color: #fff; fill: currentColor; }

.pyp-gl-invite__verse { margin: 4px 0 0 !important; font: italic 400 15px/1 Georgia, 'Times New Roman', serif; letter-spacing: 0.04em; color: var(--pyp-green); }
.pyp-gl-invite__title { margin: 0; font: 500 clamp(22px, 2.2vw, 32px)/1.2 var(--pyp-font-menu); color: var(--pyp-forest); text-wrap: balance; }
.pyp-gl-invite__text { max-width: 56ch; margin: 0 0 8px !important; color: var(--pyp-ink-soft); font-size: 15px; line-height: 1.6; }

.pyp-gl-invite__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; }

.pyp-gl-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	height: 48px;
	padding: 0 5px 0 22px;
	border-radius: 999px;
	background: var(--pyp-tile);
	box-shadow: 0 12px 24px -12px rgba(15, 59, 39, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
	color: #fff;
	font: 500 15.5px/1 var(--pyp-font-menu);
	text-decoration: none;
	transition: transform 160ms var(--pyp-ease-out), box-shadow 200ms ease;
}

.pyp-gl-btn .bi {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #c8e6a0;
	color: var(--pyp-forest);
	transition: transform 300ms var(--pyp-ease-out), background-color 200ms ease;
}

.pyp-gl-btn:hover { color: #fff; }
.pyp-gl-btn:hover .bi { background: #fff; transform: rotate(-45deg); }
.pyp-gl-btn:active { transform: scale(0.97); }

.pyp-gl-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--pyp-forest);
	font: 500 15px/1 var(--pyp-font-menu);
	text-decoration: none;
}

.pyp-gl-link .bi { color: var(--pyp-green); transition: transform 300ms var(--pyp-ease-out); }
.pyp-gl-link:hover { color: var(--pyp-green); }
.pyp-gl-link:hover .bi { transform: translateX(3px); }

:is(.pyp-gl-btn, .pyp-gl-link):focus-visible { outline: 2px solid var(--pyp-green); outline-offset: 3px; }


/* 3. The viewer
   ========================================================================== */
.pyp-gl-view {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: radial-gradient(120% 90% at 50% 30%, #123c28 0%, #071a10 70%);
	color: #fff;
	overflow: hidden;
	overscroll-behavior: contain;
}

.pyp-gl-view::backdrop { background: rgba(4, 16, 10, 0.92); }

.pyp-gl-view[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	animation: pyp-gl-in 320ms var(--pyp-ease-out);
}

@keyframes pyp-gl-in {
	from { opacity: 0; }
}

.pyp-gl-view__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: max(14px, env(safe-area-inset-top)) clamp(14px, 2vw, 28px) 10px;
}

.pyp-gl-view__count {
	margin: 0 !important;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.85);
	font: 600 12.5px/1 var(--pyp-font-sans);
	font-variant-numeric: tabular-nums;
}

.pyp-gl-view__tools { display: flex; gap: 8px; }

.pyp-gl-view__btn,
.pyp-gl-view__nav {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	transition: background-color 200ms ease, transform 160ms var(--pyp-ease-out);
}

.pyp-gl-view__btn:hover,
.pyp-gl-view__nav:hover { background: rgba(255, 255, 255, 0.2); }
.pyp-gl-view__btn:active,
.pyp-gl-view__nav:active { transform: scale(0.94); }

.pyp-gl-view__btn:focus-visible,
.pyp-gl-view__nav:focus-visible { outline: 2px solid #c8e6a0; outline-offset: 2px; }

.pyp-gl-view__stage {
	--pyp-gl-side: clamp(8px, 6vw, 96px);
	position: relative;
	display: grid;
	place-items: center;
	min-height: 0;
	touch-action: pan-y;
	user-select: none;
}

/* Centred in the space between the top bar and the words, never larger than it */
.pyp-gl-view__img {
	position: absolute;
	inset: 0 var(--pyp-gl-side);
	margin: auto;
	max-width: calc(100% - 2 * var(--pyp-gl-side));
	max-height: 100%;
	border-radius: 14px;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
	object-fit: contain;
	transition: opacity 260ms var(--pyp-ease-out), transform 320ms var(--pyp-ease-out);
	-webkit-user-drag: none;
}

.pyp-gl-view__stage.is-loading .pyp-gl-view__img { opacity: 0.35; }

.pyp-gl-view__spin {
	position: absolute;
	width: 34px;
	height: 34px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #c8e6a0;
	border-radius: 50%;
	opacity: 0;
	animation: pyp-gl-spin 900ms linear infinite;
	transition: opacity 200ms ease;
	pointer-events: none;
}

.pyp-gl-view__stage.is-loading .pyp-gl-view__spin { opacity: 1; }

@keyframes pyp-gl-spin { to { transform: rotate(360deg); } }

.pyp-gl-view__nav {
	position: absolute;
	top: 50%;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	font-size: 20px;
}

.pyp-gl-view__nav--prev { left: clamp(10px, 2vw, 28px); }
.pyp-gl-view__nav--next { right: clamp(10px, 2vw, 28px); }
.pyp-gl-view__nav[disabled] { opacity: 0.3; pointer-events: none; }

.pyp-gl-view__info {
	display: grid;
	justify-items: center;
	gap: 4px;
	padding: 14px clamp(16px, 4vw, 48px) max(18px, env(safe-area-inset-bottom));
	text-align: center;
}

.pyp-gl-view__meta {
	margin: 0 !important;
	color: #c8e6a0;
	font: 600 10.5px/1.4 var(--pyp-font-sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.pyp-gl-view__title { margin: 0 !important; color: #fff; font: 500 clamp(18px, 1.8vw, 24px)/1.25 var(--pyp-font-menu); }
.pyp-gl-view__caption { max-width: 60ch; margin: 0 !important; color: rgba(255, 255, 255, 0.75); font-size: 14.5px; line-height: 1.5; }
.pyp-gl-view__caption:empty { display: none; }

/* While the viewer is open the page behind it stays still */
html.pyp-gl-locked { overflow: hidden; }


/* 4. Tablets and phones: an app-like reading
   ========================================================================== */
@media (max-width: 991.98px) {
	/* The bar pins under the navbar on frosted glass, edge to edge; the chips scroll sideways */
	.pyp-gl-bar {
		position: sticky;
		top: var(--pyp-navbar-h);
		z-index: 20;
		flex-wrap: nowrap;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin: 0 calc(-1 * var(--pyp-gutter)) 16px;
		padding: 10px var(--pyp-gutter);
		background: rgba(244, 249, 239, 0.84);
		-webkit-backdrop-filter: blur(18px) saturate(180%);
		backdrop-filter: blur(18px) saturate(180%);
		transition: box-shadow var(--pyp-dur) var(--pyp-ease-out);
	}

	.pyp-gl-bar.is-stuck { box-shadow: 0 1px 0 rgba(15, 59, 39, 0.08), 0 12px 24px -20px rgba(15, 59, 39, 0.45); }

	.pyp-gl-chips {
		flex-wrap: nowrap;
		margin-inline: calc(-1 * var(--pyp-gutter));
		padding: 2px var(--pyp-gutter);
		overflow-x: auto;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
		scroll-padding-inline: var(--pyp-gutter);
		overscroll-behavior-x: contain;
	}

	.pyp-gl-chips::-webkit-scrollbar { display: none; }
	.pyp-gl-chip { scroll-snap-align: start; }
	.pyp-gl-places { align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

	.pyp-gl { --pyp-gl-landing: calc(var(--pyp-navbar-h) + 76px); }

	.pyp-gl-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(130px, 30vw, 220px); }
	.pyp-gl-mosaic--3 li:first-child,
	.pyp-gl-mosaic li:first-child { grid-column: span 2; grid-row: span 1; }
	.pyp-gl-mosaic--4 li:nth-child(4) { grid-column: span 1; }
	.pyp-gl-mosaic--4 li:last-child { grid-column: span 2; }
}

@media (max-width: 767.98px) {
	.pyp-gl-hero { padding-block: 16px 20px; }
	.pyp-gl-hero::before { background: linear-gradient(180deg, rgba(248, 251, 244, 0.92), rgba(248, 251, 244, 0.78)); }
	.pyp-gl-hero__grid { gap: 14px; }
	.pyp-gl-hero__lede { font-size: 14.5px; }

	.pyp-gl-counters {
		display: flex;
		gap: 8px;
		margin-inline: calc(-1 * var(--pyp-gutter));
		padding: 2px var(--pyp-gutter) 4px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.pyp-gl-counters::-webkit-scrollbar { display: none; }
	.pyp-gl-counters li { flex: none; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 16px; }
	.pyp-gl-counters__icon { width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
	.pyp-gl-counters b { font-size: 17px; }
	.pyp-gl-counters small { font-size: 9.5px; letter-spacing: 0.12em; }

	/* Two columns, tighter corners, the words in a smaller hand */
	.pyp-gl-grid { columns: 2; column-gap: 10px; }
	.pyp-gl-item { margin-bottom: 14px; }
	.pyp-gl-tile { border-radius: 16px; }
	.pyp-gl-mosaic { gap: 8px; }
	.pyp-gl-item .pyp-gl-tile__text { padding: 8px 4px 0; }
	.pyp-gl-item .pyp-gl-tile__text b { font-size: 14.5px; }
	.pyp-gl-item .pyp-gl-tile__text > span { font-size: 12.5px; }
	.pyp-gl-section__title { font-size: 23px; }
	.pyp-gl-section__desc { font-size: 14.5px; }

	/* The viewer: edge to edge, arrows give way to swipes */
	.pyp-gl-view__stage { --pyp-gl-side: 0px; }
	.pyp-gl-view__img { border-radius: 0; }
	.pyp-gl-view__nav { display: none; }
	.pyp-gl-invite__actions { flex-direction: column; width: 100%; }
	.pyp-gl-btn { justify-content: space-between; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.pyp-gl-tile,
	.pyp-gl-tile img,
	.pyp-gl-view__img { transition: none; }
	.pyp-gl-view[open] { animation: none; }
	.pyp-gl.is-armed .pyp-gl-item { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
	.pyp-gl-counters li,
	.pyp-gl-chip,
	.pyp-gl-bar,
	.pyp-gl-invite {
		background: #fff;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}
