@font-face {
	font-family: Trirong;
	src: url(assets/trirong.woff2);
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: #faf7f2;
	color: #463936;
	font:
		15px/1.55 -apple-system,
		BlinkMacSystemFont,
		sans-serif;
}
header,
main {
	max-width: 900px;
	margin: auto;
	padding: 20px clamp(16px, 4vw, 40px);
}
header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e4dcd5;
}
header a,
legend,
h1 {
	font-family: Trirong, Georgia, serif;
}
a {
	color: #874f5b;
}
header a {
	color: inherit;
	text-decoration: none;
	font-size: 20px;
}
.hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 26px 0;
}
.hero img {
	width: 43%;
}
.hero p {
	max-width: 330px;
}
h1 {
	font-size: clamp(36px, 5vw, 58px);
	line-height: 1.12;
	margin: 20px 0;
}
em {
	color: #985d70;
}
fieldset,
#claim {
	background: #fffdf9;
	border: 1px solid #eadfd6;
	border-radius: 25px;
	padding: 22px;
	margin: 15px 0 28px;
	min-width: 0;
}
legend {
	font-size: 23px;
	padding: 0 6px;
}
.pair,
.choices,
.buttons {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}
.pair label {
	flex: 1 1 240px;
}
label {
	display: block;
	margin: 8px 0;
}
input,
select,
textarea {
	font: inherit;
	background: #fff;
	color: inherit;
	border: 1px solid #dbccc2;
	border-radius: 13px;
	padding: 11px;
	width: 100%;
	margin-top: 5px;
}
button {
	border: 1px solid #ddc9c2;
	border-radius: 20px;
	background: #fff9f5;
	color: #654d4c;
	padding: 12px 17px;
	cursor: pointer;
	font: inherit;
}
button[aria-pressed='true'],
button[type='submit'],
#accept {
	background: #895461;
	color: white;
}
.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
	gap: 12px;
	max-height: 480px;
	overflow: auto;
	padding: 4px;
}
.tiles button {
	padding: 5px 5px 10px;
	text-align: left;
	border-radius: 18px;
	font-size: 13px;
}
.tiles img {
	width: 100%;
	aspect-ratio: 4/5;
	object-fit: cover;
	border-radius: 13px;
}
.tiles span {
	display: block;
	padding: 4px;
}
button:disabled {
	opacity: 0.45;
	cursor: default;
}
p,
small {
	color: #735f57;
}
#status {
	min-height: 2em;
}
#files article {
	margin: 12px 0;
}
#files a {
	display: inline-block;
	padding: 7px;
}
#thanks {
	margin-top: 24px;
}
[hidden] {
	display: none !important;
}
:focus-visible {
	outline: 3px solid #b37e88;
	outline-offset: 3px;
}
@media (max-width: 500px) {
	fieldset {
		padding: 15px;
	}
	.pair {
		gap: 0;
	}
	.hero {
		padding: 10px 0;
	}
	.hero p {
		font-size: 13px;
	}
	.buttons button {
		width: 100%;
	}
}
#sealed {
	width: min(280px, 80%);
	aspect-ratio: 1;
	margin: 25px auto;
	position: relative;
	overflow: hidden;
}
#sealed img {
	position: absolute;
	bottom: 0;
	width: 100%;
}
#sealed .slip {
	width: 70%;
	left: 15%;
	animation: fold-paper 1.4s cubic-bezier(0.3, 0.02, 0.22, 1) both;
}
#sealed .shut {
	animation: close-flap 2s both;
}
#sealed .rear,
#sealed .front {
	animation: lower-flap 2s both;
}
@keyframes fold-paper {
	0% {
		transform: translateY(-15%) rotate(-3deg);
	}
	100% {
		transform: translateY(70%);
	}
}
@keyframes close-flap {
	0%,
	67% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}
@keyframes lower-flap {
	0%,
	70% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}
