/* ================================================================
   BisbeeOddities fun layer (ported from the coming-soon page):
   town windows, postcards, easter-egg critters, the crack-a-rock
   dig section and the mine-shaft progress diorama. Owner request.
   ================================================================ */

:root {
--spring: cubic-bezier(.34, 1.56, .64, 1);
--dusk: 0;
--min-turq-2: #9ff0ea;
--min-azur-1: #2a47b0;
--min-azur-2: #8aa6ff;
--min-cupr-1: #9e1c2c;
--min-cupr-2: #ff7a7a;
--min-copp-1: #b45a22;
--min-copp-2: #ffc07a;
--min-mala-1: #17704a;
--min-mala-2: #7fe0a8;
--min-gold-1: #b88412;
--min-gold-2: #ffe28a;
}

/* ---------- Town: windows you can switch on ---------- */
/* Suppress the mobile tap-highlight box on every interactive hero scene element (clouds,
   the B, critters, houses, the sky) — same wipe applied to the coming-soon page. */
.hero__scene .scene,
.hero__scene .scene *,
.hero__scene [data-poke],
.hero__scene [data-poke] * {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}
.scene .house { transform-box: fill-box; transform-origin: 50% 100%; }
.scene .house.is-squash { animation: house-squash .55s var(--spring); }
@keyframes house-squash { 0% { transform: scale(1); } 25% { transform: scale(1.18, .78); } 60% { transform: scale(.9, 1.16); } 100% { transform: scale(1); } }
.scene .win.win--on { fill: var(--gold); filter: drop-shadow(0 0 3px var(--gold)); animation: win-on .5s steps(1) 1; }
[data-theme="night"] .scene .win.win--on { fill: var(--window-lit); filter: drop-shadow(0 0 4px var(--window-lit)); }
@keyframes win-on { 0% { fill: var(--window); } 20% { fill: var(--gold); } 35% { fill: var(--window); } 55% { fill: var(--gold); } }
.town-awake .scene .win { fill: var(--gold); }
[data-theme="night"].town-awake .scene .win { fill: var(--window-lit); }
.town-awake .scene .win.is-wave { animation: wave-on .6s var(--ease-out) both; animation-delay: var(--wd, 0s); }
@keyframes wave-on { 0% { fill: var(--window); } 100% { fill: var(--gold); } }
.town-awake .b-glow { opacity: .9; animation: b-pulse 1.6s ease-in-out infinite; }
.town-awake .b-letter { animation: b-marquee 1.6s ease-in-out infinite; }
@keyframes b-marquee { 50% { fill: var(--gold); } }

