:root {
  --ink: #1f1f1f;
  --sec: #444746;
  --line: #e3e3e3;
  --go: #0b57d2;
  --go-ink: #fff;
  --sheet: #f8f9fa;
  --nav: #f0f4f8;
  --nav-pill: #c2e7ff;
  --dim: rgba(0, 0, 0, 0.4);
  --radius-icon: 16px;
  --radius-btn: 20px;
  --gutter: 24px;
  --font-ui: "Google Sans", sans-serif;
  --font-body: Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 14px/20px var(--font-ui);
  color-scheme: light;
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.icon-btn {
  width: 48px; height: 48px; border: 0; background: transparent;
  display: grid; place-items: center; border-radius: 50%; flex: none;
  color: #444746;
}
.icon-btn:active { background: #f1f3f4; }
.appbar {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 4px;
  padding-top: env(safe-area-inset-top);
}
.appbar-spacer { flex: 1; }
#btn-wish.is-on { color: var(--go); }

.hero { display: flex; gap: 16px; padding: 4px var(--gutter) 8px; align-items: flex-start; }
.app-icon-btn {
  border: 0; padding: 0; background: none; line-height: 0;
  border-radius: var(--radius-icon); flex: none; cursor: pointer;
}
.app-icon {
  width: 72px; height: 72px; border-radius: var(--radius-icon);
  object-fit: cover; display: block;
}
.name {
  font: 400 22px/28px var(--font-ui);
  margin: 0;
  letter-spacing: 0;
  color: var(--ink);
}
.hero-text .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.developer {
  color: var(--go); font: 400 14px/20px var(--font-ui);
  margin: 4px 0 0;
}
.chips { margin: 4px 0 0; color: var(--sec); font-size: 12px; line-height: 16px; }

.meta {
  display: flex; padding: 16px 8px 8px;
  justify-content: space-around; text-align: center;
  align-items: flex-start;
}
.meta-cell {
  flex: 1; position: relative;
  padding: 0 8px; min-width: 0;
}
.meta-cell:not(:last-child)::after {
  content: "";
  position: absolute; right: 0; top: 6px; bottom: 6px;
  width: 1px; background: #e3e3e3;
}
.meta-top {
  font: 500 16px/24px var(--font-ui);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 2px;
  min-height: 24px;
}
.meta-ico { color: var(--ink); }
.meta-ico svg { display: block; }
.meta-count { letter-spacing: 0; }
.meta-star { color: var(--ink); font-size: 13px; }
.meta-sub {
  color: var(--sec); font: 400 12px/16px var(--font-ui);
  margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  flex-wrap: wrap;
}
.meta-sub .age-info { color: var(--sec); display: block; flex: none; }
.meta-badge {
  display: inline-block; border: 1.5px solid var(--ink);
  border-radius: 3px; padding: 1px 5px; font: 700 13px/18px var(--font-ui);
  color: var(--ink);
}

.install-row {
  display: flex; align-items: center;
  padding: 20px var(--gutter) 8px;
}
.btn-install {
  flex: 1; height: 40px; border: 0; border-radius: var(--radius-btn);
  background: var(--go); color: var(--go-ink);
  font: 500 14px/20px var(--font-ui);
  min-width: 48px;
}
.btn-install:active { filter: brightness(0.92); }
.btn-install:disabled { opacity: 0.6; }
.btn-outline {
  height: 40px; min-width: 88px; padding: 0 20px;
  border: 1px solid #dadce0; border-radius: var(--radius-btn);
  background: #fff; color: var(--go);
  font: 500 14px/20px var(--font-ui);
  flex: none;
}
.btn-outline:active { background: #f6fafe; }

.rail {
  display: flex; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  padding: 8px 0 16px var(--gutter);
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail.hidden { display: none; }
.shot {
  position: relative;
  flex: 0 0 auto;
  border: 0; padding: 0;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--sheet);
  cursor: pointer;
  appearance: none;
}
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.rail.portrait .shot {
  flex-basis: calc((100% - 8px) / 2.33);
  width: calc((100% - 8px) / 2.33);
  aspect-ratio: 9 / 16;
}
.rail.landscape .shot {
  flex-basis: calc((100% - 8px) / 1.35);
  width: calc((100% - 8px) / 1.35);
  aspect-ratio: 16 / 9;
}

.dev-note {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 8px var(--gutter) 16px;
}
.dev-note-ico { color: var(--sec); flex: none; margin-top: 2px; }
.dev-note-copy {
  margin: 0;
  font: 400 14px/20px var(--font-body);
  color: var(--sec);
}
.dev-note-link {
  display: inline; padding: 0; border: 0; background: none;
  color: inherit; font: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}

.sec { padding: 8px var(--gutter) 12px; }
.sec h2 { font: 400 18px/24px var(--font-ui); margin: 8px 0 8px; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; border: 0; background: transparent; padding: 0;
  min-height: 40px; color: var(--ink); text-align: left;
}
.sec-head h2 { margin: 0; font: 400 18px/24px var(--font-ui); }
.sec-go {
  width: 40px; height: 40px; border-radius: 50%;
  background: #e8eaed; color: #444746; border: 0;
  display: grid; place-items: center; flex: none;
}
.sec-go svg { display: block; }
.about-lead {
  font: 400 20px/28px var(--font-body);
  color: var(--sec);
  margin: 16px 0 0;
  letter-spacing: 0;
}
.about-lead:empty { display: none; margin: 0; }
.about.clamp {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; font: 400 14px/20px var(--font-body); margin: 0;
}
.about.has-lead { margin-top: 12px; }
.about.has-lead:not(.open) { display: none; }
.about.open { display: block; -webkit-line-clamp: unset; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  border: 1px solid #c4c7c5; border-radius: 20px;
  padding: 8px 16px; font: 400 14px/20px var(--font-ui); color: var(--ink);
}
.link {
  background: none; border: 0; color: var(--go);
  padding: 8px 0; font: 500 14px/20px var(--font-ui);
  min-height: 44px;
}
.ds-lead {
  font: 400 16px/24px var(--font-body);
  color: var(--sec);
  margin: 0 0 16px;
}
.ds-card {
  border: 1px solid #c4c7c5;
  border-radius: 16px;
  padding: 20px 16px 4px;
}
.ds-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 0 0 20px; border: 0;
}
.ds-ico { color: #444746; flex: none; margin-top: 2px; }
.ds-ico svg { display: block; }
.ds-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ds-row b {
  font: 400 16px/24px var(--font-body);
  color: var(--sec); font-weight: 400;
}
.ds-row span {
  font: 400 14px/20px var(--font-body);
  color: var(--sec);
}
.ds-details {
  display: block; width: auto;
  margin: 0 0 8px 40px; padding: 8px 0;
  border: 0; background: none;
  color: var(--go); font: 500 14px/20px var(--font-ui);
  text-align: left; min-height: 40px;
}

.hist-wrap { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.hist-score { width: 72px; text-align: center; }
.big { font: 400 48px/52px var(--font-ui); letter-spacing: -1px; }
.stars-avg .star-row { justify-content: center; }
.hist { flex: 1; }
.hist-row { display: flex; align-items: center; gap: 8px; font: 400 12px/16px var(--font-ui); color: var(--sec); }
.hist-row > span { width: 12px; flex: none; text-align: right; }
.hist-track {
  flex: 1; height: 6px; background: #e8eaed; border-radius: 4px; overflow: hidden;
}
.hist-track i { display: block; height: 100%; background: var(--go); }

.star-row { display: inline-flex; align-items: center; gap: 1px; }
.star { color: #dadce0; display: block; }
.star.on { color: var(--go); }

.rev { display: flex; gap: 12px; margin: 20px 0; align-items: flex-start; }
.rev-main { flex: 1; min-width: 0; }
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.rev-top { display: flex; align-items: center; min-height: 40px; margin: -8px 0 0; }
.rev-name {
  flex: 1; min-width: 0;
  color: var(--sec); font: 400 14px/20px var(--font-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rev-overflow {
  width: 40px; height: 40px; margin-right: -12px; color: #444746;
}
.rev-meta {
  color: var(--sec); font: 400 12px/16px var(--font-body);
  display: flex; gap: 8px; align-items: center; margin: 2px 0 8px;
}
.rev-text {
  margin: 0;
  font: 400 14px/20px var(--font-body);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.helpful-n { color: var(--sec); font: 400 12px/16px var(--font-body); margin: 8px 0 0; }
.helpful-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 10px 0 0; color: var(--sec); font: 400 14px/20px var(--font-body);
}
.chip-row { display: flex; gap: 8px; flex: none; }
.chip {
  height: 32px; padding: 0 16px; border: 1px solid #dadce0; border-radius: 16px;
  background: #fff; color: #3c4043; font: 500 13px/32px var(--font-ui);
}
.chip.is-on { border-color: var(--go); color: var(--go); background: #e8f0fe; }
.reply {
  background: #f1f3f4; padding: 12px 16px; border-radius: 8px;
  margin-top: 12px;
}
.reply-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
}
.reply-dev { font: 500 14px/20px var(--font-ui); }
.reply-date { color: var(--sec); font: 400 12px/16px var(--font-body); flex: none; }
.reply p { margin: 0; font: 400 14px/20px var(--font-body); }
.see-all { padding: 16px 0 8px; min-height: 48px; }
.refund {
  display: flex; align-items: center; gap: 16px;
  width: 100%; border: 0; background: transparent;
  color: var(--ink); font: 400 14px/20px var(--font-ui);
  padding: 16px 0 8px; text-align: left; min-height: 48px;
}
.refund svg { color: #444746; flex: none; }
.vat { color: var(--sec); font: 400 14px/20px var(--font-body); margin: 4px 0 8px; }

.compact {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px 12px;
}
.compact-icon {
  width: 48px; height: 48px; border-radius: 12px;
  object-fit: cover; flex: none;
}
.compact-text { flex: 1; min-width: 0; padding-top: 2px; }
.compact-name {
  font: 400 16px/22px var(--font-ui);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.verified {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: #80868b; color: #fff; font-size: 9px; line-height: 1;
  vertical-align: 1px;
}
.compact-sub { color: var(--sec); font: 400 13px/18px var(--font-body); margin-top: 2px; }
.installed-mark {
  display: flex; align-items: center; gap: 4px; color: var(--sec);
}
.progress-track {
  height: 4px; background: #e8eaed; border-radius: 2px;
  overflow: hidden; margin-top: 8px;
}
.progress-track i {
  display: block; height: 100%; width: 0;
  background: var(--go); border-radius: 2px;
}
.auto-open {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 16px 16px; padding: 14px 16px;
  background: #f8f9fa; border-radius: 16px;
}
.auto-open-ico { font-size: 18px; flex: none; }
.auto-open-copy {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
  font: 400 12px/16px var(--font-body); color: var(--sec);
}
.auto-open-copy b { font: 500 14px/20px var(--font-ui); color: var(--ink); }
.auto-open input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  width: 52px; height: 32px; border-radius: 16px; flex: none;
  background: #e0e0e0; position: relative;
}
.switch::after {
  content: ""; position: absolute; top: 4px; left: 4px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.auto-open input:checked + .switch { background: var(--go); }
.auto-open input:checked + .switch::after { left: 24px; }
.auto-open input:focus-visible + .switch { outline: 2px solid var(--go); outline-offset: 2px; }

.installed-actions {
  display: flex; gap: 12px; padding: 4px 16px 16px;
}
.installed-actions .btn-outline,
.installed-actions .btn-install { flex: 1; }

#listing { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.play-bottom {
  display: flex;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%; background: var(--nav); z-index: 6;
  border-top: 1px solid #e8eaed;
}
.nav-item {
  flex: 1; min-height: 56px; border: 0; background: transparent; color: #444746;
  font: 400 12px/16px var(--font-ui);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 4px; padding: 0;
}
.nav-ico {
  width: 64px; height: 32px; border-radius: 16px;
  display: grid; place-items: center;
}
.nav-item svg { display: block; }
.nav-item.is-on { color: var(--go); font-weight: 500; }
.nav-item.is-on .nav-ico { background: var(--nav-pill); }

#app-home {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  text-align: center; gap: 8px;
}
#app-home .btn-install { width: 100%; max-width: 320px; margin-top: 16px; flex: none; height: 40px; }
.home-icon { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; }

.sheet-root { position: fixed; inset: 0; z-index: 20; }
.dim { position: absolute; inset: 0; background: var(--dim); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
}
.sheet h2 { margin: 0 0 12px; font: 500 20px/28px var(--font-ui); }
.sheet .btn-install { width: 100%; flex: none; }
.step { display: flex; gap: 12px; margin: 12px 0; align-items: flex-start; font: 400 14px/20px var(--font-body); }
.n {
  width: 24px; height: 24px; border-radius: 50%; background: var(--go); color: #fff;
  display: grid; place-items: center; font-size: 12px; flex: none;
}
.later {
  background: none; border: 0; color: var(--sec); width: 100%; height: 48px;
  font: 500 14px/20px var(--font-ui);
}
.ios-note { color: var(--sec); font: 400 13px/18px var(--font-body); }

.dialog-root { z-index: 22; }
.dialog {
  position: absolute; left: 24px; right: 24px;
  top: 50%; transform: translateY(-50%);
  background: #fff; border-radius: 28px;
  padding: 24px 24px 12px;
  max-width: 364px; margin: 0 auto;
}
.dialog h2 {
  margin: 0;
  font: 400 20px/28px var(--font-ui);
  color: var(--ink);
}
.dialog p {
  margin: 16px 0 0;
  font: 400 14px/20px var(--font-body);
  color: var(--sec);
}
.dialog-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin: 20px -8px 0;
}
.dialog-text {
  height: 40px; padding: 0 12px; border: 0; background: none;
  color: var(--go); font: 500 14px/20px var(--font-ui);
}

.media-viewer,
.icon-viewer {
  position: fixed; inset: 0; z-index: 40;
  background: #000;
}
.icon-viewer {
  background: #fff;
  display: grid;
  place-items: center;
  padding: 72px 24px 24px;
}
.icon-viewer-img {
  width: min(72vw, 240px);
  height: min(72vw, 240px);
  border-radius: 22%;
  object-fit: cover;
}
.media-track {
  height: 100%;
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  touch-action: pan-x;
}
.media-track::-webkit-scrollbar { display: none; }
.media-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.media-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  pointer-events: none;
}
.media-back {
  position: absolute;
  top: env(safe-area-inset-top);
  left: 4px;
  z-index: 2;
  width: 48px; height: 48px; border: 0;
  background: transparent; color: #fff;
  display: grid; place-items: center; border-radius: 50%;
}
.media-back.is-on-light { color: #1f1f1f; }
.media-back:active { background: rgba(255, 255, 255, 0.12); }
.media-back.is-on-light:active { background: #f1f3f4; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* Phone landscape is wide but short (~360–450px tall). Width-only caps break rotation. */
@media (min-width: 600px) and (min-height: 500px) {
  html, body {
    max-width: 412px;
    margin-inline: auto;
  }
  .play-bottom,
  .sheet {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 412px;
    transform: translateX(-50%);
  }
}
#iab-gate{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:32px 24px;text-align:center;background:#fff;color:#202124}
#iab-gate[hidden]{display:none}
#iab-gate h1{font:500 22px/1.3 "Google Sans",Roboto,sans-serif;margin:0 0 8px}
#iab-gate p{font:400 14px/1.45 Roboto,sans-serif;margin:0;max-width:320px;color:#5f6368}
