:root {
  --gp-green: #01875f;
  --gp-green-dark: #007b55;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

html { background: #f4f5f5; }

body {
  margin: 0;
  background: #f4f5f5;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; -webkit-tap-highlight-color: transparent; }

.store-page { min-height: 100svh; }

.store-canvas {
  width: min(100%, 720px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 18px 60px rgb(60 64 67 / 8%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 12px 24px;
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.icon-button {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #3c4043;
  cursor: pointer;
}

.icon-button:active { background: #f1f3f4; }
.back-button span { margin-top: -3px; font-size: 42px; font-weight: 300; line-height: 1; }
.more-button span { margin-top: -6px; font-size: 38px; line-height: 1; }

.search-button span {
  position: relative;
  width: 23px;
  height: 23px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.search-button span::after {
  position: absolute;
  right: -10px;
  bottom: -7px;
  width: 13px;
  height: 4px;
  border-radius: 4px;
  background: currentColor;
  content: '';
  transform: rotate(46deg);
  transform-origin: left center;
}

.app-summary {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 36px 40px 0;
}

.app-icon {
  width: 104px;
  height: 104px;
  border-radius: 23px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgb(60 64 67 / 25%);
}

.app-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 8vw, 44px);
  font-weight: 500;
  letter-spacing: -1.3px;
  line-height: 1.08;
}

.developer, .purchase-note { margin: 0; }

.developer {
  overflow: hidden;
  color: var(--gp-green);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-note { margin-top: 7px; color: var(--muted); font-size: 18px; }

.store-stats {
  display: grid;
  grid-template-columns: 1fr 1px 1.15fr 1px 1fr;
  align-items: center;
  margin: 64px 31px 0;
}

.store-stat {
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.store-stat strong {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 3px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.store-stat strong span { font-size: 18px; }
.store-stat > span { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.2; }

.store-stat b {
  display: inline-grid;
  width: 15px;
  height: 15px;
  margin-left: 3px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.rating-mark {
  display: grid !important;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 3px solid #202124;
  border-radius: 3px;
  font-size: 17px !important;
  line-height: 1 !important;
}

.stat-divider { width: 1px; height: 54px; background: var(--line); }

.register-button {
  display: block;
  width: calc(100% - 80px);
  min-height: 62px;
  margin: 56px auto 0;
  border: 0;
  border-radius: 8px;
  background: var(--gp-green);
  color: white;
  font-size: 21px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
}

.register-button:hover { background: var(--gp-green-dark); }
.register-button:active { transform: scale(.995); }
.register-button[aria-disabled='true'] { background: #5f6368; }

.register-button:focus-visible, .icon-button:focus-visible {
  outline: 3px solid rgb(1 135 95 / 35%);
  outline-offset: 3px;
}

.media-section { margin-top: 52px; }

.media-rail {
  display: grid;
  grid-auto-columns: min(86vw, 604px);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding: 0 40px 14px;
  scroll-padding-inline: 40px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.media-rail::-webkit-scrollbar { display: none; }

.media-card {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #172326;
  box-shadow: 0 2px 8px rgb(60 64 67 / 20%);
  scroll-snap-align: start;
}

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

.media-rail:focus-visible {
  outline: 3px solid rgb(1 135 95 / 28%);
  outline-offset: -3px;
}

.swipe-hint {
  margin: 2px 40px 0;
  color: #80868b;
  font-size: 12px;
  letter-spacing: .2px;
}

.about-section { padding: 48px 40px 72px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.section-title-row h2 { margin: 0; font-size: 31px; font-weight: 500; letter-spacing: -.65px; }
.section-title-row span { color: #3c4043; font-size: 42px; font-weight: 300; }
.about-section > p { max-width: 620px; margin: 28px 0 0; color: var(--muted); font-size: 21px; line-height: 1.48; }

.category-row { display: flex; gap: 12px; margin-top: 34px; overflow: hidden; }

.category-row span {
  flex: 0 0 auto;
  padding: 11px 24px;
  border: 1.5px solid #5f6368;
  border-radius: 999px;
  color: #3c4043;
  font-size: 17px;
  font-weight: 600;
}

.detail-section {
  margin: 0 40px;
  padding: 28px 0 68px;
  border-top: 1px solid #e8eaed;
}

.compact-title-row h2 { font-size: 26px; }

.detail-section > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.dialog-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(32 33 36 / 44%);
  backdrop-filter: blur(2px);
}

.confirm-dialog {
  width: min(100%, 380px);
  padding: 32px 28px 26px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 20px 60px rgb(32 33 36 / 24%);
  text-align: center;
}

.confirm-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: #e6f4ea;
  color: var(--gp-green);
  font-size: 26px;
  font-weight: 700;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.confirm-dialog p {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.confirm-dialog button {
  min-width: 110px;
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--gp-green);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 520px) {
  .topbar { height: 64px; padding: 10px 14px; }
  .app-summary { grid-template-columns: 88px minmax(0, 1fr); gap: 18px; padding: 30px 24px 0; }
  .app-icon { width: 88px; height: 88px; border-radius: 20px; }
  .app-copy h1 { margin-bottom: 7px; font-size: 32px; }
  .developer { font-size: 17px; }
  .purchase-note { margin-top: 5px; font-size: 15px; }
  .store-stats { margin: 48px 14px 0; }
  .store-stat strong { font-size: 17px; }
  .store-stat > span { font-size: 12px; }
  .register-button { width: calc(100% - 48px); min-height: 52px; margin-top: 45px; font-size: 18px; }
  .media-section { margin-top: 42px; }
  .media-rail { grid-auto-columns: 86vw; gap: 12px; padding-inline: 24px; scroll-padding-inline: 24px; }
  .media-card { border-radius: 13px; }
  .swipe-hint { margin-inline: 24px; }
  .about-section { padding: 40px 24px 56px; }
  .section-title-row h2 { font-size: 27px; }
  .about-section > p { margin-top: 22px; font-size: 18px; }
  .detail-section { margin-inline: 24px; }
}

@media (min-width: 721px) {
  .store-canvas { margin-block: 24px; border-radius: 18px; }
}

[hidden] { display: none !important; }