#review-letter,
#response-note {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	background: #fffaf5;
	border-radius: 22px;
	padding: 25px;
	margin: 15px 0;
	font:
		italic 20px/1.7 Trirong,
		serif;
}
#sealed .slip {
	clip-path: inset(0 0 10% 0);
}
@media (prefers-reduced-motion: reduce) {
	#sealed img {
		animation: none !important;
	}
	#sealed img:not(.shut) {
		visibility: hidden;
	}
}
#builder {
	max-width: 660px;
	margin: 0 auto;
	padding: 8px 0 24px;
}
#journey {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}
#previous {
	justify-self: start;
	background: transparent;
	border: 0;
	padding: 8px 0;
	min-height: 44px;
}
#previous:disabled {
	visibility: hidden;
}
#step-count {
	font-size: 13px;
	color: #765c60;
}
#step-progress {
	grid-column: 1/-1;
	width: 100%;
	height: 4px;
	border: 0;
	appearance: none;
	border-radius: 8px;
	background: #e8dfd9;
	color: #975c6a;
}
#step-progress::-webkit-progress-bar {
	background: #e8dfd9;
	border-radius: 8px;
}
#step-progress::-webkit-progress-value {
	background: #975c6a;
	border-radius: 8px;
	transition: width 0.24s;
}
#step-progress::-moz-progress-bar {
	background: #975c6a;
}
#slides {
	position: relative;
	overflow: clip;
	touch-action: pan-y;
}
.slide {
	background: #fffdf9;
	border: 1px solid #e8dfd7;
	box-shadow: 0 3px 14px #50382706;
	border-radius: 28px;
	padding: clamp(18px, 4vw, 36px);
	min-height: 250px;
}
.slide.outgoing {
	position: absolute;
	inset: 0 0 auto;
	pointer-events: none;
}
.slide h2,
.slide h1 {
	font:
		clamp(32px, 5vw, 48px)/1.15 Trirong,
		Georgia,
		serif;
	letter-spacing: -0.04em;
	margin: 3px 0 20px;
}
.slide h2 label {
	margin: 0;
}
.slide h1:focus,
.slide h2:focus {
	outline: 0;
}
.slide input:not([type='radio']),
.slide select,
.slide textarea {
	font-size: 17px;
	border-radius: 15px;
}
.package-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}
.package-hero img {
	width: 46%;
	max-height: 160px;
	object-fit: contain;
}
.package-hero p {
	font-size: 13px;
	margin: 0 0 8px;
}
.choices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px;
}
.choices button {
	min-height: 60px;
	border-radius: 17px;
	text-align: left;
	line-height: 1.45;
}
.tiles {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-height: min(55dvh, 560px);
}
.tiles button {
	position: relative;
}
.tiles button[aria-pressed='true']::after {
	content: '✓';
	position: absolute;
	right: 9px;
	top: 9px;
	background: #895461;
	color: white;
	border-radius: 50%;
	width: 23px;
	height: 23px;
	text-align: center;
}
#step-actions {
	position: sticky;
	bottom: 0;
	background: #faf7f2ef;
	backdrop-filter: blur(10px);
	padding: 12px 0 max(12px, env(safe-area-inset-bottom));
	z-index: 2;
}
#step-actions button {
	width: 100%;
	min-height: 50px;
	background: #895461;
	color: white;
	font-weight: 600;
}
.subtle {
	border: 0;
	background: none;
	color: #895461;
	text-decoration: underline;
	padding-left: 0;
}
.stationery textarea {
	background: #fffaf2;
}
#review-photos {
	display: flex;
	gap: 7px;
	overflow: hidden;
}
#review-photos img {
	width: 17%;
	aspect-ratio: 3/4;
	object-fit: cover;
	border-radius: 12px;
}
#review-letter {
	font-size: 16px;
}
#count {
	margin: 8px 0;
}
#wrap-label[hidden] {
	display: none;
}
#builder + section {
	margin-top: 0;
}
@media (max-width: 560px) {
	.tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	#journey {
		margin-bottom: 12px;
	}
	#builder {
		padding-top: 0;
	}
	.slide h2 {
		font-size: 31px;
	}
	.choices button {
		font-size: 14px;
	}
	.slide {
		min-height: 215px;
	}
}
@media (prefers-reduced-motion: reduce) {
	#step-progress::-webkit-progress-value {
		transition: none;
	}
}

