/* Bluzo brand tokens, taken from bluzo.live */
:root {
  --ink: #02122e;
  --ink-2: #3c5170;
  --ink-3: #6d819c;
  --snow: #f6f9fd;
  --white: #ffffff;
  --shade: #dde7f3;
  --track: #c9d8ea;
  --bluzo: #1287f7;
  --bluzo-deep: #0262d1;
  --bluzo-ice: #94cff3;
  --rim: #31bdf9;
  --navy: #033a86;
  --gold: #e6a03c;
  --gold-light: #fad26c;
  --gold-ink: #a3580d;
  --coral: #fd837e;
  --mint: #22c58b;
  --alert: #e2552b;
  --sky-top: #3aa8ff;
  --sky-mid: #8fd3ff;
  --sky-low: #ffe2a1;
  --shadow: 0 6px 0 0 rgba(3, 58, 134, .12);
  --shadow-pop: 0 10px 30px rgba(3, 58, 134, .18);
  --r: 20px;
  --font-display: "Tilt Warp", "Arial Black", system-ui, sans-serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--snow);
  color: var(--ink);
  font: 15px/1.45 var(--font-text);
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { -webkit-user-drag: none; }
svg { fill: currentColor; }
input {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--shade);
  background: var(--snow); color: var(--ink); font: 15px var(--font-text); user-select: text; -webkit-user-select: text;
  outline: none; transition: border-color .2s;
}
input:focus { border-color: var(--bluzo); background: var(--white); }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.3px; margin: 0; }
h1 { font-size: 28px; line-height: 1.1; }
h2 { font-size: 20px; }
.mt { margin-top: 10px; }
.wide { width: 100%; }
.grow { flex: 1; }
.fine { color: var(--ink-3); font-size: 11.5px; margin: 14px 4px 0; line-height: 1.5; }
.hint { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.eyebrow { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .8px; }
.eyebrow.light { color: rgba(255, 255, 255, .8); }
.mono { font-family: var(--font-mono); font-size: 13px; }
.stat { font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.stat small { font-family: var(--font-text); font-size: 12px; color: var(--ink-3); font-weight: 600; margin-left: 6px; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: var(--sky-mid); }
.splash-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; }
.splash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 58, 134, 0) 30%, rgba(3, 58, 134, .85) 100%); }
.splash-inner { position: absolute; inset: auto 0 0 0; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 24px 24px calc(48px + env(safe-area-inset-bottom)); }
.splash-dog { width: 46vw; max-width: 200px; animation: hop 1.1s ease-in-out infinite; filter: drop-shadow(0 0 24px rgba(49, 189, 249, .7)) drop-shadow(0 14px 18px rgba(2, 18, 46, .5)); }
.splash p { color: var(--white) !important; }
.splash-title { font-family: var(--font-display); font-size: 44px; color: var(--white); text-shadow: 0 4px 0 var(--navy); margin-top: 8px; letter-spacing: 2px; }
.splash-bar { width: 200px; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .6); margin-top: 18px; overflow: hidden; }
.splash-bar div { height: 100%; width: 40%; border-radius: 99px; background: linear-gradient(90deg, var(--bluzo), var(--rim)); animation: load 1.2s ease-in-out infinite; }
.splash p { color: var(--navy); font-weight: 700; margin-top: 10px; }
@keyframes hop { 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- layout ---------- */
#app { position: relative; max-width: 520px; margin: 0 auto; padding: 10px 16px calc(96px + env(safe-area-inset-bottom)); min-height: 100vh; }
.sky {
  position: fixed; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-low) 74%, var(--snow) 90%);
}
.sun { position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -40px; top: 120px; background: radial-gradient(circle, #fff6c8 0%, #ffd56b 45%, rgba(255, 213, 107, 0) 70%); opacity: .85; }
.snowfall { position: absolute; inset: -40px 0 0; background-image: radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%), radial-gradient(3px 3px at 80px 120px, #fff 50%, transparent 51%), radial-gradient(2px 2px at 150px 60px, #fff 50%, transparent 51%), radial-gradient(2.5px 2.5px at 230px 160px, #fff 50%, transparent 51%), radial-gradient(2px 2px at 300px 90px, #fff 50%, transparent 51%); background-size: 340px 200px; animation: snow 9s linear infinite; opacity: .8; }
@keyframes snow { to { transform: translateY(200px); } }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--white) center/cover; border: 3px solid var(--white); box-shadow: 0 3px 0 rgba(3, 58, 134, .2); display: grid; place-content: center; font-family: var(--font-display); color: var(--bluzo); font-size: 18px; }
.who-text { min-width: 0; }
.name { font-weight: 700; color: var(--white); text-shadow: 0 1px 2px rgba(3, 58, 134, .4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; padding: 2px 10px 2px 4px; border-radius: 99px; background: var(--white); font-size: 12px; font-weight: 700; box-shadow: 0 2px 0 rgba(3, 58, 134, .15); }
.tag-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tier, var(--bluzo)); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2), inset 0 2px 0 rgba(255, 255, 255, .5); }
.top-actions { display: flex; gap: 8px; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--bluzo-deep); display: grid; place-content: center; box-shadow: 0 3px 0 rgba(3, 58, 134, .18); font-weight: 700; transition: transform .1s; }
.round-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(3, 58, 134, .18); }
.round-btn svg { width: 20px; height: 20px; }

