/* Shared chrome: image viewer, gallery, design switcher.
   Sizing is 100% CSS-driven (no JS pixel math) so the viewer reflows on every
   window resize, device rotation and mobile URL-bar change by construction. */
:root {
  --cy-lb-bg: rgba(16,16,18,.93);
  --cy-lb-fg: #fff;
  --cy-lb-radius: 6px;
  --cy-sw-bg: #16161a;
  --cy-sw-fg: #fff;
  --cy-sw-radius: 999px;
  --cy-gal-gap: 14px;
}
*,*::before,*::after {
	box-sizing: border-box
}
img {
	max-width: 100%;
	display: block
}

/* ============================ IMAGE VIEWER ============================
   Grid rows: [chrome] [stage 1fr] [filmstrip]. The stage is minmax(0,1fr),
   so the image's max-height:100% always resolves against real available
   space — it rescales live while you drag the window. */
.cy-lb {
  position: fixed;
	inset: 0;
	z-index: 9000;
	display: none;
	grid-template-rows: auto minmax(0,1fr) auto;
	background: var(--cy-lb-bg);
	-webkit-backdrop-filter: blur(14px) saturate(1.1);
	backdrop-filter: blur(14px) saturate(1.1);
	height: 100dvh;
}
@supports not (height: 100dvh) {
	.cy-lb {
		height: 100%;
	}
}
.cy-lb.open {
	display: grid;
	animation: cyFade .2s ease;
}
@keyframes cyFade {
	from {opacity: 0} to {opacity:1}
}


.cy-lb-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: clamp(10px,1.6vw,18px) clamp(12px,2.4vw,26px);
	color: var(--cy-lb-fg);
	font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.cy-lb-meta {
	min-width: 0;
	display: flex;
	align-items: baseline;
	gap: 12px;
}
.cy-lb-title {
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: .01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: .95;
}
.cy-lb-count {
	font-size: 11.5px;
	letter-spacing: .14em;
	opacity: .55;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.cy-lb-tools {
	display: flex;
	gap: 6px;
	flex: none;
}

.cy-lb button {
	background: rgba(255,255,255,.09);
	color: var(--cy-lb-fg);
	border: 0;
	cursor: pointer;
	border-radius: 999px;
	display: grid;
	place-items: center;
	transition: background .15s,transform .15s,opacity .15s;
}
.cy-lb button: hover {
	background: rgba(255,255,255,.2);
}
.cy-lb button: focus-visible {
	outline: 2px solid var(--cy-lb-fg);
	outline-offset: 2px;
}
.cy-lb-tools button {
	width: 38px;
	height: 38px;
	font-size: 17px;
	line-height: 1;
}
.cy-lb-x {
	font-size: 20px !important;
}

/* stage — flex (not grid) so the image's percentage max-height resolves
   against a definite height and refits on every resize */
.cy-lb-stage {
	position: relative;
	min-height: 0;
	min-width: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 clamp(8px,5vw,72px);
}
.cy-lb-stage img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--cy-lb-radius);
	box-shadow: 0 30px 80px rgba(0,0,0,.45);
	transition: opacity .18s ease;
	cursor: zoom-in;
}
.cy-lb-stage img.loading {
	opacity: .25;
}
.cy-lb.zoom .cy-lb-stage {
	overflow: auto;
	display: block;
	padding: 0;
}
.cy-lb.zoom .cy-lb-stage img {
	max-width: none;
	max-height: none;
	width: auto;
	border-radius: 0;
	cursor: zoom-out;
	box-shadow: none;
}

.cy-lb-p,.cy-lb-n {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: clamp(38px,4vw,50px);
	height: clamp(38px,4vw,50px);
	font-size: 24px;
	background: rgba(255,255,255,.12);
	z-index: 2;
}
.cy-lb-p {
	left: clamp(4px,1.4vw,18px);
}
.cy-lb-n {
	right: clamp(4px,1.4vw,18px);
}
.cy-lb.zoom .cy-lb-p, .cy-lb.zoom .cy-lb-n {
	display: none;
}


