:root,
[data-theme="dark"] {
  color-scheme: dark;
  /* Pure black + TubeCoin red */
  --bg: #000000;
  --panel: #121214;
  --panel-2: #1a1a1e;
  --line: #2e2e34;
  --text: #ffffff;
  --muted: #9a9598;
  --accent: #e60023;
  --accent-2: #ff3b4d;
  --accent-hot: #ff2a3f;
  --accent-mid: #ff5722;
  --accent-warm: #f7931a;
  --accent-rgb: 230, 0, 35;
  --accent-soft: rgba(230, 0, 35, .14);
  --warn: #ffc857;
  --danger: #ff6b6b;
  --on-accent: #fff8f8;
  --input-bg: #121214;
  --deep: #0a0a0a;
  --deep-2: #0a0506;
  --invite-input-bg: #12080a;
  --hover-surface: #161618;
  --btn-disabled-bg: #2a2224;
  --btn-disabled-fg: #7a6a6e;
  --vpn-fg: #e8c8cd;
  --hearts-off: #4a3036;
  --auth-card-top: #1c1c20;
  --glow: rgba(230, 0, 35, .22);
  --shadow: rgba(0, 0, 0, .45);
  --tone-active: #3a1218;
  --tone-done: #13233a;
  --tone-removed: #3a1414;
  --tone-pending: #3a3413;
  --tone-mem-hover: #22242f;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f5f5f6;
  --panel-2: #ececee;
  --line: #d6d6db;
  --text: #0a0a0a;
  --muted: #5c5c66;
  --accent: #e60023;
  --accent-2: #c4001c;
  --accent-hot: #ff2a3f;
  --accent-mid: #ff5722;
  --accent-warm: #f7931a;
  --accent-rgb: 230, 0, 35;
  --accent-soft: rgba(230, 0, 35, .1);
  --warn: #b45309;
  --danger: #dc2626;
  --on-accent: #ffffff;
  --input-bg: #ffffff;
  --deep: #f0f0f2;
  --deep-2: #ebebed;
  --invite-input-bg: #fff5f6;
  --hover-surface: #e4e4e8;
  --btn-disabled-bg: #e8e4e5;
  --btn-disabled-fg: #9a9094;
  --vpn-fg: #6b3038;
  --hearts-off: #d4b8bc;
  --auth-card-top: #fafafa;
  --glow: rgba(230, 0, 35, .12);
  --shadow: rgba(0, 0, 0, .12);
  --tone-active: #ffe4e8;
  --tone-done: #e8eef8;
  --tone-removed: #fde8e8;
  --tone-pending: #fef3c7;
  --tone-mem-hover: #e4e4ea;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100vw;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Theme toggle — fixed corner, works on auth + game + legal pages */
.theme-toggle {
  position: fixed; z-index: 80;
  right: max(14px, env(safe-area-inset-right, 14px));
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 18px; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px var(--shadow);
  transition: border-color .15s, transform .05s;
  touch-action: manipulation;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.view {
  padding: 0 16px 40px;
  width: 100%;
  max-width: 100%;
}
@media (max-width: 560px) {
  .view { padding: 0 10px 32px; }
}
/* Boot splash: a themed spinner shown until /api/me resolves, so a logged-in player
   never sees the login form flash before the game. */
.boot { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.boot-spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: bootspin .7s linear infinite; }
@keyframes bootspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-spin { animation-duration: 1.6s; } }
[hidden] { display: none !important; }

/* ── Disclosure ─────────────────────────────────────────────── */
#disclosure {
  background: rgba(255, 200, 87, .08);
  color: #e8d5a8;
  border: 1px solid rgba(255, 200, 87, .28);
  border-radius: 10px;
  font-size: 12px;
  padding: 10px 40px 10px 16px;
  position: relative;
  line-height: 1.45;
  max-width: 760px;
  margin: 8px auto 28px;
}
[data-theme="light"] #disclosure {
  background: rgba(180, 83, 9, .08);
  color: #6b4a12;
  border-color: rgba(180, 83, 9, .28);
}
#disclosure strong { color: var(--warn); }
#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-family: 'Inter', system-ui, sans-serif;
  font-weight: 800; font-size: 40px; letter-spacing: -1px; margin: 0;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 0.28em;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.logo span { color: var(--accent); }
/* Keep "Tube" + "Coin" as one flex item so they never wrap onto two lines. */
.logo-word { display: inline; white-space: nowrap; }
.logo.small { font-size: 22px; }
.logo-mark {
  width: 1.05em; height: 1.05em; display: block; flex: 0 0 auto;
  border-radius: 50%;
}
.logo.small .logo-mark { width: 28px; height: 28px; }
/* PEPE Girl: spaced wordmark + bigger coin mark (SVG reads tiny at 22px). */
.logo.small.logo-pepe {
  font-size: 26px;
  letter-spacing: -0.4px;
  gap: 0.35em;
}
.logo.small.logo-pepe .logo-mark {
  width: 36px;
  height: 36px;
}
.logo.small.logo-pepe .logo-word,
.logo.small.logo-spaced .logo-word {
  letter-spacing: 0;
}
.logo.small.logo-spaced {
  font-size: 26px;
  letter-spacing: -0.4px;
  gap: 0.35em;
}
.logo.small.logo-spaced .logo-mark {
  width: 36px;
  height: 36px;
}
.logo a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.28em; }
.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: 20px; padding: 18px 12px; }
  .hero-girl { order: -1; }
  .hero-img { max-height: 38vh; max-width: 250px; }
  .speech-bubble { font-size: 13px; padding: 7px 12px; top: 2%; right: 0; }
  .hero-tagline { font-size: 16px; margin: 4px 0 14px; }
  .hero-points { margin: 0 0 16px; gap: 8px; }
  .hero-points li { font-size: 13px; }
  .auth-card { padding: 18px 14px; }
}

