/* Konbini one-pager: a kamishibai street theatre told along one trip. */

:root {
	--orange: #f39700;
	--line-ink: #14171c;
	--navy: #1d2430;
	--navy-2: #262f3e;
	--green: #009944;
	--sky-line: #00a7db;
	--ink: #2b211b;
	--ink-soft: #5a4636;
	--kraft: #ecdcbc;
	--kraft-edge: #d6bf93;
	--lacquer: #6e3b20;
	--sign-white: #fbfaf6;
	--amber: #ffbe55;
	--focus: #0071c2;

	--f-hand: 'Yusei Magic', 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
	--f-body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', system-ui, sans-serif;
	--f-brush: 'Yuji Boku', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
	--f-receipt: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

	--wrap: min(1180px, 100% - 32px);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

	color-scheme: light;
	scrollbar-color: var(--lacquer) var(--navy);
	-webkit-text-size-adjust: 100%;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}

body {
	margin: 0;
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	font-variant-numeric: tabular-nums;
	overflow-x: clip;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--orange);
	color: var(--line-ink);
}

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

a {
	color: inherit;
	text-underline-offset: 0.22em;
	text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
	font-family: var(--f-hand);
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
	margin: 0;
}

p {
	margin: 0;
	text-wrap: pretty;
}

/* ── The sky: one long painting down the page, so scrolling is the trip
      from afternoon through dusk into night. Stars come out in the lower part. */

body {
	position: relative;
	background: linear-gradient(
		180deg,
		#86c2df 0,
		#c9e6e6 7%,
		#f2e4bd 15%,
		#f4c08e 24%,
		#e3998a 36%,
		#a77c96 48%,
		#5e6aa0 60%,
		#33315f 70%,
		#1a2452 80%,
		#0a1130 100%
	);
}

