/* ============================================================================
 * MINER BOSS — landing page presentation (v6.6 "Kapı").
 *
 * The tokens are the GAME'S, lifted from css/style.css: sooty coal ground,
 * lantern amber from above, brass edges, paper ink; money is gold, the primary
 * action is ember orange, $MINE is mineral cyan. Jersey 10 is the display face
 * the game uses, loaded from the repo — no CDN.
 *
 * Every sprite is drawn with image-rendering: pixelated at a multiple of its
 * source size (--px: 2 on desktop, 1.5 on phones), so the pixel art stays
 * crisp. The cross-section in the hero copies js/scene.js: miner frames
 * toggle on the game's 0.72 s swing (raise 55 % / strike 45 %), the pickaxe
 * sits at the game's grip points and angles (raise −1.15 rad at (+4,−31),
 * strike 1.4 rad at (+10,−18), shoulder −0.8 rad at (+2,−20), scale .9/.85),
 * debris flies on the strike, the cabin, cable and wheel share one timeline.
 * Dark only, like the game.
 * ========================================================================== */

@font-face {
  font-family: 'Jersey 10';
  src: url('assets/fonts/Jersey10.ttf?v=6.6.0') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* ---- ground ramp ------------------------------------------------------- */
  --bg0: #16100e;
  --bg1: #0f0a09;
  --bg2: #1c1512;
  --panel: #251b15;
  --panel-hi: #2f221a;
  --panel-2: #1c1410;
  --card: rgba(255, 200, 140, 0.055);
  --card-line: rgba(255, 190, 120, 0.17);
  --line: #3d2c21;
  --brass: #c9955c;
  --well: rgba(0, 0, 0, 0.28);

  /* ---- ink --------------------------------------------------------------- */
  --ink: #f6eddd;
  --ink-dim: #d9c9b2;
  --muted: #b3a084;

  /* ---- accents ----------------------------------------------------------- */
  --accent: #ff8f3a;
  --accent-hi: #ffb46b;
  --accent-deep: #c25d1d;
  --on-accent: #2b1404;
  --accent-2: #ff6392;
  --warn: #ff6255;
  --gold: #f6c453;
  --gold-hi: #ffdf8e;
  --gold-deep: #b98f2e;
  --on-gold: #3a2708;
  --mine-t: #5fd9d0;
  --scrip: #b585ff;
  --good: #6fd08c;
  --bad: #ff7261;
  --info: #7aaeff;

  --btn-bg: linear-gradient(#33261d, #241a14);
  --btn-line: #4a3626;

  --e1: inset 0 1px 0 rgba(255, 214, 160, 0.07), 0 2px 6px rgba(0, 0, 0, 0.38);
  --e2: inset 0 1px 0 rgba(255, 214, 160, 0.09), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.45);
  --e3: inset 0 1px 0 rgba(255, 214, 160, 0.12), 0 12px 40px rgba(0, 0, 0, 0.6);
  --glow-accent: 0 0 22px rgba(255, 143, 58, 0.35);
  --glow-gold: 0 0 16px rgba(246, 196, 83, 0.32);

  --display: 'Jersey 10', "Avenir Next Condensed", "Arial Narrow", Impact, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .84 0 0 0 0 .62 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");

  /* ---- type -------------------------------------------------------------- */
  --fs0: 12.5px; --fs1: 13.5px; --fs2: 15.5px; --fs3: 18px; --fs4: 24px;

  /* ---- rhythm ------------------------------------------------------------ */
  --gut: clamp(18px, 4vw, 44px);
  --band-y: clamp(56px, 8vw, 108px);
  --maxw: 1180px;
  --bar-h: 64px;

  /* ---- the cross-section ------------------------------------------------- */
  --px: 2;                                   /* sprite scale                 */
  --fh: calc(var(--px) * 100px);             /* one floor                     */
  --ug-h: calc(3 * var(--fh) + 72px);        /* three floors + the fade       */
  --shaft-x: clamp(26px, 9vw, 150px);        /* left edge of the shaft        */
  --shaft-w: calc(var(--px) * 72px);
  --tun-l: calc(var(--shaft-x) + var(--shaft-w));   /* tunnel starts here     */
  --box-l: calc(var(--tun-l) + var(--px) * 12px);   /* the floor's ore box    */
  --dig-l: calc(100% - var(--px) * 72px);           /* where a digger stands  */
  --wh-x: 79%;                                      /* warehouse centre       */
}

/* ---------- base ----------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  font: var(--fs2)/1.6 -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    var(--grain),
    radial-gradient(120% 60% at 50% -10%, rgba(255, 150, 60, 0.06), transparent 60%),
    var(--bg0);
  color: var(--ink);
  min-height: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
.px { image-rendering: pixelated; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
b, strong { font-weight: 700; color: var(--ink); }
::selection { background: rgba(255, 143, 58, .4); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .035em;
  text-transform: uppercase;
  line-height: .95;
}
.mine-t { color: var(--mine-t); }
.wrap { width: min(var(--maxw), 100% - 2 * var(--gut)); margin-inline: auto; }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--gold); color: var(--on-gold); font-weight: 700;
}
.skip:focus { top: 12px; }

.noscript { text-align: center; padding: 12px; color: var(--muted); }

/* reveal-on-scroll (landing.js adds .rv / .in; nothing moves without JS) */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .rv.in { opacity: 1; transform: none; }

