:root {
  --bg: #0a0b10;
  --panel: #14161f;
  --panel-2: #1b1e2b;
  --line: #272b3a;
  --text: #e8eaf2;
  --muted: #8b90a6;
  --accent: #16e0a3;
  --accent-2: #ff5da2;
  --warn: #ffcf5c;
  --danger: #ff5d5d;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #1a1330 0%, var(--bg) 55%);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

.view { padding: 0 16px 40px; }
[hidden] { display: none !important; }

/* ── Disclosure ─────────────────────────────────────────────── */
#disclosure {
  background: #2a230f;
  color: var(--warn);
  border: 1px solid #4a3c12;
  border-radius: 10px;
  font-size: 12px;
  padding: 10px 40px 10px 16px;
  position: relative;
  line-height: 1.45;
  max-width: 760px;
  margin: 8px auto 28px;
}
#disclosure strong { color: #ffe39a; }
#disclosure-close {
  position: absolute; right: 8px; top: 6px;
  background: none; border: none; color: var(--warn);
  font-size: 20px; cursor: pointer; line-height: 1;
}

/* ── Logo / typography ──────────────────────────────────────── */
.logo { font-weight: 800; font-size: 40px; letter-spacing: -1px; margin: 0; color: var(--brand, inherit); }
.logo span { color: var(--brand, var(--accent-2)); }
.logo.small { font-size: 22px; }
.brand-logo { display: inline-block; }
.tagline { color: var(--muted); margin: 6px 0 22px; }

/* ── Landing / Auth ─────────────────────────────────────────── */
#auth-view { display: grid; place-items: center; min-height: 88vh; }
.landing {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  max-width: 1020px; width: 100%; padding: 30px 16px;
}
@media (max-width: 860px) {
  .landing { grid-template-columns: 1fr; max-width: 460px; gap: 24px; }
  .hero-girl { order: -1; }
}

.hero-girl { position: relative; display: flex; justify-content: center; }
.hero-img {
  width: 100%; max-width: 360px; max-height: 72vh; object-fit: cover; object-position: top center;
  border-radius: 20px; display: block; border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
/* The landing fight is a <canvas>, which has no intrinsic size — give it an explicit
   aspect-ratio so it lays out (0-height otherwise) and the demo loop can measure it. */
#landing-demo {
  width: 100%; max-width: 360px; aspect-ratio: 4 / 5; height: auto; max-height: 72vh;
  background: #0e0b14; image-rendering: pixelated;
}
.speech-bubble {
  position: absolute; top: 5%; right: 2%; z-index: 2;
  background: #fff; color: #1a1330; font-weight: 800; font-size: 15px;
  padding: 10px 16px; border-radius: 16px; box-shadow: 0 10px 26px rgba(0,0,0,.4);
  animation: bob 2.6s ease-in-out infinite;
}
.speech-bubble::after {
  content: ''; position: absolute; bottom: -8px; left: 22px;
  border: 9px solid transparent; border-top-color: #fff; border-bottom: 0;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.hero-copy { text-align: left; }
.hero-copy .logo { font-size: 54px; }
.hero-tagline { color: var(--text); font-size: 18px; line-height: 1.45; margin: 6px 0 18px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.hero-points li { color: var(--muted); font-size: 14px; line-height: 1.4; }
.hero-points strong { color: var(--text); }

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; text-align: center;
}
.hero-copy .auth-card { margin: 0; }
.tabs { display: flex; gap: 6px; background: var(--panel-2); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tab {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  background: none; color: var(--muted); font-weight: 600; cursor: pointer;
}
.tab.active { background: var(--panel); color: var(--text); }
form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
input {
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); padding: 12px; border-radius: 10px; font-size: 15px;
  font-family: 'JetBrains Mono', monospace;
}
input:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 12px; color: var(--warn); margin: -4px 0 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.get-one { color: var(--accent); font-weight: 700; font-size: 12px; text-decoration: none; white-space: nowrap; }
.get-one:hover { text-decoration: underline; }
.fineprint { font-size: 11px; color: var(--muted); margin-top: 18px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0; }
/* Passwordless (FaucetPay) login: no password field, so tighten it — pull the
   fineprint up, drop the empty-error space reservation, and shrink the card. */
.auth-card.passwordless { padding: 20px; }
.auth-card.passwordless .error { min-height: 0; }
.auth-card.passwordless .fineprint { margin-top: 8px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  border: none; border-radius: 10px; padding: 12px 16px; font-weight: 700;
  cursor: pointer; font-size: 14px; transition: transform .05s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #062018; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { background: #2a3a35; color: #6b8f83; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* Tasks (offerwall) button — animated gradient so it stands out from the ghost buttons.
   Shared by the topbar #tasks-btn and the Bonus Wall "More offers" CTA (.tasks-cta). */
#tasks-btn, .tasks-cta {
  position: relative; overflow: hidden; border: none; color: #04130d; font-weight: 800;
  background: linear-gradient(110deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 220% 100%; animation: tasks-grad 3.5s linear infinite;
}
#tasks-btn::after, .tasks-cta::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.45) 50%, transparent 62%);
  background-size: 220% 100%; animation: tasks-sheen 3.5s linear infinite;
}
#tasks-btn:hover, .tasks-cta:hover { filter: brightness(1.08); }
@keyframes tasks-grad { to { background-position: -220% 0; } }
@keyframes tasks-sheen { 0% { background-position: 135% 0; } 100% { background-position: -135% 0; } }
@media (prefers-reduced-motion: reduce) { #tasks-btn, #tasks-btn::after, .tasks-cta, .tasks-cta::after { animation: none; } }
/* Bonus Wall → Offerwall cross-promo row. */
.sb-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 2px; color: var(--muted); font-size: 13px; }

/* ── Game layout ────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; max-width: 1320px; margin: 0 auto;
}
.wallet { display: flex; align-items: center; gap: 12px; }
.addr { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid {
  display: grid; gap: 16px; max-width: 1320px; margin: 0 auto;
  /* character (hero+gear+claims) | combat | tasks */
  grid-template-columns: 340px minmax(0, 1fr) 280px;
}
/* Wide-ish: drop the 4th column under the 3rd (two side panels share a row). */
@media (max-width: 1180px) {
  .grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .grid .miner { grid-column: 1 / -1; }
}
/* Tablet: miner + reveal on top, two side panels below side-by-side. */
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .reveal { grid-column: 1 / -1; }
}
/* Mobile: single column. */
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px;
}
.panel h2 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; }
.panel h2.mt { margin-top: 24px; }
.sub { color: var(--muted); font-size: 12px; margin: -8px 0 14px; }

/* ── Miner ──────────────────────────────────────────────────── */
.status { color: var(--accent); font-size: 12px; font-family: 'JetBrains Mono', monospace; }
.status.off { color: var(--muted); }

