:root {
  --green: #19c20e;
  --green-dark: #0e9f08;
  --green-soft: #e9f9e6;
  --ink: #172033;
  --muted: #6d7482;
  --line: #e3e7ec;
  --sheet: #ffffff;
  --card: #ffffff;
  --hero: #020704;
  --hero-2: #082413;
  --gold: #ffbf18;
  --blue: #1f7df2;
  --shadow: 0 2px 12px rgba(15, 23, 42, .12);
  --radius: 12px;
  --star: #ffb400;
  --track: #edf0f4;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; background: #eef3ea; }

body {
  min-height: 100vh;
  color: var(--ink);
  background: #eef3ea;
  font-family: Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.42;
}

.page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 0 0 96px;
  background: var(--sheet);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .05);
}

@media (display-mode: standalone) {
  .page { padding-top: env(safe-area-inset-top, 0px); }
}
body.is-standalone .page { padding-top: env(safe-area-inset-top, 0px); }

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  padding: 58px 28px 62px;
  color: #f8fff6;
  background:
    linear-gradient(155deg, rgba(246, 196, 50, .32), transparent 15%),
    radial-gradient(circle at 50% 0%, rgba(28, 226, 95, .7), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(31, 125, 242, .28), transparent 24%),
    linear-gradient(180deg, var(--hero-2), var(--hero) 72%);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 54, .9), transparent);
  transform: rotate(-11deg);
  pointer-events: none;
}

.hero-panel::before { top: 32px; }
.hero-panel::after { top: 74px; transform: rotate(8deg); opacity: .55; }

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(27, 221, 72, .2), transparent 38%),
    linear-gradient(180deg, transparent 78%, rgba(255,255,255,.1));
  pointer-events: none;
}

.app-header {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.app-icon {
  width: 116px;
  height: 116px;
  border-radius: 18px;
  display: block;
  box-shadow: 0 16px 30px rgba(0,0,0,.34);
}

.app-header-info { min-width: 0; width: 100%; }

.app-name {
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  word-break: break-word;
}

.app-dev {
  display: none;
  margin-top: 5px;
  color: #b6f7aa;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.app-badges {
  display: none;
  margin-top: 6px;
  color: rgba(248,255,246,.72);
  font-size: 12px;
}

.app-badges span + span::before { content: " · "; }

.stats-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: center;
  gap: 14px;
  margin: 26px auto 22px;
  max-width: 520px;
}

