.wpgm-gallery {
	--wpgm-ink: #202a24;
	--wpgm-muted: #6b746e;
	--wpgm-line: #dfe5e0;
	--wpgm-accent: #346447;
	--wpgm-soft: #f3f6f3;
	color: var(--wpgm-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Malgun Gothic", sans-serif;
	max-width: 1180px;
	margin: 0 auto;
}

.wpgm-gallery *,
.wpgm-gallery *::before,
.wpgm-gallery *::after {
	box-sizing: border-box;
}

.wpgm-gallery-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	padding: 8px 0 22px;
	border-bottom: 1px solid var(--wpgm-line);
	margin-bottom: 28px;
}

.wpgm-gallery-header h2,
.wpgm-detail-header h1 {
	color: var(--wpgm-ink);
	font-size: clamp(26px, 4vw, 38px);
	line-height: 1.25;
	letter-spacing: -0.035em;
	margin: 0 0 7px;
}

.wpgm-gallery-header p,
.wpgm-card-meta,
.wpgm-detail-header p {
	color: var(--wpgm-muted);
	font-size: 14px;
	margin: 0;
}

.wpgm-search {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: min(100%, 410px);
}

.wpgm-search input[type="search"] {
	background: #fff;
	border: 1px solid #bfc9c2;
	border-radius: 6px;
	color: var(--wpgm-ink);
	font-size: 15px;
	height: 42px;
	margin: 0;
	min-width: 0;
	padding: 0 13px;
	width: 100%;
}

.wpgm-search button,
.wpgm-reset,
.wpgm-back {
	align-items: center;
	background: var(--wpgm-accent);
	border: 1px solid var(--wpgm-accent);
	border-radius: 6px;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 14px;
	font-weight: 700;
	height: 42px;
	justify-content: center;
	line-height: 1;
	padding: 0 17px;
	text-decoration: none;
	white-space: nowrap;
}

.wpgm-reset {
	background: #fff;
	border-color: #bfc9c2;
	color: var(--wpgm-ink);
}

.wpgm-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px 22px;
}

.wpgm-card {
	background: #fff;
	border: 1px solid var(--wpgm-line);
	border-radius: 9px;
	box-shadow: 0 3px 14px rgba(31, 54, 40, 0.06);
	margin: 0;
	overflow: hidden;
}

.wpgm-card-image {
	background: var(--wpgm-soft);
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.wpgm-card-image img {
	display: block;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	transition: transform 180ms ease;
	width: 100% !important;
}

.wpgm-card:hover .wpgm-card-image img {
	transform: scale(1.025);
}

.wpgm-placeholder {
	align-items: center;
	color: #89938c;
	display: flex;
	font-size: 14px;
	height: 100%;
	justify-content: center;
}

.wpgm-card-body {
	padding: 17px 17px 16px;
}

.wpgm-card h3 {
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.45;
	margin: 0 0 12px;
}

.wpgm-card h3 a {
	color: var(--wpgm-ink);
	text-decoration: none;
}

.wpgm-card-meta,
.wpgm-detail-header p {
	display: flex;
	flex-wrap: wrap;
	gap: 7px 16px;
}

.wpgm-pagination {
	margin-top: 36px;
	text-align: center;
}

.wpgm-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpgm-pagination a,
.wpgm-pagination span {
	align-items: center;
	border: 1px solid var(--wpgm-line);
	border-radius: 5px;
	color: var(--wpgm-ink);
	display: flex;
	font-size: 14px;
	height: 38px;
	justify-content: center;
	min-width: 38px;
	padding: 0 10px;
	text-decoration: none;
}

.wpgm-pagination .current {
	background: var(--wpgm-accent);
	border-color: var(--wpgm-accent);
	color: #fff;
}

.wpgm-notice {
	background: var(--wpgm-soft);
	border: 1px solid var(--wpgm-line);
	border-radius: 7px;
	padding: 22px;
}

.wpgm-detail {
	max-width: 920px;
}

.wpgm-back {
	background: #fff;
	border-color: #bfc9c2;
	color: var(--wpgm-ink);
	height: 38px;
	margin-bottom: 22px;
	padding: 0 14px;
}

.wpgm-detail-header {
	border-bottom: 1px solid var(--wpgm-line);
	margin-bottom: 28px;
	padding-bottom: 23px;
}

.wpgm-content {
	font-size: 16px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.wpgm-content img,
.kboard-content img[src*="cdn.imweb.me"] {
	display: inline-block;
	height: auto !important;
	max-width: 100% !important;
}

.wpgm-content iframe,
.kboard-content iframe {
	border: 0;
	display: block;
	max-width: 100%;
}

.wpgm-content a {
	color: var(--wpgm-accent);
	text-decoration: underline;
}

.wpgm-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.wpgm-back-bottom {
	margin: 34px 0 0;
}

@media (max-width: 860px) {
	.wpgm-gallery-header {
		align-items: stretch;
		flex-direction: column;
	}

	.wpgm-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.wpgm-search {
		align-items: stretch;
		flex-wrap: wrap;
	}

	.wpgm-search input[type="search"] {
		flex: 1 1 100%;
	}

	.wpgm-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.wpgm-card-image {
		aspect-ratio: 16 / 10;
	}
}