/* ---------- balance ---------- */
.balance-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.coin-icon { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 4px 0 rgba(163, 88, 13, .35); }
.coin-icon.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.25) rotate(-10deg); } }
.balance { font-family: var(--font-display); font-size: 46px; color: var(--white); line-height: 1; text-shadow: 0 4px 0 var(--navy), 0 8px 24px rgba(3, 58, 134, .35); font-variant-numeric: tabular-nums; }
.tier-line { margin: 12px auto 0; max-width: 300px; text-align: center; }
.tier-track { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .55); overflow: hidden; box-shadow: inset 0 2px 0 rgba(3, 58, 134, .12); }
.tier-track div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold-light), var(--gold)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.tier-next { margin-top: 5px; font-size: 12.5px; font-weight: 700; color: var(--navy); }

/* ---------- stage / hero ---------- */
.stage { position: relative; height: 330px; margin-top: 4px; }
.hill { position: absolute; left: -16px; right: -16px; bottom: 0; height: 110px; background: radial-gradient(120% 100% at 50% 100%, var(--white) 60%, #eaf4fd 75%, rgba(234, 244, 253, 0) 76%); }
/* the round Bluzo Game logo is the coin you tap */
.hero { position: absolute; left: 50%; top: 46px; width: min(72vw, 270px); aspect-ratio: 1; transform: translateX(-50%); touch-action: manipulation; border-radius: 50%; perspective: 600px; animation: float 4s ease-in-out infinite; }
.hero img { position: relative; width: 100%; height: 100%; border-radius: 50%; transition: transform .14s cubic-bezier(.3, 1.6, .5, 1); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); filter: drop-shadow(0 0 22px rgba(49, 189, 249, .55)) drop-shadow(0 16px 14px rgba(3, 58, 134, .35)); pointer-events: none; }
.hero.squish img { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(.94); }
.hero-glow { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .9) 0%, rgba(148, 207, 243, .55) 38%, rgba(148, 207, 243, 0) 68%); animation: breathe 3s ease-in-out infinite; }
.hero.tired img { filter: grayscale(.7) brightness(.9) drop-shadow(0 16px 14px rgba(3, 58, 134, .3)); }
@keyframes float { 50% { transform: translate(-50%, -8px); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .8; } }
.float-num { position: fixed; z-index: 60; pointer-events: none; font-family: var(--font-display); font-size: 30px; color: var(--white); -webkit-text-stroke: 1.5px var(--bluzo-deep); text-shadow: 0 3px 0 var(--navy); animation: floatUp .9s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -10px) scale(1.1); opacity: 1; } 100% { transform: translate(-50%, -120px) scale(.9); opacity: 0; } }

