/* Layout concept: a traveller's scrapbook laid on a bento grid. Paper tiles, passport-stamp dates, handwritten margin notes. */
:root {
	--paper: #f1ece2;
	--tile: #fbf8f2;
	--tile-2: #e7e0d2;
	--ink: #1b2438;
	--ink-soft: #4a5368;
	--coral: #b04a35;
	--coral-fill: #e2725b;
	--sea: #2c5f6c;
	--peach: #f3b37e;
	--line: rgba(27, 36, 56, .16);
	--shadow: 0 1px 0 rgba(27, 36, 56, .06), 0 18px 40px -22px rgba(27, 36, 56, .45);
	--on-coral: #1b2438;
	--viewer-bg: #0e121c;
	--viewer-fg: #efe8da;
	--stripe-a: #c8372d;
	--stripe-b: #fbf8f2;

	--display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
	--hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
	--mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--step--1: clamp(.8rem, .78rem + .1vw, .875rem);
	--step-0: clamp(1rem, .96rem + .2vw, 1.125rem);
	--step-1: clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
	--step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.2rem);
	--step-3: clamp(2rem, 1.45rem + 2.4vw, 3.5rem);
	--step-4: clamp(2.5rem, 1.5rem + 4.4vw, 5.4rem);

	--gap: clamp(10px, 1.3vw, 18px);
	--radius: 20px;
	--ease: cubic-bezier(.2, .8, .2, 1);
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	--grain-alpha: .07;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #11172a; --tile: #1a2236; --tile-2: #222c43; --ink: #efe8da; --ink-soft: #aab1c2;
		--coral: #f08a72; --coral-fill: #e2725b; --sea: #86bfcc; --peach: #f3b37e; --line: rgba(239, 232, 218, .14);
		--shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 22px 44px -24px rgba(0, 0, 0, .8); --stripe-b: #efe8da; --grain-alpha: .09;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--paper: #11172a; --tile: #1a2236; --tile-2: #222c43; --ink: #efe8da; --ink-soft: #aab1c2;
	--coral: #f08a72; --coral-fill: #e2725b; --sea: #86bfcc; --peach: #f3b37e; --line: rgba(239, 232, 218, .14);
	--shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 22px 44px -24px rgba(0, 0, 0, .8); --stripe-b: #efe8da; --grain-alpha: .09;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: var(--step-0);
	line-height: 1.55;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
	transition: background-color .4s var(--ease), color .4s var(--ease);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; background-image: var(--grain); opacity: var(--grain-alpha); mix-blend-mode: multiply; }
