/* Pickaxe Empire — dark premium dashboard.
   Layout: sticky identity header, one full-width column of structured cards, 4-tab glass nav. Gold is the only accent. */
:root {
  color-scheme: dark;
  --bg: #0c0e13;
  --surface: #151922;
  --surface-2: #1c212d;
  --surface-3: #252b39;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --text: #f2f3f6;
  --text-2: #b4bacb;
  --mute: #7d8599;
  --gold: #f5c04a;
  --gold-2: #e09a1f;
  --gold-soft: rgba(245,192,74,.12);
  --gold-line: rgba(245,192,74,.35);
  --green: #3ddc97;
  --green-soft: rgba(61,220,151,.12);
  --red: #ff6b6b;
  --red-soft: rgba(255,107,107,.12);
  --blue: #6aa8ff;
  --f: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 18px;
  --nav-h: 66px;
  --safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 14px/1.45 var(--f); -webkit-tap-highlight-color: transparent;
  background-image: radial-gradient(90% 40% at 50% -10%, rgba(245,192,74,.10), transparent 70%); background-attachment: fixed; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--safe-top); z-index: 10; background: var(--bg); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }
.coin { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
svg { flex: none; }
.muted { color: var(--mute); } .soft { color: var(--text-2); } .mint { color: var(--green); } .rose { color: var(--red); } .gold-txt { color: var(--gold); }
.label { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .9px; }
.display { font-weight: 700; }
.gold-title { color: var(--gold); }
.outline { color: var(--text); }
.center-txt { text-align: center; }
.small { font-size: 12px; }

/* ---------- header ---------- */
.hdr { position: sticky; top: var(--safe-top); z-index: 5; background: rgba(12,14,19,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.who > span { min-width: 0; display: flex; flex-direction: column; }
.who b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { font-size: 12px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 700; font-size: 17px; color: #1a1205;
  background: linear-gradient(135deg, #ffe08a, var(--gold-2)); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold-line); }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.bal-pill { display: flex; align-items: center; gap: 6px; padding: 7px 14px 7px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 15px; flex: none; }

/* ---------- page ---------- */
.wrap { width: 100%; display: flex; flex-direction: column; gap: 12px;
  padding-block: 14px calc(var(--nav-h) + 24px + var(--safe-bottom)); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.page-head { padding: 4px 2px 2px; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.4px; }
.page-head p { margin: 2px 0 0; color: var(--mute); font-size: 13px; }
.page-sub { margin: 0; color: var(--mute); font-size: 13px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card, .panel, .box-wood { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel h2, .card h2 { font-size: 17px; font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head p { margin: 2px 0 0; font-size: 12px; color: var(--mute); }
.box-wood > .t { font-weight: 600; font-size: 15px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .4s ease; }
.bar.full > i { background: linear-gradient(90deg, #22b07a, var(--green)); }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.chip.gold { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.chip.mint { background: var(--green-soft); border-color: transparent; color: var(--green); }
.note { font-size: 12px; color: var(--mute); line-height: 1.5; margin: 0; }
.note b { color: var(--red); font-weight: 600; }
.empty { text-align: center; color: var(--mute); padding: 22px 10px; font-size: 14px; }

.btn { border-radius: 14px; padding: 13px 14px; font-weight: 600; font-size: 15px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, filter .15s, background .15s; }
.btn svg:not(.coin) { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn-gold { background: linear-gradient(180deg, #ffd56a, var(--gold-2)); color: #1a1205; box-shadow: 0 6px 18px rgba(245,192,74,.22); }
.btn-plum, .btn-soft { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); }
.btn-green { background: var(--green); color: #052016; }
.btn-sm { width: auto; padding: 8px 12px; font-size: 13px; border-radius: 12px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: #1a1205; background: linear-gradient(180deg, #ffd56a, var(--gold-2)); white-space: nowrap; }
.linkish { align-self: center; color: var(--gold); font-size: 13px; font-weight: 500; padding: 2px 6px; }

/* ---------- MINE ---------- */
.hero-card { background: linear-gradient(160deg, #22201a, var(--surface) 55%); border-color: var(--gold-line); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(245,192,74,.16), transparent 70%); pointer-events: none; }
.hero-card .big { display: flex; align-items: baseline; gap: 8px; font-size: 38px; font-weight: 700; letter-spacing: -1px; line-height: 1.05; }
.hero-card .big .coin { width: 30px; height: 30px; align-self: center; }
.hero-card .big em { font-style: normal; font-size: 15px; font-weight: 600; color: var(--mute); letter-spacing: 0; }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.split > div { padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.split > div + div { border-left: 1px solid var(--line); }
.split b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tile { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; display: grid; grid-template-columns: 34px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.tile .ti { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.tile .ti svg { width: 18px; height: 18px; }
.tile b { font-size: 17px; font-weight: 700; display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.tile b em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--mute); }

.mine-card { padding: 0; overflow: hidden; gap: 0; }
.scene { position: relative; background: #141a2b; }
.cave { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 46vh; }
.scene-tag, .scene-lv { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(12,14,19,.7); backdrop-filter: blur(6px); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.scene-tag { left: 10px; } .scene-lv { right: 10px; color: var(--gold); }
.scene-lv svg { width: 13px; height: 13px; }
.mine-foot { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: end; padding: 14px 16px 16px; }
.minfo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mined-now { display: flex; align-items: center; gap: 7px; font-size: 24px; font-weight: 700; }
.storage { font-size: 12px; color: var(--mute); display: flex; justify-content: space-between; gap: 8px; }
.claim-btn { width: auto; padding: 14px 22px; }
.cave .bub { animation: bub 2.8s ease-out infinite; opacity: 0; }
@keyframes bub { 0% { opacity: 0; transform: translateY(6px) } 15% { opacity: 1 } 70% { opacity: 1 } 100% { opacity: 0; transform: translateY(-26px) } }
.cave .glint { transform-box: fill-box; transform-origin: center; animation: glint 2.4s ease-in-out infinite; }
@keyframes glint { 0%,100% { opacity: .2; transform: scale(.6) } 50% { opacity: 1; transform: scale(1.1) } }
.cave .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flick .5s ease-in-out infinite alternate; }
@keyframes flick { from { transform: scale(1, 1) } to { transform: scale(.85, 1.15) } }
.cave .nug { transform-box: fill-box; transform-origin: 50% 80%; }
.cave.tap .nug { animation: thump .25s ease-out; }
@keyframes thump { 50% { transform: scale(1.04, .97) } }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--text-2); }
.quick .qi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); }
.quick .qi svg { width: 19px; height: 19px; }
.quick2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick2 button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; min-width: 0; }
.quick2 .qi { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.quick2 .qi svg { width: 18px; height: 18px; }
.quick2 b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick2 small { display: block; font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick2 > button > span:last-child { min-width: 0; }

.crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.mc { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 8px 6px 9px; text-align: center; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mc .portrait { width: 100%; border-radius: 10px; background: radial-gradient(circle at 50% 70%, rgba(245,192,74,.14), transparent 70%); }
.mc svg { width: 100%; height: auto; display: block; }
.mc b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mc small { font-size: 10.5px; color: var(--green); }
.mc.new { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

.callout { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--gold-soft); border: 1px solid var(--gold-line); text-align: left; width: 100%; }
.callout .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(245,192,74,.2); color: var(--gold); flex: none; }
.callout .ic svg { width: 20px; height: 20px; }
.callout-plain { background: var(--surface); border-color: var(--line-2); }
.callout-plain .ic { background: var(--surface-2); }
.callout .ic-miner { width: 44px; height: 44px; overflow: hidden; background: radial-gradient(circle at 50% 70%, rgba(245,192,74,.22), var(--surface-2) 70%); }
.callout .ic-miner svg { width: 44px; height: 44px; }
.callout b { display: block; font-size: 14px; font-weight: 600; }
.callout span { font-size: 12px; color: var(--text-2); }
.callout > svg { width: 18px; height: 18px; margin-left: auto; color: var(--mute); }
.demo { font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px dashed var(--gold-line); border-radius: 16px; padding: 12px; line-height: 1.5; }
.demo b { color: var(--gold); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.demo-actions button { padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; }

/* ---------- level art (Upgrade grid + level sheet) ---------- */
.hero { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; border: 1px solid var(--line-2); }
.hero > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zone-pill { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(12,14,19,.7); font-size: 12px; }
.stars { position: absolute; right: 10px; top: 10px; display: flex; gap: 1px; }
.stars svg { width: 15px; height: 15px; }
.lv-name { text-align: center; }
.lv-name b { display: block; font-size: 24px; font-weight: 700; line-height: 1.15; }
.lv-name span { color: var(--mute); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 6px; text-align: center; min-width: 0; }
.stat .k { font-size: 11px; color: var(--mute); display: flex; align-items: center; justify-content: center; gap: 4px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.stat .k svg { width: 13px; height: 13px; }
.stat .v { font-size: 17px; font-weight: 700; margin: 4px 0 1px; display: flex; align-items: center; justify-content: center; gap: 4px; overflow-wrap: anywhere; }
.stat .u { font-size: 11px; color: var(--green); }

/* ---------- UPGRADE ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg button { padding: 9px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--mute); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button svg { width: 16px; height: 16px; }
.seg button[aria-pressed="true"] svg { color: var(--gold); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--mute); font-weight: 500; font-size: 13px; }
.tab svg { width: 13px; height: 13px; }
.tab.reached { color: var(--text-2); }
.tab.sel { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.zone { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 400 / 110; max-width: 100%; border: 1px solid var(--line); }
.zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.zone::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,14,19,.85), rgba(12,14,19,.1) 80%); }
.zone .zt { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 1; }
.zone .zt b { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--text); }
.zone .zt span { font-size: 12px; color: var(--text-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.grid .card { padding: 8px; gap: 6px; text-align: left; border-radius: 16px; }
.grid .card.current { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.card .pic { position: relative; border-radius: 11px; overflow: hidden; aspect-ratio: 400 / 260; max-width: 100%; background: var(--surface-2); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.locked .pic img { filter: saturate(.3) brightness(.55); }
.card .lvp { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(12,14,19,.78); font-weight: 600; font-size: 12px; }
.card .stars { right: 5px; top: 5px; } .card .stars svg { width: 11px; height: 11px; }
.card .nm { font-weight: 600; font-size: 13.5px; line-height: 1.2; padding-inline: 2px; }
.card .meta { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--mute); padding-inline: 2px; }
.card .meta span { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.card .cta { border-radius: 9px; padding: 6px; font-size: 11.5px; font-weight: 600; text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; }
.cta.ok { background: var(--green-soft); color: var(--green); }
.cta.need { background: var(--surface-2); color: var(--text-2); }
.tiers { display: flex; flex-direction: column; gap: 8px; }
.tier { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tier .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(106,168,255,.12); color: var(--blue); }
.tier .ic svg { width: 20px; height: 20px; }
.tier.owned .ic { background: var(--green-soft); color: var(--green); }
.tier.next { border-color: var(--gold-line); background: var(--gold-soft); }
.tier b { font-size: 15px; font-weight: 600; display: block; } .tier small { color: var(--mute); font-size: 12px; display: flex; align-items: center; gap: 3px; }

/* ---------- EARN ---------- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { border-radius: 12px; padding: 8px 2px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--mute); font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.day b { font-size: 13px; color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 2px; }
.day.done { background: var(--green-soft); border-color: transparent; color: var(--green); } .day.done b { color: var(--green); }
.day.today { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.group-title { font-size: 11px; font-weight: 600; color: var(--mute); margin: 6px 2px -4px; text-transform: uppercase; letter-spacing: .9px; }
.tasks { display: flex; flex-direction: column; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.task { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.task .ic svg { width: 20px; height: 20px; }
.task b { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; }
.task small { display: flex; align-items: center; gap: 4px; color: var(--gold); font-size: 12px; font-weight: 600; margin-top: 2px; }
.task.done { opacity: .5; }
.task small em { font-style: normal; font-weight: 500; color: var(--mute); }
.task .ic-telegram { background: #229ed9; color: #fff; }
.task .ic-xbrand { background: #000; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.task .ic-discord { background: #5865f2; color: #fff; }
.task .ic-telegram svg, .task .ic-discord svg { width: 22px; height: 22px; }
.task .ic-xbrand svg { width: 18px; height: 18px; }
.task .ic-holder { background: rgba(245,192,74,.16); color: var(--gold); }
.task .ic-holder svg { width: 22px; height: 22px; }
.group-note { margin: 2px 2px -2px; font-size: 12px; line-height: 1.45; color: var(--text-2); }
.tbtn { padding: 7px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.tbtn.claim { background: linear-gradient(180deg, #ffd56a, var(--gold-2)); color: #1a1205; }
.tbtn.wait { background: transparent; border: 1px solid var(--line-2); color: var(--mute); cursor: default; }
.tdone { color: var(--green); display: flex; } .tdone svg { width: 22px; height: 22px; }

/* ---------- PROFILE ---------- */
.idcard { border-radius: var(--r); padding: 16px; background: linear-gradient(160deg, #22201a, var(--surface) 60%); border: 1px solid var(--gold-line); display: flex; flex-direction: column; gap: 12px; }
.idcard .top { display: flex; align-items: center; gap: 12px; }
.idcard .ava { width: 52px; height: 52px; font-size: 22px; }
.idcard .uid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.idcard .uid b { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idcard .uid small { font-size: 12px; color: var(--mute); }
.rankline { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.mini-lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.mini-lines > span { display: flex; flex-direction: column; gap: 2px; }
.mini-lines b { display: flex; align-items: center; gap: 4px; color: var(--text); font-size: 15px; text-transform: none; letter-spacing: 0; }
.eq { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.eq-row { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.eq-row:first-child { border-top: 0; }
.eq-row b { display: block; font-size: 14px; font-weight: 600; }
.eq-row small { display: block; font-size: 12px; color: var(--mute); line-height: 1.35; }
.eq-op { font-size: 18px; font-weight: 700; color: var(--gold); text-align: center; }
.eq-row .v { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.eq-row.eq-total { background: var(--gold-soft); }
.eq-row.eq-total .v { color: var(--gold); font-size: 19px; }
.seg3 { grid-template-columns: repeat(3, 1fr); position: sticky; top: calc(var(--safe-top) + 62px); z-index: 4; background: rgba(21,25,34,.95); backdrop-filter: blur(10px); }
.field { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 4px 4px 4px 14px; gap: 8px; }
.field:focus-within { border-color: var(--gold-line); }
.field input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: 600 16px var(--f); outline: none; padding: 8px 0; }
.field input::placeholder { color: var(--mute); font-weight: 500; }
.field .all { padding: 8px 14px; border-radius: 10px; background: var(--surface-3); color: var(--gold); font-weight: 600; font-size: 13px; }
.field input:disabled, .field .all:disabled { opacity: .45; cursor: default; }
.addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); padding: 10px 12px; border-radius: 12px; overflow-wrap: anywhere; user-select: all; }
.list { display: flex; flex-direction: column; }
.li { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.li:first-child { border-top: 0; }
.li .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.li .ic svg { width: 18px; height: 18px; }
.li > span { min-width: 0; }
.li b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li small { color: var(--mute); font-size: 12px; }
.li .amt { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.li .amt.plus { color: var(--green); } .li .amt.minus { color: var(--red); }
.status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-pending { color: var(--gold); background: var(--gold-soft); } .st-sent { color: var(--green); background: var(--green-soft); } .st-rejected { color: var(--red); background: var(--red-soft); }
.invite { background: linear-gradient(160deg, #1f2433, var(--surface)); border-color: var(--line-2); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perk { border-radius: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); }
.perk b { font-size: 20px; font-weight: 700; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.perk span { font-size: 12px; color: var(--text-2); }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.filters button[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.date-h { font-size: 11px; font-weight: 600; color: var(--mute); margin: 8px 0 -4px; text-transform: uppercase; letter-spacing: .8px; }
.date-h:first-child { margin-top: 0; }

/* ---------- bottom nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(15,18,24,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 0 env(safe-area-inset-right, 0px) var(--safe-bottom) env(safe-area-inset-left, 0px); }
.nav-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: var(--nav-h); }
.nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 500; font-size: 11px; color: var(--mute); }
.nav button::before { content: ""; position: absolute; top: 0; left: 50%; width: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); transform: translateX(-50%); transition: width .2s; }
.nav .ni { width: 46px; height: 30px; display: grid; place-items: center; border-radius: 999px; transition: background .2s; }
.nav .ni svg { width: 24px; height: 24px; }
.nav .ni .tone { fill: currentColor; opacity: 0; transition: opacity .2s; } .nav .ni .line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav .ni .acc { fill: currentColor; }
.nav button[aria-current="page"] { color: var(--gold); font-weight: 600; }
.nav button[aria-current="page"]::before { width: 28px; }
.nav button[aria-current="page"] .ni { background: var(--gold-soft); }
.nav button[aria-current="page"] .ni .tone { opacity: .25; }
.nav .dot { position: absolute; top: 9px; left: calc(50% + 10px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }

/* ---------- sheets & popups ---------- */
.scrim { position: fixed; inset: 0; background: rgba(4,5,8,.7); z-index: 20; opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 92%; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2);
  padding: 10px var(--gutter-r) calc(20px + var(--safe-bottom)) var(--gutter-l); transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.sheet.open { transform: translateY(0); }
.sheet-inner { width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 2px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { font-size: 20px; font-weight: 700; }
.x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); }
.x svg { width: 16px; height: 16px; }
.hold-box { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.hold-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hold-row b { font-size: 14px; font-weight: 600; }
.hold-row .amt { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; color: var(--green); }
.hold-row .amt.short { color: var(--gold); }
.need-line { text-align: center; color: var(--gold); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.unlocked { border-radius: 14px; background: var(--green-soft); padding: 14px; text-align: center; font-size: 16px; font-weight: 600; color: var(--green); display: flex; align-items: center; justify-content: center; gap: 8px; }
.unlocked svg { width: 22px; height: 22px; }
.rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); line-height: 1.5; font-size: 14px; }
.rules b { color: var(--text); font-weight: 600; }

.pop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; }
.pop[hidden] { display: none; }
.pop .scrim { z-index: 0; }
.pop-in { position: relative; z-index: 1; width: min(100%, 340px); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  background: var(--surface); border: 1px solid var(--gold-line); border-radius: 24px; padding: 24px 20px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pop h3 { font-size: 24px; font-weight: 700; letter-spacing: .5px; color: var(--gold); }
.rays { position: relative; width: 170px; height: 170px; display: grid; place-items: center; }
.rays::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(rgba(245,192,74,.28) 0 10deg, transparent 10deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation: spin 12s linear infinite; }
.rays::after { content: ""; position: absolute; inset: 24%; border-radius: 50%; background: radial-gradient(circle, rgba(245,192,74,.35), transparent 70%); }
.rays svg { position: relative; z-index: 1; width: 120px; height: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop p { margin: 0; color: var(--text-2); font-size: 14px; }
.pop .x { position: absolute; right: 12px; top: 12px; }

.toast { position: fixed; left: 50%; top: calc(var(--safe-top) + 70px); transform: translate(-50%, -12px); z-index: 40; background: var(--surface-3); border: 1px solid var(--line-2);
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; transition: .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- UPGRADE: level carousel ---------- */
.class-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px; }
.class-line b { font-size: 18px; font-weight: 700; }
.class-line span { font-size: 12px; color: var(--mute); }
.lvc { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); padding: 6px max(10%, 40px) 10px; overscroll-behavior-x: contain; }
.lvc::-webkit-scrollbar { display: none; }
.lvs { flex: 0 0 min(80%, 360px); scroll-snap-align: center; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); overflow: hidden;
  display: flex; flex-direction: column; transform: scale(.92); opacity: .55; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s, border-color .3s, box-shadow .3s; }
.lvs.on { transform: scale(1); opacity: 1; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.lvs.current { border-color: var(--gold); }
.lvs.current.on { box-shadow: 0 0 0 3px var(--gold-soft), 0 18px 40px rgba(0,0,0,.45); }
.lvs-art { position: relative; aspect-ratio: 400 / 250; background: var(--surface-2); }
.lvs-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lvs.locked .lvs-art img { filter: saturate(.35) brightness(.6); }
.lvs-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, var(--surface)); }
.lvs-lv { position: absolute; left: 12px; top: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(12,14,19,.78); font-weight: 700; font-size: 14px; }
.lvs-art .stars { top: 14px; right: 12px; } .lvs-art .stars svg { width: 14px; height: 14px; }
.lvs-badge { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gold); color: #1a1205; }
.lvs-badge svg { width: 13px; height: 13px; }
.lvs-badge.ok { background: var(--green); color: #052016; }
.lvs-badge.lock { background: rgba(12,14,19,.8); color: var(--text-2); border: 1px solid var(--line-2); }
.lvs-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.lvs-body h3 { font-size: 20px; font-weight: 700; }
.lvs-body p { margin: 2px 0 0; font-size: 12.5px; color: var(--mute); }
.lvs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.lvs-stats > div { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lvs-stats > div + div { border-left: 1px solid var(--line); }
.lvs-stats b { font-size: 15px; font-weight: 700; display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.lvs-stats .label { font-size: 10px; letter-spacing: .5px; white-space: nowrap; }
.lvs-stats em { font-style: normal; font-size: 10.5px; color: var(--mute); font-weight: 500; }
.lvc-btn { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--gold); }
.lvc-btn svg { width: 18px; height: 18px; }
.lvc-btn:active { transform: scale(.95); }
/* level navigator: current level + status, my-level shortcut, track with the reached part filled */
.lvnav { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.lvnav-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lvnav-now { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lvnav-now b { font-size: 18px; font-weight: 700; }
.lvnav-st { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.lvnav-st.here { background: var(--gold-soft); color: var(--gold); }
.lvnav-st.ok { background: var(--green-soft); color: var(--green); }
.lvnav-st.lock { background: var(--surface-3); color: var(--mute); }
.lvnav-top .chip { display: inline-flex; align-items: center; gap: 5px; }
/* slide-to-explore bar: a pill knob that shows the level and follows your finger (like a slider captcha) */
.lvslide { --kw: 104px; --p: 0; position: relative; height: 52px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; }
.lvslide-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--kw) + (100% - var(--kw)) * var(--p)); border-radius: 999px; background: linear-gradient(90deg, var(--gold-soft), rgba(245,192,74,.28)); transition: width .25s ease; }
.lvslide-reach { position: absolute; left: 14px; bottom: 5px; height: 3px; width: calc((100% - 28px) * var(--me) / 100); border-radius: 3px; background: var(--green); opacity: .8; }
.lvslide-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding-left: calc(var(--kw) + (100% - var(--kw)) * var(--p)); opacity: clamp(0, calc(1 - var(--p) * 2.4), 1); font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: transparent; pointer-events: none;
  background: linear-gradient(90deg, var(--mute) 0%, var(--mute) 40%, var(--text) 50%, var(--mute) 60%, var(--mute) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; animation: lvshine 2.6s linear infinite; transition: opacity .2s; }
.lvslide-hint svg { width: 13px; height: 13px; color: var(--mute); }
@keyframes lvshine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.lvslide-knob { position: absolute; top: 4px; left: calc(4px + (100% - var(--kw) - 8px) * var(--p)); width: var(--kw); height: 42px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(180deg, #ffd56a, var(--gold-2)); color: #1a1205; box-shadow: 0 4px 14px rgba(245,192,74,.35), inset 0 1px 0 rgba(255,255,255,.45); transition: left .25s ease, transform .15s ease; pointer-events: none; }
.lvslide-knob b { font-size: 15px; font-weight: 800; }
.lvslide-knob svg { width: 13px; height: 13px; opacity: .7; }
.lvslide.drag .lvslide-knob { transform: scale(1.06); transition: transform .15s ease; }
.lvslide.drag .lvslide-fill, .lvslide.drag .lvslide-knob { transition-property: transform; }
#lvcRange { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: grab; -webkit-appearance: none; appearance: none; background: none; }
#lvcRange::-webkit-slider-thumb { -webkit-appearance: none; width: 104px; height: 52px; cursor: grab; }
#lvcRange::-moz-range-thumb { width: 104px; height: 52px; border: 0; cursor: grab; }
.lvslide:focus-within { box-shadow: 0 0 0 2px var(--gold-line); }
@media (prefers-reduced-motion: reduce) { .lvslide-hint { animation: none; color: var(--mute); background: none; } .lvslide-knob, .lvslide-fill { transition: none; } }
.lvnav-ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--mute); padding: 0 16px; margin-top: -6px; }

/* ---------- EARN: daily check-in (compact: header row, 7 day pills, streak line) ---------- */
.checkin { gap: 12px; padding: 14px; }
.ck-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ck-title b { display: flex; align-items: center; gap: 5px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.ck-title b .coin { width: 16px; height: 16px; }
.ck-title small { font-size: 12px; color: var(--mute); }
.ck-btn { flex: none; padding: 9px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #1a1205; background: linear-gradient(180deg, #ffd56a, var(--gold-2)); box-shadow: 0 4px 14px rgba(245,192,74,.25); }
.ck-btn:active { transform: translateY(1px); }
.ck-done { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.ck-done svg { width: 18px; height: 18px; }
.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 50px; border-radius: 12px; background: var(--surface-2); color: var(--mute); }
.day-top { height: 16px; display: grid; place-items: center; }
.day-top small { font-size: 10px; font-weight: 600; letter-spacing: .4px; }
.day-top svg { width: 14px; height: 14px; }
.day b { font-size: 13px; font-weight: 700; color: var(--text-2); }
.day:last-child .day-top svg { width: 16px; height: 16px; }
.day.done { background: var(--gold-soft); color: var(--gold); }
.day.done b { color: var(--gold); }
.day.now { background: var(--gold); color: #1a1205; box-shadow: 0 0 0 3px rgba(245,192,74,.18); }
.day.now b { color: #1a1205; }
.ck-foot { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--mute); }
.ck-foot svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.ck-foot b { font-weight: 600; color: var(--text-2); }
@media (max-width: 360px) { .days { gap: 4px; } .day b { font-size: 12px; } }

/* ---------- UPGRADE: world map (map + journey strip of the 10 mines) ---------- */
.map-card { position: relative; padding: 0; gap: 0; overflow: hidden; border-color: var(--gold-line); background: #050a12; }
.map-box { overflow-x: auto; overflow-y: hidden; height: 370px; cursor: grab; scrollbar-width: none; overscroll-behavior-x: contain; background: #050a12; }
.map-box::-webkit-scrollbar { display: none; }
.map-box:active { cursor: grabbing; }
/* text and the mine strip sit on the map itself, over soft dark fades */
.map-top { position: absolute; inset: 0 0 auto 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px 28px; background: linear-gradient(180deg, rgba(5,10,18,.85), rgba(5,10,18,.5) 55%, transparent); pointer-events: none; }
.map-top h2 { font-size: 18px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.map-top p { margin: 2px 0 0; font-size: 12px; color: var(--text-2); text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.map-top .chip { pointer-events: auto; background: rgba(5,10,18,.7); backdrop-filter: blur(6px); }
.wmap { display: block; height: 100%; width: auto; max-width: none; }
.wmap .grid path { stroke: rgba(150,200,230,.06); stroke-width: 1; fill: none; stroke-dasharray: 3 6; }
.wmap .land { stroke: rgba(255,210,120,.55); stroke-width: 1.3; stroke-linejoin: round; }
.wmap .sea { fill: #0d2638; stroke: rgba(255,210,120,.35); stroke-width: 1; }
.wmap .vig { pointer-events: none; }
.wmap .route { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 2; stroke-dasharray: 3 8; stroke-linecap: round; }
.wmap .route-glow { fill: none; stroke: rgba(245,192,74,.35); stroke-width: 9; stroke-linecap: round; filter: blur(4px); }
.wmap .route-done { fill: none; stroke: #ffd56a; stroke-width: 3; stroke-dasharray: 6 8; stroke-linecap: round; animation: wmflow 1.4s linear infinite; }
@keyframes wmflow { to { stroke-dashoffset: -28; } }
.wmap .pin { cursor: pointer; }
.wmap .pin .hit { fill: transparent; }
.wmap .pin .disc { fill: #1d2433; stroke: #4d5568; stroke-width: 2; }
.wmap .pin .rim { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1; }
.wmap .pin .n { font: 700 11px var(--f); fill: var(--mute); text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.wmap .pin.done .disc { fill: #3d3016; stroke: var(--gold); }
.wmap .pin.done .rim { stroke: rgba(245,192,74,.35); }
.wmap .pin.done .n { fill: var(--gold); }
.wmap .pin.here .disc { fill: var(--gold); stroke: #fff4cf; stroke-width: 3; filter: drop-shadow(0 0 8px rgba(245,192,74,.9)); }
.wmap .pin.here .rim { stroke: rgba(26,18,5,.25); }
.wmap .pin.here .n { fill: #1a1205; font-size: 16px; font-weight: 800; }
.wmap .pin .halo { fill: none; stroke: rgba(245,192,74,.35); stroke-width: 1.5; stroke-dasharray: 3 5; transform-box: fill-box; transform-origin: center; animation: wmspin 12s linear infinite; }
@keyframes wmspin { to { transform: rotate(360deg); } }
.wmap .pin .pulse { fill: rgba(245,192,74,.35); transform-box: fill-box; transform-origin: center; animation: pinpulse 1.8s ease-out infinite; }
@keyframes pinpulse { 0% { transform: scale(.6); opacity: 1 } 100% { transform: scale(2.4); opacity: 0 } }
.wmap .pin .tag { display: none; pointer-events: none; }
.wmap .pin.sel .tag, .wmap .pin.here .tag { display: inline; }
.wmap .pin .tag rect { fill: rgba(6,18,29,.9); stroke: var(--gold-line); }
.wmap .pin.here .tag rect { fill: var(--gold); stroke: none; }
.wmap .pin .tag text { font: 600 12px var(--f); fill: var(--text); text-anchor: middle; }
.wmap .pin.here .tag text { fill: #1a1205; font-weight: 700; }
.wmap .pin.sel:not(.here) .disc { stroke: #fff; stroke-width: 3; }
.wmap .pin:focus-visible { outline: none; } .wmap .pin:focus-visible .disc { stroke: #fff; stroke-width: 3; }
.wmap .compass circle { fill: rgba(6,18,29,.7); stroke: var(--gold-line); }
.wmap .compass path { fill: var(--gold); } .wmap .compass .s { fill: #6b5520; }
.wmap .compass text { font: 700 10px var(--f); fill: var(--gold); text-anchor: middle; }
.wmap.real .grid path { stroke: rgba(255,255,255,.07); }
.wmap.real .route { stroke: rgba(255,255,255,.45); }
.wmap.real .pin .disc { fill: rgba(10,14,22,.85); stroke: rgba(255,255,255,.55); }
.wmap.real .pin .n { fill: #e8ebf2; }
.wmap.real .pin.done .disc { fill: #3d3016; stroke: var(--gold); }
.wmap.real .pin.done .n { fill: var(--gold); }
.wmap.real .pin.here .disc { fill: var(--gold); stroke: #fff4cf; }
.wmap.real .pin.here .n { fill: #1a1205; }
@media (prefers-reduced-motion: reduce) { .wmap .route-done, .wmap .pin .halo, .wmap .pin .pulse { animation: none; } }

/* journey strip: one stop per mine, joined by a line that turns gold up to where you are */
.journey { position: absolute; inset: auto 0 0 0; display: flex; overflow-x: auto; scrollbar-width: none; padding: 26px 6px 10px; scroll-behavior: smooth; background: linear-gradient(0deg, rgba(5,10,18,.92), rgba(5,10,18,.7) 60%, transparent); }
.journey::-webkit-scrollbar { display: none; }
.jst { position: relative; flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; background: none; color: var(--mute); }
.jst::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.18); z-index: 0; }
.jst:first-child::before { display: none; }
.jst.done::before, .jst.here::before { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.jdot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #141a26; border: 2px solid var(--surface-3); color: var(--mute); transition: transform .15s; }
.jdot svg { width: 14px; height: 14px; stroke-width: 3; }
.jst small { font-size: 10.5px; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.8); text-align: center; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jst.done .jdot { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.jst.done small { color: var(--text-2); }
.jst.here .jdot { background: var(--gold); border-color: #fff4cf; color: #1a1205; box-shadow: 0 0 0 4px rgba(245,192,74,.18), 0 0 14px rgba(245,192,74,.5); }
.jst.here small { color: var(--gold); }
.jst.sel .jdot { transform: scale(1.12); outline: 2px solid var(--text); outline-offset: 2px; }
.jst.sel small { color: var(--text); }
.jst:focus-visible { outline: none; } .jst:focus-visible .jdot { outline: 2px solid var(--gold); outline-offset: 2px; }

.site-card { padding: 0; gap: 0; overflow: hidden; }
.site-card.here { border-color: var(--gold-line); }
.site-art { position: relative; aspect-ratio: 400 / 150; background: var(--surface-2); }
.site-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
.site-card.lock .site-art img { filter: saturate(.35) brightness(.55); }
.site-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, var(--surface)); }
.site-num, .site-state { position: absolute; top: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; background: rgba(12,14,19,.78); }
.site-num { left: 10px; } .site-state { right: 10px; }
.site-state svg { width: 13px; height: 13px; }
.site-card.done .site-state { color: var(--green); } .site-card.here .site-state { color: var(--gold); } .site-card.lock .site-state { color: var(--text-2); }
.site-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.site-body h2 { font-size: 20px; font-weight: 700; }
.site-body .row > div:first-child p { margin: 2px 0 0; font-size: 12.5px; }
.site-nav { display: flex; gap: 8px; }
.site-nav .lvc-btn { width: 38px; height: 38px; }
.site-nav .lvc-btn:disabled { opacity: .35; cursor: default; }
.site-blurb { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.site-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.site-facts > div { background: var(--surface-2); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-facts b { font-size: 13px; font-weight: 600; }

/* ---------- image assets (art.js) ---------- */
img.coin { object-fit: contain; }
img.star { width: 1em; height: 1em; flex: none; object-fit: contain; vertical-align: -0.12em; }
.stars img, .scene-lv img { width: 15px; height: 15px; display: block; }
.card .stars img { width: 11px; height: 11px; }
.lvs-art .stars img { width: 14px; height: 14px; }
.scene-lv img { width: 13px; height: 13px; }
.cave .strip { transform-box: fill-box; animation: strip 1s steps(var(--n)) infinite; }
@keyframes strip { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .cave .strip { animation: none; } }
.wmap .land-paper { opacity: .32; mix-blend-mode: soft-light; pointer-events: none; }
.cave .tglow { opacity: .55; mix-blend-mode: screen; animation: tglow 1.6s ease-in-out infinite alternate; }
@keyframes tglow { to { opacity: .85; } }
.tg-gate { min-height: 80vh; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; padding: 24px 16px; }
.tg-gate-art { width: 100%; max-width: 420px; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 18px; border: 1px solid var(--gold-line); }
.tg-gate-coin .coin { width: 44px; height: 44px; margin-top: -36px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.tg-gate h1 { margin: 0; font-size: 28px; }
.tg-gate p { margin: 0; max-width: 320px; }
.tg-gate .btn { margin-top: 6px; }
.credits { margin: 18px 4px 4px; font-size: 11px; line-height: 1.5; color: var(--mute); text-align: center; }
.credits a { color: inherit; text-decoration: underline; }
.vbadge { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #3fe0a0; background: rgba(63,224,160,.12); }
.vbadge svg { width: 11px; height: 11px; }
.vsteps { display: block; margin-top: 2px; color: var(--mute); }
.btn-wide { width: 100%; margin-top: 10px; }
/* crew hitting the nugget */
.cave .chop { transform-box: fill-box; transform-origin: 50% 100%; animation: chop 1.15s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes chop { 0%, 100% { transform: rotate(0); } 45% { transform: rotate(-9deg); } 62% { transform: rotate(7deg); } 75% { transform: rotate(0); } }
.cave .hit { opacity: 0; transform-box: fill-box; transform-origin: center; animation: hit 1s linear infinite; }
@keyframes hit { 0%, 55% { opacity: 0; transform: scale(.3); } 62% { opacity: 1; transform: scale(1.1); } 80%, 100% { opacity: 0; transform: scale(.6); } }
@media (prefers-reduced-motion: reduce) { .cave .chop, .cave .hit { animation: none; } }
a.btn { text-decoration: none; }

/* ---------- light theme (Profile → Appearance). Token overrides plus the few surfaces that were dark-only. ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f0;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --surface-3: #e7e5df;
  --line: rgba(40,32,12,.08);
  --line-2: rgba(40,32,12,.15);
  --text: #1b1d24;
  --text-2: #4a4f5e;
  --mute: #7b8090;
  --gold: #d4930f;
  --gold-2: #c27f08;
  --gold-soft: rgba(212,147,15,.13);
  --gold-line: rgba(212,147,15,.42);
  --green: #11a26b;
  --green-soft: rgba(17,162,107,.12);
  --red: #e04646;
  --red-soft: rgba(224,70,70,.1);
  --blue: #2f6fd6;
}
:root[data-theme="light"] body { background-image: radial-gradient(90% 40% at 50% -10%, rgba(212,147,15,.10), transparent 70%); }
:root[data-theme="light"] .hdr { background: rgba(255,255,255,.88); }
:root[data-theme="light"] .nav { background: rgba(255,255,255,.92); box-shadow: 0 -6px 20px rgba(40,32,12,.06); }
:root[data-theme="light"] .seg3 { background: rgba(255,255,255,.95); }
:root[data-theme="light"] .card, :root[data-theme="light"] .panel, :root[data-theme="light"] .task, :root[data-theme="light"] .quick2 button, :root[data-theme="light"] .callout-plain { box-shadow: 0 1px 2px rgba(40,32,12,.05); }
:root[data-theme="light"] .hero-card, :root[data-theme="light"] .idcard { background: linear-gradient(160deg, #fdf3dc, var(--surface) 60%); }
:root[data-theme="light"] .invite { background: linear-gradient(160deg, #eef2fa, var(--surface)); }
:root[data-theme="light"] .split, :root[data-theme="light"] .rankline { background: rgba(40,32,12,.04); }
:root[data-theme="light"] .scrim { background: rgba(20,18,12,.45); }
:root[data-theme="light"] .vbadge { color: var(--green); }
:root[data-theme="light"] .tbtn.wait { color: var(--text-2); }
/* labels that sit on photos and the map keep light text in both themes */
:root[data-theme="light"] :is(.scene-tag, .scene-lv, .zone-pill, .card .lvp, .lvs-lv, .site-num) { color: #f2f3f6; }
:root[data-theme="light"] .lvs-badge.lock { color: #d5d9e3; }
:root[data-theme="light"] .site-card.lock .site-state { color: #d5d9e3; }
/* the world map card is always dark (it is a satellite photo) */
.map-card { --text: #f2f3f6; --text-2: #c3c8d4; --mute: #8a92a6; --surface-2: #1c212d; --surface-3: #252b39; --gold: #f5c04a; --gold-2: #e09a1f; --gold-soft: rgba(245,192,74,.14); --gold-line: rgba(245,192,74,.4); color: var(--text); }
.seg-theme { grid-template-columns: repeat(3, 1fr); }

/* ---------- PROFILE (redesign): identity header, holding card, section headers, settings ---------- */
.pf-head { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.pf-id { display: flex; align-items: center; gap: 12px; }
.pf-id .ava { width: 48px; height: 48px; font-size: 20px; }
.pf-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-name b { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-name small { font-size: 12px; color: var(--mute); }
.pf-rank { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--gold); padding: 8px 12px; border-radius: 10px; background: var(--gold-soft); }
.pf-rank span:last-child { color: var(--text-2); font-weight: 500; }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.pf-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; background: var(--surface-2); min-width: 0; text-align: center; }
.pf-stats b { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.pf-stats b .coin { width: 13px; height: 13px; }
.pf-stats > div:last-child b { font-size: 11.5px; font-weight: 600; }
.pf-stats span { font-size: 10.5px; color: var(--mute); white-space: nowrap; }
.pf-hold { gap: 10px; }
.pf-total { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pf-total .coin { width: 24px; height: 24px; align-self: center; }
.pf-total b { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.pf-total em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--mute); }
.pf-total .muted { margin-left: auto; font-size: 12.5px; }
.pf-sub { margin: -4px 0 0; font-size: 12px; color: var(--mute); }
.pf-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-split > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.pf-split b { display: inline-flex; align-items: center; gap: 4px; font-size: 17px; font-weight: 700; }
.pf-split b .coin { width: 15px; height: 15px; }
.pf-split small { font-size: 11px; line-height: 1.35; color: var(--mute); }
.ph { display: flex; align-items: center; gap: 10px; }
.ph h2 { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.ph-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.ph-ic svg { width: 17px; height: 17px; }
.pf-buy { flex-direction: row; align-items: center; gap: 12px; }
.pf-buy > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-buy b { font-size: 15px; font-weight: 600; }
.pf-buy small { font-size: 11.5px; line-height: 1.4; color: var(--mute); }
.pf-settings { gap: 10px; }
.set-row b { display: block; font-size: 14px; font-weight: 600; }
.set-row small { font-size: 12px; color: var(--mute); }
.set-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--text); text-align: left; }
.set-link span { flex: 1; }
.set-link svg { width: 17px; height: 17px; color: var(--mute); flex: none; }
.set-link svg:first-child { color: var(--gold); }
@media (max-width: 360px) { .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app-ver { display: block; margin: 4px auto 0; padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--mute); }
.fee-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 10px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.fee-tiers > div { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px; background: var(--surface-2); }
.fee-tiers span { font-size: 11px; color: var(--mute); }
.fee-tiers b { font-size: 12.5px; font-weight: 600; }
.recv { color: var(--green); font-weight: 700; }
.ref-card { border-color: var(--gold-line); background: linear-gradient(160deg, var(--gold-soft), var(--surface) 55%); gap: 12px; }
.ref-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.ref-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; background: var(--surface-2); min-width: 0; }
.ref-stats b { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.ref-stats b .coin { width: 14px; height: 14px; }
.ref-stats span { font-size: 11px; color: var(--mute); }
.ref-claim { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--gold-line); }
.ref-claim > span { display: flex; flex-direction: column; min-width: 0; }
.ref-claim small { font-size: 11.5px; color: var(--mute); }
.ref-claim b { display: inline-flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; color: var(--gold); line-height: 1.15; }
.ref-claim b .coin { width: 20px; height: 20px; }
.ref-claim .btn { width: auto; flex: none; padding-inline: 20px; }
