/* ============================================================
   Mythra Mining - dark bitcoin theme
   Mobile-first · dependency-free · offline-capable (CSS only,
   no images, no webfonts, no emoji)
   ============================================================ */

/* ---------- webfonts (self-hosted, latin subsets) ---------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/Archivo-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/Archivo-900.woff2') format('woff2');
}

/* Easter egg font (Standard Galactic Alphabet): only downloaded when the
 * 1-in-10,000 roll hits (see app.js). !important so it overrides the
 * heading/body font variables too; reloading the page resets it. */
@font-face {
  font-family: 'SerifGalactic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SerifGalactic-Regular.ttf') format('truetype');
}

.sga-mode, .sga-mode * {
  font-family: 'SerifGalactic', sans-serif !important;
}

:root {
  /* palette */
  --bg: #0a0a0b;
  --bg-raised: #101013;
  --surface: #141418;
  --surface-2: #1c1c22;
  --border: #27272f;
  --border-soft: rgba(255, 255, 255, 0.06);

  --text: #f6f2e9;
  --muted: #b3ab9e;
  --faint: #7f786d;

  /* bitcoin orange family */
  --accent: #f7931a;
  --accent-hi: #ffb84d;
  --accent-deep: #c26a06;
  --accent-ink: #1c1104;          /* dark text on amber buttons */
  --accent-soft: rgba(247, 147, 26, 0.10);
  --accent-glow: rgba(247, 147, 26, 0.35);

  --ok: #34d399;
  --ok-deep: #0ea472;
  --ok-glow: rgba(52, 211, 153, 0.35);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.10);

  --radius: 14px;
  --radius-sm: 10px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: 'Archivo', 'Inter', -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
          "Liberation Mono", monospace;

  --tap: 48px; /* minimum touch target */
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overscroll-behavior: none;
}

body {
  margin: 0;
  /* App shell: the page itself never scrolls. Header and bottom tab bar
     are fixed-height rows in this column, and only <main> scrolls (see
     .container). A position:fixed bar anchored to a scrolling document
     still drifts/jitters in mobile WebViews as the visual viewport
     resizes during scroll; a bar in normal flow outside the scroller
     cannot move at all. */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(620px 320px at 50% -90px, rgba(247, 147, 26, 0.13), transparent 70%),
    radial-gradient(420px 420px at 105% 100%, rgba(247, 147, 26, 0.05), transparent 60%),
    var(--bg);
}

button { font-family: inherit; }

