/* ==========================================================================
   AppRocket V4 — front-end styles
   One family (Archivo, variable width + weight), midnight base, accent from
   the admin panel, and per-app colour (--app) picked from each app's icon.
   ========================================================================== */

@property --app {
	syntax: '<color>';
	inherits: true;
	initial-value: #FFB23F;
}

@view-transition {
	navigation: auto;
}

/* ---------- Tokens ---------- */

:root {
	--font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--accent: #FFB23F;
	--on-accent: #0A0E27;
	--app: var(--accent);
	--on-app: var(--on-accent);

	--ease-out: cubic-bezier(.22, 1, .36, 1);
	--ease-spring: cubic-bezier(.34, 1.45, .64, 1);
	--ease-in: cubic-bezier(.55, 0, .75, .2);

	--gutter: max(20px, env(safe-area-inset-left));
	--topbar-h: 60px;
	--safe-top: env(safe-area-inset-top);
	--safe-bottom: env(safe-area-inset-bottom);

	--r-icon: 23%;
	--r-card: 22px;
	--r-sheet: 28px;

	--fs-xs: 11.5px;
	--fs-s: 13px;
	--fs-m: 15px;
	--fs-b: 16px;
	--fs-l: 19px;
	--fs-xl: 23px;
	--fs-2xl: 30px;
	--fs-3xl: 40px;
	--fs-4xl: 56px;

	transition: --app .8s ease;
}

:root.is-quick-color {
	transition-duration: .3s;
}

:root,
[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0A0E27;
	--bg-2: #0F1433;
	--pill: #1B2250;
	--pill-2: #252E66;
	--line: rgba(164, 178, 255, .12);
	--text: #EEF1FF;
	--text-2: #A9B0D6;
	--text-3: #737BA8;
	--glass: rgba(13, 18, 46, .66);
	--glass-edge: rgba(255, 255, 255, .16);
	--shadow: 0 24px 60px -18px rgba(0, 0, 10, .7);
	--accent-ink: var(--accent);
	--rank-stroke: rgba(210, 218, 255, .34);
	--sky-ink: 230, 236, 255;
}

[data-theme="light"] .get:not(.get--lg):not(.get--xl):not(.get--glass) {
	background: color-mix(in oklab, var(--accent) 20%, #fff);
	color: var(--accent-ink);
}

[data-theme="light"] .tab-ink {
	background: linear-gradient(180deg, rgba(10, 14, 39, .04), rgba(10, 14, 39, .09));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(10, 14, 39, .06);
}

[data-theme="light"] {
	color-scheme: light;
	--bg: #EEF1F8;
	--bg-2: #F8F9FD;
	--pill: #E0E5F2;
	--pill-2: #D3DAEC;
	--line: rgba(10, 14, 39, .09);
	--text: #0A0E27;
	--text-2: #4A5178;
	--text-3: #7A809F;
	--glass: rgba(248, 249, 253, .72);
	--glass-edge: rgba(255, 255, 255, .9);
	--shadow: 0 24px 60px -20px rgba(20, 28, 70, .28);
	--accent-ink: color-mix(in oklch, var(--accent), black 34%);
	--rank-stroke: rgba(10, 14, 39, .22);
	--sky-ink: 40, 52, 120;
}

/* ---------- Base ---------- */

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

html {
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--topbar-h) + var(--safe-top) + 12px);
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	font-family: var(--font);
	font-size: var(--fs-b);
	line-height: 1.45;
	color: var(--text);
	background: transparent;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	overflow-x: hidden;
}

/* The page takes on the colour of what is on screen: a soft wash of the
   current app's colour at the very top */
body::before {
	content: '';
	position: fixed;
	inset: 0 0 auto;
	height: 70vh;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(120% 70% at 50% 0%, color-mix(in oklab, var(--app) 16%, transparent) 0%, transparent 70%);
	transition: opacity .5s;
}

/* Full-bleed artwork brings its own colour; a wash below it would show a seam */
body:has(#panel-discover:not([hidden]))::before {
	opacity: 0;
}

@media (max-width: 1023px) {
	.page-detail::before {
		opacity: 0;
	}
}

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

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
	margin: 0;
}

ol,
ul {
	padding: 0;
	list-style: none;
}

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

[hidden] {
	display: none !important;
}

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

.i {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

/* ---------- Ambient sky (optional starfield) ---------- */

.sky {
	position: fixed;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.main,
.footer {
	position: relative;
	z-index: 1;
}

/* ---------- Icons, badges, buttons ---------- */

.icon {
	position: relative;
	display: block;
	flex: none;
	width: 60px;
	aspect-ratio: 1;
	border-radius: var(--r-icon);
	overflow: hidden;
	background: var(--pill);
	transition: transform .35s var(--ease-spring);
}

.icon::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
	pointer-events: none;
}

.icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.icon--xs { width: 30px; }
.icon--s { width: 44px; }
.icon--m { width: 60px; }
.icon--l { width: 88px; }
.icon--xl { width: 112px; }

.badge {
	display: inline-flex;
	align-items: center;
	height: 19px;
	padding: 0 6px;
	border-radius: 6px;
	font-size: var(--fs-xs);
	font-weight: 700;
	font-stretch: 110%;
	line-height: 1;
	color: var(--accent-ink);
	box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 55%, transparent);
	white-space: nowrap;
}

.rate {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: var(--fs-s);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--text-2);
}

.rate .i {
	width: 13px;
	height: 13px;
	color: var(--accent);
}

.get {
	position: relative;
	display: inline-grid;
	place-items: center;
	flex: none;
	min-width: 76px;
	height: 32px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--pill);
	color: var(--accent-ink);
	font-size: var(--fs-m);
	font-weight: 750;
	font-stretch: 112%;
	letter-spacing: .01em;
	transition: transform .3s var(--ease-spring), background-color .2s, color .2s, box-shadow .3s;
}

.get:active {
	transform: scale(.92);
}

@media (hover: hover) {
	.get:hover {
		background: var(--accent);
		color: var(--on-accent);
	}
}

.get--lg {
	height: 42px;
	min-width: 104px;
	padding: 0 22px;
	font-size: var(--fs-b);
	background: var(--app);
	color: var(--on-app);
	box-shadow: 0 10px 28px -10px color-mix(in oklab, var(--app) 80%, transparent);
}

.get--xl {
	width: 100%;
	height: 56px;
	font-size: var(--fs-l);
	background: var(--app);
	color: var(--on-app);
	box-shadow: 0 16px 40px -14px color-mix(in oklab, var(--app) 85%, transparent);
}

.get--glass {
	background: rgba(255, 255, 255, .2);
	color: #fff;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

@media (hover: hover) {
	.get--lg:hover,
	.get--xl:hover {
		background: var(--app);
		color: var(--on-app);
		box-shadow: 0 14px 34px -8px color-mix(in oklab, var(--app) 90%, transparent);
	}

	.get--glass:hover {
		background: #fff;
		color: #0A0E27;
	}
}

/* Pressed Get: the label gives way to a spinning ring while the launch opens */
.get.is-busy .get-label {
	opacity: 0;
}

.get.is-busy::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2.5px solid currentColor;
	border-right-color: transparent;
	animation: spin .6s linear infinite;
}

.iconbtn {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: inherit;
	transition: background-color .2s, transform .3s var(--ease-spring);
}

.iconbtn .i {
	width: 22px;
	height: 22px;
}

.iconbtn:active {
	transform: scale(.9);
}

@media (hover: hover) {
	.iconbtn:hover {
		background: color-mix(in oklab, var(--text) 9%, transparent);
	}
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	padding: 0 28px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 750;
	font-stretch: 112%;
	transition: transform .3s var(--ease-spring);
}

.btn:active {
	transform: scale(.95);
}

/* ---------- Top bar ---------- */

/* The glass lives on the bar itself: an element with a view-transition-name
   is a backdrop root, so a blurred child could not see the page behind it */
.topbar {
	position: fixed;
	inset: 0 0 auto;
	z-index: 50;
	padding-top: var(--safe-top);
	color: var(--text);
	background-color: transparent;
	-webkit-backdrop-filter: blur(0) saturate(1);
	backdrop-filter: blur(0) saturate(1);
	box-shadow: inset 0 -1px 0 transparent;
	transition: background-color .35s, box-shadow .35s, color .35s, -webkit-backdrop-filter .35s, backdrop-filter .35s;
	view-transition-name: topbar;
}

.topbar.is-solid {
	background-color: var(--glass);
	-webkit-backdrop-filter: blur(22px) saturate(1.7);
	backdrop-filter: blur(22px) saturate(1.7);
	box-shadow: inset 0 -1px 0 var(--line);
}

/* Over artwork the bar is see-through with light content */
.topbar.is-art:not(.is-solid) {
	color: #fff;
}

