/* Bruno portfolio pilot 2026-10-26: real-work cards in /biblioteki/ + shared project gallery. All selectors are bpp-scoped. */
.bpp-work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; padding: 0; list-style: none; }
.bpp-work-tags li { margin: 0; padding: 5px 10px; border: 1px solid #c9b9a2; border-radius: 999px; color: #5a4637; font-size: 13px; line-height: 1.2; list-style: none; }
.bpp-work-tags li::before { content: none; }

/* Card. Width/flex/margins are synced from the first native card by JS; these are the legacy fallbacks. */
.bpp-card {
	box-sizing: border-box;
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 0 1 auto;
	width: 100%;
	max-width: 313px;
	margin: 0 0 27px;
	overflow: visible;
	background: #fff;
	color: #2e211a;
	border: 0;
	border-radius: 0;
	text-align: left;
}
.bpp-card__frame {
	box-sizing: border-box;
	flex-shrink: 0;
	aspect-ratio: 7 / 5;
	padding: 12px;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 1px 2px rgba(60, 42, 14, .1), 0 18px 32px -22px rgba(60, 42, 14, .45);
}
.bpp-card__photo {
	position: relative;
	display: block;
	flex-shrink: 0;
	height: 100%;
	border-radius: 1px;
	box-shadow: 0 0 0 1px #fff, 0 0 0 2px #c79a4e;
	overflow: hidden;
	background: #ddd2c2;
}
.bpp-card__photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 62%;
}
.bpp-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px 6px 8px;
	border-radius: 999px;
	background: #fcfaf6;
	color: #2e211a;
	font-size: 13px;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(46, 33, 26, .14);
	pointer-events: none;
}
.bpp-card__badge svg {
	flex: none;
	width: 14px;
	height: 14px;
	fill: none;
	stroke: #8c5e33;
	stroke-width: 1.3;
}
.bpp-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	box-sizing: border-box;
	min-height: 164px;
	padding: 20px 0 0;
}
.bpp-card__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-family: 'Linux Libertine Display G', Georgia, serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.15;
	color: #2e211a;
}
.bpp-card__meta {
	margin: 0;
	color: #6b6257;
	font-size: 13px;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}

/* Tags (card and dialog) */
.bpp-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bpp-tags li {
	margin: 0;
	padding: 4px 9px;
	list-style: none;
	border: 1px solid #c9b9a2;
	border-radius: 999px;
	color: #5a4637;
	font-size: 12px;
	line-height: 1;
}
.bpp-tags li::before {
	content: none;
}

/* Explicit cover and CTA links: no stretched overlay interfering with image hit-testing. */
.bpp-card__cta,
.bpp-card__cta:visited,
.bpp-card__cta:hover,
.bpp-card__cta:focus {
	color: #3b3128;
	text-decoration: none;
}
.bpp-card__cta {
	display: inline-flex;
	align-self: stretch;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: auto;
	padding: 0 16px;
	gap: 10px;
	border-radius: 2px;
	background: #e4d7c2;
	box-shadow: none;
	font-size: 15px;
	line-height: 1.2;
	transition: background-color .2s ease;
}
.bpp-card__cta svg {
	flex: none;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linejoin: round;
}
.bpp-card__photo:focus-visible {
	outline: 3px solid #8c5e33;
	outline-offset: -3px;
}
.bpp-card__cta:focus-visible {
	outline: 2px solid #8c5e33;
	outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
	.bpp-card__cta:hover {
		background: #d8c8ae;
	}
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.bpp-card__photo img {
		transition: transform .6s cubic-bezier(.16, 1, .3, 1);
	}
	.bpp-card:hover .bpp-card__photo img {
		transform: scale(1.03);
	}
}

/* Page scroll lock while the gallery is open (class owned by this module only) */
html.bpp-lock {
	overflow: hidden;
	scrollbar-gutter: stable;
}

/* Gallery dialog */
.bpp-dialog {
	box-sizing: border-box;
	width: min(1180px, calc(100vw - 32px));
	height: min(780px, calc(100vh - 32px));
	height: min(780px, calc(100dvh - 32px));
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 10px;
	background: #fcfaf6;
	color: #2e211a;
	text-align: left;
	box-shadow: 0 24px 64px rgba(26, 19, 14, .35);
}
.bpp-dialog:not([open]) {
	display: none;
}
.bpp-dialog::backdrop {
	background: rgba(26, 19, 14, .74);
}
.bpp-dialog *,
.bpp-dialog *::before,
.bpp-dialog *::after {
	box-sizing: border-box;
}
.bpp-dialog__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	height: 100%;
}