/* ---------- top bar -------------------------------------------------------- */
.site {
  position: sticky; top: 0; z-index: 40;
  height: var(--bar-h);
  background: rgba(22, 16, 14, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 190, 120, 0.12);
  transition: background .3s, box-shadow .3s;
}
.site.scrolled { background: rgba(22, 16, 14, 0.94); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.bar { height: 100%; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-ico { width: 32px; height: 32px; }
.brand-name { font-size: 27px; color: var(--gold); letter-spacing: .06em; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--ink-dim); font-weight: 600; font-size: var(--fs1);
}
.nav a:hover { background: var(--card); color: var(--ink); text-decoration: none; }
.bar-cta { margin-left: auto; }

/* ---------- buttons (the game's chrome) ------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg);
  border: 1.5px solid var(--btn-line);
  border-radius: 12px; padding: 10px 16px;
  font-size: var(--fs2); font-weight: 700; color: var(--ink);
  min-height: 46px;
  transition: transform .08s, filter .15s;
  box-shadow: var(--e1);
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary {
  background: linear-gradient(var(--accent-hi), var(--accent) 48%, var(--accent-deep));
  border-color: var(--accent-deep); color: var(--on-accent); font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 240, 220, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 240, 220, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.btn.small { padding: 7px 14px; min-height: 38px; font-size: var(--fs1); border-radius: 10px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center;
  color: var(--muted); font-size: 18px;
}
.icon-btn:hover { background: var(--card); color: var(--ink); }
.linkish { color: var(--muted); font-size: var(--fs1); text-decoration: underline; text-underline-offset: 2px; padding: 4px 0; }
.linkish:hover { color: var(--ink); }

/* The two doors ------------------------------------------------------------ */
.doors {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 34px;
}
.play {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  min-width: 320px; height: 84px; padding: 0 48px;
  border-radius: 18px;
  background: linear-gradient(var(--accent-hi), var(--accent) 48%, var(--accent-deep));
  border: 2px solid var(--accent-deep);
  color: var(--on-accent);
  box-shadow:
    inset 0 2px 0 rgba(255, 240, 220, 0.55),
    inset 0 -3px 0 rgba(0, 0, 0, 0.22),
    0 10px 30px rgba(0, 0, 0, 0.5),
    var(--glow-accent);
  transition: transform .1s, filter .15s, box-shadow .2s;
  animation: ctaGlow 2.4s ease-in-out infinite;
}
.play::after {
  content: ''; position: absolute; top: -30%; bottom: -30%; left: -35%; width: 26%;
  background: linear-gradient(105deg, transparent 0, rgba(255, 255, 255, .42) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: sheen 4.6s ease-in-out infinite;
  pointer-events: none;
}
.play .display { font-size: 48px; letter-spacing: .1em; text-shadow: 0 1px 0 rgba(255, 240, 220, 0.45); }
.play img { width: 40px; height: 40px; filter: drop-shadow(0 1px 0 rgba(255, 240, 220, .5)); transition: transform .2s var(--ease); }
.play:hover { filter: brightness(1.06); transform: translateY(-1px); }
.play:hover img { transform: rotate(-14deg) translateY(-2px); }
.play:active { transform: scale(.97); }
.demo {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 320px; padding: 12px 36px 13px;
  border-radius: 14px;
  background: var(--btn-bg);
  border: 1.5px solid var(--btn-line);
  color: var(--ink);
  box-shadow: var(--e2);
  transition: transform .1s, filter .15s, border-color .2s;
}
.demo .display { font-size: 30px; letter-spacing: .08em; color: var(--gold-hi); }
.demo small { font-size: var(--fs0); color: var(--muted); letter-spacing: .01em; }
.demo:hover { filter: brightness(1.1); text-decoration: none; transform: translateY(-1px); border-color: var(--gold-deep); }
.demo:active { transform: scale(.97); }
.doors.compact { margin-top: 26px; }

@keyframes ctaGlow {
  0%, 100% { box-shadow: inset 0 2px 0 rgba(255, 240, 220, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 143, 58, 0.28); }
  50%      { box-shadow: inset 0 2px 0 rgba(255, 240, 220, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 36px rgba(255, 143, 58, 0.58); }
}
@keyframes sheen { 0%, 62% { left: -35%; } 100% { left: 135%; } }

/* ============================================================================
 * HERO — the cross-section
 * ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* sky: fills everything above the underground ------------------------------ */
.sky {
  position: absolute; left: 0; right: 0; top: 0;
  bottom: var(--ug-h);
  z-index: -1;
  background:
    linear-gradient(to bottom,
      #0b0a16 0%, #171533 26%, #2b2247 46%, #5a3345 64%, #a25b34 82%, #d9873d 100%);
  overflow: hidden;
  will-change: transform;
}
.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 6% 12%, rgba(255, 244, 224, .9), transparent),
    radial-gradient(1.5px 1.5px at 14% 32%, rgba(255, 244, 224, .7), transparent),
    radial-gradient(2px 2px at 22% 8%, rgba(255, 244, 224, .9), transparent),
    radial-gradient(1.5px 1.5px at 31% 22%, rgba(255, 244, 224, .6), transparent),
    radial-gradient(1.5px 1.5px at 42% 6%, rgba(255, 244, 224, .8), transparent),
    radial-gradient(2px 2px at 55% 15%, rgba(255, 244, 224, .9), transparent),
    radial-gradient(1.5px 1.5px at 63% 4%, rgba(255, 244, 224, .7), transparent),
    radial-gradient(1.5px 1.5px at 71% 26%, rgba(255, 244, 224, .6), transparent),
    radial-gradient(2px 2px at 80% 10%, rgba(255, 244, 224, .9), transparent),
    radial-gradient(1.5px 1.5px at 88% 30%, rgba(255, 244, 224, .7), transparent),
    radial-gradient(1.5px 1.5px at 94% 6%, rgba(255, 244, 224, .8), transparent),
    radial-gradient(1.5px 1.5px at 48% 30%, rgba(255, 244, 224, .5), transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
  opacity: .8;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: .95; } }
.sun {
  position: absolute; left: 50%; bottom: -8%;
  width: min(72vw, 900px); aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 100%, rgba(255, 200, 110, .58), rgba(255, 150, 60, .22) 30%, transparent 62%);
  animation: breathe 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes breathe { from { opacity: .85; } to { opacity: 1; } }
.hills {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--px) * 45px);
  background: url('assets/surface/hills.png') left bottom / calc(var(--px) * 235px) calc(var(--px) * 45px) repeat-x;
  image-rendering: pixelated;
  opacity: .92;
}
.cloud { position: absolute; opacity: .5; filter: brightness(.82) sepia(.35) saturate(.9); will-change: transform; }
.cloud.c1 { width: calc(var(--px) * 120px); top: 4%;  left: -20%; animation: drift 95s linear infinite; }
.cloud.c2 { width: calc(var(--px) * 88px);  top: 15%; left: -12%; animation: drift 70s linear infinite; animation-delay: -30s; opacity: .38; }
.cloud.c3 { width: calc(var(--px) * 120px); top: 9%;  left: -25%; animation: drift 120s linear infinite; animation-delay: -60s; opacity: .3; }
.cloud.c4 { width: calc(var(--px) * 88px);  top: 21%; left: -10%; animation: drift 85s linear infinite; animation-delay: -55s; opacity: .42; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(150vw); } }

/* copy --------------------------------------------------------------------- */
.hero-copy {
  position: relative; z-index: 2;
  text-align: center;
  padding: clamp(40px, 7vh, 84px) 0 34px;
  max-width: 1100px;
  will-change: transform, opacity;
}
.hero-copy > * { animation: enter .9s var(--ease) both; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .15s; }
.hero-copy > :nth-child(3) { animation-delay: .28s; }
.hero-copy > :nth-child(4) { animation-delay: .40s; }
.hero-copy > :nth-child(5) { animation-delay: .52s; }
.hero-copy > :nth-child(6) { animation-delay: .62s; }
@keyframes enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.eyebrow {
  display: inline-block;
  font-size: var(--fs0); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-hi);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(15, 10, 9, .55); border: 1px solid rgba(246, 196, 83, .28);
}
h1 {
  margin-top: 22px;
  font-size: clamp(60px, 8.6vw, 132px);
  color: var(--ink);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 12px 40px rgba(0, 0, 0, .45);
}
h1::after { content: ''; display: block; width: 88px; height: 4px; margin: 14px auto 0; background: var(--accent); border-radius: 2px; box-shadow: var(--glow-accent); }
.lede {
  margin: 22px auto 0; max-width: 680px;
  font-size: clamp(16px, 1.45vw, 19px); line-height: 1.6; color: var(--ink-dim);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}
.trust {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
  margin-top: 22px;
}
.trust li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(15, 10, 9, .6); border: 1px solid rgba(255, 190, 120, .16);
  font-size: var(--fs0); font-weight: 600; color: var(--ink-dim);
}
.trust img { width: 18px; height: 18px; }

