:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0b0d;
  --surface-2: #141518;
  --surface-3: #1a1d24;
  --surface-4: #22262f;
  --text: #ffffff;
  --muted: #8a919e;
  --muted-2: #5f6573;
  --line: rgba(255, 255, 255, 0.08);
  --primary: #0052FF;
  --primary-dark: #0045D9;
  --primary-light: rgba(0, 82, 255, 0.12);
  --blue: #0052FF;
  --red: #FF3333;
  --green: #00D395;
  --orange: #FF9900;
  --purple: #7B61FF;
  --lime: #C8FF00;
  --lime-dark: #a8d600;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 100px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior-y: contain;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 14px;
}

button {
  font: inherit;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

a { color: inherit; text-decoration: none; }

svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

img { display: block; max-width: 100%; }

/* ===== LAYOUT SHELL ===== */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.app-frame {
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 100px);
  position: relative;
}

.app-pages { min-height: 100%; }

.app-page {
  display: none;
  opacity: 0;
  transform: translateY(6px);
}

.app-page.is-active {
  display: block;
  animation: pageIn 0.35s var(--transition) forwards;
}

@keyframes pageIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-top: 4px;
}

.home-header { margin-bottom: 28px; }

.simple-header h2,
.centered-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.centered-header { justify-content: center; }
.with-action { align-items: center; }

/* ===== PROFILE ===== */
.profile-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  overflow: visible;
  background: linear-gradient(135deg, #2A2D35, #141518);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
}

.avatar svg { width: 22px; height: 22px; color: var(--muted); }

.avatar-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--bg);
}

.avatar-badge svg { width: 10px; height: 10px; }

.profile-copy p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 2px;
}

.profile-copy h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ===== CIRCLE BUTTON ===== */
.circle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
  display: grid;
  place-items: center;
}

.circle-btn:hover { background: var(--surface-2); }
.circle-btn:active { transform: scale(0.92); background: var(--surface-3); }
.circle-btn svg { width: 18px; height: 18px; }

.notify-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px var(--surface);
  animation: pulse 2s ease-in-out infinite;
}

/* ===== PAGE CONTENT ===== */
.page-content { display: grid; gap: 16px; }

/* ===== CARD BASE ===== */
.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:active { transform: scale(0.985); }

.compact-card { padding: 16px; }

/* ===== ICON BOXES ===== */
.icon-box, .mini-icon, .event-icon, .asset-coin {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-light);
}

.icon-box svg, .mini-icon svg, .event-icon svg, .asset-coin svg {
  width: 18px;
  height: 18px;
}

.primary-solid {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--primary);
}

/* ===== TITLE ROW ===== */
.title-row { display: flex; align-items: center; gap: 8px; }
.title-row.separated { justify-content: space-between; }

/* ===== TAGS ===== */
.status-tag, .corner-tag, .pill-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-tag.danger, .corner-tag.red { background: rgba(255,51,51,0.12); color: var(--red); }
.status-tag.blue { background: rgba(0,82,255,0.12); color: var(--blue); }
.status-tag.red { background: rgba(255,51,51,0.12); color: var(--red); }
.corner-tag.green { background: rgba(0,211,149,0.12); color: var(--green); }
.corner-tag.orange { background: rgba(255,153,0,0.12); color: var(--orange); }
.corner-tag.purple { background: rgba(123,97,255,0.12); color: var(--purple); }

/* ===== INVITE CARD ===== */
.invite-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

/* ===== CARD TEXT ===== */
.card-main h2,
.install-left h2,
.farm-info h3,
.asset-left h3,
.pay-copy h3,
.event-copy h3,
.product-copy h3,
.section-head h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.card-main h2, .install-left h2, .farm-info h3, .pay-copy h3, .event-copy h3 { font-size: 15px; }
.section-head h2 { font-size: 20px; font-weight: 700; }

.card-main p,
.install-left p,
.product-copy p,
.pay-copy p,
.asset-left p,
.event-copy p,
.farm-info p,
.miner-info span,
.empty-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-main p, .install-left p, .product-copy p, .pay-copy p, .event-copy p { margin-top: 4px; }

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.count-chip, .float-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.count-chip { background: var(--surface-3); color: var(--text); }
.float-timer.blue { background: rgba(0,82,255,0.12); color: var(--blue); }
.float-timer.red { background: rgba(255,51,51,0.12); color: var(--red); }