.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 rgba(230, 0, 35, .35);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(230, 0, 35, .12),
    0 18px 50px -12px rgba(230, 0, 35, .35);
}
.speech-bubble {
  position: absolute; top: 5%; right: 2%; z-index: 2;
  background: linear-gradient(180deg, #fff7f8, #ffe8eb);
  color: #2a0a10; font-weight: 800; font-size: 15px;
  padding: 10px 16px; border-radius: 16px;
  border: 1px solid rgba(230, 0, 35, .2);
  box-shadow: 0 10px 26px rgba(230, 0, 35, .22);
  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: #ffe8eb; border-bottom: 0;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.hero-copy { text-align: left; }
.hero-copy .logo { font-size: clamp(2.2rem, 7vw, 3.4rem); }
.hero-tagline { color: var(--text); font-size: 18px; line-height: 1.45; margin: 6px 0 18px; }
.hero-tagline strong { color: var(--accent-2); }
.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: linear-gradient(180deg, var(--auth-card-top) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; text-align: center;
  box-shadow: 0 16px 40px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.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(--accent-soft); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 35, .35);
}
.auth-subtabs {
  display: flex; gap: 6px; background: var(--panel-2);
  padding: 3px; border-radius: 8px; margin-bottom: 14px;
}
.auth-subtab {
  flex: 1; padding: 7px 10px; border: none; border-radius: 6px;
  background: none; color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.auth-subtab:hover { color: var(--text); }
.auth-subtab.active {
  background: var(--input-bg); color: var(--text);
  box-shadow: 0 1px 3px var(--shadow), inset 0 0 0 1px var(--line);
}
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(--input-bg); border: 1px solid var(--line);
  color: var(--text); padding: 12px; border-radius: 10px; font-size: 15px;
  font-family: 'JetBrains Mono', monospace;
  min-height: 44px;
}
@media (max-width: 640px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.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-2); 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; }
.vpn-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; text-align: left; line-height: 1.45;
  background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), .28); color: var(--vpn-fg);
}
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}
.auth-divider:not(:empty)::before {
  margin-right: .75em;
}
.auth-divider:not(:empty)::after {
  margin-left: .75em;
}
.satspay-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}
.satspay-wrap .satspay-signin {
  width: 100%;
}
.satspay-wrap .satspay-signin button {
  width: 100% !important;
  box-sizing: border-box !important;
}
.payout-gw-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