/* the official address slot ------------------------------------------------ */
.official {
  margin: 30px auto 0; max-width: 680px; text-align: left;
  padding: 14px 16px 12px;
  border-radius: 16px;
  background: rgba(15, 10, 9, .72);
  border: 1px solid rgba(95, 217, 208, .22);
  box-shadow: var(--e2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.of-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.of-head img { width: 26px; height: 26px; }
.of-lab { font-size: var(--fs0); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }
.of-status {
  margin-left: auto;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 143, 58, .14); color: var(--accent-hi); border: 1px solid rgba(255, 143, 58, .35);
}
.of-status.live { background: rgba(111, 208, 140, .14); color: var(--good); border-color: rgba(111, 208, 140, .4); }
.of-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.of-ca {
  flex: 1; min-width: 0;
  font: 500 15px/1.4 var(--mono);
  color: var(--mine-t);
  padding: 10px 12px; border-radius: 10px;
  background: var(--bg1); border: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  user-select: all;
}
.of-ca[data-empty] { color: var(--muted); font-style: italic; letter-spacing: .1em; user-select: none; }
.of-copy img { width: 15px; height: 15px; opacity: .85; }
.of-copy.done { color: var(--good); }
.of-note { margin-top: 10px; font-size: var(--fs0); line-height: 1.5; color: var(--muted); }
.of-note b { color: var(--ink-dim); }
.of-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.of-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: var(--fs0); font-weight: 700; color: var(--ink-dim);
  background: var(--card); border: 1px solid var(--card-line);
}
.of-links a:hover { color: var(--ink); text-decoration: none; background: var(--panel-hi); }
.of-links img { width: 14px; height: 14px; }

/* ============================================================================
 * SURFACE
 * ========================================================================== */
.surface {
  position: relative; z-index: 1;
  height: calc(var(--px) * 136px);
  pointer-events: none;
}
.bld { position: absolute; bottom: calc(var(--px) * -3px); width: calc(var(--px) * 128px); transform: translateX(-50%); }
.bld > img:first-child { width: 100%; height: auto; }
.headframe { width: calc(var(--px) * 120px); left: calc(var(--shaft-x) + var(--shaft-w) / 2); bottom: calc(var(--px) * 3px); }
.forge     { left: 34%; }
.stall     { left: 56%; }
.warehouse { left: var(--wh-x); }
.surface .prop { position: absolute; }
.surface .flag  { width: calc(var(--px) * 64px); left: 93%; bottom: calc(var(--px) * 1px); }
.surface .wagon { width: calc(var(--px) * 64px); left: calc(var(--tun-l) + var(--px) * 6px); bottom: calc(var(--px) * 1px); }
.grass {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--px) * 7px);
  background: linear-gradient(#7fbf55, #4f8a3a 45%, #3e6d2f);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .18);
}

/* headframe: the wheel spins as the cabin moves, the rope runs down into the shaft */
.headframe .wheel {
  position: absolute; left: 50%; top: 15.4%;
  width: calc(var(--px) * 32px); height: auto;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: spin 16s ease-in-out infinite;
}
.headframe .rope {
  position: absolute; left: 50%; top: 15.4%; bottom: 0;
  width: calc(var(--px) * 1.5px); margin-left: calc(var(--px) * -0.75px);
  background: #6e6a66; box-shadow: 1px 0 0 rgba(0, 0, 0, .45);
}
@keyframes spin {
  0%        { transform: translate(-50%, -50%) rotate(0deg); }
  16%, 24%  { transform: translate(-50%, -50%) rotate(360deg); }
  44%, 54%  { transform: translate(-50%, -50%) rotate(1080deg); }
  68%, 74%  { transform: translate(-50%, -50%) rotate(720deg); }
  100%      { transform: translate(-50%, -50%) rotate(0deg); }
}

/* forge: fire in the furnace mouth, smoke from the chimney (game points 44,68 and 30,22) */
.forge .fire {
  position: absolute; left: 34.4%; top: 51.6%;
  width: 22%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 175, 70, .8), rgba(255, 120, 30, .35) 45%, transparent 70%);
  mix-blend-mode: screen;
  animation: flicker 1.3s ease-in-out infinite;
}
.forge .smoke {
  position: absolute; left: 23.4%; top: 17.2%;
  width: calc(var(--px) * 26px);
  opacity: 0;
  transform: translate(-50%, -50%);
  filter: brightness(1.25);
  animation: smoke 4.5s linear infinite;
}
.forge .s2 { animation-delay: -1.5s; }
.forge .s3 { animation-delay: -3s; }
@keyframes smoke {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(.5); }
  12%  { opacity: .62; }
  100% { opacity: 0;   transform: translate(-10%, calc(-50% - var(--px) * 56px)) scale(1.7); }
}

/* market stall: COIN rises from the counter (game point 64,80) */
.stall .coin {
  position: absolute; left: 50%; top: 62.5%;
  width: calc(var(--px) * 12px);
  opacity: 0;
  animation: coinUp 4s ease-out infinite;
}
.stall .k2 { left: 44%; animation-delay: -2.3s; }
@keyframes coinUp {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  8%   { opacity: 1; }
  60%  { opacity: 1; transform: translate(-50%, calc(var(--px) * -40px)); }
  80%, 100% { opacity: 0; transform: translate(-50%, calc(var(--px) * -56px)); }
}

/* warehouse: the cabin's load arrives and the tally pops */
.warehouse .plus {
  position: absolute; left: 50%; top: 6%;
  font-size: calc(var(--px) * 13px); color: var(--good);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 10px rgba(111, 208, 140, .35);
  opacity: 0;
  transform: translate(-50%, 0);
  animation: plus 16s ease-out infinite;
}
@keyframes plus {
  0%, 8.9% { opacity: 0; transform: translate(-50%, 0); }
  9%       { opacity: 1; }
  15%      { opacity: 1; transform: translate(-50%, calc(var(--px) * -18px)); }
  20%, 100% { opacity: 0; transform: translate(-50%, calc(var(--px) * -26px)); }
}
.inbound {
  position: absolute;
  width: calc(var(--px) * 14px);
  left: calc(var(--shaft-x) + var(--shaft-w) / 2);
  bottom: calc(var(--px) * 12px);
  opacity: 0;
  animation: fly 16s linear infinite;
}
.inbound.i2 { animation-delay: .22s; }
.inbound.i3 { animation-delay: .44s; }
@keyframes fly {
  0%    { left: calc(var(--shaft-x) + var(--shaft-w) / 2); bottom: calc(var(--px) * 12px); opacity: 0; animation-timing-function: ease-out; }
  0.6%  { opacity: 1; }
  4.5%  { left: calc((var(--shaft-x) + var(--shaft-w) / 2) * 0.5 + var(--wh-x) * 0.5); bottom: calc(var(--px) * 70px); animation-timing-function: ease-in; }
  8.6%  { left: calc(var(--wh-x) - var(--px) * 3px); bottom: calc(var(--px) * 40px); opacity: 1; }
  9%, 100% { left: calc(var(--wh-x) - var(--px) * 3px); bottom: calc(var(--px) * 40px); opacity: 0; }
}

