:root {
  --bg: #f7f4ef;
  --white: #ffffff;
  --orange: #ff6a00;
  --orange-dark: #e85d00;
  --orange-soft: #fff3e8;
  --green: #25d366;
  --green-soft: #e8f8ef;
  --blue: #2f6fed;
  --blue-soft: #e8f1ff;
  --blue-text: #1e4fd6;
  --text: #1a1a1a;
  --text-secondary: #6b7280;
  --border: #e8e4de;
  --danger: #e53935;
  --nav-h: 64px;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden; /* prevent body scrollbar shifting the centered shell */
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  background: #111;
  color: var(--text);
}

button, input, textarea {
  font: inherit;
}

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

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

/* Phone frame — fixed viewport height; scroll only inside .app-main */
.app-shell {
  max-width: 430px;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  min-height: 0;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}

.app-main::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none; /* Chrome / Safari */
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.22s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Shared */
.page-pad {
  padding: 12px 16px 24px;
  overflow-x: hidden;
  max-width: 100%;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 18px 0 12px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.section-row .section-title {
  margin: 0;
}

.link-orange {
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  width: 100%;
}

.btn-green {
  background: var(--green);
  color: #fff;
  width: 100%;
  border-radius: 999px;
  padding: 14px;
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

.btn-pill {
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}

.field {
  margin-bottom: 14px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.field-label .req {
  color: var(--danger);
}

.field-label .optional {
  color: #888;
  font-weight: 500;
  font-size: 12px;
}

.field-label svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  outline: none;
  font-size: 15px;
}

.input:focus {
  border-color: var(--orange);
}

.input-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
}

.input-with-icon input {
  border: none;
  outline: none;
  flex: 1;
  padding: 12px 0;
  background: transparent;
  font-size: 15px;
}

.input-with-icon svg {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}

.hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 700;
}

.topbar .icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #222;
  border-radius: 50%;
}

.topbar .icon-btn:active {
  background: #f3f3f3;
}

.topbar-title-wrap {
  text-align: center;
}

.topbar-title-wrap small {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}

/* Bottom nav — anchored to shell, not viewport 50% (avoids L/R jump on scrollbar) */
.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: #fff;
  border-top: 1px solid #eee;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #8a93a2;
  font-size: 11px;
  cursor: pointer;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item.active {
  color: var(--orange);
}

.nav-item.active .nav-icon-wrap {
  background: rgba(255, 106, 0, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.08);
}

.nav-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* FAB */
.fab-stack {
  position: absolute;
  right: 12px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.fab:active {
  transform: scale(0.96);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-h) + 28px);
  transform: translateX(-50%) translateY(20px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  max-width: 90%;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 100;
}

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

/* ========== HOME ========== */
.home-hero {
  position: relative;
  height: 210px;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

.home-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 20%, rgba(0,0,0,0.55) 100%);
}

.home-hero-text {
  position: absolute;
  left: 20px;
  bottom: 54px;
  z-index: 2;
  color: #fff;
}

.home-hero-text .welcome {
  font-size: 14px;
  opacity: 0.95;
}

.home-hero-text .team-name {
  font-size: 26px;
  font-weight: 800;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.invite-card {
  margin: -36px 16px 0;
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, #ff7a1a, #ff5600);
  border-radius: 20px;
  padding: 20px 18px 18px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(255, 106, 0, 0.35);
  overflow: hidden;
}

.invite-card::before,
.invite-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.invite-card::before {
  width: 120px;
  height: 120px;
  right: -30px;
  top: -40px;
}

.invite-card::after {
  width: 80px;
  height: 80px;
  right: 40px;
  bottom: -30px;
}

.invite-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  position: relative;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
}