.subtle-text { color: var(--muted); font-size: 12px; }

/* ===== BUTTONS ===== */
.lime-button,
.primary-button,
.white-button,
.dark-button,
.olive-button,
.color-button,
.mini-primary-button,
.buy-button,
.withdraw-button,
.pill-button,
.toggle-group button,
.side-button {
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

/* Ripple effect base */
.lime-button::after,
.primary-button::after,
.white-button::after,
.buy-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.lime-button:active::after,
.primary-button:active::after,
.white-button:active::after,
.buy-button:active::after {
  opacity: 1;
}

.lime-button {
  background: var(--lime);
  color: #000;
  font-weight: 700;
}

.lime-button:hover { background: #d4ff33; }
.lime-button:active { transform: scale(0.97); background: var(--lime-dark); }

.primary-button, .mini-primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover { background: #1a66ff; }
.primary-button:active { transform: scale(0.97); background: var(--primary-dark); }

.side-button {
  min-width: 100px;
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: var(--radius-pill);
}

/* ===== INSTALL CARD ===== */
.install-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.install-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.install-actions { display: flex; align-items: center; gap: 10px; }

.white-button {
  min-width: 80px;
  height: 36px;
  background: var(--text);
  color: #000;
  font-size: 13px;
}

.white-button:hover { background: #e8e8e8; }
.white-button:active { transform: scale(0.97); }

.ghost-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: all var(--transition);
}

.ghost-close:hover { background: var(--surface-3); color: var(--text); }

/* ===== MINING CARD ===== */
.mining-card {
  min-height: 260px;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,82,255,0.06), transparent),
    radial-gradient(circle at 50% 100%, var(--surface-2), var(--surface));
}

.mining-badge, .featured-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: auto;
}

.mining-badge::before, .featured-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.kicker, .team-kicker, .stat-title, .profit-title-row span, .event-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kicker { margin-top: 20px; }

.amount-row, .team-amount, .balance-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.amount-row strong, .team-amount strong {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.amount-row span {
  color: var(--muted);
  font-size: 20px;
  font-weight: 600;
}

.claim-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  height: 52px;
  margin-top: 28px;
  font-size: 16px;
  border-radius: var(--radius-pill);
}

.claim-button svg, .withdraw-button svg, .support-fab svg, .chevron-button svg {
  width: 20px;
  height: 20px;
}

/* ===== STATS GRID ===== */
.stats-grid, .team-level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat-card, .team-level-card { padding: 20px; }

.accent-card, .active-level {
  border-color: rgba(0,82,255,0.3);
  background: linear-gradient(180deg, rgba(0,82,255,0.06), var(--surface));
}

.mini-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text);
}

.circle-icon { border-radius: 50%; }
.soft-icon { background: var(--primary-light); color: var(--primary); }

.stat-title { margin-top: 16px; }

.stat-value strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.inline-value { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.inline-value span { color: var(--muted); font-size: 14px; }

.block-value { margin-top: 6px; }
.block-value strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.block-value span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

.mini-primary-button {
  position: absolute;
  right: 20px;
  top: 20px;
  height: 28px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
}

.mini-primary-button:active { transform: scale(0.95); }

/* ===== SECTIONS ===== */
.section-block { padding-top: 8px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.left-only { justify-content: flex-start; }

.pill-button {
  height: 32px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}

.pill-button:hover { background: var(--surface-3); }
.pill-button:active { transform: scale(0.95); }

/* ===== TOGGLE GROUP ===== */
.toggle-group {
  display: inline-flex;
  background: var(--surface-2);
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  width: 100%;
  border: 1px solid var(--line);
}

.toggle-group button {
  flex: 1;
  height: 36px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  border-radius: 9px;
  transition: all var(--transition);
}

.toggle-group .is-active {
  background: var(--surface-4);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.panel-stack { display: grid; }
.toggle-panel { display: none; }
.toggle-panel.is-active { display: block; animation: fadeUp 0.3s ease forwards; }

/* ===== FARM CARD ===== */
.farm-card { padding: 20px; margin-bottom: 12px; }

.farm-head, .miner-row, .product-head, .asset-item, .asset-left, .more-event-card, .pay-card {
  display: flex;
  align-items: center;
}

.farm-head, .miner-row, .asset-item, .pay-card { gap: 14px; }

.image-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-4));
  border: 1px solid var(--line);
  flex-shrink: 0;
}

