/* ============================================================
   A bright editorial photo wall.
   Cream paper, ink text, one terracotta accent, and a serif that
   does the heavy lifting. Layout is CSS multi-column masonry, so
   it reflows without a single line of layout JavaScript.
   ============================================================ */

:root {
	--paper: #faf7f1;
	--paper-sunk: #f1ebe0;
	--card: #fffdfa;
	--ink: #16150f;
	--ink-soft: #55503f;
	--ink-faint: #8d8672;
	--line: #e3dbcb;
	--accent: #a8432a;
	--accent-ink: #fff8f3;
	--shadow-lift: 0 1px 2px rgba(22, 21, 15, 0.04), 0 8px 24px rgba(22, 21, 15, 0.06);
	--shadow-float: 0 10px 30px rgba(22, 21, 15, 0.16), 0 2px 8px rgba(22, 21, 15, 0.1);

	--font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Hoefler Text", Georgia, ui-serif, serif;
	--font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, ui-sans-serif, sans-serif;

	--gap: 12px;
	--radius: 4px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--shell: 1520px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

body.is-locked {
	overflow: hidden;
}

img,
video {
	display: block;
	max-width: 100%;
}

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

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

.display {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: -0.015em;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.kicker {
	margin: 0;
	color: var(--accent);
	font-size: 0.688rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* ── shared controls ───────────────────────────────────────── */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 46px;
	padding: 0.7rem 1.35rem;
	border: 0;
	border-radius: 999px;
	font-size: 0.938rem;
	font-weight: 600;
	letter-spacing: 0.005em;
	cursor: pointer;
	transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.button:active {
	transform: scale(0.97);
}

.button--primary {
	background: var(--ink);
	color: var(--paper);
	box-shadow: var(--shadow-lift);
}

.button--primary:hover {
	background: #000;
}

.button--dark {
	background: var(--ink);
	color: var(--paper);
	box-shadow: var(--shadow-float);
}

.button--quiet {
	background: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 1px var(--line);
}

.button--quiet:hover {
	background: rgba(128, 118, 98, 0.1);
}

.button--small {
	min-height: 38px;
	padding: 0.4rem 1rem;
	font-size: 0.875rem;
}

.button[disabled] {
	opacity: 0.55;
	pointer-events: none;
}

.iconbutton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: currentColor;
	cursor: pointer;
	transition: background-color 0.18s var(--ease);
}

.iconbutton svg {
	width: 21px;
	height: 21px;
}

.iconbutton:hover {
	background: rgba(128, 118, 98, 0.16);
}

.linkbutton {
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink-faint);
	font-size: 0.813rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.linkbutton:hover {
	color: var(--ink);
}

/* ── password gate ─────────────────────────────────────────── */

.gate {
	display: grid;
	place-items: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
	background:
		radial-gradient(120% 80% at 50% 0%, #fffdfa 0%, var(--paper) 58%, var(--paper-sunk) 100%);
}

.gate__card {
	width: 100%;
	max-width: 27rem;
	animation: rise 0.8s var(--ease) both;
}

.gate__title {
	margin: 0.85rem 0 0;
	font-size: clamp(2.4rem, 10vw, 3.4rem);
	line-height: 1.02;
	white-space: pre-line;
}

.gate__lede {
	margin: 1rem 0 2.25rem;
	max-width: 30ch;
	color: var(--ink-soft);
	font-size: 1rem;
}

.field {
	display: block;
	margin-bottom: 1.5rem;
}

.field__label {
	display: block;
	margin-bottom: 0.4rem;
	color: var(--ink-faint);
	font-size: 0.688rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.field__input {
	width: 100%;
	padding: 0.6rem 0;
	border: 0;
	border-bottom: 1.5px solid var(--line);
	border-radius: 0;
	background: transparent;
	/* 16px keeps iOS from zooming the page when the field is focused. */
	font-size: 1.125rem;
	transition: border-color 0.2s var(--ease);
}

.field__input:focus {
	outline: none;
	border-bottom-color: var(--ink);
}

.gate__error {
	min-height: 1.25rem;
	margin: 1rem 0 0;
	color: var(--accent);
	font-size: 0.875rem;
}

.gate__card.is-shaking {
	animation: shake 0.4s var(--ease);
}

/* ── masthead ──────────────────────────────────────────────── */

.page {
	max-width: var(--shell);
	margin: 0 auto;
	padding: 0 clamp(0.875rem, 3vw, 2.25rem);
}

.masthead {
	padding: clamp(2.75rem, 9vw, 6.5rem) 0 clamp(1.5rem, 4vw, 2.75rem);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.masthead__title {
	margin: 0.9rem 0 0;
	font-size: clamp(2.6rem, 11vw, 6rem);
	line-height: 0.96;
	white-space: pre-line;
	animation: rise 0.9s var(--ease) both;
}

.masthead__lede {
	margin: 1.5rem 0 0;
	max-width: 54ch;
	color: var(--ink-soft);
	font-size: clamp(1rem, 2.6vw, 1.125rem);
	line-height: 1.6;
	animation: rise 0.9s 0.08s var(--ease) both;
}

/* ── the mosaic ────────────────────────────────────────────── */

.mosaic {
	columns: 2;
	column-gap: var(--gap);
}

@media (min-width: 40em) {
	.mosaic {
		columns: 3;
	}
}

@media (min-width: 64em) {
	:root {
		--gap: 14px;
	}
	.mosaic {
		columns: 4;
	}
}

@media (min-width: 100em) {
	.mosaic {
		columns: 5;
	}
}

.tile {
	display: block;
	width: 100%;
	margin: 0 0 var(--gap);
	/* Break-inside is what makes the columns behave like masonry. */
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	cursor: zoom-in;
	animation: rise 0.75s var(--ease) both;
	animation-delay: var(--delay, 0ms);
}

/**
 * The reserved aspect ratio lives on this inner wrapper rather than on the
 * figure, so a caption underneath adds height to the tile instead of squashing
 * the photo. Reserving the ratio up front is what keeps the masonry from
 * reflowing as images arrive.
 */
.tile__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--paper-sunk);
	box-shadow: inset 0 0 0 1px rgba(22, 21, 15, 0.05);
}

.tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.8s var(--ease), transform 1.1s var(--ease);
}

.tile.is-loaded .tile__media img {
	opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
	.tile:hover .tile__media img {
		transform: scale(1.035);
	}
}

.tile__caption {
	margin: 0.55rem 0 0;
	padding: 0 0.1rem;
	color: var(--ink-soft);
	font-family: var(--font-display);
	font-size: 0.938rem;
	font-style: italic;
	line-height: 1.35;
	/* Two lines on the wall; the full text is always in the viewer. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tile__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	pointer-events: none;
}

.tile__play svg {
	width: 46px;
	height: 46px;
	padding: 13px;
	border-radius: 50%;
	background: rgba(255, 253, 250, 0.9);
	color: var(--ink);
	box-shadow: 0 2px 12px rgba(22, 21, 15, 0.24);
	transition: transform 0.35s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
	.tile:hover .tile__play svg {
		transform: scale(1.08);
	}
}

.tile__duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	background: rgba(22, 21, 15, 0.74);
	color: #fff;
	font-size: 0.688rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	backdrop-filter: blur(4px);
}

.tile--fresh .tile__media {
	animation: flash 2.4s var(--ease) both;
}

.empty {
	max-width: 34ch;
	margin: clamp(3rem, 12vw, 7rem) auto;
	color: var(--ink-faint);
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-style: italic;
	text-align: center;
}

.empty__mark {
	display: block;
	margin-bottom: 1rem;
	color: var(--accent);
	font-size: 1.5rem;
	font-style: normal;
}

/* ── colophon ──────────────────────────────────────────────── */

.colophon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	justify-content: space-between;
	align-items: baseline;
	margin-top: clamp(2.5rem, 7vw, 4.5rem);
	/* The bottom padding keeps the floating add button from ever sitting on top
	   of the last row of text. */
	padding: 1.75rem 0 calc(5.5rem + env(safe-area-inset-bottom));
	border-top: 1px solid var(--line);
	color: var(--ink-faint);
	font-size: 0.813rem;
}

.colophon p {
	margin: 0;
}

.colophon__row {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: baseline;
}

/**
 * On very narrow screens the floating add button reaches far enough left to sit
 * on top of the footer links, which happen to land in the same band whenever the
 * page ends just below the fold. Reserving the button's footprint makes the
 * links wrap clear of it. Only affects screens under ~350px.
 */
@media (max-width: 22em) {
	.colophon__row {
		/* max-width rather than padding: it shrinks the element's own box, so
		   neither the text nor the hit area reaches under the button. */
		max-width: calc(100% - 10.5rem);
	}
}

/* ── add button ────────────────────────────────────────────── */

.fab {
	position: fixed;
	right: max(1rem, env(safe-area-inset-right));
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 40;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 52px;
	padding: 0 1.35rem 0 1.1rem;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 0.938rem;
	font-weight: 600;
	box-shadow: var(--shadow-float);
	cursor: pointer;
	transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
	animation: rise 0.7s 0.25s var(--ease) both;
}

.fab:hover {
	background: #96391f;
}

.fab:active {
	transform: scale(0.96);
}

.fab__icon {
	width: 20px;
	height: 20px;
}

/* ── upload tray ───────────────────────────────────────────── */

.tray {
	position: fixed;
	z-index: 50;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 64vh;
	max-height: 64dvh;
	padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
	border-radius: 18px 18px 0 0;
	background: var(--card);
	box-shadow: 0 -14px 44px rgba(22, 21, 15, 0.18);
	animation: sheet 0.4s var(--ease) both;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

@media (min-width: 44em) {
	.tray {
		left: auto;
		right: max(1.5rem, env(safe-area-inset-right));
		bottom: max(1.5rem, env(safe-area-inset-bottom));
		width: 24rem;
		border-radius: 14px;
		box-shadow: var(--shadow-float);
		animation: rise 0.35s var(--ease) both;
	}
}

.tray__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.tray__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 400;
}

.tray__list {
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.job {
	display: grid;
	grid-template-columns: 46px 1fr;
	gap: 0.85rem;
	align-items: center;
	padding: 0.7rem 0;
	border-top: 1px solid var(--line);
}

.job:first-child {
	border-top: 0;
}

.job__thumb {
	width: 46px;
	height: 46px;
	border-radius: 3px;
	object-fit: cover;
	background: var(--paper-sunk);
}

.job__body {
	min-width: 0;
}

.job__name {
	overflow: hidden;
	color: var(--ink);
	font-size: 0.875rem;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.job__note {
	color: var(--ink-faint);
	font-size: 0.75rem;
}

.job__note--error {
	color: var(--accent);
}

.job__bar {
	position: relative;
	height: 3px;
	margin-top: 0.4rem;
	border-radius: 999px;
	background: var(--paper-sunk);
	overflow: hidden;
}

/* font-size stays at 1rem so iOS does not zoom the page on focus. */
.job__caption {
	width: 100%;
	margin-top: 0.45rem;
	padding: 0.45rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: var(--paper);
	color: var(--ink);
	font-size: 1rem;
}

.job__caption::placeholder {
	color: var(--ink-faint);
}

.job__caption:focus {
	outline: none;
	border-color: var(--ink-faint);
	background: #fff;
}

.job--done .job__caption {
	border-color: transparent;
	background: var(--paper-sunk);
}

.job--error .job__caption {
	opacity: 0.5;
	pointer-events: none;
}

.job__fill {
	position: absolute;
	inset: 0 100% 0 0;
	border-radius: 999px;
	background: var(--accent);
	transition: right 0.3s var(--ease);
}

.job--done .job__fill {
	background: #4f7a52;
}

.job--error .job__fill {
	background: var(--accent);
}

/* A failed row becomes a retry button. */
.job--error {
	cursor: pointer;
}

.job--error:hover {
	background: rgba(168, 67, 42, 0.05);
}

.job:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ── "new since you looked" pill ───────────────────────────── */

.newpill {
	position: fixed;
	z-index: 45;
	left: 50%;
	bottom: max(1.4rem, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	animation: rise 0.4s var(--ease) both;
}

/* ── lightbox ──────────────────────────────────────────────── */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	background: rgba(13, 12, 9, 0.965);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: fade 0.28s var(--ease) both;
}

/* ── caption in the viewer ─────────────────────────────────── */

.lightbox__caption {
	max-width: min(100%, 60ch);
	margin: 0 auto;
	padding: 0.9rem 1.25rem max(1.4rem, env(safe-area-inset-bottom));
	text-align: center;
}

.lightbox__captionText {
	margin: 0;
	color: rgba(250, 247, 241, 0.9);
	font-family: var(--font-display);
	font-size: clamp(1.05rem, 3.4vw, 1.4rem);
	font-style: italic;
	line-height: 1.45;
	text-wrap: pretty;
}

.lightbox__captionAction {
	padding: 0.35rem 0.9rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: rgba(250, 247, 241, 0.6);
	font-size: 0.813rem;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.lightbox__captionAction:hover {
	background: rgba(250, 247, 241, 0.12);
	color: #fff;
}

.lightbox__captionForm {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	align-items: center;
}

.lightbox__captionInput {
	flex: 1 1 15rem;
	min-width: 0;
	/* 1rem keeps iOS from zooming the page when the field is focused. */
	font-size: 1rem;
	font-family: var(--font-ui);
	padding: 0.6rem 0.95rem;
	border: 1px solid rgba(250, 247, 241, 0.22);
	border-radius: 999px;
	background: rgba(250, 247, 241, 0.08);
	color: #fff;
}

.lightbox__captionInput::placeholder {
	color: rgba(250, 247, 241, 0.42);
}

.lightbox__captionInput:focus {
	outline: none;
	border-color: rgba(250, 247, 241, 0.6);
	background: rgba(250, 247, 241, 0.14);
}

.lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) 0.5rem max(0.75rem, env(safe-area-inset-left));
	color: rgba(250, 247, 241, 0.82);
}

.lightbox__counter {
	padding-left: 0.75rem;
	font-size: 0.813rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
}

.lightbox__tools {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.lightbox__tools .iconbutton {
	color: rgba(250, 247, 241, 0.82);
}

.lightbox__tools .iconbutton:hover {
	background: rgba(250, 247, 241, 0.14);
	color: #fff;
}

.lightbox__stage {
	position: relative;
	display: grid;
	/* A definite row and column are what let `max-height: 100%` on the media
	   actually resolve — against an auto-sized row it silently resolves to
	   `none` and a portrait photo overflows the screen. */
	grid-template-rows: minmax(0, 1fr);
	grid-template-columns: minmax(0, 1fr);
	place-items: center;
	min-height: 0;
	padding: 0 max(0.5rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-bottom));
}

.lightbox__stage img,
.lightbox__stage video {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 2px;
	animation: fade 0.4s var(--ease) both;
}

.lightbox__stage img {
	background: transparent;
}

.lightbox__stage video {
	width: 100%;
	background: #000;
}

.lightbox__nav {
	position: absolute;
	top: 50%;
	display: none;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(250, 247, 241, 0.1);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s var(--ease);
}

.lightbox__nav:hover {
	background: rgba(250, 247, 241, 0.22);
}

.lightbox__nav svg {
	width: 26px;
	height: 26px;
}

.lightbox__nav--prev {
	left: max(0.75rem, env(safe-area-inset-left));
}

.lightbox__nav--next {
	right: max(0.75rem, env(safe-area-inset-right));
}

/* Arrows are shown on touch devices too — swiping is a bonus, not the only way
   to move between photos. */
.lightbox__nav {
	display: grid;
	width: 46px;
	height: 46px;
	margin-top: -23px;
}

@media (hover: hover) and (pointer: fine) {
	.lightbox__nav {
		width: 52px;
		height: 52px;
		margin-top: -26px;
	}
}

/* ── arranging (host) ──────────────────────────────────────── */

.arrange {
	position: fixed;
	inset: 0;
	z-index: 65;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	animation: fade 0.25s var(--ease) both;
}

.arrange__head {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	align-items: flex-end;
	padding: max(1.1rem, env(safe-area-inset-top)) clamp(1rem, 3vw, 2.25rem) 1.1rem;
	border-bottom: 1px solid var(--line);
	background: var(--card);
}

.arrange__title {
	margin: 0 0 0.35rem;
	font-size: clamp(1.5rem, 5vw, 2.25rem);
	line-height: 1.1;
}

.arrange__hint {
	margin: 0;
	max-width: 46ch;
	color: var(--ink-faint);
	font-size: 0.813rem;
	line-height: 1.45;
}

.arrange__status {
	color: var(--accent);
	font-weight: 600;
}

.arrange__actions {
	display: flex;
	gap: 0.6rem;
}

.arrange__list {
	flex: 1;
	margin: 0;
	padding: 0.5rem clamp(1rem, 3vw, 2.25rem) max(2.5rem, env(safe-area-inset-bottom));
	list-style: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.arow {
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: center;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--line);
}

.arow--moved {
	animation: flash 1.6s var(--ease) both;
}

.arow__thumb {
	width: 60px;
	height: 60px;
	border-radius: 3px;
	object-fit: cover;
	background: var(--paper-sunk);
}

.arow__body {
	min-width: 0;
}

.arow__caption {
	overflow: hidden;
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 0.938rem;
	font-style: italic;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.arow__caption--empty {
	color: var(--ink-faint);
	font-family: var(--font-ui);
	font-size: 0.813rem;
	font-style: normal;
}

.arow__meta {
	margin-top: 0.15rem;
	color: var(--ink-faint);
	font-size: 0.688rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.arow__tools {
	display: flex;
	gap: 0.3rem;
}

.arow__button {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.7rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--card);
	color: var(--ink);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.arow__button:hover:not(:disabled) {
	background: var(--ink);
	color: var(--paper);
}

.arow__button:disabled {
	opacity: 0.3;
	cursor: default;
}

.arow__button svg {
	width: 15px;
	height: 15px;
}

/* ── toast ─────────────────────────────────────────────────── */

.toast {
	position: fixed;
	z-index: 70;
	left: 50%;
	bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 5rem));
	max-width: min(90vw, 30rem);
	margin: 0;
	padding: 0.7rem 1.15rem;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-size: 0.875rem;
	text-align: center;
	box-shadow: var(--shadow-float);
	transform: translateX(-50%);
	animation: rise 0.3s var(--ease) both;
}

/* ── motion ────────────────────────────────────────────────── */

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes sheet {
	from {
		transform: translateY(102%);
	}
	to {
		transform: translateY(0);
	}
}

@keyframes flash {
	0%,
	100% {
		box-shadow: inset 0 0 0 1px rgba(22, 21, 15, 0.05);
	}
	22% {
		box-shadow: inset 0 0 0 3px rgba(168, 67, 42, 0.85);
	}
}

@keyframes shake {
	10%, 90% { transform: translateX(-3px); }
	20%, 80% { transform: translateX(5px); }
	30%, 50%, 70% { transform: translateX(-7px); }
	40%, 60% { transform: translateX(7px); }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-delay: 0ms !important;
		transition-duration: 0.001ms !important;
	}
	html {
		scroll-behavior: auto;
	}
}