/* ============================================================================
 * UNDERGROUND
 * ========================================================================== */
.underground {
  position: relative; z-index: 1;
  background: #3a2a1f;
}
.underground::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url('assets/img/rock-tile.svg') 0 0 / calc(var(--px) * 128px) calc(var(--px) * 128px) repeat;
  opacity: .28; mix-blend-mode: multiply;
}
.underground::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .28) 55%, rgba(0, 0, 0, .62) 100%);
}
/* dust motes drifting up through the lamplight */
.motes { position: absolute; inset: 0 0 72px 0; overflow: hidden; pointer-events: none; z-index: 4; }
.motes i {
  position: absolute; bottom: -4%;
  width: calc(var(--px) * 2px); height: calc(var(--px) * 2px); border-radius: 50%;
  background: rgba(255, 214, 160, .5);
  animation: mote 14s linear infinite;
}
.motes i:nth-child(1) { left: 28%; animation-duration: 15s; }
.motes i:nth-child(2) { left: 41%; animation-duration: 19s; animation-delay: -7s; }
.motes i:nth-child(3) { left: 53%; animation-duration: 13s; animation-delay: -3s; }
.motes i:nth-child(4) { left: 66%; animation-duration: 21s; animation-delay: -11s; }
.motes i:nth-child(5) { left: 78%; animation-duration: 16s; animation-delay: -5s; }
.motes i:nth-child(6) { left: 90%; animation-duration: 18s; animation-delay: -13s; }
@keyframes mote {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: .7; }
  50%  { transform: translate(calc(var(--px) * 10px), -50vh); }
  90%  { opacity: .5; }
  100% { transform: translate(calc(var(--px) * -6px), calc(-3 * var(--fh) - 20px)); opacity: 0; }
}

/* the shaft: rails, the rope, the cabin — one 16 s timeline shared with the
   headframe wheel, the load and the warehouse tally */
.shaft {
  position: absolute; top: 0; bottom: 72px; z-index: 2;
  left: var(--shaft-x); width: var(--shaft-w);
  background: #0d0907 url('assets/img/shaft-rails.svg') center top / 100% auto repeat-y;
  box-shadow: inset 0 0 0 calc(var(--px) * 1px) rgba(0, 0, 0, .5), 0 0 24px rgba(0, 0, 0, .5);
  --c0: calc(var(--px) * 8px);
  --c1: calc(1 * var(--fh) - var(--px) * 66px);
  --c2: calc(2 * var(--fh) - var(--px) * 66px);
  --c3: calc(3 * var(--fh) - var(--px) * 66px);
}
.shaft .cable {
  position: absolute; left: 50%; top: 0;
  width: calc(var(--px) * 1.5px); margin-left: calc(var(--px) * -0.75px);
  height: var(--c0);
  background: #6e6a66; box-shadow: 1px 0 0 rgba(0, 0, 0, .45);
  animation: cable 16s ease-in-out infinite;
}
@keyframes cable {
  0%        { height: var(--c0); }
  16%, 24%  { height: var(--c1); }
  44%, 54%  { height: var(--c3); }
  68%, 74%  { height: var(--c2); }
  100%      { height: var(--c0); }
}
.cabin {
  position: absolute; left: 50%; top: 0;
  width: calc(var(--px) * 60px); height: calc(var(--px) * 62px);
  transform: translate(-50%, var(--c0));
  animation: ride 16s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5));
}
.cabin > img { width: 100%; height: 100%; }
@keyframes ride {
  0%        { transform: translate(-50%, var(--c0)); }
  16%, 24%  { transform: translate(-50%, var(--c1)); }
  44%, 54%  { transform: translate(-50%, var(--c3)); }
  68%, 74%  { transform: translate(-50%, var(--c2)); }
  100%      { transform: translate(-50%, var(--c0)); }
}
.cabin .load {
  position: absolute; left: 50%; bottom: calc(var(--px) * 9px);
  display: flex; transform: translateX(-50%);
  opacity: 0;
  animation: load 16s steps(1, end) infinite;
}
.cabin .load img { width: calc(var(--px) * 14px); margin: 0 calc(var(--px) * -2px); }
.cabin .load img:nth-child(2) { margin-top: calc(var(--px) * -4px); }
@keyframes load { 0%, 49.9% { opacity: 0; } 50%, 99.5% { opacity: 1; } 99.6%, 100% { opacity: 0; } }

