/* 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); }

/* ---------- vivid palette ---------- */
:root { --sky-top: #1b8cff; --sky-mid: #5cc6ff; --sky-low: #ffc94d; --pass: #f6b31b; --pass-2: #ff8a00; --violet: #7b5cff; }
body { background: linear-gradient(180deg, #f2f8ff 0%, #fff8ec 100%) fixed; }
.sky { background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, #9fe0ff 62%, var(--sky-low) 78%, #fff3dc 92%); }
.balance { text-shadow: 0 4px 0 #023a86, 0 10px 30px rgba(0, 60, 160, .45); }
.map-card { background: radial-gradient(120% 80% at 50% 0%, #17468a 0%, #0a2550 45%, #061633 100%); box-shadow: 0 7px 0 #021a3a, 0 0 0 2px rgba(92, 198, 255, .25), 0 18px 40px rgba(3, 40, 100, .45); }
.nav-pill { background: linear-gradient(135deg, #2aa6ff, #1269f7 60%, var(--violet)); box-shadow: 0 3px 0 #0b46b3, 0 6px 16px rgba(18, 105, 247, .45); }
.btn-gold { background: linear-gradient(180deg, #ffe680, #ffb21e); box-shadow: 0 5px 0 #c26a00, 0 8px 18px rgba(255, 160, 0, .35); }
.btn-blue { background: linear-gradient(180deg, #4cb4ff, #1678ff); box-shadow: 0 5px 0 #0a4fc2, 0 8px 18px rgba(22, 120, 255, .35); }
.card, .upg, .task, .friend, .wd, .lb { border-color: #e2efff; }
.page-head h1 { text-shadow: 0 3px 0 rgba(2, 40, 110, .45); }

/* ---------- inventory bar on the map ---------- */
.inv-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 6px 10px; }
.inv { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 4px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--white); font-weight: 800; font-size: 13px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); transition: transform .1s, background .2s; }
.inv:active { transform: scale(.95); }
.inv span { font-size: 16px; }
.inv b { white-space: nowrap; }
.inv.empty { opacity: .6; }
.inv.on { background: linear-gradient(180deg, rgba(92, 198, 255, .35), rgba(92, 198, 255, .15)); box-shadow: inset 0 0 0 1.5px rgba(92, 198, 255, .8); }
.inv.armed { background: linear-gradient(180deg, #ff8a3d, #e2552b); box-shadow: 0 0 0 2px #ffd56b, 0 0 18px rgba(255, 120, 40, .8); animation: pulse .8s infinite; }
.inv-pass.on { background: linear-gradient(180deg, #ffd34d, #f08c00); color: #3a2200; box-shadow: 0 0 14px rgba(255, 190, 40, .6); }
.map-card.blast-mode .tile.can, .map-card.blast-mode .tile.dug { outline: 2px dashed #ffb21e; outline-offset: -2px; }
.map-card.boom { animation: boom .45s cubic-bezier(.3, .7, .4, 1); }
@keyframes boom { 10% { transform: translate(-6px, 3px) rotate(-.6deg); } 30% { transform: translate(6px, -4px) rotate(.6deg); } 50% { transform: translate(-4px, 2px); } 70% { transform: translate(3px, -1px); } }
.tile.hint .radar-hint { opacity: .55; filter: drop-shadow(0 0 6px #5cc6ff); animation: pulse 1.4s infinite; }
.tile.hint { box-shadow: inset 0 0 0 2px rgba(92, 198, 255, .7), inset 0 3px 0 rgba(255, 255, 255, .35); }

/* ---------- shop ---------- */
.seg3 { grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
.items-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 10px 12px; border-radius: 22px; background: var(--white); box-shadow: 0 6px 0 #d6e6fb, 0 10px 24px rgba(3, 58, 134, .12); border: 2px solid #e2efff; }
.item-ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-content: center; font-size: 34px; background: linear-gradient(160deg, #e8f4ff, #c6e3ff); box-shadow: inset 0 -4px 0 rgba(0, 60, 160, .12); }
.item-name { margin-top: 8px; font-family: var(--font-display); font-size: 16px; }
.item-desc { margin-top: 2px; font-size: 12px; color: var(--ink-3); font-weight: 600; min-height: 32px; }
.item-own { margin: 6px 0 10px; font-size: 11.5px; font-weight: 800; color: var(--bluzo-deep); }
.row-btns.small { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin: 0; }
.row-btns.small .btn { min-height: 40px; padding: 6px 4px; font-size: 13px; }
.first-ribbon { margin: -4px 0 8px; display: inline-block; padding: 4px 10px; border-radius: 99px; background: linear-gradient(90deg, #ff5f6d, #ffc371); color: var(--white); font-size: 12px; font-weight: 800; box-shadow: 0 3px 0 rgba(160, 40, 40, .3); }
.pkg-pts s { opacity: .45; font-size: .6em; margin-right: 4px; }
.pkg-excavator { --metal: linear-gradient(150deg, #c9b8ff, #7b5cff); --edge: #4b30c4; color: var(--white); }
.pkg-mega { --metal: linear-gradient(150deg, #ffe680, #ffb21e 60%, #ff7a00); --edge: #b35a00; }
.pkg-summit { --metal: linear-gradient(150deg, #a5f3ff, #4cc3ff 45%, #7b5cff); --edge: #2c4fb5; color: var(--white); }
.pkg-excavator .perks li::before, .pkg-summit .perks li::before { background: rgba(255, 255, 255, .3); color: var(--white); }
.pass-card { position: relative; overflow: hidden; padding: 22px 18px 18px; border-radius: 26px; text-align: center; color: #2b1800; background: radial-gradient(120% 90% at 50% 0%, #fff4c2, #ffd34d 45%, #f6a400); box-shadow: 0 7px 0 #b86a00, 0 20px 40px rgba(240, 150, 0, .35); }
.pass-card::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .35), transparent 30%); animation: spin 6s linear infinite; }
.pass-card > * { position: relative; }
.pass-crown { font-size: 56px; line-height: 1; filter: drop-shadow(0 6px 8px rgba(160, 90, 0, .4)); }
.pass-title { font-family: var(--font-display); font-size: 30px; margin-top: 4px; }
.pass-sub { font-weight: 800; opacity: .75; }
.pass-perks { text-align: left; margin: 14px 4px 16px; gap: 7px; }
.pass-perks li::before { background: rgba(255, 255, 255, .7); }
.pass-note { margin-top: 10px; font-size: 12px; font-weight: 700; opacity: .7; }
.offer .big-ico, .energy-sheet .big-ico { font-size: 56px; line-height: 1; margin: -6px 0 6px; }

/* ---------- sled result ---------- */
.sled-over { justify-content: center; align-items: stretch; background: #061633; }
.sled-over img { filter: blur(3px) brightness(.55) saturate(1.2); transform: scale(1.06); }
.go-wrap { position: relative; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); animation: pop .45s cubic-bezier(.3, 1.5, .5, 1); }
.go-ribbon { position: relative; z-index: 2; width: max-content; max-width: 90%; margin: 0 auto -18px; padding: 10px 26px; border-radius: 14px; font-family: var(--font-display); font-size: 22px; color: var(--white); background: linear-gradient(180deg, #ff6b6b, #e2352b); box-shadow: 0 5px 0 #a51d15, 0 10px 24px rgba(0, 0, 0, .35); transform: rotate(-2deg); }
.sled-over.best .go-ribbon { background: linear-gradient(180deg, #ffe680, #ffb21e); color: #3a2200; box-shadow: 0 5px 0 #c26a00, 0 0 30px rgba(255, 200, 60, .8); animation: wiggle 1.4s ease-in-out infinite; }
.go-card { padding: 30px 18px 18px; border-radius: 30px; text-align: center; background: linear-gradient(180deg, #ffffff, #eef6ff); box-shadow: 0 8px 0 #c3d9f5, 0 30px 60px rgba(0, 0, 0, .45); }
.go-label { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-3); }
.go-score { font-family: var(--font-display); font-size: 72px; line-height: 1; color: var(--navy); text-shadow: 0 4px 0 #c3d9f5; }
.sled-over.best .go-score { background: linear-gradient(180deg, #ffb21e, #e2552b); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.go-best { margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.go-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; }
.go-stats div { padding: 10px 4px; border-radius: 16px; background: #e7f2ff; }
.go-stats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--bluzo-deep); }
.go-stats span { font-size: 11px; font-weight: 800; color: var(--ink-3); }
.go-reward { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 99px; background: linear-gradient(180deg, #fff3c2, #ffd34d); box-shadow: 0 4px 0 #d18a00; font-family: var(--font-display); font-size: 26px; color: #3a2200; }
.go-reward img { width: 30px; height: 30px; border-radius: 50%; }
.go-reward small { font-family: var(--font-text); font-size: 13px; font-weight: 800; }
.go-runs { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 14px 0; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.go-runs i { width: 12px; height: 12px; border-radius: 50%; background: var(--shade); }
.go-runs i.on { background: linear-gradient(180deg, #4cb4ff, #1678ff); box-shadow: 0 2px 0 #0a4fc2; }
.go-runs span { margin-left: 6px; }

/* fixes: grid columns never grow past the card; the art's printed title stays hidden behind a fade */
.map-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tile { overflow: hidden; min-width: 0; }
.sled-over::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 22, 51, .1) 0%, rgba(6, 22, 51, .55) 45%, #061633 78%); pointer-events: none; }
.go-wrap { z-index: 1; }
.pass-card .row-btns .btn { flex: 1; }

/* ---------- holder bonus, withdraw rules, friends status, season, flash sale ---------- */
.btn-mint { background: linear-gradient(180deg, #4fe3a8, var(--mint)); color: var(--white); box-shadow: 0 5px 0 #0f8a5c, 0 8px 18px rgba(34, 197, 139, .35); text-shadow: 0 2px 0 rgba(15, 122, 83, .5); }
.btn-mint:active:not(:disabled) { box-shadow: 0 1px 0 #0f8a5c; }
.btn small { font-family: var(--font-text); font-size: 11px; opacity: .85; }
.small-btn { min-height: 0; padding: 8px 12px; font-size: 13px; flex: none; }

.holder-card { margin-top: 14px; padding: 16px; border-radius: var(--r); color: var(--white); background: linear-gradient(135deg, #7b5cff, #1678ff 60%, #22c1ff); box-shadow: 0 6px 0 #3a2aa8, 0 10px 24px rgba(91, 70, 255, .3); position: relative; overflow: hidden; }
.holder-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 70%); pointer-events: none; }
.holder-card.active { background: linear-gradient(135deg, #ff8a00, #ffb21e 55%, #ffd56b); box-shadow: 0 6px 0 #b85a00, 0 10px 24px rgba(255, 150, 0, .35); color: var(--ink); }
.holder-card.active .eyebrow.light { color: rgba(2, 18, 46, .6); }
.holder-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.holder-tier { font-family: var(--font-display); font-size: 22px; margin-top: 2px; }
.holder-sub { font-size: 12.5px; font-weight: 700; opacity: .85; margin-top: 2px; }
.holder-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.rung { text-align: center; padding: 8px 2px; border-radius: 12px; background: rgba(255, 255, 255, .18); }
.rung b { display: block; font-family: var(--font-display); font-size: 16px; }
.rung span { font-size: 11px; font-weight: 800; opacity: .85; }
.rung.on { background: var(--white); color: var(--ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.holder-fine { font-size: 11px; font-weight: 600; opacity: .8; margin-top: 10px; line-height: 1.45; }

.wd-rules { display: grid; gap: 6px; margin: 10px 0 12px; }
.rule { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rule i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--shade); display: grid; place-items: center; font-style: normal; font-size: 12px; color: var(--white); }
.rule.ok { color: var(--ink); }
.rule.ok i { background: var(--mint); border-color: var(--mint); }

.fr-tag { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; background: #fff1d6; color: var(--gold-ink); margin-right: 4px; }
.fr-tag.on { background: #dcf8ec; color: #0f7a53; }
.fr-bar { height: 5px; border-radius: 99px; background: var(--shade); margin-top: 5px; overflow: hidden; }
.fr-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #ffb21e); }

.season-head { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; color: var(--white); background: linear-gradient(135deg, #ff5f6d, #ff8a00 60%, #ffc371); box-shadow: 0 4px 0 #b8421f; }
.season-head > div:first-child { flex: 1; min-width: 0; }
.season-head b { display: block; font-family: var(--font-display); font-size: 18px; }
.season-head span { font-size: 11.5px; font-weight: 700; opacity: .9; }
.season-ends { text-align: right; font-size: 11px; font-weight: 800; text-transform: uppercase; opacity: .95; }
.season-ends b { font-size: 16px; text-transform: none; }

.sale-banner { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 18px; color: var(--white); background: linear-gradient(90deg, #ff2d6f, #ff7a45); box-shadow: 0 5px 0 #a3163f, 0 10px 22px rgba(255, 45, 111, .35); animation: salePulse 2.2s ease-in-out infinite; }
.sale-banner b { display: block; font-family: var(--font-display); font-size: 17px; }
.sale-banner span { font-size: 12px; font-weight: 800; opacity: .95; }
.sale-pct { flex: none; font-family: var(--font-display); font-size: 26px; padding: 6px 10px; border-radius: 14px; background: rgba(255, 255, 255, .22); }
@keyframes salePulse { 50% { transform: scale(1.015); } }
.row-btns.sale .btn { flex-direction: column; line-height: 1.1; }
.btn .was { display: block; font-size: 11px; font-weight: 700; opacity: .65; text-decoration: line-through; }
.nav-sale { position: absolute; top: 0; right: 2px; padding: 1px 5px; border-radius: 99px; background: #ff2d6f; color: var(--white); font-size: 9px; font-weight: 900; line-height: 1.4; box-shadow: 0 2px 0 #a3163f; }

/* ---------- 3D sled run (Aurora Run) ---------- */
.sled { background: #0b1240; }
.sled-hint { color: #fff; opacity: .9; text-shadow: 0 2px 6px rgba(7, 11, 46, .8); }
.sled-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.sled-count { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-family: var(--font-display); font-size: 104px; line-height: 1; color: #fff;
  text-shadow: 0 6px 0 #2a2d8f, 0 0 40px rgba(110, 230, 255, .8); animation: countPulse .8s ease-out infinite; }
@keyframes countPulse { 0% { transform: scale(1.35); opacity: .3; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.94); opacity: 1; } }
.sled-pop { position: absolute; left: 0; right: 0; top: 22%; text-align: center; font-family: var(--font-display); font-size: 46px; letter-spacing: 1px; color: #fff;
  text-shadow: 0 4px 0 rgba(25, 20, 90, .85), 0 0 26px rgba(160, 200, 255, .9); animation: sledPop 1.2s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.sled-pop.aurora { color: #ffd56b; font-size: 36px; text-shadow: 0 4px 0 #7a3b00, 0 0 30px rgba(80, 255, 200, .9); }
.sled-pop.boost { color: #ffb347; text-shadow: 0 4px 0 #8a2b00, 0 0 30px rgba(255, 140, 40, .95); }
@keyframes sledPop { 0% { transform: scale(.4) translateY(20px); opacity: 0; } 18% { transform: scale(1.12); opacity: 1; } 30% { transform: scale(1); } 75% { opacity: 1; } 100% { transform: translateY(-50px) scale(.95); opacity: 0; } }
.sled-score { background: rgba(255, 255, 255, .92); }
.sled-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; background: linear-gradient(90deg, #22d3a6, #4fb7ff); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .8px; box-shadow: 0 3px 0 rgba(3, 40, 100, .4); }

/* ---------- dig map: real mine look ---------- */
.map-scroll { background: #0d0905; }
.map-surface { position: relative; height: 64px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; border-bottom: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 40' preserveAspectRatio='none'%3E%3Cpath fill='%23163a6e' d='M0 40V30l6-12 6 12 4-8 5 10 7-16 7 14 5-9 6 11 8-18 8 16 5-10 6 12 7-15 7 13 5-9 6 11 7-14 7 14 4-7 5 9 4-6V40z'/%3E%3C/svg%3E") bottom / 100% 34px no-repeat,
    linear-gradient(180deg, #5cc6ff 0%, #bfe8ff 70%, #eef8ff 100%); }
.map-surface::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px; z-index: 1; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: linear-gradient(#ffffff, #dcecfb); box-shadow: 0 4px 6px rgba(0, 0, 0, .35); }
.mine-sign { position: relative; z-index: 2; padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: 1.2px; color: #fff3d6;
  background: linear-gradient(180deg, #8a5a2e, #5f3a1a); border: 2px solid #3d2410; box-shadow: 0 3px 0 #2a1808, inset 0 1px 0 rgba(255, 255, 255, .25); text-shadow: 0 1px 0 #2a1808; }
.map-grid { gap: 0; padding: 0; }
.map-grid .tile {
  border-radius: 2px; background-color: #555;
  background-image: var(--tex); background-size: 700% 700%;
  background-position: calc(var(--c) * 100% / 6) calc(var(--r) * 100% / 6);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16), inset 0 -3px 0 rgba(0, 0, 0, .3), inset 2px 0 0 rgba(255, 255, 255, .05), inset -2px 0 0 rgba(0, 0, 0, .18);
  transition: filter .2s, transform .05s;
}
.map-grid .tile.l-snow { --tex: var(--tex-snow); }
.map-grid .tile.l-ice { --tex: var(--tex-ice); }
.map-grid .tile.l-soil { --tex: var(--tex-soil); }
.map-grid .tile.l-rock { --tex: var(--tex-rock); }
.map-grid .tile.l-crystal { --tex: var(--tex-crystal); }
.map-grid .tile.l-gold { --tex: var(--tex-gold); }
.map-grid .tile.boulder:not(.dug) {
  background-image: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 38%), radial-gradient(circle at 50% 55%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .55) 72%), var(--tex-boulder), var(--tex);
  background-size: 100% 100%, 100% 100%, 300% 300%, 700% 700%;
}
.map-grid .tile.far { filter: brightness(.62) saturate(.8); }
.map-grid .tile.can { outline: 2px solid rgba(255, 236, 170, .95); outline-offset: -2px; z-index: 1; }
.map-grid .tile.dug {
  background-image: linear-gradient(rgba(12, 7, 4, .74), rgba(12, 7, 4, .84)), var(--tex);
  background-size: 100% 100%, 700% 700%;
  background-position: 0 0, calc(var(--c) * 100% / 6) calc(var(--r) * 100% / 6);
  box-shadow: inset 0 10px 10px -6px rgba(0, 0, 0, .85), inset 0 -2px 0 rgba(255, 255, 255, .05);
  border-radius: 0;
}
.map-grid .tile.dug.roof::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 15%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #b07b45, #6e4523); box-shadow: 0 3px 4px rgba(0, 0, 0, .55); border-bottom: 1px solid #3e250f; }
.map-grid .tile.dug.posts::after { opacity: 1; background: linear-gradient(90deg, #7a4c26 0 9%, #4a2d14 9% 11%, transparent 11% 89%, #4a2d14 89% 91%, #7a4c26 91%); }
.map-grid .tile.dug.lamp::after { opacity: 1; background: radial-gradient(circle at 50% 24%, #fff3c4 0 5%, rgba(255, 196, 90, .55) 7%, rgba(255, 170, 60, 0) 46%); }
.map-grid .tile.dug.posts.lamp::after { background: radial-gradient(circle at 50% 24%, #fff3c4 0 5%, rgba(255, 196, 90, .55) 7%, rgba(255, 170, 60, 0) 46%), linear-gradient(90deg, #7a4c26 0 9%, #4a2d14 9% 11%, transparent 11% 89%, #4a2d14 89% 91%, #7a4c26 91%); }
.map-grid .tile.dug .ico { position: relative; z-index: 2; }
.map-grid .tile.hit { transform: scale(.93); filter: brightness(1.25); }
.map-grid .tile[data-crack]::after { background-color: transparent; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .35)); }
.map-grid .layer-band { margin: 0; border-radius: 0; padding: 7px 10px; color: #fff3d6; font-size: 11.5px; letter-spacing: .3px;
  background: linear-gradient(180deg, #7d5129, #5a3818); border-top: 2px solid #9c6a38; border-bottom: 2px solid #2f1c0b; box-shadow: 0 3px 5px rgba(0, 0, 0, .45); position: relative; z-index: 1; }
.map-grid .layer-band b { color: #ffd56b; }
.map-dark { position: absolute; left: 50%; top: 0; width: 230px; height: 230px; margin: -115px 0 0 -115px; border-radius: 50%; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 200, 110, .10) 0 22%, rgba(4, 2, 8, 0) 34%, rgba(4, 2, 8, .55) 62%, rgba(4, 2, 8, 1) 71%);
  box-shadow: 0 0 0 2400px rgb(4, 2, 8); transition: left .3s, top .3s, opacity .6s; }
.digger { z-index: 3; filter: drop-shadow(0 0 8px rgba(255, 214, 130, .85)) drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); }
.pick.swing { animation-duration: .14s; }
/* when the map reaches its top or bottom, the swipe carries on to the page */
.map-scroll { overscroll-behavior-y: auto; }

/* ---------- compact Mine tab: the whole map box fits above the bottom bar ---------- */
[data-tab="mine"] .balance-wrap { margin-top: 6px; gap: 8px; }
[data-tab="mine"] .coin-icon { width: 30px; height: 30px; }
[data-tab="mine"] .balance { font-size: 34px; text-shadow: 0 3px 0 #023a86, 0 6px 18px rgba(0, 60, 160, .4); }
[data-tab="mine"] .tier-line { margin-top: 6px; max-width: 260px; }
[data-tab="mine"] .tier-track { height: 7px; }
[data-tab="mine"] .tier-next { margin-top: 3px; font-size: 11px; }
.map-card { margin-top: 8px; padding: 8px 8px 8px; border-radius: 22px; }
.map-head { padding: 0 4px 6px; align-items: center; }
.map-title { font-size: 24px; }
.map-title small { font-size: 13px; }
.map-sub { margin-top: 3px; font-size: 11px; }
.inv-bar { margin: 0 2px 6px; gap: 5px; }
.inv { padding: 5px 4px; font-size: 12px; }
.map-energy { margin: 0 4px 6px; }
.map-card .boost-pill { margin: 0 2px 6px; padding: 5px 10px; font-size: 12px; }
@media (max-height: 700px) {
  [data-tab="mine"] .tier-line { display: none; }
  [data-tab="mine"] .balance { font-size: 30px; }
  .map-sub { display: none; }
}

/* ---------- performance: nothing repaints every frame unless it has to ---------- */
.nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: #ffffff; }
.map-grid .tile.can { animation: none; }
.map-grid .tile.far { filter: none;
  background-image: linear-gradient(rgba(6, 8, 16, .42), rgba(6, 8, 16, .42)), var(--tex);
  background-size: 100% 100%, 700% 700%;
  background-position: 0 0, calc(var(--c) * 100% / 6) calc(var(--r) * 100% / 6); }
.map-grid .tile.boulder.far:not(.dug) {
  background-image: linear-gradient(rgba(6, 8, 16, .42), rgba(6, 8, 16, .42)), radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 38%), radial-gradient(circle at 50% 55%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .55) 72%), var(--tex-boulder), var(--tex);
  background-size: 100% 100%, 100% 100%, 100% 100%, 300% 300%, 700% 700%; }
.map-grid .tile { transition: transform .05s; }
/* the headlamp darkness is painted once per move as part of the map, never on scroll */
.map-dark { left: 0; right: 0; top: 0; width: auto; height: 100%; margin: 0; border-radius: 0; box-shadow: none; transition: opacity .6s;
  background: radial-gradient(circle 128px at var(--lx, 50%) var(--ly, 0px), rgba(255, 200, 110, .10) 0 40px, rgba(4, 2, 8, 0) 60px, rgba(4, 2, 8, .55) 110px, rgb(4, 2, 8) 128px); }

/* ---------- PK arena ---------- */
.pk-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 4px; padding: 6px 12px 6px 8px; border-radius: 14px;
  background: linear-gradient(180deg, #ffde6b, #ff9a1f); color: #3a1d00; font-weight: 900; font-size: 15px; box-shadow: 0 4px 0 #b55a00, 0 6px 14px rgba(255, 140, 0, .45); }
.pk-btn:active { transform: translateY(calc(-50% + 3px)); box-shadow: 0 1px 0 #b55a00; }
.pk-btn .pk-ico { font-size: 16px; }
.pk-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #ff3b3b; border: 2px solid #fff; }
[data-tab="mine"] .balance-wrap { position: relative; }
.arena-card { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px; border-radius: 20px; text-align: left; color: #fff;
  background: linear-gradient(120deg, #2b1a5e, #5a2a8a 55%, #b0397a); box-shadow: 0 6px 0 #1a0f3d, 0 12px 26px rgba(80, 30, 140, .4); }
.ac-vs { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; color: #ffd56b;
  background: rgba(0, 0, 0, .25); text-shadow: 0 2px 0 #7a3b00; }
.ac-text { flex: 1; min-width: 0; }
.ac-text b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.ac-text small { font-size: 12px; font-weight: 700; opacity: .85; }
.ac-go { flex: none; padding: 8px 14px; border-radius: 12px; background: linear-gradient(180deg, #ffde6b, #ff9a1f); color: #3a1d00; font-weight: 900; box-shadow: 0 3px 0 #b55a00; }

.arena { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; color: #fff; overflow: hidden; background: #160d33; touch-action: manipulation; }
.ar-bg { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 60% at 50% 30%, #5b2fa8 0%, #2a1660 45%, #140a30 75%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 46px); }
.ar-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 6px; }
.ar-back { width: 42px; height: 42px; border-radius: 50%; font-size: 22px; font-weight: 900; color: #ffd56b; background: rgba(0, 0, 0, .35); border: 2px solid rgba(255, 213, 107, .5); }
.ar-title { flex: 1; text-align: center; font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; color: #fff; text-shadow: 0 3px 0 #3b1d7a, 0 0 20px rgba(255, 200, 90, .5); }
.ar-tix { position: relative; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 12px; color: #fff; background: rgba(0, 0, 0, .35); border: 2px solid rgba(255, 213, 107, .45); }
.ar-tix b { font-size: 14px; }
.ar-tix .ar-plus { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #ffb21e; color: #3a1d00; font-weight: 900; font-size: 14px; line-height: 1; }
.ar-tix small { grid-column: 1 / -1; font-size: 10px; font-weight: 700; opacity: .8; text-align: right; }

.ar-stage { position: relative; flex: 1; min-height: 170px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 6px; }
.ar-rays { position: absolute; left: 50%; top: 45%; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(255, 213, 107, .16) 0 8deg, transparent 8deg 22deg); border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 65%); mask: radial-gradient(circle, #000 20%, transparent 65%); }
.ar-fighter { position: relative; width: 44%; display: flex; flex-direction: column; align-items: center; }
.ar-fighter img { width: 100%; max-width: 190px; max-height: 26vh; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.ar-fighter.opp img { transform: scaleX(-1); filter: hue-rotate(150deg) saturate(1.3) brightness(.55) drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.ar-plate { margin-top: -6px; padding: 4px 10px; border-radius: 10px; text-align: center; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .15); }
.ar-plate b { display: block; font-size: 13px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-plate span { font-size: 11px; font-weight: 800; color: #ffd56b; }
.ar-vs { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) skewX(-8deg); font-family: var(--font-display); font-size: 64px; line-height: 1; color: #ffd56b;
  text-shadow: 0 4px 0 #a34a00, 0 0 30px rgba(255, 180, 60, .9); animation: vsPulse 1.6s ease-in-out infinite; }
@keyframes vsPulse { 50% { transform: translate(-50%, -50%) skewX(-8deg) scale(1.08); } }

.ar-league { display: flex; align-items: center; gap: 10px; margin: 8px 14px 0; padding: 8px 10px; border-radius: 14px; background: rgba(0, 0, 0, .35); }
.al-badge { flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 10px; font-weight: 900; font-size: 13px; color: #1b0e3a; background: var(--lc); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.al-mid { flex: 1; min-width: 0; }
.al-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.al-bar i { display: block; height: 100%; border-radius: inherit; }
.al-mid small { font-size: 11px; font-weight: 700; opacity: .8; }
.al-wl { flex: none; font-size: 12px; font-weight: 700; opacity: .9; }
.al-wl b { font-size: 14px; color: #ffd56b; margin-left: 4px; }

.ar-panel { margin-top: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #5a3a1c, #3a230f); border-top: 3px solid #c98a3a; box-shadow: 0 -8px 24px rgba(0, 0, 0, .4); }
.ar-me-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 700; background: rgba(0, 0, 0, .25); }
.ar-me-row b { color: #ffd56b; }
.ar-rewards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ar-box { padding: 8px; border-radius: 14px; text-align: center; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 213, 107, .25); }
.ar-box-head { display: inline-block; padding: 2px 12px; border-radius: 8px; font-size: 12px; font-weight: 900; color: #3a1d00; background: linear-gradient(180deg, #ffe08a, #e6a03c); }
.ar-count { margin-top: 4px; font-size: 11px; font-weight: 800; color: #7dff9a; }
.ar-items { display: flex; justify-content: center; gap: 5px; margin-top: 6px; min-height: 46px; }
.ar-item { position: relative; width: 42px; height: 46px; border-radius: 9px; display: grid; place-items: center; padding-top: 2px;
  background: linear-gradient(180deg, #ffcf5a, #e08a12); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 2px 0 #7a3b00; }
.ar-item.gold { background: linear-gradient(180deg, #fff1a8, #ffb21e); }
.ar-item.dim { filter: grayscale(.6) brightness(.75); }
.ar-item img { width: 22px; height: 22px; }
.ar-item span { font-size: 19px; line-height: 1; }
.ar-item b { position: absolute; right: 3px; bottom: 1px; font-size: 11px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.ar-next { margin-top: 6px; font-size: 10.5px; font-weight: 700; opacity: .85; }
.ar-next b { color: #ffd56b; }
.ar-actions { display: grid; grid-template-columns: 1fr 1.6fr 1fr; align-items: center; gap: 8px; margin-top: 10px; }
.ar-side { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; font-weight: 800; font-size: 12px; }
.ar-side span { font-size: 26px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.ar-pk { position: relative; padding: 10px 0 8px; border-radius: 16px; transform: skewX(-6deg); color: #3a1d00;
  background: linear-gradient(180deg, #ffe680, #ffb21e 60%, #ff8a00); box-shadow: 0 6px 0 #a34a00, 0 10px 24px rgba(255, 150, 0, .5); }
.ar-pk span { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1; }
.ar-pk small { font-size: 11px; font-weight: 900; }
.ar-pk:active { transform: skewX(-6deg) translateY(4px); box-shadow: 0 2px 0 #a34a00; }
.ar-pk.empty { filter: grayscale(.4); }

/* the fight */
.ar-battle { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: radial-gradient(120% 70% at 50% 40%, #6a2fb8, #2a1462 50%, #120826 85%); }
.ar-battle.shake { animation: arShake .35s; }
@keyframes arShake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(6px, -3px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }
.ab-bars { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: calc(16px + env(safe-area-inset-top)) 12px 8px; }
.ab-side b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-side.opp { text-align: right; }
.ab-side small { font-size: 11px; font-weight: 800; color: #ffd56b; }
.ab-hp { height: 14px; margin: 4px 0 2px; border-radius: 99px; background: rgba(0, 0, 0, .45); border: 2px solid rgba(255, 255, 255, .25); overflow: hidden; }
.ab-hp i { display: block; height: 100%; width: 100%; background: linear-gradient(180deg, #7dff9a, #22c55e); transition: width .35s ease-out; }
.ab-side.opp .ab-hp i { margin-left: auto; background: linear-gradient(180deg, #ff8a8a, #e23b3b); }
.ab-round { font-family: var(--font-display); font-size: 18px; color: #ffd56b; text-shadow: 0 2px 0 #7a3b00; white-space: nowrap; }
.ab-round.pop { animation: abPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes abPop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ab-field { position: relative; flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 4%; }
.ab-fighter { width: 46%; transition: transform .2s; }
.ab-fighter img { width: 100%; max-height: 42vh; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); }
.ab-fighter.opp img { transform: scaleX(-1); filter: hue-rotate(var(--hue, 150deg)) saturate(1.3) drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); }
.ab-fighter.enter.me { animation: enterL .5s ease-out; }
.ab-fighter.enter.opp { animation: enterR .5s ease-out; }
@keyframes enterL { from { transform: translateX(-120%); } }
@keyframes enterR { from { transform: translateX(120%); } }
.ab-fighter.me.lunge { animation: lungeR .38s ease-in-out; }
.ab-fighter.opp.lunge { animation: lungeL .38s ease-in-out; }
@keyframes lungeR { 45% { transform: translateX(28%) scale(1.06); } }
@keyframes lungeL { 45% { transform: translateX(-28%) scale(1.06); } }
.ab-fighter.hit img, .ab-fighter.crit img { animation: hitFlash .35s; }
.ab-fighter.crit { animation: critShake .4s; }
@keyframes hitFlash { 30% { filter: brightness(2.4) saturate(0) drop-shadow(0 0 18px #ff5050); } }
@keyframes critShake { 25% { transform: translateX(-8%) rotate(-6deg); } 60% { transform: translateX(5%) rotate(4deg); } }
.ab-fighter.dodge { animation: dodgeHop .35s; }
@keyframes dodgeHop { 50% { transform: translateY(-18%); } }
.ab-fighter.ko { transform: rotate(-80deg) translateY(30%); opacity: .55; transition: transform .5s, opacity .5s; }
.ab-fighter.opp.ko { transform: rotate(80deg) translateY(30%); }
.ab-fighter.victory { animation: victoryHop .6s ease-in-out 2; }
@keyframes victoryHop { 50% { transform: translateY(-14%) scale(1.06); } }
.ab-fx { position: absolute; inset: 0; pointer-events: none; }
.ab-pop { position: absolute; transform: translateX(-50%); font-family: var(--font-display); white-space: nowrap; animation: abFloat 1s ease-out forwards; }
.ab-pop.dmg { font-size: 30px; color: #fff; text-shadow: 0 3px 0 #b42323, 0 0 10px rgba(255, 60, 60, .8); }
.ab-pop.critical { font-size: 40px; color: #ffd56b; text-shadow: 0 4px 0 #a34a00, 0 0 18px rgba(255, 170, 40, 1); }
.ab-pop.miss { font-size: 26px; color: #9fd6ff; text-shadow: 0 3px 0 #1b3f7a; }
.ab-pop.move { font-family: var(--font-text); font-weight: 900; font-size: 12px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .5); color: #ffe7a3; animation-duration: .8s; }
@keyframes abFloat { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -6px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -60px) scale(1); opacity: 0; } }
.ab-skip { position: absolute; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); padding: 8px 14px; border-radius: 12px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .25); }
.ab-result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 4, 26, .55); animation: fade .25s; }
.abr-card { width: 100%; max-width: 360px; padding: 26px 18px 18px; border-radius: 26px; text-align: center; color: var(--ink); background: #fff; position: relative;
  box-shadow: 0 8px 0 #c9b6ef, 0 24px 60px rgba(0, 0, 0, .5); animation: abrIn .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes abrIn { from { transform: scale(.7) translateY(30px); opacity: 0; } }
.abr-ribbon { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); padding: 8px 22px; border-radius: 14px; white-space: nowrap; font-family: var(--font-display); font-size: 22px;
  color: #3a2200; background: linear-gradient(180deg, #ffe680, #ffb21e); box-shadow: 0 5px 0 #c26a00, 0 0 24px rgba(255, 200, 60, .7); }
.ab-result.lost .abr-ribbon { color: #fff; background: linear-gradient(180deg, #8b6cff, #5a3ad6); box-shadow: 0 5px 0 #3a2296; }
.abr-vs { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.abr-wild { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 900; text-transform: uppercase; background: #efe7ff; color: #6b46d6; vertical-align: 1px; }
.abr-score { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 10px 0 4px; font-family: var(--font-display); }
.abr-score span { font-size: 22px; color: var(--ink-3); }
.abr-score i { font-style: normal; color: var(--ink-3); }
.abr-score b { font-size: 40px; color: var(--navy); font-weight: 400; }
.abr-score em { font-style: normal; font-size: 20px; }
.abr-score em.up, .ar-rec-delta.up { color: #16a34a; }
.abr-score em.down, .ar-rec-delta.down { color: #dc2626; }
.abr-league { margin: 4px 0; font-weight: 800; font-size: 14px; color: var(--ink-2); }
.abr-league.up { color: #6b46d6; }
.abr-reward { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 4px; padding: 6px 16px; border-radius: 99px; font-family: var(--font-display); font-size: 22px;
  color: #3a2200; background: linear-gradient(180deg, #ffe680, #ffb21e); box-shadow: 0 3px 0 #c26a00; }
.abr-reward img { width: 24px; height: 24px; }
.abr-reward small { font-size: 13px; }

.ar-sheet { position: absolute; inset: 0; z-index: 4; display: flex; align-items: flex-end; background: rgba(8, 3, 22, .55); animation: fade .2s; }
.ar-sheet-body { width: 100%; max-height: 82%; overflow-y: auto; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--white); color: var(--ink); }
.ar-sheet-sub { margin: 10px 2px 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.ar-rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f6f3ff; }
.ar-rec-res { flex: none; width: 46px; padding: 4px 0; border-radius: 9px; text-align: center; font-size: 11px; font-weight: 900; color: #fff; background: #22c55e; }
.ar-rec.l .ar-rec-res { background: #8b6cff; }
.ar-rec-body { flex: 1; min-width: 0; }
.ar-rec-body b { font-size: 14px; }
.ar-rec-body small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ar-rec-delta { flex: none; text-align: right; font-family: var(--font-display); font-size: 18px; }
.ar-rec-delta small { display: block; font-family: var(--font-text); font-size: 11px; color: var(--gold-ink); font-weight: 800; }
@media (max-height: 640px) { .ar-fighter img { max-height: 20vh; } .ar-vs { font-size: 48px; } .ar-items { min-height: 40px; } .ar-item { width: 36px; height: 40px; } }
.abr-vs { margin-top: 8px; }

/* fighters that really fight */
.ab-fighter { position: relative; transition: none; will-change: transform; }
.ab-body { animation: abIdle .7s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.ab-fighter.opp .ab-body { animation-delay: -.35s; }
@keyframes abIdle { from { transform: translateY(0) scale(1, 1) rotate(-1.5deg); } to { transform: translateY(-7px) scale(1.01, 1.03) rotate(1.5deg); } }
.ab-shadow { position: absolute; left: 18%; right: 18%; bottom: 2%; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.ab-fighter.victory .ab-body { animation: victoryHop .5s ease-in-out infinite; }
.ab-fighter.ko, .ab-fighter.hit, .ab-fighter.crit, .ab-fighter.dodge, .ab-fighter.lunge { animation: none; }
.ab-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 18%; height: 3px; background: linear-gradient(90deg, transparent, rgba(255, 213, 107, .5), transparent); pointer-events: none; }
.ab-burst { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 12%, rgba(255, 230, 140, .95) 18%, rgba(255, 150, 60, .6) 34%, transparent 60%),
    repeating-conic-gradient(rgba(255, 245, 200, .95) 0 6deg, transparent 6deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 40%, transparent 70%); mask: radial-gradient(circle, #000 40%, transparent 70%);
  animation: burstOut .38s ease-out forwards; }
.ab-burst.big { width: 170px; height: 170px; margin: -85px 0 0 -85px; animation-duration: .55s; }
@keyframes burstOut { 0% { transform: scale(.2) rotate(0); opacity: 1; } 100% { transform: scale(1.3) rotate(40deg); opacity: 0; } }
.ab-slash { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none;
  border-top: 7px solid rgba(255, 255, 255, .95); border-left: 3px solid transparent; filter: drop-shadow(0 0 8px #9fe0ff);
  transform: rotate(calc(var(--dir) * 30deg)) scaleX(var(--dir)); animation: slashCut .32s ease-out forwards; }
@keyframes slashCut { 0% { opacity: 0; clip-path: inset(0 100% 0 0); } 40% { opacity: 1; } 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
.ab-pick { position: absolute; font-size: 54px; margin: -27px 0 0 -27px; pointer-events: none; transform-origin: 80% 80%; animation: pickHit .38s ease-out forwards; }
@keyframes pickHit { 0% { transform: rotate(calc(var(--dir) * 60deg)) scale(.6); opacity: 0; } 40% { transform: rotate(calc(var(--dir) * -40deg)) scale(1.1); opacity: 1; } 100% { transform: rotate(calc(var(--dir) * -55deg)); opacity: 0; } }
.ab-dust { position: absolute; width: 60px; height: 26px; margin: -13px 0 0 -30px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(230, 220, 255, .75), transparent); animation: dustPuff .5s ease-out forwards; }
@keyframes dustPuff { from { transform: scale(.4); opacity: 1; } to { transform: translateX(calc(var(--dir) * -30px)) scale(1.6, 1.2); opacity: 0; } }
.ab-ring { position: absolute; width: 70px; height: 70px; left: 0; top: 0; border-radius: 50%; pointer-events: none;
  border: 5px solid rgba(160, 230, 255, .95); box-shadow: 0 0 16px rgba(120, 210, 255, .9), inset 0 0 12px rgba(120, 210, 255, .7); }
.ab-shard { position: absolute; left: 0; top: 0; font-size: 30px; pointer-events: none; filter: drop-shadow(0 0 8px #9fe0ff); }
.ab-flash { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; background: #fff; animation: flashOut .25s ease-out forwards; }
.ab-fx { overflow: hidden; z-index: 4; }
@keyframes flashOut { from { opacity: .7; } to { opacity: 0; } }
.ab-field { align-items: flex-end; padding-bottom: 15%; }
.ab-fighter img { max-height: 36vh; }
.ab-field { padding-bottom: 26%; }
.ab-field::after { bottom: 27%; }
/* the Bluzo art faces left: mirror our dog so both face each other */
.ar-fighter.me img, .ab-fighter.me img { transform: scaleX(-1); }
.ar-fighter.opp img, .ab-fighter.opp img { transform: none; }

/* ---------- daily boss ---------- */
.map-grid .tile.boss { z-index: 3; overflow: visible; outline: 2px solid #ff6b6b; outline-offset: -2px;
  background-image: radial-gradient(circle at 50% 45%, rgba(255, 90, 90, .55), rgba(120, 10, 30, .2) 60%, rgba(0, 0, 0, .35)), var(--tex); background-size: 100% 100%, 700% 700%; }
.map-grid .tile.boss.far { background-image: radial-gradient(circle at 50% 45%, rgba(255, 90, 90, .45), rgba(120, 10, 30, .25) 60%, rgba(0, 0, 0, .5)), var(--tex); }
.map-grid .tile.boss.can { outline: 3px solid #ffd56b; }
.map-grid .tile.boss:not(.hit) { transform: scale(1.1); }
.map-grid .tile.boss { box-shadow: 0 0 14px 4px rgba(255, 60, 60, .85), 0 0 34px 10px rgba(255, 60, 60, .35), inset 0 0 12px rgba(0, 0, 0, .5); }
.map-grid .tile.boss::before { content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 80, 80, .75), rgba(255, 60, 60, .25) 55%, transparent); animation: bossGlow 1.4s ease-in-out infinite; }
@keyframes bossGlow { 50% { transform: scale(1.18); opacity: .55; } }
.tile .boss-ico { font-size: 1.45em; filter: drop-shadow(0 0 6px #ff4d4d) drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); animation: bossBob 1.4s ease-in-out infinite; }
@keyframes bossBob { 50% { transform: translateY(-2px) scale(1.06); } }
.map-grid .tile.boss.hit .boss-ico { animation: none; transform: scale(.82) rotate(-8deg); filter: brightness(2) drop-shadow(0 0 10px #fff); }
.boss-hp { position: absolute; left: 6%; right: 6%; bottom: 5%; height: 6px; border-radius: 99px; background: rgba(0, 0, 0, .65); border: 1px solid rgba(255, 255, 255, .4); overflow: hidden; pointer-events: none; z-index: 2; }
.boss-hp i { display: block; height: 100%; background: linear-gradient(90deg, #ff3b3b, #ff9a5a); transition: width .15s; }
.map-grid .boss-band { grid-column: 1 / -1; position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 6px 10px;
  font: inherit; font-size: 11.5px; font-weight: 800; color: #fff; text-align: left; background: linear-gradient(90deg, #6a0f1f, #a3212f 60%, #6a0f1f); border-bottom: 2px solid #3a0610; }
.map-grid .boss-band b { flex: none; color: #ffd56b; }
.boss-blowup { position: fixed; z-index: 80; font-size: 46px; line-height: 1; transform: translate(-50%, -50%); pointer-events: none; animation: bossBlow 1.1s cubic-bezier(.3, .7, .4, 1) forwards; filter: drop-shadow(0 0 16px #ff4d4d); }
@keyframes bossBlow { 0% { transform: translate(-50%, -50%) scale(1); } 15% { transform: translate(-56%, -50%) scale(1.5) rotate(-10deg); } 30% { transform: translate(-44%, -50%) scale(1.8) rotate(10deg); }
  45% { transform: translate(-52%, -50%) scale(2.1) rotate(-6deg); opacity: 1; filter: brightness(2.5) drop-shadow(0 0 30px #fff); } 100% { transform: translate(-50%, -50%) scale(4); opacity: 0; } }
.boss-flash { position: fixed; inset: 0; z-index: 79; pointer-events: none; background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(255, 90, 90, .5) 60%, rgba(120, 0, 20, .3)); opacity: 0; animation: bossFlash 1.1s ease-out forwards; }
@keyframes bossFlash { 0%, 35% { opacity: 0; } 42% { opacity: .9; } 100% { opacity: 0; } }

.boss-sheet .boss-skull, .boss-win .boss-chest { font-size: 54px; line-height: 1; margin: -4px 0 4px; filter: drop-shadow(0 0 14px rgba(255, 70, 70, .7)); }
.boss-win .boss-chest { animation: wiggle 1.2s ease-in-out infinite; filter: drop-shadow(0 0 16px #ffd56b); }
.boss-sheet p, .boss-win p { margin: 6px 0 10px; font-size: 13.5px; }
.boss-sub { margin-top: 6px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-3); }
.boss-loot { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 6px; margin: 6px 0 10px; }
.boss-loot div { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 4px; border-radius: 14px; background: linear-gradient(180deg, #fff3c4, #ffd56b); box-shadow: 0 3px 0 #c98a3a; }
.boss-loot img { width: 22px; height: 22px; }
.boss-loot span { font-size: 20px; line-height: 1; }
.boss-loot b { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: #5a3200; }
.boss-hunters { padding: 8px; border-radius: 14px; background: #f3f6fb; text-align: left; }
.bh-title { margin: 0 2px 4px; font-size: 11.5px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .6px; }
.bh-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 9px; font-size: 13.5px; }
.bh-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-row em { font-style: normal; font-weight: 800; font-size: 12.5px; color: var(--gold-ink); }
.bh-row.open b { font-weight: 600; color: var(--ink-3); }
.bh-row.me { background: #fff1c2; }
.boss-note { margin: 8px 0 0 !important; font-size: 12px !important; color: var(--ink-3) !important; }
.boss-sheet .stack-btns { margin-top: 10px; }
.boss-win { padding-top: 14px; }
.boss-ribbon { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); padding: 7px 20px; border-radius: 14px; white-space: nowrap; font-family: var(--font-display); font-size: 20px;
  color: #fff; background: linear-gradient(180deg, #ff6b6b, #c0262f); box-shadow: 0 5px 0 #7a0f18, 0 0 24px rgba(255, 80, 80, .7); }
.boss-hunter, .boss-rank { margin: 0 0 10px; padding: 7px 10px; border-radius: 12px; font-size: 13px; font-weight: 800; }
.boss-hunter { color: #5a3200; background: linear-gradient(90deg, #ffe680, #ffb21e); }
.boss-rank { color: var(--ink-2); background: #eef3fa; }
.boss-win .btn { margin-top: 12px; }

/* ---------- Bluzo rig: a living, moving dog ---------- */
.rig-holder { width: 100%; display: flex; justify-content: center; }
.dog-rig { position: relative; width: min(100%, 190px); aspect-ratio: 480 / 600; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); animation: rigBreath 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.ab-fighter .dog-rig { width: min(100%, calc(36vh * .8)); }
.dog-rig img, .dog-rig .dr-part { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; transform: none; filter: none; }
.dog-rig .dr-part img { transform: none; }
.ar-fighter.me .dog-rig, .ab-fighter.me .dog-rig { transform: scaleX(-1); }
.ar-fighter .rig-holder + .ar-plate { margin-top: -6px; }
.ar-fighter.opp .dog-rig { filter: hue-rotate(150deg) saturate(1.3) brightness(.55) drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.ab-fighter.opp .dog-rig { filter: hue-rotate(var(--hue, 150deg)) saturate(1.3) drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); }
@keyframes rigBreath { 50% { scale: 1.012 1.03; } }

.dr-head { transform-origin: 51% 53%; animation: rigHead 2.4s ease-in-out infinite; }
@keyframes rigHead { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3.5deg) translateY(-1.5%); } }
.dr-arm { transform-origin: 70.5% 67%; animation: rigWave 1.1s ease-in-out infinite; }
@keyframes rigWave { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(13deg); } }
.dr-medal { transform-origin: 43.5% 57%; animation: rigSwing 1.3s ease-in-out infinite; }
@keyframes rigSwing { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.dr-tongue { transform-origin: 39.8% 50.5%; animation: rigPant .32s ease-in-out infinite alternate; }
@keyframes rigPant { from { transform: scaleY(1); } to { transform: scaleY(1.14); } }
.dr-glint { position: absolute; inset: 0; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, .85) 47%, rgba(190, 230, 255, .5) 50%, transparent 55% 100%);
  background-size: 300% 100%; background-repeat: no-repeat; animation: rigGlint 3.2s ease-in-out infinite; }
@keyframes rigGlint { 0%, 55% { background-position: 120% 0; } 85%, 100% { background-position: -20% 0; } }

/* reactions in a fight */
.dog-rig.atk .dr-arm { animation: rigStrike .35s ease-in-out 2; }
@keyframes rigStrike { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(32deg); } }
.dog-rig.atk .dr-head { animation: none; transform: rotate(6deg) translateY(1%); transition: transform .12s; }
.dog-rig.hurt .dr-head { animation: rigHurt .45s ease-out; }
@keyframes rigHurt { 0% { transform: rotate(0); } 25% { transform: rotate(-14deg) translate(-3%, -2%); } 100% { transform: rotate(-3deg); } }
.dog-rig.hurt .dr-arm { animation: none; transform: rotate(-18deg); transition: transform .1s; }
.dog-rig.win .dr-arm { animation: rigWave .32s ease-in-out infinite; }
.dog-rig.win .dr-head { animation: rigHead .6s ease-in-out infinite; }
.dog-rig.win .dr-tongue { animation-duration: .18s; }
.ar-fighter .dog-rig img, .ar-fighter.me .dog-rig img, .ar-fighter.opp .dog-rig img, .ab-fighter .dog-rig img, .ab-fighter.me .dog-rig img, .ab-fighter.opp .dog-rig img { transform: none !important; filter: none !important; max-height: none; }

/* ---------- thumbs-up Bluzo (bluzo-fighter.webp): tall art that faces right ---------- */
.ar-fighter .dog-rig { width: auto; height: min(29vh, 240px); }
.ab-fighter .dog-rig { width: auto; height: min(42vh, 340px); }
.ar-fighter.me .dog-rig, .ab-fighter.me .dog-rig { transform: none; }
.ar-fighter.opp .dog-rig, .ab-fighter.opp .dog-rig { transform: scaleX(-1); }
.ar-fighter.me > img, .ab-fighter.me .ab-body > img { transform: none; }
.ar-fighter.opp > img, .ab-fighter.opp .ab-body > img { transform: scaleX(-1); }
.ar-fighter > img { height: min(29vh, 240px); width: auto; }
.ab-fighter .ab-body > img { height: min(42vh, 340px); width: auto; }
.dr-tail { animation: rigTail .9s ease-in-out infinite; }
@keyframes rigTail { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(7deg); } }
.dr-armL { animation: rigPumpL 1.4s ease-in-out infinite; }
@keyframes rigPumpL { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(6deg) translateY(-1%); } }
.dr-armR { animation: rigPumpR 1.4s ease-in-out -.7s infinite; }
@keyframes rigPumpR { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-5deg) translateY(-1%); } }
.dog-rig.atk .dr-armL { animation: rigPunchL .35s ease-in-out 2; }
@keyframes rigPunchL { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(30deg) translateX(4%); } }
.dog-rig.atk .dr-armR { animation: rigPunchR .35s ease-in-out .1s 2; }
@keyframes rigPunchR { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-18deg) translateX(3%); } }
.dog-rig.atk .dr-tail { animation-duration: .3s; }
.dog-rig.hurt .dr-armL { animation: none; transform: rotate(-14deg); transition: transform .1s; }
.dog-rig.hurt .dr-armR { animation: none; transform: rotate(14deg); transition: transform .1s; }
.dog-rig.hurt .dr-tail { animation: none; transform: rotate(-10deg); }
.dog-rig.win .dr-armL { animation: rigPumpL .35s ease-in-out infinite; }
.dog-rig.win .dr-armR { animation: rigPumpR .35s ease-in-out infinite; }
.dog-rig.win .dr-tail { animation-duration: .3s; }

/* PK fight layout: fighters fit their half of the ring, the result card is always on top */
.ab-bars { position: relative; z-index: 5; }
.ab-field { overflow: hidden; }
.ab-result { z-index: 20; }
.ab-skip { z-index: 21; }
.ab-fighter { display: flex; justify-content: center; }
.ab-fighter .dog-rig, .ab-fighter .ab-body > img { height: min(34vh, 270px); width: auto; max-width: 100%; }
.ar-fighter .dog-rig, .ar-fighter > img { height: min(24vh, 200px); width: auto; max-width: 100%; }
.arena.fighting > :not(.ar-battle):not(.ar-sheet) { visibility: hidden; }

/* ---------- thumbs-up Bluzo in the sled game ---------- */
.sled-intro { position: absolute; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-direction: column; align-items: center; pointer-events: none; transform: translateX(-50%); }
.sled-intro.show { animation: siIn .55s cubic-bezier(.2, 1.5, .4, 1); }
.sled-intro.leave { animation: siOut .45s ease-in forwards; }
@keyframes siIn { from { transform: translate(-50%, 120%) scale(.6); opacity: 0; } }
@keyframes siOut { to { transform: translate(-50%, 140%) scale(.7); opacity: 0; } }
.sled-intro .dog-rig, .sled-intro > img { height: min(30vh, 230px); width: auto; }
.si-bubble { margin-bottom: 6px; padding: 8px 14px; border-radius: 16px; background: #fff; color: var(--navy); font-family: var(--font-display); font-size: 18px; box-shadow: 0 4px 0 rgba(3, 58, 134, .25), 0 10px 20px rgba(0, 0, 0, .3); position: relative; }
.si-bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff; }
.go-dog { position: relative; z-index: 3; display: flex; justify-content: center; margin: 0 auto -26px; pointer-events: none; }
.go-dog.show { animation: siInDog .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes siInDog { from { transform: translateY(40px) scale(.6); opacity: 0; } }
.go-dog .dog-rig, .go-dog > img { height: min(20vh, 170px); width: auto; }
/* the results screen blurs its background image; never the dog */
.sled-over .go-dog > img, .sled-over .go-dog .dog-rig img { position: absolute; inset: auto; object-fit: fill; filter: none !important; transform: none !important; }
.sled-over .go-dog > img { position: static; }
.sled-over .go-dog .dog-rig img { inset: 0; width: 100%; height: 100%; }
.sled-intro .dog-rig img { filter: none !important; transform: none !important; }
.go-dog .ab-shadow, .sled-intro .ab-shadow { display: none; }
@media (max-height: 640px) { .go-dog .dog-rig, .go-dog > img { height: 120px; } }

/* iPhone performance: no shadow filters on moving dogs (each one is redrawn every frame);
   the opponent keeps only its colour tint */
.dog-rig { filter: none; }
.ar-fighter.opp .dog-rig { filter: hue-rotate(150deg) saturate(1.3); }
.ab-fighter.opp .dog-rig { filter: hue-rotate(var(--hue, 150deg)) saturate(1.3); }
.dr-part { will-change: transform; }

/* Stars and TON side by side in every quick buy sheet */
.qo-what { margin: 6px 0 8px; font-weight: 800; color: var(--ink-2); }
.qo-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qo-pay .btn { display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding-top: 10px; padding-bottom: 8px; }
.qo-pay .btn small { font-family: var(--font-text); font-size: 11px; font-weight: 800; opacity: .8; }
.qo-pay + .stack-btns { margin-top: 10px; }

/* ---------- lucky wheel ---------- */
.wheel-btn { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border-radius: 14px; font-size: 22px;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9); box-shadow: 0 4px 0 #4c1d95, 0 6px 14px rgba(109, 40, 217, .45); }
.wheel-btn span { display: inline-block; animation: wbSpin 6s linear infinite; }
@keyframes wbSpin { to { transform: rotate(360deg); } }
.wheel-btn:active { transform: translateY(calc(-50% + 3px)); box-shadow: 0 1px 0 #4c1d95; }
.wheel-card { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px; border-radius: 20px; text-align: left; color: #fff;
  background: linear-gradient(120deg, #4c1d95, #7c3aed 55%, #db2777); box-shadow: 0 6px 0 #2e1065, 0 12px 26px rgba(109, 40, 217, .4); }
.wheel-card.ready { animation: wcGlow 1.6s ease-in-out infinite; }
@keyframes wcGlow { 50% { box-shadow: 0 6px 0 #2e1065, 0 0 30px rgba(255, 200, 80, .8); } }
.wc-wheel { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 3px solid #ffd56b; animation: wbSpin 5s linear infinite;
  background: conic-gradient(#3b82f6 0 45deg, #1d4ed8 0 90deg, #3b82f6 0 135deg, #ffc533 0 180deg, #3b82f6 0 225deg, #1d4ed8 0 270deg, #3b82f6 0 315deg, #1d4ed8 0); }
.wc-text { flex: 1; min-width: 0; }
.wc-text b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 19px; }
.wc-text small { font-size: 12px; font-weight: 800; opacity: .9; }
.wc-go { flex: none; padding: 8px 14px; border-radius: 12px; background: linear-gradient(180deg, #ffde6b, #ff9a1f); color: #3a1d00; font-weight: 900; box-shadow: 0 3px 0 #b55a00; }

.wheel-view { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; align-items: center; color: #fff; overflow: hidden; background: #120a3a; touch-action: manipulation; }
.wv-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(110% 60% at 50% 42%, #3b2aa8 0%, #1b1260 45%, #0c0726 80%); }
.wheel-view.premium .wv-bg { background: radial-gradient(110% 60% at 50% 42%, #7c2d9c 0%, #3b0f60 45%, #14061f 80%); }
.wheel-view .ar-top { width: 100%; }
.wv-count { padding: 6px 10px; border-radius: 12px; font-size: 13px; font-weight: 900; background: rgba(0, 0, 0, .35); border: 2px solid rgba(255, 213, 107, .45); white-space: nowrap; }
.wv-ticker { width: 100%; overflow: hidden; padding: 7px 0; background: linear-gradient(90deg, #b45309, #f59e0b, #b45309); box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.wv-ticker-track { display: inline-flex; gap: 34px; white-space: nowrap; padding-left: 100%; font-size: 13px; font-weight: 800; color: #fff7e0; animation: wvTicker 26s linear infinite; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.wv-ticker-track b { color: #fff; }
@keyframes wvTicker { to { transform: translateX(-100%); } }
.wv-tabs { width: calc(100% - 28px); margin-top: 10px; background: rgba(0, 0, 0, .3); }
.wv-tabs button { color: rgba(255, 255, 255, .75); }
.wv-tabs button.on { background: #fff; color: var(--ink); }
.wv-stage { position: relative; width: min(84vw, 46vh, 340px); aspect-ratio: 1; margin: 14px 0 6px; flex: none; }
.wv-glow { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 90, .45), transparent 62%); animation: pulse 2s ease-in-out infinite; }
.wv-rim { position: absolute; inset: 0; border-radius: 50%; padding: 4.5%; background: radial-gradient(circle, #fff3c4 0, #ffcf4d 60%, #c97a12 100%);
  box-shadow: 0 0 0 4px #8a4b07, 0 12px 30px rgba(0, 0, 0, .55), inset 0 0 12px rgba(0, 0, 0, .35); }
.wv-wheel { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5); will-change: transform; }
.wv-wheel svg { display: block; width: 100%; height: 100%; }
.wv-bulbs i { position: absolute; left: 50%; top: 50%; width: 3.2%; height: 3.2%; margin: -1.6% 0 0 -1.6%; border-radius: 50%; background: #fff8d6;
  transform: rotate(var(--a)) translateY(-1350%); box-shadow: 0 0 8px #ffe08a; animation: bulb .9s steps(1) var(--d) infinite; }
@keyframes bulb { 50% { background: #ffb21e; box-shadow: 0 0 2px #ffb21e; } }
.wv-pointer { position: absolute; left: 50%; top: -4%; width: 13%; height: 15%; transform: translateX(-50%); z-index: 2;
  background: linear-gradient(180deg, #ff6b6b, #c81e1e); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .5)); }
.wv-hub { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); border-radius: 50%; z-index: 2;
  background: #ffd56b; padding: 3px; box-shadow: 0 0 0 4px #8a4b07, 0 4px 12px rgba(0, 0, 0, .5); }
.wv-hub img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.wv-spin { position: relative; margin-top: 8px; width: min(70vw, 260px); padding: 10px 0 8px; border-radius: 18px; color: #3a1d00; flex: none;
  background: linear-gradient(180deg, #ffe680, #ffb21e 60%, #ff8a00); box-shadow: 0 6px 0 #a34a00, 0 10px 24px rgba(255, 150, 0, .5); }
.wv-spin span { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1; letter-spacing: 2px; }
.wv-spin small { font-size: 12px; font-weight: 900; }
.wv-spin:active { transform: translateY(4px); box-shadow: 0 2px 0 #a34a00; }
.wv-spin.empty { filter: grayscale(.45); }
.wv-spin.spinning { pointer-events: none; filter: brightness(.85); }
.wv-info { margin: 10px 18px 0; text-align: center; font-size: 12.5px; font-weight: 700; opacity: .9; }
.wv-info b { color: #ffd56b; }
.wv-buy { width: calc(100% - 28px); display: grid; gap: 8px; margin-top: 10px; }
.wv-pack { padding: 8px; border-radius: 14px; background: rgba(0, 0, 0, .28); }
.wv-pack-name { margin: 0 0 6px 4px; font-weight: 900; font-size: 13px; }
.wv-pack .qo-pay .btn { min-height: 0; padding-top: 6px; padding-bottom: 5px; font-size: 14px; }
.wv-links { display: flex; gap: 8px; margin: 10px 0 calc(12px + env(safe-area-inset-bottom)); }
.wv-links button { padding: 8px 12px; border-radius: 12px; font-size: 12px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .12); }
@media (max-height: 700px) { .wv-stage { width: min(78vw, 40vh); margin-top: 8px; } .wv-info { display: none; } }

.wv-win { text-align: center; }
.wv-win-dog { display: flex; justify-content: center; margin: -8px 0 0; }
.wv-win-dog .dog-rig, .wv-win-dog > img { height: 140px; width: auto; }
.wv-win-dog .dog-rig img { filter: none !important; transform: none !important; }
.wv-win-ico { font-size: 44px; line-height: 1; margin-top: -6px; animation: findIn 1.2s cubic-bezier(.3, 1.4, .5, 1); }
.wv-win-prize { margin: 4px 0 14px; font-family: var(--font-display); font-size: 30px; color: var(--navy); }
.wv-win.big .wv-win-prize { background: linear-gradient(180deg, #ffb21e, #e2552b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wv-odds { text-align: left; }
.wv-odds h2, .wv-odds p { text-align: center; }
.wv-odds .eyebrow { margin: 12px 0 6px; }
.wv-odd { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.wv-odd:nth-child(odd) { background: #f3f6fb; }
.wv-bulbs i { transform: rotate(var(--a)) translateY(-1490%); }
.wv-win-ico { animation: abPop .5s cubic-bezier(.2, 1.6, .4, 1); }

/* Safari: a box whose only children are positioned layers collapses to 0 width when its width
   comes from aspect-ratio, so every animated Bluzo gets an explicit width (height x art ratio) */
.dog-rig { --rig-ratio: .5705; flex: none; max-width: none; }
.ar-fighter .dog-rig { height: min(24vh, 200px); width: calc(min(24vh, 200px) * var(--rig-ratio)); }
.ab-fighter .dog-rig { height: min(34vh, 270px); width: calc(min(34vh, 270px) * var(--rig-ratio)); }
.sled-intro .dog-rig { height: min(30vh, 230px); width: calc(min(30vh, 230px) * var(--rig-ratio)); }
.go-dog .dog-rig { height: min(20vh, 170px); width: calc(min(20vh, 170px) * var(--rig-ratio)); }
.wv-win-dog .dog-rig { height: 140px; width: calc(140px * var(--rig-ratio)); }
.rig-holder { width: auto; }
.ab-body { flex: none; }
@media (max-height: 640px) { .go-dog .dog-rig { height: 120px; width: calc(120px * var(--rig-ratio)); } }

/* ---------- tab layout: PK is a page in the bottom bar, upgrades live in the shop ---------- */
.seg4 { grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.seg4 button { font-size: 12px; padding: 9px 0; }
.shop-up-lead { margin: 12px 4px 0; font-weight: 700; color: var(--ink-2); font-size: 13px; }
#shopUpgrades .mini-balance { margin-top: 10px; }
.arena.as-tab { bottom: var(--nav-gap, 90px); z-index: 9; border-radius: 0 0 22px 22px; }
.arena.as-tab .ar-back { visibility: hidden; }
.arena.as-tab .ar-panel { border-radius: 24px; padding-bottom: 12px; }
.arena.as-tab.fighting { bottom: 0; z-index: 60; border-radius: 0; }
.ar-top { position: relative; z-index: 2; }
.arena.as-tab .ar-fighter .dog-rig { height: min(19vh, 165px); width: calc(min(19vh, 165px) * var(--rig-ratio)); }
.arena.as-tab .ar-fighter > img { height: min(19vh, 165px); }