.topbar.is-art:not(.is-solid) .brand-name {
	text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

.page-detail .topbar.is-art:not(.is-solid) .iconbtn {
	background: rgba(8, 10, 30, .32);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.topbar-in {
	display: flex;
	align-items: center;
	gap: 10px;
	height: var(--topbar-h);
	padding-inline: calc(var(--gutter) - 6px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding-left: 6px;
}

.brand-logo {
	width: 34px;
	height: 34px;
	object-fit: contain;
}

[data-theme="dark"] .brand-logo--light,
[data-theme="light"] .brand-logo--dark {
	display: none;
}

.topbar.is-art:not(.is-solid) .brand-logo--light {
	display: none;
}

.topbar.is-art:not(.is-solid) .brand-logo--dark {
	display: block;
}

.brand-name {
	font-size: var(--fs-l);
	font-weight: 800;
	font-stretch: 122%;
	letter-spacing: -.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbar-app {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .3s, transform .4s var(--ease-out);
}

.topbar.is-past .topbar-app {
	opacity: 1;
	transform: none;
}

.topbar-app-name {
	font-weight: 700;
	font-stretch: 112%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.theme-toggle .theme-sun,
[data-theme="light"] .theme-toggle .theme-moon {
	display: none;
}

[data-theme="light"] .theme-toggle .theme-sun {
	display: block;
}

.searchbox,
.seg {
	display: none;
}

/* ---------- Tab bar (phones, tablets) ---------- */

.tabbar {
	position: fixed;
	inset: auto 0 0;
	z-index: 50;
	padding: 0 14px calc(var(--safe-bottom) + 10px);
	pointer-events: none;
}

.tabbar-in {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	max-width: 440px;
	height: 66px;
	margin: 0 auto;
	padding: 6px;
	border-radius: 33px;
	background: var(--glass);
	-webkit-backdrop-filter: blur(26px) saturate(1.9);
	backdrop-filter: blur(26px) saturate(1.9);
	box-shadow: var(--shadow);
	pointer-events: auto;
	view-transition-name: tabbar;
}

/* Specular rim: bright on top, fading down — the glass edge */
.tabbar-in::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(180deg, var(--glass-edge), transparent 45%, color-mix(in oklab, var(--glass-edge) 40%, transparent));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.tab-ink {
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 6px;
	width: calc((100% - 12px) / 4);
	border-radius: 27px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .07);
	transform: translateX(calc(var(--tab, 0) * 100%));
	transition: transform .55s var(--ease-spring);
}

.tabbar:not([data-active]) .tab-ink {
	opacity: 0;
}

.tab {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	border-radius: 27px;
	font-size: 11px;
	font-weight: 650;
	color: var(--text-2);
	transition: color .25s, transform .3s var(--ease-spring);
}

.tab .i {
	width: 25px;
	height: 25px;
	transition: transform .45s var(--ease-spring);
}

.tab:active {
	transform: scale(.92);
}

.tab[aria-current="page"] {
	color: var(--accent-ink);
}

.tab[aria-current="page"] .i {
	fill: currentColor;
	fill-opacity: .2;
	transform: translateY(-1px) scale(1.06);
}

/* ---------- Layout ---------- */

.main {
	padding-top: calc(var(--topbar-h) + var(--safe-top));
	padding-bottom: 24px;
}

.panel {
	padding-bottom: 8px;
}

.shelf {
	margin-top: 34px;
}

.shelf-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-inline: var(--gutter);
	margin-bottom: 12px;
}

.shelf-title {
	font-size: 21px;
	font-weight: 780;
	font-stretch: 118%;
	letter-spacing: -.012em;
	line-height: 1.15;
}

.shelf-more {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: var(--fs-m);
	font-weight: 600;
	color: var(--accent-ink);
	white-space: nowrap;
}

.shelf-more .i {
	width: 16px;
	height: 16px;
}

.panel-head {
	padding: 18px var(--gutter) 18px;
}

.panel-title {
	font-size: var(--fs-3xl);
	font-weight: 820;
	font-stretch: 125%;
	letter-spacing: -.03em;
	line-height: 1;
}

/* ---------- Rails (horizontal, swipeable) ---------- */

.rail {
	position: relative;
}

.rail-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	padding-inline: var(--gutter);
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.rail-track::-webkit-scrollbar {
	display: none;
}

.rail-track > li {
	flex: none;
	scroll-snap-align: start;
}

.rail-btn {
	display: none;
}

/* Paged rows: three list rows per column, next column peeking */
.pages > .page {
	width: calc(100vw - 2 * var(--gutter) - 26px);
}

.rows {
	display: flex;
	flex-direction: column;
}

.row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 0;
}

.row + .row::before {
	content: '';
	position: absolute;
	top: 0;
	left: 74px;
	right: 0;
	height: 1px;
	background: var(--line);
}

.row-link {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1;
	min-width: 0;
}

.row-link:active .icon {
	transform: scale(.93);
}

.row-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.row-name {
	font-size: var(--fs-b);
	font-weight: 650;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.row-sub {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: var(--fs-s);
	color: var(--text-2);
}

.row .rate {
	font-size: 12.5px;
}

/* Ranked chart rows */
.chart {
	padding-inline: var(--gutter);
}

.row--ranked .row-rank {
	flex: none;
	width: 26px;
	font-size: var(--fs-l);
	font-weight: 800;
	font-stretch: 80%;
	font-variant-numeric: tabular-nums;
	text-align: center;
	color: var(--text-3);
}

.row--ranked + .row--ranked::before {
	left: 114px;
}

/* Trending: condensed outline numerals with the icon laid over them */
.ranks {
	gap: 4px;
	padding-bottom: 6px;
}

.rank {
	width: 176px;
}

.rank-link {
	position: relative;
	display: grid;
	grid-template-columns: 60px 1fr;
	grid-template-rows: auto auto auto;
	column-gap: 0;
}

.rank-no {
	grid-row: 1;
	grid-column: 1 / 3;
	align-self: end;
	justify-self: start;
	height: 116px;
	margin-left: -6px;
	font-size: 150px;
	font-weight: 850;
	font-stretch: 62%;
	line-height: .78;
	letter-spacing: -.06em;
	color: var(--bg);
	-webkit-text-stroke: 2px var(--rank-stroke);
	paint-order: stroke fill;
	user-select: none;
}

.rank:nth-child(-n+3) .rank-no {
	-webkit-text-stroke-color: color-mix(in oklab, var(--accent) 70%, transparent);
}

.rank .icon {
	grid-row: 1;
	grid-column: 2;
	align-self: end;
	width: 104px;
	box-shadow: -10px 12px 30px -12px rgba(0, 0, 0, .55);
}

.rank-link:active .icon {
	transform: scale(.94);
}

.rank-name {
	grid-row: 2;
	grid-column: 2;
	margin-top: 10px;
	font-size: var(--fs-m);
	font-weight: 650;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rank-sub {
	grid-row: 3;
	grid-column: 2;
	font-size: var(--fs-s);
	color: var(--text-2);
}

@media (hover: hover) {
	.rank-link:hover .icon {
		transform: translateY(-5px) rotate(-2deg);
	}

	.row-link:hover .row-name {
		color: var(--accent-ink);
	}
}

/* Key-art cards (Games / Apps tabs) */
.arts {
	gap: 12px;
}

.art {
	width: min(86vw, 560px);
}

.art-link {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: var(--r-card);
	overflow: hidden;
	background: var(--pill);
	isolation: isolate;
}

.art-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s var(--ease-out);
}

.art-img--icon {
	filter: blur(28px) saturate(1.5);
	transform: scale(1.4);
}

.art-link::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 35%, rgba(5, 7, 22, .82) 100%);
}

.art-meta {
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	color: #fff;
}

.art-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.art-name {
	font-size: var(--fs-l);
	font-weight: 780;
	font-stretch: 116%;
	line-height: 1.15;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.art-sub {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: var(--fs-s);
	color: rgba(255, 255, 255, .72);
}

.art-sub .badge {
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

@media (hover: hover) {
	.art-link:hover .art-img:not(.art-img--icon) {
		transform: scale(1.05);
	}
}

/* ---------- Today's pick (story card + full-screen story) ---------- */

.story {
	padding-inline: var(--gutter);
}

.story-card {
	position: relative;
	aspect-ratio: 10 / 11;
	max-height: 560px;
	width: 100%;
	border-radius: 28px;
	overflow: hidden;
	isolation: isolate;
	background: #111633;
	color: #fff;
	box-shadow: 0 34px 60px -34px color-mix(in oklab, var(--app) 70%, #000);
	transition: transform .45s var(--ease-spring);
}

.story-card:has(.story-hit:active) {
	transform: scale(.97);
}

.story-art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	transition: transform 1.2s var(--ease-out);
}

.story-art--icon {
	filter: blur(34px) saturate(1.6);
	transform: scale(1.5);
}

.story-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(5, 7, 22, .25) 0%, transparent 26%, rgba(5, 7, 22, .45) 50%, rgba(5, 7, 22, .94) 100%),
		radial-gradient(90% 60% at 20% 100%, color-mix(in oklab, var(--app) 40%, transparent), transparent 70%);
}

@media (hover: hover) {
	.story-card:hover .story-art:not(.story-art--icon) {
		transform: scale(1.04);
	}
}

/* The whole card opens the story; only the Get button sits above it */
.story-hit {
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
}

.story-hit:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: -3px;
	border-radius: inherit;
}

