:root {
  --fb: #1877F2;
  --fb-hover: #166FE5;
  --fb-press: #0E63D8;
  --white: #FFFFFF;
  --page: #F0F2F5;
  --ink: #050505;
  --muted: #65676B;
  --line: #CED0D4;
  --card-line: #E4E6EB;
  --blue: var(--fb);
  --blue-dark: var(--fb-hover);
  --blue-soft: #E7F3FF;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --header: 88px;
  --header-home: 128px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", "Helvetica Neue", "Noto Sans Myanmar", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  padding-bottom: calc(72px + var(--safe-bottom));
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { max-width: 100%; display: block; }

/* Splash — prevent flash when already seen */
html.no-splash #splash,
html.no-splash .splash { display: none !important; }

/* Splash — full logo (i) on dark theme matching brand */
body.splash-active { overflow: hidden; }
.splash {
  position: fixed;
  inset: 0;
  z-index: 300;
  background:
    radial-gradient(circle at 50% 42%, rgba(24, 119, 242, 0.42) 0%, rgba(24, 119, 242, 0.08) 34%, transparent 62%),
    radial-gradient(circle at 50% 100%, rgba(24, 119, 242, 0.18) 0%, transparent 48%),
    #000000;
  display: grid;
  place-items: center;
  text-align: center;
  transition: opacity .55s ease, visibility .55s ease;
  padding: var(--safe-top) 24px var(--safe-bottom);
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-inner {
  width: min(300px, 82vw);
  animation: splashIn .7s ease-out both;
}
.splash-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 0 28px rgba(77, 150, 255, 0.55)) drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
}
.splash .pulse {
  width: 44px; height: 4px; border-radius: 4px;
  background: rgba(24, 119, 242, 0.35); margin: 30px auto 0; overflow: hidden;
}
.splash .pulse i {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, #4A9BFF, #1877F2);
  animation: load 1.2s ease-in-out infinite;
}
@keyframes splashIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

.announce { display: none !important; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--card-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(8px + var(--safe-top)) 12px 10px;
}
.header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
}
.header-product .header-inner { padding-bottom: 10px; }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--page);
  border-radius: 50%;
  color: var(--fb);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--blue-soft); }

.logo {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}
.logo-text {
  height: 56px;
  width: auto;
  max-width: min(240px, 62vw);
  object-fit: contain;
  object-position: left center;
}
.footer-logo { height: 48px; margin-bottom: 10px; max-width: 220px; }
.drawer-logo { height: 46px; margin-bottom: 18px; max-width: 200px; }

.search-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  z-index: 45;
}
.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--page);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 0;
  width: 100%;
  margin: 0;
  cursor: text;
}
.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 50;
}
.search-suggest a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-line);
}
.search-suggest a:last-child { border-bottom: 0; }
.search-suggest a:active,
.search-suggest a:hover { background: var(--blue-soft); }
.search-suggest img {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0; background: #eef2f7;
}
.search-suggest b { display: block; font-size: 14px; }
.search-suggest small { color: var(--muted); font-size: 12px; }
.suggest-empty { padding: 16px 14px; color: var(--muted); font-size: 13px; text-align: center; }