/* floors ------------------------------------------------------------------- */
.floor { position: relative; height: var(--fh); }
/* the tunnel: dark interior, three timber supports, a plank floor */
.floor::after {
  content: ''; position: absolute; z-index: 1;
  left: var(--tun-l); right: 0; top: 30%; bottom: 0;
  background:
    url('assets/img/beam.svg') no-repeat 24% 100% / auto 100%,
    url('assets/img/beam.svg') no-repeat 56% 100% / auto 100%,
    url('assets/img/beam.svg') no-repeat 86% 100% / auto 100%,
    linear-gradient(to bottom, #1a110d, #120c0a);
  box-shadow: inset 0 calc(var(--px) * -6px) 0 #4b3323, inset 0 calc(var(--px) * 2px) 0 rgba(0, 0, 0, .5);
}
.floor > * { z-index: 3; }
.plate {
  position: absolute;
  left: calc(var(--tun-l) + var(--px) * 8px);
  top: calc(30% + var(--px) * 6px);
  padding: 2px 12px 0 10px;
  font-size: calc(var(--px) * 11px); letter-spacing: .08em; line-height: 1.3;
  color: var(--ink); background: #241a14; border: 1.5px solid var(--btn-line); border-radius: 9px;
  box-shadow: var(--e1);
}
.plate::after { content: ' ›'; color: var(--muted); }

.lamp { position: absolute; left: 62%; top: 30%; width: calc(var(--px) * 22px); }
.lamp img:not(.glow) { position: relative; width: 100%; animation: sway 4s ease-in-out infinite; transform-origin: 50% 0; }
.lamp .glow {
  position: absolute; left: 50%; top: 40%;
  width: calc(var(--px) * 120px);
  transform: translate(-50%, -40%);
  opacity: .8; mix-blend-mode: screen; pointer-events: none;
  animation: flicker 3.4s ease-in-out infinite;
}
.f2 .lamp { left: 40%; } .f2 .lamp img { animation-delay: -1.3s; }
.f3 .lamp { left: 74%; } .f3 .lamp img { animation-delay: -2.1s; }
@keyframes flicker { 0%, 100% { opacity: .78; } 40% { opacity: .55; } 55% { opacity: .85; } 70% { opacity: .6; } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

/* the rock face at the far end of each tunnel */
.face {
  position: absolute; right: 0; top: 30%; bottom: 0; z-index: 2;
  width: calc(var(--px) * 16px);
  background: #3a2a1f;
  clip-path: polygon(100% 0, 45% 0, 100% 11%, 30% 24%, 100% 36%, 40% 49%, 100% 61%, 28% 74%, 100% 86%, 45% 100%, 100% 100%);
}

/* the ore box ---------------------------------------------------------------- */
.box {
  position: absolute; bottom: calc(var(--px) * 6px);
  left: var(--box-l);
  width: calc(var(--px) * 64px); height: calc(var(--px) * 46px);
}
.box .crate { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.box .ore { position: absolute; z-index: 2; width: calc(var(--px) * 20px); bottom: calc(var(--px) * 22px); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)); }
.box .o1 { left: calc(var(--px) * 9px); }
.box .o2 { left: calc(var(--px) * 22px); bottom: calc(var(--px) * 27px); }
.box .o3 { left: calc(var(--px) * 36px); }
.box.half .o1 { bottom: calc(var(--px) * 18px); left: calc(var(--px) * 14px); }
.box.half .o2 { bottom: calc(var(--px) * 19px); left: calc(var(--px) * 30px); }
.arrow-wrap { position: absolute; left: 58%; top: calc(var(--px) * -30px); width: calc(var(--px) * 26px); transform: translateX(-50%); z-index: 3; }
.arrow-wrap .arrow { width: 100%; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--px) * -5px)); } }
/* F1: fills over twelve seconds, calls for a tap, gets collected, repeats */
.box.filling .o1 { animation: fill1 12s steps(1, end) infinite; }
.box.filling .o2 { animation: fill2 12s steps(1, end) infinite; }
.box.filling .o3 { animation: fill3 12s steps(1, end) infinite; }
.box.filling .arrow-wrap { opacity: 0; animation: arrowShow 12s steps(1, end) infinite; }
@keyframes fill1 { 0%, 9.9% { opacity: 0; } 10%, 91.9% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes fill2 { 0%, 34.9% { opacity: 0; } 35%, 91.9% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes fill3 { 0%, 59.9% { opacity: 0; } 60%, 91.9% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes arrowShow { 0%, 61.9% { opacity: 0; } 62%, 91.9% { opacity: 1; } 92%, 100% { opacity: 0; } }
.box .star { position: absolute; z-index: 4; left: 50%; top: calc(var(--px) * 8px); width: calc(var(--px) * 10px); opacity: 0; }
.box.filling .t1 { animation: burst1 12s linear infinite; }
.box.filling .t2 { animation: burst2 12s linear infinite; }
.box.filling .t3 { animation: burst3 12s linear infinite; }
@keyframes burst1 { 0%, 91.9% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 92% { opacity: 1; } 98% { opacity: 0; transform: translate(calc(-50% - var(--px) * 22px), calc(var(--px) * -26px)) scale(1.1) rotate(90deg); } 100% { opacity: 0; } }
@keyframes burst2 { 0%, 91.9% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 92% { opacity: 1; } 98% { opacity: 0; transform: translate(-50%, calc(var(--px) * -34px)) scale(1.2) rotate(-60deg); } 100% { opacity: 0; } }
@keyframes burst3 { 0%, 91.9% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 92% { opacity: 1; } 98% { opacity: 0; transform: translate(calc(-50% + var(--px) * 22px), calc(var(--px) * -24px)) scale(1.1) rotate(120deg); } 100% { opacity: 0; } }

/* miners --------------------------------------------------------------------- */
.spr {
  position: absolute; bottom: calc(var(--px) * 6px);
  width: calc(var(--px) * 48px); height: calc(var(--px) * 48px);
}
.spr .fr { position: absolute; inset: 0; }
.spr .body { position: absolute; inset: 0; width: 100%; height: 100%; }
.pose { position: absolute; inset: 0; }
.flip { transform: scaleX(-1); }
/* two-frame cycles: the game's swing is 0.72 s, raise 55 % / strike 45 %;
   walk and carry alternate evenly */
.tog > .fr:nth-child(1) { animation: frameA var(--dur, .72s) steps(1, end) infinite; }
.tog > .fr:nth-child(2) { animation: frameB var(--dur, .72s) steps(1, end) infinite; }
.tog.even > .fr:nth-child(1) { animation-name: frameA50; }
.tog.even > .fr:nth-child(2) { animation-name: frameB50; }
@keyframes frameA   { 0%, 54.9% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes frameB   { 0%, 54.9% { opacity: 0; } 55%, 100% { opacity: 1; } }
@keyframes frameA50 { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes frameB50 { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }

/* the held pickaxe: 44×44 handle + head, pivot (22,26), placed at the game's
   grip points relative to the miner's feet-anchor (24,46) */
.pick { position: absolute; width: calc(var(--px) * 44px); height: calc(var(--px) * 44px); transform-origin: calc(var(--px) * 22px) calc(var(--px) * 26px); pointer-events: none; }
.pick img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pick.raise    { left: calc(var(--px) * 6px);  top: calc(var(--px) * -11px); transform: rotate(-65.9deg) scale(.9); }
.pick.strike   { left: calc(var(--px) * 12px); top: calc(var(--px) * 2px);   transform: rotate(80.2deg) scale(.9); }
.pick.shoulder { left: calc(var(--px) * 4px);  top: 0;                        transform: rotate(-45.8deg) scale(.85); }
/* tier tints (the game recolours the grey head per tier; iron IS the grey) */
.pick.copper .head  { filter: sepia(1) saturate(2.4) hue-rotate(-14deg) brightness(.95); }
.pick.gold .head    { filter: sepia(1) saturate(3.2) hue-rotate(4deg) brightness(1.08); }
.pick.emerald .head { filter: sepia(1) saturate(2.6) hue-rotate(96deg) brightness(.95); }

/* strike debris: three chunks and a dust puff at the wall, once per swing */
.hit { position: absolute; left: calc(var(--px) * 50px); top: calc(var(--px) * 14px); width: calc(var(--px) * 12px); height: calc(var(--px) * 12px); }
.hit img { position: absolute; left: 0; top: 0; opacity: 0; }
.hit .ch { width: calc(var(--px) * 9px); }
.hit .du { width: calc(var(--px) * 24px); left: calc(var(--px) * -8px); top: calc(var(--px) * -6px); }
.hit .c1 { animation: chunk1 .72s linear infinite; }
.hit .c2 { animation: chunk2 .72s linear infinite; }
.hit .c3 { animation: chunk3 .72s linear infinite; }
.hit .du { animation: dust .72s linear infinite; }
@keyframes chunk1 { 0%, 54.9% { opacity: 0; transform: translate(0, 0) rotate(0); } 55% { opacity: 1; } 75% { opacity: 1; transform: translate(calc(var(--px) * -12px), calc(var(--px) * -13px)) rotate(120deg); } 100% { opacity: 0; transform: translate(calc(var(--px) * -22px), calc(var(--px) * 9px)) rotate(260deg); } }
@keyframes chunk2 { 0%, 54.9% { opacity: 0; transform: translate(0, 0) rotate(0); } 55% { opacity: 1; } 75% { opacity: 1; transform: translate(calc(var(--px) * -7px), calc(var(--px) * -17px)) rotate(-90deg); } 100% { opacity: 0; transform: translate(calc(var(--px) * -14px), calc(var(--px) * 10px)) rotate(-200deg); } }
@keyframes chunk3 { 0%, 54.9% { opacity: 0; transform: translate(0, 0) rotate(0); } 55% { opacity: 1; } 75% { opacity: 1; transform: translate(calc(var(--px) * -17px), calc(var(--px) * -8px)) rotate(150deg); } 100% { opacity: 0; transform: translate(calc(var(--px) * -30px), calc(var(--px) * 6px)) rotate(300deg); } }
@keyframes dust   { 0%, 54.9% { opacity: 0; transform: scale(.5); } 58% { opacity: .7; transform: scale(.8); } 100% { opacity: 0; transform: translate(calc(var(--px) * -8px), calc(var(--px) * -9px)) scale(1.6); } }

/* placements */
.digger { left: var(--dig-l); }
.walker { left: 30%; animation: walk 11s linear infinite; }
@keyframes walk {
  0%    { transform: translateX(0) scaleX(1); }
  49.9% { transform: translateX(min(24vw, 360px)) scaleX(1); }
  50%   { transform: translateX(min(24vw, 360px)) scaleX(-1); }
  99.9% { transform: translateX(0) scaleX(-1); }
  100%  { transform: translateX(0) scaleX(1); }
}
.canary { position: absolute; left: 46%; bottom: calc(var(--px) * 6px); width: calc(var(--px) * 64px); }

/* F2's showpiece: one miner through the game's whole work cycle */
.cycle { left: var(--dig-l); animation: cycleMove 12s linear infinite; }
@keyframes cycleMove {
  0%, 48%   { left: var(--dig-l); }
  62%, 68%  { left: calc(var(--box-l) + var(--px) * 44px); }
  84%, 100% { left: var(--dig-l); }
}
.cycle .pose { opacity: 0; }
.cycle .p-dig   { animation: gDig 12s steps(1, end) infinite; }
.cycle .p-carry { animation: gCarry 12s steps(1, end) infinite; }
.cycle .p-dump  { animation: gDump 12s steps(1, end) infinite; }
.cycle .p-walk  { animation: gWalk 12s steps(1, end) infinite; }
@keyframes gDig   { 0%, 47.9% { opacity: 1; } 48%, 83.9% { opacity: 0; } 84%, 100% { opacity: 1; } }
@keyframes gCarry { 0%, 47.9% { opacity: 0; } 48%, 61.9% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes gDump  { 0%, 61.9% { opacity: 0; } 62%, 67.9% { opacity: 1; } 68%, 100% { opacity: 0; } }
@keyframes gWalk  { 0%, 67.9% { opacity: 0; } 68%, 83.9% { opacity: 1; } 84%, 100% { opacity: 0; } }
/* ore in the pail while carrying (game: tub rim at canvas y≈32) */
.pail { position: absolute; width: calc(var(--px) * 14px); }
.pail.p1 { left: calc(var(--px) * 25px); top: calc(var(--px) * 24px); }
.pail.p2 { left: calc(var(--px) * 31px); top: calc(var(--px) * 22px); }
/* dumping: tilt the tub, three pieces pop into the box */
.p-dump .tilt { transform: rotate(-9deg); transform-origin: 50% 96%; }
.pop { position: absolute; width: calc(var(--px) * 13px); left: calc(var(--px) * 26px); top: calc(var(--px) * 22px); opacity: 0; }
.p-dump .q1 { animation: pop1 12s linear infinite; }
.p-dump .q2 { animation: pop2 12s linear infinite; }
.p-dump .q3 { animation: pop3 12s linear infinite; }
@keyframes pop1 { 0%, 61.9% { opacity: 0; transform: translate(0, 0); } 62% { opacity: 1; } 64.5% { opacity: 1; transform: translate(calc(var(--px) * 16px), calc(var(--px) * -14px)); } 67% { opacity: 0; transform: translate(calc(var(--px) * 30px), calc(var(--px) * 6px)); } 100% { opacity: 0; } }
@keyframes pop2 { 0%, 62.4% { opacity: 0; transform: translate(0, 0); } 62.5% { opacity: 1; } 65% { opacity: 1; transform: translate(calc(var(--px) * 12px), calc(var(--px) * -18px)); } 67.5% { opacity: 0; transform: translate(calc(var(--px) * 24px), calc(var(--px) * 4px)); } 100% { opacity: 0; } }
@keyframes pop3 { 0%, 62.9% { opacity: 0; transform: translate(0, 0); } 63% { opacity: 1; } 65.5% { opacity: 1; transform: translate(calc(var(--px) * 20px), calc(var(--px) * -12px)); } 68% { opacity: 0; transform: translate(calc(var(--px) * 34px), calc(var(--px) * 8px)); } 100% { opacity: 0; } }

/* F3: a full box, the crew asleep */
.sleeper .zzz {
  position: absolute; inset: auto; right: calc(var(--px) * -6px); top: calc(var(--px) * -4px);
  width: calc(var(--px) * 18px); height: auto;
  animation: zzz 2.4s ease-in-out infinite;
}
.sleeper.s1 { left: calc(var(--tun-l) + var(--px) * 96px); }
.sleeper.s2 { left: calc(var(--tun-l) + var(--px) * 156px); }
.sleeper.s2 .zzz { animation-delay: -1.2s; }
@keyframes zzz { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 30%, 70% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-8px) scale(1.1); } }

/* a vein glinting in the rock face */
.vein { position: absolute; right: calc(var(--px) * 19px); top: 46%; width: calc(var(--px) * 22px); height: calc(var(--px) * 22px); }
.vein > img:not(.vglow):not(.spark) { position: absolute; inset: 0; width: 100%; height: 100%; }
.vein .vglow { position: absolute; left: 50%; top: 50%; width: calc(var(--px) * 64px); transform: translate(-50%, -50%); opacity: .4; mix-blend-mode: screen; filter: hue-rotate(80deg); animation: flicker 2.8s ease-in-out infinite; }
.vein .spark { position: absolute; width: calc(var(--px) * 8px); opacity: 0; animation: glint 2.6s ease-in-out infinite; }
.vein .k1 { left: calc(var(--px) * -4px); top: calc(var(--px) * -5px); }
.vein .k2 { left: calc(var(--px) * 15px); top: calc(var(--px) * 11px); animation-delay: -1.3s; }
@keyframes glint { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }

.deeper {
  position: relative; z-index: 3;
  height: 72px;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 var(--gut);
  background: linear-gradient(to bottom, rgba(22, 16, 14, 0) 0%, var(--bg0) 100%);
}
.depth-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: #241a14; border: 1.5px solid var(--btn-line); color: var(--ink-dim);
  font-size: var(--fs1); font-weight: 700; box-shadow: var(--e1);
}

/* ============================================================================
 * BANDS
 * ========================================================================== */
.band { padding: var(--band-y) 0; position: relative; }
.band.alt { background: var(--bg2); box-shadow: inset 0 1px 0 rgba(255, 214, 160, .05), inset 0 -1px 0 rgba(0, 0, 0, .3); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs0); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.kicker::before { content: ''; width: 22px; height: 3px; background: var(--accent); border-radius: 2px; }
.sec-title { margin-top: 12px; font-size: clamp(38px, 5vw, 66px); color: var(--ink); }
.sec-lede { margin-top: 14px; max-width: 760px; color: var(--ink-dim); font-size: clamp(15.5px, 1.3vw, 18px); line-height: 1.6; }
/* v6.10 "Kapak": what is held back, said on the page that promises "not a
   roadmap". Quieter than the lede above it — it is a footnote to the claim,
   not a competing headline. */
.sec-lede.soon-note {
  margin-top: 8px; font-size: clamp(14px, 1.1vw, 15.5px);
  color: var(--ink-dim); opacity: .8;
  border-left: 2px solid var(--line, rgba(255,255,255,.16)); padding-left: 12px;
}

/* by the numbers -------------------------------------------------------------- */
.numbers { padding: 26px 0 8px; }
.nums { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.nums li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 18px 10px 16px; border-radius: 16px; text-align: center;
  background: var(--panel); border: 1px solid var(--card-line); box-shadow: var(--e1);
  transition: transform .25s var(--ease), border-color .25s;
}
.nums li:hover { transform: translateY(-3px); border-color: rgba(246, 196, 83, .4); }
.nums img { width: 32px; height: 32px; margin-bottom: 6px; }
.nums b { font-size: 54px; color: var(--gold); line-height: .9; }
.nums span { margin-top: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.35; }
.nums .zero b { color: var(--accent); }

/* the chain ------------------------------------------------------------------ */
.chain {
  list-style: none; margin-top: 30px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px;
}
.chain li {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 10px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-line);
  font-family: var(--display); font-size: 25px; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  box-shadow: var(--e1);
}
.chain li img { width: 28px; height: 28px; }
.chain li + li::before { content: '→'; margin-right: 6px; margin-left: 2px; color: var(--accent); font-family: system-ui; font-size: 20px; }
.chain li:nth-child(4) { border-color: rgba(246, 196, 83, .45); color: var(--gold); }
.chain li:nth-child(6) { border-color: rgba(95, 217, 208, .4); }

/* steps ---------------------------------------------------------------------- */
.steps {
  list-style: none; counter-reset: step;
  margin-top: 34px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.step {
  counter-increment: step;
  position: relative;
  padding: 22px 20px 20px 22px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--card-line); box-shadow: var(--e1);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--e2); }
.step::before {
  content: counter(step);
  position: absolute; top: 16px; right: 16px;
  font-family: var(--display); font-size: 30px; color: var(--muted); opacity: .55;
}
.step img { width: 48px; height: 48px; }
.step h3 { margin-top: 12px; font-size: var(--fs3); }
.step p { margin-top: 6px; color: var(--ink-dim); font-size: var(--fs1); line-height: 1.55; }
.idle-note {
  margin-top: 22px;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px; border-radius: 16px;
  background: var(--card); border: 1px dashed var(--card-line);
  color: var(--ink-dim); font-size: var(--fs1); line-height: 1.55;
}
.idle-note .card-sleep { --px: 1.5; position: relative; bottom: auto; flex: none; }

/* ores ------------------------------------------------------------------------ */
.ore-strip {
  list-style: none; margin-top: 30px;
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px;
}
.ore-strip li {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 6px 12px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--card-line); box-shadow: var(--e1);
  font-size: var(--fs0); font-weight: 700; color: var(--ink-dim); text-align: center;
  transition: transform .25s var(--ease);
}
.ore-strip li:hover { transform: translateY(-4px); }
.ore-strip img { width: 56px; height: 56px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); transition: transform .25s var(--ease); }
.ore-strip li:hover img { transform: scale(1.14); }
.ore-strip li:nth-child(n+8) { background: linear-gradient(var(--panel), #1e1526); }
.depth-bar {
  margin-top: 14px; display: flex; align-items: center; gap: 12px;
  font-size: var(--fs0); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.depth-bar i { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(to right, #6b7280, var(--gold) 45%, var(--scrip)); }

/* cards ------------------------------------------------------------------------ */
.cards { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--card-line); box-shadow: var(--e1);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--e2); }
.card-art {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 150px; padding: 18px;
  background: var(--well) radial-gradient(60% 80% at 50% 100%, rgba(255, 150, 60, .12), transparent 70%);
  border-bottom: 1px solid var(--card-line);
}
.card h3 { padding: 16px 20px 0; font-size: var(--fs3); }
.card p { padding: 6px 20px 20px; color: var(--ink-dim); font-size: var(--fs1); line-height: 1.55; }
.card-art.crew { --px: 1.5; gap: 12px; align-items: flex-end; padding-bottom: 28px; }
.card-art.crew .spr { position: relative; bottom: auto; flex: none; }
.card-art.picks { flex-wrap: wrap; gap: 6px 4px; padding: 16px 14px; }
.card-art.picks img { width: 44px; height: 44px; transition: transform .2s var(--ease); }
.card-art.picks img:hover { transform: translateY(-4px) rotate(-8deg); }
.card-art.blds img { width: 92px; height: auto; }
.card-art.crests { gap: 6px; flex-wrap: wrap; }
.card-art.crests img { width: 40px; height: 50px; }
.card-art.art-img { padding: 0; }
.card-art.art-img img { width: 100%; height: auto; }

/* arcade ------------------------------------------------------------------------ */
.games {
  list-style: none; margin-top: 30px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px;
}
.games li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-line);
  font-weight: 700; font-size: var(--fs1); color: var(--ink-dim);
  transition: transform .2s var(--ease), background .2s;
}
.games li:hover { transform: translateY(-2px); background: var(--panel-hi); }
.games img { width: 40px; height: 40px; flex: none; }
.arcade-band { background: linear-gradient(to bottom, var(--bg0), #1a1317); }

/* refuse ----------------------------------------------------------------------- */
.thesis {
  margin-top: 22px;
  font-family: var(--display); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.05; letter-spacing: .02em;
  color: var(--gold-hi);
}
.thesis em { color: var(--accent); font-style: normal; }
.bans { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.bans li {
  padding: 14px 18px 14px 44px; position: relative; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--card-line);
  color: var(--ink-dim); font-size: var(--fs1); line-height: 1.55;
}
.bans li::before {
  content: '✕'; position: absolute; left: 16px; top: 13px;
  color: var(--bad); font-weight: 900; font-size: 15px;
}
.more { margin-top: 18px; }
.more summary { cursor: pointer; color: var(--gold); font-weight: 700; padding: 8px 0; }
.more ol { margin: 8px 0 0 22px; color: var(--muted); font-size: var(--fs1); line-height: 1.6; }

/* token ------------------------------------------------------------------------- */
.token-band { background: radial-gradient(90% 60% at 50% 0%, rgba(95, 217, 208, .07), transparent 70%); }
.token-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tk-card {
  padding: 22px 22px 20px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--card-line); box-shadow: var(--e1);
}
.tk-card h3 { display: flex; align-items: center; gap: 10px; font-size: var(--fs3); }
.tk-card h3 img { width: 26px; height: 26px; }
.tk-card p { margin-top: 10px; color: var(--ink-dim); font-size: var(--fs1); line-height: 1.6; }
.split { display: flex; gap: 3px; margin-top: 16px; height: 12px; border-radius: 6px; overflow: hidden; }
.split i { flex: 0 0 var(--w); }
.split .s1 { background: var(--mine-t); } .split .s2 { background: var(--gold); } .split .s3 { background: var(--accent); }
.split .s4 { background: var(--info); } .split .s5 { background: var(--scrip); } .split .s6 { background: var(--accent-2); }
.tk-card.status { border-color: rgba(255, 143, 58, .35); }
.status-list { list-style: none; margin-top: 12px; }
.status-list li {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs1);
}
.status-list li span { color: var(--muted); }
.status-list li b { text-align: right; color: var(--ink); }
.fine { margin-top: 14px; font-size: var(--fs0); color: var(--muted); line-height: 1.5; }

/* trust ------------------------------------------------------------------------- */
.trust-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tr-item { padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); }
.tr-item img { width: 40px; height: 40px; }
.tr-item h3 { margin-top: 12px; font-size: var(--fs2); }
.tr-item p { margin-top: 6px; color: var(--ink-dim); font-size: var(--fs1); line-height: 1.55; }

