:root {
  --bg: #fff;
  --page: #ececec;
  --text: #111;
  --sub: #8a8a8a;
  --muted: #b3b3b3;
  --line: #eee;
  --card: #f6f7f9;
  --green: #07c160;
  --green-press: #06ad56;
  --gold-bg: #fff3d6;
  --gold: #c68612;
  --mint-bg: #e7f8ee;
  --mint: #1a9e5c;
  --red: #e23b3b;
  --max: 430px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.page {
  width: 100%;
  max-width: var(--max);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

.topbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.identity {
  display: flex;
  gap: 14px;
  padding: 14px 16px 18px;
  align-items: flex-start;
}
.app-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.identity-text { min-width: 0; padding-top: 2px; }
.identity-text h1 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.slogan {
  margin-top: 6px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.4;
}
.badges { display: flex; gap: 6px; margin-top: 8px; }
.badge {
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.badge.gold { background: var(--gold-bg); color: var(--gold); }
.badge.mint { background: var(--mint-bg); color: var(--mint); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px 8px 18px;
}
.metric {
  text-align: center;
  position: relative;
}
.metric + .metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #f0f0f0;
}
.metric strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.metric strong span {
  font-size: 12px;
  font-weight: 600;
  margin-left: 1px;
}
.metric em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  color: var(--sub);
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 36px;
  border-bottom: 1px solid #f2f2f2;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}
.tab {
  position: relative;
  padding: 12px 2px 11px;
  font-size: 16px;
  color: #666;
}
.tab.is-active {
  color: #111;
  font-weight: 700;
}
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 2.5px;
  background: #111;
  border-radius: 2px;
}

.panels { padding: 14px 0 8px; }
.panel { display: none; }
.panel.is-active { display: block; }

.shots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 16px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 156px;
  height: 278px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center top;
  scroll-snap-align: start;
  background: #f2f2f2;
}

.tags {
  display: flex;
  gap: 8px;
  padding: 4px 16px 18px;
}
.tags a {
  font-size: 13px;
  color: #444;
  background: #f4f4f4;
  border-radius: 8px;
  padding: 7px 12px;
}
.tags a::after { content: " ›"; color: #999; }

.about { padding: 0 16px 8px; }
.about h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.about-body {
  max-height: 72px;
  overflow: hidden;
  position: relative;
}
.about-body.is-open { max-height: none; }
.about-body p {
  font-size: 14px;
  line-height: 1.7;
  color: #8d8d8d;
}
.about-body p + p { margin-top: 8px; }
.about-body:not(.is-open)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28px;
  background: linear-gradient(transparent, #fff);
}
.about-more {
  display: block;
  margin: 6px auto 0;
  color: #8d8d8d;
  font-size: 13px;
}

.rating-box {
  display: flex;
  gap: 18px;
  margin: 4px 16px 16px;
  padding: 14px 12px;
  background: var(--card);
  border-radius: 14px;
}
.rating-score { width: 88px; text-align: center; }
.rating-score strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}
.stars { color: #ffb300; letter-spacing: 1px; font-size: 14px; margin: 4px 0 2px; }
.stars.sm { font-size: 12px; }
.rating-score em {
  font-style: normal;
  font-size: 11px;
  color: var(--sub);
}
.rating-bars { flex: 1; display: grid; gap: 5px; align-content: center; }
.rbar { display: flex; align-items: center; gap: 6px; }
.rbar i { width: 10px; font-style: normal; font-size: 11px; color: #888; }
.rbar span {
  flex: 1;
  height: 6px;
  background: #e9e9e9;
  border-radius: 99px;
  overflow: hidden;
}
.rbar b { display: block; height: 100%; background: #ffb300; }

.review { padding: 14px 16px; border-top: 1px solid #f4f4f4; }
.review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.review-top time { margin-left: auto; font-size: 12px; color: var(--muted); }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.a1 { background: #e53935; }
.a2 { background: #43a047; }
.a3 { background: #fb8c00; }
.review-top b { display: block; font-size: 14px; }
.review p { font-size: 14px; line-height: 1.6; color: #444; }

.install-space { height: 84px; }
.install-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--max);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(#fff0, #fff 18%);
  z-index: 10;
}
.install-btn {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: 0 8px 18px rgba(7, 193, 96, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-btn:active { background: var(--green-press); }
.install-btn.is-loading {
  letter-spacing: 0;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 20;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .page { box-shadow: 0 0 40px rgba(0, 0, 0, 0.08); }
}
