:root {
	--paper: #e9e1d3;
	--ink: #7b452b;
	--green: #075b51;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
	background: #16130f;
	font-family: Arial, "Noto Sans KR", sans-serif;
}

body {
	overflow-x: hidden;
}

button,
input {
	font: inherit;
}

.invitation {
	position: relative;
	width: 100%;
	max-width: 540px;
	min-height: 100vh;
	margin: 0 auto;
	background: var(--paper);
	box-shadow: 0 0 38px rgba(0, 0, 0, .42);
}

.slider {
	width: 100%;
	overflow: hidden;
	transition: height .32s ease;
}

.slider-track {
	display: flex;
	align-items: flex-start;
	width: 100%;
	transition: transform .42s cubic-bezier(.22, .61, .36, 1);
	will-change: transform;
}

.slider-track.dragging {
	transition: none;
}

.slide {
	flex: 0 0 100%;
	width: 100%;
	position: relative;
}

.slide > img,
.form-canvas > img {
	display: block;
	width: 100%;
	height: auto;
	user-select: none;
	-webkit-user-drag: none;
}

.form-canvas {
	position: relative;
	width: 100%;
}

.rsvp-form {
	position: absolute;
	inset: 0;
}

.honeypot {
	position: fixed !important;
	left: -10000px !important;
	top: -10000px !important;
}

.choice {
	position: absolute;
	display: block;
	cursor: pointer;
	touch-action: manipulation;
}

.choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.choice span {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	color: #075b51;
	font-size: clamp(15px, 4vw, 31px);
	font-weight: 900;
	line-height: 1;
	text-shadow: 0 1px 0 #fff;
}

.choice input:checked + span {
	display: flex;
}

.choice input:checked + span::after {
	content: "✓";
	transform: translateY(-8%);
}

.choice:focus-within {
	outline: 2px solid rgba(7, 91, 81, .5);
	outline-offset: 2px;
}

.adult-yes { left: 9.4%; top: 21.95%; width: 3.2%; height: 1.05%; }
.adult-no { left: 18.8%; top: 21.95%; width: 3.2%; height: 1.05%; }
.companion-yes { left: 9.4%; top: 38.40%; width: 3.2%; height: 1.05%; }
.companion-no { left: 31.0%; top: 38.40%; width: 3.2%; height: 1.05%; }
.privacy-yes { left: 9.4%; top: 74.35%; width: 3.2%; height: 1.05%; }
.privacy-no { left: 31.0%; top: 74.35%; width: 3.2%; height: 1.05%; }
.photo-yes { left: 9.4%; top: 84.72%; width: 3.2%; height: 1.05%; }

.line-input {
	position: absolute;
	left: 30.2%;
	width: 60.4%;
	height: 2.6%;
	padding: 0 1%;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	color: #3d352d;
	font-size: clamp(14px, 3.35vw, 29px);
	line-height: 1.2;
}

.line-input:focus {
	background: rgba(255, 255, 255, .2);
}

.line-input:disabled {
	opacity: 0;
	cursor: not-allowed;
}

.line-input::placeholder {
	color: rgba(61, 53, 45, .38);
}

.applicant-name { top: 27.55%; }
.applicant-phone { top: 31.45%; }
.companion-name { top: 44.15%; }
.companion-phone { top: 48.00%; }

.submit-button {
	position: absolute;
	left: 20.2%;
	top: 93.15%;
	width: 59.7%;
	height: 4.0%;
	border: 0;
	background: transparent;
	color: transparent;
	cursor: pointer;
	touch-action: manipulation;
}

.submit-button span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.submit-button:disabled {
	cursor: wait;
}

.submit-button:focus-visible {
	outline: 4px solid rgba(255, 255, 255, .8);
	outline-offset: -6px;
}

.nav-arrow {
	position: fixed;
	z-index: 20;
	top: 50%;
	width: 42px;
	height: 58px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 6px;
	background: rgba(0, 0, 0, .28);
	color: #fff;
	font-family: Georgia, serif;
	font-size: 42px;
	line-height: 52px;
	cursor: pointer;
	backdrop-filter: blur(3px);
}

.nav-prev { left: max(8px, calc(50% - 270px + 8px)); }
.nav-next { right: max(8px, calc(50% - 270px + 8px)); }

.nav-arrow[hidden] {
	display: none;
}

.pagination {
	position: fixed;
	z-index: 21;
	left: 50%;
	bottom: max(14px, env(safe-area-inset-bottom));
	display: flex;
	gap: 8px;
	transform: translateX(-50%);
	padding: 8px 11px;
	border-radius: 20px;
	background: rgba(0, 0, 0, .25);
	backdrop-filter: blur(3px);
}

.pagination button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .55);
	cursor: pointer;
}

.pagination button.active {
	background: #fff;
	transform: scale(1.35);
}

.modal[hidden] {
	display: none;
}

.modal {
	position: fixed;
	z-index: 100;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, .58);
}

.modal-panel {
	width: min(100%, 390px);
	padding: 30px 24px 24px;
	border-radius: 12px;
	background: #f2eadc;
	color: #46382f;
	text-align: center;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
}

.modal-panel h2 {
	margin: 0 0 14px;
	font-size: 22px;
}

.modal-panel p {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.65;
	word-break: keep-all;
}

.modal-panel button {
	width: 100%;
	padding: 13px;
	border: 0;
	border-radius: 6px;
	background: #218474;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 620px) {
	.nav-arrow {
		width: 34px;
		height: 48px;
		font-size: 34px;
		line-height: 44px;
	}
	.nav-prev { left: 5px; }
	.nav-next { right: 5px; }
}

@media (prefers-reduced-motion: reduce) {
	.slider,
	.slider-track {
		transition: none;
	}
}
