body { max-width: 980px; margin: 0 auto; padding-bottom: 80px; --banner-h: 56px; }
.wallet { display: flex; gap: 6px; align-items: center; }
.iab {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 12px 0; padding: 8px 12px;
  border-radius: 14px; background: #e7f1fb; color: #24527a; font-size: 13px;
}
.iab span { flex: 1 1 180px; }
.iab a { background: var(--sky); color: #fff; border-radius: 999px; padding: 5px 12px; text-decoration: none; font-weight: 700; }
.iab button { border: 0; background: none; color: #24527a; font-size: 16px; cursor: pointer; }
.wallet .me {
  order: 3; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: var(--card);
  display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 18px;
}

.profile { padding: 8px 16px; }
.profile .head { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.profile .head .face { width: 72px; height: 72px; flex: none; }
.profile .head h1 { margin: 0; font-size: 22px; }
.profile .head p { margin: 2px 0 0; color: var(--muted); }
.acct { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.acct .lab-btn { width: 100%; font-size: 16px; }
.acct .lab-btn b { display: inline-block; width: 22px; }
.acct .google { background: #fff; color: #3b2f2a; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.acct .facebook { background: #1877f2; box-shadow: 0 4px 0 #0f5cc4; }
.acct .facebook:disabled { opacity: .5; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tiles div { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 6px; text-align: center; }
.tiles b { display: block; font-size: 20px; }
.tiles span { font-size: 12px; color: var(--muted); }
.prog { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.prog button {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; text-align: left; width: 100%;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer;
}
.prog .mini { width: 48px; height: 36px; border-radius: 8px; overflow: hidden; }
.prog .mini svg { width: 100%; height: 100%; display: block; }
.prog small { color: var(--muted); display: block; }
.prog .bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 4px; overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: #f0b429; }
.prog .st { color: #c99317; font-weight: 700; white-space: nowrap; }
.bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 18px; }
.bag div { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 4px; text-align: center; }
.bag .ic { font-size: 24px; }
.bag small { display: block; color: var(--muted); font-size: 11px; }
@media (max-width: 420px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .top { padding: 10px 12px 4px; gap: 8px; }
  .brand { gap: 6px; min-width: 0; }
  .brand-face { width: 38px; height: 38px; }
  .brand-name { font-size: 17px; white-space: nowrap; }
  .brand-th { font-size: 12px; white-space: nowrap; }
  .wallet { gap: 4px; }
  .wallet .lab-energy, .wallet .lab-coins { padding: 5px 8px; font-size: 14px; }
  .wallet .me { width: 34px; height: 34px; font-size: 16px; }
}

.gift {
  margin: 4px 16px 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: calc(100% - 32px);
  border-radius: var(--radius); border: 2px dashed #f5d77a; background: #fff8dc; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.gift:disabled { opacity: .6; cursor: default; }
.gift.install { margin-top: 8px; border-color: #b9d6f2; background: #e7f1fb; }
.gift .ic { font-size: 30px; }
.gift b { display: block; font-size: 16px; }
.gift small { color: var(--muted); }

.banner {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(728px, 100%); height: 56px; z-index: 10;
  display: flex; align-items: center; justify-content: center; background: #ece6df; color: var(--muted); font-size: 13px;
  border-top: 2px solid var(--line);
}
/* Android app: the real AdMob banner sits in the same spot, so the placeholder goes away. */
.lab-native .banner { display: none; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 4px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-face { width: 48px; height: 48px; display: block; }
.brand-face svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: .2px; }
.brand-th { font-size: 13px; font-weight: 700; color: var(--brand); }

.search { padding: 8px 16px; }
.search input {
  width: 100%; padding: 12px 16px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--card); font: inherit; font-size: 16px; color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--brand); }

.tags { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 10px; scrollbar-width: none; }
.tags::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.sec { padding: 4px 16px 8px; }
.sec h2 { font-size: 19px; margin: 14px 0 10px; display: flex; align-items: baseline; justify-content: space-between; }
.sec h2 small { font-size: 14px; color: var(--muted); font-weight: 400; }
.row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row .gcard { width: 168px; flex: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.gcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 2px solid var(--line); transition: transform .12s; text-align: left; padding: 0; color: var(--ink);
}
.gcard:active { transform: scale(.97); }
.gcard .thumb { aspect-ratio: 4 / 3; display: block; }
.gcard .thumb svg { width: 100%; height: 100%; display: block; }
.gcard .info { padding: 8px 10px 10px; }
.gcard .name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.gcard .meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { border-radius: 999px; padding: 1px 8px; font-size: 11px; background: #e5f4e4; color: #2f6b3a; }
.badge.web { background: #e7f1fb; color: #24527a; }
.badge.adult { background: #fbebeb; color: #9b2c2c; }

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

.detail { padding: 8px 16px; }
.detail .hero { border-radius: 24px; overflow: hidden; border: 2px solid var(--line); }
.detail .hero svg { width: 100%; display: block; max-height: 300px; }
.detail h1 { font-size: 26px; margin: 14px 0 4px; }
.detail .sub { color: var(--muted); margin: 0 0 10px; }
.detail .play { width: 100%; font-size: 20px; padding: 14px; margin: 6px 0 14px; }
.detail .box { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.detail .box h3 { margin: 0 0 6px; font-size: 16px; }
.detail ol { margin: 0; padding-left: 22px; line-height: 1.7; }
.detail .tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
.detail .tagrow .chip { padding: 5px 12px; font-size: 13px; }
.stats { display: flex; gap: 10px; }
.stats div { flex: 1; text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 12px; color: var(--muted); }
.back { background: none; border: 0; color: var(--muted); font-size: 15px; padding: 4px 0; cursor: pointer; }

.player { position: fixed; inset: 0; z-index: 40; background: var(--bg); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (min-width: 700px) {
  .row .gcard { width: 200px; }
  .detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
  .detail .back { grid-column: 1 / -1; justify-self: start; }
}
