.gmp-gallery {
	--gmp-ink: #172033;
	--gmp-muted: #667085;
	--gmp-line: #d8dee8;
	--gmp-soft: #f6f7fb;
	--gmp-accent: #0f766e;
	--gmp-accent-strong: #0b5f59;
	--gmp-danger: #b42318;
	box-sizing: border-box;
	width: 100%;
	color: var(--gmp-ink);
	font-family: inherit;
}

.gmp-gallery *,
.gmp-gallery *::before,
.gmp-gallery *::after {
	box-sizing: inherit;
}

.gmp-view-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
}

.gmp-view-header h2 {
	margin: 0;
	color: var(--gmp-ink);
	font-size: clamp(24px, 3vw, 36px);
	line-height: 1.1;
}

.gmp-category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.gmp-category-card,
.gmp-match-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 92px;
	padding: 20px;
	border: 1px solid var(--gmp-line);
	border-radius: 8px;
	background: #fff;
	color: var(--gmp-ink);
	box-shadow: 0 8px 24px rgba(23, 32, 51, 0.08);
	cursor: pointer;
	text-align: left;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.gmp-category-card:hover,
.gmp-category-card:focus-visible,
.gmp-match-card:hover,
.gmp-match-card:focus-visible {
	border-color: var(--gmp-accent);
	box-shadow: 0 12px 28px rgba(15, 118, 110, 0.16);
	transform: translateY(-1px);
	outline: none;
}

.gmp-category-card span {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: uppercase;
}

.gmp-category-card strong {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	border-radius: 999px;
	background: var(--gmp-soft);
	color: var(--gmp-accent-strong);
	font-size: 18px;
}

.gmp-match-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.gmp-match-card {
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	min-height: 110px;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
}

.gmp-match-card span {
	margin-top: 8px;
	color: var(--gmp-muted);
	font-size: 14px;
	font-weight: 600;
}

.gmp-back-button,
.gmp-secondary-button,
.gmp-download-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 14px;
	border: 1px solid var(--gmp-line);
	border-radius: 6px;
	background: #fff;
	color: var(--gmp-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.1;
	cursor: pointer;
	text-decoration: none;
}

.gmp-back-button:hover,
.gmp-secondary-button:hover {
	border-color: var(--gmp-accent);
	color: var(--gmp-accent-strong);
}

.gmp-download-button {
	border-color: var(--gmp-accent);
	background: var(--gmp-accent);
	color: #fff;
}

.gmp-download-button:hover,
.gmp-download-button:focus-visible {
	border-color: var(--gmp-accent-strong);
	background: var(--gmp-accent-strong);
	color: #fff;
}

.gmp-download-button:disabled {
	opacity: 0.65;
	cursor: wait;
}

.gmp-photo-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding: 12px 0;
	border-top: 1px solid var(--gmp-line);
	border-bottom: 1px solid var(--gmp-line);
	color: var(--gmp-muted);
	font-weight: 700;
}

.gmp-photo-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.gmp-photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
	gap: 14px;
}

.gmp-photo-tile {
	position: relative;
	display: block;
	overflow: hidden;
	border: 1px solid var(--gmp-line);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}

.gmp-photo-tile:focus-within,
.gmp-photo-tile:hover {
	border-color: var(--gmp-accent);
	box-shadow: 0 10px 22px rgba(23, 32, 51, 0.12);
}

.gmp-photo-tile input {
	position: absolute;
	z-index: 2;
	top: 10px;
	left: 10px;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--gmp-accent);
}

.gmp-photo-preview {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

.gmp-photo-preview img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--gmp-soft);
}

.gmp-photo-tile__body {
	display: block;
	padding: 10px;
}

.gmp-photo-tile__body strong {
	display: block;
	overflow: hidden;
	margin-bottom: 6px;
	color: var(--gmp-ink);
	font-size: 13px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gmp-photo-tile__body a {
	color: var(--gmp-accent-strong);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.gmp-photo-tile__body a:hover {
	text-decoration: underline;
}

.gmp-empty-state {
	margin: 0;
	padding: 18px;
	border: 1px dashed var(--gmp-line);
	border-radius: 8px;
	background: var(--gmp-soft);
	color: var(--gmp-muted);
	font-weight: 700;
}

.gmp-status {
	min-height: 22px;
	margin: 14px 0 0;
	color: var(--gmp-muted);
	font-weight: 700;
}

.gmp-status.is-error {
	color: var(--gmp-danger);
}

body.gmp-lightbox-open {
	overflow: hidden;
}

.gmp-lightbox[hidden] {
	display: none;
}

.gmp-lightbox {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	place-items: center;
	gap: 14px;
	padding: 64px 76px 34px;
	background: rgba(14, 20, 32, 0.88);
}

.gmp-lightbox img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	border-radius: 8px;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
	object-fit: contain;
	transition: transform 160ms ease;
	transform-origin: center;
}

.gmp-lightbox img.is-rotated-sideways {
	max-width: min(100%, calc(100vh - 190px));
	max-height: calc(100vw - 150px);
}

.gmp-lightbox strong {
	overflow: hidden;
	max-width: min(760px, 100%);
	color: #fff;
	font-size: 15px;
	line-height: 1.3;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gmp-lightbox__close,
.gmp-lightbox__rotate,
.gmp-lightbox__nav {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font: inherit;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
}

.gmp-lightbox__close:hover,
.gmp-lightbox__close:focus-visible,
.gmp-lightbox__rotate:hover,
.gmp-lightbox__rotate:focus-visible,
.gmp-lightbox__nav:hover,
.gmp-lightbox__nav:focus-visible {
	background: rgba(255, 255, 255, 0.28);
	outline: none;
}

.gmp-lightbox__close {
	top: 18px;
	right: 18px;
	width: 42px;
	height: 42px;
	font-size: 18px;
}

.gmp-lightbox__rotate {
	top: 18px;
	right: 72px;
	min-width: 84px;
	height: 42px;
	padding: 0 14px;
	font-size: 14px;
}

.gmp-lightbox__nav {
	top: 50%;
	width: 46px;
	height: 46px;
	font-size: 24px;
	transform: translateY(-50%);
}

.gmp-lightbox__nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.gmp-lightbox__nav--previous {
	left: 18px;
}

.gmp-lightbox__nav--next {
	right: 18px;
}

@media (max-width: 700px) {
	.gmp-view-header,
	.gmp-photo-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.gmp-category-grid {
		grid-template-columns: 1fr;
	}

	.gmp-photo-actions {
		justify-content: stretch;
	}

	.gmp-photo-actions button {
		flex: 1 1 150px;
	}

	.gmp-lightbox {
		padding: 60px 14px 28px;
	}

	.gmp-lightbox img {
		max-height: calc(100vh - 170px);
	}

	.gmp-lightbox img.is-rotated-sideways {
		max-width: min(100%, calc(100vh - 200px));
		max-height: calc(100vw - 42px);
	}

	.gmp-lightbox__nav {
		top: auto;
		bottom: 20px;
		transform: none;
	}

	.gmp-lightbox__rotate {
		right: 68px;
		min-width: 72px;
		padding: 0 10px;
	}
}
