:root {
	--page-bg: #f5f6f7;
	--ink: #151719;
	--muted: #68707a;
	--line: #dfe3e8;
	--panel: #ffffff;
	--brand: #df2f2f;
	--brand-dark: #b91f25;
	--viewer: #111214;
	--viewer-soft: rgba(255, 255, 255, 0.12);
	--shadow: 0 16px 40px rgba(21, 23, 25, 0.12);
	--radius: 8px;
	--header-h: 74px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	touch-action: manipulation;
}

body {
	min-width: 320px;
	margin: 0;
	background: var(--page-bg);
	color: var(--ink);
	font-family: Arial, "Noto Sans KR", "Malgun Gothic", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0;
}

body.is-locked {
	overflow: hidden;
}

button {
	font: inherit;
}

img {
	display: block;
	max-width: 100%;
}

button,
a,
.page-card,
.viewer,
.viewer__image,
.viewer__thumb-trigger,
.viewer__thumbs {
	touch-action: manipulation;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--header-h);
	padding: 18px clamp(18px, 4vw, 52px);
	border-bottom: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.brand__mark {
	display: inline-grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	color: var(--brand);
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
}

.brand__text {
	min-width: 0;
}

.brand__title {
	margin: 0;
	color: var(--ink);
	font-size: clamp(20px, 3vw, 30px);
	font-weight: 800;
	line-height: 1.1;
	white-space: nowrap;
}

.brand__meta {
	margin-top: 4px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.header-count {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	color: var(--muted);
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
}

.catalog-shell {
	width: min(1280px, calc(100% - 36px));
	margin: 0 auto;
	padding: clamp(24px, 5vw, 48px) 0 clamp(58px, 8vw, 92px);
}

.catalog-lead {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px;
	align-items: end;
	margin-bottom: 22px;
}

.catalog-lead h2 {
	margin: 0;
	font-size: clamp(24px, 3.8vw, 42px);
	font-weight: 800;
	line-height: 1.12;
}

.catalog-lead p {
	margin: 10px 0 0;
	max-width: 560px;
	color: var(--muted);
	font-size: 15px;
}

.catalog-year {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 84px;
	min-height: 44px;
	padding: 0 16px;
	border-radius: var(--radius);
	background: var(--ink);
	color: #ffffff;
	font-size: 15px;
	font-weight: 800;
}

.catalog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
	gap: clamp(12px, 2vw, 20px);
}

.page-card {
	position: relative;
	display: grid;
	gap: 10px;
	min-width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.page-card__image {
	position: relative;
	aspect-ratio: 200 / 292;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #ffffff;
	box-shadow: 0 8px 22px rgba(21, 23, 25, 0.08);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.page-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.page-card__number {
	position: absolute;
	top: 8px;
	left: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 26px;
	border-radius: 999px;
	background: rgba(17, 18, 20, 0.78);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
}

.page-card__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--muted);
	font-size: 13px;
	font-weight: 800;
}

.page-card__label::after {
	width: 22px;
	height: 1px;
	background: var(--brand);
	content: "";
}

.page-card:hover .page-card__image,
.page-card:focus-visible .page-card__image {
	border-color: rgba(223, 47, 47, 0.48);
	box-shadow: var(--shadow);
	transform: translateY(-4px);
}

.page-card:focus-visible {
	outline: 3px solid rgba(223, 47, 47, 0.28);
	outline-offset: 6px;
	border-radius: var(--radius);
}

.viewer {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: none;
	grid-template-rows: auto minmax(0, 1fr);
	background: var(--viewer);
	color: #ffffff;
	overflow: hidden;
}

.viewer.is-open {
	display: grid;
}

.viewer__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 14px;
	min-height: 66px;
	padding: 14px clamp(14px, 3vw, 34px);
	border-bottom: 1px solid var(--viewer-soft);
}

.viewer__brand {
	min-width: 0;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.viewer__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 88px;
	height: 36px;
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.1);
	font-size: 14px;
	font-weight: 800;
}

.viewer__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	cursor: pointer;
	transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
	border-color: rgba(255, 255, 255, 0.42);
	background: rgba(255, 255, 255, 0.16);
}

.icon-button:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.22);
	outline-offset: 2px;
}

.icon-button:active {
	transform: translateY(1px);
}

.icon-button:disabled {
	cursor: not-allowed;
	opacity: 0.42;
	transform: none;
}

.viewer__stage {
	position: relative;
	display: grid;
	min-height: 0;
	padding: clamp(12px, 2.4vw, 30px) clamp(48px, 7vw, 96px);
}

.viewer__image-wrap {
	display: grid;
	height: 100%;
	min-height: 0;
	overflow: hidden;
	place-items: center;
}