#offers button {
	font-size: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	justify-content: center;
	padding: 13px 17px;
}
#offers button span {
	font-size: 14px;
}
#offers button strong {
	font-size: 16px;
	font-weight: 600;
}
#journey button {
	min-width: 56px;
}
#review-photos img {
	max-width: 80px;
}
#patterns.tiles {
	display: flex;
	align-items: stretch;
	max-height: none;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 3px;
	gap: 10px;
	touch-action: pan-x pan-y;
}
#patterns::-webkit-scrollbar {
	display: none;
	height: 0;
	width: 0;
}
#patterns button {
	flex: 0 0 calc((100% - 20px) / 3);
	min-width: 0;
	scroll-snap-align: start;
	overflow: hidden;
}
#slides:has(#patterns:not([hidden])) {
	touch-action: pan-x pan-y;
}
#pattern-paging {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	margin: 14px 0 0;
	font-size: 12px;
	color: #775c62;
	font-variant-numeric: tabular-nums;
}
#pattern-paging button {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: #f5ece7;
	color: #774b58;
	font-size: 23px;
	line-height: 1;
	padding: 0;
}
#pattern-paging button:disabled {
	opacity: 0.3;
}
#builder:has(.slide[data-step='patterns']:not([hidden])) #step-actions {
	position: relative;
}
@media (max-width: 560px) {
	#patterns button {
		flex-basis: calc((100% - 10px) / 2);
	}
}
.delivery-mode {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: 17px;
	background: #f3eae4;
}
.delivery-mode label {
	flex: 1;
	position: relative;
	margin: 0;
	cursor: pointer;
}
.delivery-mode input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.delivery-mode span {
	display: grid;
	place-items: center;
	text-align: center;
	min-height: 43px;
	padding: 5px 8px;
	font-size: 14px;
	border-radius: 13px;
	color: #755e59;
}
.delivery-mode input:checked + span {
	background: #fffdfa;
	color: #744554;
	font-weight: 600;
	box-shadow: 0 1px 5px #68443822;
}
.delivery-mode input:focus-visible + span {
	outline: 2px solid #975c6a;
}
#date-field {
	min-width: 0;
	margin: 18px 0 0;
	padding: clamp(10px, 3vw, 21px);
	border: 1px solid #e9dad1;
	border-radius: 21px;
	background: #fffcf8;
}
.cal-head,
.cal-arrows,
.cal-clock,
.clock-face {
	display: flex;
	align-items: center;
}
.cal-head,
.cal-clock {
	justify-content: space-between;
}
.cal-head h3 {
	font:
		clamp(19px, 3vw, 25px)/1.3 Trirong,
		Georgia,
		serif;
	margin: 0;
}
.cal-arrows {
	gap: 4px;
}
.cal-arrows button {
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f6eee9;
	color: #895461;
	font: 24px/1 system-ui;
}
.cal-arrows button:disabled {
	opacity: 0.26;
}
#cal-week,
#cal-days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	text-align: center;
}
#cal-week {
	font-size: 11px;
	font-weight: 600;
	color: #93796e;
	margin: 18px 0 7px;
}
#cal-days {
	touch-action: pan-y;
}
#cal-days button {
	position: relative;
	justify-self: center;
	display: grid;
	place-items: center;
	border: 0;
	width: 100%;
	max-width: 44px;
	height: 40px;
	padding: 0;
	border-radius: 14px;
	background: transparent;
	color: #4b3937;
	font:
		15px/1 -apple-system,
		system-ui,
		sans-serif;
	font-variant-numeric: tabular-nums;
}
#cal-days button:disabled {
	color: #b9aaa3;
	opacity: 0.65;
}
#cal-days button[aria-current='date']::after {
	content: '';
	position: absolute;
	bottom: 3px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
}
#cal-days button[aria-pressed='true'] {
	background: #895461;
	color: white;
	box-shadow: 0 2px 6px #89546126;
}
@media (hover: hover) {
	#cal-days button:not(:disabled):not([aria-pressed='true']):hover {
		background: #f1e4df;
	}
}
.cal-clock {
	border-top: 1px solid #e8dbd3;
	margin-top: 13px;
	padding-top: 13px;
	gap: 8px;
}
.cal-clock small {
	display: block;
	font-size: 11px;
	color: #806d65;
}
.clock-face {
	gap: 1px;
	border-radius: 11px;
	background: #f4eae5;
	color: #64434a;
	padding: 3px;
}
.slide .clock-face input {
	width: 2.25em;
	margin: 0;
	padding: 5px 1px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	text-align: center;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	color: inherit;
}
.clock-face input:focus {
	background: white;
}
#cal-summary {
	font-size: 12px;
	margin: 12px 0 0;
	color: #825d64;
}

#cal-period {
	border: 0;
	border-radius: 7px;
	background: #fffaf6;
	color: #724c57;
	font-size: 12px;
	font-weight: 600;
	padding: 8px 6px;
}

#gift-market { font-size: 13px; margin-bottom: 14px; }
#gift-market select { font: inherit; color: inherit; padding: 8px 10px; }
#handoff { max-width: 480px; margin: 32px auto; }
#handoff-go { padding: 12px 18px; border: 0; border-radius: 16px; background: #895461; color: white; }