/* hashrate allocation windows */
.alloc-label { font-size: 11px; color: var(--muted); margin: 0 0 6px; }
.mine-windows { display: flex; gap: 10px; margin-bottom: 14px; }
.mine-win {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 12px; text-align: center;
}
.mine-win.win-zero { border-color: #1d4a3e; }
.mine-win.win-zems { border-color: #4a2348; }
.mine-head { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.mine-pct { font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.win-zero .mine-pct { color: var(--accent); }
.win-zems .mine-pct { color: var(--accent-2); }
.mine-hash { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; margin-top: 8px; }
.mine-yield { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 4px; }
.mine-adj { display: flex; gap: 8px; margin-top: 12px; }
.adj {
  flex: 1; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 7px 0; font-size: 16px; font-weight: 800; cursor: pointer; line-height: 1;
}
.adj:hover { background: var(--line); }
.adj:disabled { opacity: .35; cursor: not-allowed; }

/* locked / preview in middle view */
.lock-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(5,6,10,.75);
  color: var(--warn); font-size: 18px; padding: 4px 10px; border-radius: 99px;
}
.locked-note { color: var(--muted); font-size: 13px; text-align: center; margin: 14px 0 4px; line-height: 1.5; }
.locked-note strong { color: var(--text); }

/* inline gift area */
#gift-area { margin-top: 16px; }
.present-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 6px; }
.present-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 6px; text-align: center; cursor: pointer; transition: border-color .1s, transform .05s;
}
.present-card:hover:not(.disabled) { border-color: var(--accent-2); }
.present-card.disabled { opacity: .45; cursor: not-allowed; }
.present-card .emoji { font-size: 26px; }
.present-card .pname { font-size: 12px; font-weight: 700; margin-top: 2px; }
.present-card .pcost { font-size: 11px; color: #e98bd0; font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.present-card .ppts { font-size: 10px; color: var(--muted); }
.stat-row { display: flex; gap: 8px; margin-bottom: 10px; }
.stat { flex: 1; background: var(--panel-2); border-radius: 10px; padding: 8px; }
.stat .k { display: block; font-size: 11px; color: var(--muted); }
.stat .v { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 15px; }
.console {
  background: #05060a; border: 1px solid var(--line); border-radius: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent);
  height: 110px; overflow: hidden; padding: 8px 10px; margin: 0 0 10px; white-space: pre-wrap;
  line-height: 1.5;
}
.balance-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel-2); border-radius: 11px; padding: 10px 12px;
}
.balance-box .k { font-size: 11px; color: var(--muted); }
.balance-box .btn { padding: 8px 16px; font-size: 13px; }
.balance { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; color: var(--accent); }
.balance small { font-size: 11px; color: var(--muted); }
.claim-msg { font-size: 12px; color: var(--warn); min-height: 0; margin: 5px 0 0; }