/* Shimmer placeholder for images */
.image-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.tall-thumb { width: 44px; height: 56px; }
.small-thumb { width: 40px; height: 40px; border-radius: 10px; }
.machine-thumb { width: 56px; height: 56px; }

.farm-info, .miner-info, .product-copy, .pay-copy, .event-copy { flex: 1; min-width: 0; }

.farm-info p { font-size: 13px; margin-top: 4px; }
.farm-info span, .rate-box strong, .accent-text { color: var(--text); font-weight: 600; }

.chevron-button {
  border: 0;
  padding: 8px;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.chevron-button:hover { background: var(--surface-2); }
.chevron-button:active { background: var(--surface-3); }

.dashed-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border: 1.5px dashed var(--muted-2);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  transition: all var(--transition);
}

.dashed-action:hover { border-color: var(--text); color: var(--text); background: rgba(255,255,255,0.02); }

.miner-row {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.miner-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.rate-box { display: flex; align-items: baseline; gap: 4px; }
.rate-box span { color: var(--muted); font-size: 12px; }

/* ===== EVENT PAGE ===== */
.event-hero-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(0,82,255,0.08), transparent),
    linear-gradient(135deg, var(--surface-2), var(--surface));
}

.event-hero-card h1 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.event-hero-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.event-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  margin-top: 4px;
}

.event-stats div + div {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.event-stats span { display: block; }

.event-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.full-width-button {
  width: 100%;
  height: 52px;
  font-size: 16px;
  margin-top: 4px;
  border-radius: var(--radius-pill);
}

.event-list { display: grid; gap: 12px; }

.more-event-card {
  position: relative;
  gap: 16px;
  padding: 20px;
}

.float-timer {
  position: absolute;
  top: 16px;
  right: 16px;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  z-index: 2;
}
.more-event-card .title-row .status-tag {
  display: none;
}

.event-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex: 0 0 48px;
}

.social-x { color: var(--text); background: var(--surface-3); }
.video-icon { color: var(--red); background: rgba(255,51,51,0.08); }

.color-button {
  height: 36px;
  padding: 0 16px;
  margin-top: 14px;
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--line);
}

.blue-button { background: rgba(0,82,255,0.1); color: var(--blue); border-color: rgba(0,82,255,0.2); }
.red-button { background: rgba(255,51,51,0.1); color: var(--red); border-color: rgba(255,51,51,0.2); }

.color-button:hover { filter: brightness(1.1); }
.color-button:active { transform: scale(0.97); }

/* ===== MARKET PAGE ===== */
.pay-card {
  padding: 16px 20px;
  gap: 14px;
  cursor: pointer;
}

.pay-card:hover { background: var(--surface-2); }

.product-list { display: grid; gap: 16px; }
.product-card { padding: 20px; }
.product-card:active { transform: none; }

.corner-tag {
  position: absolute;
  top: 16px;
  right: 16px;
}

.product-head { gap: 16px; }

.product-copy h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.product-copy p { margin-top: 6px; }
.product-copy p span { font-size: 13px; }
.accent-text { color: var(--primary); font-weight: 700; font-size: 15px; }

.profit-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.profit-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profit-title-row strong { font-size: 18px; color: var(--green); font-weight: 700; }

.profit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  gap: 8px;
}

.profit-grid span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.profit-grid strong { display: block; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }

.stock-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.stock-row span { color: var(--text); font-weight: 500; }
.stock-row em { font-style: normal; color: var(--muted); }

.stock-bar {
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}

.stock-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #1a66ff);
  border-radius: 2px;
  transition: width 1s ease;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.price-row > div { display: flex; flex-direction: column; }