.stat {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.stat-value {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.stat-label,
.stat-caption {
  max-width: 100%;
  color: rgba(231, 239, 245, .74);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-caption { color: rgba(231, 239, 245, .58); font-size: 12px; }
.stat-divider { height: 58px; width: 1px; background: rgba(255,255,255,.22); }
.stat-esrb { border: 0; padding: 0; }
.star-icon { width: 18px; height: 18px; fill: currentColor; color: #fff; }

.install-section {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 540px;
}

.btn-install {
  display: block;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  padding: 14px 24px;
  color: #fff;
  background: linear-gradient(90deg, #11c420, #52cf00);
  box-shadow: 0 8px 18px rgba(18, 196, 30, .28), inset 0 1px 0 rgba(255,255,255,.3);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.btn-install:hover { filter: brightness(1.04); }
.btn-install:active { transform: translateY(1px); }
.btn-install:disabled { opacity: .8; cursor: default; }

.btn-install.small {
  width: auto;
  min-height: 40px;
  border-radius: 14px;
  padding: 9px 18px;
  font-size: 14px;
}

a.btn-install {
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-install.is-open {
  color: #0b8c24;
  background: #fff;
  border: 1px solid rgba(22, 176, 39, .45);
  box-shadow: 0 5px 16px rgba(0,0,0,.12);
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 2px solid rgba(255,255,255,.42);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.store-sheet {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  padding: 38px 28px 36px;
  background: var(--sheet);
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -8px 22px rgba(0,0,0,.14);
}

.shots-wrap {
  position: relative;
  margin: 0 -4px 18px;
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 4px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.shots::-webkit-scrollbar { display: none; }

.shots img {
  flex: 0 0 31%;
  min-width: 168px;
  height: 310px;
  display: block;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
  background: var(--track);
  scroll-snap-align: start;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.shot-nav svg { width: 22px; height: 22px; fill: #596275; }
.shot-nav.prev { left: 8px; }
.shot-nav.next { right: 8px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #365064;
  background: #f2f7fb;
  border: 1px solid #dce7f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.section {
  padding: 22px 0;
}

.section + .section { border-top: 1px solid #f0f2f4; }

.section-title {
  margin-bottom: 12px;
  color: #111827;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
}

.about-card .description,
.data-card,
.app-info-card .info-table {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 7px rgba(15, 23, 42, .1);
}

.description {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 20px;
  color: #2f3b4c;
  font-size: 18px;
  font-weight: 600;
}

.description.collapsed { max-height: 260px; }

.description.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(transparent, #fff);
}

.description h3 {
  margin: 14px 0 8px;
  color: #172033;
  font-size: 20px;
  font-weight: 800;
}

.description h3:first-child { margin-top: 0; }
.description p { margin: 10px 0; }
.description ul { margin: 10px 0 10px 22px; }
.description li { margin: 6px 0; }

.desc-toggle {
  display: block;
  margin: 8px auto 0;
  border: 0;
  background: transparent;
  color: #697286;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease;
}

.desc-toggle.open { transform: rotate(90deg); }

.data-card {
  padding: 22px 0;
}

.data-card,
.app-info-card {
  display: none;
}

.data-card > .section-title,
.data-card > .muted,
.data-card > .small {
  margin-left: 18px;
  margin-right: 18px;
}

.muted {
  color: #526071;
  font-size: 17px;
  font-weight: 600;
}

.small {
  margin-top: 9px;
  color: #7a8492;
  font-size: 13px;
}

.ratings-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.score-number {
  color: #111827;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
}

.stars {
  display: inline-flex;
  gap: 2px;
  margin: 6px 0 2px;
  color: var(--gold);
}

.stars svg { width: 14px; height: 14px; }
.stars .full { fill: var(--gold); }
.stars .empty { fill: #dce1e8; }

.ratings-bars {
  display: grid;
  gap: 7px;
}

.bar-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #798392;
  font-size: 12px;
  font-weight: 700;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  background: #e9edf3;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: inherit;
}

.reviews {
  display: grid;
  gap: 14px;
}

.review {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 7px rgba(15, 23, 42, .1);
}

.review-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 6px;
}

.avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.55), transparent 24%),
    linear-gradient(135deg, #1f7df2, #15223a);
  font-size: 19px;
  font-weight: 800;
}

.review-author {
  color: #1a2739;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: #7c8798;
  font-size: 14px;
  font-weight: 700;
}

.review-text {
  margin-left: 68px;
  color: #637083;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.review-helpful {
  display: none;
}

.info-table {
  padding: 4px 18px;
  font-size: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #eef1f5;
}

.info-row:last-child { border-bottom: 0; }
.info-row dt { color: #707b8d; font-weight: 700; }
.info-row dd { color: #273346; text-align: right; font-weight: 700; }

.page-footer {
  padding: 24px 0 12px;
  color: #858f9f;
  text-align: center;
  font-size: 13px;
}

.footer-links { margin-bottom: 8px; }
.footer-links a { color: #56657a; text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.footer-dot { margin: 0 8px; color: #b7bfca; }
.footer-operator { margin: 0; font-size: 12px; }

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, .12);
  backdrop-filter: blur(12px);
}

.sticky-icon { border-radius: 10px; flex: 0 0 auto; }
.sticky-info { flex: 1; min-width: 0; }
.sticky-name { color: #142033; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-sub { color: #718096; font-size: 12px; font-weight: 700; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.58);
  animation: fadeIn .2s ease;
}

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

.overlay-card {
  width: min(330px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  padding: 28px 24px;
  color: var(--ink);
  background: #fff;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 18px 54px rgba(0,0,0,.28);
  animation: popIn .24s ease;
}

@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.overlay-icon-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
}

.overlay-icon {
  position: absolute;
  inset: 12px;
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.progress-ring {
  position: absolute;
  inset: 0;
  width: 88px;
  height: 88px;
  transform: rotate(-90deg);
}

.progress-ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: #e3e8ef; }
.ring-fg {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 188;
  animation: ringSpin 1.2s linear infinite;
  transform-origin: center;
}

@keyframes ringSpin {
  0% { stroke-dashoffset: 220; transform: rotate(0deg); }
  50% { stroke-dashoffset: 80; }
  100% { stroke-dashoffset: 220; transform: rotate(360deg); }
}

.check-mark {
  position: absolute;
  inset: 0;
  width: 88px;
  height: 88px;
  display: none;
}

.check-mark .check-circle {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.check-mark .check-path {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.check-mark.show { display: block; }
.check-mark.show .check-circle { animation: draw .4s ease forwards; }
.check-mark.show .check-path { animation: draw .3s ease .35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.overlay-text {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.guide-card { text-align: left; }
.guide-title { margin-bottom: 12px; color: #172033; font-size: 18px; font-weight: 800; text-align: center; }
.guide-steps { margin: 0 0 16px 20px; color: #405064; font-size: 15px; font-weight: 600; }
.guide-steps li { margin: 9px 0; }
.guide-card .btn-install { margin: 0 auto; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 120;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  padding: 12px 18px;
  color: #fff;
  background: #172033;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  animation: toastIn .24s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (min-width: 720px) {
  .page { margin-top: 18px; margin-bottom: 18px; border-radius: 22px; overflow: hidden; }
  .shot-nav { display: flex; }
  .sticky-bar { display: none; }
}

@media (max-width: 520px) {
  .hero-panel {
    min-height: 374px;
    padding: 48px 20px 58px;
  }

  .app-icon {
    width: 108px;
    height: 108px;
  }

  .stats-row {
    gap: 10px;
    margin-top: 22px;
  }

  .stat-value { font-size: 24px; }
  .stat-label,
  .stat-caption { font-size: 12px; }

  .store-sheet {
    margin-top: -30px;
    padding: 34px 16px 32px;
    border-radius: 30px 30px 0 0;
  }

  .shots img {
    flex-basis: 39%;
    min-width: 176px;
    height: 312px;
  }

  .section-title { font-size: 24px; }
  .description { font-size: 17px; }
  .review { padding: 16px 18px; }
  .review-text { font-size: 16px; }
}

@media (max-width: 380px) {
  .hero-panel { padding-left: 14px; padding-right: 14px; }
  .stats-row { gap: 7px; }
  .stat-divider { height: 52px; }
  .stat-value { font-size: 21px; }
  .btn-install { min-height: 54px; font-size: 18px; }
  .shots img { min-width: 158px; height: 292px; }
  .review-head { grid-template-columns: 46px minmax(0, 1fr); }
  .avatar { width: 46px; height: 46px; }
  .review-text { margin-left: 60px; }
  .ratings-summary { grid-template-columns: 1fr; }
}