/* Distinct, appealing claim boxes: green for ZERO, rose for Zems. */
.balance-box.zero {
  background: linear-gradient(135deg, rgba(22, 224, 163, .14), rgba(22, 224, 163, .04));
  border: 1px solid rgba(22, 224, 163, .45);
}
.balance-box.zero .balance { color: var(--accent); }
.balance-box.zero .btn.primary { background: var(--accent); color: #062018; }
.balance-box.zems {
  background: linear-gradient(135deg, rgba(255, 93, 162, .14), rgba(255, 93, 162, .04));
  border: 1px solid rgba(255, 93, 162, .45);
}
.balance-box.zems .balance { color: var(--accent-2); }
.balance-box.zems .btn.primary { background: var(--accent-2); color: #2a0716; }

/* Path-to-withdrawal progress under the ZERO balance */
.withdraw-progress { margin: 6px 2px 0; }
.withdraw-progress .wp-track {
  height: 6px; border-radius: 4px; overflow: hidden;
  background: rgba(22, 224, 163, .12);
}
.withdraw-progress .wp-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #4dffd0);
  transition: width .3s ease;
}
.withdraw-progress .wp-label { font-size: 10px; color: var(--muted); margin-top: 4px; text-align: right; }
.withdraw-progress.zems .wp-track { background: rgba(255, 93, 162, .12); }
.withdraw-progress.zems .wp-fill { background: linear-gradient(90deg, var(--accent-2), #ff9ace); }

/* Payment-proof wall on the landing — matches the .landing width (1020px) */
.payouts { max-width: 1020px; width: 100%; margin: 8px auto 4px; padding: 0 16px; text-align: center; }
.payouts-title { font-size: 20px; margin: 0 0 2px; }
.payouts-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.payouts-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
@media (max-width: 860px) { .payouts-list { grid-template-columns: 1fr; } }
.po-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid rgba(22, 224, 163, .25);
  border-radius: 10px; padding: 8px 12px; font-size: 13px;
}
.po-addr { font-family: 'JetBrains Mono', monospace; color: var(--muted); text-align: left; }
.po-amt { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 700; white-space: nowrap; }
.po-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.po-tx { color: var(--accent); font-size: 12px; text-decoration: none; white-space: nowrap; }
.po-tx:hover { text-decoration: underline; }
.po-tx.muted { color: var(--muted); }
@media (max-width: 560px) {
  .po-row { grid-template-columns: 1fr auto; row-gap: 2px; }
}

/* ── Lucky Spin ──────────────────────────────────────────────── */
.spin-btn { width: 100%; margin-top: 8px; padding: 11px; font-weight: 800; color: #2a0716;
  background: linear-gradient(135deg, #ffcf5c, #ff9ace, #7b5cff); background-size: 220% 100%;
  animation: spinhue 3s linear infinite; }
@keyframes spinhue { to { background-position: 220% 0; } }
.spin-btn:disabled { opacity: .55; animation: none; cursor: not-allowed; }
.wheel-wrap { position: relative; width: 220px; height: 220px; margin: 14px auto 6px; }
.wheel { width: 100%; height: 100%; border-radius: 50%; position: relative;
  border: 6px solid var(--panel-2); box-shadow: 0 6px 30px rgba(0, 0, 0, .5); transform: rotate(0deg); }
.wheel-label { position: absolute; top: 50%; left: 50%; width: 20px; margin: -10px 0 0 -10px;
  text-align: center; font-weight: 800; font-size: 15px; color: #fff; font-family: 'JetBrains Mono', monospace; }
.wheel-pointer { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 19px solid var(--accent-2); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.wheel-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 3px solid var(--panel-2);
  display: flex; align-items: center; justify-content: center; font-size: 20px; }
.spin-result { min-height: 22px; font-weight: 800; color: var(--accent); margin: 4px 0; font-size: 16px; }
.spin-ad { display: flex; justify-content: center; margin: 10px 0; }
.spin-ad iframe { max-width: 100%; }

/* ── Daily streak ────────────────────────────────────────────── */
.streak-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; margin-top: 8px; text-align: center; }
.streak-head { font-weight: 800; font-size: 12px; margin-bottom: 4px; }
.streak-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 5px; }
.streak-days .sd { border-radius: 6px; padding: 3px 1px; background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.streak-days .sd-day { font-size: 8px; color: var(--muted); line-height: 1; }
.streak-days .sd-z { font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; }
.streak-days .sd.done { background: rgba(22, 224, 163, .14); border-color: rgba(22, 224, 163, .45); }
.streak-days .sd.done .sd-z { color: var(--accent); }
.streak-days .sd.next { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.streak-box .btn { width: 100%; font-size: 12px; padding: 6px 10px; }
.streak-msg { font-size: 12px; color: var(--accent); margin: 4px 0 0; min-height: 0; }

/* ── Zems lottery ────────────────────────────────────────────── */
.lottery-box { background: linear-gradient(135deg, rgba(123,92,255,.14), rgba(255,93,162,.08));
  border: 1px solid rgba(123,92,255,.4); border-radius: 12px; padding: 12px; margin-top: 16px; text-align: center; }
.lottery-head { font-weight: 800; font-size: 14px; }
.lottery-pot { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 800; color: var(--accent-2); margin: 4px 0; }
.lottery-info { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.lottery-box .btn { width: 100%; }
.lottery-last { font-size: 11px; color: var(--muted); margin: 8px 0 0; min-height: 13px; }

/* ── Daily quests ────────────────────────────────────────────── */
.quests-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; margin-top: 8px; }
.quests-head { font-weight: 800; font-size: 12px; margin-bottom: 4px; }
.quests-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.quests-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; padding: 4px 7px; background: var(--panel); border-radius: 8px; border: 1px solid var(--line); }
.quests-list li.qdone { opacity: .6; }
.q-label { flex: 1 1 auto; }
.q-prog { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.q-done { color: var(--accent); font-weight: 800; }
.q-claim { white-space: nowrap; }

/* ── Bonus Wall ──────────────────────────────────────────────── */
/* Earn button (lives in the zems-box next to Lucky Spin). Green = real ZERO. */
.sb-btn { width: 100%; margin-top: 8px; padding: 11px; font-weight: 800; border: none; color: #04221a;
  background: linear-gradient(135deg, #16e0a3, #5af0c8); box-shadow: 0 3px 14px rgba(22, 224, 163, .32); }
.sb-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.sb-modal-card { max-width: 520px; }
.sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 8px; }
.sb-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  color: var(--text); font: inherit; transition: border-color .15s, transform .1s; }
.sb-tile:hover:not(.done) { border-color: var(--accent2); transform: translateY(-2px); }
.sb-tile:disabled { opacity: .6; cursor: wait; }
.sb-tile.done { cursor: default; opacity: .55; }
.sb-tier { font-weight: 800; font-size: 13px; }
.sb-reward { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); line-height: 1.4; }
.sb-ads { font-size: 11px; color: var(--muted); }
/* "Paid Links" (PTP) tiles — distinct gold treatment; turns green when claimable. */
.sb-tile.ptp { border-color: #b8862b; background: linear-gradient(180deg, rgba(255,196,77,.12), var(--panel-2)); }
.sb-tile.ptp:hover:not(.done) { border-color: #ffc44d; }
.sb-tile.ptp .sb-tier { color: #ffc44d; letter-spacing: .3px; }
.sb-tile.ptp .sb-ads { color: #d9b25e; }
.sb-tile.ptp.ready { border-color: var(--accent); background: linear-gradient(180deg, rgba(22,224,163,.16), var(--panel-2)); }
.sb-tile.ptp.ready .sb-ads { color: var(--accent); font-weight: 700; }
.sb-state { font-size: 12px; color: var(--accent); font-weight: 800; }
.sb-msg { color: var(--muted); font-size: 12px; min-height: 16px; margin: 4px 0 0; }
@media (max-width: 560px) { .sb-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── User Ads (member PTP) ─────────────────────────────────────────── */
.up-tabs { display: flex; gap: 6px; margin: 4px 0 14px; }
.up-tab { flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.up-tab.active { color: var(--text); border-color: var(--accent); background: var(--panel); }
.up-list { min-height: 60px; max-height: 48vh; overflow-y: auto; }
.up-top { font-size: 10px; font-weight: 800; color: var(--accent); letter-spacing: .5px; margin-bottom: 2px; }
.up-top-tile { box-shadow: 0 0 0 1px var(--accent) inset; }
.up-mine-tile { box-shadow: 0 0 0 1px var(--accent-2) inset; cursor: default; opacity: .92; }
.up-yours { color: var(--accent-2); }
.up-vip-tile { box-shadow: 0 0 0 1px #f7b52e inset; } /* VIP-owned listing — gold, ranks first */
.up-top.up-vip { color: #ffd76a; }

/* ── Membership ─────────────────────────────────────────────────────── */
/* VIP cosmetics: gold topbar button when active + gold names in leaderboards. */
/* VIP button — always prominent (gold outline + gentle pulse); solid gold when active. */
@keyframes vipPulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(247,181,46,.85) inset, 0 0 6px rgba(247,181,46,.3); } 50% { box-shadow: 0 0 0 1px rgba(247,181,46,.85) inset, 0 0 15px rgba(247,181,46,.6); } }
.btn.member-btn { border-color: #f7b52e; color: #ffd76a; font-weight: 800; animation: vipPulse 2.4s ease-in-out infinite; }
.btn.member-btn:hover { background: rgba(247,181,46,.14); border-color: #ffd76a; }
@media (prefers-reduced-motion: reduce) { .btn.member-btn { animation: none; } }
.member-btn.is-member { background: linear-gradient(180deg,#ffd76a,#f7b52e); border-color: #f7b52e; color: #201400; font-weight: 800; animation: none; box-shadow: 0 0 12px rgba(247,181,46,.5); }
/* Golden "Become a VIP for {x}× earnings" CTA next to a headline (non-members). */
.vip-cta { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: #ffd76a; cursor: pointer; vertical-align: middle; white-space: nowrap; }
.vip-cta:hover { text-decoration: underline; filter: brightness(1.08); }
/* Standalone VIP accent line (under the wheel / offerwall sub) */
.vip-line { margin: 12px 0 0; text-align: center; }
.vip-line:empty { display: none; }
.vip-line .vip-cta { margin-left: 0; }
.lb-vip { color: #ffd76a; font-weight: 700; }
.mem-active { background: #0f3328; color: var(--accent); border-radius: 10px; padding: 12px; font-weight: 700; text-align: center; }
.mem-inactive { color: var(--muted); text-align: center; padding: 8px; font-size: 13px; }
.mem-perk { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 7px 0; font-size: 13px; font-weight: 600; text-align: left; }
#member-pay { margin-top: 16px; font-size: 13px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px; line-height: 1.6; text-align: left; }
#member-pay b { color: var(--accent); word-break: break-all; }
/* Wider two-column VIP modal — spends the extra width to cut height. */
#member-modal .modal-card { max-width: 840px; padding: 26px 28px 24px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; } /* scroll when taller than the viewport */
.mem-body { display: grid; grid-template-columns: 1.02fr 1fr; gap: 24px; align-items: start; margin-top: 14px; }
#member-pay { margin-top: 0; }
.mem-pay-row { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.mem-coin-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; }
.mem-coin { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; font-size: 12.5px; font-weight: 800; font-family: inherit; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.mem-coin:hover { color: var(--text); border-color: var(--muted); }
.mem-coin.active { color: var(--text); border-color: var(--accent); background: rgba(22,224,163,.12); }
.mem-pay-head { margin: 0; text-align: center; font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.45; text-wrap: balance; }
.mem-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-top: 16px; }
.mem-pay-grid #mem-invoice { min-width: 0; }
@media (max-width: 680px) { .mem-body, .mem-pay-grid { grid-template-columns: 1fr; } }
.mem-buy-head { font-size: 13.5px; font-weight: 700; margin: 0 0 12px; text-align: left; line-height: 1.4; }
/* Vibrant gradient pass cards (inspired by tiered lock/deposit cards). */
.mem-passes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.mem-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 18px 12px 15px; border: 0; border-radius: 14px; cursor: pointer;
  color: #fff; font-family: inherit; text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.mem-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.mem-card:active { transform: translateY(-1px); }
.mem-card-dur { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; opacity: .9; }
.mem-card-price { font-size: 30px; font-weight: 900; line-height: 1; margin: 4px 0 1px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.mem-card-per { font-size: 11.5px; font-weight: 700; opacity: .92; }
.mem-card-screws { margin-top: 8px; padding: 3px 11px; font-size: 12px; font-weight: 800; white-space: nowrap; border-radius: 999px; background: rgba(255,255,255,.2); }
.mem-g1 { background: linear-gradient(160deg,#3f6fe6,#5a3fd6); }
.mem-g2 { background: linear-gradient(160deg,#8038e2,#a52cce); }
.mem-g3 { background: linear-gradient(160deg,#c22ec2,#e42d95); }
.mem-g4 { background: linear-gradient(160deg,#ff9a2e,#ff3d86); }
.mem-card.is-best { box-shadow: 0 0 0 2px #ffd76a, 0 12px 30px rgba(255,120,60,.45); }
.mem-best-tag { margin-top: 7px; font-size: 10px; font-weight: 900; letter-spacing: .08em; color: #ffe9a8; }
.mem-ribbon {
  position: absolute; top: 12px; right: -30px; transform: rotate(45deg);
  padding: 3px 34px; font-size: 9.5px; font-weight: 800; letter-spacing: .03em;
  background: rgba(0,0,0,.32); color: #fff;
}
.mem-ribbon.best { background: rgba(0,0,0,.5); color: #ffe9a8; }
.mem-card.mem-test {
  grid-column: 1 / -1; /* full row — no dangling empty cell */
  background: none; border: 1px dashed var(--warn); color: var(--warn);
  box-shadow: none; min-height: 52px; justify-content: center; font-size: 13px; font-weight: 700;
}
.mem-card.mem-test:hover { transform: none; box-shadow: none; }
.mem-card.selected { outline: 2px solid #fff; outline-offset: 2px; } /* the plan you're paying for */
.mem-reassure { margin: 16px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; }
.mem-screwtest { display: block; width: 100%; margin-top: 12px; padding: 9px 12px; font-size: 12px; font-weight: 700; text-align: left; color: var(--warn); background: var(--panel-2); border: 1px dashed var(--warn); border-radius: 8px; cursor: pointer; font-family: inherit; }
.mem-screwtest:hover { background: #22242f; }
.mem-screwtest b { color: var(--text); }
.ref-vip-pct { color: #ffd76a; font-weight: 800; } /* VIP: boosted referral % shown in gold */
/* Reusable inline VIP teaser chip — shown wherever a VIP bonus applies; opens the modal. */
.vip-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #201400; background: linear-gradient(180deg,#ffd76a,#f7b52e); border-radius: 999px; white-space: nowrap; cursor: pointer; vertical-align: baseline; }
.vip-badge:hover { filter: brightness(1.07); }
.mine-vip { margin-top: 8px; text-align: center; } /* VIP teaser under the Screws window's +/- */
.hash-vip { color: #ffd76a; } /* active member's doubled Screw hashrate */
.hash-vip-tag { font-size: .5em; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.fb-vip { color: #ffd76a; font-weight: 800; } /* ⭐VIP marker on the faucet reward preview */
.logo-wrap { display: inline-flex; align-items: center; gap: 4px; }
/* DEV-only reset (↻) beside the logo — small, muted, dashed to read as a tool not a feature. */
.dev-reset { width: 22px; height: 22px; padding: 0; margin-left: 4px; border-radius: 50%;
  border: 1px dashed var(--warn); background: transparent; color: var(--warn); cursor: pointer;
  font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  opacity: .7; transition: opacity .12s, transform .3s; }
.dev-reset:hover { opacity: 1; transform: rotate(-180deg); }
.vip-sup { font-size: 9px; font-weight: 800; color: #ffd76a; line-height: 1; margin-left: 2px; white-space: nowrap; letter-spacing: .02em; }
.mine-vip:empty { display: none; } /* members: no chip, no gap */
.faucet-vip { margin: 6px 0 0; text-align: center; font-size: 12px; }
/* Payment progress tracker — mirrors the pending → detected → paid poll. */
.mem-selected { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--accent); text-align: left; }
.mem-steps { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.mem-step { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); text-align: left; }
.mem-step-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line); }
.mem-step.is-active { color: var(--text); font-weight: 700; }
.mem-step.is-active .mem-step-dot { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(255,207,92,.2); }
.mem-step.is-done { color: var(--text); }
.mem-step.is-done .mem-step-dot { background: var(--accent); border-color: var(--accent); }
.mem-pay-to { font-size: 13px; margin: 16px 0 10px; text-align: left; }
.mem-field { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin: 8px 0; }
.mem-field-label { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mem-field code { flex: 1; min-width: 0; font-size: 13px; word-break: break-all; color: var(--accent); text-align: left; }
.mem-wait { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.mem-fee-hint { margin: 2px 0 8px; font-size: 11.5px; color: var(--warn); text-align: left; line-height: 1.4; }
.mem-slow-hint { margin: 16px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; }
/* Purchase history (VIP passes + Screws packs) with live status */
.mem-history { margin: 18px 0 0; text-align: left; }
.mem-history:empty { display: none; }
.mem-hist-head { font-size: 11px; font-weight: 800; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .05em; }
.mem-hist-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 11px; margin: 6px 0;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.mem-hist-row .mh-item { font-weight: 700; }
.mem-hist-row .mh-usd { color: var(--muted); }
.mem-hist-row .mh-ok { margin-left: auto; color: var(--accent); font-weight: 700; }
.mem-hist-row .mh-mid { margin-left: auto; color: var(--warn); font-weight: 700; }
.mem-hist-row .mh-wait { margin-left: auto; color: var(--muted); font-weight: 700; }
.mem-example { min-width: 0; } /* right column of the payment row, beside the copy fields */
.mem-example-head { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: left; line-height: 1.5; }
.mem-example-img { display: block; width: 100%; max-width: 380px; height: auto; max-height: 480px; margin: 0; border-radius: 10px; border: 1px solid var(--line); }
.dev-chip { position: fixed; left: 10px; bottom: 10px; z-index: 60; background: var(--warn); color: #1a1200;
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .5px; pointer-events: none; }

/* ── Support tickets ─────────────────────────────────────────────────── */
.btn.has-reply { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.sup-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 5px; text-align: left; }
.sup-select, .sup-textarea { width: 100%; font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.sup-textarea { resize: vertical; line-height: 1.5; min-height: 96px; }
.sup-select:focus, .sup-textarea:focus { outline: none; border-color: var(--accent); }
#support-send { width: 100%; margin-top: 14px; }
.sup-msg { font-size: 12px; margin: 8px 0 0; min-height: 16px; text-align: center; }
.sup-msg.ok { color: var(--accent); } .sup-msg.err { color: var(--danger); }
.sup-hist-head { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 8px; text-align: left; }
.sup-ticket { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin: 8px 0; text-align: left; }
.sup-ticket.sup-open { border-left: 3px solid var(--warn); }
.sup-ticket.sup-answered { border-left: 3px solid var(--accent); }
.sup-tk-top { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.sup-tk-cat { color: var(--text); } .sup-tk-status { color: var(--muted); white-space: nowrap; }
.sup-tk-msg { font-size: 13px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.sup-tk-reply { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.sup-tk-reply b { color: var(--accent); }
/* Threaded conversation bubbles (user ↔ support) */
.sup-bubble { border-radius: 10px; padding: 8px 11px; margin: 6px 0; font-size: 13px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word; max-width: 92%; }
.sup-bubble .sup-who { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; opacity: .75; }
.sup-you { background: var(--panel-2); border: 1px solid var(--line); margin-left: auto; }
.sup-staff { background: rgba(22,224,163,.10); border: 1px solid var(--accent); }
.sup-staff .sup-who { color: var(--accent); opacity: 1; }
.sup-replybox { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sup-reply-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.sup-reply-input { flex: 1; min-width: 0; font-family: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); resize: vertical; }
.sup-reply-input:focus { outline: none; border-color: var(--accent); }
.sup-reply-send { white-space: nowrap; }
/* Loud reply notice: only shown when the user has an unread support reply. */
.support-reply-chip { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 120;
  background: linear-gradient(180deg, var(--accent), #12b487); color: #04120c; font-family: inherit;
  font-size: 13px; font-weight: 800; padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 8px 26px rgba(0,0,0,.45); animation: supPulse 2s ease-in-out infinite; max-width: 92vw; }
.support-reply-chip:hover { filter: brightness(1.06); }
@keyframes supPulse { 0%, 100% { box-shadow: 0 8px 26px rgba(0,0,0,.4); } 50% { box-shadow: 0 8px 30px rgba(22,224,163,.55); } }
@media (prefers-reduced-motion: reduce) { .support-reply-chip { animation: none; } }
.up-why { text-align: left; font-size: 12.5px; line-height: 1.6; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.up-label { display: block; text-align: left; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.up-input { width: 100%; box-sizing: border-box; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.up-input:focus { outline: none; border-color: var(--accent); }
.up-vendors { font-size: 12px; color: var(--muted); text-align: left; margin: 0 0 6px; line-height: 1.6; }
.up-vendors a { color: var(--accent-2); }
.up-cost { font-size: 13px; color: var(--text); text-align: left; margin: 10px 0 14px; }
.up-mine { margin-top: 18px; }
.up-mine-head { font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; margin-bottom: 8px; }
.up-mine-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.up-mv { flex: 1; text-align: left; text-transform: capitalize; }
.up-mp { font-family: 'JetBrains Mono', monospace; color: var(--muted); }
.up-ms { font-size: 11px; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; }
.up-active { background: #0f3328; color: var(--accent); }
.up-done { background: #13233a; color: var(--accent-2); }
.up-removed { background: #3a1414; color: var(--danger); }

/* ── ZERO → Zems exchange ─────────────────────────────────────── */
/* Small text link under the balance (inside the claim box). */
.ex-link { display: inline-block; background: none; border: 0; padding: 0; margin: 3px 0 0;
  font: inherit; font-size: 11px; font-weight: 600; color: var(--accent-2); cursor: pointer; }
.ex-link:hover { text-decoration: underline; filter: brightness(1.1); }
.ex-have-line { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.ex-range { width: 100%; margin: 16px 0 10px; accent-color: var(--accent-2); }
.ex-get { font-size: 24px; font-weight: 800; color: #e98bd0; font-family: 'JetBrains Mono', monospace; }
.ex-cost { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ex-cost #ex-cost-val { font-family: 'JetBrains Mono', monospace; color: var(--text); }
.ex-rate { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

/* ── Lottery win toast ───────────────────────────────────────── */
.win-toast { position: fixed; top: -80px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: linear-gradient(135deg, #7b5cff, #ff5da2); color: #fff; font-weight: 800; font-size: 15px;
  padding: 14px 24px; border-radius: 0 0 14px 14px; box-shadow: 0 8px 30px rgba(123,92,255,.5);
  transition: top .4s cubic-bezier(.17,.84,.44,1); max-width: 90vw; text-align: center; }
.win-toast.show { top: 0; }

/* ── Leaderboard ─────────────────────────────────────────────── */
.lb-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.lb-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.lb-list li.mine { border-color: var(--accent); background: rgba(22, 224, 163, .12); }
.lb-rank { font-weight: 800; color: var(--muted); width: 22px; text-align: center; }
.lb-addr { flex: 1 1 auto; font-family: 'JetBrains Mono', monospace; }
.lb-val { color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.lb-list li.muted { color: var(--muted); justify-content: center; }

/* ── Reveal ─────────────────────────────────────────────────── */
.image-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #05060a; aspect-ratio: 2/3; }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
#reveal-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #05060a; }
#reveal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.reveal-done {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 28px; color: var(--accent);
  background: rgba(5,6,10,.35); letter-spacing: 2px;
}
.reveal-ready {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font-weight: 800; font-size: 16px; color: #062018; letter-spacing: 1px;
  background: var(--accent); padding: 8px; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.claim-girl-btn { flex: 1; animation: pulse 1.6s ease-in-out infinite; }
.reveal-actions { display: flex; gap: 8px; margin-top: 12px; }
.reveal-actions .btn { flex: 1; }
#donate-btn:disabled { opacity: .5; cursor: not-allowed; }
.progress { height: 8px; background: var(--panel-2); border-radius: 99px; margin: 14px 0 8px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.reveal-pct { font-size: 12px; color: var(--muted); margin: 0; }
.reveal-pct span { color: var(--text); font-weight: 700; }

/* ── Shop ───────────────────────────────────────────────────── */
.shop-item { background: var(--panel-2); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.shop-item .name { font-weight: 700; font-size: 14px; }
.shop-item .lvl { color: var(--muted); font-size: 12px; }
.shop-item .desc { color: var(--muted); font-size: 11px; margin: 4px 0 10px; }
.shop-item button { width: 100%; }
.shop-item .cost { font-family: 'JetBrains Mono', monospace; }

/* ── Character / traits ─────────────────────────────────────── */
.character { text-align: center; }
.char-img {
  width: auto; max-width: 100%; height: 340px; object-fit: contain;
  display: block; margin: 0 auto 20px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.5));
}
.char-stats { display: flex; flex-direction: column; gap: 16px; }
.trait { display: flex; align-items: center; gap: 9px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; text-align: left; }
.trait-emoji { font-size: 17px; flex: none; }
.trait-info { flex: 1; min-width: 0; }
.trait-line { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.trait-name { font-weight: 700; font-size: 12.5px; }
.trait-lvl { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); }
.trait-bar { height: 4px; background: var(--panel); border-radius: 99px; overflow: hidden; margin: 4px 0 3px; }
.trait-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.trait-bonus { font-size: 10.5px; color: var(--accent); }
.trait-plus { flex: none; border: none; border-radius: 8px; background: var(--accent); color: #062018;
  font-weight: 800; font-size: 12px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.trait-plus:disabled { background: #2a3a35; color: #6b8f83; cursor: not-allowed; }
.trait-cost { font-family: 'JetBrains Mono', monospace; font-size: 10px; }

.claims { list-style: none; padding: 0; margin: 0; }
.claims li { display: flex; justify-content: space-between; font-size: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.claims .amt { font-family: 'JetBrains Mono', monospace; }
.badge { font-size: 10px; padding: 2px 7px; border-radius: 99px; text-transform: uppercase; }
.badge.pending { background: #3a3413; color: var(--warn); }
.badge.paid { background: #0f3328; color: var(--accent); }
.badge.failed { background: #3a1414; color: var(--danger); }

/* ── Claim modal ────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5,6,10,.78); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 440px; position: relative;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; text-align: center;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-card h2 { margin: 0 0 4px; font-size: 20px; }
.modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.modal-x {
  position: absolute; right: 12px; top: 10px; background: none; border: none;
  color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1;
}
.modal-ad { display: flex; justify-content: center; margin: 0 0 16px; }
.modal-ad[hidden] { display: none; } /* hidden attr must beat the flex rule */
.faucet-steps { display: flex; gap: 6px; justify-content: center; margin: 0 0 14px; }
.faucet-steps .dot { width: 9px; height: 9px; border-radius: 99px; background: var(--line); }
.faucet-steps .dot.done { background: var(--accent); }
.faucet-steps .dot.active { background: var(--accent-2); }
.captcha { text-align: left; margin-bottom: 12px; }
.captcha-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.captcha-target { width: 56px; height: 56px; border-radius: 8px; border: 2px solid var(--accent); object-fit: cover; }
.captcha-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.captcha-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; transition: border-color .1s, transform .05s;
}
.captcha-grid img:hover { border-color: var(--line); }
.captcha-grid img.selected { border-color: var(--accent); transform: scale(.96); }

/* Partial-claim amount box (zero withdrawal funnel) */
.claim-amount-box { margin: 12px 0 2px; text-align: left; }
.claim-amount-label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.claim-amount-row { display: flex; align-items: center; gap: 8px; }
/* Multi-coin payout picker (zero withdrawal funnel) */
.claim-coin-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.claim-coin-select { background: var(--panel-2, #1a1424); color: var(--text, #eee); border: 1px solid var(--line, #3a3050); border-radius: 8px; padding: 7px 10px; font: inherit; }
.claim-coin-preview { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent-2, #7de3ff); }
.claim-amount-input { flex: 1 1 auto; min-width: 0; font-family: 'JetBrains Mono', monospace;
  font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); }
.claim-amount-input:focus { outline: none; border-color: var(--accent); }
.claim-amount-unit { font-size: 13px; color: var(--muted); font-weight: 600; }
.claim-amount-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.claim-amount-hint.err { color: var(--danger); }
.claim-modal-msg { font-size: 12px; color: var(--danger); min-height: 16px; margin: 4px 0 10px; }
.modal-confirm { width: 100%; }

/* ── Zems panel ─────────────────────────────────────────────── */
.zems-box {
  background: linear-gradient(135deg, #2a1430, #1b1e2b);
  border: 1px solid #3a2348; border-radius: 12px; padding: 11px; margin-bottom: 12px;
}
.zems-bal { font-size: 18px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: #e98bd0; }
.zems-bal small { font-size: 12px; color: var(--muted); }
/* Gold + Runes side by side */
.cur-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.runes-bal { font-size: 18px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: #9d7bff; }
.runes-bal small { font-size: 12px; color: var(--muted); }
/* Pets shop */
.pets-bal { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.pets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pet-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pet-card.premium { border-color: #6a4ec0; box-shadow: inset 0 0 0 1px rgba(157,123,255,.25); }
.pet-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pet-emoji { font-size: 30px; line-height: 1; }
.pet-name { font-size: 12px; font-weight: 700; color: var(--text); }
.pet-bonus { font-size: 10.5px; color: var(--accent-2); font-weight: 700; }
.pet-act { width: 100%; margin-top: 5px; font-size: 11px; padding: 5px 4px; font-family: 'JetBrains Mono', monospace; }

/* ── Left-column shop buttons (Gear · Pets · Potions · Artifacts) ─────────── */
.shop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.shop-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 8px;
  font-size: 13.5px; font-weight: 800; border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-2); color: var(--text); cursor: pointer; transition: transform .08s, box-shadow .12s, border-color .12s; }
.shop-btn:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 3px 12px rgba(0,0,0,.25); }
.shop-btn { position: relative; }
.shop-btn .sb-ic { font-size: 17px; line-height: 1; }
/* Live potion-buff badge on the Potions button (×mult + countdown). */
.shop-badge { position: absolute; top: -6px; right: -6px; background: linear-gradient(135deg, #7fd66a, #34a853);
  color: #06210f; font-size: 9.5px; font-weight: 800; padding: 2px 5px; border-radius: 9px;
  font-family: 'JetBrains Mono', monospace; box-shadow: 0 1px 5px rgba(0,0,0,.35); white-space: nowrap; }
/* Active-buff banner inside the Potions modal. */
.potion-active { text-align: center; font-size: 13px; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(52,168,83,.18), rgba(127,214,106,.10)); border: 1px solid rgba(127,214,106,.4); color: var(--text); }
.potion-active b { color: #7fd66a; }

/* ── Gear shop modal ──────────────────────────────────────────────────────── */
.gear-modal-card { max-width: 720px; }
.gear-bal { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
/* Tabs — one per slot, tinted by the EQUIPPED item's tier (grey if empty). */
.gear-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.gtab { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; padding: 7px 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--muted); }
.gtab:hover { border-color: var(--accent); }
.gtab.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.gtab-ic { width: 24px; height: 24px; color: #6b7180; }
.gtab-ic svg { width: 24px; height: 24px; display: block; }
.gtab-lbl { font-size: 10.5px; font-weight: 700; }
.gtab[data-tier="0"] .gtab-ic { color: #c08a52; } .gtab[data-tier="1"] .gtab-ic { color: #e08a44; }
.gtab[data-tier="2"] .gtab-ic { color: #aab4c6; } .gtab[data-tier="3"] .gtab-ic { color: #dde6f2; }
.gtab[data-tier="4"] .gtab-ic { color: #ffd76a; } .gtab[data-tier="5"] .gtab-ic { color: #7fe9f2; }
.gtab[data-tier="6"] .gtab-ic { color: #d08bff; }
/* Item grid */
.gear-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gcard { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 12px; padding: 10px 11px; display: flex; flex-direction: column; gap: 5px; }
.gcard.on { box-shadow: 0 0 0 1px var(--accent); }
.gcard-top { display: flex; align-items: center; gap: 8px; }
.gcard-ic { width: 26px; height: 26px; flex: 0 0 auto; color: #6b7180; }
.gcard-ic svg { width: 26px; height: 26px; display: block; }
.gcard-name { font-size: 13px; font-weight: 800; color: var(--text); line-height: 1.1; }
.gcard-lvl { font-size: 10.5px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.gcard-bonus { font-size: 12px; color: var(--text); }
.gcard-bonus b { color: var(--accent-2); }
.gmuted { color: var(--muted); font-weight: 400; }
.gmastery { font-size: 10.5px; color: #ffcf4a; font-weight: 700; }
.gability { font-size: 10.5px; color: #d08bff; font-style: italic; }
.gcard-act { display: flex; gap: 6px; margin-top: 4px; }
.gcard-act .gact { flex: 1; font-size: 11px; padding: 6px 4px; font-family: 'JetBrains Mono', monospace; }
/* Tier-tinted left edge + icon (Wooden→Diamond, then a flashy Rune tier). */
.gcard[data-tier="0"] { border-left-color: #c08a52; } .gcard[data-tier="0"] .gcard-ic { color: #c08a52; }
.gcard[data-tier="1"] { border-left-color: #e08a44; } .gcard[data-tier="1"] .gcard-ic { color: #e08a44; }
.gcard[data-tier="2"] { border-left-color: #aab4c6; } .gcard[data-tier="2"] .gcard-ic { color: #aab4c6; }
.gcard[data-tier="3"] { border-left-color: #dde6f2; } .gcard[data-tier="3"] .gcard-ic { color: #dde6f2; }
.gcard[data-tier="4"] { border-left-color: #ffd76a; } .gcard[data-tier="4"] .gcard-ic { color: #ffd76a; }
.gcard[data-tier="5"] { border-left-color: #7fe9f2; } .gcard[data-tier="5"] .gcard-ic { color: #7fe9f2; }
.gcard.rune { border-color: #6a4ec0; border-left-color: #d08bff;
  background: linear-gradient(160deg, rgba(157,123,255,.14), var(--panel-2) 60%); box-shadow: inset 0 0 22px rgba(157,123,255,.14); }
.gcard.rune .gcard-ic { color: #d08bff; }
.gcard.rune .gcard-name { color: #e8d9ff; }
/* Tier-locked: dimmed until the previous tier is fully upgraded. */
.gcard.locked { opacity: .5; }
.gcard.locked .gcard-bonus, .gcard.locked .gmuted { filter: grayscale(.6); }
/* Big, vivid, full-width reward buttons — visible at a glance. */
.zems-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.zems-actions .btn {
  width: 100%; font-size: 14px; font-weight: 800; padding: 11px 12px;
  border-radius: 11px; border: none; letter-spacing: .2px;
}
#faucet-btn {
  background: linear-gradient(135deg, #ff5da2, #ff9ace); color: #2a0716;
  box-shadow: 0 3px 14px rgba(255, 93, 162, .38);
}
#ptc-btn {
  background: linear-gradient(135deg, #7b5cff, #a98bff); color: #fff;
  box-shadow: 0 3px 14px rgba(123, 92, 255, .32);
}
.zems-actions .btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.zems-actions .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.zems-actions .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.15; }
.zems-actions .btn .fb-sub { font-size: 10px; font-weight: 600; opacity: .8; }
.zems-hint { font-size: 11px; color: var(--muted); margin: 6px 0 0; }

/* Invite & earn (referral) box */
.invite-box {
  margin-top: 12px; padding: 11px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 224, 163, .10), rgba(255, 93, 162, .08));
  border: 1px solid rgba(22, 224, 163, .30);
}
.invite-box h2 { margin: 0 0 4px; font-size: 15px; }
.invite-box .sub { margin: 0; font-size: 12px; line-height: 1.45; } /* cancel global negative top margin */
.invite-row { display: flex; gap: 6px; margin: 9px 0 7px; }
.invite-input {
  flex: 1; min-width: 0; font-size: 11px; font-family: 'JetBrains Mono', monospace;
  background: #0c0d13; border: 1px solid var(--line); border-radius: 8px;
  color: var(--accent); padding: 8px 9px;
}
.invite-row .btn.sm { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.invite-stats { font-size: 12px; color: var(--muted); margin: 0; }
.invite-stats strong { color: var(--text); }

/* hearts meter */
.hearts { font-size: 15px; letter-spacing: 1px; line-height: 1; }
.hearts .on { color: var(--accent-2); }
.hearts .off { color: #3a3142; }
.hearts.small { font-size: 12px; }

/* ── Present modal ──────────────────────────────────────────── */
.present-head { display: flex; gap: 14px; align-items: center; text-align: left; margin-bottom: 14px; }
.present-girl { width: 80px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.present-head h2 { margin: 0 0 6px; font-size: 18px; }
.present-aff-line { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.present-list { display: grid; gap: 10px; margin: 14px 0 6px; }
.present-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.present-item .emoji { font-size: 26px; }
.present-item .info { flex: 1; }
.present-item .pname { font-weight: 700; font-size: 14px; }
.present-item .pdesc { color: var(--muted); font-size: 11px; }
.present-item .buy { white-space: nowrap; }
.present-item .buy .cost { font-family: 'JetBrains Mono', monospace; }
.present-msg { font-size: 12px; min-height: 16px; margin: 6px 0; color: var(--warn); }
.present-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; color: #e98bd0; font-family: 'JetBrains Mono', monospace; }
.present-foot .btn { font-weight: 600; }

/* gallery card affection bits */
.gcard .gift {
  position: absolute; bottom: 64px; right: 8px;
  background: var(--accent-2); color: #2a0a1c; border: none; border-radius: 99px;
  font-size: 12px; font-weight: 800; padding: 5px 10px; cursor: pointer;
}
.gcard .gcard-hearts { margin-top: 4px; }

/* ── Gallery ────────────────────────────────────────────────── */
.gallery-section { max-width: 1320px; margin: 24px auto 0; }
.gallery-section h2 { font-size: 18px; display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; }
.gallery-sub { font-size: 13px; color: var(--muted); font-weight: 400; }
.gallery-total { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.gallery-total strong { color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.gallery {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.gallery-empty { color: var(--muted); font-size: 13px; grid-column: 1 / -1; padding: 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: 12px; }
.gcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; position: relative; cursor: pointer; transition: border-color .12s, transform .08s;
}
.gcard:hover { transform: translateY(-2px); border-color: var(--muted); }
.gcard.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gcard img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.gcard.locked img { filter: blur(12px) brightness(.6); transform: scale(1.05); }
/* Biome tiles are canvases painted by rpg-combat.js, not images. Same footprint as the
   old <img> so the grid is unchanged. image-rendering: pixelated keeps the art crisp
   instead of letting the browser smooth it into mush on a HiDPI screen. Locked tiles are
   darkened inside the canvas (see drawBiomeTile) rather than CSS-blurred. */
.gcard .gtile { width: 100%; aspect-ratio: 2/3; display: block; background: #0e0b14;
  image-rendering: pixelated; image-rendering: crisp-edges; }
.gcard .lock-pill {
  position: absolute; top: 8px; left: 8px; background: rgba(5,6,10,.72);
  color: var(--warn); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
}
.gcard .num {
  position: absolute; top: 8px; left: 8px; background: rgba(5,6,10,.7);
  color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 11px;
  padding: 2px 8px; border-radius: 99px;
}
.gcard .boost {
  position: absolute; top: 8px; right: 8px;
  background: var(--accent); color: #062018; font-weight: 800; font-size: 12px;
  padding: 3px 9px; border-radius: 99px;
}
.gcard .gbody { padding: 10px 12px; }
.gcard .gtitle { font-weight: 700; font-size: 13px; }
.gcard .ghashes { color: var(--muted); font-size: 11px; font-family: 'JetBrains Mono', monospace; margin-top: 2px; }

/* ── Heart / coin particles ─────────────────────────────────── */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.fx {
  position: absolute; font-size: 22px; will-change: transform, opacity;
  animation: floatUp var(--dur, 1.2s) ease-out forwards;
  transform: translate(-50%, -50%);
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - var(--rise, 140px))) scale(1.1) rotate(var(--rot, 0deg)); }
}

/* ── Ads / footer ───────────────────────────────────────────── */
.ad-slot {
  background: repeating-linear-gradient(45deg, #15171f, #15171f 10px, #181b25 10px, #181b25 20px);
  border: 1px dashed var(--line); border-radius: 12px; color: var(--muted);
  display: grid; place-items: center; font-size: 12px; min-height: 90px; margin-top: 16px;
}
.ad-banner { max-width: 1320px; margin: 16px auto 0; }

/* ── Guided tour (spotlight ring + tooltip) ─────────────────── */
.tour-ring {
  position: fixed; z-index: 9000; pointer-events: none;
  border: 2px solid var(--accent); border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(6, 8, 12, .74), 0 0 18px rgba(22, 224, 163, .55);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}
.tour-pop {
  position: fixed; z-index: 9001; width: 300px; max-width: calc(100vw - 24px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; box-shadow: 0 14px 44px rgba(0, 0, 0, .55);
}
.tour-prog { font-size: 11px; color: var(--muted); letter-spacing: .5px; margin: 0 0 6px; }
.tour-title { margin: 0 0 6px; font-size: 17px; }
.tour-text { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-spacer { flex: 1; }
.tour-skip { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.tour-back { background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 13px; }
.tour-next { padding: 8px 14px; font-size: 13px; }

/* Consolidated advertising space (320 left | 728 over 468 right). */
.ad-space {
  max-width: 1100px; margin: 18px auto; padding: 10px 16px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.ad-space-label {
  text-align: center; text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 11px; color: var(--muted); margin: 0 0 12px;
}
.ad-space-inner { display: flex; gap: 18px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.ad-space .ad-right { display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Brand column + Switch-faucet dropdown (topbar, under the logo). */
.brand-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.faucet-switch { position: relative; }
#switch-btn { padding: 3px 9px; font-size: 11px; font-weight: 600; }
.switch-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; min-width: 184px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.sw-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  text-decoration: none; color: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sw-item img { width: 18px; height: 18px; border-radius: 50%; }
a.sw-item:hover { background: var(--panel-2, rgba(255, 255, 255, .06)); }
.sw-current { color: var(--muted); cursor: default; }
.sw-current::after { content: '●'; margin-left: auto; font-size: 9px; color: var(--accent); }


/* ── Standard IAB ad placeholders ───────────────────────────── */
/* Drop your ad-network tag inside each .ad box; it's pre-sized to the slot. */
.ad {
  background: repeating-linear-gradient(45deg, #15171f, #15171f 10px, #181b25 10px, #181b25 20px);
  border: 1px dashed var(--line); border-radius: 8px; color: var(--muted);
  display: grid; place-items: center; font-size: 11px; text-align: center;
  margin: 0 auto; max-width: 100%; overflow: hidden;
}
.ad-728x90  { width: 728px; height: 90px; }
.ad-970x90  { width: 970px; height: 90px; }
.ad-468x60  { width: 468px; height: 60px; }
.ad-320x50  { width: 320px; height: 50px; }
.ad-300x250 { width: 300px; height: 250px; }
.ad-336x280 { width: 336px; height: 280px; }
.ad-300x600 { width: 300px; height: 600px; }
.ad-160x600 { width: 160px; height: 600px; }
/* A full-width centered row that swaps a desktop leaderboard for a mobile banner. */
.ad-row { display: flex; justify-content: center; margin: 16px auto; max-width: 1320px; padding: 0 16px; }
.ad-row .ad-320x50 { display: none; }
@media (max-width: 760px) {
  .ad-row .ad-728x90, .ad-row .ad-970x90 { display: none; }
  .ad-row .ad-320x50 { display: grid; }
}
.footer { max-width: 1320px; margin: 22px auto 0; color: var(--muted); font-size: 11px; text-align: center; line-height: 1.6; }


/* ── The golden VIP Screw Miner (gallery card #0) ──────────────────────────────
   Gold appears NOWHERE else in the game, so the card reads as special on sight.
   The sheen is the only animation and it yields to prefers-reduced-motion. */
.gcard.vipcard {
  border-color: #d4a72c;
  background: linear-gradient(160deg, #2a2107 0%, var(--panel) 55%);
  box-shadow: 0 0 0 1px rgba(255, 210, 63, .18), 0 8px 26px -14px rgba(255, 195, 40, .55);
  position: relative;
  overflow: hidden;
}
.gcard.vipcard::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 240, 190, .30) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: vipcard-sweep 5s ease-in-out infinite;
}
@keyframes vipcard-sweep { 0%, 62% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .gcard.vipcard::after { animation: none; } }
.gcard.vipcard:hover { border-color: #ffd23f; }
.gcard.vipcard.selected { border-color: #ffd23f; box-shadow: 0 0 0 1px #ffd23f, 0 0 22px -6px rgba(255, 210, 63, .6); }

/* Golden text — the whole point of the theme. */
.gcard.vipcard .gtitle {
  color: #ffe89a; font-weight: 800;
  background: linear-gradient(92deg, #ffd23f, #fff3c4 45%, #d4a72c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gcard.vipcard .gh { color: #ffd77a; font-weight: 700; }
.gcard.vipcard .gcard-hearts { color: #c9a768; font-size: 11px; }
.gcard.vipcard .num {
  background: #ffd23f; color: #2a1f04; font-weight: 800; border-color: #d4a72c;
}
.gcard.vipcard .boost {
  background: #ffd23f; color: #2a1f04; font-weight: 800;
}
.gcard.vipcard img { box-shadow: inset 0 0 40px rgba(255, 200, 50, .12); }

/* ── Idle Dungeon — combat scene (center panel) ───────────────────────────────
   The hero auto-fights in the current biome. Replaces the collectible portrait;
   loot is banked per-kill in the feed below (see onKill in app.js). */
.reveal .image-wrap #reveal-img,
.reveal .image-wrap #reveal-video,
.reveal .image-wrap #reveal-canvas { display: none; }   /* combat replaces the static visual */
/* The SCENE is sized so its bottom lines up with the streak box in the right column;
   the readout + unlock rows sit below it and the panel itself stretches (grid default)
   so the column bottom matches the other two columns.
   .image-wrap drops the collectible portrait's 2/3 aspect-ratio here — on this wide
   column that forced ~945px of height, leaving dead space under the canvas. */
.reveal .image-wrap { aspect-ratio: auto; }
#rpg-fight { display: block; width: 100%; height: 390px; background: #0e0b14;
  border: 1px solid var(--line); border-radius: 12px; }
.combat-readout { margin-top: 12px; }
.cf-top { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.cf-top #cf-name { color: var(--text); font-weight: 800; letter-spacing: .02em; }
.cf-hpbar { height: 9px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; }
.cf-hpbar #cf-hp { height: 100%; width: 100%;
  background: linear-gradient(90deg, #c8443c, #ff6b6b); transition: width .12s linear; }
.combat-log { margin-top: 10px; display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; font-family: 'JetBrains Mono', 'Consolas', monospace; min-height: 58px; }
.combat-log div { color: var(--muted); }
.combat-log div.g { color: #ffd24a; }                     /* gold loot line */
.combat-log div.d { color: #5fe0ea; font-weight: 700; }   /* diamond drop */

/* Biome level bar — fills with monsters slain, not Gold. */
#biome-level { margin-top: 14px; }
.bl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bl-head #bl-lvl { font-size: 14px; font-weight: 800; color: var(--text); }
.bl-head #bl-next { font-size: 11.5px; color: var(--accent); font-weight: 700; }
#biome-level #bl-fight { margin-top: 8px; }

/* ── Idle Dungeon — hero character panel (left column) ────────────────────────
   The RPG dropped hashrate-allocation, so hide the dead slider + mining console;
   the hero portrait + real stats take their place above the claim boxes. */
.panel.miner .alloc-label,
.panel.miner .mine-windows,
.panel.miner #console { display: none; }
.hero-portrait { display: block; width: 100%; height: 132px; background: #0e0b14;
  border: 1px solid var(--line); border-radius: 12px; margin: 4px 0 12px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 10px; }
.hero-stats .hs { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 9px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.hero-stats .hs .k { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hero-stats .hs .v { font-size: 14px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* Hero Stats panel — middle column, under the combat/biome readout. The gear cards on the
   left are now pure upgrade controls; every stat's live value reads here instead. Wider than
   the left panel, so it lays out in more columns. */
.hero-stats-panel { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.hs-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 8px; }
.hero-stats-panel .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 0; }
.hero-stats-panel .hs { flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 10px; }
.hero-stats-panel .hs .v { font-size: 15px; }
@media (max-width: 560px) { .hero-stats-panel .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* Gear section header inside the hero panel */
.gear-head { font-size: 13px; font-weight: 800; margin: 12px 0 6px; color: var(--text); }
.char-stats { display: flex; flex-direction: column; gap: 6px; }
.gear-head .gear-sub { font-weight: 400; font-size: 11.5px; color: var(--muted); }

/* ── Equipment cards — a grid BELOW the hero scene (not overlaid on it). Each card
   carries the gear name, its tier-tinted icon, the stat it governs + that stat's
   CURRENT value, and the upgrade cost. Replaces both the paper-doll overlay and the
   separate hero-stats grid — the stat values now live on the cards themselves. */
.doll { position: relative; height: 150px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0e0b14; }
.doll .hero-portrait { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  margin: 0; border: none; border-radius: 0; }
/* One card per row, laid out as a fixed 4-column grid so the columns line up on
   EVERY row (flex would size each segment to its content and go ragged):
     col 1  icon (spans both text rows)
     col 2  name  (row 1)  +  level (row 2)
     col 3  stat label + value, right-aligned  (spans both rows)
     col 4  upgrade button  (spans both rows)                                      */
#char-stats { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.char-stats .trait { display: grid; grid-template-columns: 30px 66px minmax(0, 1fr) 64px;
  grid-template-rows: auto auto; align-items: center; column-gap: 9px; row-gap: 0;
  padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: 10px; }
.char-stats .trait:hover { box-shadow: 0 0 0 1px var(--accent); }
.char-stats .trait-emoji { grid-column: 1; grid-row: 1 / 3; justify-self: center;
  font-size: 0; line-height: 0; padding: 0; color: #b98a5a; }
.char-stats .trait-emoji svg { width: 30px; height: 30px; display: block;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.char-stats .trait-name { grid-column: 2; grid-row: 1; justify-self: start; text-align: left;
  font-size: 12.5px; font-weight: 800; color: var(--text); padding: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.char-stats .trait-lvl { grid-column: 2; grid-row: 2; justify-self: start; position: static;
  font-size: 8.5px; color: var(--muted); background: rgba(0,0,0,.35); padding: 1px 5px; border-radius: 5px; }
.char-stats .trait-bar { display: none; }
.char-stats .trait-stat { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: row;
  align-items: baseline; justify-content: flex-start; gap: 5px; }
.char-stats .trait-bonus { font-size: 9.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .03em; white-space: nowrap; }
.char-stats .trait-val { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; }
/* "?" help chip + hover/focus tooltip explaining the stat (pure CSS, CSP-safe) */
.char-stats .trait-help { position: relative; align-self: center; display: inline-flex; flex: 0 0 auto;
  align-items: center; justify-content: center; width: 13px; height: 13px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: var(--muted); font-size: 9px; font-weight: 700;
  line-height: 1; cursor: help; }
.char-stats .trait-help:hover { background: var(--accent); color: #062018; }
.char-stats .trait-help::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 7px);
  left: 50%; transform: translateX(-50%); width: 172px; padding: 7px 9px; background: #0c0912;
  border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 10px; font-weight: 500;
  line-height: 1.35; text-align: left; text-transform: none; letter-spacing: 0; white-space: normal;
  box-shadow: 0 6px 18px rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .12s;
  z-index: 50; pointer-events: none; }
.char-stats .trait-help:hover::after, .char-stats .trait-help:focus::after { opacity: 1; visibility: visible; }
.char-stats .trait-plus { grid-column: 4; grid-row: 1 / 3; width: 100%; border: none; border-radius: 8px;
  background: var(--accent); color: #062018; font-weight: 800; font-size: 10.5px; padding: 6px 4px;
  cursor: pointer; white-space: nowrap; }
.char-stats .trait-plus:disabled { background: #2a3a35; color: #6b8f83; }
.char-stats .trait-cost { font-family: 'JetBrains Mono', monospace; font-size: 9px; }
/* left accent stripe + icon tint with the gear tier (Wood → Diamond) */
.char-stats .trait[data-tier="0"] { border-left-color: #9c6b3f; }
.char-stats .trait[data-tier="1"] { border-left-color: #cf7a3a; }
.char-stats .trait[data-tier="2"] { border-left-color: #8892a6; }
.char-stats .trait[data-tier="3"] { border-left-color: #ccd6e6; }
.char-stats .trait[data-tier="4"] { border-left-color: #ffcf4a; }
.char-stats .trait[data-tier="5"] { border-left-color: #5fe0ea; }
.char-stats .trait[data-tier="1"] .trait-emoji { color: #e08a44; }
.char-stats .trait[data-tier="2"] .trait-emoji { color: #aab4c6; }
.char-stats .trait[data-tier="3"] .trait-emoji { color: #dde6f2; }
.char-stats .trait[data-tier="4"] .trait-emoji { color: #ffd76a; }
.char-stats .trait[data-tier="5"] .trait-emoji { color: #7fe9f2; }