.bpp-stage {
	display: grid;
	/* Reserve the thumbnail rail during loading and for one-photo works too. */
	grid-template-rows: minmax(0, 1fr) 70px;
	min-height: 0;
	background: #2a211a;
}
.bpp-stage__frame {
	position: relative;
	min-height: 0;
	overflow: hidden;
}
.bpp-stage__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	transition: opacity .2s ease;
}
.bpp-stage__img.is-loading {
	opacity: .35;
}
.bpp-stage__error,
.bpp-stage__loading {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 0;
	padding: 24px 72px;
	color: #f3ebdf;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}
.bpp-stage__loading {
	pointer-events: none;
}
.bpp-stage__error p {
	margin: 0;
}
.bpp-stage__error[hidden],
.bpp-stage__loading[hidden],
.bpp-thumbs[hidden],
.bpp-tags[hidden],
.bpp-panel__desc[hidden] {
	display: none;
}
.bpp-dialog .bpp-retry,
.bpp-dialog .bpp-retry:hover,
.bpp-dialog .bpp-retry:focus,
.bpp-dialog .bpp-retry:active {
	min-height: 44px;
	margin: 0;
	padding: 0 22px;
	border: 1px solid #e2cba9;
	border-radius: 999px;
	background: transparent;
	color: #f3ebdf;
	font: inherit;
	box-shadow: none;
	transform: none;
	cursor: pointer;
}
.bpp-dialog .bpp-retry:focus-visible {
	outline: 2px solid #e2cba9;
	outline-offset: 2px;
}

/* Arrows: geometry is fixed in every state so generic button hover rules cannot move them */
.bpp-dialog .bpp-nav,
.bpp-dialog .bpp-nav:hover,
.bpp-dialog .bpp-nav:focus,
.bpp-dialog .bpp-nav:active {
	position: absolute;
	top: calc(50% - 24px);
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(252, 250, 246, .92);
	color: #2e211a;
	box-shadow: none;
	transform: none;
	cursor: pointer;
}
.bpp-dialog .bpp-nav--prev {
	left: 12px;
}
.bpp-dialog .bpp-nav--next {
	right: 12px;
}
.bpp-dialog .bpp-nav[hidden] {
	display: none;
}
.bpp-dialog .bpp-nav:disabled {
	opacity: .4;
	cursor: default;
}
.bpp-nav svg,
.bpp-close svg,
.bpp-projnav__btn svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bpp-dialog .bpp-nav:focus-visible,
.bpp-dialog .bpp-close:focus-visible,
.bpp-thumb:focus-visible {
	outline: 2px solid #e2cba9;
	outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
	.bpp-dialog .bpp-nav:hover {
		background: #fcfaf6;
	}
}

.bpp-thumbs {
	position: relative;
	display: flex;
	gap: 8px;
	padding: 10px 12px 12px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: #6a5444 transparent;
}
.bpp-thumb {
	flex: none;
	width: 64px;
	height: 48px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 4px;
	background: #3d3026;
	opacity: .62;
	cursor: pointer;
	transform: none;
}
.bpp-thumb[aria-current="true"] {
	border-color: #e2cba9;
	opacity: 1;
}
.bpp-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.bpp-panel {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	padding: 28px 28px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.bpp-panel__badge {
	margin: 0;
	color: #8c5e33;
	font-size: 13px;
	line-height: 1.3;
}
.bpp-panel__title {
	margin: 0 44px 2px 0;
	font-family: 'Linux Libertine Display G', Georgia, serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 1.1;
	color: #2e211a;
}
.bpp-panel__count {
	margin: 4px 0 0;
	color: #5a4637;
	font-size: 14px;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}
.bpp-panel__desc {
	max-width: 62ch;
	margin: 4px 0 0;
	color: #2e211a;
	font-size: 15.5px;
	line-height: 1.6;
}
.bpp-panel__link,
.bpp-panel__link:visited,
.bpp-panel__link:hover,
.bpp-panel__link:focus {
	color: #2e211a;
	text-decoration: none;
}
.bpp-panel__link {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	min-height: 44px;
	margin-top: 4px;
	padding: 0 20px;
	border: 1px solid #cdbea9;
	border-radius: 999px;
	font-size: 15px;
}
.bpp-panel__link:focus-visible {
	outline: 2px solid #8c5e33;
	outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
	.bpp-panel__link:hover {
		border-color: #2e211a;
	}
}

/* Project navigation: separate from the photo arrows/counter, pinned to the panel bottom */
.bpp-projnav {
	position: sticky;
	bottom: 0;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: auto -28px -24px;
	padding: 12px 28px 24px;
	border-top: 1px solid #e3d8c8;
	background: #fcfaf6;
}
.bpp-projnav__count {
	grid-column: 1 / -1;
	margin: 0;
	color: #5a4637;
	font-size: 14px;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}
.bpp-dialog .bpp-projnav__btn,
.bpp-dialog .bpp-projnav__btn:hover,
.bpp-dialog .bpp-projnav__btn:focus,
.bpp-dialog .bpp-projnav__btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #2e211a;
	border-radius: 999px;
	background: #fcfaf6;
	color: #2e211a;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	text-align: center;
	box-shadow: none;
	transform: none;
	cursor: pointer;
}
.bpp-dialog .bpp-projnav__btn--next,
.bpp-dialog .bpp-projnav__btn--next:hover,
.bpp-dialog .bpp-projnav__btn--next:focus,
.bpp-dialog .bpp-projnav__btn--next:active {
	background: #2e211a;
	color: #fcfaf6;
}
.bpp-dialog .bpp-projnav__btn:disabled {
	opacity: .38;
	cursor: default;
}
.bpp-projnav__btn svg {
	flex: none;
}
.bpp-dialog .bpp-projnav__btn:focus-visible {
	outline: 2px solid #8c5e33;
	outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
	.bpp-dialog .bpp-projnav__btn--prev:not(:disabled):hover {
		background: #eee7dc;
	}
	.bpp-dialog .bpp-projnav__btn--next:not(:disabled):hover {
		background: #4a3628;
	}
}

.bpp-dialog .bpp-close,
.bpp-dialog .bpp-close:hover,
.bpp-dialog .bpp-close:focus,
.bpp-dialog .bpp-close:active {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid #cdbea9;
	border-radius: 999px;
	background: #fcfaf6;
	color: #2e211a;
	box-shadow: none;
	transform: none;
	cursor: pointer;
}

.bpp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.bpp-dialog[open] {
		animation: bpp-in .25s cubic-bezier(.16, 1, .3, 1);
	}
	@keyframes bpp-in {
		from { opacity: 0; transform: translateY(10px); }
		to { opacity: 1; transform: none; }
	}
}
@media (prefers-reduced-motion: reduce) {
	.bpp-card__cta,
	.bpp-stage__img {
		transition: none;
	}
}