/* Easter-egg critters that pop out of houses */
.egg-cat path, .egg-cat circle { fill: #120c1e; }
.egg-cat { animation: cat-peek 2.6s var(--ease-out) forwards; }
@keyframes cat-peek { 0% { transform: translateY(8px); opacity: 0; } 20%, 80% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.egg-cat .cat-tail { transform-box: fill-box; transform-origin: 0 100%; animation: tail-flick .4s ease-in-out infinite alternate; }
@keyframes tail-flick { to { transform: rotate(24deg); } }
.egg-bat { fill: var(--bat); animation: egg-bat 1.9s cubic-bezier(.3, 0, .6, 1) forwards; }
[data-theme="day"] .egg-bat, :root:not([data-theme="night"]) .egg-bat { fill: #2a1a14; }
.egg-bat .wing { transform-box: fill-box; animation: batflap .16s ease-in-out infinite; }
.egg-bat .wing-l { transform-origin: 100% 50%; }
.egg-bat .wing-r { transform-origin: 0% 50%; }
@keyframes egg-bat { 0% { transform: translate(0, 0) scale(.3); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(var(--bx, 120px), -150px) scale(1); } 100% { transform: translate(calc(var(--bx, 120px) * 2.4), -330px) scale(.7); opacity: 0; } }
.egg-cat .cat-tail { fill: none; stroke: #120c1e; stroke-width: 1.8; stroke-linecap: round; }
.egg-note { fill: var(--accent-ink); stroke: var(--accent-ink); animation: note-float 1.8s var(--ease-out) forwards; animation-delay: var(--nd, 0s); opacity: 0; }
.egg-note path { fill: none; stroke-width: 1.6; }
[data-theme="night"] .egg-note { fill: var(--gold); stroke: var(--gold); }
.egg-pop { fill: var(--accent-ink); font: 700 14px var(--font-mono); animation: awoo 1.4s var(--ease-out) forwards; }
[data-theme="night"] .egg-pop { fill: var(--gold); }
@keyframes note-float { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--nx, 20px), -90px) rotate(18deg); opacity: 0; } }
.egg-ghost { fill: #fffaf0; opacity: 0; animation: ghost-rise 2.6s ease-in-out forwards; }
.egg-ghost .ghost-eye { fill: #1b1030; }
@keyframes ghost-rise { 0% { transform: translateY(14px) scale(.6); opacity: 0; } 25% { opacity: .9; } 60% { transform: translate(8px, -60px) scale(1); opacity: .85; } 100% { transform: translate(-6px, -120px) scale(1.05); opacity: 0; } }

/* Postcard that flies out of the tapped house */
.cs-postcard {
	position: absolute;
	z-index: 5;
	left: 0;
	top: 0;
	width: min(250px, calc(100vw - 32px));
	padding: 12px 14px 12px;
	border-radius: 10px;
	background: var(--surface);
	color: var(--ink);
	border: 1px solid var(--line-strong);
	box-shadow: var(--shadow-2);
	transform-origin: var(--ox, 50%) 100%;
	opacity: 0;
	scale: .4;
	rotate: -6deg;
	pointer-events: none;
	transition: opacity .18s ease, scale .18s ease, rotate .18s ease;
}
.cs-postcard.is-open {
	opacity: 1;
	scale: 1;
	rotate: var(--tilt, -1.5deg);
	pointer-events: auto;
	transition: opacity .25s ease, scale .5s var(--spring), rotate .6s var(--spring);
}
.cs-postcard::before {
	/* airmail edge */
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 5px;
	border-radius: 10px 10px 0 0;
	background: repeating-linear-gradient(-45deg, var(--primary) 0 8px, var(--surface) 8px 14px, var(--teal) 14px 22px, var(--surface) 22px 28px);
}
.cs-postcard::after {
	/* pointer down to the house */
	content: "";
	position: absolute;
	left: var(--ox, 50%);
	bottom: -7px;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	background: var(--surface);
	border-right: 1px solid var(--line-strong);
	border-bottom: 1px solid var(--line-strong);
	transform: rotate(45deg);
}
.cs-postcard__kicker { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 4px; font: 400 .66rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.cs-postcard__stamp { flex: 0 0 auto; width: 22px; height: 26px; border: 1.5px dashed var(--primary); border-radius: 2px; display: grid; place-items: center; rotate: 8deg; }
.cs-postcard__stamp svg { width: 14px; height: 14px; color: var(--primary); }
.cs-postcard__text { margin: 0; font: 600 1.02rem/1.3 var(--font-display); }
.cs-postcard__foot { margin: 6px 0 0; font-size: .74rem; color: var(--ink-2); }

/* "Psst, tap a house" hint */
.cs-hint {
	position: absolute;
	z-index: 4;
	left: 0;
	top: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px 7px 9px;
	border-radius: var(--r-pill);
	background: var(--ink);
	color: var(--bg);
	font: 600 .8rem/1 var(--font-body);
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	translate: -50% calc(-100% - 16px);
	transition: opacity .4s ease;
}
.cs-hint.is-on { opacity: 1; animation: hint-bob 1.8s var(--ease-in-out) infinite; }
.cs-hint::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.cs-hint svg { width: 18px; height: 18px; animation: hint-tap 1.8s var(--ease-in-out) infinite; }
@keyframes hint-bob { 50% { transform: translateY(-5px); } }
@keyframes hint-tap { 0%, 40%, 100% { transform: none; } 55% { transform: translateY(3px) scale(.88); } 70% { transform: none; } }
.cs-hint-ring {
	position: absolute;
	z-index: 3;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border-radius: 50%;
	border: 2px solid var(--gold);
	pointer-events: none;
	opacity: 0;
}
.cs-hint-ring.is-on { animation: ping 1.8s ease-out infinite; }

/* Town counter */
.cs-town {
	position: absolute;
	z-index: 4;
	right: var(--gutter);
	bottom: 18px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px 8px 10px;
	border-radius: var(--r-pill);
	background: color-mix(in srgb, var(--surface) 90%, transparent);
	border: 1px solid var(--line);
	box-shadow: var(--shadow-1);
	backdrop-filter: blur(6px);
	color: var(--ink);
	font-size: .82rem;
	transition: transform var(--dur-2) var(--spring);
}
.cs-town.is-bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12); } }
.cs-town__bulbs { display: flex; gap: 3px; }
.cs-town__bulbs i { width: 7px; height: 11px; border-radius: 2px; background: var(--window); border: 1px solid var(--line-strong); transition: background-color .3s ease, box-shadow .3s ease; }
.cs-town__bulbs i.is-on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.cs-town b { font-variant-numeric: tabular-nums; }
.town-awake .cs-town { border-color: var(--gold); }


/* ---------- Progress: how deep we've dug ---------- */
.cs-shaft { position: relative; overflow: hidden; }
.cs-shaft__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.cs-gauge { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: var(--sp-5) 0 var(--sp-4); }
.cs-gauge__num { font: 600 clamp(3.4rem, 2.4rem + 4vw, 6rem)/.9 var(--font-display); letter-spacing: -.04em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.cs-gauge__pct { font: 600 clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem)/1 var(--font-display); color: var(--accent-ink); }
.cs-gauge__of { font: 400 .78rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); flex-basis: 100%; }
.cs-bar { position: relative; height: 14px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: var(--sp-6); }
.cs-bar__fill {
	position: absolute;
	inset: 0;
	transform-origin: 0 50%;
	transform: scaleX(0);
	background: repeating-linear-gradient(-45deg, var(--primary) 0 12px, color-mix(in srgb, var(--primary) 75%, var(--gold)) 12px 24px);
	background-size: 34px 100%;
	animation: barber 1.2s linear infinite;
	transition: transform 1.8s var(--ease-out) .2s;
}
.is-dug .cs-bar__fill { transform: scaleX(var(--p)); }
@keyframes barber { to { background-position: 34px 0; } }
.cs-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: lvl; }
.cs-levels li {
	display: grid;
	grid-template-columns: 64px 26px 1fr;
	align-items: center;
	gap: var(--sp-3);
	padding: 10px 0;
	border-top: 1px dashed var(--line-strong);
	opacity: 0;
	transform: translateX(-10px);
	transition: opacity .5s ease, transform .6s var(--spring);
	transition-delay: calc(var(--i) * 110ms + .4s);
}
.cs-levels li:first-child { border-top: 0; }
.is-dug .cs-levels li, html:not(.js) .cs-levels li { opacity: 1; transform: none; }
.cs-levels__depth { font: 400 .72rem/1 var(--font-mono); color: var(--ink-2); letter-spacing: .06em; }
.cs-levels__mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.cs-levels__mark svg { width: 14px; height: 14px; }
.cs-levels .is-done .cs-levels__mark { background: var(--teal); border-color: var(--teal); color: var(--bg); }
.cs-levels .is-digging .cs-levels__mark { border-color: var(--primary); color: var(--primary); animation: dig-pulse 1.4s ease-in-out infinite; }
.cs-levels .is-digging .cs-levels__mark svg { animation: pick-swing .7s var(--ease-in-out) infinite alternate; transform-origin: 80% 80%; }
@keyframes dig-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 18%, transparent); } }
@keyframes pick-swing { from { transform: rotate(-22deg); } to { transform: rotate(14deg); } }
.cs-levels__text b { display: block; font: 600 1.05rem/1.25 var(--font-display); }
.cs-levels__text span { font-size: .86rem; color: var(--ink-2); }
.cs-levels .is-next .cs-levels__text { opacity: .72; }
.cs-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--r-pill); font: 400 .64rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--accent-ink); }