:root[data-theme="dark"] body::after { mix-blend-mode: screen; }
img { max-width: 100%; display: block; }
a { color: var(--coral); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 560; line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; margin: 0; font-optical-sizing: auto; }
p { margin: 0; }
.wrap { max-width: 1380px; margin-inline: auto; position: relative; z-index: 2; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.site-head .wrap { display: flex; align-items: center; gap: 18px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; min-width: 0; }
.brand svg { width: 56px; height: auto; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.15rem; font-style: italic; font-weight: 500; white-space: nowrap; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step--1); letter-spacing: .02em; padding: 10px 12px; border-radius: 999px; transition: background-color .25s var(--ease); }
.nav a:hover { background: var(--tile-2); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--tile); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .3s var(--ease), background-color .3s var(--ease); }
.icon-btn:hover { transform: rotate(-12deg); background: var(--tile-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
@media (max-width: 720px) { .nav { display: none; } .brand-name { font-size: 1rem; } }

/* ---------- bento ---------- */
main { padding-block: clamp(16px, 2.4vw, 32px) 0; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: dense; }
.tile { position: relative; background: var(--tile); border-radius: var(--radius); padding: clamp(18px, 2.2vw, 30px); min-width: 0; box-shadow: var(--shadow); }
.s-8 { grid-column: span 8; } .s-6 { grid-column: span 6; } .s-4 { grid-column: span 4; } .s-3 { grid-column: span 3; }
.r-2 { grid-row: span 2; }
@media (max-width: 1000px) {
	.bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.s-8, .s-6 { grid-column: span 6; } .s-4, .s-3 { grid-column: span 3; }
}
@media (max-width: 620px) {
	.bento { grid-template-columns: minmax(0, 1fr); }
	.s-8, .s-6, .s-4, .s-3 { grid-column: 1 / -1; } .r-2 { grid-row: auto; }
}
.section { margin-top: clamp(48px, 7vw, 104px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 22px; margin-bottom: clamp(16px, 2vw, 26px); }
.section-head h2 { font-size: var(--step-3); }
.margin-note { font-family: var(--hand); font-size: 1.6rem; line-height: 1.1; color: var(--coral); transform: rotate(-2deg); display: inline-flex; align-items: center; gap: 6px; }
.margin-note svg { width: 42px; height: 26px; flex: none; }
.eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* passport stamp: the date of the trip */
.stamp { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px; border-radius: 6px; padding: 3px 9px; transform: rotate(-3deg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stamp b { font-weight: 500; opacity: .7; }

/* ---------- hero ---------- */
.t-slide { padding: 0; overflow: hidden; min-height: clamp(340px, 46vw, 640px); background: var(--ink); isolation: isolate; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.slide.is-on img { animation: drift 14s linear both; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.slide-card { position: absolute; left: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px); right: clamp(12px, 2vw, 24px); max-width: 440px; z-index: 3; display: grid; gap: 6px; background: var(--tile); color: var(--ink); border-radius: 14px; padding: 14px 16px 14px 18px; box-shadow: var(--shadow); transform: rotate(-.6deg); text-align: left; border: 0; font: inherit; text-decoration: none; cursor: pointer; transition: transform .35s var(--ease); }
.slide-card:hover { transform: rotate(0deg) translateY(-3px); }
.slide-card h3 { font-size: var(--step-1); }
.slide-card .where { font-size: var(--step--1); color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.slide-card .tape { position: absolute; top: -10px; left: 28px; width: 72px; height: 20px; background: color-mix(in srgb, var(--peach) 70%, transparent); transform: rotate(-4deg); border-radius: 2px; }
.slide-ctrl { position: absolute; top: clamp(12px, 2vw, 20px); right: clamp(12px, 2vw, 20px); z-index: 3; display: flex; gap: 8px; }
.slide-ctrl .icon-btn { background: color-mix(in srgb, var(--tile) 86%, transparent); }
.slide-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4; background: rgba(255, 255, 255, .15); }
.slide-progress i { display: block; height: 100%; width: 0; background: var(--peach); }
.slide-progress i.run { animation: fill var(--dur, 6s) linear forwards; }
@keyframes fill { to { width: 100%; } }
.slides-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--viewer-fg); text-align: center; padding: 24px; font-family: var(--hand); font-size: 2rem; }

.t-thesis { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; background: var(--ink); color: var(--paper); overflow: hidden; }
.t-thesis .mark { width: min(220px, 70%); }
.t-thesis .hand { font-family: var(--hand); font-size: clamp(2rem, 1.4rem + 1.6vw, 2.8rem); color: var(--peach); line-height: 1; transform: rotate(-3deg); transform-origin: left; }
.t-thesis h1 { font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3.4rem); font-style: italic; font-weight: 450; color: var(--paper); }
.t-thesis p { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); font-size: var(--step--1); max-width: 34ch; }

.t-log { display: grid; gap: 16px; align-content: space-between; background: var(--tile-2); }
.log-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.log-figs dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.log-figs dd { margin: 0; font-family: var(--display); font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.log-latest { border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 4px; }
.log-latest strong { font-family: var(--display); font-size: var(--step-1); font-weight: 560; }

/* ---------- buttons ---------- */
.btn { --bg: var(--ink); --fg: var(--paper); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--bg); color: var(--fg); font: 600 var(--step--1)/1 var(--body); letter-spacing: .02em; text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .3s var(--ease), color .3s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--coral-fill); border-radius: inherit; transform: scale(0, 1); transform-origin: left; transition: transform .45s var(--ease); }
.btn:hover { color: var(--on-coral); }
.btn:hover::before { transform: scale(1, 1); }
.btn:active { transform: scale(.96); }
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px) rotate(-8deg); }
.btn.ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- journeys ---------- */
.journeys .card { grid-column: span 3; }
.journeys .card.feature { grid-column: span 6; grid-row: span 2; }
@media (max-width: 1000px) { .journeys .card { grid-column: span 3; } .journeys .card.feature { grid-column: span 6; grid-row: auto; } }
@media (max-width: 620px) { .journeys .card, .journeys .card.feature { grid-column: 1 / -1; } }
/* keep the last row of journeys full, whatever the count */
@media (min-width: 1001px) {
	.journeys .card:nth-child(2):last-child { grid-column: span 6; grid-row: span 2; }
	.journeys .card:nth-child(2):nth-last-child(2), .journeys .card:nth-child(3):last-child { grid-column: span 6; }
	.journeys .card:nth-child(4):last-child { grid-column: span 6; }
	.journeys .card:nth-child(4n+6):last-child { grid-column: 1 / -1; }
	.journeys .card:nth-child(4n+6):last-child .shot { aspect-ratio: 21 / 8; }
	.journeys .card:nth-child(4n+6):nth-last-child(2), .journeys .card:nth-child(4n+6):nth-last-child(2) + .card { grid-column: span 6; }
	.journeys .card:nth-child(4n+6):nth-last-child(3), .journeys .card:nth-child(4n+6):nth-last-child(3) ~ .card { grid-column: span 4; }
}
@media (min-width: 621px) and (max-width: 1000px) {
	.journeys .card:nth-child(even):last-child { grid-column: 1 / -1; }
}