body::before {
	content: '';
	position: absolute;
	inset: 58% 0 0;
	z-index: -1;
	pointer-events: none;
	background-image:
		radial-gradient(1.5px 1.5px at 12% 18%, #fff6d8 98%, #0000),
		radial-gradient(1px 1px at 28% 8%, #fff6d8 98%, #0000),
		radial-gradient(1.8px 1.8px at 46% 22%, #fff6d8 98%, #0000),
		radial-gradient(1px 1px at 63% 12%, #fff6d8 98%, #0000),
		radial-gradient(1.6px 1.6px at 81% 26%, #fff6d8 98%, #0000),
		radial-gradient(1.2px 1.2px at 92% 6%, #fff6d8 98%, #0000),
		radial-gradient(1px 1px at 6% 44%, #fff6d8 98%, #0000),
		radial-gradient(1.4px 1.4px at 72% 40%, #fff6d8 98%, #0000);
	background-size: 520px 420px;
	-webkit-mask: linear-gradient(#0000, #000 30%);
	mask: linear-gradient(#0000, #000 30%);
}

/* ── Top bar ───────────────────────────────────────────────────────────── */

.topbar {
	width: var(--wrap);
	margin: 0 auto;
	padding: 14px 0 12px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #1f2a33;
}

.brand-name {
	font-family: var(--f-hand);
	font-size: 1.35rem;
	line-height: 1;
}

.brand-name span {
	font-family: var(--f-body);
	font-size: 0.85rem;
	font-weight: 700;
	margin-left: 4px;
	color: #3a4954;
}

.roundel,
.rd {
	display: inline-grid;
	place-content: center;
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 4px var(--orange);
	color: var(--line-ink);
	font-family: var(--f-body);
	font-weight: 700;
	text-align: center;
	line-height: 1;
}

.roundel b,
.rd b {
	font-size: 0.62rem;
	letter-spacing: 0.04em;
}

.roundel i,
.rd i {
	font-style: normal;
	font-size: 0.82rem;
}

.topnav {
	display: flex;
	gap: 22px;
	margin-left: auto;
	font-weight: 700;
	font-size: 0.95rem;
}

.topnav a {
	color: #1f2a33;
	text-decoration: none;
	padding: 10px 2px;
}

.topnav a:hover {
	text-decoration: underline;
	text-decoration-color: var(--orange);
}

/* ── The ticket: Konbini's one action, as an orange kippu ──────────────── */

.ticket {
	--notch: 9px;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	min-height: 56px;
	padding: 0 30px 0 22px;
	background: var(--orange);
	color: var(--line-ink);
	font-family: var(--f-hand);
	font-size: 1.3rem;
	text-decoration: none;
	white-space: nowrap;
	-webkit-mask:
		radial-gradient(circle var(--notch) at left center, #0000 97%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--notch) at right center, #0000 97%, #000) right / 51% 100% no-repeat;
	mask:
		radial-gradient(circle var(--notch) at left center, #0000 97%, #000) left / 51% 100% no-repeat,
		radial-gradient(circle var(--notch) at right center, #0000 97%, #000) right / 51% 100% no-repeat;
	filter: drop-shadow(0 8px 14px rgb(60 30 0 / 0.25));
	transition:
		transform 180ms var(--ease-out),
		background-color 180ms ease-out;
}

.ticket::after {
	content: '';
	position: absolute;
	inset: 10px auto 10px 0;
	left: calc(100% - 14px);
	border-left: 2px dotted rgb(20 23 28 / 0.45);
}

.ticket:hover {
	transform: translateY(-2px) rotate(-1.2deg);
	background-color: #ffa514;
}

.ticket:active {
	transform: translateY(1px) rotate(0);
}

.ticket:focus-visible {
	outline: none;
	filter: drop-shadow(0 0 0 var(--focus)) drop-shadow(0 0 3px var(--focus))
		drop-shadow(0 0 1px var(--focus));
}

.ticket-ja {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 0.72rem;
	writing-mode: vertical-rl;
	letter-spacing: 0.1em;
	padding-right: 12px;
	border-right: 2px dashed rgb(20 23 28 / 0.4);
	line-height: 1;
}

.ticket-sm {
	min-height: 44px;
	padding: 0 22px 0 18px;
	font-size: 1.05rem;
	--notch: 7px;
}

/* ── The butai: a lacquered wooden frame. Its border is the wood; the
      overflow clip at the inner edge lets cards slide out behind it. ────── */

.butai {
	--pad: clamp(14px, 2vw, 24px);
	position: relative;
	/* Keep the cover and doors stacked inside the frame, so the story's
	   paper card (.back) always lies on top of it, mid-animation too. */
	isolation: isolate;
	overflow: hidden;
	border: var(--pad) solid #6e3b20;
	border-image: url('art/frame.webp') 60 / var(--pad) stretch;
	background: var(--kraft);
	box-shadow:
		0 28px 50px -18px rgb(28 16 36 / 0.5),
		0 6px 14px -6px rgb(28 16 36 / 0.35);
}

.frame-card,
.card {
	position: relative;
	margin: 0;
	overflow: hidden;
}

.frame-card::after,
.card::after,
.cover::after,
.back::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--grain);
	mix-blend-mode: multiply;
	opacity: 0.55;
	pointer-events: none;
}

.scene {
	width: 100%;
	height: 100%;
}

.scene-sign {
	font-family: var(--f-hand);
	font-size: 34px;
	fill: var(--line-ink);
}

.scene-board {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 30px;
	fill: var(--line-ink);
}

.scene-board.sm {
	font-size: 20px;
}

.scene-roman {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.2em;
	fill: #4a5361;
}

.scene-small {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.08em;
	fill: #fff;
}

.scene-small.dark {
	fill: var(--line-ink);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
	width: var(--wrap);
	margin: 8px auto 0;
}

.butai-hero {
	--pad: clamp(16px, 2.8vw, 34px);
}

.stage {
	position: relative;
	perspective: 1800px;
}

.card-hero {
	aspect-ratio: 2.4 / 1;
}

.card-night {
	aspect-ratio: 16 / 10;
}

/* The title hangs on a tanzaku, a paper strip on a string, and sways. */
.brush-title {
	position: absolute;
	top: 0;
	right: 4%;
	z-index: 1;
	margin: 0;
	padding: 0.5em 0.16em 0.32em;
	writing-mode: vertical-rl;
	font-family: var(--f-brush);
	font-size: clamp(2rem, 5vw, 4.9rem);
	line-height: 1;
	letter-spacing: 0.04em;
	color: #23223b;
	background: linear-gradient(#0000 0.26em, rgb(0 0 0 / 0.1) 0.26em 0.3em, #0000 0.3em), #f6e7b0;
	box-shadow: 0 10px 18px -8px rgb(30 20 40 / 0.45);
	transform-origin: 50% 0;
	pointer-events: none;
}

.brush-title::before {
	content: '';
	position: absolute;
	top: 0.1em;
	left: 50%;
	width: 0.12em;
	height: 0.12em;
	margin-left: -0.06em;
	border-radius: 50%;
	background: #8a6a3a;
}

.js .brush-title {
	animation: sway 7s ease-in-out infinite alternate;
}

@keyframes sway {
	from {
		rotate: -1.6deg;
	}
	to {
		rotate: 1.8deg;
	}
}

.card-night .brush-title {
	right: auto;
	left: 4%;
	color: #fff1c8;
	background: linear-gradient(#0000 0.26em, rgb(0 0 0 / 0.16) 0.26em 0.3em, #0000 0.3em), #b4402a;
}

.door {
	display: none;
}

.js .door {
	display: grid;
	place-items: center;
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	z-index: 3;
	background:
		linear-gradient(90deg, rgb(20 8 2 / 0.35), #0000 14% 86%, rgb(20 8 2 / 0.4)),
		linear-gradient(100deg, #0000 30%, rgb(255 220 190 / 0.12) 45%, #0000 60%),
		var(--wood) center / cover,
		#6e3b20;
	box-shadow:
		inset 0 0 0 10px rgb(0 0 0 / 0.12),
		inset 0 0 0 12px rgb(255 214 160 / 0.12);
	transition:
		transform 1500ms cubic-bezier(0.62, 0, 0.18, 1),
		opacity 500ms ease-out 1000ms,
		visibility 0s linear 1500ms;
	backface-visibility: hidden;
}

.door span {
	font-family: var(--f-brush);
	font-size: clamp(2.4rem, 9vw, 8rem);
	color: #fff1c8;
	writing-mode: vertical-rl;
	text-shadow: 0 3px 0 rgb(0 0 0 / 0.25);
	line-height: 1;
}

.door-l {
	--wood: url('art/wood-l.webp');
	left: 0;
	transform-origin: left center;
	border-right: 2px solid #2a140a;
}

.door-l span {
	justify-self: end;
	margin-right: 4%;
}

.door-r {
	--wood: url('art/wood-r.webp');
	right: 0;
	transform-origin: right center;
	border-left: 2px solid #2a140a;
}

.door-r span {
	justify-self: start;
	margin-left: 4%;
}

.opened .door-l {
	transform: rotateY(-108deg);
	opacity: 0;
	visibility: hidden;
}

.opened .door-r {
	transform: rotateY(108deg);
	opacity: 0;
	visibility: hidden;
}

.hero-copy {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 22px clamp(20px, 4vw, 64px);
	align-items: start;
	padding: clamp(24px, 3vw, 36px) 4px 0;
}

.hero-copy h1 {
	grid-row: span 2;
	font-size: clamp(2.3rem, 4.4vw, 4rem);
	color: #1c2730;
	max-width: 15ch;
	letter-spacing: -0.01em;
}

.lede {
	color: #22313b;
	font-size: 1.125rem;
	max-width: 46ch;
}

.lede + .hero-actions {
	margin-top: 4px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
}

.ride {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-weight: 700;
	color: #1c2730;
	text-decoration-color: var(--orange);
}

.ride svg,
.try svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ride:hover svg {
	transform: translateY(3px);
	transition: transform 180ms var(--ease-out);
}

/* ── The story ─────────────────────────────────────────────────────────── */

.story {
	width: var(--wrap);
	margin: clamp(96px, 14vw, 180px) auto 0;
}

.clapper {
	position: relative;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto clamp(56px, 8vw, 100px);
	padding: 18px 30px 20px;
	background: var(--kraft);
	rotate: -1.2deg;
	box-shadow: 0 14px 26px -12px rgb(40 25 10 / 0.45);
}

.clapper::before,
.clapper::after {
	content: '';
	position: absolute;
	top: -10px;
	width: 64px;
	height: 22px;
	background: rgb(243 151 0 / 0.75);
	rotate: -4deg;
}

.clapper::before {
	left: 18px;
}

.clapper::after {
	right: 18px;
	rotate: 5deg;
	background: rgb(0 167 219 / 0.6);
}

.clapper h2 {
	font-size: clamp(1.45rem, 3vw, 2.3rem);
	color: var(--ink);
	text-align: center;
}

.chapter {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	align-items: center;
	margin-bottom: clamp(80px, 11vw, 150px);
}

.chapter .butai {
	grid-column: 1;
	grid-row: 1;
}

.chapter .back {
	grid-column: 2;
	grid-row: 1;
	margin-left: -56px;
	rotate: 1.4deg;
}

.chapter.flip {
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.chapter.flip .butai {
	grid-column: 2;
}

.chapter.flip .back {
	grid-column: 1;
	margin-left: 0;
	margin-right: -56px;
	rotate: -1.4deg;
}

.frame-card {
	aspect-ratio: 800 / 560;
}

/* The card back: kraft paper, the storyteller's lines written on it. */
.back {
	position: relative;
	z-index: 2;
	padding: clamp(24px, 3vw, 40px);
	background: var(--kraft);
	box-shadow:
		0 18px 34px -14px rgb(40 25 10 / 0.5),
		inset 0 0 0 1px var(--kraft-edge);
}

.back-num {
	position: absolute;
	top: 18px;
	right: 16px;
	writing-mode: vertical-rl;
	font-family: var(--f-brush);
	font-size: 1.9rem;
	line-height: 1;
	color: #b4471f;
	rotate: 3deg;
}

.back {
	padding-right: clamp(60px, 6vw, 76px) !important;
}

.back h3 {
	font-size: clamp(1.7rem, 2.7vw, 2.35rem);
	color: var(--ink);
	margin-bottom: 14px;
}

.back p + p {
	margin-top: 14px;
}

.aside {
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.example {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-soft);
	border: 1px dashed currentColor;
	border-radius: 999px;
	padding: 1px 9px;
	vertical-align: 2px;
	line-height: 1.6;
}

/* The cover: the card on top, pulled out as the chapter arrives. */
.cover {
	display: none;
}

.js .cover {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: grid;
	grid-template-rows: auto 1fr auto;
	justify-items: center;
	padding: 4% 6%;
	background:
		url('art/kraft.webp') center / cover,
		var(--cover, var(--orange));
	background-blend-mode: multiply;
	color: var(--line-ink);
	box-shadow:
		inset 0 0 0 1px rgb(60 30 10 / 0.25),
		inset 0 0 40px rgb(60 30 10 / 0.25);
	cursor: pointer;
}

.chapter:nth-of-type(2) .cover {
	--cover: #9cc28a;
}

.chapter:nth-of-type(3) .cover {
	--cover: #f2c14e;
}

.chapter:nth-of-type(4) .cover {
	--cover: #8fc6dc;
}

.chapter:nth-of-type(5) .cover {
	--cover: #eaa08e;
}

.chapter:nth-of-type(6) .cover {
	--cover: #b9a6d6;
}

.cover-num {
	justify-self: start;
	font-family: var(--f-brush);
	font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.cover-word {
	align-self: center;
	font-family: var(--f-brush);
	font-size: clamp(4.5rem, 12vw, 10rem);
	line-height: 1;
	writing-mode: vertical-rl;
	text-orientation: upright;
	max-height: 100%;
}

.cover-word:lang(ja) {
	letter-spacing: 0.02em;
}

.chapter:nth-of-type(6) .cover-word,
.chapter:nth-of-type(3) .cover-word,
.chapter:nth-of-type(2) .cover-word {
	font-size: clamp(3.4rem, 8.4vw, 7.4rem);
}

.chapter:nth-of-type(5) .cover-word {
	font-size: clamp(2.2rem, 5.2vw, 4.6rem);
}

.cover-en {
	font-family: var(--f-hand);
	font-size: clamp(1rem, 1.8vw, 1.4rem);
}

.pulled .cover {
	animation: pull 1150ms cubic-bezier(0.55, 0.02, 0.32, 1) forwards;
}

.flip.pulled .cover {
	animation-name: pull-left;
}

@keyframes pull {
	0% {
		transform: none;
	}
	22% {
		transform: translateX(5%) rotate(0.6deg);
	}
	100% {
		transform: translateX(104%) rotate(1.2deg);
		visibility: hidden;
	}
}

@keyframes pull-left {
	0% {
		transform: none;
	}
	22% {
		transform: translateX(-5%) rotate(-0.6deg);
	}
	100% {
		transform: translateX(-104%) rotate(-1.2deg);
		visibility: hidden;
	}
}

/* Things in the paintings that happen once the card is revealed. */
.js .line-draw {
	stroke-dasharray: 1100;
	stroke-dashoffset: 1100;
}

.js .stop,
.js .tag {
	opacity: 0;
}

.pulled .line-draw,
.no-anim .line-draw {
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 1600ms cubic-bezier(0.45, 0, 0.2, 1) 700ms;
}

.pulled .stop,
.pulled .tag,
.no-anim .stop,
.no-anim .tag {
	opacity: 1;
	transition: opacity 400ms ease-out;
}

.pulled .stop:nth-of-type(1),
.pulled .tag:nth-of-type(1) {
	transition-delay: 800ms;
}
.pulled .stop:nth-of-type(2),
.pulled .tag:nth-of-type(2) {
	transition-delay: 1100ms;
}
.pulled .stop:nth-of-type(3),
.pulled .tag:nth-of-type(3) {
	transition-delay: 1400ms;
}
.pulled .stop:nth-of-type(4),
.pulled .tag:nth-of-type(4) {
	transition-delay: 1700ms;
}
.pulled .stop:nth-of-type(5),
.pulled .tag:nth-of-type(5) {
	transition-delay: 2000ms;
}

.rd-code,
.rd-num {
	font-family: var(--f-body);
	font-weight: 700;
	text-anchor: middle;
	fill: var(--line-ink);
}

.rd-code {
	font-size: 10px;
}

.rd-num {
	font-size: 14px;
}

.tag rect {
	fill: #fbfaf6;
	stroke: #2b2f3a;
	stroke-width: 1.5;
}

.tag text {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 15px;
	text-anchor: middle;
	fill: var(--line-ink);
}

.cal-head {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.18em;
	fill: #fff;
}

.cal-days text {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 12px;
	text-anchor: middle;
	transform: translateX(1px);
}

.js .circle-draw {
	stroke-dasharray: 160;
	stroke-dashoffset: 160;
}

.pulled .circle-draw {
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 900ms ease-out 1100ms;
}

/* Purchase intervals, as stops on a line. */
.interval {
	margin: 22px 0 0;
}

.interval-track {
	position: relative;
	height: 30px;
	margin: 0 9px;
}

.interval-track::before {
	content: '';
	position: absolute;
	left: -9px;
	right: -9px;
	top: 12px;
	height: 6px;
	border-radius: 3px;
	background: var(--orange);
}

.interval-track i {
	position: absolute;
	top: 6px;
	left: calc(var(--d) / 84 * 100%);
	width: 18px;
	height: 18px;
	margin-left: -9px;
	border-radius: 50%;
	background: var(--orange);
	box-shadow: inset 0 0 0 3px var(--orange);
}

.interval-track .due {
	background: #fff;
	width: 24px;
	height: 24px;
	top: 3px;
	margin-left: -12px;
	box-shadow:
		inset 0 0 0 4px var(--orange),
		inset 0 0 0 8px #fff,
		inset 0 0 0 12px var(--line-ink);
}

.pulled .interval-track .due {
	animation: due 1600ms ease-in-out 1800ms 3;
}

@keyframes due {
	50% {
		transform: scale(1.25);
	}
}

.interval figcaption {
	margin-top: 10px;
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.interval b {
	color: var(--ink);
}

.due-note {
	display: block;
	font-weight: 700;
	color: var(--ink);
}

/* ── In-store demo: a small piece of the app itself ────────────────────── */

.card-aisle {
	display: grid;
	place-items: end end;
	padding-right: 7%;
}

.aisle-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.95);
}

.phone {
	position: relative;
	z-index: 1;
	width: min(300px, 64%);
	margin-top: 22px;
	background: #fff;
	border: 9px solid var(--navy);
	border-bottom: 0;
	border-radius: 34px 34px 0 0;
	overflow: hidden;
	box-shadow: 0 -10px 40px rgb(30 20 10 / 0.25);
	font-family: 'Zen Maru Gothic', var(--f-body);
}

.phone-sign {
	background: var(--navy);
	color: #fff;
	padding: 12px 16px 10px;
	border-bottom: 6px solid var(--orange);
}

.phone-title {
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.2;
}

.phone-sub {
	font-size: 0.8rem;
	color: #b9c2cf;
}

.line-list {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--line-ink);
}

.line-list::before {
	content: '';
	position: absolute;
	z-index: 1;
	top: 0;
	bottom: 0;
	left: calc(1.625rem - 3px);
	width: 6px;
	background: var(--orange);
}

.line-list .station {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding-left: 4px;
	background: #e3e6eb;
	font-weight: 700;
	font-size: 0.98rem;
	border-top: 1px solid #cfd4dc;
}

.line-list .rd {
	width: 44px;
	height: 44px;
	margin-left: 0;
	box-shadow:
		inset 0 0 0 4px var(--orange),
		0 0 0 3px #e3e6eb;
	position: relative;
	z-index: 2;
}

.row {
	position: relative;
	display: grid;
	grid-template-columns: 3.25rem 1fr auto;
	align-items: center;
	width: 100%;
	min-height: 48px;
	padding: 0 14px 0 0;
	border: 0;
	border-top: 1px solid #cfd4dc;
	background: #fff;
	color: inherit;
	font: inherit;
	font-weight: 700;
	font-size: 0.98rem;
	text-align: left;
	cursor: pointer;
	transition: background-color 160ms ease-out;
}

.row:hover {
	background: #f6f7f9;
}

.row:focus-visible {
	outline-offset: -3px;
}

.stopmark {
	justify-self: center;
	position: relative;
	z-index: 2;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 3px var(--orange);
	transition:
		transform 180ms var(--ease-out),
		background-color 180ms ease-out;
}

.row.next {
	background: color-mix(in srgb, var(--orange) 14%, #fff);
	min-height: 56px;
	font-size: 1.08rem;
}

.row.next .stopmark {
	width: 24px;
	height: 24px;
	box-shadow:
		inset 0 0 0 4px var(--orange),
		inset 0 0 0 7px #fff,
		inset 0 0 0 12px var(--line-ink);
}

.row[aria-pressed='true'] {
	color: #5f6876;
}

.row[aria-pressed='true'] .row-name {
	text-decoration: line-through 2px;
}

.row[aria-pressed='true'] .stopmark {
	background: var(--orange);
	transform: scale(0.85);
	animation: tick 320ms var(--ease-out);
}

@keyframes tick {
	40% {
		transform: scale(1.3);
	}
}

.qty {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: 0.9rem;
	color: #4a5361;
}

.phone-done {
	padding: 14px 16px 18px;
	font-weight: 700;
	text-align: center;
	border-top: 1px solid #cfd4dc;
}

.try {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px !important;
	font-weight: 700;
	color: var(--ink);
}

/* ── Quick add ─────────────────────────────────────────────────────────── */

.card-voice .scene {
	position: absolute;
	inset: 0;
}

.voice {
	position: absolute;
	inset: 8% 6% 8% 37%;
	display: flex;
	flex-direction: column;
	gap: 16px;
	z-index: 1;
}

.bubble {
	position: relative;
	align-self: flex-start;
	padding: 16px 22px;
	background: #fffdf7;
	border-radius: 26px;
	font-family: var(--f-hand);
	font-size: clamp(1.05rem, 2.2vw, 1.65rem);
	line-height: 1.3;
	color: var(--ink);
	box-shadow: 0 10px 24px -10px rgb(20 40 60 / 0.4);
	min-height: 2.6em;
}

.bubble::before {
	content: '';
	position: absolute;
	left: -16px;
	bottom: 14px;
	border: 12px solid #0000;
	border-right: 18px solid #fffdf7;
	border-left: 0;
}

.caret {
	display: inline-block;
	width: 2px;
	height: 1.05em;
	margin-left: 2px;
	vertical-align: -0.15em;
	background: var(--orange);
	animation: blink 900ms steps(1) infinite;
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

.parsed {
	list-style: none;
	margin: 0;
	padding: 6px 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 24px -10px rgb(20 40 60 / 0.45);
	position: relative;
	max-width: 300px;
	color: var(--line-ink);
}

.parsed::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 23px;
	width: 6px;
	background: var(--orange);
}

.parsed li {
	position: relative;
	display: grid;
	grid-template-columns: 52px 1fr auto;
	align-items: center;
	min-height: 40px;
	padding-right: 16px;
	font-weight: 700;
	font-size: 0.98rem;
	transition:
		opacity 300ms ease-out,
		transform 400ms var(--ease-out);
}

.parsed li + li {
	border-top: 1px solid #e3e6eb;
}

.parsed b {
	font-size: 0.9rem;
	color: #4a5361;
}

.js .parsed:not(.shown) li {
	opacity: 0;
	transform: translateY(8px);
}

.parsed.shown li:nth-child(2) {
	transition-delay: 140ms;
}

.parsed.shown li:nth-child(3) {
	transition-delay: 280ms;
}

/* ── The receipt ───────────────────────────────────────────────────────── */

.card-counter {
	display: grid;
	place-items: center;
	background: url('art/counter.webp') 50% 70% / cover #a9c4b6;
}

.receipt {
	position: relative;
	z-index: 1;
	width: min(330px, 72%);
	padding: 22px 22px 34px;
	margin-right: 14%;
	background: #fffefa;
	color: #27262b;
	font-family: var(--f-receipt);
	font-size: 0.85rem;
	rotate: -2.5deg;
	box-shadow: 0 18px 30px -12px rgb(40 25 10 / 0.5);
	-webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% /
		14px 100%;
	mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}

.receipt-head {
	text-align: center;
	letter-spacing: 0.12em;
	padding-bottom: 10px;
	margin-bottom: 8px;
	border-bottom: 1px dashed #9a9aa2;
}

.receipt-lines {
	list-style: none;
	margin: 0;
	padding: 0;
}

.receipt-lines li {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 10px;
	padding: 5px 0;
}

.receipt code,
.receipt-sum code {
	font-family: inherit;
}

.receipt-lines em {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--f-body);
	font-style: normal;
	font-weight: 700;
	font-size: 0.85rem;
	color: #8a4b00;
	transition:
		opacity 300ms ease-out,
		transform 400ms var(--ease-out);
}

.receipt-lines em::before {
	content: '';
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--orange);
	flex: none;
}

.js .receipt-lines:not(.matched) em {
	opacity: 0;
	transform: translateX(-10px);
}

.receipt-lines.matched li:nth-child(2) em {
	transition-delay: 350ms;
}
.receipt-lines.matched li:nth-child(3) em {
	transition-delay: 700ms;
}
.receipt-lines.matched li:nth-child(4) em {
	transition-delay: 1050ms;
}

.receipt-sum {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed #9a9aa2;
	font-weight: 700;
}

.tanuki-img {
	user-select: none;
	-webkit-user-drag: none;
}

.card-counter .tanuki-img {
	filter: sepia(0.15) drop-shadow(0 6px 4px rgb(40 20 5 / 0.45));
	position: absolute;
	right: 5%;
	bottom: 30%;
	width: clamp(64px, 13%, 110px);
	height: auto;
	z-index: 1;
}

/* ── Live updates toast ────────────────────────────────────────────────── */

.toast {
	position: absolute;
	left: 50%;
	bottom: 6%;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	background: var(--navy);
	color: #fff;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.95rem;
	white-space: nowrap;
	box-shadow: 0 6px 24px rgb(0 0 0 / 0.3);
	transform: translate(-50%, 0);
	transition:
		transform 300ms var(--ease-out),
		opacity 240ms ease-out;
}

.js .toast:not(.live) {
	opacity: 0;
	transform: translate(-50%, 12px);
}

.toast-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--orange);
}

/* ── Tanuki: tap and it runs off, like in the app ──────────────────────── */

.tanuki-svg,
.tanuki-img {
	cursor: pointer;
	transform-box: fill-box;
	transform-origin: 50% 100%;
}

.startled {
	animation: startle 900ms cubic-bezier(0.3, 0, 0.6, 1) forwards;
}

@keyframes startle {
	20% {
		transform: translateY(-14%) scale(1.04);
	}
	45% {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
	100% {
		transform: translateX(140%);
		opacity: 0;
	}
}

.returning {
	animation: back 700ms var(--ease-out);
}

@keyframes back {
	from {
		transform: translateY(30%);
		opacity: 0;
	}
}

/* ── Departures board ──────────────────────────────────────────────────── */

.departures {
	width: min(980px, 100% - 32px);
	margin: clamp(40px, 8vw, 100px) auto 0;
}

.board {
	position: relative;
	background: var(--navy);
	color: #fff;
	border-radius: 6px;
	padding: 0 0 10px;
	box-shadow:
		0 30px 60px -20px rgb(8 10 30 / 0.6),
		inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.board-tanuki {
	position: absolute;
	top: 0;
	left: 30%;
	width: 78px;
	height: auto;
	translate: 0 -97%;
}

.js .board-tanuki {
	left: 0;
	opacity: 0;
}

.js .board.arrived .board-tanuki:not(.parked) {
	opacity: 1;
	animation: walk-in 5200ms cubic-bezier(0.3, 0, 0.4, 1) forwards;
}

.js .board .board-tanuki.parked {
	left: 30%;
	opacity: 1;
}

@keyframes walk-in {
	0% {
		left: 0;
		opacity: 0;
	}
	8% {
		opacity: 1;
	}
	100% {
		left: 30%;
		opacity: 1;
	}
}

.board-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 20px;
	padding: 22px clamp(18px, 3vw, 34px) 16px;
	border-bottom: 6px solid var(--orange);
}

.board-head h2 {
	font-family: var(--f-body);
	font-weight: 700;
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	display: flex;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
}

.board-head h2 span {
	font-family: var(--f-brush);
	font-weight: 400;
	color: var(--amber);
	font-size: 1.15em;
}

.board-head p {
	color: #b9c2cf;
	font-weight: 700;
	font-size: 0.9rem;
}

.board-table {
	width: 100%;
	border-collapse: collapse;
}

.board-table th {
	text-align: left;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #b9c2cf;
	padding: 12px 10px 8px;
	font-weight: 700;
}

.board-table th:first-child,
.board-table td:first-child {
	padding-left: clamp(18px, 3vw, 34px);
}

.board-table th:last-child,
.board-table td:last-child {
	padding-right: clamp(18px, 3vw, 34px);
	text-align: right;
}

.board-table td {
	padding: 14px 10px;
	border-top: 1px solid rgb(255 255 255 / 0.1);
	vertical-align: top;
}

.board-table td b {
	display: block;
	font-size: 1.12rem;
	line-height: 1.3;
}

.board-table td span {
	color: #c7cfdb;
	font-size: 0.95rem;
}

.plat {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: #fff;
	color: var(--line-ink) !important;
	box-shadow: inset 0 0 0 3px var(--orange);
	font-weight: 700;
	font-size: 0.88rem !important;
	white-space: nowrap;
}

.js .board-table tbody tr {
	transform-origin: 50% 0;
}

.js .board:not(.arrived) .board-table tbody tr {
	transform: rotateX(-88deg);
	opacity: 0;
}

.board.arrived .board-table tbody tr {
	transition:
		transform 520ms var(--ease-out),
		opacity 200ms ease-out;
	transition-delay: calc(var(--i, 0) * 110ms);
}

/* ── Finale ────────────────────────────────────────────────────────────── */

.finale {
	width: var(--wrap);
	margin: clamp(110px, 15vw, 200px) auto 0;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: center;
}

.finale-copy {
	color: #f4ecd8;
}

.finale-copy h2 {
	font-size: clamp(2rem, 4.2vw, 3.6rem);
	max-width: 14ch;
}

.finale-copy > p:first-of-type {
	margin: 14px 0 28px;
	font-size: 1.15rem;
	color: #e6dcc6;
}

.finale-copy .small {
	margin-top: 26px;
	font-size: 0.92rem;
	color: #c9c3d6;
	max-width: 40ch;
}

.foot {
	width: var(--wrap);
	margin: clamp(80px, 10vw, 130px) auto 0;
	padding: 22px 0 34px;
	border-top: 1px solid rgb(255 255 255 / 0.16);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	color: #c9c3d6;
	font-size: 0.9rem;
}

/* ── Smaller screens ───────────────────────────────────────────────────── */

@media (max-width: 899px) {
	.card-hero {
		aspect-ratio: 16 / 10;
	}

	.chapter,
	.chapter.flip {
		grid-template-columns: minmax(0, 1fr);
	}

	.chapter .butai,
	.chapter.flip .butai {
		grid-column: 1;
		grid-row: 1;
	}

	.chapter .back,
	.chapter.flip .back {
		grid-column: 1;
		grid-row: 2;
		margin: -26px 14px 0;
		rotate: 0.8deg;
	}

	.chapter.flip .back {
		rotate: -0.8deg;
	}

	.hero-copy,
	.finale {
		grid-template-columns: minmax(0, 1fr);
	}

	.finale .butai {
		order: 2;
	}
}

@media (max-width: 640px) {
	.topnav {
		display: none;
	}

	.topbar {
		justify-content: space-between;
	}

	.brand-name span {
		display: none;
	}

	.card-hero,
	.card-night {
		aspect-ratio: 1.25 / 1;
	}

	.brush-title {
		font-size: 1.75rem;
		right: 3%;
	}

	.card-night .brush-title {
		left: 3%;
	}

	.card-aisle {
		aspect-ratio: 4 / 5.2;
	}

	.card-voice {
		aspect-ratio: 4 / 4.6;
	}

	.voice {
		inset: 7% 6% auto 6%;
	}

	.card-counter {
		aspect-ratio: 4 / 4.4;
	}

	.receipt {
		margin-right: 18%;
		width: 74%;
	}

	.board-table thead {
		display: none;
	}

	.board-table td {
		padding-top: 12px;
		padding-bottom: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		transition-delay: 0ms !important;
	}

	.caret {
		animation: none !important;
	}
}

/* Tanuki in the paintings: standing on the ground, lit by the scene. */
.contact {
	fill: #1a1020;
	opacity: 0.5;
	filter: blur(4px);
}

.tint-dusk {
	filter: sepia(0.32) saturate(1.2) brightness(1.03) drop-shadow(3px 0 3px rgb(255 170 90 / 0.55));
}

.tint-rain {
	filter: saturate(0.7) brightness(0.82) hue-rotate(-14deg)
		drop-shadow(-2px 0 3px rgb(255 190 110 / 0.45));
}

.tint-night {
	filter: brightness(0.72) saturate(0.75) hue-rotate(-14deg);
}

.nobreak {
	white-space: nowrap;
}

/* Keep the stars off the finale's words. */
.finale-copy {
	position: relative;
	isolation: isolate;
}

.finale-copy::before {
	content: '';
	position: absolute;
	inset: -40px -12px;
	z-index: -1;
	background: radial-gradient(closest-side, #0e1638 70%, #0e163800);
}

@media (max-width: 600px) {
	.board-table tbody tr {
		display: grid;
		grid-template-columns: 1fr;
		border-top: 1px solid rgb(255 255 255 / 0.1);
		padding: 12px 18px;
		gap: 8px;
	}

	.board-table td {
		padding: 0 !important;
		border: 0;
		text-align: left !important;
	}
}