.story-content {
	position: absolute;
	inset: auto 0 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	pointer-events: none;
}

.story-name {
	font-size: var(--fs-2xl);
	font-weight: 820;
	font-stretch: 122%;
	letter-spacing: -.025em;
	line-height: 1;
	overflow-wrap: anywhere;
}

.story-teaser {
	max-width: 52ch;
	font-size: var(--fs-m);
	line-height: 1.45;
	color: rgba(255, 255, 255, .78);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.story-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.story-sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	flex: 1;
	min-width: 0;
	font-size: var(--fs-s);
	font-weight: 600;
}

.story-card .story-sub {
	color: rgba(255, 255, 255, .75);
}

.story-card .story-sub .rate {
	color: inherit;
}

.story-card .story-sub .badge {
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.story-meta .get {
	pointer-events: auto;
}

/* Full-screen story */
.story-sheet {
	position: fixed;
	inset: 0;
	z-index: 90;
}

.story-scrim {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 20, .62);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.story-panel {
	position: absolute;
	inset: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--bg);
	color: var(--text);
	transition: transform .4s var(--ease-out);
	scrollbar-width: thin;
}

.story-panel.is-dragging {
	transition: none;
}

.story-hero {
	position: relative;
	aspect-ratio: 10 / 11;
	max-height: 74vh;
	width: 100%;
	overflow: hidden;
	background: #111633;
	color: #fff;
	touch-action: pan-x;
}

.story-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(5, 7, 22, .5) 0%, transparent 24%, transparent 44%, rgba(5, 7, 22, .9) 100%),
		radial-gradient(90% 60% at 20% 100%, color-mix(in oklab, var(--app) 40%, transparent), transparent 70%);
}

.story-close {
	position: absolute;
	top: calc(var(--safe-top) + 12px);
	right: 12px;
	z-index: 2;
	color: #fff;
	background: rgba(8, 10, 30, .4);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.story-hero-text {
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	padding: 0 var(--gutter) 22px;
}

.story-kicker {
	margin-bottom: 8px;
	font-size: var(--fs-s);
	font-weight: 650;
	color: rgba(255, 255, 255, .72);
}

.story-hero .story-name {
	font-size: 36px;
}

.story-body {
	max-width: 720px;
	margin: 0 auto;
	padding: 22px var(--gutter) calc(var(--safe-bottom) + 48px);
}

.story-app {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

.story-app-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}

.story-app-name {
	font-size: var(--fs-l);
	font-weight: 750;
	font-stretch: 112%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.story-app .story-sub {
	color: var(--text-2);
}

.story-text {
	margin-top: 22px;
}

.story-stats {
	margin: 28px 0 0;
}

.story-link {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-top: 24px;
	font-weight: 650;
	color: var(--accent-ink);
}

.story-link .i {
	width: 16px;
	height: 16px;
}

/* Without View Transitions the sheet simply rises in and out */
.story-sheet.is-in .story-scrim { animation: story-fade .35s ease both; }
.story-sheet.is-in .story-panel { animation: story-rise .5s var(--ease-out) both; }
.story-sheet.is-out .story-scrim { animation: story-fade .25s ease reverse both; }
.story-sheet.is-out .story-panel { animation: story-rise .3s var(--ease-in) reverse both; }

@keyframes story-fade {
	from { opacity: 0; }
}

@keyframes story-rise {
	from { opacity: 0; transform: translateY(40px) scale(.97); }
}

/* With View Transitions: frame, artwork, title and icon morph card <-> story */
.story-vt .story-card { view-transition-name: story-frame; }
.story-vt .story-card .story-art { view-transition-name: story-art; }
.story-vt .story-card .story-name { view-transition-name: story-name; }
.story-vt .story-card .icon { view-transition-name: story-icon; }

.story-vt.is-story .story-card,
.story-vt.is-story .story-card .story-art,
.story-vt.is-story .story-card .story-name,
.story-vt.is-story .story-card .icon {
	view-transition-name: none;
}

.story-vt.is-story .story-panel { view-transition-name: story-frame; }
.story-vt.is-story .story-panel .story-art { view-transition-name: story-art; }
.story-vt.is-story .story-panel .story-name { view-transition-name: story-name; }
.story-vt.is-story .story-app .icon { view-transition-name: story-icon; }

/* Chrome stays part of the page underneath while the card grows over it */
.story-vt .topbar,
.story-vt .tabbar-in {
	view-transition-name: none;
}

.story-vt::view-transition-old(root) {
	animation: vt-fade-out .3s ease both;
}

.story-vt::view-transition-new(root) {
	animation: story-fade .3s ease both;
}

.story-vt::view-transition-group(story-frame),
.story-vt::view-transition-group(story-art),
.story-vt::view-transition-group(story-name),
.story-vt::view-transition-group(story-icon) {
	animation-duration: .55s;
	animation-timing-function: cubic-bezier(.2, .9, .25, 1.04);
}

.story-vt::view-transition-old(story-art),
.story-vt::view-transition-new(story-art) {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-vt::view-transition-old(story-name),
.story-vt::view-transition-new(story-name) {
	width: auto;
	height: 100%;
	object-fit: contain;
	object-position: left bottom;
}

/* ---------- Spotlight (homepage hero) ---------- */

.spot {
	position: relative;
	height: calc(clamp(340px, 94vw, 440px) + var(--safe-top));
	margin-top: calc(-1 * (var(--topbar-h) + var(--safe-top)));
	overflow: hidden;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.slide {
	position: absolute;
	inset: 0;
	visibility: hidden;
}

.slide.is-active,
.slide.is-leaving {
	visibility: visible;
}

.slide-art {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: var(--bg-2);
}

.slide-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.14);
	transition: opacity 1s ease;
}

.slide-art--icon img {
	filter: blur(34px) saturate(1.6);
	transform: scale(1.6);
}

.slide.is-active .slide-art img {
	opacity: 1;
	animation: drift var(--spot-interval, 6s) linear forwards;
}

.slide-art--icon img,
.slide.is-active .slide-art--icon img {
	animation: none;
}

@keyframes drift {
	from { transform: scale(1.14) translate3d(1.5%, 0, 0); }
	to { transform: scale(1.04) translate3d(-1.5%, 0, 0); }
}

.slide-art::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(5, 7, 22, .55) 0%, transparent 22%, transparent 40%, color-mix(in oklab, var(--bg) 45%, transparent) 58%, color-mix(in oklab, var(--bg) 80%, transparent) 74%, color-mix(in oklab, var(--bg) 96%, transparent) 88%, var(--bg) 100%),
		radial-gradient(90% 50% at 20% 100%, color-mix(in oklab, var(--app) 30%, transparent), transparent 70%);
}

.slide-body {
	position: absolute;
	inset: auto var(--gutter) 38px;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas:
		"name name name"
		"icon sub cta";
	align-items: center;
	column-gap: 12px;
	row-gap: 14px;
}

.slide-icon {
	grid-area: icon;
}

.slide-icon .icon {
	width: 54px;
	box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6);
}

/* Phones: name spans the full width, icon / meta / Get share one row */
.slide-text {
	display: contents;
}

.slide-name {
	grid-area: name;
}

.slide-sub {
	grid-area: sub;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	min-width: 0;
	font-size: var(--fs-s);
	font-weight: 600;
	color: var(--text-2);
}