::selection { background: rgba(247, 147, 26, 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.hidden { display: none !important; }

/* ---------- layout ---------- */

.container {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---------- header ---------- */

.header {
  flex: 0 0 auto;
  z-index: 50;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 10, 11, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  min-height: var(--tap);
}

/* Mythra Mining logo mark - transparent PNG/WebP, so no circular
   crop or box shadow: the header background shows through. The
   drop-shadow follows the logo's alpha shape instead. */
.brand-logo {
  width: 45px;
  height: 45px;
  flex: none;
  background: transparent;
  filter: drop-shadow(0 0 7px rgba(247, 147, 26, 0.45));
}

/* circular icon button (e.g. the info "i" in the header) */
.icon-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- bottom tab bar (Instagram-style) ---------- */

.bottom-nav {
  /* Static by construction: a flex row below the scrolling <main>, not a
     fixed overlay — it has nowhere to move to when content scrolls. */
  flex: 0 0 auto;
  z-index: 60;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  background: rgba(12, 12, 14, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 62px;
  padding: 8px 4px 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav .tab svg {
  width: 24px;
  height: 24px;
  flex: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

.bottom-nav .tab:hover { color: var(--text); }

.bottom-nav .tab.active {
  color: var(--accent);
}

.bottom-nav .tab.active svg {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* ---------- foreground push toast ---------- */

.push-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 80;
  width: min(92vw, 440px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(20, 20, 24, 0.96);
  border: 1px solid rgba(247, 147, 26, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
  cursor: pointer;
  animation: toast-in 0.25s ease;
}

.push-toast strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-hi);
}

.push-toast span {
  font-size: 0.85rem;
  color: var(--text);
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 520px) {
  .brand { font-size: 1rem; gap: 7px; }
  .brand-logo { width: 40.5px; height: 40.5px; }
}

/* ---------- typography ---------- */

h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  margin: 6px 0 6px;
}

h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 10px;
}

p.lead { color: var(--muted); margin: 0 0 8px; font-size: 1rem; }

.center { text-align: center; }
.muted { color: var(--muted); font-size: 0.92rem; }

.link {
  color: var(--accent-hi);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 147, 26, 0.35);
}

.link:hover { border-bottom-color: var(--accent-hi); }

/* ---------- cards ---------- */

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* ---------- wallet card heads + info toggle ---------- */

.wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wallet-head h3 { margin-bottom: 0; }

/* small circular info (i) button in a card head: toggles .wallet-info */
.info-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  margin-top: 1px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.info-toggle svg {
  width: 19px;
  height: 19px;
}

.info-toggle:hover,
.info-toggle.open {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.wallet-info {
  margin-top: 10px;
  padding: 12px 14px 4px;
  border: 1px solid var(--border-soft);
  border-radius: calc(var(--radius) - 4px);
  background: rgba(255, 255, 255, 0.03);
}

.wallet-info p:first-child { margin-top: 0; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.95rem;
}

.stat-row:last-of-type { border-bottom: none; }

.stat-row .label { color: var(--muted); flex: none; }
.stat-row .value {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ---------- auth forms ---------- */

.form {
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-top: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.form label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.form input {
  width: 100%;
  min-height: var(--tap);
  padding: 13px 14px;
  margin-bottom: 16px;
  font: 400 1rem var(--font);
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  caret-color: var(--accent);
}

.form input:last-of-type { margin-bottom: 6px; }

.form input::placeholder { color: var(--faint); }

.form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.22);
}

/* keep autofill dark */
.form input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 80px var(--bg-raised) inset;
  caret-color: var(--text);
}

.form .btn { margin-top: 14px; }

form + p.center.muted { margin-top: 20px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  margin-top: 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35),
              0 8px 22px rgba(247, 147, 26, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover { filter: brightness(1.07); }

.btn-danger {
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fca5a5;
  box-shadow: none;
}
.btn-danger:hover { background: var(--danger-soft); filter: none; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
  margin-top: 12px;
  min-height: 46px;
  font-weight: 600;
}

.btn-google {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
  margin-top: 6px;
  min-height: 52px;
  font-weight: 600;
}
.btn-google:hover { border-color: rgba(247, 147, 26, 0.65); box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.14); filter: none; }
.btn-google svg { flex: none; }
.btn-google:disabled { opacity: 0.75; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
  color: var(--faint);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.solo-note {
  font-size: 13px;
  color: #57a8ff;
  margin: 12px 0 8px;
  line-height: 1.6;
}

.mode-hint {
  font-size: 12px;
  color: #9aa0aa;
  margin-top: 6px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
}

.modal h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
}

.modal .stat-row.total {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 12px;
  margin-top: 8px;
  font-weight: 700;
}

.modal .warning {
  background: rgba(255, 150, 50, .1);
  border: 1px solid rgba(255, 150, 50, .3);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #ffab5e;
  margin: 16px 0;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.modal-actions .btn {
  flex: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
}

/* Live hashrate hero (dashboard, mining): the number IS the hero -
   huge display type, green gradient + glow, counting up on load (app.js
   animateHashCount). The old 14px green line with the non-custodial
   caption under it was removed 2026-10-26 at Noah's request. */
.live-hash {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 0;
  line-height: 1;
}

.live-hash-num {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 16vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  filter: drop-shadow(0 0 22px rgba(52, 211, 153, 0.35));
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .live-hash-num {
    background: linear-gradient(180deg, #d1fae5 0%, #34d399 55%, #0ea472 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.live-hash-unit {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 6vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ok);
  opacity: 0.9;
}

.live-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 16px 7px 12px;
  border: 1px solid rgba(52, 211, 153, 0.38);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.earnings-header--live { padding: 32px 20px 28px; }

.earnings-header--live::before {
  background: radial-gradient(340px 150px at 50% -20px, rgba(52, 211, 153, 0.22), transparent 70%);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  margin-right: 6px;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.live-status .live-dot {
  width: 9px;
  height: 9px;
  margin-right: 0;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35),
              0 4px 12px rgba(247, 147, 26, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: saturate(0.55);
  transform: none;
}

.btn.btn-ghost {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.btn-ghost:hover { color: var(--text); border-color: var(--accent); filter: none; }

/* loading spinner (dark-on-amber, for use inside .btn) */
.spinner {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(28, 17, 4, 0.28);
  border-top-color: var(--accent-ink);
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- error ---------- */

.error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.38);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.error::before {
  content: "!";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--danger);
  color: #200a0a;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
}

/* ---------- packages ---------- */

#pkg-list .card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  padding-top: 26px;
  margin: 20px 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#pkg-list .card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

/* hero line: hash rate + duration as one big display-font number
   (spacing and clarity pass - replaces the three label/value rows) */
.pkg-hero {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent-hi);
  margin-top: 2px;
}

/* price: the second large number, gradient numerals with solid fallback */
.pkg-price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-top: 4px;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .pkg-price {
    background: linear-gradient(180deg, #ffe9c4, var(--accent) 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* tier accent bar - hue cycles per card for tier differentiation */
#pkg-list .card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tier-a, var(--accent)), var(--tier-b, var(--accent-hi)));
}

#pkg-list .card:nth-child(3n+2) { --tier-a: #ff8a3d; --tier-b: #ffc46b; }
#pkg-list .card:nth-child(3n)   { --tier-a: #e8b33c; --tier-b: #f7931a; }

@media (hover: hover) {
  #pkg-list .card:hover {
    transform: translateY(-2px);
    border-color: rgba(247, 147, 26, 0.45);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45),
                0 0 24px rgba(247, 147, 26, 0.10);
  }
}

#pkg-list .card p.muted { margin: 14px 0 2px; line-height: 1.6; }
#pkg-list .rent-btn { margin-top: 18px; }

/* shimmering loading text while packages / rentals load */
#pkg-list > p:only-child,
#rental-list > p:only-child {
  padding: 28px 0;
  text-align: center;
  background: linear-gradient(90deg, var(--faint) 30%, var(--text) 50%, var(--faint) 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer { to { background-position: -220% 0; } }

/* ---------- payment success ---------- */

.card.center {
  margin-top: 36px;
  padding: 36px 24px 30px;
}

/* CSS-only success check badge */
.card.center::before {
  content: "\2713"; /* check mark, text - not emoji */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #06281c;
  background: radial-gradient(circle at 32% 30%, #7ef0c1, var(--ok) 60%, var(--ok-deep));
  box-shadow: 0 0 32px rgba(52, 211, 153, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card.center h1 { font-size: 1.5rem; }
.card.center .lead { margin-bottom: 4px; }
.card.center .btn { margin-top: 22px; }

/* ---------- dashboard: earnings hero ---------- */

.earnings-header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 28px 20px 24px;
  margin: 14px 0 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(247, 147, 26, 0.6), rgba(247, 147, 26, 0.08) 42%, rgba(52, 211, 153, 0.3)) border-box;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45),
              0 0 44px rgba(247, 147, 26, 0.08);
}

.earnings-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(320px 130px at 50% -20px, rgba(247, 147, 26, 0.2), transparent 70%);
}

.earnings-header .big {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 11vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  overflow-wrap: anywhere;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .earnings-header .big {
    background: linear-gradient(180deg, #ffe3b3 0%, var(--accent) 58%, var(--accent-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.earnings-header .cap {
  position: relative;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Welcome hero (no rentals yet): a real headline + sub + CTA, not a lone
   grey label in a big empty box. The "Your rentals" list below is hidden
   in this state, so this is the dashboard's only empty-state message. */
.earnings-header--welcome { padding: 34px 20px 30px; }

.earnings-header--welcome .hero-eyebrow {
  position: relative;
  margin-bottom: 10px;
  color: var(--accent-hi);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.earnings-header--welcome .big { font-size: clamp(2rem, 10vw, 2.6rem); }

.earnings-header--welcome .hero-sub {
  position: relative;
  margin: 12px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.earnings-header--welcome .hero-cta {
  position: relative;
  width: auto;
  padding: 13px 32px;
  margin-top: 20px;
  text-decoration: none;
  text-align: center;
}

/* Idle strip (rentals exist, none active): slim and intentional, so it
   reads as a status line rather than an empty placeholder. */
.earnings-header--idle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 20px;
}

.earnings-header--idle .pill { position: relative; }

.earnings-header--idle .idle-note {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- dashboard: status pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* queued - amber outline */
.pill-queued {
  color: var(--accent-hi);
  border: 1px solid rgba(247, 147, 26, 0.55);
  background: rgba(247, 147, 26, 0.08);
}

/* active - green glow with pulsing live dot */
.pill-active {
  color: var(--ok);
  border: 1px solid rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.08);
  box-shadow: 0 0 14px var(--ok-glow);
}

.pill-active::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.3; } }

/* expired - muted gray */
.pill-expired {
  color: var(--faint);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- dashboard: countdown timers ---------- */

.countdown {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: var(--accent-hi);
  white-space: nowrap;
}

/* ---------- dashboard: empty state ---------- */

.empty {
  text-align: center;
  padding: 44px 20px 36px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.015);
}

/* simple mining-rig illustration (inline SVG in the empty-state markup) */
.empty .rig {
  display: block;
  width: 108px;
  height: 86px;
  margin: 2px auto 18px;
  filter: drop-shadow(0 0 16px rgba(247, 147, 26, 0.15));
}

.empty h3 { margin: 0 0 6px; font-size: 1.15rem; }
.empty p.muted { margin: 0 0 4px; }
.empty .btn { width: auto; padding: 14px 34px; margin-top: 18px; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ---------- earnings calculator (packages) ---------- */

.calc-card { margin-bottom: 20px; }
.calc-card h3 { margin: 0 0 2px; }

.calc-hash-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
}
.calc-hash-row .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.calc-hash-row .value { font-weight: 700; font-size: 1.25rem; color: var(--accent-hi); font-variant-numeric: tabular-nums; }

#calc-hash {
  width: 100%;
  margin: 10px 0 4px;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  outline: none;
}
#calc-hash::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd9a0, var(--accent) 65%, var(--accent-deep));
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 14px var(--accent-glow);
  cursor: pointer;
}
#calc-hash::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd9a0, var(--accent) 65%, var(--accent-deep));
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 14px var(--accent-glow);
  cursor: pointer;
}

.calc-dur-row { display: flex; gap: 8px; margin: 12px 0 4px; }
.dur-btn {
  flex: 1;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.dur-btn.active {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 0 16px var(--accent-glow);
}

.calc-out { margin-top: 12px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.calc-out-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
}
.calc-out-row .label { color: var(--muted); font-size: 0.85rem; }
.calc-out-row .value {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.calc-fresh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 0.78rem;
}
.live-dot.sm { width: 8px; height: 8px; }

.calc-disc { font-size: 0.75rem; margin: 8px 0 0; line-height: 1.45; }

.pkg-est {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(247, 147, 26, 0.25);
  color: var(--accent-hi);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- expected rewards (dashboard, Option E 2026-10-29) ---------- */

.exp-card { margin: 28px 0 0; }
.exp-card h3 { margin: 0; }
.proj-sub { margin: 2px 0 8px; font-size: 0.8rem; }
.exp-total {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--accent-hi);
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
}
.exp-total small { font-size: 1.1rem; font-weight: 800; }
.exp-usd { margin: 2px 0 0; font-size: 0.85rem; }
.exp-head {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.exp-row { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.exp-row.first { padding-top: 2px; }
.exp-card.single .exp-row.first {
  border-top: 1px solid var(--border-soft);
  margin-top: 12px;
  padding-top: 12px;
}
.exp-card .exp-row:last-of-type { border-bottom: none; }
.exp-row-main, .exp-row-sub {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.exp-row-sub { justify-content: space-between; }
.exp-sats { margin-left: auto; }
.exp-name { font-weight: 600; font-size: 0.95rem; }
.exp-th { font-size: 0.85rem; margin-left: 4px; }
.exp-sats {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent-hi);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.exp-row-sub { margin-top: 2px; font-size: 0.8rem; }

/* ---------- rewards history + rig cards (2026-10-27) ---------- */

.rh-card { margin: 28px 0 0; }
.rh-card h3 { margin: 0; }
#rh-chart { width: 100%; display: block; margin-top: 6px; }
.rh-ranges { margin-top: 4px; }

.eff { margin-top: 10px; }
.eff-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 6px 0 2px;
}
.eff-fill { height: 100%; border-radius: 999px; }
.eff-good { background: var(--ok); }
.eff-mid { background: var(--accent); }
.eff-low { background: var(--danger); }
.eff-time { background: var(--accent-hi); }

.rig-progress { margin-top: 8px; }
.rig-progress .eff-track { margin: 0 0 4px; }
.rig-progress-label { font-size: 12px; color: var(--faint); }

/* ---------- FAQ accordion (info page) ---------- */

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 6px;
}

.faq-item {
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.faq-q:hover { color: var(--accent-hi); }

.faq-plus {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-q.open .faq-plus { transform: rotate(45deg); }

.faq-a {
  margin: 0 16px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.faq-a p { margin: 0; }

/* ---------- welcome screen ---------- */

.welcome {
  position: relative;
  overflow: hidden;
  min-height: calc(100dvh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 4px 0;
}

.btc-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.welcome > *:not(.btc-rain) {
  position: relative;
  z-index: 1;
}

.welcome-title {
  font-size: 2.7rem;
  line-height: 1.1;
  margin: 30px 0 0;
}

.welcome-tag {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  min-height: 300px;
}

.welcome-mark {
  position: absolute;
  width: min(80vw, 340px);
  opacity: 0.16;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 76%);
  mask-image: radial-gradient(circle, #000 52%, transparent 76%);
}

.welcome-tagline {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.55rem;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0;
}

.welcome-tagline .accent { color: var(--accent); }

.welcome-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-actions .btn {
  margin-top: 0;
  text-decoration: none;
}

.welcome-login {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

/* ---------- footer (privacy policy link) ---------- */
.app-footer { text-align: center; padding: 28px 0 24px; font-size: 0.9rem; }
.app-footer a { color: var(--muted); text-decoration: underline; }

/* ---------- terms + privacy consent checkbox ---------- */
/* The plain .consent rule alone loses to .form label / .form input inside
   the signup form (both outrank it), which is how the box ended up 48px
   tall (the --tap min-height from .form input) with all-caps text. The
   stronger .form label.consent selectors below beat both, so the box
   stays 18px and wrapped lines align under the text, not the box. */
.consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 0.92rem; color: var(--muted); margin: 4px 0 14px; cursor: pointer; }
.consent input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; accent-color: #f7931a; cursor: pointer; }
.consent a { color: var(--text); text-decoration: underline; }
.form label.consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 0.92rem; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5; color: var(--muted); margin: 4px 0 14px; cursor: pointer; }
.form label.consent input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: #f7931a; cursor: pointer; }
.form label.consent span { flex: 1; min-width: 0; }
/* ---------- signup PIN hint: sentence case, under the field ---------- */
.form .field-hint { margin: -8px 0 16px; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }

/* ---------- leaderboard + tags ---------- */
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.tag-gold { background: #EAB308; color: #111; }
.tag-silver { background: #C0C0C0; color: #111; }
.tag-bronze { background: #CD7F32; color: #fff; }
.tag-pink { background: #EC4899; color: #fff; }
.tag-red { background: #DC2626; color: #fff; }
.tag-purple { background: #A855F7; color: #fff; }
.tag-ember { background: #EA580C; color: #fff; }
.tag-starter { background: #0D9488; color: #fff; }
.tag-pro { background: #2563EB; color: #fff; }
.tag-whale { background: #4338CA; color: #fff; }
.tag-collector { background: #15803D; color: #fff; }
.tag-pioneer { background: #111827; color: #fff; }
.tag-first-payout { background: #B45309; color: #fff; }
.tag-former { opacity: 0.55; }
.lb-tabs { display: flex; gap: 8px; margin: 12px 0 16px; }
.lb-tab { flex: 1; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--border); background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.lb-tab.active { color: var(--text); border-color: var(--accent); }
.lb-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.lb-rank { font-weight: 700; min-width: 2.2em; color: var(--muted); padding-top: 2px; }
.lb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.lb-total { font-weight: 700; white-space: nowrap; padding-top: 2px; }
.lb-you { background: rgba(245, 197, 66, 0.08); border-radius: 8px; }
.lb-you-section { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 12px; }
.lb-you-label { font-size: 0.85em; margin: 0 0 4px; }
.lb-pager-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 8px; }
.lb-page { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.lb-page.active { color: var(--text); border-color: var(--accent); }
.lb-page:disabled { opacity: 0.4; cursor: default; }
.lb-pager-info { font-size: 0.85em; margin: 0 0 8px; }
.notice-banner { margin-bottom: 16px; }
.notice { border: 1px solid var(--accent); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: rgba(245, 197, 66, 0.06); }
.notice p { margin: 6px 0 10px; }
/* ---------- Profile settings: grouped, not one long list ---------- */
/* The Settings form sits inside a card already, so flatten the form's own
   card styling - the double border/padding was half the mess. */
#settings-form { background: none; border: none; box-shadow: none; padding: 0; margin-top: 8px; }
#settings-form .btn { width: 100%; justify-content: center; margin-top: 20px; }
.settings-group { padding: 20px 0 4px; border-top: 1px solid var(--border-soft); margin-top: 16px; }
.settings-group:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.settings-heading { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--text); }
.settings-sub { margin: 16px 0 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.settings-group > .settings-sub:first-child { margin-top: 0; }
.settings-hint { margin: -6px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
/* Profile radio/checkbox rows: stronger selector than .form label / .form input,
   so the dot/checkbox stays on the same row as its text and wrapped lines
   align under the text, not under the control. Each option is now a row
   card, so the list reads as choices rather than loose text; a checked
   row gets a subtle orange edge. The title/hint split stops long labels
   from wrapping into orphan words (e.g. "hours" on its own line). */
label.radio, label.check { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 8px; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 0.95rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); text-align: left; line-height: 1.4; }
label.radio:has(input:checked), label.check:has(input:checked) { border-color: rgba(247, 147, 26, 0.55); background: var(--accent-soft); }
label.radio input, label.check input { flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: #f7931a; }
label.radio .opt-text, label.check .opt-text { flex: 1; min-width: 0; }
.opt-hint { display: block; margin-top: 1px; font-size: 0.82rem; font-weight: 400; color: var(--muted); }
/* Tag picker: chips that wrap, not full-width rows with a checkbox + pill
   stacked on each line. */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.tag-picker label.check { display: inline-flex; align-items: center; width: auto; margin: 0; padding: 8px 12px 8px 10px; border-radius: 999px; }
.tag-picker label.check input { margin: 0; }
.tag-picker .tag { font-size: 0.78rem; padding: 3px 9px; }
