@font-face {
	font-family: 'Dancing Script';
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/dancing-script-latin-700-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Lora';
	font-weight: 600;
	font-display: swap;
	src: url('/fonts/lora-latin-600-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Great Vibes';
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/great-vibes-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Playfair Display';
	font-weight: 600;
	font-display: swap;
	src: url('/fonts/playfair-display-latin-600-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Pacifico';
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/pacifico-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Nunito';
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Baloo 2';
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/baloo-2-latin-700-normal.woff2') format('woff2');
}

/* Cyrillic. A face with a unicode-range is only downloaded when a page uses those letters. */
@font-face {
	font-family: 'Marck Script';
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/marck-script-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Marck Script';
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/marck-script-cyrillic-400-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Comfortaa';
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/comfortaa-latin-700-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Comfortaa';
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/comfortaa-cyrillic-700-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Lora';
	font-weight: 600;
	font-display: swap;
	src: url('/fonts/lora-cyrillic-600-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Great Vibes';
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/great-vibes-cyrillic-400-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Playfair Display';
	font-weight: 600;
	font-display: swap;
	src: url('/fonts/playfair-display-cyrillic-600-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Pacifico';
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/pacifico-cyrillic-400-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Nunito';
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/nunito-cyrillic-700-normal.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
	--bg: #fff6ec;
	--surface: #ffffff;
	--text: #3a2a22;
	--muted: #7a6558;
	--border: #e6d5c5;
	--accent: #d9534f;
	--accent-text: #ffffff;
	--send: #128c4a;
	--radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 18px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	-webkit-text-size-adjust: 100%;
}

header, main {
	max-width: 560px;
	margin: 0 auto;
	padding: 0 16px;
}

header { padding-top: 16px; text-align: center; }
h1 {
	margin: 0;
	font: 700 48px/1 'Dancing Script', cursive;
	color: var(--accent);
}
/* Dancing Script has no Cyrillic letters. */
[data-script='cyrillic'] h1 { font: 400 48px/1 'Marck Script', cursive; }
header p { margin: 4px 0 16px; color: var(--muted); }

/* Room for the fixed footer. */
main { padding-bottom: 120px; }

section, details { margin-top: 24px; }
h2, h3, summary { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
h3 { margin-top: 20px; }

button, input, textarea { font: inherit; color: inherit; }

button {
	min-height: 56px;
	padding: 0 16px;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	font-weight: 700;
	cursor: pointer;
}
button[aria-pressed='true'] {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--accent-text);
}
button:disabled { opacity: 0.6; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 3px solid #1a73e8;
	outline-offset: 2px;
}

.occasions, .choices {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.choices.two { grid-template-columns: repeat(2, 1fr); }
.occasions { margin-bottom: 16px; }
.occasions button, .choices button { padding: 4px; line-height: 1.15; }
/* Holidays and special dates stand out from the everyday greetings. */
.occasions .special { border-color: var(--accent); border-style: dashed; }

canvas {
	display: block;
	max-width: 100%;
	/* A tall Status card should still fit on the screen. */
	max-height: 72vh;
	margin: 0 auto;
	border-radius: var(--radius);
	background: var(--border);
	box-shadow: 0 4px 16px rgb(58 42 34 / 0.18);
}

.notice {
	margin: 12px 0 0;
	padding: 12px 16px;
	border-radius: var(--radius);
	background: #fff0c9;
}

.thumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px;
	margin: -4px;
	scroll-snap-type: x proximity;
}
.thumbs button {
	flex: 0 0 96px;
	height: 96px;
	min-height: 0;
	padding: 0;
	overflow: hidden;
	scroll-snap-align: start;
	background: var(--border);
}
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbs button[aria-pressed='true'] { border-width: 4px; }
.thumbs .photo {
	padding: 4px;
	border-style: dashed;
	border-color: var(--muted);
	background: var(--surface) center / cover;
	font-size: 16px;
	line-height: 1.15;
}
.thumbs .photo[aria-pressed='true'] { border-style: solid; border-color: var(--accent); color: #fff; }

textarea, input[type='text'] {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	resize: vertical;
}
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 8px; }
.row button { padding: 4px; line-height: 1.15; }

details {
	padding: 0 16px;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	background: #fffaf4;
}
details[open] { padding-bottom: 16px; }
summary {
	margin: 0 -16px;
	padding: 16px;
	cursor: pointer;
	border-radius: var(--radius);
}

.swatches { display: flex; gap: 12px; }
.swatches button {
	width: 56px;
	padding: 0;
	border-radius: 50%;
	border-color: var(--muted);
	background: var(--swatch);
}
.swatches button[aria-pressed='true'] {
	background: var(--swatch);
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent);
}

.check {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	margin-top: 8px;
}
.check input { width: 28px; height: 28px; flex: none; accent-color: var(--accent); }
.check:has(input:disabled) { color: var(--muted); }

.favorites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.favorites .preview { width: 100%; height: auto; min-height: 0; padding: 0; overflow: hidden; display: block; }
.favorites img { display: block; width: 100%; }
.favorites .small { width: 100%; min-height: 44px; margin-top: 4px; font-size: 16px; font-weight: 400; }

footer {
	position: fixed;
	inset: auto 0 0 0;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: var(--bg);
	border-top: 1px solid var(--border);
}
footer > div {
	display: grid;
	grid-template-columns: 3fr 2fr 64px;
	gap: 8px;
	max-width: 528px;
	margin: 0 auto;
}
footer button { min-height: 64px; padding: 0 8px; line-height: 1.15; }
footer .send {
	border-color: var(--send);
	background: var(--send);
	color: #fff;
	font-size: 22px;
}
footer .heart { color: var(--accent); font-size: 26px; }
