:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --divider: #e6e8eb;
  --accent: #01875f;
  --chip-border: #dadce0;
  --shadow: 0 16px 44px rgba(32, 33, 36, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans", "Product Sans", "Segoe UI", Roboto, Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

html.is-redirecting body {
  visibility: hidden;
}

.play-shell {
  max-width: 430px;
  margin: 0 auto;
  background: var(--surface);
}

.play-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 14px;
}

.play-brand,
.play-header__icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-brand {
  font-size: 16px;
  font-weight: 600;
}

.play-brand.has-store-logo {
  gap: 0;
}

.store-logo-image {
  display: block;
  width: auto;
  max-width: min(260px, 58vw);
  max-height: 54px;
  object-fit: contain;
}

.play-header__icons {
  color: #5f6368;
  font-size: 20px;
}

.header-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eef0f2;
  display: inline-block;
}

.play-logo {
  position: relative;
  width: 28px;
  height: 26px;
}

.play-logo::before {
  content: "";
  position: absolute;
  inset: 2px 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: linear-gradient(90deg, #34a853 0 34%, #fbbc04 34% 62%, #4285f4 62% 100%);
}

.play-logo span {
  display: none;
}

main {
  padding: 10px 14px 40px;
}

.hero {
  display: grid;
  gap: 20px;
}

.hero-top {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.hero-title {
  display: grid;
  gap: 6px;
}

.hero-title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 450;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.developer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.verify-badge {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.svg-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  flex: 0 0 auto;
}

.svg-icon--star {
  width: 13px;
  height: 13px;
}

.verify-badge .svg-icon {
  width: 11px;
  height: 11px;
}

.description-short {
  color: var(--muted);
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.stat {
  min-height: 52px;
  display: grid;
  align-content: center;
  padding: 0 8px;
}

.stat:not(:last-child) {
  border-right: 1px solid var(--divider);
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}

.rating-star {
  margin-left: 1px;
  font-size: 18px;
  display: inline-flex;
  color: var(--text);
}

.stat-sub,
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.badge-outline {
  display: inline-flex;
  justify-content: center;
  color: #3c4043;
}

.badge-outline .svg-icon {
  width: 20px;
  height: 20px;
  color: #3c4043;
}

.install-button {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.install-button:disabled {
  opacity: 0.92;
}

.button-spinner {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  display: inline-block;
  animation: spin 0.72s linear infinite;
}

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

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.availability i {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.availability .svg-icon {
  width: 17px;
  height: 17px;
}

.availability {
  color: var(--muted);
  font-size: 14px;
}

.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.gallery-item {
  flex: 0 0 112px;
  height: 198px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #f1f3f4;
  overflow: hidden;
  box-shadow: none;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item.is-landscape {
  flex-basis: min(330px, 78vw);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item.is-landscape img {
  object-fit: contain;
  background: #f1f3f4;
}

.section {
  padding: 5px 0;
  border-bottom: 1px solid var(--divider);
}

.section--about {
  padding-top: 2px;
  padding-bottom: 2px;
}

.about-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.section-header h2,
.section h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.arrow,
.link-button {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
  font-weight: 700;
}

.arrow .svg-icon,
.link-button .svg-icon {
  width: 22px;
  height: 22px;
}

.updated-block {
  display: grid;
  gap: 2px;
  margin-top: -8px;
  margin-bottom: 8px;
}

.updated-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.updated-date {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  border: 1px solid var(--chip-border);
  color: #5f6368;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  background: #fff;
}

.paragraph {
  font-size: 14px;
  margin: 0 0 12px;
}

.info-card {
  border: 1px solid var(--chip-border);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.safety-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: start;
}

.safety-icon {
  color: #5f6368;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.safety-icon .svg-icon {
  width: 18px;
  height: 18px;
}

.svg-icon--safety-line {
  width: 18px;
  height: 18px;
  fill: none;
}

.rating-summary {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  align-items: center;
  margin: 14px 0 18px;
}

.rating-big {
  font-size: 56px;
  line-height: 0.95;
  font-weight: 400;
}

.stars {
  color: var(--accent);
  letter-spacing: 1px;
}

.star-icons {
  white-space: nowrap;
  display: inline-flex;
  gap: 1px;
  color: var(--accent);
}

.bars {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

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

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.review {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.review[hidden] {
  display: none;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #d7f2e4, #a5d9c5);
}

.plain-icon {
  border: 0;
  background: none;
  color: #5f6368;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.plain-icon .svg-icon {
  width: 20px;
  height: 20px;
}

.review-meta {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.review-text {
  color: #4b4f52;
  font-size: 14px;
  line-height: 1.45;
}

.review-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.review-reply {
  margin-top: 2px;
  margin-left: 46px;
  padding-left: 14px;
  border-left: 2px solid #e8eaed;
  display: grid;
  gap: 6px;
}

.review-reply__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.review-reply__head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.review-reply__text {
  color: #4b4f52;
  font-size: 14px;
  line-height: 1.42;
}

.review-toggle {
  margin-top: 2px;
}

.pill {
  min-width: 54px;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: #fff;
  color: #5f6368;
}

.footer-links {
  display: grid;
  gap: 11px;
  color: var(--muted);
  border-bottom: 0;
}

.footer-meta {
  display: grid;
  gap: 12px;
  padding-top: 6px;
  font-size: 13px;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.about-dialog {
  width: min(92vw, 360px);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.about-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.gallery-dialog {
  width: min(96vw, 760px);
  height: min(92vh, 820px);
  border: 0;
  border-radius: 22px;
  padding: 54px 58px 48px;
  background: rgba(18, 20, 22, 0.96);
  box-shadow: var(--shadow);
}

.gallery-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.gallery-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  background: #0f1113;
}

.gallery-close,
.gallery-nav {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.gallery-close svg,
.gallery-nav svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.gallery-nav--prev {
  left: 10px;
}

.gallery-nav--next {
  right: 10px;
}

.gallery-counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.dialog-close {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  background: none;
  font-size: 32px;
  color: var(--muted);
}

.dialog-header {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.dialog-header img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.about-text {
  font-size: 14px;
}

.install-tip {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 28px));
  border-radius: 14px;
  background: rgba(32, 33, 36, 0.94);
  color: #fff;
  padding: 14px 16px;
  font-size: 14px;
  box-shadow: var(--shadow);
}

@media (max-width: 560px) {
  .gallery-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 62px 14px 58px;
  }

  .gallery-nav {
    top: auto;
    bottom: 14px;
    transform: none;
  }

  .gallery-nav--prev {
    left: 16px;
  }

  .gallery-nav--next {
    right: 16px;
  }
}