/* Mine-shaft diorama: same flat desert style as the hero, all colors from theme tokens */
.cs-shaft__art { position: relative; max-width: 540px; justify-self: center; width: 100%; }
.cs-shaft__art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 34px rgba(42, 26, 20, .22)); }
[data-theme="night"] .cs-shaft__art svg { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .55)); }
.cs-shaft__art .hit { fill: transparent; }
.sh-border { fill: none; stroke: var(--line-strong); stroke-width: 2; }

/* Sky and surface */
.sh-stars circle { fill: var(--star); opacity: 0; transition: opacity var(--dur-scene) ease; }
[data-theme="night"] .sh-stars circle { opacity: .9; animation: twinkle 3.4s ease-in-out infinite; }
[data-theme="night"] .sh-stars circle:nth-child(2n) { animation-delay: -1.7s; }
.sh-orb { fill: var(--sun); transition: fill var(--dur-scene) ease; }
.sh-orb-glow { fill: var(--orb-glow); opacity: .35; animation: sun-glow 4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
[data-theme="night"] .sh-orb { fill: var(--moon); }
.sh-cloud rect { fill: var(--cloud); }
.sh-cloud { animation: sh-cloud 38s linear infinite; transform: translate(-70px, 40px); }
[data-theme="night"] .sh-cloud { opacity: .3; }
@keyframes sh-cloud { from { transform: translate(-70px, 40px); } to { transform: translate(420px, 40px); } }
.sh-hill { fill: var(--ridge-far); transition: fill var(--dur-scene) ease; }
.sh-roof { fill: var(--roof); }
.sh-win { fill: var(--window); transition: fill var(--dur-scene) ease; }
[data-theme="night"] .sh-win { fill: var(--window-lit); }
.sh-hoist { fill: var(--house-5); transition: fill var(--dur-scene) ease; }
.sh-door { fill: var(--roof); }
.sh-collar { fill: #7a5232; stroke: #4a2f1e; stroke-width: 1.5; }
.sh-scrub circle { fill: var(--scrub); transition: fill var(--dur-scene) ease; }
.sh-smoke circle { fill: var(--cloud); opacity: 0; animation: sh-smoke 3s ease-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
[data-theme="night"] .sh-smoke circle { fill: #8f86b8; }
@keyframes sh-smoke { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 15% { opacity: .8; } 100% { transform: translate(14px, -34px) scale(1.8); opacity: 0; } }
.sh-frame { fill: none; stroke: var(--headframe); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--dur-scene) ease; }
[data-theme="night"] .sh-frame { stroke: #b9adff; }
.sh-wheel circle, .sh-wheel path { fill: none; stroke: var(--headframe); stroke-width: 3; transition: stroke var(--dur-scene) ease; }
.sh-wheel path { stroke-width: 1.6; }
.sh-wheel .sh-hub { fill: var(--headframe); }
[data-theme="night"] .sh-wheel circle, [data-theme="night"] .sh-wheel path { stroke: #b9adff; }
[data-theme="night"] .sh-wheel .sh-hub { fill: #b9adff; }
.sh-wheel { transform-box: fill-box; transform-origin: center; animation: spin 8s linear infinite; }
.is-dug .sh-wheel { animation: spin .8s linear 5, spin 8s linear 4s infinite; }
.sh-hoist-cable { fill: none; stroke: #cdb79a; stroke-width: 1.4; }

/* Rock layers */
.sh-l1 { fill: var(--ridge-near); } .sh-l2 { fill: var(--rock); } .sh-l3 { fill: var(--rock-shade); } .sh-l4 { fill: var(--ground); } .sh-l5 { fill: var(--ground-front); }
.sh-l1, .sh-l2, .sh-l3, .sh-l4, .sh-l5 { transition: fill var(--dur-scene) ease; }
.sh-seam { fill: none; stroke: #fff; stroke-opacity: .14; stroke-width: 2; }
.sh-crack { fill: none; stroke: #1b1030; stroke-opacity: .35; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sh-stone ellipse { fill: #000; opacity: .14; }
.sh-crystal { transform-box: fill-box; transform-origin: 50% 100%; }
.sh-facet { fill: none; stroke: #fff; stroke-opacity: .7; stroke-width: 1; stroke-linecap: round; }
.sh-glint { fill: #fff; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: glint 4.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
[data-theme="night"] .sh-crystal { filter: drop-shadow(0 0 3px rgba(255, 255, 255, .35)); }

/* Shaft */
.sh-wall { fill: none; stroke: #6b4a2e; stroke-width: 4; }
.sh-set { fill: none; stroke: #7a5232; stroke-width: 3; }
.sh-ladder { fill: none; stroke: #9a7a52; stroke-width: 1.3; opacity: .85; }
.sh-pebble { fill: var(--rock); animation: sh-pebble 5s cubic-bezier(.5, 0, .9, .5) infinite; animation-delay: var(--d, 0s); opacity: 0; }
@keyframes sh-pebble { 0% { transform: translateY(0); opacity: 0; } 4% { opacity: 1; } 45% { transform: translateY(500px); opacity: 0; } 100% { opacity: 0; } }

/* Tunnels */
.sh-drift { fill: url(#sh-driftg); stroke: rgba(0, 0, 0, .35); stroke-width: 1.5; }
.sh-next { fill: rgba(0, 0, 0, .12); stroke: #fff; stroke-opacity: .45; stroke-width: 1.5; stroke-dasharray: 5 5; animation: dash 1.6s linear infinite; }
.sh-floor { fill: #3a2a26; }
.sh-tie { fill: #5a3a22; }
.sh-rail { fill: none; stroke: #a9b0c2; stroke-width: 1.2; }
.sh-post { fill: none; stroke: #8a5f38; stroke-width: 3; stroke-linecap: round; }
.sh-wire { fill: none; stroke: #6b6070; stroke-width: 1; }
.sh-glow { fill: url(#sh-lampg); animation: sh-flicker 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes sh-flicker { 0%, 100% { opacity: .85; transform: scale(1); } 40% { opacity: 1; transform: scale(1.08); } 44% { opacity: .65; } 48% { opacity: 1; } }
[data-theme="night"] .sh-glow { transform: scale(1.15); }
.sh-lamp-body { fill: #2a1a14; stroke: #a9b0c2; stroke-width: .8; }
.sh-lamp { fill: var(--gold); }
.sh-hang { transform-box: fill-box; transform-origin: 50% 0; animation: sh-sway 4s ease-in-out infinite alternate; }
@keyframes sh-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* Signs */
.sh-board { fill: #c9a46a; stroke: #6b4a2e; stroke-width: 1; }
.sh-sign-post { fill: none; stroke: #6b4a2e; stroke-width: 2; }
.sh-nail { fill: #6b4a2e; }
.sh-sign-text { font: 700 7.5px var(--font-mono); letter-spacing: .06em; fill: #3a2414; }
.sh-sign-sub { font: 700 5.5px var(--font-mono); letter-spacing: .14em; fill: #8a3a14; }
.sh-surface-sign .sh-sign-text { font-size: 6.5px; }
.sh-sign--here .sh-board { fill: var(--gold); stroke: var(--primary); animation: sh-here 1.6s ease-in-out infinite; }
@keyframes sh-here { 50% { filter: drop-shadow(0 0 6px var(--gold)); } }

/* Ore carts roll out and back */
.sh-cart { cursor: pointer; }
.sh-cart--r { animation: cart-r 9s var(--ease-in-out) infinite; }
.sh-cart--l { animation: cart-l 11s var(--ease-in-out) -3s infinite; }
@keyframes cart-r { 0%, 12% { transform: translateX(0); } 48%, 62% { transform: translateX(100px); } 100% { transform: translateX(0); } }
@keyframes cart-l { 0%, 12% { transform: translateX(0); } 48%, 62% { transform: translateX(-104px); } 100% { transform: translateX(0); } }
.sh-cart-body { fill: #8c5a33; stroke: #2a1a14; stroke-width: 1; }
.sh-cart-rim { fill: #5a3a22; }
.sh-ore { stroke: rgba(0, 0, 0, .3); stroke-width: .6; }
.sh-cart-wheel circle { fill: #2a1a14; stroke: #a9b0c2; stroke-width: 1; }
.sh-cart-wheel path { stroke: #a9b0c2; stroke-width: 1; }
.sh-cart-wheel { transform-box: view-box; }
.sh-cart--r .sh-cart-wheel { animation: wheel-r 9s var(--ease-in-out) infinite; }
.sh-cart--l .sh-cart-wheel { animation: wheel-l 11s var(--ease-in-out) -3s infinite; }
@keyframes wheel-r { 0%, 12% { transform: rotate(0); } 48%, 62% { transform: rotate(1900deg); } 100% { transform: rotate(0); } }
@keyframes wheel-l { 0%, 12% { transform: rotate(0); } 48%, 62% { transform: rotate(-1990deg); } 100% { transform: rotate(0); } }
.sh-cart.is-poked .sh-ore { animation: ore-hop .5s var(--spring); }
@keyframes ore-hop { 40% { transform: translateY(-6px); } }

/* Cave life: a drip, a bat, falling grit */
.sh-drip { fill: #9fdcf0; opacity: .9; transform-box: fill-box; transform-origin: 50% 0; animation: drip 3.4s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(0) scale(.2); opacity: 0; } 10% { opacity: .9; } 55% { transform: translateY(0) scale(1); } 72% { transform: translateY(27px) scale(.9, 1.2); opacity: .9; } 73%, 100% { transform: translateY(27px); opacity: 0; } }
.sh-splash { fill: none; stroke: #9fdcf0; stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; animation: splash 3.4s ease-out infinite; }
@keyframes splash { 0%, 72% { opacity: 0; transform: scale(.3); } 74% { opacity: .9; } 100% { opacity: 0; transform: scale(2); } }
.sh-bat { cursor: pointer; }
.sh-bat-body, .sh-bat-wing path { fill: #5a4a7e; }
.sh-bat-feet { fill: none; stroke: #5a4a7e; stroke-width: 1; }
.sh-bat-eye { fill: var(--gold); animation: bat-blink 5s steps(1) infinite; }
@keyframes bat-blink { 0%, 90%, 100% { opacity: 1; } 92% { opacity: 0; } }
.sh-bat-wing { transform-box: view-box; }
.sh-bat-wing--l { transform-origin: -2.5px 8px; }
.sh-bat-wing--r { transform-origin: 2.5px 8px; }
.sh-bat-wing--l { animation: wing-l 7s ease-in-out infinite; }
.sh-bat-wing--r { animation: wing-r 7s ease-in-out infinite; }
@keyframes wing-l { 0%, 84%, 100% { transform: none; } 87%, 93% { transform: rotate(32deg) scaleX(1.5); } 90%, 96% { transform: rotate(-4deg); } }
@keyframes wing-r { 0%, 84%, 100% { transform: none; } 87%, 93% { transform: rotate(-32deg) scaleX(1.5); } 90%, 96% { transform: rotate(4deg); } }
.sh-bat { transform-box: view-box; transform-origin: 0 0; animation: bat-swing 6s ease-in-out infinite alternate; }
@keyframes bat-swing { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.sh-bat.is-poked .sh-bat-wing--l { animation: wing-l-fast .18s ease-in-out 6; }
.sh-bat.is-poked .sh-bat-wing--r { animation: wing-r-fast .18s ease-in-out 6; }
@keyframes wing-l-fast { 50% { transform: rotate(40deg) scaleX(1.6); } }
@keyframes wing-r-fast { 50% { transform: rotate(-40deg) scaleX(1.6); } }
.sh-fall { fill: var(--rock); opacity: 0; animation: sh-fall 2.8s ease-in infinite; animation-delay: var(--d, 0s); }
@keyframes sh-fall { 0%, 50% { transform: translateY(0); opacity: 0; } 55% { opacity: 1; } 80% { transform: translateY(var(--fall, 26px)); opacity: 1; } 85%, 100% { transform: translateY(var(--fall, 26px)); opacity: 0; } }

/* The digging face */
.sh-rubble ellipse, .sh-rubble circle { fill: var(--rock); stroke: rgba(0, 0, 0, .3); stroke-width: .8; }
.sh-pickaxe { transform-box: view-box; transform-origin: 284px 441px; animation: pick-hit .9s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes pick-hit { 0% { transform: rotate(-38deg); } 45% { transform: rotate(-38deg); } 62% { transform: rotate(4deg); } 70% { transform: rotate(0); } 100% { transform: rotate(-38deg); } }
.sh-pick-handle { fill: none; stroke: #b07a46; stroke-width: 2.6; stroke-linecap: round; }
.sh-pick-head { fill: none; stroke: #c9ced6; stroke-width: 3; stroke-linecap: round; }
.sh-spark { fill: var(--gold); opacity: 0; transform-box: fill-box; animation: sh-spark .9s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes sh-spark { 0%, 60% { opacity: 0; transform: none; } 63% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--sx, 6px), var(--sy, -8px)); } }

/* Cage: drops to the current level, lantern swings and settles */
.sh-cable { fill: #cdb79a; transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(.1416); transition: transform 2.6s var(--spring) .3s; }
.is-dug .sh-cable { transform: scaleY(calc((66 + var(--p) * 400) / 466)); }
.sh-cage { transform: translateY(0); transition: transform 2.6s var(--spring) .3s; cursor: pointer; }
.is-dug .sh-cage { transform: translateY(calc(var(--p) * 400px)); }
.sh-cage-hook { fill: none; stroke: #c9ced6; stroke-width: 1.6; }
.sh-crosshead { fill: #c9ced6; stroke: #2a1a14; stroke-width: .8; }
.sh-cage-box { fill: rgba(255, 255, 255, .1); stroke: #c9ced6; stroke-width: 2; }
.sh-cage-bars { fill: none; stroke: #c9ced6; stroke-width: 1.2; }
.sh-cage-ore { fill: var(--min-gold-2); stroke: var(--min-gold-1); stroke-width: .8; }
.sh-lantern { transform-box: view-box; transform-origin: 200px 147px; }
.is-dug .sh-lantern { animation: lantern-swing 3.4s ease-out 2.6s; }
.sh-cage.is-poked .sh-lantern { animation: lantern-swing 2.4s ease-out; }
.sh-cage.is-poked .sh-cage-swing { animation: cage-jiggle .5s var(--spring); }
@keyframes lantern-swing { 0% { transform: rotate(0); } 12% { transform: rotate(22deg); } 30% { transform: rotate(-16deg); } 48% { transform: rotate(10deg); } 66% { transform: rotate(-5deg); } 84% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
@keyframes cage-jiggle { 30% { transform: translateY(6px); } 60% { transform: translateY(-3px); } }


/* ---------- Dig: tap-to-chip rocks ---------- */
.cs-dig{ position: relative; }
.cs-dig .section-head{ align-items: center; }
.cs-dig__meter{ display: flex; align-items: center; gap: var(--sp-3); font-size: .9rem; color: var(--ink-2); }
.cs-dig__pips{ display: flex; gap: 6px; }
.cs-dig__pips i{
	width: 14px;
	height: 16px;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	background: var(--line-strong);
	transition: background-color .4s ease, transform .5s var(--spring);
}
.cs-dig__pips i.is-on{ background: linear-gradient(160deg, var(--g2), var(--g1)); transform: scale(1.25); }
.cs-dig__meter b{ color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-dig .rocks{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.5vw, 28px); }
.cs-dig .rock{
	--hits: 0;
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	width: 100%;
	min-height: 100%;
	padding: var(--sp-4) var(--sp-4) var(--sp-5);
	border: 1.5px solid var(--line);
	border-radius: var(--r-lg);
	background:
		radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--g1) 0%, transparent), transparent 70%),
		var(--surface);
	color: var(--ink);
	text-align: center;
	font: inherit;
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cpath d='M4 12 Q17 0 30 12' fill='none' stroke='%232a1a14' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M4 12 Q17 0 30 12' fill='none' stroke='%23c9ced6' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M17 7 L22 32' stroke='%232a1a14' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M17 7 L22 32' stroke='%23b06a44' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 6 10, pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: transform var(--dur-2) var(--spring), border-color var(--dur-2) ease, box-shadow var(--dur-2) ease, background-color var(--dur-3) ease;
}
.cs-dig .rock:hover{ transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.cs-dig .rock:active{ transform: translateY(-1px) scale(.98); }
.cs-dig .rock.is-open{ border-color: color-mix(in srgb, var(--g1) 60%, var(--line)); background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--g2) 26%, transparent), transparent 70%), var(--surface); cursor: pointer; }
.cs-dig .rock__stage{ position: relative; display: block; aspect-ratio: 200 / 160; margin: 0 auto var(--sp-3); width: min(100%, 220px); }
.cs-dig .rock__svg{ position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(var(--rot, 0deg)) scaleX(var(--flip, 1)); }
.cs-dig .rock__wobble{ transform-box: view-box; transform-origin: 100px 150px; }
.cs-dig .rock.is-hit .rock__wobble{ animation: rock-shake .32s var(--ease-out); }
.cs-dig .rock.is-nudge:not(.is-open) .rock__wobble{ animation: rock-nudge .9s var(--ease-in-out); }
@keyframes rock-shake { 20% { transform: translate(-5px, 1px) rotate(-3deg); } 45% { transform: translate(5px, -1px) rotate(2.5deg); } 70% { transform: translate(-2px, 0) rotate(-1deg); } }
@keyframes rock-nudge { 20% { transform: rotate(-2deg) translateY(-3px); } 40% { transform: rotate(2deg); } 60% { transform: rotate(-1deg) translateY(-1px); } }
.cs-dig .rock__face{ fill: var(--rock); transition: fill var(--dur-scene) ease; }
.cs-dig .rock__hi{ fill: #fff; opacity: .16; }
.cs-dig .rock__lo{ fill: var(--rock-shade); transition: fill var(--dur-scene) ease; }
.cs-dig .rock__speck{ fill: var(--rock-shade); }
.cs-dig .rock__half{ transition: transform .75s var(--spring), opacity .6s ease .35s; }
.cs-dig .rock.is-open .rock__half--l{ transform: translate(-30px, 10px) rotate(-16deg); opacity: .0; }
.cs-dig .rock.is-open .rock__half--r{ transform: translate(30px, 12px) rotate(14deg); opacity: .0; }
.cs-dig .rock__crack{ fill: none; stroke: #1b1030; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset .35s var(--ease-out); }
.cs-dig .rock__glow-crack{ fill: none; stroke: var(--g2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; opacity: .9; filter: drop-shadow(0 0 3px var(--g2)); transition: stroke-dashoffset .45s var(--ease-out) .05s; }
.cs-dig .rock[data-hits="1"] .c1, .cs-dig .rock[data-hits="2"] .c1, .cs-dig .rock[data-hits="2"] .c2, .cs-dig .rock[data-hits="2"] .c3, .cs-dig .rock.is-open .c1, .cs-dig .rock.is-open .c2, .cs-dig .rock.is-open .c3{ stroke-dashoffset: 0; }
.cs-dig .rock.is-open .rock__crack, .cs-dig .rock.is-open .rock__glow-crack{ opacity: 0; transition: opacity .2s ease; }
.cs-dig .rock__gem{
	position: absolute;
	left: 50%;
	top: 52%;
	width: 46%;
	aspect-ratio: 1;
	translate: -50% -50%;
	scale: .15;
	opacity: 0;
	rotate: -25deg;
	transition: scale .2s ease, opacity .2s ease;
}
.cs-dig .rock.is-open .rock__gem{ scale: 1; opacity: 1; rotate: 0deg; transition: scale .8s var(--spring) .12s, opacity .3s ease .12s, rotate .9s var(--spring) .12s; }
.cs-dig .rock__gem::before{
	content: "";
	position: absolute;
	inset: -40%;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--g2) 60%, transparent), transparent 65%);
	animation: gem-aura 2.6s ease-in-out infinite;
}
@keyframes gem-aura { 50% { transform: scale(1.15); opacity: .6; } }
.cs-dig .rock__gem svg{ position: relative; width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.gem-base{ fill: var(--g1); }
.gem-top{ fill: var(--g2); }
.gem-side{ fill: #000; opacity: .18; }
.gem-face{ fill: #fff; opacity: .22; }
.gem-glint{ fill: #fff; transform-box: fill-box; transform-origin: center; animation: glint 3s ease-in-out infinite; }
@keyframes glint { 0%, 70%, 100% { transform: scale(0) rotate(0); } 80% { transform: scale(1) rotate(90deg); } 90% { transform: scale(0) rotate(180deg); } }
.cs-dig .rock.is-spin .rock__gem svg{ animation: gem-spin .9s var(--ease-in-out); }
@keyframes gem-spin { 50% { transform: rotateY(180deg) scale(1.15); } 100% { transform: rotateY(360deg); } }
.cs-dig .mother-lode .rock.is-open .rock__gem svg{ animation: gem-hop .7s var(--spring); animation-delay: calc(var(--i) * 90ms); }
@keyframes gem-hop { 40% { transform: translateY(-16px) scale(1.12); } }

.cs-dig .rock__peek{
	/* a little glimmer leaks out of the cracks before it opens */
	position: absolute;
	left: 50%;
	top: 50%;
	width: 10px;
	height: 10px;
	translate: -50% -50%;
	border-radius: 50%;
	background: var(--g2);
	box-shadow: 0 0 14px 6px color-mix(in srgb, var(--g2) 70%, transparent);
	opacity: 0;
	transition: opacity .3s ease;
}
.cs-dig .rock[data-hits="1"] .rock__peek{ opacity: .35; }
.cs-dig .rock[data-hits="2"] .rock__peek{ opacity: .8; animation: bulb 1s ease-in-out infinite; }
.cs-dig .rock.is-open .rock__peek{ opacity: 0; animation: none; }

.cs-dig .rock__body{ display: grid; align-content: start; gap: 4px; }
.cs-dig .rock__mineral{ font: 400 .7rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.cs-dig .rock__cat{ font: 600 clamp(1.25rem, 1rem + 1vw, 1.6rem)/1.1 var(--font-display); }
.cs-dig .rock__tease{ font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.cs-dig .rock__soon{ justify-self: center; margin-top: 6px; padding: 3px 10px; border-radius: var(--r-pill); font: 400 .66rem/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; background: color-mix(in srgb, var(--g1) 18%, transparent); color: var(--ink); }
.js .cs-dig .rock__body > *{ opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .5s var(--spring); }
.js .cs-dig .rock.is-open .rock__body > *{ opacity: 1; transform: none; }
.js .cs-dig .rock.is-open .rock__body > :nth-child(1){ transition-delay: .35s; }
.js .cs-dig .rock.is-open .rock__body > :nth-child(2){ transition-delay: .45s; }
.js .cs-dig .rock.is-open .rock__body > :nth-child(3){ transition-delay: .55s; }
.js .cs-dig .rock.is-open .rock__body > :nth-child(4){ transition-delay: .65s; }
.cs-dig .rock__closed{ position: absolute; left: 0; right: 0; bottom: var(--sp-5); display: grid; justify-items: center; gap: 6px; font: 400 .72rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); transition: opacity .3s ease; }
.cs-dig .rock.is-open .rock__closed, html:not(.js) .rock__closed{ opacity: 0; }
.cs-dig .rock__taps{ display: flex; gap: 5px; }
.cs-dig .rock__taps i{ width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink-2); transition: background-color .2s ease, transform .3s var(--spring); }
.cs-dig .rock[data-hits="1"] .rock__taps i:nth-child(1),
.cs-dig .rock[data-hits="2"] .rock__taps i:nth-child(-n + 2){ background: var(--ink-2); transform: scale(.8); }
.cs-dig .chip-bit{
	position: absolute;
	left: 50%;
	top: 50%;
	width: var(--s, 8px);
	height: var(--s, 8px);
	background: var(--rock);
	clip-path: polygon(0 20%, 60% 0, 100% 50%, 70% 100%, 10% 80%);
	pointer-events: none;
	animation: chip-fly .75s cubic-bezier(.2, .6, .4, 1) forwards;
}
@keyframes chip-fly {
0%{ transform: translate(-50%, -50%) rotate(0); opacity: 1; }
45%{ transform: translate(calc(-50% + var(--dx) * .6), calc(-50% + var(--up))) rotate(calc(var(--r) * .6)); opacity: 1; }
100%{ transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; }
}
.cs-dig__lode{
	margin: var(--sp-6) auto 0;
	max-width: 560px;
	text-align: center;
	padding: var(--sp-5);
	border-radius: var(--r-lg);
	background: color-mix(in srgb, var(--gold) 16%, var(--surface));
	border: 1.5px dashed var(--gold);
	opacity: 0;
	transform: translateY(12px) scale(.96);
	transition: opacity .5s ease, transform .7s var(--spring);
}
.cs-dig__lode:not(.is-on){ visibility: hidden; height: 0; padding: 0; margin-top: 0; border-width: 0; overflow: hidden; }
.cs-dig__lode.is-on{ opacity: 1; transform: none; }
.cs-dig__lode h3{ font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.cs-dig__lode p{ margin: 0; color: var(--ink-2); }


/* ---------- Toast ---------- */
.cs-toast {
	position: fixed;
	left: 50%;
	bottom: max(20px, env(safe-area-inset-bottom));
	z-index: 120;
	translate: -50% 0;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: var(--r-pill);
	background: var(--ink);
	color: var(--bg);
	font-weight: 600;
	font-size: .92rem;
	box-shadow: var(--shadow-2);
	opacity: 0;
	transform: translateY(16px) scale(.96);
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
}
.cs-toast.is-on { opacity: 1; transform: none; transition: opacity .3s ease, transform .5s var(--spring); }


@media (max-width: 900px) {
.cs-shaft__inner{ grid-template-columns: 1fr; }
.cs-shaft__art{ order: -1; max-width: 380px; }
}
@media (max-width: 760px) {
.cs-dig .rocks{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-dig .rock{ padding: var(--sp-3) var(--sp-3) var(--sp-4); }
.cs-dig .rock__tease{ font-size: .84rem; }
.cs-dig .section-head{ align-items: start; }
}
@media (max-width: 420px) {
.cs-hero-actions .btn{ flex: 1 1 auto; }
.cs-town{ font-size: .76rem; padding: 6px 10px 6px 8px; gap: 8px; }
.cs-town__bulbs i{ width: 5px; height: 9px; }
}

/* ---------- Without JS: rocks readable, town hidden ---------- */
html:not(.js) .cs-dig .rock__half, html:not(.js) .cs-dig .rock__crack, html:not(.js) .cs-dig .rock__glow-crack { opacity: 0; }
html:not(.js) .cs-dig .rock__gem { scale: 1; opacity: 1; rotate: 0deg; }
html:not(.js) .cs-town { display: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.cs-dig .rock__half { transition: none; }
}

/* The hero hosts the town fun layer */
body.home .hero { position: relative; }


/* ---------- Directory lode (full-site adaptation) ---------- */
.lode-links { list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.lode-links .btn { display: inline-flex; align-items: center; gap: var(--sp-2); }
.lode-links .mono { opacity: .7; font-size: .78rem; }
.cs-dig__lode.is-on { opacity: 1; transform: none; }
.cs-dig .rock__soon.is-found { color: var(--gold); }

/* Town button sits above the scene on any page with the fun layer */
.cs-town { z-index: 3; }


/* Windows widget: in-flow above the hero stats, not floating over them (owner request 2026-11-18) */
.hero .cs-town {
	position: static;
	z-index: auto;
	right: auto;
	bottom: auto;
	margin: var(--sp-4) 0 0;
}