.slide-name {
	font-size: var(--fs-2xl);
	font-weight: 820;
	font-stretch: 122%;
	letter-spacing: -.025em;
	line-height: 1;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.slide-blurb {
	display: none;
}

.slide-body .get {
	grid-area: cta;
	justify-self: end;
}

/* Text rises in, staggered, each time a slide becomes active. With JS the
   first slide waits for .is-ready so the opening plays as one sequence. */
.js .spot:not(.is-ready) .slide .slide-art img {
	opacity: 0;
}

.js .spot:not(.is-ready) .slide.is-active .slide-icon,
.js .spot:not(.is-ready) .slide.is-active .slide-sub,
.js .spot:not(.is-ready) .slide.is-active .slide-name,
.js .spot:not(.is-ready) .slide.is-active .slide-blurb,
.js .spot:not(.is-ready) .slide.is-active .get {
	opacity: 0;
	transform: translateY(18px);
}

.js .spot:not(.is-ready) .timer.is-active .timer-fill {
	animation: none;
}

.slide .slide-icon,
.slide .slide-sub,
.slide .slide-name,
.slide .slide-blurb,
.slide .get {
	opacity: 0;
	transform: translateY(18px);
}

.slide.is-active .slide-icon,
.slide.is-active .slide-sub,
.slide.is-active .slide-name,
.slide.is-active .slide-blurb,
.slide.is-active .get {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease, transform .8s var(--ease-out);
}

.slide.is-active .slide-sub { transition-delay: .08s; }
.slide.is-active .slide-name { transition-delay: .14s; }
.slide.is-active .slide-blurb { transition-delay: .2s; }
.slide.is-active .get { transition-delay: .24s; }

.slide.is-leaving .slide-icon,
.slide.is-leaving .slide-sub,
.slide.is-leaving .slide-name,
.slide.is-leaving .slide-blurb,
.slide.is-leaving .get {
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity .3s ease, transform .4s ease;
}

.slide.is-leaving .get:active {
	transform: none;
}

.spot-timers {
	position: absolute;
	inset: auto var(--gutter) 12px;
	z-index: 2;
	display: flex;
	gap: 5px;
}

.timer {
	flex: 1;
	padding: 8px 0;
}

.timer-icon {
	display: none;
}

.timer-bar {
	display: block;
	height: 3px;
	border-radius: 3px;
	background: color-mix(in oklab, var(--text) 22%, transparent);
	overflow: hidden;
}

.timer-fill {
	display: block;
	height: 100%;
	width: 100%;
	border-radius: inherit;
	background: var(--text);
	transform: scaleX(0);
	transform-origin: left;
}

.timer.is-done .timer-fill {
	transform: scaleX(1);
}

.timer.is-active .timer-fill {
	animation: fill var(--spot-interval, 6s) linear forwards;
}

.spot.is-paused .timer.is-active .timer-fill,
.spot.is-still .timer.is-active .timer-fill {
	animation-play-state: paused;
}

.spot.is-still .timer.is-active .timer-fill {
	animation: none;
	transform: scaleX(1);
}

@keyframes fill {
	to { transform: scaleX(1); }
}

/* ---------- App detail ---------- */

.main--detail {
	padding-top: 0;
}

.hero {
	position: relative;
}

.hero-art {
	position: relative;
	height: clamp(250px, 70vw, 460px);
	overflow: hidden;
	background: var(--bg-2);
}

.hero-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: 50% 0;
}

.hero-art--icon img {
	filter: blur(40px) saturate(1.6);
	transform: scale(1.6);
}

.hero-art::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(5, 7, 22, .5) 0%, transparent 30%, transparent 50%, var(--bg) 100%),
		radial-gradient(80% 60% at 18% 100%, color-mix(in oklab, var(--app) 34%, transparent), transparent 70%);
}

@supports (animation-timeline: scroll()) {
	.hero-art img {
		animation: hero-parallax linear both;
		animation-timeline: scroll(root);
		animation-range: 0 500px;
	}

	.hero-art--icon img {
		animation: none;
	}

	@keyframes hero-parallax {
		to { transform: translateY(30%) scale(1.08); opacity: .55; }
	}
}

.hero-in {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"icon text"
		"cta cta";
	align-items: end;
	column-gap: 16px;
	row-gap: 20px;
	margin-top: -64px;
	padding-inline: var(--gutter);
}

.hero-icon {
	grid-area: icon;
}

.hero-icon .icon {
	view-transition-name: app-icon;
	box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7), 0 0 0 4px var(--bg);
}

.hero-text {
	grid-area: text;
	min-width: 0;
	padding-bottom: 4px;
}

.hero-name {
	font-size: var(--fs-2xl);
	font-weight: 820;
	font-stretch: 122%;
	letter-spacing: -.028em;
	line-height: 1.02;
	overflow-wrap: anywhere;
}

.hero-sub {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: var(--fs-m);
	font-weight: 600;
	color: var(--text-2);
}

.hero-cta {
	grid-area: cta;
}

.stats {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	margin: 26px var(--gutter) 0;
	padding: 14px 0;
	border-block: 1px solid var(--line);
	text-align: center;
}

.stat {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: 4px;
	padding: 2px 6px;
	min-width: 0;
}

.stat + .stat {
	border-left: 1px solid var(--line);
}

.stat dt {
	font-size: var(--fs-xs);
	font-weight: 600;
	color: var(--text-3);
}

.stat dd {
	display: flex;
	flex-direction: column;
	align-items: center;
	white-space: nowrap;
}

.stat-big {
	font-size: var(--fs-l);
	font-weight: 800;
	font-stretch: 112%;
	font-variant-numeric: tabular-nums;
	line-height: 1.15;
}

.stat-unit {
	font-size: var(--fs-xs);
	font-weight: 600;
	color: var(--text-2);
}

.stars {
	font-size: 11px;
	letter-spacing: 1px;
	line-height: 1.2;
	background: linear-gradient(90deg, var(--accent) calc(var(--stars) * 20%), color-mix(in oklab, var(--text) 22%, transparent) 0);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.detail-cols {
	display: grid;
	gap: 34px;
	margin-top: 30px;
	padding-inline: var(--gutter);
}

.about .shelf-title,
.info .shelf-title {
	margin-bottom: 12px;
}

.rich {
	font-size: var(--fs-b);
	line-height: 1.6;
	color: var(--text-2);
	max-width: 68ch;
	overflow-wrap: anywhere;
}

.rich > * + * {
	margin-top: .8em;
}

.rich h2,
.rich h3,
.rich h4 {
	font-size: var(--fs-l);
	font-weight: 750;
	font-stretch: 110%;
	line-height: 1.3;
	color: var(--text);
}

.rich strong {
	color: var(--text);
	font-weight: 650;
}

.rich ul,
.rich ol {
	padding-left: 1.2em;
}

.rich ul {
	list-style: disc;
}

.rich ol {
	list-style: decimal;
}

.rich li + li {
	margin-top: .35em;
}

.rich a {
	color: var(--accent-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rich.is-clamped {
	max-height: 10.6em;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 55%, transparent);
	mask-image: linear-gradient(#000 55%, transparent);
}

.more {
	margin-top: 10px;
	font-weight: 650;
	color: var(--accent-ink);
}

.info-list > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 0;
	border-bottom: 1px solid var(--line);
	font-size: var(--fs-m);
}

.info-list > div:first-child {
	border-top: 1px solid var(--line);
}

.info-list dt {
	color: var(--text-2);
}

.info-list dd {
	font-weight: 600;
	text-align: right;
}

/* Sticky Get bar once the main button scrolls away */
.dock {
	position: fixed;
	inset: auto 0 0;
	z-index: 45;
	padding: 0 12px calc(var(--safe-bottom) + 10px);
	transform: translateY(140%);
	transition: transform .5s var(--ease-out);
	pointer-events: none;
}

.dock.is-on {
	transform: none;
}

.dock-in {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 560px;
	margin: 0 auto;
	padding: 10px 10px 10px 10px;
	border-radius: 24px;
	background: var(--glass);
	-webkit-backdrop-filter: blur(26px) saturate(1.9);
	backdrop-filter: blur(26px) saturate(1.9);
	box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
	pointer-events: auto;
}

.dock-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.dock-name {
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dock-sub {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--fs-s);
	color: var(--text-2);
}

.dock .get {
	height: 40px;
	min-width: 92px;
	background: var(--app);
	color: var(--on-app);
}

/* ---------- Unlock page (offers → download) ---------- */

/* The page fills the screen so the footer always sits at the bottom */
.page-unlock {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.page-unlock .main {
	flex: 1 0 auto;
}

.page-unlock .footer,
.page-lost .footer {
	padding-bottom: calc(var(--safe-bottom) + 32px);
}

.unlock {
	width: min(100% - 32px, 600px);
	margin: 0 auto;
	padding-bottom: 8px;
}

/* The download card: same object on every screen size */
.unlock-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 12px;
	padding: 26px 20px 24px;
	border-radius: 28px;
	background: color-mix(in oklab, var(--bg-2) 75%, transparent);
	box-shadow: inset 0 0 0 1px var(--line);
	text-align: center;
}

.unlock-icon {
	position: relative;
	padding: 12px;
}

/* A slow scanning ring while locked; a steady glow once unlocked */
.unlock-icon::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 30%;
	background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in oklab, var(--app) 90%, #fff) 100%);
	-webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
	mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
	animation: spin 2.6s linear infinite;
}

.unlock-icon .icon {
	width: 112px;
	view-transition-name: app-icon;
	box-shadow: 0 24px 50px -18px color-mix(in oklab, var(--app) 75%, #000);
}

.unlock-badge {
	position: absolute;
	right: 0;
	bottom: 0;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--bg);
	color: var(--text);
	box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line);
	transition: color .4s, background-color .4s;
}

.lock {
	width: 22px;
	height: 22px;
	overflow: visible;
}

.lock-shackle {
	transform-box: view-box;
	transform-origin: 16px 11px;
	transition: transform .6s var(--ease-spring);
}