.viewer__image {
	width: auto;
	height: auto;
	max-width: min(100%, 72vh);
	max-height: calc(100vh - 126px);
	border-radius: var(--radius);
	background: #ffffff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
	object-fit: contain;
	cursor: zoom-in;
	transform: translate3d(var(--pan-x, 0px), var(--pan-y, 0px), 0) scale(var(--zoom, 1));
	transform-origin: center center;
	transition: transform 160ms ease;
	user-select: none;
	-webkit-user-drag: none;
}

.viewer__image.is-zoomed {
	cursor: grab;
}

.viewer__image.is-dragging {
	cursor: grabbing;
	transition: none;
}

.nav-button {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 62px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background 160ms ease, border-color 160ms ease;
}

.nav-button:hover,
.nav-button:focus-visible {
	border-color: rgba(255, 255, 255, 0.36);
	background: rgba(255, 255, 255, 0.16);
}

.nav-button:disabled {
	cursor: not-allowed;
	opacity: 0.28;
	pointer-events: none;
}

.nav-button:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.22);
	outline-offset: 2px;
}

.nav-button--prev {
	left: clamp(12px, 2vw, 34px);
}

.nav-button--next {
	right: clamp(12px, 2vw, 34px);
}

.viewer__thumbs {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 4;
	display: flex;
	gap: 10px;
	justify-content: center;
	min-height: 112px;
	padding: 14px clamp(14px, 3vw, 34px) 18px;
	overflow-x: auto;
	border-top: 1px solid var(--viewer-soft);
	background: rgba(12, 13, 15, 0.88);
	box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.36);
	scrollbar-color: rgba(255, 255, 255, 0.36) transparent;
	transform: translateY(100%);
	transition: transform 240ms ease;
}

.viewer__thumb-trigger {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	height: 48px;
}

.viewer__thumb-trigger:hover + .viewer__thumbs,
.viewer.is-thumbs-visible .viewer__thumbs,
.viewer__thumbs:hover,
.viewer__thumbs:focus-within {
	transform: translateY(0);
}

.thumb-button {
	position: relative;
	flex: 0 0 62px;
	width: 62px;
	aspect-ratio: 200 / 292;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: var(--radius);
	background: #ffffff;
	cursor: pointer;
	opacity: 0.58;
	transition: opacity 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.thumb-button img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.thumb-button.is-active {
	border-color: var(--brand);
	opacity: 1;
	transform: translateY(-2px);
}

.thumb-button:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.24);
	outline-offset: 2px;
}

.copyright {
	padding: 24px 18px 30px;
	border-top: 1px solid var(--line);
	background: #ffffff;
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

@media (max-width: 760px) {
	:root {
		--header-h: 64px;
	}

	.site-header {
		padding: 14px 16px;
	}

	.brand {
		gap: 9px;
	}

	.brand__mark {
		width: 34px;
		height: 34px;
		font-size: 16px;
	}

	.brand__title {
		font-size: 20px;
	}

	.brand__meta {
		font-size: 12px;
	}

	.header-count {
		display: none;
	}

	.catalog-shell {
		width: min(100% - 24px, 680px);
		padding-top: 24px;
	}

	.catalog-lead {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.catalog-lead p {
		font-size: 14px;
	}

	.catalog-year {
		justify-self: start;
		min-height: 38px;
		font-size: 14px;
	}

	.catalog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.viewer__bar {
		grid-template-columns: 1fr auto auto;
		min-height: 58px;
		padding: 10px 12px;
	}

	.viewer__brand {
		font-size: 13px;
	}

	.viewer__count {
		min-width: 68px;
		height: 34px;
		font-size: 13px;
	}

	#zoomOut,
	#zoomIn {
		display: none;
	}

	.viewer__stage {
		padding: 12px 12px 16px;
	}

	.viewer__image {
		width: auto;
		height: auto;
		max-width: min(100%, 76vh);
		max-height: calc(100vh - 98px);
	}

	.nav-button {
		top: 50%;
		bottom: auto;
		width: 44px;
		height: 44px;
		font-size: 26px;
		transform: translateY(-50%);
	}

	.nav-button--prev {
		left: 12px;
	}

	.nav-button--next {
		right: 12px;
	}

	.viewer__thumbs {
		justify-content: flex-start;
		min-height: 96px;
		padding: 10px 12px 12px;
	}

	.viewer__thumb-trigger {
		height: 64px;
	}

	.thumb-button {
		flex-basis: 52px;
		width: 52px;
	}
}

@media (max-width: 420px) {
	.catalog-grid {
		gap: 12px;
	}

	.page-card__label {
		font-size: 12px;
	}

	.viewer__actions {
		gap: 6px;
	}

	.icon-button {
		width: 34px;
		height: 34px;
	}
}