.code-box .code {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.code-box .copy-btn {
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.invited-by {
  font-size: 13px;
  opacity: 0.95;
  margin-bottom: 12px;
  position: relative;
}

.support-links {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.support-link.whatsapp {
  background: rgba(37, 211, 102, 0.95);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.support-link.telegram {
  background: rgba(34, 158, 217, 0.95);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.support-link[hidden],
.support-links[data-empty="1"] {
  display: none;
}

.perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.perf-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.perf-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.perf-card.direct::before { background: var(--orange); }
.perf-card.indirect::before { background: #22c55e; }

.perf-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.perf-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.perf-card.direct .perf-icon { background: #ffe8d6; color: var(--orange); }
.perf-card.indirect .perf-icon { background: #e7f8ee; color: #16a34a; }

.perf-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.perf-stat .num {
  font-size: 28px;
  font-weight: 800;
}

.perf-stat .pct {
  font-size: 13px;
  color: var(--text-secondary);
}

.perf-stat .pct.up {
  color: #16a34a;
  font-weight: 700;
}

.perf-foot {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.growth-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-height: 140px;
}

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

.growth-head h3 {
  font-size: 17px;
}

.badge-green {
  background: var(--green-soft);
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

.growth-chart {
  height: 90px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(34, 197, 94, 0.08) 100%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 28px,
      rgba(0,0,0,0.03) 28px,
      rgba(0,0,0,0.03) 29px
    );
  position: relative;
  overflow: hidden;
}

.growth-line {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 28px;
  height: 3px;
  background: #22c55e;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.member-item img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

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

.member-info .id {
  font-weight: 700;
  font-size: 15px;
}

.member-info .earn {
  margin-top: 4px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  background: #fff;
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* ========== PROFILE ========== */
.profile-head {
  background:
    radial-gradient(120% 80% at 50% -10%, #ffd7b0 0%, transparent 55%),
    linear-gradient(180deg, #ffe8d4 0%, var(--bg) 100%);
  padding: 28px 16px 8px;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
}

.avatar-wrap img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  background: #ffe082;
}

.avatar-camera,
.avatar-crown {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.avatar-camera {
  left: 0;
  bottom: 2px;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
}

.avatar-crown {
  right: 0;
  bottom: 2px;
  background: var(--blue);
  color: #fff;
}

.profile-name {
  font-size: 22px;
  font-weight: 800;
}

.profile-level-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.profile-level {
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.stat-mini {
  background: #fff;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-mini .label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.stat-mini .value {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--orange);
}

.stat-mini .value.dark {
  color: var(--text);
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.menu-list {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  text-align: left;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  color: #555;
}

.menu-item span {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.menu-item .meta {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}

.menu-item .chev {
  color: #c0c0c0;
}

/* ========== WITHDRAW / WALLET ========== */
.balance-bar {
  margin: 12px 16px;
  background: #f3ebe3;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.balance-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--orange);
}

.balance-bar .label {
  font-size: 12px;
  color: var(--text-secondary);
}

.balance-bar .amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.2;
}

.form-card {
  margin: 0 16px;
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.chip {
  border: 1px solid var(--border);
  background: #f8f4f0;
  border-radius: 10px;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chip.active {
  background: #ffe0c4;
  border-color: var(--orange);
  color: var(--orange-dark);
}

/* ========== RECHARGE ========== */
.tip-marquee {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-soft);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  color: #264a9c;
  overflow: hidden;
}

.tip-marquee-ico {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}

.tip-marquee-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tip-marquee-track {
  display: flex;
  width: max-content;
  gap: 48px;
  animation: tipMarquee 18s linear infinite;
  will-change: transform;
}

.tip-marquee-text {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

@keyframes tipMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 24px)); }
}

@media (prefers-reduced-motion: reduce) {
  .tip-marquee-track { animation: none; }
  .tip-marquee-viewport { mask-image: none; }
  .tip-marquee-text { white-space: normal; }
  .tip-marquee-text[aria-hidden="true"] { display: none; }
}

.guide-box {
  background: var(--blue-soft);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  /* Keep height stable when step statuses appear/disappear */
  contain: layout;
}

.guide-box h3 {
  color: var(--blue-text);
  font-size: 16px;
  margin-bottom: 12px;
}

.guide-step {
  margin-bottom: 12px;
}

.guide-step .step-title {
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: start;
}

.guide-step .step-desc {
  color: #264a9c;
  font-size: 13px;
  margin-top: 2px;
  line-height: 1.4;
  min-height: 1.4em;
}

.guide-note {
  font-style: italic;
  color: #3b6fd8;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}

.tip-box {
  background: var(--blue-soft);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #264a9c;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
  min-height: 3.2em;
}

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

.upload-zone {
  border: 1.5px dashed #cfcfcf;
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
}

.upload-zone strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 14px;
}

.upload-zone span {
  font-size: 12px;
  color: var(--text-secondary);
}

.upload-zone.has-file {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.upload-preview {
  max-height: 160px;
  margin: 0 auto 8px;
  border-radius: 8px;
}

.earn-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.earn-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.earn-stat {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.earn-stat .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #8b95a5;
  text-transform: uppercase;
}

.earn-stat .value {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.earn-rate-card {
  background: var(--blue-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.earn-rate-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-text);
  margin-bottom: 8px;
}

.earn-rate-row strong {
  display: block;
  font-size: 18px;
  color: var(--blue-text);
}

.earn-rate-row span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #5b6b7c;
}

.earn-progress-wrap {
  margin-top: 14px;
}

.earn-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #5b6b7c;
  margin-bottom: 8px;
}

.earn-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.earn-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #86efac);
  transition: width 0.35s ease;
}

.earn-progress-meta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #5b6b7c;
}

.earn-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.earn-tips {
  margin-bottom: 8px;
}

.exchange-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6e8;
  color: var(--orange);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

/* ========== VIP / Walker Levels ========== */
.vip-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.vip-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.vip-stat {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.vip-stat .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8b95a5;
  text-transform: uppercase;
}

.vip-stat .value {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.vip-balance {
  background: var(--blue-soft);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.vip-balance .amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-text);
}

.vip-current {
  background: linear-gradient(90deg, #ff7a1a, #ff9a3c);
  border-radius: 16px;
  padding: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.vip-current .crown {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.vip-current .meta {
  flex: 1;
}

.vip-current .meta small {
  opacity: 0.9;
  font-size: 12px;
}

.vip-current .meta strong {
  display: block;
  font-size: 18px;
  margin-top: 2px;
}

.vip-current .rates {
  font-size: 11px;
  text-align: right;
  line-height: 1.5;
  opacity: 0.95;
}

.vip-next {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.vip-next-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 700;
}

.vip-next-top strong {
  color: var(--text);
  font-size: 14px;
}

.vip-progress {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: #f0ebe4;
  overflow: hidden;
}

.vip-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #86efac);
  transition: width 0.35s ease;
}

.vip-next-meta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.vip-walk-cta {
  width: 100%;
  margin-bottom: 18px;
}

.levels-label {
  font-size: 12px;
  font-weight: 800;
  color: #9aa0a6;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.level-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.level-card.current {
  border-color: var(--orange);
}

.level-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.level-status {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.level-status.done { background: #e7f8ee; color: #16a34a; }
.level-status.now { background: #ffe8d6; color: var(--orange); }
.level-status.lock { background: #e8f1ff; color: #7b8aa5; }

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

.level-name {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-current {
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.level-rates {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.level-goal {
  text-align: right;
  flex-shrink: 0;
}

.level-goal .label {
  font-size: 11px;
  color: var(--text-secondary);
}

.level-goal .steps {
  font-size: 14px;
  font-weight: 800;
  color: #16a34a;
}

.level-goal .steps.locked {
  color: #7b8aa5;
}

.level-hint {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.level-price,
.level-actions,
.level-warn {
  display: none !important;
}

/* ========== RANKING ========== */
.rank-user-card {
  margin: 12px 16px;
  background: linear-gradient(135deg, #ff7a1a, #ff4d00);
  border-radius: 18px;
  padding: 16px;
  color: #fff;
}

.rank-user-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rank-user-top img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  object-fit: cover;
}

.rank-user-top strong {
  display: block;
  font-size: 18px;
}

.rank-user-top span {
  font-size: 13px;
  opacity: 0.95;
}

.rank-alert {
  background: rgba(255,255,255,0.95);
  color: #444;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.rank-buzz {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 16px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 106, 0, 0.16), transparent 55%),
    #fff8f2;
  border: 1px solid rgba(255, 106, 0, 0.18);
}

.rank-buzz-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  min-width: 0;
}

.rank-buzz-live strong {
  color: #ef4444;
  letter-spacing: 0.04em;
}

.rank-buzz-live span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-buzz-hot {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: rgba(255, 106, 0, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.rank-toast {
  margin: 0 16px 10px;
  min-height: 0;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 106, 0, 0.08);
  font-size: 12px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease, padding 0.25s ease;
}

.rank-toast.show {
  opacity: 1;
  max-height: 48px;
  padding: 8px 12px;
}

.rank-toast img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.rank-item.rank-pulse .people,
.rank-item.rank-pulse .yest b {
  color: #ea580c;
  animation: buzzNumPop 0.45s ease;
}

.rank-header {
  /* existing below */
  margin: 0 16px;
  background: var(--orange);
  color: #fff;
  border-radius: 14px 14px 0 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.rank-count {
  background: rgba(255,255,255,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.rank-list {
  margin: 0 16px 16px;
  background: #fff;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f3f3;
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: #f0f0f0;
  color: #666;
  flex-shrink: 0;
}

.rank-badge.r1 { background: #f5c542; color: #fff; }
.rank-badge.r2 { background: #b0b8c4; color: #fff; }
.rank-badge.r3 { background: #e89a5c; color: #fff; }

.rank-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.rank-meta {
  flex: 1;
  min-width: 0;
}

.rank-meta .name {
  font-weight: 700;
  font-size: 14px;
}

.rank-meta .sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.rank-meta .streak {
  color: #16a34a;
  font-weight: 700;
}

.rank-stats {
  text-align: right;
}

.rank-stats .people {
  color: var(--orange);
  font-weight: 800;
  font-size: 16px;
}

.rank-stats .people small {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 11px;
  margin-left: 2px;
}

.rank-stats .yest {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.rank-stats .yest b {
  color: var(--orange);
}

/* ========== VERIFICATION ========== */
.id-uploads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.id-slot {
  aspect-ratio: 1;
  border: 1.5px dashed #cfcfcf;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}

.id-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-slot span {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}

.hidden-file {
  display: none;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 24px 12px;
  font-size: 13px;
}

/* ========== AUTH ========== */
.app-shell.auth-mode .bottom-nav,
.app-shell.auth-mode .fab-stack {
  display: none;
}

.app-shell.auth-mode .app-main {
  padding-bottom: 24px;
}

.auth-page {
  min-height: 100%;
  background:
    radial-gradient(120% 70% at 50% -10%, #ffd7b0 0%, transparent 55%),
    linear-gradient(180deg, #fff4ea 0%, var(--bg) 45%);
}

.auth-wrap {
  padding: 48px 20px 32px;
  max-width: 400px;
  margin: 0 auto;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(255, 106, 0, 0.35);
  background: transparent;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-brand h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.auth-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--orange);
  font-weight: 700;
  margin-left: 4px;
}

.auth-demo-tip {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  background: #f8f4f0;
  border-radius: 10px;
  padding: 8px 10px;
}

.btn-demo {
  width: 100%;
  margin-top: 10px;
  background: #fff;
  color: var(--orange);
  border: 1.5px solid var(--orange);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
}

/* Settings pages */
.settings-card {
  padding: 16px;
}

.settings-sub {
  font-size: 15px;
  margin: 18px 0 10px;
  color: #333;
}

.payment-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-item .pay-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--orange-soft);
  color: var(--orange);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.payment-item .pay-info {
  flex: 1;
  min-width: 0;
}

.payment-item .pay-info strong {
  display: block;
  font-size: 14px;
}

.payment-item .pay-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

.payment-item .pay-del {
  border: none;
  background: #ffe8e8;
  color: #e53935;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.lang-list {
  padding: 0;
  overflow: hidden;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: none;
  background: transparent;
  border-bottom: 1px solid #f2f2f2;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option .lang-check {
  color: var(--orange);
  opacity: 0;
  font-weight: 800;
}

.lang-option.active .lang-check {
  opacity: 1;
}

.lang-option.active {
  color: var(--orange);
}

.faq-list {
  padding: 4px 0;
}

.faq-item {
  border-bottom: 1px solid #f2f2f2;
  padding: 4px 16px;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 12px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--orange);
  font-size: 18px;
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.policy-content h3 {
  font-size: 15px;
  margin: 16px 0 6px;
}

.policy-content h3:first-of-type {
  margin-top: 8px;
}

.policy-content p {
  font-size: 13px;
  color: #555;
  line-height: 1.55;
}

.policy-updated {
  font-size: 12px !important;
  color: var(--text-secondary) !important;
}

/* Members + Chat + Growth */
.member-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.member-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 10px;
  font-weight: 700;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.member-tab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.member-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
}

.member-badge.direct {
  background: #ffe8d6;
  color: var(--orange);
}

.member-badge.indirect {
  background: #e7f8ee;
  color: #16a34a;
}

#growthChart {
  height: 110px;
  padding: 4px 0 0;
}

#growthChart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chat-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 80;
  display: flex;
  align-items: flex-end;
}

.chat-overlay[hidden] {
  display: none !important;
}

.chat-panel {
  width: 100%;
  height: 72%;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.chat-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eee;
}

.chat-user strong {
  display: block;
  font-size: 15px;
}

.chat-user small {
  color: #16a34a;
  font-size: 12px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f7f4ef;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat-messages::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.chat-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble.me {
  align-self: flex-end;
  background: var(--orange);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.them {
  align-self: flex-start;
  background: #fff;
  color: #222;
  border-bottom-left-radius: 4px;
}

.chat-bubble time {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-top: 1px solid #eee;
  background: #fff;
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
}

.chat-input-row .btn {
  border-radius: 999px;
  padding: 10px 16px;
  width: auto;
}

.bank-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 13px;
}

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

.bank-detail-row span {
  color: var(--text-secondary);
  min-width: 96px;
}

.bank-detail-row strong {
  flex: 1;
  font-size: 13px;
  word-break: break-all;
}

.copy-mini {
  border: 1px solid var(--orange);
  background: var(--orange-soft);
  color: var(--orange-dark);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.step-status {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-status.done {
  color: #16a34a;
}

.step-status.active {
  color: var(--orange);
}

.history-item {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.history-item .left strong {
  display: block;
  font-size: 15px;
}

.history-item .left small {
  color: var(--text-secondary);
  font-size: 11px;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.status-pill.pending {
  background: #fff3e0;
  color: #e65100;
}

.status-pill.review {
  background: #e3f2fd;
  color: #1565c0;
}

.status-pill.completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-pill.cancelled {
  background: #f5f5f5;
  color: #757575;
}

#confirmRecharge:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Walk / Chibi runner on animated road */
.walk-card.walk-scene-card {
  background: transparent;
  border-radius: 22px;
  padding: 0;
  box-shadow: none;
  margin-bottom: 10px;
  border: none;
  overflow: hidden;
}

.walk-scene {
  position: relative;
  height: 360px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(20, 50, 80, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  isolation: isolate;
}

.road-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #87c8ef;
}

.rw-bg {
  position: absolute;
  inset: -2% -5%;
  overflow: hidden;
  filter: saturate(1.06) contrast(1.03);
}

/* Wide strip (3 tiles) + translate one tile = seamless loop, no hitch */
.rw-bg-strip {
  position: absolute;
  left: 0;
  top: -6%;
  height: 112%;
  /* image 3200×900 → 3 tiles wide */
  aspect-ratio: 9600 / 900;
  width: auto;
  background: url("../assets/walk-scene-bg.jpg") 0 50% / auto 100% repeat-x;
  will-change: transform;
  backface-visibility: hidden;
}

.rw-haze {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(135, 200, 239, 0.12) 0%, transparent 26%),
    linear-gradient(0deg, rgba(30, 40, 30, 0.2) 0%, transparent 36%);
  pointer-events: none;
  z-index: 2;
}

.rw-ground-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(20, 30, 20, 0.22));
  z-index: 3;
  pointer-events: none;
}

.walker-stage {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  z-index: 8;
  width: 164px;
  height: 186px;
  display: grid;
  place-items: end center;
  pointer-events: none;
}

.sprite-char {
  position: relative;
  width: 152px;
  height: 180px;
  display: grid;
  place-items: end center;
  overflow: visible;
}

.sprite-shadow {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 78px;
  height: 16px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.18) 45%, transparent 72%);
  border-radius: 50%;
  z-index: 1;
  filter: blur(1.5px);
}

/* Same character (canvas) for idle / walk / run */
.sprite-idle-img {
  display: none !important;
}

.sprite-canvas {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 152px;
  height: 180px;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  opacity: 1;
}

.sprite-shadow {
  display: none; /* canvas draws its own shadow */
}

#walkMascot[data-gait="idle"] .sprite-idle-img {
  display: none !important;
}

/* Scroll driven by JS (pause on idle = stay where you stopped) */
@keyframes rw-bg-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-33.33333%, 0, 0); }
}

#walkCard .rw-bg-strip {
  transform: translate3d(0, 0, 0);
}

.walk-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 10;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.walk-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.walk-hud-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: #94a3b8;
  padding: 6px 10px;
  border-radius: 999px;
  align-self: center;
}
#walkCard[data-gait="walk"] .walk-hud-badge { background: #16a34a; }
#walkCard[data-gait="run"] .walk-hud-badge { background: #ea580c; }

.walk-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.walk-steps {
  font-size: 36px;
  font-weight: 800;
  color: #ff6a00;
  line-height: 1.05;
  margin-top: 2px;
}

.walk-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.walk-meta #walkStatus.tracking { color: #16a34a; }

.walk-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
  padding: 0 2px;
}

.walk-actions .btn {
  padding: 12px 10px;
  font-size: 13px;
}

.walk-hint {
  margin-top: 10px;
  padding: 0 2px;
}

@media (prefers-reduced-motion: reduce) {
  #walkMascot .sprite-char,
  #walkMascot .sprite-idle-img,
  #walkMascot .sprite-shadow,
  #walkCard .rw-bg-strip {
    animation: none !important;
  }
}

@media (max-width: 380px) {
  .walk-scene { height: 300px; }
  .walk-steps { font-size: 30px; }
  .sprite-canvas {
    width: 120px;
    height: 144px;
  }
  .walker-stage {
    width: 130px;
    height: 148px;
    bottom: 18%;
  }
}

.support-live-card {
  padding: 16px;
}

.support-live-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-live-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffb347, #ff6a00);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.support-live-head strong {
  display: block;
  font-size: 15px;
}

.support-live-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.support-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: auto;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  flex-shrink: 0;
}

.chat-panel {
  height: min(78vh, 620px);
}

.buzz-card {
  margin: 0 0 16px;
  padding: 14px 14px 10px;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 106, 0, 0.18), transparent 55%),
    radial-gradient(90% 70% at 100% 0%, rgba(34, 197, 94, 0.12), transparent 50%),
    linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
  border: 1px solid rgba(255, 106, 0, 0.18);
  box-shadow: 0 10px 28px rgba(255, 106, 0, 0.08);
  overflow: hidden;
}

.buzz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.buzz-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.buzz-live strong {
  color: #ef4444;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.buzz-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: buzzPulse 1.6s ease-out infinite;
}

@keyframes buzzPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.buzz-heat {
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: rgba(255, 106, 0, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.buzz-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.buzz-stat {
  text-align: center;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.buzz-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.buzz-stat-val.buzz-pop,
.buzz-heat.buzz-pop {
  animation: buzzNumPop 0.45s ease;
  color: #ea580c;
}

@keyframes buzzNumPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.buzz-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 106, 0, 0.08);
  font-size: 12px;
  color: #374151;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.buzz-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.buzz-toast img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.buzz-toast .buzz-tag {
  font-size: 10px;
  font-weight: 700;
  color: #ea580c;
}

.buzz-toast em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  color: #9ca3af;
  flex-shrink: 0;
}

.buzz-stat-label {
  margin-top: 3px;
  font-size: 10px;
  color: #6b7280;
}

.buzz-faces {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  padding-left: 4px;
}

.buzz-face {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  background: #e5e7eb;
  object-fit: cover;
}

.buzz-face:first-child {
  margin-left: 0;
}

.buzz-faces-more {
  margin-left: 8px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
}

.buzz-ticker {
  position: relative;
  height: 36px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.04);
}

.buzz-ticker::before,
.buzz-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  z-index: 1;
  pointer-events: none;
}

.buzz-ticker::before {
  left: 0;
  background: linear-gradient(90deg, rgba(247, 244, 239, 1), transparent);
}

.buzz-ticker::after {
  right: 0;
  background: linear-gradient(270deg, rgba(247, 244, 239, 1), transparent);
}

.buzz-ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  white-space: nowrap;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  animation: buzzMarquee 22s linear infinite;
  will-change: transform;
}

.buzz-ticker:hover .buzz-ticker-track {
  animation-play-state: paused;
}

@keyframes buzzMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.buzz-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}

.buzz-item img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e5e7eb;
}

.buzz-item .buzz-tag {
  font-size: 10px;
  font-weight: 700;
  color: #ea580c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 106, 0, 0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(34, 197, 94, 0.2), transparent 35%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

@media (max-width: 360px) {
  .walk-actions {
    grid-template-columns: 1fr;
  }
}
