: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);
}
.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; }

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

/* ── 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;
  /* miner | selected girl | character | rewards+claims+ads */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px 260px;
}
/* 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) 260px 260px; }
  .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: 8px; margin-bottom: 10px; }
.mine-win {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px; text-align: center;
}
.mine-win.win-zero { border-color: #1d4a3e; }
.mine-win.win-zems { border-color: #4a2348; }
.mine-head { font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.mine-pct { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.win-zero .mine-pct { color: var(--accent); }
.win-zems .mine-pct { color: var(--accent-2); }
.mine-hash { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; margin-top: 4px; }
.mine-yield { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.mine-adj { display: flex; gap: 6px; margin-top: 7px; }
.adj {
  flex: 1; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 8px; padding: 4px 0; font-size: 15px; 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: 4px; }
.present-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 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); }
.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); } }

/* ── 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 8px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.5));
}
.char-stats { display: flex; flex-direction: column; gap: 10px; }
.trait { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; }
.trait-top { display: flex; align-items: center; gap: 8px; }
.trait-emoji { font-size: 18px; }
.trait-name { font-weight: 700; font-size: 13px; flex: 1; }
.trait-lvl { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.trait-bar { height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.trait-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.trait-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trait-bonus { font-size: 11px; color: var(--accent); }
.trait-plus {
  border: none; border-radius: 8px; background: var(--accent); color: #062018;
  font-weight: 800; font-size: 14px; padding: 5px 12px; 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;
}
.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); }
.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); }
/* 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); }
.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; }


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