:root {
	--color-ink: #133c50;
	--color-deep: #072c40;
	--color-accent: #f4838b;
	--color-soft: #edf5f8;
	--shadow-card: 0 0.65vw 1.8vw rgba(18, 55, 72, 0.2);
	--shadow-modal: 0 1vw 4vw rgba(0, 24, 38, 0.38);
	--row-side-padding: 3.2vw;
	--siwha-height: 35.5vh;
	--postcard-height: 23.5vh;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: #d7e7ee;
	font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
	color: var(--color-deep);
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
}

button,
input {
	font: inherit;
}

button {
	-webkit-tap-highlight-color: transparent;
}

.kiosk-app,
.gallery-screen {
	position: relative;
	width: 100%;
	height: 100%;
}

.gallery-screen {
	overflow: hidden;
	background-image: url("background.png");
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.gallery-row {
	position: absolute;
	left: 0;
	width: 100%;
	overflow-x: scroll;
	overflow-y: hidden;
	scrollbar-width: none;
	touch-action: none;
	cursor: grab;
	overscroll-behavior-x: none;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: auto;
	contain: layout paint style;
	isolation: isolate;
	will-change: scroll-position;
	transform: translateZ(0);
}

.gallery-row::-webkit-scrollbar {
	display: none;
}

.gallery-row.is-dragging {
	cursor: grabbing;
}

.gallery-row--siwha {
	top: 15.8vh;
	height: var(--siwha-height);
}

.gallery-row--postcard {
	top: 62.5vh;
	height: var(--postcard-height);
}

.gallery-track {
	display: flex;
	align-items: center;
	width: max-content;
	height: 100%;
	gap: 1.45vw;
	padding: 0 var(--row-side-padding);
	contain: layout style;
}

.work-card {
	position: relative;
	flex: 0 0 auto;
	height: calc(100% - 1.1vh);
	margin: 0;
	padding: 0.28vw;
	overflow: hidden;
	border: 0.08vw solid rgba(255, 255, 255, 0.82);
	border-radius: 1.15vw;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: var(--shadow-card);
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.work-card:focus-visible {
	outline: 0.22vw solid rgba(244, 131, 139, 0.95);
	outline-offset: 0.2vw;
}

.work-card:active {
	transform: scale(0.985);
}

.work-card img {
	display: block;
	width: auto;
	height: 100%;
	border-radius: 0.9vw;
	object-fit: contain;
	pointer-events: none;
	-webkit-user-drag: none;
}

.row-title {
	position: absolute;
	z-index: 2;
	left: 1.55vw;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 5.8vw;
	height: 2.35vw;
	padding: 0 0.9vw;
	border: 0.08vw solid rgba(255, 255, 255, 0.78);
	border-radius: 2vw;
	background: rgba(6, 64, 88, 0.82);
	box-shadow: 0 0.35vw 0.95vw rgba(5, 42, 57, 0.22);
	color: #fff;
	font-size: clamp(0.92rem, 1.03vw, 2.55rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	backdrop-filter: blur(0.35vw);
}

.row-title--siwha {
	top: 12.6vh;
}

.row-title--postcard {
	top: 59.2vh;
}

.fullscreen-button {
	position: fixed;
	z-index: 5;
	right: 1.25vw;
	bottom: 1.4vh;
	display: grid;
	place-items: center;
	width: 2.75vw;
	aspect-ratio: 1;
	padding: 0.63vw;
	border: 0.08vw solid rgba(255, 255, 255, 0.82);
	border-radius: 50%;
	background: rgba(7, 44, 64, 0.74);
	box-shadow: 0 0.35vw 1.2vw rgba(3, 35, 50, 0.25);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(0.35vw);
}

.fullscreen-button svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

:fullscreen .fullscreen-button {
	display: none;
}

.work-modal[hidden] {
	display: none;
}

.work-modal {
	position: fixed;
	z-index: 50;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 3.2vh 2.2vw;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 25, 38, 0.78);
	backdrop-filter: blur(0.42vw);
}

.modal-dialog {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 64%) minmax(0, 36%);
	gap: 2.2vw;
	width: 62.5vw;
	height: 92.5vh;
	padding: 2.05vw;
	border: 0.08vw solid rgba(255, 255, 255, 0.88);
	border-radius: 1.65vw;
	background: rgba(250, 253, 254, 0.98);
	box-shadow: var(--shadow-modal);
	overflow: hidden;
}

.modal-close {
	position: absolute;
	z-index: 4;
	top: 1.1vw;
	right: 1.15vw;
	display: grid;
	place-items: center;
	width: 2.8vw;
	aspect-ratio: 1;
	padding: 0 0 0.12vw;
	border: 0;
	border-radius: 50%;
	background: var(--color-deep);
	box-shadow: 0 0.35vw 0.9vw rgba(4, 39, 55, 0.24);
	color: #fff;
	font-size: clamp(1.65rem, 2.15vw, 5.4rem);
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.modal-art-stage {
	display: grid;
	place-items: center;
	min-width: 0;
	min-height: 0;
	padding: 0.55vw;
	border-radius: 1.15vw;
	background: #f1f4f5;
	overflow: hidden;
}

.modal-art {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 0.85vw;
	box-shadow: 0 0.45vw 1.45vw rgba(20, 51, 66, 0.18);
	object-fit: contain;
	-webkit-user-drag: none;
}

.modal-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: 2.3vh 0.3vw 0.1vh 0;
}

.award-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55vw;
	padding-right: 3.4vw;
}