/* faq --------------------------------------------------------------------------- */
.qa { border-bottom: 1px solid var(--line); }
.qa:first-of-type { margin-top: 22px; border-top: 1px solid var(--line); }
.qa summary {
  cursor: pointer; list-style: none;
  padding: 16px 40px 16px 0; position: relative;
  font-weight: 700; font-size: var(--fs3); color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '+'; position: absolute; right: 6px; top: 12px;
  font-family: var(--display); font-size: 30px; color: var(--accent);
}
.qa[open] summary::after { content: '–'; }
.qa p { padding: 0 0 18px; color: var(--ink-dim); line-height: 1.6; max-width: 720px; }

/* closer ------------------------------------------------------------------------ */
.closer {
  background:
    radial-gradient(70% 90% at 50% 100%, rgba(255, 150, 60, .16), transparent 70%),
    var(--bg2);
  padding-bottom: calc(var(--band-y) + 20px);
}
.closer .lantern { width: 192px; height: auto; margin: 0 auto; animation: lanternGlow 3s ease-in-out infinite alternate; }
@keyframes lanternGlow { from { filter: drop-shadow(0 0 10px rgba(255, 170, 60, .25)); } to { filter: drop-shadow(0 0 26px rgba(255, 170, 60, .55)); } }
.closer h2 { margin-top: 10px; font-size: clamp(48px, 7vw, 92px); }
.closer p { margin: 14px auto 0; max-width: 560px; color: var(--ink-dim); font-size: var(--fs3); }
.closer .doors { align-items: center; }