.price-row strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.price-row span { font-size: 12px; color: var(--muted); margin-top: 2px; }

.buy-button {
  width: 120px;
  height: 44px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
}

/* ===== TEAM PAGE ===== */
.primary-surface { background: var(--surface-2); }

.team-summary-card {
  padding: 28px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,82,255,0.06), transparent),
    var(--surface-2);
}

.team-kicker { margin-bottom: 4px; }

.team-amount strong { font-variant-numeric: tabular-nums; }
.team-amount span { font-size: 20px; margin-left: 4px; color: var(--muted); }

.team-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  gap: 8px;
}

.team-stats div { text-align: center; }
.team-stats span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.team-stats strong { display: block; font-size: 18px; margin-top: 6px; color: var(--text); font-variant-numeric: tabular-nums; }

.referral-box {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  text-align: left;
  border: 1px solid var(--line);
}

.referral-box p { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-weight: 600; letter-spacing: 0.04em; }
.referral-box strong { font-size: 13px; word-break: break-all; color: var(--text); display: block; }

.referral-box-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.dark-button, .olive-button {
  flex: 1;
  height: 40px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.dark-button {
  background: var(--surface-4);
  color: var(--text);
  border: 1px solid var(--line);
}

.olive-button { background: var(--primary); color: #fff; }

.dark-button:hover { background: var(--surface-3); }
.dark-button:active { transform: scale(0.97); }
.olive-button:hover { background: #1a66ff; }
.olive-button:active { transform: scale(0.97); }

.team-level-card {
  text-align: center;
  padding: 18px 12px;
  transition: all var(--transition);
  cursor: pointer;
}
.team-level-card:active { transform: scale(0.95); }

.team-level-card span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.team-level-card strong { display: block; font-size: 22px; font-weight: 700; margin: 8px 0; color: var(--text); }
.team-level-card p { font-size: 12px; color: var(--muted); margin: 0; }

.referrals-card { padding: 20px; min-height: 180px; }
.refs-head { justify-content: space-between; }

.pill-label {
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--line);
}

.empty-state {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ===== ASSETS PAGE ===== */
.balance-card {
  padding: 28px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,82,255,0.06), transparent),
    var(--surface);
}

.balance-amount { margin-top: 12px; justify-content: center; }
.balance-amount strong {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.balance-amount span { font-size: 28px; color: var(--muted); font-weight: 600; }

.withdraw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  background: var(--surface-3);
  color: var(--text);
  margin-top: 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 14px;
}

.withdraw-button:hover { background: var(--surface-4); }
.withdraw-button:active { transform: scale(0.97); }

.asset-list { display: grid; gap: 8px; }

.asset-item {
  padding: 18px 20px;
  cursor: pointer;
  transition: background var(--transition);
}

.asset-item:hover { background: var(--surface-2); }

.asset-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.asset-left h3 { font-size: 16px; font-weight: 700; margin: 0; }
.asset-left p { margin: 2px 0 0; }

.asset-coin {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
}

.asset-coin.btc { background: #F7931A; color: #fff; }
.asset-coin.bld { background: var(--primary); color: #fff; }
.asset-coin.bld svg { width: 20px; height: 20px; }

.asset-right { text-align: right; margin-left: auto; }
.asset-right strong { font-size: 17px; font-weight: 700; display: block; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.asset-right span { font-size: 13px; color: var(--muted); }

.empty-card { padding: 32px; text-align: center; color: var(--muted); }
.transaction-card { min-height: 100px; display: grid; place-items: center; }

/* ===== SUPPORT FAB ===== */
.support-fab {
  position: fixed;
  right: max(16px, calc((100vw - 430px) / 2 + 16px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
  z-index: 15;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  transition: all var(--transition);
}

.support-fab:hover { background: var(--surface-4); transform: scale(1.05); }
.support-fab:active { transform: scale(0.92); }
.support-fab svg { width: 22px; height: 22px; }

/* ===== TABBAR ===== */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 20;
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: min(calc(100% - 24px), 400px);
  height: 60px;
  padding: 0 4px;
  border-radius: 30px;
  transform: translateX(-50%);
  background: rgba(18, 19, 22, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.04) inset;
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  transition: color var(--transition);
  position: relative;
}

.tabbar-item svg { width: 22px; height: 22px; transition: transform var(--transition); }
.tabbar-item span { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }

.tabbar-item.is-active { color: var(--text); }
.tabbar-item.is-active svg { transform: scale(1.1); }

.tabbar-item.is-active::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.tabbar-item:active { color: var(--text); }
.tabbar-item:active svg { transform: scale(0.9); }

/* ===== MODAL / BOTTOM SHEET ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: end center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  width: min(100%, 430px);
  max-height: 85vh;
  padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
  border-radius: 24px 24px 0 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  display: block;
  width: 36px;
  height: 4px;
  margin: 12px auto 20px;
  border-radius: 2px;
  background: var(--muted-2);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sheet-header h2 { font-size: 20px; font-weight: 700; margin: 0; }

.sheet-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-4);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
}

.sheet-close:hover { background: var(--surface-3); }

/* ===== NOTIFICATION PANEL ===== */
.notification-list { display: grid; gap: 8px; }

.notification-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--line);
  align-items: flex-start;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}

.notification-dot.read { background: var(--muted-2); }

.notification-content { flex: 1; min-width: 0; }
.notification-content strong { display: block; font-size: 14px; margin-bottom: 4px; }
.notification-content p { font-size: 13px; color: var(--muted); margin: 0; }
.notification-time { font-size: 11px; color: var(--muted-2); flex-shrink: 0; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: max(20px, env(safe-area-inset-top, 20px));
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--surface-3);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
  border: 1px solid var(--line);
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  text-align: center;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-success { border-color: rgba(0,211,149,0.3); }
.toast.is-error { border-color: rgba(255,51,51,0.3); }
.toast.is-info { border-color: rgba(0,82,255,0.3); }

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-4) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ===== ACCORDION STATES ===== */
.farm-card.is-collapsed .dashed-action,
.farm-card.is-collapsed .miner-row { display: none; }
.pay-card.is-collapsed .pay-copy p { display: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 360px) {
  .app-frame { padding: 12px 12px 100px; }
  .invite-card { grid-template-columns: 1fr; text-align: center; }
  .invite-card .icon-box { display: none; }
  .amount-row strong, .team-amount strong { font-size: 40px; }
  .balance-amount strong { font-size: 44px; }
  .event-hero-card h1 { font-size: 26px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 16px; }
}

@media (min-width: 431px) {
  .app-frame {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible) { outline: none; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== FORM INPUTS (modals) ===== */
input[type="number"],
input[type="text"] {
  font-family: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input::placeholder { color: var(--muted-2); }

input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0,82,255,0.15);
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(0, 82, 255, 0.3);
  color: var(--text);
}

/* ===== THUMB ICONS (fill empty image placeholders) ===== */
.thumb-icon {
  display: grid;
  place-items: center;
}

.thumb-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--muted-2);
}

.thumb-sm svg {
  width: 20px;
  height: 20px;
}

.product-thumb-icon {
  display: grid;
  place-items: center;
}

.product-thumb-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--muted-2);
}

