/*
 * Runtime chrome for the game — the HUD, gear/hint icons, start/solved/settings/instructions cards,
 * buttons and the wordmark. Loaded by play.html (like theme.css); the DOM these style is created by
 * src/runtime/mount.ts.
 *
 * The per-palette colours are NOT here: mount.ts sets `--shp-*` custom properties on the container at
 * runtime (see applyPopupTheme) so the cards follow the active board palette. Every var() below keeps a
 * literal fallback, so the chrome still renders if those runtime vars (or the theme.css font tokens)
 * are ever absent.
 */

/* ── HUD (level · moves/par · timer), pinned across the top ───────────────── */
.shp-hud {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 8;
	display: flex;
	gap: 16px;
	justify-content: center;
	padding: calc(10px + env(safe-area-inset-top, 0px))
		calc(10px + env(safe-area-inset-right, 0px)) 10px
		calc(10px + env(safe-area-inset-left, 0px));
	font: 13px/1.4 var(--font-mono, ui-monospace, Menlo, monospace);
	color: #dfe7f5;
	pointer-events: none;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.shp-stat {
	opacity: 0.92;
}

/* ── Corner icons (menu ☰ top-left, hint top-right) ───────────────────────── */
/* `.shp-gear` keeps its name for continuity; it now positions the hamburger menu button. */
/* They hug the top edge (they used to be pushed down to clear a fullscreen header that no longer
   exists); safe-area keeps them clear of a notch, and the standalone clamp at the bottom guards the PWA. */
.shp-gear {
	position: fixed;
	top: calc(12px + env(safe-area-inset-top, 0px));
	left: calc(12px + env(safe-area-inset-left, 0px));
	z-index: 8;
}
.shp-hint {
	position: fixed;
	top: calc(12px + env(safe-area-inset-top, 0px));
	right: calc(12px + env(safe-area-inset-right, 0px));
	z-index: 8;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.shp-btn {
	min-width: 48px;
	min-height: 48px;
	padding: 0 16px;
	border-radius: 14px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 0.2px;
	font: 600 15px/1 var(--font-display, system-ui, sans-serif);
	color: #eef2fb;
	background: rgba(40, 48, 66, 0.82);
	border: 1px solid rgba(130, 150, 200, 0.28);
	backdrop-filter: blur(6px);
	transition:
		background 0.18s,
		box-shadow 0.16s,
		transform 0.12s,
		filter 0.16s;
}
.shp-btn:hover {
	background: rgba(56, 66, 90, 0.92);
}
.shp-btn:active {
	transform: translateY(1px);
}
.shp-btn svg {
	display: block;
}
.shp-icon {
	padding: 0;
}

/* Primary CTA: borrows the landing's form — top-lit gradient, inset highlight, a coloured glow — but
   its colour still comes from the active palette (--shp-accent), so cards keep their per-palette look. */
.shp-primary {
	min-width: 150px;
	min-height: 52px;
	padding: 0 24px;
	font-weight: 600;
	letter-spacing: 0.3px;
	color: var(--shp-accent-fg, #fff);
	border-color: transparent;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--shp-accent, #5a82d2), #fff 16%),
		var(--shp-accent, #5a82d2)
	);
	box-shadow:
		0 12px 30px -10px
		color-mix(in srgb, var(--shp-accent, #5a82d2) 55%, transparent),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.shp-primary:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--shp-accent, #5a82d2), #fff 16%),
		var(--shp-accent, #5a82d2)
	);
	box-shadow:
		0 16px 38px -10px
		color-mix(in srgb, var(--shp-accent, #5a82d2) 70%, transparent),
		inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.shp-primary:active {
	transform: translateY(1px);
	filter: brightness(0.98);
}

/* ── Title screen ─────────────────────────────────────────────────────────── */
/* A full-bleed screen, not a card: a fixed night-sky backdrop (deliberately palette-independent — a
   stable brand moment), two ambient glows tinted by the palette's piece colours, the "pieces
   reuniting" hero, wordmark + tagline, and a bottom-anchored CTA stack. */
/* `.shp-overlay.shp-start` (not bare `.shp-start`): the base .shp-overlay rule sits later in this
   file and would otherwise win the padding/background/blur it overrides. */
.shp-overlay.shp-start {
	padding: 0;
	align-items: stretch;
	overflow: hidden;
	background: radial-gradient(
		120% 80% at 50% 6%,
		#1a2334 0%,
		#111726 46%,
		#0b0f18 100%
	);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
.shp-start-glow {
	position: absolute;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	filter: blur(4px);
	pointer-events: none;
}
.shp-start-glow-a {
	left: -40px;
	top: 70px;
	background: radial-gradient(
		closest-side,
		var(--shp-glow-a, hsla(205, 60%, 55%, 0.2)),
		transparent
	);
	animation: shp-drift-a 13s ease-in-out infinite;
}
.shp-start-glow-b {
	right: -50px;
	top: 20px;
	background: radial-gradient(
		closest-side,
		var(--shp-glow-b, hsla(330, 58%, 58%, 0.16)),
		transparent
	);
	animation: shp-drift-b 16s ease-in-out infinite;
}
.shp-start-body {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: calc(14px + env(safe-area-inset-top, 0px)) 22px
		calc(18px + env(safe-area-inset-bottom, 0px));
}
.shp-start-sp-s {
	flex: 0.5;
}
.shp-start-sp-l {
	flex: 1;
}
.shp-start-wordmark {
	margin: 0;
	font: 600 34px/1 var(--font-display, system-ui, sans-serif);
	letter-spacing: 0.4px;
	color: #eef2fb;
}
.shp-start-tagline {
	margin-top: 9px;
	font: 600 9.5px/1 var(--font-display, system-ui, sans-serif);
	letter-spacing: 3px;
	color: #7d8aa1;
}
.shp-start-stack {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.shp-start .shp-primary {
	width: 100%;
	min-height: 54px;
	border-radius: 16px;
	font-size: 16.5px;
}
/* Scoped under .shp-start: the base .shp-subtle rule sits later in the file with equal specificity
   and would otherwise win back color/opacity/margin. */
.shp-start .shp-start-how {
	margin: 15px auto 0;
	font-size: 12px;
	color: #7c88a0;
	opacity: 1;
}
.shp-start .shp-start-how:hover {
	color: #aeb8cc;
}

/* The hero: two 4-cell clusters (in-game tile look) drifting toward a glowing keystone tile. Cell
   pitch 24px, tile 20.5px — the geometry is authored on a fixed 224×168 stage. */
.shp-hero {
	position: relative;
	width: 224px;
	height: 168px;
	margin: 2px auto 4px;
}
.shp-hero-cl {
	position: absolute;
	display: block;
	will-change: transform;
}
.shp-hero-cl-a {
	animation: shp-float-a 5s ease-in-out infinite;
}
.shp-hero-cl-b {
	animation: shp-float-b 6s ease-in-out infinite;
}
/* Rotation lives here (the float animation above would overwrite a rotate on the same element). */
.shp-hero-in {
	position: relative;
	display: block;
	filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.4));
}
.shp-hero-tile {
	position: absolute;
	width: 20.5px;
	height: 20.5px;
	border-radius: 6px;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.22),
		0 6px 12px -6px rgba(0, 0, 0, 0.5);
}
.shp-hero-tile::after {
	content: "";
	position: absolute;
	left: 1px;
	right: 1px;
	top: 1px;
	height: 44%;
	border-radius: 5px;
	background: linear-gradient(rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
}
.shp-hero-cl-a .shp-hero-tile {
	background: var(--shp-hero-a, hsl(205 52% 61%));
}
.shp-hero-cl-b .shp-hero-tile {
	background: var(--shp-hero-b, hsl(342 52% 61%));
}
.shp-hero-key {
	position: absolute;
	left: 110px;
	top: 86px;
	width: 20.5px;
	height: 20.5px;
	border-radius: 6px;
	background: var(--shp-accent, #e5c063);
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.22),
		0 8px 16px -6px var(--shp-accent-glow, rgba(229, 192, 99, 0.5));
	animation: shp-key 3.6s ease-in-out infinite;
}
.shp-hero-key::after {
	content: "";
	position: absolute;
	left: 1px;
	right: 1px;
	top: 1px;
	height: 44%;
	border-radius: 5px;
	background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}
.shp-hero-keyglow {
	position: absolute;
	left: 96px;
	top: 74px;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		var(--shp-accent-glow, rgba(229, 192, 99, 0.5)),
		transparent
	);
	filter: blur(6px);
	animation: shp-keyglow 3.6s ease-in-out infinite;
}

/* Glass "row" buttons (Continue / Daily): icon chip · two-line label · trailing chevron. */
.shp-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 13px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 15px;
	border-radius: 16px;
	text-align: left;
	background: rgba(40, 48, 66, 0.72);
	border: 1px solid rgba(130, 150, 200, 0.28);
}
.shp-row:hover {
	background: rgba(56, 66, 90, 0.9);
}
.shp-row-label {
	display: flex;
	flex-direction: column;
	gap: 3px;
	line-height: 1;
	min-width: 0;
}
.shp-row-main {
	font: 600 14.5px/1 var(--font-display, system-ui, sans-serif);
	color: #eef2fb;
}
.shp-row-sub {
	font: 500 11px/1.2 var(--font-display, system-ui, sans-serif);
	color: #8794aa;
}
.shp-row-chev {
	margin-left: auto;
	color: #69748a;
	font-size: 17px;
	font-weight: 500;
}

/* Icon chips — the rows' leading squares (also fronting settings fields + instruction rows). */
.shp-chip {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.shp-chip-resume {
	background: rgba(120, 150, 205, 0.16);
	border: 1px solid rgba(130, 150, 200, 0.3);
}
.shp-tri {
	width: 0;
	height: 0;
	border-left: 9px solid #cdd6e8;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	margin-left: 2px;
}
.shp-chip-date {
	flex-direction: column;
	line-height: 1;
	background: var(--shp-accent-soft, rgba(230, 194, 102, 0.16));
	border: 1px solid var(--shp-accent-bd, rgba(230, 194, 102, 0.42));
}
.shp-date-mo {
	font: 700 7px/1 var(--font-display, system-ui, sans-serif);
	letter-spacing: 0.5px;
	color: var(--shp-accent, #e5c063);
}
.shp-date-day {
	margin-top: 1px;
	font: 700 14px/1 var(--font-display, system-ui, sans-serif);
	color: #eef2fb;
}
/* The smaller variant on cards (settings fields, instruction rows) — palette-aware tints. */
.shp-chip-sm {
	width: 28px;
	height: 28px;
	border-radius: 9px;
	background: color-mix(in srgb, var(--shp-accent, #5a82d2) 14%, transparent);
	border: 1px solid
		color-mix(in srgb, var(--shp-accent, #5a82d2) 32%, transparent);
	color: var(--shp-card-fg, #eaf0fb);
	opacity: 0.92;
}
/* Some chip icons reuse HUD glyphs authored at 22px — normalize every glyph to the chip scale. */
.shp-chip-sm svg {
	width: 15px;
	height: 15px;
}

/* Low-emphasis link (e.g. "How to play"): a bare text button, no fill/border. */
.shp-subtle {
	display: block;
	min-height: 40px;
	min-width: 0;
	margin: 14px auto 0;
	padding: 0;
	background: none;
	border: none;
	backdrop-filter: none;
	font-weight: 500;
	opacity: 0.7;
	color: var(--shp-card-fg, #eaf0fb);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.shp-subtle:hover {
	background: none;
	opacity: 1;
}
.shp-subtle:active {
	transform: none;
}

/* Inline anchor inside a card (e.g. the About card's homepage link). */
.shp-link {
	display: block;
	margin: 4px 0 24px 0;
	color: var(--shp-card-fg, #eaf0fb);
	opacity: 0.8;
	/* text-decoration: underline;
	text-underline-offset: 0px;
	text-decoration-thickness: 1px; */
	font-family: var(--font-body);
}
.shp-link:hover {
	opacity: 1;
}

/* ── Settings form ────────────────────────────────────────────────────────── */
.shp-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 6px 0 20px;
	text-align: left;
}
/* Each field is a glass row (icon chip · label · control) — the title rows, at form scale. */
.shp-field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 12px;
	border-radius: 14px;
	background: color-mix(in srgb, var(--shp-card-fg, #eaf0fb) 5%, transparent);
	border: 1px solid
		color-mix(in srgb, var(--shp-card-fg, #eaf0fb) 9%, transparent);
	font: 14px/1.4 var(--font-body, system-ui, sans-serif);
	cursor: pointer;
}
.shp-field-label {
	flex: 1;
	text-align: left;
	opacity: 0.9;
}
.shp-select {
	min-width: 130px;
	padding: 8px 10px;
	border-radius: 10px;
	color: inherit;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid var(--shp-card-border, rgba(130, 150, 200, 0.3));
	font: 14px/1 var(--font-body, system-ui, sans-serif);
}
.shp-check {
	width: 20px;
	height: 20px;
	accent-color: var(--shp-accent, #5a82d2);
	cursor: pointer;
}

/* ── Overlay + card (start / solved / settings / instructions) ────────────── */
/* The overlay's own padding guarantees a gutter so the card never kisses the screen edges. */
.shp-overlay {
	position: fixed;
	inset: 0;
	z-index: 9;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: var(--shp-overlay-bg, rgba(8, 11, 18, 0.6));
	backdrop-filter: blur(var(--shp-overlay-blur, 3px));
	-webkit-backdrop-filter: blur(var(--shp-overlay-blur, 3px));
}
.shp-card {
	position: relative;
	isolation: isolate; /* keeps the z-index:-1 glow pseudos above this card's own background */
	overflow: hidden; /* …and clipped to its rounded corners */
	width: min(360px, 100%);
	text-align: center;
	padding: 30px 28px;
	border-radius: var(--shp-card-radius, 18px);
	background: var(--shp-card-bg, rgba(24, 29, 40, 0.96));
	border: 1px solid var(--shp-card-border, rgba(130, 150, 200, 0.22));
	color: var(--shp-card-fg, #eaf0fb);
	box-shadow: var(--shp-card-shadow, 0 20px 60px rgba(0, 0, 0, 0.45));
}
/* Ambient corner glows on every card — the title screen's drifting lights, at card scale, tinted by
   the palette's piece colours. Decorative only. */
.shp-card::before,
.shp-card::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 180px;
	height: 180px;
	border-radius: 50%;
	filter: blur(6px);
	pointer-events: none;
}
.shp-card::before {
	left: -70px;
	top: -60px;
	background: radial-gradient(
		closest-side,
		var(--shp-glow-a, hsla(205, 60%, 55%, 0.2)),
		transparent
	);
	animation: shp-drift-a 13s ease-in-out infinite;
}
.shp-card::after {
	right: -70px;
	top: -30px;
	background: radial-gradient(
		closest-side,
		var(--shp-glow-b, hsla(330, 58%, 58%, 0.16)),
		transparent
	);
	animation: shp-drift-b 16s ease-in-out infinite;
}
/* A letter-spaced micro-heading above a card title ("PIECES REUNITED", the how-to card's mantra). */
.shp-kicker {
	margin: 0 0 10px;
	font: 600 10px/1 var(--font-display, system-ui, sans-serif);
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--shp-card-fg, #eaf0fb);
	opacity: 0.55;
}
.shp-title {
	margin: 0 0 10px;
	font: 600 28px/1.1 var(--font-display, system-ui, sans-serif);
	letter-spacing: 0.2px;
}
.shp-sub {
	margin: 0 0 18px;
	font: 14px/1.5 var(--font-body, system-ui, sans-serif);
	opacity: 0.82;
}
.shp-best {
	margin: 0 0 16px;
	font: 13px/1.45 var(--font-body, system-ui, sans-serif);
	opacity: 0.72;
}
/* The About card's device id. Deliberately quiet — it is a support/GDPR handle, not a feature — but
   selectable, since its whole purpose is to be copied out and sent to us. */
.shp-ref {
	margin: -14px 0 22px;
	font: 11px/1.4 var(--font-mono, ui-monospace, monospace);
	opacity: 0.45;
	word-break: break-all;
	user-select: text;
	-webkit-user-select: text;
}

/* ── Daily leaderboard (rendered on the solved card in daily mode) ─────────── */
.shp-board {
	margin: 2px 0 18px;
	text-align: left;
	font: 13px/1.5 var(--font-body, system-ui, sans-serif);
}
.shp-board-title {
	margin-bottom: 6px;
	text-align: center;
	opacity: 0.7;
	letter-spacing: 0.3px;
}
.shp-board-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 3px 8px;
	border-radius: 8px;
}
.shp-board-you {
	background: color-mix(in srgb, var(--shp-accent, #5a82d2) 22%, transparent);
	font-weight: 600;
}
.shp-board-rank {
	min-width: 1.6em;
	text-align: right;
	opacity: 0.7;
	font-variant-numeric: tabular-nums;
}
.shp-board-name {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.shp-board-moves {
	opacity: 0.85;
	font-variant-numeric: tabular-nums;
}
.shp-stars {
	display: flex;
	justify-content: center;
	gap: 6px;
	color: var(--shp-star, #ffd873);
	margin-bottom: 10px;
}

/* ── The solved card's "pieces reunited" motif ────────────────────────────── */
/* Two mini tile clusters joined by the pulsing keystone — the title hero's payoff, at card scale. */
.shp-motif {
	position: relative;
	width: 150px;
	height: 62px;
	margin: 0 auto 12px;
}
.shp-motif-cl {
	position: absolute;
	display: block;
	width: 37px;
	height: 17px;
	filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}
.shp-motif-tile {
	position: absolute;
	width: 17px;
	height: 17px;
	border-radius: 5px;
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.22),
		0 5px 10px -5px rgba(0, 0, 0, 0.5);
}
.shp-motif-tile::after {
	content: "";
	position: absolute;
	left: 1px;
	right: 1px;
	top: 1px;
	height: 44%;
	border-radius: 4px;
	background: linear-gradient(rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
}
.shp-motif-cl-a .shp-motif-tile {
	background: var(--shp-hero-a, hsl(205 52% 61%));
}
.shp-motif-cl-b .shp-motif-tile {
	background: var(--shp-hero-b, hsl(342 52% 61%));
}
.shp-motif-key {
	left: 66px;
	top: 12px;
	background: var(--shp-accent, #e5c063);
	box-shadow:
		inset 0 0 0 1px rgba(0, 0, 0, 0.22),
		0 6px 14px -5px var(--shp-accent-glow, rgba(229, 192, 99, 0.5));
	animation: shp-key 3.6s ease-in-out infinite;
}
.shp-motif-key::after {
	background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}
.shp-motif-glow {
	position: absolute;
	left: 53px;
	top: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		var(--shp-accent-glow, rgba(229, 192, 99, 0.5)),
		transparent
	);
	filter: blur(6px);
	animation: shp-keyglow 3.6s ease-in-out infinite;
}

/* ── Instruction rows (the "How to play" card) ────────────────────────────── */
.shp-ins {
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin: 4px 0 16px;
	text-align: left;
}
.shp-ins-row {
	display: flex;
	align-items: center;
	gap: 11px;
}
.shp-ins-text {
	flex: 1;
	font: 13px/1.45 var(--font-body, system-ui, sans-serif);
	opacity: 0.88;
}

/* A small leading icon on a text button's face (Restart / Quit). */
.shp-btn-ic {
	display: inline-flex;
	margin-right: 8px;
	opacity: 0.85;
}

/* ── Monetization chrome (paywall, Settings unlock, locked Daily, volume nudge) ──── */
/* All of this is inert unless a purchase channel is configured (see the runtime's paywall wiring): with
   no channel every gate resolves to Pro, so none of these surfaces ever appears. */

/* The upsell overlay sits above the card that opened it (solved / settings), so it needs a higher layer. */
.shp-modal {
	z-index: 11;
}
.shp-paywall .shp-perks {
	list-style: none;
	margin: 2px 0 20px;
	padding: 0;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.shp-paywall .shp-perk {
	position: relative;
	padding-left: 26px;
	font: 14px/1.4 var(--font-body, system-ui, sans-serif);
	opacity: 0.92;
}
.shp-paywall .shp-perk::before {
	content: "✓";
	position: absolute;
	left: 4px;
	color: var(--shp-accent, #5a82d2);
	font-weight: 700;
}

/* Menu game controls: "Restart level" + "Quit to menu", a side-by-side pair above the primary "Done". */
.shp-actions {
	display: flex;
	gap: 10px;
	margin: 0 0 14px;
}
.shp-action {
	flex: 1 1 0;
	min-width: 0;
	padding: 0 10px;
	font-size: 13.5px;
	line-height: 1.2; /* graceful two-line wrap on very narrow screens */
}

/* Settings "Unlock Pro" row — accent-tinted, but a step below the primary "Done". */
.shp-unlock {
	display: block;
	min-width: 150px;
	margin: 0 auto 14px;
	color: var(--shp-card-fg, #eaf0fb);
	background: color-mix(in srgb, var(--shp-accent, #5a82d2) 18%, transparent);
	border: 1px solid
		color-mix(in srgb, var(--shp-accent, #5a82d2) 45%, transparent);
}
.shp-unlock:hover {
	background: color-mix(in srgb, var(--shp-accent, #5a82d2) 28%, transparent);
}

/* Locked Daily button: the 🔒 in the label carries the meaning; a touch of fade reinforces it. It stays
   fully tappable — the tap opens the upsell rather than the puzzle. */
.shp-daily.shp-locked {
	opacity: 0.82;
}

/* Volume nudge on the solved card — a dismissible section ABOVE the CTA, never a barrier. Prominence
   hardens with the tier (cadence hardens separately in `nudgeFor`). */
.shp-nudge {
	margin: 4px 0 16px;
	padding: 12px 14px;
	border-radius: 12px;
	text-align: center;
}
.shp-nudge-text {
	margin: 0 0 10px;
	font: 13px/1.45 var(--font-body, system-ui, sans-serif);
	opacity: 0.9;
}
.shp-nudge-btn {
	min-height: 40px;
	min-width: 0;
	padding: 0 18px;
	color: var(--shp-accent-fg, #fff);
	border-color: transparent;
	background: var(--shp-accent, #5a82d2);
}
.shp-nudge-btn:hover {
	filter: brightness(1.05);
	background: var(--shp-accent, #5a82d2);
}
/* Tier 1 — gentle: no fill, quiet copy. */
.shp-nudge-1 {
	padding: 4px 0 0;
}
.shp-nudge-1 .shp-nudge-text {
	opacity: 0.68;
}
/* Tier 2 — firmer: a tinted, bordered block. */
.shp-nudge-2 {
	background: color-mix(in srgb, var(--shp-accent, #5a82d2) 12%, transparent);
	border: 1px solid
		color-mix(in srgb, var(--shp-accent, #5a82d2) 32%, transparent);
}
/* Tier 3 — insistent: a solid accent block + glow (still never blocks the CTA below). */
.shp-nudge-3 {
	background: color-mix(in srgb, var(--shp-accent, #5a82d2) 22%, transparent);
	border: 1px solid
		color-mix(in srgb, var(--shp-accent, #5a82d2) 55%, transparent);
	box-shadow: 0 8px 24px -12px
		color-mix(in srgb, var(--shp-accent, #5a82d2) 60%, transparent);
}
.shp-nudge-3 .shp-nudge-text {
	opacity: 1;
	font-weight: 600;
}

/* ── Gesture tips: one-line just-in-time onboarding pills ─────────────────── */
/* Shown by mount.ts once per gesture (drag / rotate / flip) at the first moment it matters; the
   whole pill is tappable to dismiss. Sits centred under the HUD, above the board. */
.shp-tip {
	position: fixed;
	top: calc(48px + env(safe-area-inset-top, 0px));
	left: 50%;
	transform: translateX(-50%);
	z-index: 8;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: min(88vw, 440px);
	padding: 10px 14px;
	border-radius: 14px;
	font: 500 13px/1.45 var(--font-display, system-ui, sans-serif);
	text-align: center;
	color: #eef2fb;
	background: rgba(40, 48, 66, 0.92);
	border: 1px solid color-mix(in srgb, var(--shp-accent, #5a82d2) 45%, transparent);
	box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(6px);
	cursor: pointer;
	animation: shp-tip-in 0.35s ease-out;
}
.shp-tip-x {
	opacity: 0.55;
	font-size: 11px;
}
@keyframes shp-tip-in {
	from {
		opacity: 0;
		transform: translate(-50%, -6px);
	}
}

/* ── Ambient animation (title hero + glows, card ornaments) ───────────────── */
@keyframes shp-float-a {
	50% {
		transform: translate(5px, -9px);
	}
}
@keyframes shp-float-b {
	50% {
		transform: translate(-5px, -6px);
	}
}
@keyframes shp-key {
	50% {
		transform: translate(0, -7px) scale(1.04);
	}
}
@keyframes shp-keyglow {
	0%,
	100% {
		opacity: 0.55;
		transform: scale(1);
	}
	50% {
		opacity: 0.9;
		transform: scale(1.12);
	}
}
@keyframes shp-drift-a {
	50% {
		transform: translate(14px, 10px);
	}
}
@keyframes shp-drift-b {
	50% {
		transform: translate(-12px, 8px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.shp-tip,
	.shp-hero-cl-a,
	.shp-hero-cl-b,
	.shp-hero-key,
	.shp-hero-keyglow,
	.shp-start-glow,
	.shp-motif-key,
	.shp-motif-glow,
	.shp-card::before,
	.shp-card::after {
		animation: none;
	}
}

/* ── Wordmark: faint bottom watermark so screenshots stay attributable ────── */
.shp-wordmark {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	z-index: 7;
	pointer-events: none;
	bottom: calc(6px + env(safe-area-inset-bottom, 0px));
	font: 600 12px/1 var(--font-display, system-ui, sans-serif);
	letter-spacing: 1.5px;
	color: #dfe7f5;
	opacity: 0.36;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

/* ── Installed PWA ────────────────────────────────────────────────────────── */
/* The OS status bar overlays the content, but env(safe-area-inset-top) can report 0 (non-notched iOS,
   black-translucent), which would hide the top-anchored HUD/icons under the clock. Enforce a minimum
   top clearance so they stay readable + reachable. */
@media (display-mode: standalone), (display-mode: fullscreen) {
	.shp-gear,
	.shp-hint {
		top: max(env(safe-area-inset-top, 0px), 28px);
	}
	.shp-hud {
		padding-top: calc(6px + max(env(safe-area-inset-top, 0px), 28px));
	}
	.shp-tip {
		top: calc(44px + max(env(safe-area-inset-top, 0px), 28px));
	}
	.shp-start-body {
		padding-top: calc(14px + max(env(safe-area-inset-top, 0px), 28px));
	}
}