/* Withdraw rail picker — Wallet (TubeCoin) vs SatsPay (official mark). */
.rail-pick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.rail-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--deep);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: Inter, system-ui, sans-serif;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease, background .15s ease;
}
.rail-btn[hidden] { display: none; }
.rail-btn:hover { border-color: #6a6568; }
.rail-btn:active { transform: translateY(1px); }
.rail-copy { display: flex; flex-direction: column; gap: 2px; line-height: 1.05; min-width: 0; }
.rail-copy strong { font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.rail-copy small { font-size: 11px; font-weight: 700; color: var(--muted); }
.rail-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(180deg, var(--accent-hot) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), .35);
}
.rail-mark-fp {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}
.rail-btn.rail-fp.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, .14);
  box-shadow: 0 0 0 1px #3b82f6, 0 8px 22px rgba(59, 130, 246, .28);
}
.rail-btn.rail-fp.active .rail-copy small { color: #60a5fa; }
.rail-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: contain;
  flex: 0 0 32px;
  background: #0b1220;
}
.rail-logo-zero {
  border-radius: 50%;
  background: transparent;
}
.rail-logo-fp {
  border-radius: 10px;
  background: transparent;
}
.rail-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 22px var(--glow);
}
.rail-btn.rail-sats.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 22px var(--glow);
}
.rail-btn.rail-sats.active .rail-copy small { color: var(--accent-2); }
.rail-btn.active .rail-copy small { color: var(--text); }
[data-theme="light"] .rail-btn { background: #fff; box-shadow: none; }
[data-theme="light"] .rail-btn:hover { border-color: #9a9598; }

.faucet-payout-info,
.faucet-payout-form { display: flex; }
.faucet-payout-info { align-items: center; gap: 8px; flex-wrap: wrap; }
.faucet-payout-form { flex-direction: column; gap: 8px; }
.faucet-payout-info[hidden],
.faucet-payout-form[hidden] { display: none !important; }

/* ── 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: linear-gradient(180deg, var(--accent-hot) 0%, var(--accent) 100%);
  color: var(--on-accent);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), .35);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled {
  background: var(--btn-disabled-bg); color: var(--btn-disabled-fg); cursor: not-allowed; box-shadow: none;
}
.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;
}
.brand-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; flex-shrink: 0; }
.faucet-switch { position: relative; z-index: 2; }
.faucet-switch.is-open { z-index: 400; }
html[data-world="pepe"],
html[data-world="pepe"][data-theme="dark"] {
  --accent: #3f9e34;
  --accent-2: #7ed968;
  --accent-hot: #62c14e;
  --accent-mid: #3f9e34;
  --accent-warm: #2f7a28;
  --accent-rgb: 63, 158, 52;
  --accent-soft: rgba(63, 158, 52, .16);
  --glow: rgba(63, 158, 52, .22);
  --tone-active: #123a18;
  --invite-input-bg: #081208;
  --deep-2: #050a05;
  --on-accent: #f4fff2;
}
html[data-world="pepe"][data-theme="light"] {
  --accent: #2f7a28;
  --accent-2: #3f9e34;
  --accent-hot: #4caf50;
  --accent-mid: #3f9e34;
  --accent-warm: #2f7a28;
  --accent-rgb: 47, 122, 40;
  --accent-soft: rgba(47, 122, 40, .12);
  --glow: rgba(47, 122, 40, .14);
  --tone-active: #e4ffe8;
  --invite-input-bg: #f5fff5;
  --on-accent: #ffffff;
}
html[data-world="doge"],
html[data-world="doge"][data-theme="dark"] {
  --accent: #c9a227;
  --accent-2: #ffe08a;
  --accent-hot: #e6c35c;
  --accent-mid: #c9a227;
  --accent-warm: #8a6d12;
  --accent-rgb: 201, 162, 39;
  --accent-soft: rgba(201, 162, 39, .16);
  --glow: rgba(201, 162, 39, .22);
  --tone-active: #3a2e08;
  --invite-input-bg: #141006;
  --deep-2: #0c0a04;
  --on-accent: #1a1404;
}
html[data-world="doge"][data-theme="light"] {
  --accent: #8a6d12;
  --accent-2: #c9a227;
  --accent-hot: #e6c35c;
  --accent-mid: #c9a227;
  --accent-warm: #8a6d12;
  --accent-rgb: 138, 109, 18;
  --accent-soft: rgba(201, 162, 39, .14);
  --glow: rgba(201, 162, 39, .16);
  --tone-active: #fff6d6;
  --invite-input-bg: #fffdf5;
  --on-accent: #1a1404;
}
html[data-world="btc"],
html[data-world="btc"][data-theme="dark"] {
  --accent: #f7931a;
  --accent-2: #ffd29a;
  --accent-hot: #ffb347;
  --accent-mid: #f7931a;
  --accent-warm: #c56a00;
  --accent-rgb: 247, 147, 26;
  --accent-soft: rgba(247, 147, 26, .16);
  --glow: rgba(247, 147, 26, .22);
  --tone-active: #3a2208;
  --invite-input-bg: #140e06;
  --deep-2: #0c0804;
  --on-accent: #1a1004;
}
html[data-world="btc"][data-theme="light"] {
  --accent: #c56a00;
  --accent-2: #f7931a;
  --accent-hot: #ffb347;
  --accent-mid: #f7931a;
  --accent-warm: #c56a00;
  --accent-rgb: 197, 106, 0;
  --accent-soft: rgba(247, 147, 26, .14);
  --glow: rgba(247, 147, 26, .16);
  --tone-active: #fff1e0;
  --invite-input-bg: #fffaf5;
  --on-accent: #1a1004;
}
html[data-world="tron"],
html[data-world="tron"][data-theme="dark"] {
  --accent: #ff2d3a;
  --accent-2: #ff8a93;
  --accent-hot: #ff5a64;
  --accent-mid: #ff2d3a;
  --accent-warm: #c4101c;
  --accent-rgb: 255, 45, 58;
  --accent-soft: rgba(255, 45, 58, .16);
  --glow: rgba(255, 45, 58, .22);
  --tone-active: #3a1014;
  --invite-input-bg: #140608;
  --deep-2: #0c0405;
  --on-accent: #fff5f5;
}
html[data-world="tron"][data-theme="light"] {
  --accent: #c4101c;
  --accent-2: #ff2d3a;
  --accent-hot: #ff5a64;
  --accent-mid: #ff2d3a;
  --accent-warm: #c4101c;
  --accent-rgb: 196, 16, 28;
  --accent-soft: rgba(255, 45, 58, .12);
  --glow: rgba(255, 45, 58, .14);
  --tone-active: #ffe8ea;
  --invite-input-bg: #fff5f6;
  --on-accent: #ffffff;
}

.world-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  max-width: 420px;
}
.world-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font: 700 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 99px;
  cursor: pointer;
}
.world-tab.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
button.sw-item {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

#switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 50%, var(--accent-warm) 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.6), 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  animation: switch-pulse 3s infinite ease-in-out;
}
#switch-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-25deg);
  animation: switch-shimmer 3.5s infinite ease-in-out;
}
@keyframes switch-shimmer {
  0%, 70% { left: -100%; }
  100% { left: 220%; }
}
@keyframes switch-pulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.85), 0 0 14px rgba(var(--accent-rgb), 0.45), 0 3px 10px rgba(0, 0, 0, 0.5);
  }
}
#switch-btn:hover {
  transform: translateY(-1px) scale(1.05);
  filter: brightness(1.15);
  box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.95), 0 4px 14px rgba(0, 0, 0, 0.5);
}
.sw-btn-icon { font-size: 13px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.sw-btn-arrow { font-size: 10px; opacity: 0.9; margin-left: 2px; }

.switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1; /* stacking comes from .faucet-switch.is-open */
  min-width: 270px;
  max-width: min(320px, calc(100vw - 20px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  background: rgba(18, 20, 29, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}
.sw-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}
.sw-head-pill {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.25);
  color: var(--accent-2);
  font-weight: 700;
}
.sw-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 0;
}
.sw-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sw-item:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(3px);
}
.sw-coin-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.sw-coin-icon-wrap img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: contain;
}
.sw-coin-icon-wrap.sw-pepe img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  object-position: top;
}
.sw-item-body {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.sw-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.sw-ticker {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  margin-left: 4px;
}
.sw-item-desc {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 2px;
}
.sw-current {
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  cursor: default;
}
.sw-current:hover {
  background: rgba(var(--accent-rgb), 0.18);
  transform: none;
}
.sw-badge-live {
  font-size: 10px;
  font-weight: 800;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.sw-badge-play {
  font-size: 10px;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.sw-badge-soon {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffb454;
  background: rgba(255, 180, 84, 0.12);
  border: 1px solid rgba(255, 180, 84, 0.35);
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.sw-item.sw-soon:hover .sw-badge-soon {
  background: rgba(255, 180, 84, 0.25);
  border-color: #ffb454;
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 180, 84, 0.4);
}
.wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 4px;
  }
  .brand-col {
    flex: 1 1 auto;
  }
  .wallet {
    gap: 6px;
    justify-content: flex-end;
  }
  .wallet .btn {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 38px;
  }
  .addr {
    max-width: 110px;
    font-size: 11px;
    padding: 4px 6px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
  }
}
@media (max-width: 480px) {
  .wallet {
    width: 100%;
    justify-content: space-between;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .addr {
    max-width: 120px;
  }
}

/* "Featured" house banner — operator-set promo (image + link) in the header's empty middle. */
.featured { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: 1; min-width: 160px;
  margin: 0 12px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); overflow: hidden; justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease; transform-origin: center top; }
/* Hover zoom: transform (not height) so the header never reflows — the chip floats over the page. */
.featured:hover { border-color: var(--accent); transform: scale(2.2); position: relative; z-index: 350;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.featured-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); white-space: nowrap; }
.featured-img { max-height: 56px; max-width: 420px; width: auto; height: auto; border-radius: 6px; display: block; }
@media (max-width: 900px) { .featured { display: none !important; } }
.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; gap: 14px; }
  .grid .reveal { grid-column: 1 / -1; }
}
/* Mobile: single column with optimized game hierarchy */
@media (max-width: 680px) {
  .grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  /* Optimal mobile game order: Girl first -> Miner -> Rewards -> Character */
  .grid .reveal { order: 1; }
  .grid .miner  { order: 2; }
  .grid .side2  { order: 3; }
  .grid .shop   { order: 4; }

  .panel {
    padding: 14px 12px;
    border-radius: 14px;
  }
  .panel h2 {
    font-size: 15px;
    margin-bottom: 10px;
  }
}