/* Avatar with image */
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== LOGIN SCREEN ===== */
#loginScreen .app-frame {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 40px;
}

.login-logo-wrap {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--primary);
  display: grid;
  place-items: center;
}

.login-logo-icon svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}

.login-logo-wrap h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.login-logo-wrap p {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
  padding: 0 20px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,82,255,0.15);
}

.login-input::placeholder {
  color: var(--muted-2);
}

.login-submit {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  border: 0;
}

.login-switch {
  text-align: center;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.login-switch a {
  color: var(--primary);
  font-weight: 600;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
}

.login-divider span {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

#googleSignInBtn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  white-space: nowrap;
}

#googleSignInBtn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

#googleSignInBtn:hover {
  background: var(--surface-2);
  border-color: rgba(255,255,255,0.15);
}

#googleSignInBtn:active {
  transform: scale(0.98);
}

#authError {
  text-align: center;
  margin-top: 10px;
  color: var(--red);
  font-size: 13px;
  min-height: 18px;
}

/* ===== ME PAGE ===== */
.me-page {
  padding-top: 20px;
  gap: 0;
}

.me-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 4px 32px;
}

.me-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-4));
  border: 2.5px solid var(--lime);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.me-avatar svg {
  width: 30px;
  height: 30px;
  fill: var(--muted);
}