.unlock-name {
	margin-top: 18px;
	font-size: var(--fs-2xl);
	font-weight: 820;
	font-stretch: 122%;
	letter-spacing: -.025em;
	line-height: 1.05;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.unlock-sub {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px 10px;
	margin-top: 8px;
	font-size: var(--fs-m);
	font-weight: 600;
	color: var(--text-2);
}

.unlock-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin-top: 24px;
}

.unlock-download {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-decoration: none;
	overflow: hidden;
}

.unlock-download .i {
	width: 22px;
	height: 22px;
}

/* One line on every screen: slightly smaller on phones, long names end in … */
.unlock-download {
	padding: 0 22px;
	font-size: var(--fs-b);
	font-stretch: 106%;
}

.unlock-download-label {
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.unlock-download-arrow,
.is-unlocked .unlock-download-lock {
	display: none;
}

.is-unlocked .unlock-download-arrow {
	display: block;
}

/* Locked: visible, clearly unavailable */
.unlock-download[aria-disabled="true"] {
	background: var(--pill);
	color: var(--text-3);
	box-shadow: none;
	cursor: not-allowed;
}

@media (hover: hover) {
	.unlock-download[aria-disabled="true"]:hover {
		background: var(--pill);
		color: var(--text-3);
		box-shadow: none;
	}
}

.unlock-download.is-nudged {
	animation: nudge .45s var(--ease-out);
}

@keyframes nudge {
	20%, 60% { transform: translateX(-6px); }
	40%, 80% { transform: translateX(6px); }
}

/* Unlocked: the button lights up in the app's colour with one sweep of light */
.is-unlocked .unlock-download::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
	transform: translateX(-120%);
	animation: sweep 1.4s var(--ease-out) .35s;
}

@keyframes sweep {
	to { transform: translateX(120%); }
}

.unlock-status {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	font-size: var(--fs-m);
	color: var(--text-2);
	text-wrap: balance;
}

.unlock-dot {
	position: relative;
	flex: none;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--app);
}

.unlock-dot::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--app);
	animation: ping 1.8s var(--ease-out) infinite;
}

@keyframes ping {
	to { transform: scale(3.2); opacity: 0; }
}

.unlock-check {
	display: none;
	width: 18px;
	height: 18px;
	color: var(--app);
}

.is-unlocked .unlock-dot {
	display: none;
}

.is-unlocked .unlock-check {
	display: block;
}

.is-unlocked .unlock-status {
	color: var(--text);
	font-weight: 650;
}

.is-unlocked .unlock-icon::before {
	background: var(--app);
	animation: none;
	filter: drop-shadow(0 0 10px var(--app));
}

.is-unlocked .unlock-badge {
	background: var(--app);
	color: var(--on-app);
}

.is-unlocked .lock-shackle {
	transform: translateY(-2.5px) rotate(32deg);
}

.unlock-offers {
	margin-top: 36px;
	text-align: center;
	transition: opacity .4s, transform .5s var(--ease-out);
}

.unlock-offers.is-leaving {
	opacity: 0;
	transform: translateY(16px);
}

.unlock-how {
	max-width: 38ch;
	margin: 8px auto 0;
	font-size: var(--fs-m);
	color: var(--text-2);
	text-wrap: balance;
}

/* Offers as one grouped list */
.offers {
	margin-top: 18px;
	padding: 6px 14px;
	border-radius: 22px;
	background: color-mix(in oklab, var(--bg-2) 75%, transparent);
	box-shadow: inset 0 0 0 1px var(--line);
	text-align: left;
}

.offers:empty {
	display: none;
}

/* The network ranks offers for the visitor; the first gets the app's colour */
.offers .offer:first-child .offer-go:not(.is-started) {
	background: var(--app);
	color: var(--on-app);
	box-shadow: 0 10px 24px -12px color-mix(in oklab, var(--app) 85%, transparent);
}

.unlock-help {
	max-width: 40ch;
	margin: 16px auto 0;
	font-size: var(--fs-s);
	line-height: 1.5;
	color: var(--text-3);
	text-wrap: balance;
}

.unlock-more {
	display: none;
	align-items: center;
	gap: 2px;
	margin-top: 18px;
	font-weight: 650;
	color: var(--accent-ink);
}

.unlock-more .i {
	width: 16px;
	height: 16px;
}

.is-unlocked .unlock-more {
	display: inline-flex;
}

.offer .icon {
	background: var(--pill);
}

.offer-text {
	font-size: var(--fs-s);
	line-height: 1.4;
	color: var(--text-2);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.offer .row-link {
	cursor: default;
}

/* Opened offer: the label gives way to a spinner while we wait for the
   network to confirm; tapping it again re-opens the offer */
.offer-go.is-started {
	background: transparent;
	color: var(--app);
	box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--app) 45%, transparent);
}

.offer-go.is-started .get-label {
	opacity: 0;
}

.offer-go.is-started::after {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2.5px solid currentColor;
	border-right-color: transparent;
	animation: spin .7s linear infinite;
}

/* Loading placeholders while offers are fetched */
.sk {
	display: block;
	width: 80%;
	height: 11px;
	border-radius: 6px;
	background: var(--pill);
}

.sk--title {
	width: 46%;
	height: 14px;
	margin-bottom: 4px;
}

.offer--skeleton .icon,
.offer--skeleton .sk {
	background: linear-gradient(90deg, var(--pill) 30%, var(--pill-2) 50%, var(--pill) 70%);
	background-size: 300% 100%;
	animation: shimmer 1.4s linear infinite;
}

.offer--skeleton .row-text {
	flex: 1;
}

@keyframes shimmer {
	from { background-position: 100% 0; }
	to { background-position: -50% 0; }
}

.offers-empty {
	padding: 28px 0 8px;
	color: var(--text-2);
	text-align: center;
	text-wrap: balance;
}

.unlock-burst {
	position: fixed;
	inset: 0;
	z-index: 95;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Arriving from the install animation: its flash fades out over the page */
.arrive {
	display: none;
}

.is-arriving .arrive {
	position: fixed;
	inset: 0;
	z-index: 150;
	display: block;
	pointer-events: none;
	background: radial-gradient(circle at 50% 30%, #fff 0%, color-mix(in oklab, var(--app) 55%, #fff) 35%, color-mix(in oklab, var(--app) 30%, var(--bg)) 100%);
	animation: arrive 1s var(--ease-out) forwards;
}

@keyframes arrive {
	to { opacity: 0; visibility: hidden; }
}

/* ---------- Search sheet ---------- */

.search {
	position: fixed;
	inset: 0;
	z-index: 80;
}

.search-scrim {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 20, .55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity .35s;
}

.search.is-open .search-scrim {
	opacity: 1;
}

.search-panel {
	position: absolute;
	inset: calc(var(--safe-top) + 10px) 0 0;
	display: flex;
	flex-direction: column;
	border-radius: var(--r-sheet) var(--r-sheet) 0 0;
	background: var(--bg-2);
	box-shadow: var(--shadow);
	transform: translateY(104%);
	transition: transform .55s var(--ease-out);
	overflow: hidden;
}

.search.is-open .search-panel {
	transform: none;
}

.search-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 12px 12px var(--gutter);
}

.search-field {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	height: 50px;
	padding: 0 16px;
	border-radius: 16px;
	background: var(--pill);
	color: var(--text-3);
	transition: box-shadow .2s;
}

.search-field:focus-within {
	box-shadow: 0 0 0 2px var(--accent);
}

.search-field input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: 0;
	background: none;
	color: var(--text);
	font: inherit;
	font-size: 17px;
}

.search-field input::placeholder {
	color: var(--text-3);
}

.search-field input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.search-body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 6px var(--gutter) calc(var(--safe-bottom) + 24px);
}

.search-caption {
	margin: 8px 0 4px;
	font-size: var(--fs-s);
	font-weight: 600;
	color: var(--text-3);
}

.hit {
	opacity: 0;
	transform: translateY(8px);
	animation: rise .45s var(--ease-out) forwards;
	animation-delay: calc(var(--n, 0) * 28ms);
}

.hit .row-link {
	border-radius: 16px;
}

.hit.is-focus .row-link,
.hit .row-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
}

.hit mark {
	background: none;
	color: var(--accent-ink);
}

.search-empty {
	padding: 48px 0;
	text-align: center;
	color: var(--text-2);
	text-wrap: balance;
}

/* ---------- Install sequence ("launch") ---------- */