.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; gap: 8px; }
.panel.miner h2 { flex-wrap: wrap; }
.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: rgba(var(--accent-rgb), .45); }
.mine-win.win-zems { border-color: rgba(var(--accent-rgb), .35); }
.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-cap {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--accent);
}
.mine-cap:empty { display: none; }
.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: var(--accent-2); 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: #0a0506; 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;
}
@media (max-width: 680px) {
  .console {
    height: 75px;
    font-size: 10.5px;
    padding: 6px 8px;
    margin-bottom: 8px;
  }
  .stat-row { gap: 6px; }
  .stat { padding: 6px 8px; }
  .stat .v { font-size: 14px; }
  .mine-windows { gap: 8px; margin-bottom: 10px; }
  .mine-win { padding: 10px 8px; }
  .mine-hash { font-size: 17px; }
  .adj { min-height: 40px; }
}
.balance-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel-2); border-radius: 11px; padding: 10px 12px;
}
@media (max-width: 560px) {
  .balance-box {
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 10px;
  }
  .balance-box .balance {
    font-size: 16px;
    word-break: break-all;
  }
  .balance-box .btn {
    min-height: 42px;
    padding: 8px 16px;
  }
}
.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); }
.subunit-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.balance-box.is-sats {
  align-items: center;
  padding: 14px 14px 12px;
  background: linear-gradient(160deg, rgba(247, 147, 26, .18), rgba(247, 147, 26, .04));
  border: 1px solid rgba(247, 147, 26, .5);
}
.balance-box.is-sats .k {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.balance-box.is-sats .balance {
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.balance-box.is-sats .sat-frac {
  font-size: .62em;
  font-weight: 650;
  color: var(--accent-2);
}
.balance-box.is-sats .balance small { font-size: 13px; margin-left: 2px; }
.balance-box.is-sats .subunit-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-top: 6px;
}
.balance-box.is-sats .ex-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(247, 147, 26, .45);
  background: rgba(247, 147, 26, .12);
  font-size: 12px;
}
.balance-box.is-sats .ex-link:hover { text-decoration: none; filter: brightness(1.08); }
.withdraw-progress.is-note .wp-track { display: none; }
.withdraw-progress.is-note .wp-label {
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
}
@media (max-width: 560px) {
  .balance-box.is-sats .balance { font-size: 22px; word-break: normal; }
}
.claim-msg { font-size: 12px; color: var(--warn); min-height: 0; margin: 5px 0 0; }
/* Login-cadence note above Recent claims. When shown it owns the section's top gap, so
   the following heading tucks up under it; hidden → the heading keeps its default margin. */
.offline-note { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 22px 0 0;
  padding: 8px 10px; background: var(--panel-2); border-radius: 8px; }
.offline-note:not([hidden]) + h2.mt { margin-top: 10px; }

/* Distinct claim boxes: crimson for ZERO, bright rose for Zems. */
.balance-box.zero {
  background: linear-gradient(135deg, rgba(225, 29, 46, .14), rgba(225, 29, 46, .04));
  border: 1px solid rgba(225, 29, 46, .45);
}
.balance-box.zero .balance { color: var(--accent); }
.balance-box.zero .btn.primary { background: var(--accent); color: var(--on-accent); }
.balance-box.zems {
  background: linear-gradient(135deg, rgba(255, 59, 74, .14), rgba(255, 59, 74, .04));
  border: 1px solid rgba(255, 59, 74, .45);
}
.balance-box.zems .balance { color: var(--accent-2); }
.balance-box.zems .btn.primary { background: var(--accent-2); color: var(--on-accent); }