.me-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.me-profile-info h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.me-profile-info p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.me-menu-list {
  display: grid;
  gap: 10px;
}

.me-menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  transition: all var(--transition);
  cursor: pointer;
}

.me-menu-item:hover {
  background: var(--surface-2);
}

.me-menu-item:active {
  transform: scale(0.98);
  background: var(--surface-3);
}

.me-menu-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
}

.me-menu-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--muted);
}

.me-menu-label {
  flex: 1;
}

.me-menu-arrow {
  width: 18px;
  height: 18px;
  fill: var(--muted-2);
  flex-shrink: 0;
}

.me-lang-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--transition);
}

.me-lang-selector:hover {
  background: var(--surface-2);
}

.me-lang-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}

.me-lang-left svg {
  width: 22px;
  height: 22px;
  fill: var(--muted);
}

.me-lang-chevron {
  width: 18px;
  height: 18px;
  fill: var(--muted-2);
}

.me-version {
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  margin: 24px 0 8px;
}

.me-logout-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255,51,51,0.08);
  border: 1px solid rgba(255,51,51,0.15);
  color: var(--red);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.me-logout-btn:hover {
  background: rgba(255,51,51,0.12);
}

.me-logout-btn:active {
  transform: scale(0.98);
}

/* ===== PURCHASE MODAL ===== */
.purchase-body {
  padding: 0 20px 24px;
}

.purchase-product-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.purchase-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-4));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.purchase-thumb svg {
  width: 32px;
  height: 32px;
  fill: var(--muted-2);
}

.purchase-product-info {
  flex: 1;
  min-width: 0;
}

.purchase-product-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}

.purchase-product-info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.purchase-product-price {
  text-align: right;
  flex-shrink: 0;
}

.purchase-product-price strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.purchase-product-price span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.purchase-divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.purchase-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

.purchase-qty {
  display: flex;
  align-items: center;
  gap: 0;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  font-size: 20px;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  line-height: 1;
}

.qty-minus {
  background: var(--surface-3);
  color: var(--text);
}

.qty-plus {
  background: var(--lime);
  color: #000;
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-btn:not(:disabled):active {
  transform: scale(0.9);
}

.qty-value {
  width: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.purchase-section {
  display: grid;
  gap: 12px;
}

.purchase-farm-select {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--transition);
}

.purchase-farm-select:hover {
  background: var(--surface-4);
}

.purchase-farm-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-4), var(--surface-2));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.purchase-farm-thumb svg {
  width: 24px;
  height: 24px;
  fill: var(--muted-2);
}

.purchase-farm-info {
  flex: 1;
  min-width: 0;
}

.purchase-farm-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.purchase-farm-info span {
  display: block;
  font-size: 13px;
  color: var(--green);
  margin-top: 2px;
}

.purchase-farm-chevron {
  width: 20px;
  height: 20px;
  fill: var(--muted-2);
  flex-shrink: 0;
}

.farm-dropdown {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.farm-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.farm-dropdown-item:hover {
  background: var(--surface-4);
}

.farm-dropdown-item.is-active {
  background: var(--primary-light);
}

.farm-dropdown-item strong {
  font-size: 14px;
  font-weight: 600;
}

.farm-dropdown-item span {
  font-size: 12px;
  color: var(--muted);
}

.purchase-total-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.purchase-total-price {
  text-align: right;
}

.purchase-total-price strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.purchase-total-price span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.purchase-confirm-btn {
  width: 100%;
  height: 54px;
  margin-top: 24px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ===== SHEET BODY (shared for Me sub-pages) ===== */
.sheet-body {
  padding: 0 20px 24px;
}

/* Profile edit */
.profile-edit-avatar {
  text-align: center;
  margin-bottom: 24px;
}

.sheet-form {
  display: grid;
  gap: 16px;
}

.sheet-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.sheet-field-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* Discover grid */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.discover-card {
  padding: 20px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.discover-card:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.discover-card:active {
  transform: scale(0.97);
}

.discover-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.discover-icon svg {
  width: 22px;
  height: 22px;
}

.discover-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}

.discover-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* Document sheets (Terms, Privacy) */
.sheet-doc {
  max-height: 60vh;
  overflow-y: auto;
}

.doc-updated {
  font-size: 12px;
  color: var(--muted-2);
  margin: 0 0 20px;
}

.sheet-doc h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--text);
}