.launch {
	--p: 0;
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: calc(var(--safe-top) + 40px) 20px calc(var(--safe-bottom) + 24px);
	overflow: hidden;
	color: #fff;
	background: radial-gradient(90% 60% at 50% 34%, color-mix(in oklab, var(--app) 24%, #04061A) 0%, #04061A 72%);
	opacity: 0;
	transition: opacity .35s ease;
}

.launch.is-open {
	opacity: 1;
}

.launch-sky {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.launch-cancel {
	position: absolute;
	top: calc(var(--safe-top) + 12px);
	right: 12px;
	z-index: 2;
	color: rgba(255, 255, 255, .7);
	transition: opacity .3s, background-color .2s;
}

.launch.is-done .launch-cancel {
	opacity: 0;
	pointer-events: none;
}

.launch-stage {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(400px, 100%);
	text-align: center;
}

.launch-orb {
	position: relative;
	width: clamp(140px, 42vw, 188px);
	aspect-ratio: 1;
	margin-bottom: 30px;
}

.launch-ring {
	position: absolute;
	inset: -16px;
	width: calc(100% + 32px);
	height: calc(100% + 32px);
	transform: rotate(-90deg);
	overflow: visible;
}

.launch-ring-track,
.launch-ring-bar {
	fill: none;
	stroke-width: 3;
}

.launch-ring-track {
	stroke: rgba(255, 255, 255, .12);
}

.launch-ring-bar {
	stroke: var(--app);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: calc(100 - var(--p));
	filter: drop-shadow(0 0 6px var(--app));
}

.launch-icon {
	position: absolute;
	inset: 0;
	border-radius: var(--r-icon);
	overflow: hidden;
	background: #111633;
	box-shadow: 0 30px 70px -20px color-mix(in oklab, var(--app) 60%, #000);
}

.launch-icon img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.launch-icon-dim {
	filter: grayscale(1) brightness(.42);
}

/* The icon fills with colour from the bottom as the install progresses */
.launch-icon-lit {
	clip-path: inset(calc(100% - var(--p) * 1%) 0 0 0);
}

.launch-icon::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% - var(--p) * 1%);
	height: 2px;
	background: #fff;
	box-shadow: 0 0 14px 2px var(--app);
	opacity: .9;
}

.launch.is-done .launch-icon::after {
	opacity: 0;
	transition: opacity .3s;
}

.launch-kicker {
	font-size: var(--fs-s);
	font-weight: 600;
	color: rgba(255, 255, 255, .6);
}

.launch-name {
	max-width: 100%;
	margin-top: 4px;
	font-size: var(--fs-xl);
	font-weight: 800;
	font-stretch: 118%;
	letter-spacing: -.015em;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

/* The percentage stretches wider as the download speeds up */
.launch-pct {
	margin-top: 14px;
	font-size: clamp(64px, 20vw, 92px);
	font-weight: 850;
	font-stretch: var(--stretch, 100%);
	font-variant-numeric: tabular-nums;
	letter-spacing: -.04em;
	line-height: .9;
	color: #fff;
	text-shadow: 0 0 40px color-mix(in oklab, var(--app) 55%, transparent);
}

.launch-pct-sign {
	margin-left: .04em;
	font-size: .38em;
	font-weight: 700;
	vertical-align: .95em;
	color: rgba(255, 255, 255, .6);
}

.launch-meter {
	display: flex;
	gap: 18px;
	margin-top: 10px;
	font-size: var(--fs-s);
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, .58);
}

.launch-steps {
	display: flex;
	flex-direction: column;
	gap: 11px;
	width: min(290px, 100%);
	margin-top: 30px;
	text-align: left;
}

.step {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: var(--fs-m);
	color: rgba(255, 255, 255, .38);
	transition: color .3s;
}

.step-dot {
	position: relative;
	display: grid;
	place-items: center;
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22);
}

.step-dot .i {
	width: 14px;
	height: 14px;
	color: var(--on-app);
	transform: scale(0);
}

.step.is-active {
	color: #fff;
	font-weight: 650;
}

.step.is-active .step-dot {
	box-shadow: none;
}

.step.is-active .step-dot::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--app);
	border-right-color: transparent;
	animation: spin .7s linear infinite;
}

.step.is-done {
	color: rgba(255, 255, 255, .62);
}

.step.is-done .step-dot {
	background: var(--app);
	box-shadow: 0 0 12px -2px var(--app);
}

.step.is-done .step-dot .i {
	transform: scale(1);
	transition: transform .45s var(--ease-spring);
}

.launch-flash {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	opacity: 0;
	background: radial-gradient(circle at 50% 40%, #fff 0%, color-mix(in oklab, var(--app) 60%, #fff) 30%, transparent 70%);
}

/* Page behind the launch recedes, like a native modal */
.is-launching .main,
.is-launching .story-sheet,
.is-launching .footer,
.is-launching .topbar,
.is-launching .tabbar,
.is-launching .dock {
	transform: scale(.94);
	filter: blur(6px);
	transition: transform .6s var(--ease-out), filter .6s;
}

.launch-ghost {
	position: fixed;
	z-index: 110;
	border-radius: var(--r-icon);
	overflow: hidden;
	pointer-events: none;
	will-change: transform;
}

.launch-ghost img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Splash (first visit in a session) ---------- */

.splash {
	display: none;
}

.is-splash .splash {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	background: #0A0E27;
	color: #fff;
	animation: splash-out .75s var(--ease-in) 1s forwards;
}

.splash-mark {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	animation: splash-in .7s var(--ease-spring) both;
}

.splash-logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	animation: splash-lift .75s var(--ease-in) 1s forwards;
}

.splash-name {
	font-size: var(--fs-xl);
	font-weight: 820;
	font-stretch: 125%;
	letter-spacing: -.02em;
}

.splash-trail {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 2px;
	height: 40vh;
	margin-left: -1px;
	background: linear-gradient(var(--accent), transparent);
	transform: scaleY(0);
	transform-origin: top;
	animation: splash-trail .9s var(--ease-out) .35s forwards;
	opacity: .8;
}

@keyframes splash-in {
	from { opacity: 0; transform: scale(.85) translateY(10px); }
}

@keyframes splash-trail {
	to { transform: scaleY(1); opacity: 0; }
}

@keyframes splash-lift {
	to { transform: translateY(-38vh) scale(.7); }
}

@keyframes splash-out {
	to { clip-path: inset(0 0 100% 0); visibility: hidden; }
}

/* ---------- Toast ---------- */

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--safe-bottom) + 96px);
	z-index: 120;
	padding: 11px 18px;
	border-radius: 999px;
	background: var(--text);
	color: var(--bg);
	font-size: var(--fs-m);
	font-weight: 650;
	transform: translate(-50%, 20px);
	opacity: 0;
	transition: opacity .3s, transform .45s var(--ease-spring);
}

.toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */

.footer {
	padding: 56px var(--gutter) calc(var(--safe-bottom) + 108px);
	color: var(--text-3);
	font-size: var(--fs-xs);
	line-height: 1.6;
	text-align: center;
}

.footer-in {
	max-width: 480px;
	margin: 0 auto;
}

/* A short rule marks where the catalogue ends and the fine print begins */
.footer-in::before {
	content: '';
	display: block;
	width: 28px;
	height: 2px;
	margin: 0 auto 20px;
	border-radius: 2px;
	background: color-mix(in oklab, var(--text) 16%, transparent);
}

.footer-text {
	text-wrap: balance;
}

.footer-meta {
	margin-top: 8px;
	font-size: 11px;
	color: color-mix(in oklab, var(--text-3) 75%, transparent);
}

/* ---------- Mobile-only gate (desktop visitors) ---------- */

.blocked {
	position: relative;
	z-index: 1;
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 48px;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 48px var(--gutter);
	text-align: center;
	background: radial-gradient(70% 60% at 70% 50%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%);
}

.blocked-copy {
	max-width: 460px;
}

.blocked-title {
	font-size: var(--fs-3xl);
	font-weight: 820;
	font-stretch: 122%;
	letter-spacing: -.03em;
	line-height: 1.02;
	text-wrap: balance;
}

.blocked-text {
	margin-top: 16px;
	font-size: var(--fs-l);
	color: var(--text-2);
	text-wrap: pretty;
}

.blocked-hint {
	display: inline-flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 24px;
	font-size: var(--fs-m);
	color: var(--text-3);
	text-align: left;
}

.phone {
	position: relative;
	width: 240px;
	height: 480px;
	padding: 12px;
	border-radius: 46px;
	background: #151B40;
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14), var(--shadow);
}

.phone::before {
	content: '';
	position: absolute;
	top: 22px;
	left: 50%;
	width: 70px;
	height: 20px;
	margin-left: -35px;
	border-radius: 20px;
	background: #05071A;
	z-index: 2;
}