/* 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(225,29,46,.12);
}
.withdraw-progress .wp-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #ff7a84);
  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, 59, 74, .12); }
.withdraw-progress.zems .wp-fill { background: linear-gradient(90deg, var(--accent-2), #ff8a94); }

/* 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); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 13px;
}
.po-row:hover { border-color: rgba(var(--accent-rgb), .4); }
.po-addr {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.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: 4px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .po-addr {
    max-width: 160px;
  }
}

/* ── Lucky Spin ──────────────────────────────────────────────── */
.spin-btn {
  width: 100%; margin-top: 8px; padding: 11px; font-weight: 800;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
}
.spin-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--hover-surface); }
.spin-btn:disabled { opacity: .55; 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; }
/* Jackpot (highest prize) — gold + glow to signal it. */
.wheel-label.jackpot { color: #ffd700; font-size: 17px;
  text-shadow: 0 0 5px rgba(255, 215, 0, .9), 0 0 2px rgba(0, 0, 0, .6); }
.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(225, 29, 46, .14); border-color: rgba(225, 29, 46, .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(225,29,46,.14), rgba(255,59,74,.08));
  border: 1px solid rgba(225,29,46,.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 ──────────────────────────────────────────────── */
.sb-btn {
  width: 100%; margin-top: 8px; padding: 11px; font-weight: 800; border: 1px solid var(--line);
  color: var(--text); background: var(--panel-2); box-shadow: none;
}
.sb-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--hover-surface); }
.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(--accent-2); 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 — gold treatment; red 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(225,29,46,.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; }

/* ── AoyTasks offerwall modal ────────────────────────────────────────────────
   The default .modal-card caps at 440px, which squeezes the wall's own offer grid
   into a ~400px column. Give this one dialog real room and let the frame track the
   viewport, so it fills a desktop screen without overflowing a phone. */
#aoytasks-modal .modal-card { max-width: 1000px; }
#aoytasks-body { min-height: 420px; }
.ow-frame { width: 100%; max-width: 100%; height: min(900px, 74vh); min-height: 420px;
  display: block; border: 0; border-radius: 8px; overflow: hidden; }
@media (max-width: 560px) { .sb-grid { grid-template-columns: repeat(2, 1fr); } }
.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; }

/* ── 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; }
.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: var(--tone-active); color: var(--accent); }
.up-done { background: var(--tone-done); color: var(--accent-2); }
.up-removed { background: var(--tone-removed); 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: var(--accent-2); 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, #b01020, #ff3b4a); color: #fff; font-weight: 800; font-size: 15px;
  padding: 14px 24px; border-radius: 0 0 14px 14px; box-shadow: 0 8px 30px rgba(225,29,46,.45);
  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(225,29,46,.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: #0a0506; aspect-ratio: 2/3; }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
#reveal-img.is-locked-blur { filter: blur(32px); transform: scale(1.12); }
#reveal-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #0a0506; z-index: 2; }
#reveal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.reveal-done {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 800; font-size: 28px; color: var(--accent);
  background: rgba(10,5,6,.35); letter-spacing: 2px;
}
.reveal-ready {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; pointer-events: auto; cursor: pointer; text-align: center;
  font-weight: 800; font-size: 16px; color: var(--on-accent); 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));
}
@media (max-width: 680px) {
  .char-img {
    height: auto;
    max-height: 220px;
    margin: 0 auto 12px;
  }
}
.char-stats { display: flex; flex-direction: column; gap: 16px; }
.trait { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 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: var(--on-accent);
  font-weight: 800; font-size: 14px; padding: 5px 12px; cursor: pointer; white-space: nowrap;
}
@media (max-width: 680px) {
  .trait-plus {
    min-height: 40px;
    min-width: 44px;
  }
}
.trait-plus:disabled { background: #3a1a1e; color: #8a6066; 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: var(--tone-pending); color: var(--warn); }
.badge.paid { background: var(--tone-active); color: var(--accent); }
.badge.failed { background: var(--tone-removed); color: var(--danger); }

/* ── Claim modal ────────────────────────────────────────────── */
.modal {
  /* Above the header's world-switch dropdown (z-index 300) and its button
     (200) — a modal must sit over every other page element while it's open. */
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,5,6,.78); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px;
}
[data-theme="light"] .modal {
  background: rgba(10, 10, 12, .45);
}
.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;
}
@media (max-width: 480px) {
  .modal {
    padding: 8px;
  }
  .modal-card {
    padding: 16px 12px;
    border-radius: 14px;
    max-width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .modal-ad {
    margin-bottom: 12px;
  }
  .modal-ad iframe {
    max-width: 100%;
  }
  .captcha-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .captcha-grid img {
    border-radius: 6px;
    min-height: 44px;
  }
  .captcha-target {
    width: 48px;
    height: 48px;
  }
  .captcha-head {
    font-size: 12px;
    gap: 8px;
  }
}
.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; }
.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); }
.bonus-math {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(247, 147, 26, .45);
  background: rgba(247, 147, 26, .1);
}
.bonus-math[hidden] { display: none !important; }
.bonus-math-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bonus-math-side span { font-size: 11px; font-weight: 700; color: var(--muted); }
.bonus-math-side strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
}
.bonus-math-get { text-align: right; }
.bonus-math-get strong { color: #f7931a; font-size: 15px; }
.bonus-math-get em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #f7931a;
}
.bonus-math-arrow { color: #f7931a; font-size: 18px; font-weight: 800; }
.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: var(--deep);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 11px; margin-bottom: 12px;
}
.zems-bal { font-size: 18px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--text); }
.zems-bal small { font-size: 12px; color: var(--muted); }
.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; letter-spacing: .2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; line-height: 1.15; box-shadow: none;
}
#faucet-btn {
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
}
#faucet-btn:hover:not(:disabled) { background: #cc001f; }
#ptc-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
}
#ptc-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--hover-surface); }
.zems-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.zems-actions .btn .fb-sub { font-size: 10px; font-weight: 600; opacity: .8; }
#faucet-btn .fb-sub { opacity: .9; }
.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: var(--deep);
  border: 1px solid var(--line);
}
.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: var(--invite-input-bg); 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); }
.ref-earned-by-world {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.ref-earned-by-world-label {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.ref-world-earn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 12px;
}
.ref-world-earn b { font-size: 16px; }
.ref-world-name { font-weight: 600; margin-right: auto; }
.invite-stats-worlds { font-size: 12px; color: var(--muted); margin-top: 4px; }
.invite-world-icon { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; }

/* hearts meter */
.hearts { font-size: 15px; letter-spacing: 1px; line-height: 1; }
.hearts .on { color: var(--accent-2); }
.hearts .off { color: var(--hearts-off); }
.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: var(--accent-2); 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: var(--on-accent); 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: 28px auto 0; padding: 0 4px;
}
.gallery-head {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.gallery-section h2 {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px;
  margin: 0 0 6px;
}
.gallery-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.gallery-total { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.45; }
.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));
}
@media (max-width: 520px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
.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, .gcard video { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--deep-2); }
.gcard.locked img { filter: blur(18px); transform: scale(1.22); }
.gcard .lock-pill {
  position: absolute; top: 8px; left: 8px; background: rgba(10,5,6,.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(10,5,6,.7);
  color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  padding: 2px 8px; border-radius: 99px;
}
[data-theme="light"] .gcard .num,
[data-theme="light"] .gcard .lock-pill {
  background: rgba(255,255,255,.82);
  color: var(--text);
  box-shadow: 0 1px 4px var(--shadow);
}
[data-theme="light"] .gcard .lock-pill { color: var(--warn); }
.gcard .boost {
  position: absolute; top: 8px; right: 8px;
  background: var(--accent); color: var(--on-accent); 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, var(--panel-2), var(--panel-2) 10px, var(--deep) 10px, var(--deep) 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(225,29,46,.45);
  transition: top .22s ease, left .22s ease, width .22s ease, height .22s ease;
}
.tour-ring.tour-ring--center {
  border: none;
  border-radius: 0;
  box-shadow: 0 0 0 9999px rgba(6, 8, 12, .78);
  transition: none;
}
.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);
  pointer-events: auto;
}
.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: 22px auto; padding: 12px 16px 18px;
  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; font-weight: 700; 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-left,