.award-badge,
.category-badge {
	display: inline-flex;
	align-items: center;
	min-height: 2.45vw;
	padding: 0.48vw 0.9vw;
	border-radius: 0.55vw;
	font-size: clamp(0.85rem, 0.92vw, 2.3rem);
	font-weight: 800;
	line-height: 1.25;
}

.award-badge {
	background: var(--color-accent);
	color: #fff;
}

.category-badge {
	background: #e3e6e8;
	color: #4a555b;
}

.modal-title {
	margin: 3.1vh 0 1.55vh;
	color: #091f2c;
	font-size: clamp(2rem, 2.75vw, 6.8rem);
	font-weight: 900;
	line-height: 1.18;
	letter-spacing: -0.055em;
	word-break: keep-all;
}

.modal-person {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.55vw;
	margin: 0 0 3.3vh;
	color: #263c47;
	font-size: clamp(1.05rem, 1.25vw, 3.1rem);
	line-height: 1.5;
	word-break: keep-all;
}

.modal-person strong {
	color: #081f2c;
	font-size: 1.18em;
	font-weight: 900;
}

.work-details {
	margin: 0;
	padding: 0;
	border-top: 0.08vw solid #dbe5e9;
}

.work-details > div {
	display: grid;
	grid-template-columns: 24% minmax(0, 76%);
	gap: 1vw;
	padding: 1.22vh 0;
	border-bottom: 0.08vw solid #e3ebee;
}

.work-details dt,
.work-details dd {
	margin: 0;
	font-size: clamp(0.85rem, 0.96vw, 2.4rem);
	line-height: 1.42;
	word-break: keep-all;
}

.work-details dt {
	color: #6e7e86;
	font-weight: 700;
}

.work-details dd {
	color: #122f3e;
	font-weight: 650;
}

.audio-card {
	margin-top: auto;
	padding: 1.4vw 1.45vw 1.2vw;
	border: 0.08vw solid #e4ecef;
	border-radius: 1.12vw;
	background: #fff;
	box-shadow: 0 0.45vw 1.4vw rgba(17, 55, 73, 0.09);
}

.audio-label {
	display: inline-flex;
	align-items: center;
	min-height: 1.9vw;
	margin-bottom: 1.25vh;
	padding: 0.3vw 0.6vw;
	border-radius: 0.4vw;
	background: #071f2c;
	color: #fff;
	font-size: clamp(0.75rem, 0.78vw, 1.95rem);
	font-weight: 800;
}

.audio-controls {
	display: flex;
	align-items: center;
	gap: 1.05vw;
}

.play-button {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: 3.7vw;
	aspect-ratio: 1;
	padding: 0.9vw;
	border: 0;
	border-radius: 50%;
	background: var(--color-deep);
	box-shadow: 0 0.35vw 0.9vw rgba(7, 44, 64, 0.22);
	color: #fff;
	cursor: pointer;
}

.play-button svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.play-button .icon-pause,
.play-button.is-playing .icon-play {
	display: none;
}

.play-button.is-playing .icon-pause {
	display: block;
}

.audio-progress-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.waveform {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 2.3vw;
	padding: 0 0.25vw;
	pointer-events: none;
}

.waveform i {
	display: block;
	width: 0.11vw;
	height: 38%;
	border-radius: 0.2vw;
	background: #d5dde1;
}

.waveform i:nth-child(3n) { height: 78%; }
.waveform i:nth-child(4n) { height: 55%; }
.waveform i:nth-child(5n) { height: 92%; }
.waveform i:nth-child(7n) { height: 68%; }

.audio-progress {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 2.3vw;
	margin: 0;
	opacity: 0.01;
	cursor: pointer;
}

.audio-time {
	display: flex;
	justify-content: space-between;
	margin-top: 0.35vh;
	color: #829099;
	font-size: clamp(0.62rem, 0.62vw, 1.55rem);
	font-variant-numeric: tabular-nums;
}

.audio-status {
	min-height: 1.35em;
	margin: 1.05vh 0 0;
	color: #74838b;
	font-size: clamp(0.68rem, 0.72vw, 1.8rem);
	line-height: 1.35;
	word-break: keep-all;
}

.audio-status.is-error {
	color: #c25058;
	font-weight: 700;
}

@media (orientation: portrait) {
	:root {
		--siwha-height: 29vh;
		--postcard-height: 20vh;
	}

	.gallery-screen {
		background-size: cover;
	}

	.gallery-row--siwha {
		top: 23vh;
	}

	.gallery-row--postcard {
		top: 64vh;
	}

	.row-title--siwha {
		top: 19.5vh;
	}

	.row-title--postcard {
		top: 60.6vh;
	}

	.modal-dialog {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(0, 58%) minmax(0, 42%);
		gap: 1.6vh;
		width: 93vw;
		height: 95vh;
		padding: 2.5vh 3vw;
	}

	.modal-info {
		padding: 0;
		overflow-y: auto;
	}

	.modal-title {
		margin: 1.7vh 0 0.8vh;
	}

	.modal-person {
		margin-bottom: 1.5vh;
	}

	.work-details {
		display: none;
	}

	.audio-card {
		margin-top: 1vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.work-card {
		transition: none;
	}
}

/* [추가] 키오스크 커서 숨김 — 마우스를 움직이면 3초간 표시 */
body.hide-cursor,
body.hide-cursor * {
	cursor: none !important;
}