.phone-screen {
	position: relative;
	display: grid;
	place-items: center;
	height: 100%;
	border-radius: 36px;
	background: radial-gradient(circle at 50% 40%, color-mix(in oklab, var(--accent) 30%, #0A0E27), #0A0E27 75%);
	overflow: hidden;
}

.qr {
	width: 156px;
	padding: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 0 0 6px rgba(255, 255, 255, .08);
}

.qr svg {
	display: block;
	width: 100%;
	height: auto;
}

.scanline {
	position: absolute;
	left: 30px;
	right: 30px;
	top: 30%;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	box-shadow: 0 0 16px 3px var(--accent);
	animation: scan 2.6s ease-in-out infinite alternate;
}

@keyframes scan {
	from { transform: translateY(-40px); }
	to { transform: translateY(150px); }
}

/* ---------- 404 ---------- */

.lost {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: calc(var(--topbar-h) + var(--safe-top) + 24px) var(--gutter) 60px;
	text-align: center;
}

.lost-orbit {
	position: relative;
	width: 210px;
	height: 130px;
	margin-bottom: 8px;
}

.lost-ring {
	position: absolute;
	inset: 38px 0;
	border-radius: 50%;
	border: 1.5px solid color-mix(in oklab, var(--text) 18%, transparent);
	transform: rotate(-12deg);
}

.lost-planet {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--accent) 70%, #fff), var(--accent) 45%, color-mix(in oklab, var(--accent) 45%, #000) 100%);
	box-shadow: 0 0 60px -6px color-mix(in oklab, var(--accent) 70%, transparent);
}

.lost-moon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	background: var(--text);
	offset-path: ellipse(105px 27px at 50% 50%);
	animation: orbit 9s linear infinite;
}

@supports not (offset-path: ellipse(1px 1px)) {
	.lost-moon {
		display: none;
	}
}

@keyframes orbit {
	to { offset-distance: 100%; }
}

.lost-code {
	font-size: 128px;
	font-weight: 850;
	font-stretch: 62%;
	line-height: .85;
	letter-spacing: -.04em;
	color: var(--bg);
	-webkit-text-stroke: 2px var(--rank-stroke);
	paint-order: stroke fill;
}

.lost-title {
	max-width: 520px;
	margin-top: 18px;
	font-size: var(--fs-2xl);
	font-weight: 820;
	font-stretch: 120%;
	letter-spacing: -.025em;
	line-height: 1.08;
	text-wrap: balance;
}

.lost-text {
	max-width: 440px;
	margin: 14px 0 28px;
	color: var(--text-2);
	text-wrap: pretty;
}

/* ---------- Shared keyframes ---------- */

@keyframes spin {
	to { transform: rotate(360deg); }
}

@keyframes rise {
	to { opacity: 1; transform: none; }
}

/* ---------- View transitions ---------- */

::view-transition-group(app-icon) {
	animation-duration: .55s;
	animation-timing-function: cubic-bezier(.2, .85, .25, 1);
}

::view-transition-image-pair(app-icon) {
	border-radius: 23%;
	overflow: hidden;
}

::view-transition-old(root) {
	animation: vt-fade-out .22s ease both;
}

::view-transition-new(root) {
	animation: vt-rise-in .42s var(--ease-out) both;
}

@keyframes vt-fade-out {
	to { opacity: 0; }
}

@keyframes vt-rise-in {
	from { opacity: 0; transform: translateY(24px); }
}

/* Tab switch: only the content area slides */
.tab-vt .main {
	view-transition-name: panel;
}

.tab-vt::view-transition-old(root),
.tab-vt::view-transition-new(root) {
	animation: none;
}

.tab-vt::view-transition-old(panel) {
	animation: vt-slide-out .18s var(--ease-in) both;
}

.tab-vt::view-transition-new(panel) {
	animation: vt-slide-in .46s var(--ease-out) .12s both;
}

@keyframes vt-slide-out {
	to { opacity: 0; transform: translateX(calc(var(--dir, 1) * -40px)); }
}

@keyframes vt-slide-in {
	from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 60px)); }
}

/* Theme switch: the new theme spreads out from the toggle as a circle */
.theme-vt::view-transition-old(root) {
	animation: none;
}

.theme-vt::view-transition-new(root) {
	animation: theme-reveal .7s var(--ease-out) both;
}

.theme-vt::view-transition-group(topbar),
.theme-vt::view-transition-group(tabbar) {
	animation: none;
}

.theme-vt::view-transition-old(topbar),
.theme-vt::view-transition-old(tabbar) {
	animation: none;
	opacity: 0;
}

.theme-vt::view-transition-new(topbar),
.theme-vt::view-transition-new(tabbar) {
	animation: none;
}

@keyframes theme-reveal {
	from { clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 0)); }
	to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 90%) var(--vt-y, 0)); }
}

/* ---------- Tablet (≥ 700px) ---------- */

@media (min-width: 700px) {
	:root {
		--gutter: 32px;
		--topbar-h: 68px;
	}

	.pages > .page {
		width: calc((100vw - 2 * var(--gutter) - 28px) / 2 - 7px);
	}

	.spot {
		height: clamp(460px, min(74vw, calc(100vh - 270px)), 600px);
	}

	.slide-body {
		inset: auto var(--gutter) 56px;
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "icon text cta";
		align-items: end;
		column-gap: 20px;
		row-gap: 0;
	}

	.slide-text {
		display: block;
		grid-area: text;
		min-width: 0;
		padding-bottom: 2px;
	}

	.slide-sub {
		margin-bottom: 6px;
	}

	.spot-timers {
		bottom: 20px;
	}

	.slide-body .get {
		justify-self: end;
		align-self: center;
	}

	.slide-icon .icon {
		width: 96px;
	}

	.slide-name {
		font-size: var(--fs-3xl);
	}

	.art {
		width: min(60vw, 560px);
	}

	.panel-title {
		font-size: var(--fs-4xl);
	}

	.hero-art {
		height: clamp(300px, 52vw, 440px);
	}

	.hero-in {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "icon text cta";
		column-gap: 24px;
		margin-top: -80px;
	}

	.hero-icon .icon {
		width: 136px;
	}

	.hero-name {
		font-size: var(--fs-3xl);
	}

	.hero-cta {
		align-self: end;
		padding-bottom: 6px;
	}

	.hero-cta .get--xl {
		width: 220px;
	}

	.stats {
		margin-top: 34px;
		padding: 18px 0;
	}

	.stat-big {
		font-size: var(--fs-xl);
	}

	.chart {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 40px;
	}

	.chart .row:nth-child(2)::before {
		display: none;
	}

	.lost-code {
		font-size: 180px;
	}

	.unlock {
		width: min(100% - 64px, 600px);
	}

	.story-card {
		aspect-ratio: auto;
		height: 420px;
	}

	.story-card::after {
		background:
			linear-gradient(90deg, rgba(5, 7, 22, .82) 0%, rgba(5, 7, 22, .5) 40%, transparent 72%),
			linear-gradient(180deg, transparent 40%, rgba(5, 7, 22, .7) 100%),
			radial-gradient(60% 70% at 12% 100%, color-mix(in oklab, var(--app) 38%, transparent), transparent 70%);
	}

	.story-content {
		width: min(560px, 70%);
		padding: 36px;
	}

	.story-name {
		font-size: var(--fs-3xl);
	}

	.story-teaser {
		font-size: var(--fs-b);
		-webkit-line-clamp: 2;
	}

	.story-hero {
		aspect-ratio: 16 / 10;
	}
}

/* ---------- Desktop (≥ 1024px) ---------- */