@media (max-width: 1000px) {
	.bpp-dialog__grid {
		grid-template-columns: minmax(0, 1fr) 300px;
	}
	.bpp-panel {
		padding: 24px 20px 20px;
	}
	.bpp-projnav {
		margin: auto -20px -20px;
		padding: 12px 20px 20px;
	}
	.bpp-panel__title {
		font-size: 26px;
	}
}
@media (max-width: 760px) {
	.bpp-dialog {
		width: calc(100vw - 16px);
		height: calc(100vh - 16px);
		height: calc(100dvh - 16px);
	}
	.bpp-dialog__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr);
	}
	.bpp-stage__frame {
		height: min(68vw, 46vh);
		height: min(68vw, 46dvh);
	}
	.bpp-dialog .bpp-nav--prev {
		left: 8px;
	}
	.bpp-dialog .bpp-nav--next {
		right: 8px;
	}
	.bpp-thumbs {
		padding: 8px 8px 10px;
	}
	.bpp-panel {
		padding: 18px 16px 16px;
	}
	.bpp-projnav {
		margin: auto -16px -16px;
		padding: 10px 16px 12px;
	}
	.bpp-stage__error,
	.bpp-stage__loading {
		padding: 16px 64px;
	}
	.bpp-panel__title {
		margin-right: 0;
		font-size: 24px;
	}
	.bpp-dialog .bpp-close,
	.bpp-dialog .bpp-close:hover,
	.bpp-dialog .bpp-close:focus,
	.bpp-dialog .bpp-close:active {
		top: 8px;
		right: 8px;
	}
}