/* footer ------------------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 28px; background: var(--bg1); }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 8px; }
.foot-brand .display { font-size: 24px; color: var(--gold); }
.foot-dev { margin-top: 8px; max-width: 520px; color: var(--muted); font-size: var(--fs1); line-height: 1.55; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; }
.foot-links a { color: var(--ink-dim); font-weight: 600; font-size: var(--fs1); }
.foot-fine { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs0); line-height: 1.55; }

/* ============================================================================
 * SIGN-IN DIALOG
 * ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(8, 5, 4, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 18px 20px 16px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--card-line); box-shadow: var(--e3);
  animation: rise .22s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mc-head { display: flex; align-items: center; gap: 10px; }
.mc-head h2 { font-size: 34px; color: var(--gold-hi); flex: 1; }
.mc-lede { margin-top: 8px; color: var(--ink-dim); font-size: var(--fs1); line-height: 1.55; }
.mc-tabs { display: flex; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); }
.mc-tab { flex: 1; padding: 9px 12px; border-radius: 9px; font-weight: 700; font-size: var(--fs1); color: var(--muted); }
.mc-tab.is-on { background: var(--panel-hi); color: var(--ink); box-shadow: var(--e1); }
.mc-pane { margin-top: 14px; }
.wallets { list-style: none; display: grid; gap: 8px; }
.wallets .wp-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--btn-bg); border: 1.5px solid var(--btn-line); color: var(--ink);
  font-weight: 700; box-shadow: var(--e1); text-align: left;
}
.wallets .wp-row:hover { filter: brightness(1.08); text-decoration: none; }
.wallets .wp-row:disabled { opacity: .5; }
.wr-tag { font-size: var(--fs0); font-weight: 700; color: var(--muted); }
.wr-tag.ok { color: var(--good); }
.mc-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; color: var(--muted); font-size: var(--fs0); line-height: 1.5; }
.mc-note img { margin-top: 3px; flex: none; }
.eform label { display: block; font-size: var(--fs0); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eform-row { display: flex; gap: 8px; margin-top: 6px; }
.eform input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--bg1); border: 1.5px solid var(--line); color: var(--ink);
}
.eform input:focus { border-color: var(--gold); outline: none; }
#codeIn { font-family: var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.eform .linkish { margin-top: 8px; }
.mc-msg { min-height: 20px; margin-top: 12px; font-size: var(--fs1); color: var(--ink-dim); }
.mc-msg.is-bad { color: var(--bad); }
.mc-msg.is-good { color: var(--good); }
.mc-msg.is-warn { color: var(--gold); }
.mc-msg .btn { margin-top: 8px; }
.mc-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs0); }
body.modal-open { overflow: hidden; }

/* ============================================================================
 * RESPONSIVE
 * ========================================================================== */