/* filmstrip */
.cy-lb-strip {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: clamp(10px,1.6vw,16px) clamp(12px,2.4vw,26px) clamp(12px,2vw,20px);
	scrollbar-width: thin;
	scroll-behavior: smooth;
}
.cy-lb-strip::-webkit-scrollbar {
	height: 5px;
}
.cy-lb-strip::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,.25);
	border-radius: 5px;
}
.cy-lb-strip button {
	flex: none;
	width: 62px;
	height: 62px;
	padding: 0;
	border-radius: 4px;
	overflow: hidden;
	background: rgba(255,255,255,.08);
	opacity: .42;
	transition: opacity .18s,outline-color .18s;
	outline: 2px solid transparent;
	outline-offset: 0;
}
.cy-lb-strip button img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cy-lb-strip button: hover {
	opacity: .8;
}
.cy-lb-strip button[aria-current=true] {
	opacity: 1;
	outline-color: var(--cy-lb-fg)
}
.cy-lb.zoom .cy-lb-strip, .cy-lb.single .cy-lb-strip,
.cy-lb.single .cy-lb-p, .cy-lb.single .cy-lb-n {
	display: none;
}
@media(max-width:640px) {
	.cy-lb-strip button {
		width: 50px;
		height: 50px;
	}
	.cy-lb-title 
	{
		font-size: 12px;
	}
}


/* ============================ IN-PAGE GALLERY ============================
   True masonry that preserves reading order: each tile spans a computed
   number of 4px grid rows derived from its real aspect ratio. */

.cy-d-gal {
	display: grid;
	gap: var(--cy-gal-gap);
	grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr));
	grid-auto-rows: 4px;
}
.cy-d-gal.cols-1 {
	grid-template-columns: 1fr;
}
.cy-d-shot {
	padding: 0;
	border: 0;
	background: var(--ph,#eceae6);
	cursor: zoom-in;
	display: block;
	overflow: hidden;
	position: relative;
	border-radius: var(--cy-shot-radius,3px);
}
.cy-d-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s cubic-bezier(.2,.7,.3,1), opacity .4s ease;
}
.cy-d-shot: hover img {
	transform: scale(1.03);
}
.cy-d-shot::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background .25s ease;
}
.cy-d-shot:hover::after {
	background: rgba(0,0,0,.06);
}
.cy-d-shot: focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}


/* ============================ SWITCHER ============================ */
.cy-switch {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 8500;
	font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.cy-switch-btn {
	background: var(--cy-sw-bg);
	color: var(--cy-sw-fg);
	border: 0;
	cursor: pointer;
	padding: 11px 18px;
	border-radius: var(--cy-sw-radius);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	box-shadow: 0 6px 26px rgba(0,0,0,.26);
	transition: transform .16s ease;
}
.cy-switch-btn span {
	opacity: .55;
	font-weight: 400;
}
.cy-switch-btn:hover {
	transform: translateY(-2px);
}
.cy-switch-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	width: 236px;
	background: var(--cy-sw-bg);
	color: var(--cy-sw-fg);
	border-radius: 14px;
	padding: 8px;
	box-shadow: 0 18px 50px rgba(0,0,0,.4);
	display: none;
	max-height: 70vh;
	overflow: auto;
}
.cy-switch.open .cy-switch-menu {
	display:block;
}
.cy-switch-menu p {
	margin: 6px 10px 8px;
	font-size: 10px;
	letter-spacing: .18em;
	text-transform: uppercase;
	opacity: .45;
}
.cy-switch-menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
	font-size: 13px;
	opacity: .8;
}
.cy-switch-menu a: hover {
	background: rgba(255,255,255,.1);
	opacity: 1;
}
.cy-switch-menu a.on {
	opacity: 1;
	background: rgba(255,255,255,.14);
	font-weight: 600;
}
.cy-switch-menu a b {
	width: 20px;
	font-size: 11px;
	opacity: .5;
	font-variant-numeric: tabular-nums;
}
.cy-switch-menu a.all {
	margin-top: 6px;
	border-top: 1px solid rgba(255,255,255,.14);
	border-radius: 0 0 8px 8px;
	padding-top: 12px;
	font-size: 12px;
}
@media(max-width:640px) {
	.cy-switch {
		right: 10px;
		bottom:10px
	}.cy-switch-btn {
		padding: 9px 14px;
		font-size:12px;
	}
}
@media print {
	.cy-switch, .cy-lb {
		display: none !important;
	}
}

[data-reveal] {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-in {
	opacity:1;
	transform:none;
}
@media(prefers-reduced-motion:reduce) {
  *{animation-duration:.01ms !important; transition-duration:.01ms !important}
  [data-reveal] {
	  opacity: 1;
	  transform: none;
	}
  .cy-lb-strip {
	  scroll-behavior: auto
	}
}