.sheet-doc h4:first-of-type {
  margin-top: 0;
}

.sheet-doc p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  fill: var(--muted-2);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 300px;
  padding: 0 16px 16px;
}

.faq-answer p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Support */
.support-header {
  text-align: center;
  margin-bottom: 24px;
}

.support-icon-big {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}

.support-icon-big svg {
  width: 28px;
  height: 28px;
}

.support-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
}

.support-header p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.support-options {
  display: grid;
  gap: 8px;
}

.support-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.support-option:hover {
  background: var(--surface-2);
}

.support-option:active {
  transform: scale(0.98);
}

.support-opt-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.support-opt-icon svg {
  width: 20px;
  height: 20px;
}

.support-option div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.support-option strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.support-option span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Farm detail sheet */
.farm-detail-sheet { padding: 0 20px 20px; }
.farm-detail-hero {
  background: var(--surface-3);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.farm-detail-info { position: relative; z-index: 1; }
.farm-detail-label { font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.farm-detail-info h3 { font-size: 20px; margin: 4px 0 16px; }
.farm-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.farm-detail-stats > div { display: flex; flex-direction: column; gap: 4px; }
.farm-detail-stats span { font-size: 12px; color: var(--muted); }
.farm-detail-stats strong { font-size: 22px; font-weight: 800; }
.farm-detail-stats small { font-size: 13px; font-weight: 400; color: var(--muted); }
.farm-detail-miners-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.farm-detail-miners-head h3 { font-size: 18px; font-weight: 800; }
.farm-detail-miners { display: grid; gap: 12px; }
.miner-detail-card { padding: 16px; }

/* Miner progress bar */
.miner-progress {
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.miner-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.miner-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted);
  margin-top: 6px;
}

/* Farm card clickable */
.farm-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.farm-card:active { transform: scale(0.98); }

/* Avatar clickable indicator */
#userAvatar {
  transition: transform 0.2s, box-shadow 0.2s;
}
#userAvatar:active { transform: scale(0.9); }

/* Me page back button */
.me-back-btn {
  position: absolute;
  left: 16px;
  top: 12px;
}

