/* Shared preview/frontend baseline. ID specificity protects against theme article
 * selectors without !important. {{gallery}} custom CSS can still override it. */
:is(#hbrg-style-scope, .hbrg-gallery) {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", Meiryo, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	color: #3c434a;
}
:is(#hbrg-style-scope, .hbrg-gallery) :where(figure, figcaption, img, strong, time, ul, li, a, button, input, select, p) {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}
:is(#hbrg-style-scope, .hbrg-gallery) :where(.hbrg-item, .hbrg-caption, .hbrg-image, .hbrg-image-link, .hbrg-variety, .hbrg-date) {
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
}
:is(#hbrg-style-scope, .hbrg-gallery) :where(.hbrg-image-link, .hbrg-product-button, .hbrg-filter-reset, .hbrg-pagination a) {
	text-decoration: none;
	box-shadow: none;
	background-image: none;
	opacity: 1;
}
:is(#hbrg-style-scope, .hbrg-gallery) :where(.hbrg-image-link, .hbrg-product-button, .hbrg-filter-reset, .hbrg-pagination a)::before,
:is(#hbrg-style-scope, .hbrg-gallery) :where(.hbrg-image-link, .hbrg-product-button, .hbrg-filter-reset, .hbrg-pagination a)::after {
	content: none;
}
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-variety {
	font-size: inherit;
	font-weight: 700;
	color: inherit;
	line-height: inherit;
}
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-pagination li {
	margin: 0;
	padding: 0;
	list-style: none;
}
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-info-value {
	list-style: none;
}
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-info-value::before {
	content: none;
}
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-button {
	width: fit-content;
	height: auto;
	text-align: center;
	vertical-align: middle;
}

:is(#hbrg-style-scope, .hbrg-gallery) {
	box-sizing: border-box;
	width: 100%;
}

:is(#hbrg-style-scope, .hbrg-gallery) *,
:is(#hbrg-style-scope, .hbrg-gallery) *::before,
:is(#hbrg-style-scope, .hbrg-gallery) *::after {
	box-sizing: inherit;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-grid {
	display: grid;
	grid-template-columns: repeat(var(--hbrg-columns, 3), minmax(0, 1fr));
	gap: clamp(12px, 2vw, 24px);
	margin: 0;
	padding: 0;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-form {
	margin: 0 0 clamp(20px, 3vw, 32px);
	padding: clamp(14px, 2vw, 20px);
	border: 1px solid #deded9;
	border-radius: 4px;
	background: #f8f8f5;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
	gap: 14px;
	align-items: end;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-form label {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 14.4px;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-form select,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-form input,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-submit,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-reset {
	min-height: 42px;
	box-sizing: border-box;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-form select,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-form input {
	width: 100%;
	margin: 0;
	padding: 7px 10px;
	border: 1px solid #b8b8b2;
	border-radius: 3px;
	background: #fff;
	color: inherit;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-actions {
	display: flex;
	gap: 9px;
	align-items: center;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-submit,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border: 1px solid #667d6c;
	border-radius: 3px;
	font: inherit;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-submit {
	background: #667d6c;
	color: #fff;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-reset {
	background: #fff;
	color: #3f5044;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-item {
	position: relative;
	width: var(--hbrg-item-width, 100%);
	margin: 0 auto;
	background: #fff;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-image-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--hbrg-aspect-ratio, auto);
	object-fit: var(--hbrg-image-fit, cover);
	border: 0;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-caption {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 4px 12px;
	align-items: baseline;
	padding: 10.4px 2.4px 0;
	font-size: 14.4px;
	line-height: 1.5;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-variety:empty,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-date:empty,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-new:empty {
	display: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-button {
	display: inline-flex;
	grid-column: 1 / -1;
	justify-self: center;
	min-height: 40px;
	max-width: 100%;
	align-items: center;
	justify-content: center;
	margin: 5.6px auto 0;
	padding: 8.8px 16px;
	border: 1px solid #667d6c;
	border-radius: 3px;
	background: #fff;
	color: #3f5044;
	font-size: 14.4px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-info {
	display: flex;
	grid-column: 1 / -1;
	width: 100%;
	flex-wrap: wrap;
	gap: 2.4px 0;
	margin: 5.6px 0 0;
	padding: 0 2.4px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #49534c;
	box-shadow: none;
	list-style: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-info-value {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #49534c;
	font-size: 12.16px;
	font-weight: 500;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-info-value + .hbrg-product-info-value::before {
	content: "・";
	margin: 0 5.6px;
	color: #929993;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-button:hover,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-button:focus-visible {
	border-color: #3f5044;
	background: #f3f5f2;
	color: #2f3d33;
	text-decoration: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-product-button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-date {
	color: #666;
	font-size: 0.82em;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-new {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 0.2em 0.55em;
	border-radius: 2px;
	background: #6f8976;
	color: #fff;
	font-size: 11.2px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 5.6px;
	justify-content: center;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-pagination a,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-pagination .current {
	display: inline-flex;
	min-width: 38.4px;
	min-height: 38.4px;
	align-items: center;
	justify-content: center;
	padding: 5.6px 9.6px;
	border: 1px solid #d8d8d8;
	background: #fff;
	color: inherit;
	text-decoration: none;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-pagination .current {
	border-color: #6f8976;
	background: #6f8976;
	color: #fff;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-lightbox {
	width: min(94vw, 1200px);
	max-width: none;
	height: min(94vh, 900px);
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.82);
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-lightbox-content {
	display: flex;
	height: 100%;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: calc(100% - 48px);
	width: auto;
	height: auto;
	object-fit: contain;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-lightbox-title {
	margin: 8px 0 0;
	color: #fff;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-lightbox-close {
	position: absolute;
	top: -4px;
	right: 0;
	z-index: 1;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
}

:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-empty,
:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-notice {
	padding: 16px;
	background: #f7f7f5;
	text-align: center;
}

@media (max-width: 900px) {
	:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-grid {
		grid-template-columns: repeat(var(--hbrg-columns-tablet, 2), minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-grid {
		grid-template-columns: 1fr;
	}

	:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-filter-actions {
		align-items: stretch;
		flex-direction: column;
	}

	:is(#hbrg-style-scope, .hbrg-gallery) .hbrg-grid {
		grid-template-columns: repeat(var(--hbrg-columns-mobile, 1), minmax(0, 1fr));
		gap: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	:is(#hbrg-style-scope, .hbrg-gallery) *,
	:is(#hbrg-style-scope, .hbrg-gallery) *::before,
	:is(#hbrg-style-scope, .hbrg-gallery) *::after {
		scroll-behavior: auto !important;
	}
}