.card { position: relative; text-decoration: none; display: flex; flex-direction: column; gap: 0; padding: 0; border: 0; text-align: left; font: inherit; color: var(--ink); background: var(--tile); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; overflow: visible; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.card .shot { position: relative; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 4 / 3; max-width: 100%; background: var(--tile-2); }
.card.feature .shot { aspect-ratio: auto; flex: 1; min-height: 300px; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(.96); transition: transform .9s var(--ease), filter .6s var(--ease); }
.card .shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--coral-fill); transition: box-shadow .35s var(--ease); }
.card .count { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; background: var(--tile); color: var(--ink); padding: 5px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.card .meta { display: grid; gap: 8px; padding: 16px 18px 20px; }
.card h3 { font-size: var(--step-1); }
.card.feature h3 { font-size: var(--step-2); }
.card .where { display: flex; align-items: center; gap: 6px; font-size: var(--step--1); color: var(--ink-soft); }
.card .where svg, .slide-card .where svg { width: 15px; height: 15px; flex: none; color: var(--coral); transition: transform .45s var(--ease); }
.card .desc { color: var(--ink-soft); font-size: var(--step--1); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 60ch; }
.card .open { position: relative; justify-self: start; font-family: var(--hand); font-size: 1.45rem; line-height: 1; color: var(--coral); padding: 4px 10px; margin-left: -6px; }
.card .open svg { position: absolute; inset: -8px -10px; width: calc(100% + 20px); height: calc(100% + 16px); overflow: visible; }
.card .open path { fill: none; stroke: var(--coral); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset .7s var(--ease); }
.card:hover, .card:focus-visible { transform: translateY(-6px) rotate(-.5deg); box-shadow: 0 2px 0 rgba(27, 36, 56, .05), 0 30px 50px -26px rgba(27, 36, 56, .6); outline: none; }
.card:hover .shot img, .card:focus-visible .shot img { transform: scale(1.06); filter: saturate(1.08) contrast(1); }
.card:hover .shot::after, .card:focus-visible .shot::after { box-shadow: inset 0 0 0 4px var(--coral-fill); }
.card:hover .open path, .card:focus-visible .open path { stroke-dashoffset: 0; }
.card:hover .where svg, .card:focus-visible .where svg { transform: translateY(-3px); }
.card:active { transform: translateY(-2px) scale(.99); }
.card .stamp { position: absolute; top: -12px; left: 16px; background: var(--tile); z-index: 2; }
.empty-note { grid-column: 1 / -1; padding: 40px; text-align: center; font-family: var(--hand); font-size: 1.8rem; color: var(--ink-soft); }

/* ---------- forms ---------- */
.t-form { display: grid; gap: 18px; align-content: start; }
.t-form h2 { font-size: var(--step-2); }
.t-form .lede { color: var(--ink-soft); max-width: 52ch; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; padding: 10px 2px; min-height: 44px; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.field textarea { resize: vertical; min-height: 120px; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px); line-height: 32px; padding-top: 0; border-bottom: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--coral); background-color: color-mix(in srgb, var(--peach) 10%, transparent); }
.hp { position: absolute !important; left: -9999px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-status { font-size: var(--step--1); color: var(--sea); font-weight: 600; }
.form-status.err { color: var(--coral); }

.drop { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 14px; border: 1.5px dashed var(--line); border-radius: 16px; padding: 12px; cursor: pointer; transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease); }
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--coral); background: color-mix(in srgb, var(--peach) 12%, transparent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .ph { width: 88px; height: 88px; border-radius: 12px; background: var(--tile-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-soft); }
.drop .ph svg { width: 30px; height: 30px; }
.drop .ph img { width: 100%; height: 100%; object-fit: cover; }
.drop strong { display: block; font-weight: 600; }
.drop span { font-size: var(--step--1); color: var(--ink-soft); overflow-wrap: anywhere; }

.t-wheres { overflow: hidden; }
.wheres-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.badge { position: relative; width: 112px; height: 112px; flex: none; border-radius: 50%; padding: 7px; background: repeating-conic-gradient(var(--stripe-a) 0 15deg, var(--stripe-b) 15deg 30deg); transition: transform .8s var(--ease); }
.badge img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--tile); }
.t-wheres:hover .badge { transform: rotate(-14deg) scale(1.04); }
.wheres-title { font-family: var(--display); font-size: var(--step-3); font-weight: 600; font-style: italic; line-height: .95; }
.wheres-title em { font-style: normal; color: var(--stripe-a); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; counter-reset: how; }
.how li { counter-increment: how; font-size: var(--step--1); color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 8px; }
.how li::before { content: counter(how); display: block; font-family: var(--hand); font-size: 1.6rem; line-height: 1; color: var(--coral); }
@media (max-width: 480px) { .how { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer ---------- */
.site-foot { margin-top: clamp(48px, 7vw, 104px); padding-block: clamp(28px, 4vw, 48px) 28px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.foot-grid > * { min-width: 0; }
.foot-brand { grid-column: span 4; display: grid; gap: 12px; }
.foot-brand svg { width: 120px; }
.foot-brand .hand { font-family: var(--hand); font-size: 1.7rem; line-height: 1; color: var(--coral); }
.foot-social { grid-column: span 3; display: grid; gap: 10px; }
.foot-social ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-social a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: var(--step-1); font-style: italic; }
.foot-social a svg { width: 16px; height: 16px; color: var(--coral); transition: transform .35s var(--ease); }
.foot-social a:hover svg { transform: translate(3px, -3px); }
.foot-versions { grid-column: span 5; display: grid; gap: 10px; }
.versions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ver { position: relative; min-height: 40px; min-width: 64px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--tile); color: var(--ink); font: 500 .9rem/1 var(--mono); font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease); }
.ver.is-latest { border-color: var(--coral); color: var(--coral); }
.ver.is-latest::after { content: ""; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral-fill); box-shadow: 0 0 0 2px var(--paper); }
.ver:hover { background: var(--coral-fill); border-color: var(--coral-fill); color: var(--on-coral); transform: translateY(-2px) rotate(-2deg); }
.ver:active { transform: scale(.95); }
.ver-pop { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(440px, calc(100% - 32px)); max-height: calc(100% - 48px); }
.ver-pop::backdrop { background: rgba(14, 18, 28, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ver-pop[open] { animation: pop .4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.ver-card { background: var(--tile); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 28px); display: grid; gap: 16px; }
.ver-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.ver-top h2 { font-family: var(--mono); font-weight: 500; font-size: var(--step-3); letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ver-date { font-family: var(--hand); font-size: 1.4rem; line-height: 1.1; color: var(--coral); margin-top: 4px; }
.ver-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px dashed var(--line); }
.ver-list li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px dashed var(--line); line-height: 1.45; }
.ver-list li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--coral); }
.foot-base { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 1000px) { .foot-brand { grid-column: 1 / -1; } .foot-social { grid-column: span 4; } .foot-versions { grid-column: span 8; } }
@media (max-width: 620px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } .foot-brand, .foot-social, .foot-versions { grid-column: 1 / -1; } }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--viewer-bg); color: var(--viewer-fg); }
.viewer::backdrop { background: rgba(8, 10, 16, .85); }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: vin .45s var(--ease); }
@keyframes vin { from { opacity: 0; transform: scale(.985); } }
.v-top { display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.v-top .v-title { margin-right: auto; min-width: 0; display: grid; gap: 2px; }
.v-top h2 { font-size: var(--step-2); color: var(--viewer-fg); }
.v-top .v-sub { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #aab1c2; }
.v-count { font-family: var(--mono); font-variant-numeric: tabular-nums; color: #aab1c2; white-space: nowrap; }
.viewer .icon-btn { background: rgba(255, 255, 255, .08); color: var(--viewer-fg); border-color: rgba(255, 255, 255, .18); }
.viewer .icon-btn:hover { background: rgba(255, 255, 255, .16); }
.v-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(60px, 7vw, 96px); touch-action: pan-y; }
.v-stage figure { margin: 0; height: 100%; width: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; place-items: center; min-height: 0; }
.v-stage img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.v-stage img.is-swap { opacity: 0; transform: scale(.98); }
.v-stage figcaption { text-align: center; max-width: 70ch; font-size: var(--step--1); color: #c9cfdc; padding-inline: 8px; }
.v-stage figcaption .credit { font-family: var(--hand); font-size: 1.3rem; color: var(--peach); display: block; }
.v-prev, .v-next { position: absolute; top: 50%; transform: translateY(-50%); }
.v-prev { left: max(12px, env(safe-area-inset-left, 0px)); } .v-next { right: max(12px, env(safe-area-inset-right, 0px)); }
.v-prev:hover, .v-next:hover { transform: translateY(-50%) scale(1.08); }
.v-bottom { display: grid; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.v-desc { max-width: 75ch; margin-inline: auto; text-align: center; color: #c9cfdc; font-size: var(--step--1); }
.v-strip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; justify-content: safe center; scrollbar-width: thin; }
.v-strip button { flex: none; width: 64px; height: 48px; padding: 0; border-radius: 6px; border: 0; overflow: hidden; cursor: pointer; opacity: .5; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .25s var(--ease), outline-color .25s var(--ease); }
.v-strip button img { width: 100%; height: 100%; object-fit: cover; }
.v-strip button:hover { opacity: .85; }
.v-strip button[aria-current="true"] { opacity: 1; outline-color: var(--peach); }
@media (max-width: 620px) { .v-stage { padding: 0 8px; } .v-prev, .v-next { top: auto; bottom: 8px; transform: none; } .v-prev:hover, .v-next:hover { transform: scale(1.08); } }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
	.rise { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
	@keyframes rise { from { transform: translateY(14px); opacity: .001; } }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.slide.is-on img { animation: none; }
}

/* ---------- plain pages (blog posts, single gallery) ---------- */
.page-tile { max-width: 820px; margin-inline: auto; }
.page-tile h1 { font-size: var(--step-3); margin-bottom: 16px; }
.entry > * + * { margin-top: 1em; }
.preview-flag { position: relative; z-index: 2; max-width: 1380px; margin: 14px auto 0; font-size: var(--step--1); color: var(--ink-soft); display: flex; gap: 8px; align-items: center; }
.preview-flag b { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--paper); background: var(--sea); padding: 3px 8px; border-radius: 4px; }