@media (min-width: 1024px) {
	:root {
		--gutter: max(40px, calc((100vw - 1240px) / 2));
		--topbar-h: 76px;
	}

	.tabbar {
		display: none;
	}

	.footer {
		padding-bottom: 48px;
	}

	.toast {
		bottom: 40px;
	}

	.brand-name {
		font-size: 21px;
	}

	.seg {
		position: relative;
		display: flex;
		gap: 2px;
		margin-left: 28px;
		padding: 4px;
		border-radius: 999px;
		background: color-mix(in oklab, var(--pill) 80%, transparent);
	}

	.topbar.is-art:not(.is-solid) .seg {
		background: rgba(8, 10, 30, .34);
		-webkit-backdrop-filter: blur(16px);
		backdrop-filter: blur(16px);
	}

	.seg-ink {
		position: absolute;
		top: 4px;
		bottom: 4px;
		left: 0;
		width: var(--w, 0);
		border-radius: 999px;
		background: var(--accent);
		transform: translateX(var(--x, 0));
		transition: transform .5s var(--ease-spring), width .5s var(--ease-spring);
	}

	.seg-item {
		position: relative;
		padding: 9px 20px;
		border-radius: 999px;
		font-size: var(--fs-m);
		font-weight: 650;
		transition: color .3s;
	}

	.seg-item[aria-current="page"] {
		color: var(--on-accent);
	}

	.searchbox {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 300px;
		height: 44px;
		padding: 0 8px 0 16px;
		border-radius: 999px;
		background: color-mix(in oklab, var(--pill) 80%, transparent);
		color: var(--text-3);
		font-size: var(--fs-m);
		transition: background-color .2s, box-shadow .2s;
	}

	.topbar.is-art:not(.is-solid) .searchbox {
		background: rgba(8, 10, 30, .34);
		color: rgba(255, 255, 255, .75);
		-webkit-backdrop-filter: blur(16px);
		backdrop-filter: blur(16px);
	}

	.searchbox:hover {
		box-shadow: inset 0 0 0 1px var(--line);
	}

	.searchbox-text {
		flex: 1;
		text-align: left;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.searchbox-key {
		display: grid;
		place-items: center;
		width: 26px;
		height: 26px;
		border-radius: 8px;
		font: inherit;
		font-size: var(--fs-s);
		font-weight: 700;
		box-shadow: inset 0 0 0 1px var(--line);
	}

	.topbar-actions {
		gap: 8px;
	}

	.iconbtn--search {
		display: none;
	}

	.topbar--detail .searchbox {
		display: none;
	}

	.topbar--detail .iconbtn--search {
		display: inline-grid;
	}

	/* Spotlight: a wide cinematic panel with the story timers as icon tiles */
	/* Height follows the screen so the trending row below is always fully in view */
	.spot {
		height: clamp(440px, calc(100vh - 284px), 640px);
	}

	.slide-art::after {
		background:
			linear-gradient(180deg, rgba(5, 7, 22, .6) 0%, transparent 24%, transparent 52%, color-mix(in oklab, var(--bg) 45%, transparent) 70%, color-mix(in oklab, var(--bg) 80%, transparent) 84%, color-mix(in oklab, var(--bg) 96%, transparent) 94%, var(--bg) 100%),
			linear-gradient(90deg, rgba(5, 7, 22, .78) 0%, rgba(5, 7, 22, .45) 32%, transparent 62%),
			radial-gradient(60% 70% at 12% 90%, color-mix(in oklab, var(--app) 34%, transparent), transparent 70%);
	}

	.slide-body {
		inset: auto auto 60px var(--gutter);
		width: min(560px, 46vw);
		grid-template-columns: 1fr;
		grid-template-areas:
			"icon"
			"text"
			"cta";
		row-gap: 22px;
	}

	.slide-body .get {
		justify-self: start;
		height: 52px;
		min-width: 148px;
		font-size: var(--fs-l);
	}

	.slide-icon .icon {
		width: 104px;
	}

	.slide-name {
		font-size: 60px;
		line-height: .98;
	}

	.slide-sub {
		color: rgba(255, 255, 255, .8);
		margin-bottom: 12px;
	}

	.slide-blurb {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		margin-top: 16px;
		max-width: 46ch;
		font-size: var(--fs-l);
		line-height: 1.45;
		color: rgba(255, 255, 255, .78);
	}

	.slide-name,
	.slide-name a {
		color: #fff;
	}

	.slide-sub .rate {
		color: inherit;
	}

	.slide-sub .badge {
		color: #fff;
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
	}

	[data-theme="light"] .slide-art::after {
		background:
			linear-gradient(180deg, rgba(5, 7, 22, .5) 0%, transparent 24%, transparent 80%, color-mix(in oklab, var(--bg) 45%, transparent) 89%, color-mix(in oklab, var(--bg) 82%, transparent) 95%, var(--bg) 100%),
			linear-gradient(90deg, rgba(5, 7, 22, .7) 0%, rgba(5, 7, 22, .35) 32%, transparent 62%);
	}

	.spot-timers {
		inset: auto var(--gutter) 60px auto;
		gap: 12px;
		align-items: flex-end;
	}

	.timer {
		display: flex;
		flex-direction: column;
		gap: 10px;
		width: 64px;
		padding: 0;
		opacity: .55;
		transition: opacity .3s, transform .4s var(--ease-spring);
	}

	.timer:hover {
		opacity: .85;
	}

	.timer.is-active {
		opacity: 1;
		transform: translateY(-6px);
	}

	.timer-icon {
		display: block;
		border-radius: var(--r-icon);
		overflow: hidden;
		box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7);
	}

	.timer-icon img {
		width: 100%;
		aspect-ratio: 1;
		object-fit: cover;
	}

	.timer-bar {
		background: rgba(255, 255, 255, .22);
	}

	.timer-fill {
		background: #fff;
	}

	/* Rails get arrow buttons and show more at once */
	.rail-btn {
		position: absolute;
		top: 50%;
		z-index: 2;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-top: -22px;
		border-radius: 50%;
		background: var(--glass);
		-webkit-backdrop-filter: blur(16px);
		backdrop-filter: blur(16px);
		box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
		opacity: 0;
		transform: scale(.85);
		transition: opacity .25s, transform .35s var(--ease-spring);
	}

	.rail-btn .i {
		width: 20px;
		height: 20px;
	}

	.rail-btn--prev {
		left: calc(var(--gutter) - 22px);
	}

	.rail-btn--next {
		right: calc(var(--gutter) - 22px);
	}

	.rail:hover .rail-btn:not([disabled]) {
		opacity: 1;
		transform: none;
	}

	.rail-btn[disabled] {
		pointer-events: none;
	}

	.pages > .page {
		width: calc((100vw - 2 * var(--gutter) - 2 * 28px) / 3);
		max-width: 400px;
	}

	.pages {
		gap: 28px;
	}

	.rank {
		width: 196px;
	}

	.rank .icon {
		width: 116px;
	}

	.rank-no {
		font-size: 168px;
		height: 128px;
	}

	.art {
		width: 460px;
	}

	.panel-head {
		padding-top: 36px;
		padding-bottom: 26px;
	}

	.panel-title {
		font-size: 72px;
	}

	.chart {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.chart .row:nth-child(3)::before {
		display: none;
	}

	.shelf {
		margin-top: 48px;
	}

	.shelf-title {
		font-size: var(--fs-xl);
	}

	/* Detail: banner art inside the page width */
	.main--detail {
		padding-top: calc(var(--topbar-h) + 8px);
	}

	.page-detail .topbar.is-art:not(.is-solid) {
		color: var(--text);
	}

	.page-detail .topbar.is-art:not(.is-solid) .iconbtn {
		background: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	.hero-art {
		height: 420px;
		margin-inline: var(--gutter);
		border-radius: 32px;
	}

	.hero-in {
		margin-top: -96px;
		padding-inline: calc(var(--gutter) + 40px);
	}

	.hero-icon .icon {
		width: 168px;
	}

	.hero-name {
		font-size: var(--fs-4xl);
	}

	.stats {
		margin-top: 40px;
	}

	.detail-cols {
		grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
		gap: 64px;
		margin-top: 44px;
	}

	.dock {
		padding-bottom: 20px;
	}

	/* Desktop: the download card stays in view on the left, offers on the right */
	.unlock {
		display: grid;
		grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
		align-items: start;
		gap: 56px;
		width: min(100% - 80px, 1040px);
		padding-top: calc(var(--topbar-h) + var(--safe-top) + 28px);
	}

	.unlock-download {
		font-size: var(--fs-l);
		font-stretch: 112%;
	}

	.unlock-head {
		position: sticky;
		top: calc(var(--topbar-h) + 20px);
		margin-top: 0;
		padding: 36px 32px 30px;
	}

	.unlock-offers {
		margin-top: 8px;
		text-align: left;
	}

	.unlock-how,
	.unlock-help {
		max-width: none;
		margin-inline: 0;
		text-wrap: pretty;
	}

	.unlock.is-unlocked {
		grid-template-columns: minmax(0, 440px);
		justify-content: center;
	}

	.story-card {
		height: 460px;
	}

	.story-content {
		padding: 48px;
	}

	.story-name {
		font-size: 52px;
	}

	.story-teaser {
		font-size: var(--fs-l);
	}

	.story-panel {
		inset: 40px 0;
		width: min(780px, calc(100% - 80px));
		margin: 0 auto;
		border-radius: 28px;
		box-shadow: var(--shadow);
	}

	.story-hero {
		aspect-ratio: auto;
		height: 420px;
	}

	.story-hero-text {
		padding: 0 48px 32px;
	}

	.story-hero .story-name {
		font-size: 56px;
	}

	.story-body {
		padding: 28px 48px 48px;
	}

	.blocked {
		grid-template-columns: minmax(0, 480px) auto;
		gap: 96px;
		justify-content: center;
		align-items: center;
		text-align: left;
	}

	.blocked-title {
		font-size: var(--fs-4xl);
	}

	.phone {
		width: 280px;
		height: 560px;
	}

	.qr {
		width: 184px;
	}
}

/* Short desktop screens: tighter spotlight so the trending row still fits */
@media (min-width: 1024px) and (max-height: 820px) {
	.slide-body {
		bottom: 44px;
		row-gap: 16px;
	}

	.spot-timers {
		bottom: 44px;
	}

	.slide-icon .icon {
		width: 80px;
	}

	.slide-name {
		font-size: 48px;
	}

	.slide-sub {
		margin-bottom: 8px;
	}

	.slide-blurb {
		display: none;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}

	.slide.is-active .slide-art img {
		animation: none;
		transform: scale(1.04);
	}

	.is-splash .splash {
		display: none;
	}

	::view-transition-group(*),
	::view-transition-old(*),
	::view-transition-new(*) {
		animation: none !important;
	}
}