.ad-space .ad-right { display: flex; flex-direction: column; gap: 10px; align-items: center; max-width: 100%; }
.ad-space iframe {
  border-radius: 8px;
  background: var(--deep);
  max-width: 100%;
}
.house-banner {
  display: block; line-height: 0; border-radius: 8px; overflow: hidden;
  max-width: 100%; border: 1px solid var(--line);
}
.house-banner img { display: block; width: 728px; max-width: 100%; height: auto; }

@media (max-width: 768px) {
  .ad-space {
    margin: 16px auto;
    padding: 10px 10px 14px;
  }
  .ad-space-inner {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
}
@media (max-width: 500px) {
  .ad-space .ad-right iframe[src*="468x60"] {
    max-width: 100%;
    transform: scale(clamp(0.6, calc((100vw - 50px) / 468), 1));
    transform-origin: top center;
    margin-bottom: calc((60px * (1 - clamp(0.6, calc((100vw - 50px) / 468), 1))) * -1);
  }
}


/* ── 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, var(--panel-2), var(--panel-2) 10px, var(--deep) 10px, var(--deep) 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; }

/* Site footer — disclosure + legal nav */
.site-footer {
  max-width: 720px;
  margin: 36px auto 8px;
  padding: 0 8px 28px;
  text-align: center;
}
.site-footer-inner {
  position: relative;
  padding-top: 22px;
}
.site-footer-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(160px, 40%);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .85;
}
.site-footer-brand {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--text);
  opacity: .92;
}
.site-footer-brand span { color: var(--accent); }
.site-footer-disc {
  margin: 0 auto 14px;
  max-width: 38rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  font-weight: 400;
}
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 2px;
  font-size: 12px;
  line-height: 1.5;
}
.site-footer-nav a {
  color: #b8b3b6;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.site-footer-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}
.site-footer-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.site-footer-sep {
  color: var(--line);
  user-select: none;
  padding: 0 2px;
}
#support-foot[hidden] { display: none !important; }
#support-foot:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
@media (max-width: 520px) {
  .site-footer { margin-top: 28px; padding-bottom: 20px; }
  .site-footer-disc { font-size: 11.5px; }
  .site-footer-nav { gap: 4px 0; }
}

/* ── Membership (VIP) ───────────────────────────────────────────────── */
/* 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}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: var(--tone-active); 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: 0; 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; }
.mem-body { display: grid; grid-template-columns: 1.02fr 1fr; gap: 24px; align-items: start; margin-top: 14px; }
.mem-pay-row { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.mem-pay-step { margin: 0 0 14px; font-size: 15px; font-weight: 800; color: var(--text); text-align: center; }
.mem-coin-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.mem-coin-tabs.is-satspay { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
@media (max-width: 680px) { .mem-coin-tabs { grid-template-columns: 1fr; } }
.mem-coin-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 0;
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
}
.mem-coin-back:hover { color: var(--text); }
.mem-coin {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 14px; text-align: left; font-family: inherit; cursor: pointer;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.mem-coin:hover { border-color: var(--muted); }
.mem-coin.active { border-color: var(--accent); background: rgba(225,29,46,.1); }
.mem-coin-title { font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.mem-coin-logo {
  width: 22px; height: 22px; border-radius: 50%; object-fit: contain; flex: 0 0 auto;
  background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.mem-coin-emoji { font-size: 18px; line-height: 1; }
.mem-coin-sub { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.mem-pay-status {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
}
.mem-pay-status.is-wait { color: var(--warn); }
.mem-pay-status.is-ok { color: var(--accent); }
.mem-satspay-hint { margin: 10px 0 14px; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.45; }
.mem-satspay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 20px;
  background: #ffffff !important;
  color: #0b1220 !important;
  border: 1px solid #d8dee9;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
  cursor: pointer;
  transition: background .15s ease, transform .08s ease;
}
.mem-satspay-btn:hover {
  background: #f3f5f9 !important;
  color: #0b1220 !important;
}
.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; }
@media (max-width: 520px) {
  #member-modal .modal-card {
    padding: 18px 12px;
  }
  .mem-passes {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mem-card-price {
    font-size: 24px;
  }
  .mem-card {
    padding: 14px 10px;
  }
  .mem-screwtest {
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
  }
}
.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;
  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; }
.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; }
.mine-vip:empty { display: none; }
.hash-vip { color: #ffd76a; }
.hash-vip-tag { font-size: .5em; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.fb-vip { color: #ffd76a; font-weight: 800; }
.logo-wrap { display: inline-flex; align-items: flex-start; }
.vip-sup { font-size: 9px; font-weight: 800; color: #ffd76a; line-height: 1; margin-left: 2px; white-space: nowrap; letter-spacing: .02em; }
.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-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 14px 0 8px; }
.mem-qr {
  width: 180px; height: 180px; padding: 8px; background: #fff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.mem-qr canvas, .mem-qr img { width: 164px; height: 164px; display: block; }
.mem-qr-cap { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.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 + Zems 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; }
.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; }
.modal-card--support { max-width: 520px; max-height: min(92vh, 820px); overflow: auto; }
.sup-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 5px; text-align: left; }
.sup-select, .sup-textarea, .sup-search { 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, .sup-search: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-history { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.sup-hist-head { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 18px 0 10px; text-align: left; }
.sup-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.sup-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-filter {
  font-family: inherit; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.sup-filter.is-on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.sup-hist-meta { font-size: 11px; color: var(--muted); text-align: left; margin: 0 0 8px; min-height: 14px; }
.sup-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 18px 8px; margin: 0; }
.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-ticket.sup-closed { opacity: .88; }
.sup-tk-toggle {
  display: flex; justify-content: space-between; gap: 10px; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.sup-tk-top { font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.sup-tk-cat { color: var(--text); }
.sup-tk-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sup-tk-status { color: var(--muted); white-space: nowrap; }
.sup-tk-time { font-size: 10px; font-weight: 600; color: var(--muted); opacity: .85; }
.sup-tk-preview { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sup-ticket.is-open .sup-tk-preview { display: none; }
.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%; position: relative; }
.sup-bubble .sup-who { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; opacity: .75; }
.sup-bubble .sup-when { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); opacity: .8; }
.sup-shot { display: block; max-width: 100%; max-height: 220px; margin-top: 6px; border-radius: 8px; border: 1px solid var(--line); }
.sup-attach { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 12px; color: var(--muted); cursor: pointer; }
.sup-attach input { font-size: 12px; }
.sup-attach-note { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.sup-you { background: var(--panel-2); border: 1px solid var(--line); margin-left: auto; }
.sup-staff { background: rgba(230,0,35,.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), #c41626); color: var(--on-accent); 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(225,29,46,.55); } }
@media (prefers-reduced-motion: reduce) { .support-reply-chip { animation: none; } }

/* ── The golden VIP Zems Miner Girl (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;
}
[data-theme="light"] .gcard.vipcard {
  background: linear-gradient(160deg, #fff6d6 0%, var(--panel) 55%);
}
.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); }
.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;
}
[data-theme="light"] .gcard.vipcard .gtitle {
  color: #8a6a10;
  background: none;
  -webkit-text-fill-color: unset;
}
.gcard.vipcard .gh { color: #ffd77a; font-weight: 700; }
[data-theme="light"] .gcard.vipcard .gh { color: #9a7a18; }
.gcard.vipcard .gcard-hearts { color: #c9a768; font-size: 11px; }
[data-theme="light"] .gcard.vipcard .gcard-hearts { color: #8a6a10; }
.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); }

.miner-head-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.earn-open {
  width: auto; margin: 0; padding: 5px 10px; font-size: 12px; font-weight: 700;
  line-height: 1.2; flex-shrink: 0; white-space: nowrap;
}
#earn-modal .earn-card { max-width: 560px; text-align: left; padding-top: 20px; }
#earn-modal .earn-card h2 { justify-content: flex-start; padding-right: 28px; }
.earn-lead { margin: 0 0 12px; }
.earn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.earn-chip {
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 99px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}
.earn-chip.vip { background: rgba(255, 210, 63, .14); border-color: #d4a72c; color: #ffd23f; }
[data-theme="light"] .earn-chip.vip { color: #8a6a10; }
.earn-hero {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .16), var(--panel-2));
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 14px; padding: 14px 16px; margin: 0 0 12px;
}
[data-theme="light"] .earn-hero {
  background: linear-gradient(180deg, rgba(230, 0, 35, .08), var(--panel-2));
}
.earn-hero-k { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.earn-hero-sub { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.earn-coins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.earn-coin { background: rgba(0,0,0,.18); border-radius: 10px; padding: 8px 10px; }
.earn-coin strong { display: block; font-family: 'JetBrains Mono', monospace; font-size: 16px; line-height: 1.2; }
.earn-coin span { font-size: 11px; color: var(--muted); font-weight: 700; }
.earn-coin.zero strong { color: var(--accent); }
.earn-coin.zems strong { color: var(--accent-2); }
.earn-tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.earn-tab {
  flex: 1; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  border-radius: 9px; padding: 7px 4px; font-size: 12px; font-weight: 800; cursor: pointer;
}
.earn-tab.on { border-color: var(--accent); color: var(--text); background: rgba(230, 0, 35, .12); }
.earn-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.earn-col { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.earn-col.play { border-color: rgba(var(--accent-rgb), .4); }
.earn-col h3 { margin: 0 0 2px; font-size: 13px; }
.earn-col-sub { margin: 0 0 10px; font-size: 11px; color: var(--muted); line-height: 1.35; }
.earn-col .earn-coin strong { font-size: 14px; }
.earn-extra { margin: 8px 0 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
.earn-ptc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.earn-ptc-row input { width: 72px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.earn-claim { margin: 12px 0 0; font-size: 13px; color: var(--text); }
.earn-claim b { color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.earn-more { margin-top: 12px; font-size: 12px; color: var(--muted); }
.earn-more summary { cursor: pointer; color: var(--text); font-weight: 700; }
.earn-more p { margin: 8px 0 0; line-height: 1.45; }
.earn-sim-link { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: 13px; }
.earn-page { max-width: 960px; margin: 0 auto; padding: 8px 16px 56px; }
.earn-page h1 { font-size: 26px; margin: 8px 0 6px; }
.earn-page .lead { color: var(--muted); max-width: 640px; margin: 0 0 18px; }
.earn-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.earn-ctrl { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.earn-ctrl label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.earn-ctrl input[type="range"] { width: 100%; accent-color: var(--accent); }
.earn-ctrl .val { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-weight: 700; }
.earn-toggles { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 0; }
.earn-toggles label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 13px; }
@media (max-width: 720px) {
  .earn-compare, .earn-controls, .earn-coins { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .earn-page { padding: 8px 10px 48px; }
  .earn-ctrl { padding: 12px 10px; }
  #earn-modal .earn-card { padding: 16px 12px; }
  .earn-tabs { flex-wrap: wrap; }
  .earn-tab { min-height: 38px; }
}

/* ── Mobile pass ─────────────────────────────────────────────── */
.grid > * { min-width: 0; }
.ad-space,
.ad-space-inner,
.ad-space .ad-left,
.ad-space .ad-right,
.house-banner { min-width: 0; max-width: 100%; }
.house-banner { width: min(100%, 728px); }
.house-banner img { width: 100%; height: auto; }
.ad-row iframe,
.ad-space iframe { max-width: 100%; }

@media (max-width: 680px) {
  .theme-toggle {
    top: max(8px, env(safe-area-inset-top));
    bottom: auto;
    right: max(8px, env(safe-area-inset-right));
    width: 38px;
    height: 38px;
  }
  .topbar2,
  .partners-top { padding-right: 54px !important; }
  .speech-bubble { left: 8px; right: auto; top: 8px; max-width: calc(100% - 56px); }
  .topbar { align-items: flex-start; gap: 8px; padding-top: 8px; }
  .brand-col { width: 100%; gap: 6px; }
  .wallet {
    flex: 1 0 100%;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 4px;
    margin-top: 0;
  }
  .wallet .btn {
    flex: 0 0 auto;
    min-width: 40px;
    min-height: 40px;
    padding: 6px 8px;
  }
  .addr { flex: 0 1 96px; max-width: 96px; }
  #tour-btn,
  #logout {
    width: 40px;
    padding: 0;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #tour-btn::before { content: "❔"; font-size: 16px; line-height: 1; }
  #logout::before { content: "↩"; font-size: 18px; line-height: 1; }
  .world-tabs { flex-wrap: wrap; max-width: 100%; }
  .world-tab { min-height: 36px; }
  .image-wrap {
    aspect-ratio: 4 / 5;
    max-height: min(52dvh, 420px);
    width: min(100%, 360px);
    margin: 0 auto;
  }
  .reveal-actions { flex-wrap: wrap; }
  .reveal-actions .btn { min-height: 44px; min-width: calc(50% - 4px); }
  .streak-box > div,
  .quests-box > div { flex-wrap: wrap; gap: 4px; }
  .quests-list li { flex-wrap: wrap; min-width: 0; }
  .q-label { min-width: 0; overflow-wrap: anywhere; }
  .modal-x { min-width: 44px; min-height: 44px; }
  .gcard { min-width: 0; }
}

@media (max-width: 520px) {
  .ad-space .ad-left,
  .ad-space .ad-right { width: 100%; align-items: stretch; }
  .ad-space .ad-left iframe {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 300 / 250;
    margin: 0 auto;
  }
  .ad-space .ad-right iframe { display: none; }
  .copy-row { flex-direction: column; align-items: stretch; }
  .copy-btn { width: 100%; }
  .sb-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .landing { padding: 8px 0 12px; min-width: 0; }
  .hero-copy,
  .hero-girl,
  .auth-card { min-width: 0; max-width: 100%; }
  .tab { font-size: 13px; padding: 10px 6px; }
  #disclosure { padding: 10px 36px 10px 12px; }
}

@media (max-width: 400px) {
  #member-btn {
    width: 40px;
    padding: 0;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #member-btn::before { content: "⭐"; font-size: 16px; line-height: 1; }
  .addr { flex-basis: 72px; max-width: 72px; }
  .mine-hash { font-size: 15px; }
  .mine-head { font-size: 12px; gap: 4px; }
}