.see-more {
  color: var(--fb);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  padding: 6px 0 6px 12px;
}
.see-more::after { content: " ›"; }
.search:focus-within {
  background: var(--white);
  border-color: var(--fb);
  box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.15);
}
.search input {
  border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); font-size: 16px;
}
.search svg { color: var(--muted); flex-shrink: 0; pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn {
  border: 0; cursor: pointer; border-radius: 8px; font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-primary {
  background: var(--fb);
  color: var(--white);
  padding: 9px 14px;
}
.btn-primary:hover { background: var(--fb-hover); }
.btn-primary:active { background: var(--fb-press); transform: scale(0.98); }
.btn-ghost {
  background: var(--page);
  color: var(--fb);
  padding: 9px 12px;
}
.btn-ghost:active { background: var(--blue-soft); }
.btn-login { padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.header-user {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #4A9BFF, #1877F2);
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.header-user:active { transform: scale(0.96); }
.header-user-av {
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.btn-block { width: 100%; padding: 14px 18px; font-size: 16px; border-radius: 8px; }
.hide-sm { display: none; }
.hide-mobile { display: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 12px; }

.banner {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 7;
  background: var(--fb);
  box-shadow: var(--shadow);
}
.banner-track {
  display: flex;
  height: 100%;
  transition: transform .45s ease;
}
.banner-track a { min-width: 100%; height: 100%; }
.banner-track img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 6px;
}
.dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: width .3s ease, background .3s ease;
}
.dots .on { width: 18px; border-radius: 8px; background: var(--white); }

.flash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 8px;
}
.flash-head h3 { font-size: 18px; color: var(--fb); font-weight: 800; }
.flash-head span {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  color: var(--white); background: var(--fb);
  padding: 4px 10px; border-radius: 6px;
}
.flash { position: relative; overflow: hidden; border-radius: 12px; }
.flash-track { display: flex; transition: transform .45s ease; }
.flash-item {
  min-width: 100%;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.flash-item:active { background: var(--blue-soft); }
.flash-item .thumb {
  width: 64px; height: 64px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.flash-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.flash-meta { flex: 1; min-width: 0; }
.flash-item small { color: var(--muted); display: block; font-size: 12px; }
.flash-item strong { display: block; font-size: 15px; line-height: 1.3; }
.was { color: var(--muted); text-decoration: line-through; font-size: 12px; display: block; margin-top: 2px; }
.flash-buy {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.price { color: var(--fb); font-weight: 800; text-align: right; font-size: 15px; }
.flash-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fb);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 8px;
  min-width: 64px;
}
.flash-item:active .flash-buy-btn { background: var(--fb-press); }
.flash-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.flash-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .3s ease; }
.flash-dots .on { background: var(--fb); width: 16px; border-radius: 8px; }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 6px;
  margin: 16px 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  white-space: nowrap;
  border: 0;
  background: var(--white);
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid var(--card-line);
}
.tab.on { background: var(--fb); color: var(--white); border-color: var(--fb); }
.tab:active { opacity: 0.85; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 16px 0 10px;
  gap: 12px;
}
.section-head h3 { font-size: 18px; font-weight: 800; }
.section-head span { color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.grid-preview { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.card:active { transform: scale(0.98); }
@media (hover: hover) {
  .card:hover {
    border-color: var(--fb);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.12);
    transform: translateY(-2px);
  }
}
.cover {
  aspect-ratio: 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #eef2f7;
  padding: 0;
  overflow: hidden;
}
.game-icon {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 1;
  background: var(--white);
  color: var(--fb);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
}
.card-body { padding: 10px; }
.card-body h4 { font-size: 13px; line-height: 1.35; font-weight: 700; }
.card-body p { color: var(--muted); font-size: 11px; margin-top: 3px; }

.footer {
  margin-top: 28px;
  background: var(--white);
  border-top: 1px solid var(--card-line);
  padding: 20px 16px 16px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin-top: 4px; line-height: 1.4; }
.footer h5 { color: var(--fb); margin-bottom: 8px; font-size: 13px; }
.footer p, .footer a { color: var(--muted); font-size: 13px; display: block; margin: 0; }
.footer-cols { display: block; }
.footer-cols a {
  padding: 6px 0;
  line-height: 1.3;
}
.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--card-line);
  padding-top: 12px;
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--card-line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
  padding: 6px 4px calc(8px + var(--safe-bottom));
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}
.bottom-nav a {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a.on { color: var(--fb); }
.bottom-nav svg { display: block; margin: 0 auto 3px; }

.crumbs { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.crumbs a { color: var(--fb); }

/* Product / top-up page */
.page-product { padding-bottom: calc(140px + var(--safe-bottom)); }
.wrap-product { padding-top: 8px; }
.game-top {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.game-top .art {
  width: 80px; height: 80px; border-radius: 20px;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.game-top .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-top h1 { font-size: 20px; line-height: 1.2; font-weight: 800; }
.game-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.product { display: grid; gap: 12px; }
.panel-form .step:first-child { margin-top: 0; }
.panel-summary h3 { font-size: 17px; margin-bottom: 4px; font-weight: 800; }

.checkout-bar {
  position: fixed;
  left: 0; right: 0; bottom: calc(56px + var(--safe-bottom));
  z-index: 45;
  background: var(--white);
  border-top: 1px solid var(--card-line);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.checkout-info { flex: 1; min-width: 0; }
.checkout-info small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.checkout-info strong { display: block; color: var(--fb); font-size: 18px; font-weight: 800; }
.checkout-bar .btn-primary { flex: 1; max-width: 160px; padding: 12px 16px; font-size: 15px; }

.game-hero { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.game-hero .art {
  width: 72px; height: 72px; border-radius: 16px;
  display: grid; place-items: center; font-size: 32px; color: var(--white); background: var(--fb);
}
.step { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; }
.panel {
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--fb); color: var(--white);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--page);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  font-size: 16px;
}
.field input:focus {
  border-color: var(--fb);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(24, 119, 242, .15);
}
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack {
  border: 2px solid var(--card-line);
  background: var(--page);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  min-height: 64px;
}
.pack.on { border-color: var(--fb); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--fb); }
.pack b { display: block; font-size: 13px; line-height: 1.3; margin-bottom: 4px; }
.pack span { color: var(--fb); font-weight: 800; font-size: 13px; }
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay {
  border: 2px solid var(--card-line);
  background: var(--white);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  min-height: 48px;
  text-align: center;
}
.pay.on { border-color: var(--fb); background: var(--blue-soft); color: var(--fb); }
.summary li {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--card-line); color: var(--muted);
}
.summary .total { color: var(--ink); font-weight: 800; font-size: 17px; border: 0; }
.note { background: var(--blue-soft); color: var(--fb); border-radius: 10px; padding: 10px; font-size: 13px; margin: 12px 0; line-height: 1.5; }

.drawer {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; z-index: 80;
}
.drawer.on { display: block; }
.drawer-panel {
  width: min(320px, 88vw); height: 100%; background: var(--page);
  padding: 0 0 calc(18px + var(--safe-bottom));
  box-shadow: 4px 0 24px rgba(0,0,0,.1);
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.drawer-hero {
  background: linear-gradient(160deg, #4A9BFF 0%, #1877F2 55%, #0E63D8 100%);
  color: var(--white);
  padding: calc(18px + var(--safe-top)) 16px 18px;
  position: relative;
}
.drawer-x {
  position: absolute; top: calc(12px + var(--safe-top)); right: 12px;
  background: rgba(255,255,255,.18); color: var(--white);
}
.drawer-x:active { background: rgba(255,255,255,.3); }
.drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 14px;
  color: inherit;
}
.drawer-profile:active { opacity: 0.92; }
.drawer-profile-arrow {
  margin-left: auto;
  opacity: 0.75;
  flex-shrink: 0;
}
.drawer-av {
  width: 58px; height: 58px;
  background: var(--white); color: var(--fb); font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.drawer-user-meta { min-width: 0; flex: 1; }
.drawer-user-meta strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
}
.drawer-user-meta > span:last-of-type {
  display: block;
  opacity: .92;
  font-size: 13px;
  margin-top: 3px;
  word-break: break-word;
}
.drawer-member {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: rgba(255,255,255,.2);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.drawer-hero.is-guest .drawer-member { background: rgba(255,255,255,.14); }
.drawer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.drawer-stat {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
}
.drawer-stat small { display: block; font-size: 11px; opacity: .88; margin-bottom: 4px; }
.drawer-stat b { font-size: 15px; line-height: 1.2; word-break: break-word; }
.drawer-nav { padding: 12px; display: grid; gap: 6px; }
.drawer-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; font-weight: 700; color: var(--ink);
  background: var(--white); border-radius: 12px; border-bottom: 0;
}
.drawer-nav a i {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--blue-soft); color: var(--fb);
  display: grid; place-items: center; flex-shrink: 0;
}
.drawer-nav a:active, .drawer-nav a.on { background: var(--blue-soft); color: var(--fb); }
.drawer-cta { width: calc(100% - 24px); margin: auto 12px 0; }

.wallet-hint { color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.wallet-total {
  display: flex; justify-content: space-between; align-items: center;
  margin: 16px 0 12px; font-size: 15px;
}
.wallet-total b { color: var(--fb); font-size: 22px; }

.you-rank {
  background: linear-gradient(135deg, #1877F2, #4A9BFF);
  color: var(--white); border-radius: 16px; padding: 16px 18px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.you-rank small { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; opacity: .9; }
.you-rank strong { display: block; font-size: 32px; line-height: 1.1; margin: 4px 0; }
.you-rank p { font-size: 13px; opacity: .95; }
.board-note { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.podium {
  display: grid; grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end; gap: 8px; margin: 4px 0 8px;
}
.pod {
  background: var(--white); border: 1px solid var(--card-line);
  border-radius: 14px; padding: 12px 8px 14px; text-align: center;
  box-shadow: var(--shadow);
}
.pod .medal { font-size: 22px; display: block; margin-bottom: 6px; }
.pod .who { font-weight: 800; font-size: 13px; }
.pod .ph { color: var(--muted); font-size: 11px; margin: 4px 0; }
.pod .amt { color: var(--fb); font-weight: 800; font-size: 12px; }
.pod.p1 { padding-top: 22px; border-color: #F7B500; box-shadow: 0 8px 20px rgba(247,181,0,.18); }
.pod.p2 { border-color: #C0C8D2; }
.pod.p3 { border-color: #D4924A; }
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--card-line);
}
.rank-row.me { background: var(--blue-soft); margin: 0 -16px; padding: 12px 16px; border-radius: 10px; border: 0; }
.rank-no {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--page); color: var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.rank-no.gold { background: #FFF4CC; color: #B8860B; }
.rank-no.silver { background: #EEF1F5; color: #5B6777; }
.rank-no.bronze { background: #F8E6D4; color: #9A5B1A; }
.rank-meta { flex: 1; min-width: 0; }
.rank-meta b { display: block; font-size: 14px; }
.rank-meta span { color: var(--muted); font-size: 12px; }
.rank-amt { color: var(--fb); font-weight: 800; font-size: 13px; white-space: nowrap; }

.kicker { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--fb); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 36px 16px;
  color: var(--muted);
}
.empty b { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.drawer-head .icon-btn { width: 36px; height: 36px; }
.drawer-head .drawer-logo { margin-bottom: 0; }

.faq details {
  border-bottom: 1px solid var(--card-line);
  padding: 12px 0;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.5; }

.wallet-grid { display: grid; gap: 12px; }
.wallet-card {
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.wallet-card h3 { font-size: 15px; margin-bottom: 6px; }
.wallet-bal { color: var(--fb); font-size: 28px; font-weight: 800; }
.auth-box { max-width: 440px; margin: 0 auto; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tabs button {
  border: 2px solid var(--card-line);
  background: var(--white);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--muted);
}
.auth-tabs button.on {
  border-color: var(--fb);
  background: var(--blue-soft);
  color: var(--fb);
}
.auth-switch { text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--fb); font-weight: 700; }
.profile-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--card-line);
}
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-soft); color: var(--fb);
  display: grid; place-items: center; font-weight: 800;
}

.account-wrap { max-width: 640px; padding-top: 8px; }
.account-hero {
  background: linear-gradient(160deg, #4A9BFF 0%, #1877F2 58%, #0E63D8 100%);
  color: var(--white);
  border-radius: 18px;
  padding: 18px 16px 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(24, 119, 242, 0.28);
}
.account-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.account-av {
  width: 72px;
  height: 72px;
  font-size: 28px;
  background: var(--white);
  color: var(--fb);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}
.account-hero-text { min-width: 0; }
.account-hero-text h1 {
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0 2px;
  word-break: break-word;
}
.account-hero-text p {
  font-size: 14px;
  opacity: 0.92;
  word-break: break-word;
}
.account-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255,255,255,.2);
  padding: 4px 9px;
  border-radius: 999px;
}
.account-hero.is-guest .account-badge { background: rgba(255,255,255,.14); }
.account-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.account-stat {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
}
.account-stat small { display: block; font-size: 11px; opacity: .88; margin-bottom: 4px; }
.account-stat b { font-size: 16px; line-height: 1.2; word-break: break-word; }
.account-menu { display: grid; gap: 8px; }
.account-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.account-link:active { background: var(--blue-soft); }
.account-link i {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--fb);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.account-link span { flex: 1; min-width: 0; }
.account-link b { color: var(--muted); font-size: 13px; font-weight: 700; }
.account-logout { margin-top: 8px; }
.account-guest { margin-bottom: 0; }
.toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  background: #111; color: #fff; padding: 10px 16px;
  border-radius: 999px; font-size: 13px; font-weight: 700;
  opacity: 0; pointer-events: none; z-index: 90;
  transition: .25s ease;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.field-row { display: grid; gap: 10px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

@media (max-width: 719px) {
  .logo-text { height: 52px; max-width: min(220px, 58vw); }
  .footer-logo { height: 40px; margin-bottom: 6px; }
  .btn-login { padding: 8px 12px; font-size: 13px; }
  .header-inner { gap: 8px; }
  .announce { padding-top: 7px; }
  .panel-summary { display: none; }
}

@media (min-width: 720px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    padding: 0 20px;
    height: var(--header);
    gap: 16px;
  }
  .header-main { flex: 0 0 auto; }
  .logo { flex: 0 0 auto; }
  .logo-text { height: 72px; max-width: 320px; }
  .header-main { min-height: 72px; }
  .search-wrap { flex: 1; width: auto; }
  .search { width: auto; border-color: transparent; padding: 8px 14px; }
  .hide-sm { display: inline-flex; }
  .hide-mobile { display: block; }
  .checkout-bar { display: none; }
  .page-product { padding-bottom: calc(72px + var(--safe-bottom)); }
  .wrap { padding: 20px; }
  .announce { font-size: 13px; padding-top: 7px; }
  .banner { aspect-ratio: 16 / 5.2; border-radius: 16px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .cover { aspect-ratio: 1; }
  .game-icon { width: 100%; height: 100%; }
  .field-row.split { grid-template-columns: 1fr 1fr; }
  .wallet-grid { grid-template-columns: 1fr 1fr; }
  .flash-item { padding: 16px; }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 16px; }
  .footer-brand { grid-column: auto; }
  .footer-cols { display: block; }
  .footer-cols a { padding: 4px 0; margin: 2px 0; }
  .footer h5 { font-size: 14px; }
  .footer-copy { text-align: left; }
  .product { grid-template-columns: 1.6fr .9fr; align-items: start; }
  .panel-summary { display: block; }
  .packs { grid-template-columns: repeat(3, 1fr); }
  .section-head h3, .flash-head h3 { font-size: 22px; }
  .card-body h4 { font-size: 14px; }
  .game-top .art { width: 96px; height: 96px; border-radius: 22px; }
  .game-top h1 { font-size: 24px; }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .grid-preview { grid-template-columns: repeat(4, 1fr); }
}