@media (min-width: 1024px) {
  h1 { white-space: nowrap; }
}
@media (max-width: 1099px) {
  :root { --wh-x: 78%; }
  .surface .stall { display: none; }
  .forge { left: 42%; }
}
@media (max-width: 1023px) {
  .nav { display: none; }
  .steps, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ore-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  :root { --px: 1.5; --shaft-x: 14px; --wh-x: 82%; }
  .brand-name { font-size: 24px; }
  h1 { font-size: clamp(56px, 17vw, 84px); letter-spacing: .02em; }
  .lede { font-size: 16px; }
  .play, .demo { min-width: min(320px, 100%); width: 100%; }
  .play { height: 76px; }
  .play .display { font-size: 42px; }
  .official { padding: 12px 12px 10px; }
  .of-status { margin-left: 0; }
  .forge { left: 44%; }
  .surface .flag { display: none; }
  .steps, .cards, .token-grid, .trust-grid { grid-template-columns: 1fr; }
  .chain li { font-size: 21px; padding: 6px 10px 6px 8px; }
  .chain li img { width: 22px; height: 22px; }
  .walker, .canary, .f2 .digger, .motes { display: none; }
  .lamp { left: 62%; }
  .f3 .lamp { left: 48%; }
  .sleeper.s1 { left: calc(var(--tun-l) + var(--px) * 74px); }
  .sleeper.s2 { display: none; }
  .nums b { font-size: 44px; }
  .closer h2 { font-size: 56px; }
  .foot-grid { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .stars, .sun, .cabin, .cable, .wheel, .smoke, .fire, .coin, .plus, .inbound, .motes i,
  .walker, .cycle, .pose, .fr, .hit img, .pop, .lamp img, .arrow, .box .ore, .box .star, .arrow-wrap,
  .zzz, .spark, .vglow, .play, .play::after, .lantern, .hero-copy > * { animation: none !important; }
  .cycle .pose { opacity: 0; } .cycle .p-dig { opacity: 1; }
  .tog > .fr:nth-child(2) { opacity: 0; }
  .box.filling .arrow-wrap { opacity: 1; }
  .cabin .load { opacity: 1; }
  html.js .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