.boost-pill { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap; padding: 7px 14px; border-radius: 99px; background: linear-gradient(90deg, #ff7a45, var(--gold), #ff7a45); background-size: 200% 100%; animation: shine 3s linear infinite; color: var(--white); font-weight: 800; font-size: 13px; box-shadow: 0 4px 0 var(--gold-ink); text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
@keyframes shine { to { background-position: 200% 0; } }

.golden-bone { position: absolute; z-index: 5; width: 74px; height: 34px; top: 30px; left: -80px; color: var(--gold-light); filter: drop-shadow(0 0 10px #fff3b0) drop-shadow(0 4px 0 var(--gold-ink)); animation: boneFly 8s linear forwards; }
.golden-bone svg { width: 100%; height: 100%; animation: boneSpin 1.2s ease-in-out infinite; }
@keyframes boneFly { 0% { left: -80px; top: 60px; } 25% { top: 20px; } 50% { top: 90px; } 75% { top: 30px; } 100% { left: calc(100% + 80px); top: 70px; } }
@keyframes boneSpin { 50% { transform: rotate(-18deg) scale(1.1); } }

/* ---------- dig map ---------- */
.map-card { position: relative; margin-top: 12px; padding: 12px 10px 10px; border-radius: 28px; color: var(--white); background: linear-gradient(180deg, #0b2a55, #061a36); box-shadow: 0 7px 0 #021a3a, var(--shadow-pop); }
.map-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 2px 6px 10px; }
.map-title { font-family: var(--font-display); font-size: 30px; line-height: 1; white-space: nowrap; }
.map-title small { font-size: 15px; margin: 0 6px 0 2px; opacity: .8; }
.map-title .layer-chip { font-family: var(--font-text); vertical-align: 5px; margin: 0; }
.layer-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .9); color: var(--navy); }
.map-sub { margin-top: 6px; font-size: 12px; font-weight: 700; opacity: .75; }
.map-pills { display: flex; gap: 6px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .13); font-size: 13px; font-weight: 800; }
.map-card .boost-pill { position: static; display: block; transform: none; margin: 0 6px 8px; text-align: center; }

.map-scroll { position: relative; height: min(56vh, 440px); overflow-x: hidden; overflow-y: auto; border-radius: 18px; background: #120d08; overscroll-behavior: contain; scrollbar-width: none; }
.map-scroll::-webkit-scrollbar { display: none; }
.map-surface { height: 44px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #8fd3ff, #e8f6ff); color: var(--navy); font-size: 12px; font-weight: 800; border-bottom: 3px solid #fff; }
.map-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 3px; }
.layer-band { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin: 5px 0 2px; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .1); }
.layer-band b { color: var(--gold-light); }

.tile {
  position: relative; aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-size: clamp(15px, 4.6vw, 23px); line-height: 1;
  background: var(--t-bg); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .25);
  touch-action: manipulation; transition: filter .25s, transform .06s;
}
.tile.l-snow { --t-bg: linear-gradient(145deg, #ffffff, #cfe6f8); --t-dug: #6f97b6; }
.tile.l-ice { --t-bg: linear-gradient(145deg, #c8f1ff, #4cb8e8); --t-dug: #1f5f86; }
.tile.l-soil { --t-bg: linear-gradient(145deg, #b98d63, #6e4a2e); --t-dug: #2e1d10; }
.tile.l-rock { --t-bg: linear-gradient(145deg, #aab4c1, #5c6675); --t-dug: #1f252d; }
.tile.l-crystal { --t-bg: linear-gradient(145deg, #e6c8ff, #7c3fd0); --t-dug: #1d0a45; }
.tile.l-gold { --t-bg: linear-gradient(145deg, #ffe9a0, #c98420); --t-dug: #2a1702; }
.tile.boulder { --t-bg: radial-gradient(circle at 35% 30%, #c9cfd6, #6b737e 60%, #3d434b); }
.tile.far { filter: brightness(.42) saturate(.7); }
.tile.can { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -2px; animation: canPulse 1.6s ease-in-out infinite; }
@keyframes canPulse { 50% { outline-color: rgba(250, 210, 108, 1); } }
.tile.dug { background: var(--t-dug); box-shadow: inset 0 4px 9px rgba(0, 0, 0, .6); filter: none; outline: none; animation: none; }
.tile .ico { pointer-events: none; }
.tile.dug .ico.got { opacity: .32; font-size: .78em; }
.tile.chest-ready .ico { animation: wiggle 1.2s ease-in-out infinite; filter: drop-shadow(0 0 7px #ffd56b); }
.tile.pending .ico { animation: pulse .6s infinite; }
.tile.hit { transform: scale(.88); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23000' stroke-opacity='.6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M20 20 15 11 17 5M20 20l7-4 6 1M20 20l-8 4-6-2M20 20l2 9-1 6M15 11 9 10M27 16l3-7M12 24l-2 8M22 29l7 3'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.tile[data-crack="1"]::after { opacity: .35; }
.tile[data-crack="2"]::after { opacity: .65; }
.tile[data-crack="3"]::after { opacity: .95; }
.tile.dug::after { opacity: 0; }
.tile.shake { animation: tileShake .3s; }
@keyframes tileShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.digger { position: absolute; left: 50%; top: 5px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; z-index: 3; pointer-events: none; transition: left .3s, top .3s; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }
.pick { position: absolute; z-index: 4; font-size: 26px; pointer-events: none; opacity: 0; transform-origin: 80% 80%; }
.pick.swing { animation: pickSwing .2s ease-out; }
@keyframes pickSwing { 0% { opacity: 1; transform: rotate(30deg); } 60% { opacity: 1; transform: rotate(-42deg) translate(-4px, 6px); } 100% { opacity: 0; transform: rotate(10deg); } }
.map-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; padding: 9px 6px 2px; font-size: 11px; font-weight: 700; opacity: .85; }

.find-pop { position: absolute; left: 50%; top: 42%; z-index: 6; transform: translateX(-50%); padding: 12px 18px; border-radius: 20px; background: var(--white); color: var(--ink); text-align: center; white-space: nowrap; box-shadow: 0 8px 0 var(--track), 0 20px 40px rgba(0, 0, 0, .35); animation: findIn 1.8s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.find-pop .find-ico { font-size: 40px; line-height: 1; }
.find-pop b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.find-pop span { font-weight: 800; color: var(--gold-ink); }
@keyframes findIn { 0% { transform: translate(-50%, 30px) scale(.5); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.08); opacity: 1; } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -40px); opacity: 0; } }
.map-card .golden-bone { top: 70px; }
.wide-card { width: 100%; margin-top: 14px; min-height: 96px; }

/* ---------- sled tab ---------- */
.sled-hero { position: relative; height: 290px; margin-top: 10px; border-radius: 28px; overflow: hidden; box-shadow: 0 7px 0 #022a63, var(--shadow-pop); }
.sled-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.sled-hero::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(2, 18, 46, .85)); }
.sled-hero-text { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: var(--white); }
.sled-hero-text p { margin: 4px 0 0; font-weight: 700; }
.pack-stats.sled-stats { margin-top: 14px; }
.big-cta { min-height: 62px; font-size: 21px; }
.howto { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-weight: 600; line-height: 1.75; }
.nav-emoji { display: block; height: 24px; font-size: 20px; line-height: 24px; }

/* ---------- meters ---------- */
.energy-row { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.energy-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 16px; }
.energy-label svg { width: 18px; height: 18px; color: var(--gold); }
.per-tap { font-size: 12.5px; font-weight: 700; color: var(--bluzo-deep); background: var(--white); padding: 3px 10px; border-radius: 99px; box-shadow: var(--shadow); }
.meter { height: 16px; border-radius: 99px; background: var(--shade); margin-top: 8px; overflow: hidden; box-shadow: inset 0 2px 0 rgba(3, 58, 134, .1); }
.meter div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(180deg, #5fd0ff, var(--bluzo)); box-shadow: inset 0 -3px 0 rgba(2, 98, 209, .5), inset 0 3px 0 rgba(255, 255, 255, .45); transition: width .25s; }
.meter.thin { height: 10px; margin: 12px 0 0; }
.meter.thin div { background: linear-gradient(90deg, var(--gold-light), var(--gold)); box-shadow: none; }

/* ---------- cards ---------- */
.card { background: var(--white); border-radius: var(--r); padding: 16px; margin-top: 14px; box-shadow: var(--shadow); border: 2px solid #edf3fa; }
.card.mini { margin-top: 0; padding: 12px 14px; }
.mining-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.section-title { margin: 24px 2px 0; }
.page-head { padding: 12px 4px 8px; color: var(--white); text-shadow: 0 2px 0 rgba(3, 58, 134, .35); }
.page-head p { margin: 6px 0 0; font-weight: 600; opacity: .95; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 50px; padding: 10px 18px; border-radius: 16px; font-family: var(--font-display); font-size: 17px; line-height: 1.1;
  transition: transform .08s, box-shadow .08s, filter .2s; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(4px); }
.btn:disabled { filter: grayscale(.8) opacity(.55); cursor: default; }
.btn-blue { background: linear-gradient(180deg, #34a3ff, var(--bluzo)); color: var(--white); box-shadow: 0 5px 0 var(--bluzo-deep); text-shadow: 0 2px 0 rgba(2, 98, 209, .6); }
.btn-blue:active:not(:disabled) { box-shadow: 0 1px 0 var(--bluzo-deep); }
.btn-gold { background: linear-gradient(180deg, #ffe08a, var(--gold)); color: var(--ink); box-shadow: 0 5px 0 var(--gold-ink); }
.btn-gold:active:not(:disabled) { box-shadow: 0 1px 0 var(--gold-ink); }
.btn-ghost { background: var(--white); color: var(--bluzo-deep); box-shadow: 0 5px 0 var(--track); border: 2px solid var(--shade); }
.btn-ghost:active:not(:disabled) { box-shadow: 0 1px 0 var(--track); }
.btn-sub { font-family: var(--font-text); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; opacity: .75; }
.btn .coin-mini { width: 18px; height: 18px; border-radius: 50%; vertical-align: -3px; margin-right: 4px; }
.row-btns { display: flex; gap: 10px; margin-top: 16px; }
.dot-alert { position: absolute; top: 6px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--alert); border: 2px solid var(--white); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.3); } }

/* ---------- quick cards ---------- */
.quick { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; margin-top: 14px; }
.quick-card { position: relative; overflow: hidden; border-radius: var(--r); min-height: 120px; text-align: left; box-shadow: var(--shadow); transition: transform .1s; }
.quick-card:active { transform: scale(.97); }
.quick-text { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; }
.quick-text b { font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.quick-text span { font-size: 12px; font-weight: 700; }
.sled-card { background: var(--white); }
.sled-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 38%; }
.sled-card .quick-text { color: var(--white); text-shadow: 0 2px 4px rgba(2, 18, 46, .6); }
.sled-card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(3, 58, 134, .85)); }
.sled-card .quick-text { z-index: 1; }
.daily-card { background: linear-gradient(160deg, #ffe08a, var(--gold)); color: var(--ink); box-shadow: 0 6px 0 var(--gold-ink); }
.daily-bone { position: absolute; width: 90px; height: 40px; top: 18px; right: -8px; color: var(--white); transform: rotate(-20deg); filter: drop-shadow(0 4px 0 rgba(163, 88, 13, .35)); }

/* ---------- upgrades ---------- */
.mini-balance { display: inline-flex; align-items: center; gap: 8px; background: var(--white); padding: 6px 14px 6px 6px; border-radius: 99px; font-family: var(--font-display); font-size: 18px; box-shadow: var(--shadow); margin: 4px 4px 0; }
.mini-balance img { width: 28px; height: 28px; border-radius: 50%; }
.upg { display: flex; align-items: center; gap: 14px; background: var(--white); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); border: 2px solid #edf3fa; }
.upg-ico { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-content: center; font-size: 28px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), inset 0 3px 0 rgba(255, 255, 255, .35); }
.upg-body { flex: 1; min-width: 0; }
.upg-title { font-family: var(--font-display); font-size: 17px; }
.upg-desc { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.pips { display: flex; gap: 3px; margin-top: 7px; }
.pips i { flex: 1; height: 6px; border-radius: 3px; background: var(--shade); }
.pips i.on { background: var(--bluzo); }
.upg .btn { min-width: 92px; min-height: 48px; font-size: 15px; padding: 8px 12px; }
.lvl { font-family: var(--font-text); font-size: 11px; font-weight: 800; color: var(--bluzo-deep); background: #e3f0fe; padding: 1px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }

/* ---------- shop ---------- */
.shop-hero { position: relative; margin: 10px 0 0; height: 260px; overflow: hidden; border-radius: 28px; box-shadow: 0 7px 0 #022a63, var(--shadow-pop); }
.shop-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.shop-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 18, 46, 0) 45%, rgba(2, 18, 46, .85) 100%); }
.shop-hero-text { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: var(--white); text-shadow: 0 2px 8px rgba(2, 18, 46, .6); }
.shop-hero-text p { margin: 4px 0 0; font-weight: 600; }
.ton-connect { display: flex; justify-content: center; margin-top: 14px; min-height: 0; }
.pkg { position: relative; border-radius: 24px; padding: 18px 16px 16px; color: var(--ink); overflow: hidden; box-shadow: 0 7px 0 var(--edge), var(--shadow-pop); background: var(--metal); }
.pkg::before { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.pkg-badge { position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 99px; background: var(--ink); color: var(--gold-light); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.pkg-name { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; opacity: .75; }
.pkg-pts { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 34px; line-height: 1.1; margin-top: 2px; }
.pkg-pts img { width: 34px; height: 34px; border-radius: 50%; }
.perks { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 5px; font-weight: 700; font-size: 13.5px; }
.perks li::before { content: "✓"; display: inline-grid; place-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .7); color: var(--ink); font-size: 11px; margin-right: 8px; }
.pkg .row-btns { margin-top: 0; }
.pkg .btn { flex: 1; font-size: 16px; }
.pkg-starter { --metal: linear-gradient(150deg, #8fd3ff, var(--bluzo)); --edge: var(--bluzo-deep); }
.pkg-runner { --metal: linear-gradient(150deg, #f5c08f, #c47a3a); --edge: #8a4a17; }
.pkg-sled { --metal: linear-gradient(150deg, #f2f6fb, #a9b9cc); --edge: #6d819c; }
.pkg-leader { --metal: linear-gradient(150deg, #fff0a8, var(--gold)); --edge: var(--gold-ink); }
.pkg-summit { --metal: linear-gradient(150deg, #d9fbff, #7fd6e8 50%, #c7b8ff); --edge: #4d8fb0; }

/* ---------- earn ---------- */
.daily-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0 14px; }
.day { position: relative; border-radius: 12px; padding: 8px 0 6px; text-align: center; background: var(--snow); border: 2px solid var(--shade); font-size: 10px; font-weight: 800; color: var(--ink-3); }
.day svg { display: block; width: 30px; height: 14px; margin: 4px auto; color: var(--track); }
.day b { display: block; font-size: 11px; color: var(--ink); }
.day.got { background: #e3f0fe; border-color: var(--bluzo); }
.day.got svg { color: var(--bluzo); }
.day.today { background: #fff5d6; border-color: var(--gold); animation: wiggle 1.6s ease-in-out infinite; }
.day.today svg { color: var(--gold); }
.day.big { grid-column: span 1; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-4deg); } 20% { transform: rotate(4deg); } 30% { transform: rotate(0); } }
.task { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); border: 2px solid #edf3fa; }
.task-ico { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-content: center; font-size: 22px; color: var(--white); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.task-ico.fb { font-family: var(--font-display); font-size: 26px; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 700; }
.task-reward { display: flex; align-items: center; gap: 4px; font-weight: 800; color: var(--gold-ink); font-size: 13px; }
.task-reward img { width: 16px; height: 16px; border-radius: 50%; }
.task .btn { min-height: 42px; font-size: 14px; padding: 6px 14px; }
.task.done { opacity: .6; }
.task.done .check { width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--white); display: grid; place-content: center; font-weight: 900; }

/* ---------- pack ---------- */
.pack-hero { display: flex; align-items: flex-end; gap: 6px; margin: 4px -4px 0; color: var(--white); text-shadow: 0 2px 0 rgba(3, 58, 134, .35); }
.pack-hero { align-items: center; }
.pack-hero img { width: 110px; flex: none; margin-right: 8px; filter: drop-shadow(0 0 14px rgba(49, 189, 249, .5)) drop-shadow(0 8px 8px rgba(3, 58, 134, .25)); }
.pack-hero h1 { font-size: 24px; }
.pack-hero p { margin: 6px 0 10px; font-size: 13px; font-weight: 600; }
.pack-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.invite-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.invite-perks div { background: var(--white); border-radius: 16px; padding: 10px 6px; text-align: center; box-shadow: var(--shadow); }
.invite-perks b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--bluzo-deep); }
.invite-perks span { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.friend { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.friend-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; font-family: var(--font-display); color: var(--white); flex: none; }
.friend-body { flex: 1; min-width: 0; }
.friend-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-sub { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.friend-earn { font-family: var(--font-display); color: var(--mint); }
.empty { text-align: center; padding: 22px 16px; color: var(--ink-3); font-weight: 600; background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); }
.empty img { width: 90px; display: block; margin: 0 auto 8px; opacity: .9; }

/* ---------- wallet ---------- */
.mint-tag { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 18px; border-radius: 24px; color: var(--white); background: linear-gradient(135deg, var(--bluzo), var(--navy)); box-shadow: 0 7px 0 #022a63, var(--shadow-pop); }
.mint-ring { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--white); padding: 3px; }
.mint-ring img { width: 100%; height: 100%; border-radius: 50%; }
.mint-tag .mono { font-size: 18px; font-weight: 600; margin: 2px 0 6px; }
.conv { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.conv.on { background: var(--mint); }
.conv.off { background: rgba(255, 255, 255, .2); }
.input-row { display: flex; gap: 8px; margin-top: 8px; }
.input-row .btn { min-height: 50px; font-size: 14px; }
.wd { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.wd-body { flex: 1; }
.wd-amt { font-family: var(--font-display); font-size: 17px; }
.wd-sub { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.status { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; text-decoration: none; }
.status.pending { background: #fff5d6; color: var(--gold-ink); }
.status.sent { background: #dcf8ec; color: #0f7a53; }
.status.rejected { background: #ffe7df; color: var(--alert); }

/* ---------- nav ---------- */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 10;
  width: calc(100% - 20px); max-width: 500px; display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 6px; border-radius: 24px; background: rgba(255, 255, 255, .96); box-shadow: 0 6px 0 rgba(3, 58, 134, .12), 0 12px 30px rgba(3, 58, 134, .2);
  backdrop-filter: blur(12px);
}
.nav button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; font-size: 10.5px; font-weight: 800; color: var(--ink-3); transition: color .2s; }
.nav button svg { width: 24px; height: 24px; transition: transform .2s; }
.nav button.active { color: var(--white); }
.nav button.active svg { transform: translateY(-1px) scale(1.08); }
.nav .dot-alert { top: 3px; right: 18%; }
.nav-pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 6); border-radius: 18px; background: linear-gradient(180deg, #34a3ff, var(--bluzo)); box-shadow: 0 3px 0 var(--bluzo-deep); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }

/* ---------- modal & sheet ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(2, 18, 46, .55); backdrop-filter: blur(4px); animation: fade .2s; }
.modal-card { position: relative; width: 100%; max-width: 380px; background: var(--white); border-radius: 28px; padding: 22px 20px 20px; text-align: center; box-shadow: 0 8px 0 var(--track), 0 30px 60px rgba(2, 18, 46, .35); animation: pop .35s cubic-bezier(.3, 1.5, .5, 1); }
.modal-card .art { width: 160px; margin: -80px auto 4px; display: block; filter: drop-shadow(0 10px 10px rgba(3, 58, 134, .25)); }
.modal-card .art-wide { width: calc(100% + 40px); margin: -22px -20px 12px; border-radius: 28px 28px 0 0; height: 170px; object-fit: cover; display: block; }
.modal-card h2 { font-size: 24px; }
.modal-card p { color: var(--ink-2); font-weight: 600; margin: 8px 0 16px; }
.modal-amount { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-size: 38px; color: var(--bluzo-deep); margin: 6px 0 14px; }
.modal-amount img { width: 38px; height: 38px; border-radius: 50%; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--shade); transition: width .3s; }
.dots i.on { width: 24px; background: var(--bluzo); }
.tier-big { display: inline-grid; place-content: center; width: 120px; height: 120px; margin: -76px auto 6px; border-radius: 50%; background: var(--tier); border: 6px solid var(--white); box-shadow: 0 6px 0 rgba(0, 0, 0, .15), inset 0 -8px 0 rgba(0, 0, 0, .15), inset 0 8px 0 rgba(255, 255, 255, .4); }
.tier-big img { width: 84px; height: 84px; border-radius: 50%; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; background: rgba(2, 18, 46, .5); animation: fade .2s; }
.sheet-body { width: 100%; max-width: 520px; margin: 0 auto; max-height: 86vh; overflow: auto; background: var(--snow); border-radius: 28px 28px 0 0; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .3s cubic-bezier(.2, .9, .3, 1); }
@keyframes up { from { transform: translateY(100%); } }
.sheet-grab { width: 44px; height: 5px; border-radius: 9px; background: var(--track); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head .round-btn { background: var(--white); }
.my-rank { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, var(--bluzo), var(--navy)); color: var(--white); font-weight: 700; }
.lb { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.lb.me { outline: 3px solid var(--gold); }
.lb-rank { width: 30px; text-align: center; font-family: var(--font-display); color: var(--ink-3); font-size: 16px; }
.lb-rank.top { font-size: 22px; }
.lb-name { font-weight: 700; }
.lb-tier { font-size: 11.5px; font-weight: 700; }
.lb-score { margin-left: auto; font-family: var(--font-display); }

/* ---------- sled ---------- */
.sled { position: fixed; inset: 0; z-index: 50; background: #fbfdff; touch-action: none; }
.sled canvas { width: 100%; height: 100%; display: block; }
.sled-hud { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.sled-hud .round-btn { pointer-events: auto; }
.sled-score { display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 10px; border-radius: 99px; background: var(--white); font-family: var(--font-display); font-size: 26px; color: var(--navy); box-shadow: 0 4px 0 rgba(3, 58, 134, .18); }
.sled-score svg { width: 24px; height: 24px; color: var(--bluzo); }
.sled-hint { position: absolute; left: 0; right: 0; bottom: calc(30px + env(safe-area-inset-bottom)); text-align: center; font-weight: 800; color: var(--navy); opacity: .7; pointer-events: none; animation: fadeOut 1s 3.5s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.sled-over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; background: var(--sky-mid); animation: fade .25s; }
.sled-over img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.sled-over-card { position: relative; margin: 16px; padding: 20px; border-radius: 28px; background: var(--white); text-align: center; box-shadow: 0 8px 0 var(--track), 0 20px 50px rgba(2, 18, 46, .3); animation: pop .35s cubic-bezier(.3, 1.5, .5, 1); margin-bottom: calc(20px + env(safe-area-inset-bottom)); }
.sled-big { font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--navy); margin: 4px 0; }
.sled-reward { font-weight: 800; color: var(--gold-ink); margin-bottom: 16px; }

/* ---------- effects ---------- */
.fx { position: fixed; inset: 0; z-index: 80; pointer-events: none; width: 100%; height: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--white); font-weight: 700; font-size: 14px; text-align: center; box-shadow: 0 10px 30px rgba(2, 18, 46, .3); animation: toastIn .3s cubic-bezier(.3, 1.4, .5, 1); }
.toast.good { background: #0f9a68; }
.toast.bad { background: var(--alert); }
@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .golden-bone { animation-duration: 8s !important; }
}

/* ---------- UX polish ---------- */
.map-energy { display: flex; align-items: center; gap: 8px; margin: 0 6px 10px; }
.me-bolt { font-size: 16px; }
.me-bar { flex: 1; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .25); }
.me-bar div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ffd56b, #ff9f43); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15), inset 0 2px 0 rgba(255, 255, 255, .4); transition: width .25s; }
.me-bar.low div { background: linear-gradient(90deg, #ff7a6b, #e2552b); }
.me-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 58px; font-size: 14px; font-weight: 800; line-height: 1.05; }
.me-text small { font-size: 10px; font-weight: 700; opacity: .7; }
.me-power { padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 800; white-space: nowrap; }

.tile { -webkit-touch-callout: none; }
.tile.holding { transform: scale(.9); }
.dig-hint { position: absolute; left: 50%; top: 104px; z-index: 5; transform: translateX(-50%); padding: 10px 14px; border-radius: 16px; background: var(--white); color: var(--ink); font-weight: 800; font-size: 14px; text-align: center; white-space: nowrap; box-shadow: 0 6px 0 var(--track), 0 12px 24px rgba(0, 0, 0, .35); pointer-events: none; animation: hintBob 1.2s ease-in-out infinite; }
.dig-hint small { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); margin-top: 2px; }
.dig-hint::before { content: ""; position: absolute; left: 50%; top: -8px; margin-left: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: var(--white); }
@keyframes hintBob { 50% { transform: translate(-50%, 6px); } }
.to-tunnel { position: absolute; right: 22px; bottom: 50px; z-index: 5; padding: 9px 14px; border-radius: 99px; background: var(--gold-light); color: var(--ink); font-weight: 800; font-size: 13px; box-shadow: 0 4px 0 var(--gold-ink), 0 8px 18px rgba(0, 0, 0, .35); animation: toastIn .3s; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px; padding: 4px; border-radius: 14px; background: var(--shade); }
.seg button { padding: 9px 0; border-radius: 11px; font-weight: 800; font-size: 13px; color: var(--ink-3); }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: 0 2px 0 rgba(3, 58, 134, .12); }

.btn.busy, .round-btn.busy { pointer-events: none; filter: saturate(.6); }
.btn.busy::after { content: ""; position: absolute; right: 10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.upg-effect { margin-top: 3px; font-size: 12.5px; font-weight: 800; color: var(--bluzo-deep); }
.upg-effect em { font-style: normal; color: var(--mint); }
.upg-need { display: block; margin-top: 3px; font-family: var(--font-text); font-size: 10.5px; font-weight: 800; color: var(--alert); text-align: center; }
.upg .btn-col { display: flex; flex-direction: column; align-items: stretch; }

.tprog { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tprog .track { flex: 1; height: 7px; border-radius: 99px; background: var(--shade); overflow: hidden; }
.tprog .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bluzo), var(--rim)); }
.tprog span { font-size: 11.5px; font-weight: 800; color: var(--ink-3); white-space: nowrap; }

.energy-sheet .big-ico { font-size: 56px; line-height: 1; margin: -6px 0 6px; }
.energy-sheet .eta { font-family: var(--font-display); font-size: 30px; color: var(--bluzo-deep); margin: 4px 0 2px; }
.stack-btns { display: grid; gap: 10px; margin-top: 14px; }
.status.sending { background: #e3f0fe; color: var(--bluzo-deep); }