/* ===== WITHDRAW FULL PAGE ===== */
.withdraw-page { padding: 0 20px 24px; }
.withdraw-currency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.withdraw-currency-card { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s; }
.withdraw-currency-card.is-selected { border-color: var(--primary); }
.withdraw-currency-card .wc-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: none; }
.withdraw-currency-card .wc-icon.btc-icon { background: rgba(247,147,26,.15); color: #f7931a; }
.withdraw-currency-card .wc-icon.usdt-icon { background: rgba(38,161,123,.15); color: #26a17b; }
.withdraw-currency-card .wc-name { font-size: 14px; font-weight: 600; }
.withdraw-currency-card .wc-full { font-size: 11px; color: var(--muted); }

.withdraw-network-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 2px solid var(--primary); background: var(--surface); margin-bottom: 20px; }
.withdraw-network-card .wn-check { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.withdraw-network-card .wn-check svg { width: 14px; height: 14px; fill: #000; }
.withdraw-network-card .wn-info { flex: 1; }
.withdraw-network-card .wn-info strong { font-size: 14px; display: block; }
.withdraw-network-card .wn-info span { font-size: 12px; color: var(--muted); }
.withdraw-section-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin-bottom: 8px; text-transform: uppercase; }

.withdraw-address-wrap { position: relative; margin-bottom: 20px; }
.withdraw-address-wrap textarea { width: 100%; height: 80px; padding: 14px; padding-right: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; resize: none; outline: none; box-sizing: border-box; }
.withdraw-address-wrap textarea:focus { border-color: var(--primary); }
.withdraw-address-wrap .qr-icon { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; fill: var(--muted); cursor: pointer; }
.withdraw-amount-wrap { position: relative; margin-bottom: 8px; }
.withdraw-amount-wrap input { width: 100%; height: 52px; padding: 0 90px 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; outline: none; box-sizing: border-box; }
.withdraw-amount-wrap input:focus { border-color: var(--primary); }

.withdraw-amount-wrap .wa-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; }
.withdraw-amount-wrap .wa-suffix .wa-coin { font-size: 13px; font-weight: 700; color: var(--muted); }
.withdraw-amount-wrap .wa-suffix .wa-max { font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; }
.withdraw-available { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 20px; padding: 0 4px; }
.withdraw-summary { background: var(--surface); border-radius: 14px; padding: 14px 16px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.withdraw-summary-row { display: flex; justify-content: space-between; font-size: 13px; }
.withdraw-summary-row span:first-child { color: var(--muted); }
.withdraw-summary-row span:last-child { font-weight: 600; }

/* ===== ASSET DETAIL PAGE ===== */
.asset-detail-page { padding: 0 20px 24px; }
.asset-hero-card { background: var(--surface); border-radius: 18px; padding: 24px 20px; position: relative; overflow: hidden; margin-bottom: 20px; }
.asset-hero-card .watermark { position: absolute; right: -10px; top: -10px; font-size: 100px; opacity: .06; font-weight: 800; pointer-events: none; line-height: 1; }
.asset-hero-card .ah-label { font-size: 12px; color: var(--muted); letter-spacing: .5px; margin-bottom: 4px; text-transform: uppercase; }
.asset-hero-card .ah-balance { font-size: 32px; font-weight: 800; margin-bottom: 2px; }
.asset-hero-card .ah-balance span { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.asset-hero-card .ah-usd { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

.asset-hero-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.asset-hero-box { background: rgba(255,255,255,.04); border-radius: 12px; padding: 12px; }
.asset-hero-box .ahb-label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.asset-hero-box .ahb-label svg { width: 12px; height: 12px; fill: var(--muted); }
.asset-hero-box .ahb-value { font-size: 15px; font-weight: 700; }
.asset-hero-card .ah-withdraw-btn { width: 100%; height: 44px; border-radius: 12px; border: 0; background: var(--primary); color: #000; font-size: 15px; font-weight: 700; cursor: pointer; }
.asset-history-section { margin-top: 8px; }
.asset-history-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.asset-empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.asset-empty-state svg { width: 48px; height: 48px; fill: var(--muted); opacity: .4; margin-bottom: 8px; }
.asset-empty-state p { font-size: 13px; }
.asset-item { cursor: pointer; transition: transform .15s; }
.asset-item:active { transform: scale(.98); }

/* ===== LAND NFT GRID ===== */
.land-nft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.land-nft-card { background: var(--surface); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s; }
.land-nft-card:active { transform: scale(.97); }
.land-nft-card .lnc-image { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, #1a2a1a 0%, #0d1f0d 100%); display: flex; align-items: center; justify-content: center; }
.land-nft-card .lnc-image img { width: 100%; height: 100%; object-fit: cover; }

.land-nft-card .lnc-image svg { width: 32px; height: 32px; fill: var(--primary); opacity: .5; }
.land-nft-card .lnc-body { padding: 10px 12px; }
.land-nft-card .lnc-body h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.land-nft-card .lnc-body p { font-size: 11px; color: var(--muted); }
.land-nft-buy { background: var(--surface); border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 140px; border: 2px dashed var(--line); transition: border-color .2s; }
.land-nft-buy:hover { border-color: var(--primary); }
.land-nft-buy .lnb-plus { width: 40px; height: 40px; border-radius: 50%; background: rgba(163,230,53,.1); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; font-size: 24px; color: var(--primary); font-weight: 300; }
.land-nft-buy span { font-size: 13px; font-weight: 600; color: var(--muted); }
