:root {
  --bg: #f4f5f8;
  --panel: #fff;
  --ink: #17181d;
  --muted: #777f8f;
  --line: rgba(24, 26, 32, 0.08);
  --red: #e82835;
  --gold: #dfb76d;
}

* { box-sizing: border-box; }

html, body, #root { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(90deg, #eceff4, #fafbfc);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.app-device {
  width: min(100vw, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden auto;
  background: var(--bg);
  box-shadow: 0 0 42px rgba(30, 36, 48, 0.12);
}

.page-content { min-height: 100dvh; padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 12px 16px 108px;
  color: #fff;
  background: linear-gradient(135deg, #e72b38 0%, #8d1019 48%, #1f1d20 100%);
}

.hero-bg {
  position: absolute;
  right: -38px;
  bottom: -76px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: url("./assets/queqiao-logo.svg") center / 80px 80px no-repeat rgba(255, 255, 255, 0.08);
  opacity: 0.75;
}

.mini-nav, .game-switch, .profile-line, .member-card, .section-block, .wallet-panel, .mine-head, .subpage-head, .profile-list {
  position: relative;
  z-index: 1;
}

.mini-nav {
  height: 42px;
  display: grid;
  grid-template-columns: 32px 1fr 44px;
  align-items: center;
}

.mini-nav strong {
  justify-self: center;
  font-size: 18px;
  font-weight: 800;
}

.nav-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

.ghost-button, .profile-line button, .mine-head button, .wallet-panel button, .section-title button {
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
}

.ghost-button, .mine-head button { color: #fff; background: rgba(255, 255, 255, 0.18); }
.profile-line button, .wallet-panel button, .section-title button { color: #704517; background: linear-gradient(135deg, #fff0c5, #d5aa66); }

.game-switch, .quick-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.game-switch::-webkit-scrollbar, .quick-scroll::-webkit-scrollbar { display: none; }
.game-switch { margin-top: 12px; }

.game-switch button {
  flex: 0 0 auto;
  min-width: 64px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.game-switch button.active { color: #5b2c08; background: linear-gradient(135deg, #ffefc5, #d9ae68); }

.profile-line, .mine-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
}

.profile-line { margin-top: 18px; }

.profile-line img, .mine-head img {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.54);
  border-radius: 14px;
  background: #fff;
}

.profile-line strong, .profile-line span, .mine-head strong, .mine-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-line strong, .mine-head strong { font-size: 17px; font-weight: 800; }
.profile-line span, .mine-head span { margin-top: 3px; color: rgba(255, 255, 255, 0.74); font-size: 12px; }

.member-card {
  margin: -86px 16px 14px;
  padding: 18px;
  overflow: hidden;
  border-radius: 16px;
  color: #ffe9b6;
  background: linear-gradient(135deg, #292119 0%, #121213 58%, #3a250f 100%);
  box-shadow: 0 18px 38px rgba(39, 24, 14, 0.22);
}

.member-card.compact { margin-top: 14px; }

.card-top { display: flex; justify-content: space-between; gap: 14px; }
.eyebrow { color: rgba(255, 232, 176, 0.68); font-size: 10px; font-weight: 800; letter-spacing: 0; }
.card-top h1 { margin: 5px 0 0; color: #fff5dc; font-size: 23px; line-height: 1.12; }
.card-badge { flex: 0 0 auto; align-self: flex-start; padding: 5px 10px; border: 1px solid rgba(255, 229, 181, 0.35); border-radius: 14px; font-size: 12px; }

.growth { margin-top: 18px; }
.growth-copy { display: flex; justify-content: space-between; gap: 12px; color: rgba(255, 232, 176, 0.78); font-size: 12px; }
.growth-track { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, 0.14); }
.growth-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f8d58a, #fff0c6); }

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

.card-metrics button { min-width: 0; padding: 11px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.09); }
.card-metrics strong, .card-metrics span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-metrics strong { color: #fff6dc; font-size: 18px; }
.card-metrics span { margin-top: 3px; color: rgba(255, 232, 176, 0.7); font-size: 11px; }

.quick-scroll { margin: 0 0 14px; padding: 0 16px; }

.quick-card {
  flex: 0 0 82px;
  min-height: 94px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(25, 28, 36, 0.05);
}

.quick-card span, .privilege-grid span, .shop-grid span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  background: #202126;
}

.quick-card.red span { background: var(--red); }
.quick-card.gold span { background: var(--gold); }
.quick-card.green span { background: #33a474; }
.quick-card.blue span { background: #3d75e6; }
.quick-card.purple span { background: #8165db; }

.quick-card strong, .quick-card small, .privilege-grid strong, .privilege-grid small, .shop-grid strong, .shop-grid small, .feature-card strong, .gift-row strong, .gift-row small, .news-list strong, .news-list small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-card strong, .privilege-grid strong, .shop-grid strong { font-size: 13px; }
.quick-card small, .privilege-grid small, .shop-grid small, .gift-row small, .news-list small { color: var(--muted); font-size: 11px; }

.gold-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 14px;
}

.feature-stack { display: grid; gap: 10px; }

.feature-card {
  min-height: 78px;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, #202124, #4d3420);
}

.feature-card.tall { min-height: 166px; background: linear-gradient(135deg, #f3c66d, #bb6f22 60%, #372114); }
.feature-card.red { background: linear-gradient(135deg, #fa5964, #ba1824); }
.feature-card.blue { background: linear-gradient(135deg, #6192ff, #2454c8); }
.feature-card small, .feature-card span { color: rgba(255, 255, 255, 0.78); font-size: 12px; }
.feature-card strong { font-size: 17px; }

.section-block, .profile-list, .wallet-panel {
  margin: 0 16px 14px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(25, 28, 36, 0.045);
}

.section-block { padding: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { margin: 0; font-size: 18px; line-height: 1.2; }

.privilege-grid, .shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.privilege-grid button, .shop-grid button {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfbfc;
}

.privilege-grid button.locked { color: #9fa5b2; background: #f5f6f8; }
.privilege-grid button.locked span { background: #c8cbd1; }

.gift-list, .news-list { display: grid; gap: 10px; }

.gift-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfbfc;
  text-align: left;
}

.gift-row > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.gift-row strong, .news-list strong { display: block; font-size: 15px; }
.gift-row small, .news-list small { display: block; margin-top: 4px; font-size: 12px; }
.gift-row i { height: 28px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--red); font-style: normal; font-size: 12px; font-weight: 800; }

.news-list button { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.news-list button:last-child { border-bottom: 0; }

.subpage-head { padding: 28px 16px 18px; color: #fff; background: linear-gradient(135deg, #191b20, #47331c); }
.subpage-head strong { display: block; font-size: 26px; }
.subpage-head span { display: block; margin-top: 6px; color: rgba(255, 255, 255, 0.72); font-size: 13px; }

.wallet-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #fff, #fff4de);
}

.wallet-panel span, .wallet-panel strong { display: block; }
.wallet-panel span { color: var(--muted); font-size: 12px; }
.wallet-panel strong { margin-top: 4px; font-size: 28px; }

.mine-head { padding: 28px 16px 18px; color: #fff; background: linear-gradient(135deg, #e83541, #1d1e22); }

.profile-list { display: grid; padding: 0 16px; }
.profile-list button { min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); text-align: left; }
.profile-list button:last-child { border-bottom: 0; }
.profile-list span, .profile-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-list span { font-size: 15px; font-weight: 700; }
.profile-list small { color: var(--muted); font-size: 12px; }

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  width: min(100vw, 430px);
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 auto;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(26, 28, 34, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.tabbar button { min-width: 0; display: grid; place-items: center; gap: 3px; border-radius: 12px; color: #868c99; }
.tabbar button.active { color: var(--red); background: #fff0f1; }
.tabbar span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 900; }
.tabbar strong { font-size: 12px; }

@media (max-width: 360px) {
  .hero { padding-right: 12px; padding-left: 12px; }
  .member-card, .gold-zone, .section-block, .wallet-panel, .profile-list { margin-right: 12px; margin-left: 12px; }
  .quick-scroll { padding-right: 12px; padding-left: 12px; }
}
