* {
  box-sizing: border-box;
}

:root {
  --page-max: 430px;
  --page-pad: clamp(12px, 4vw, 18px);
  --safe-bottom: max(24px, env(safe-area-inset-bottom));
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f2f2f2;
  color: #000;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  border: 0;
  appearance: none;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.top-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--page-max));
  min-width: 0;
  height: clamp(46px, 12vw, 52px);
  margin: 0 auto;
  padding: 8px var(--page-pad);
  background: #fff;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand img {
  width: clamp(30px, 8vw, 36px);
  height: clamp(30px, 8vw, 36px);
  border-radius: 6px;
}

.brand strong {
  min-width: 0;
  color: #21201e;
  font-size: clamp(19px, 5.3vw, 23px);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #010101;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.store-btn img {
  flex: 0 0 auto;
}

.store-btn.small {
  flex: 0 0 auto;
  min-width: clamp(96px, 25vw, 108px);
  height: clamp(32px, 8.5vw, 36px);
  padding: 5px 9px;
  gap: 4px;
  border-radius: 4px;
}

.store-btn.small img {
  width: 16px;
  height: 16px;
}

.store-btn.small span,
.store-btn.small b {
  display: block;
  font-weight: 700;
  line-height: 1;
}

.store-btn.small span {
  font-size: 9px;
}

.store-btn.small b {
  margin-top: -1px;
  font-size: 12px;
}

.contents {
  width: min(100%, var(--page-max));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(46px, 12vw, 52px) 0 calc(104px + var(--safe-bottom));
  background: #fff;
}

.download-hero {
  display: block;
  width: 100%;
  cursor: pointer;
}

.download-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 6vw, 26px);
  padding: clamp(34px, 10vw, 44px) var(--page-pad) 0;
}

h1 {
  width: min(100%, 360px);
  max-width: 100%;
  margin: 0;
  color: #000;
  text-align: center;
  font-size: clamp(24px, 7.4vw, 31px);
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  width: min(100%, 360px);
  max-width: 100%;
  margin: 6px 0 -2px;
  color: #000;
  text-align: center;
  font-size: clamp(23px, 7vw, 30px);
  font-weight: 700;
  line-height: 1.1;
}

.cert-card,
.game-card {
  width: min(100%, 360px);
  max-width: 100%;
  padding: clamp(14px, 4vw, 18px);
  border-radius: 8px;
  background: #e4f4ff;
  cursor: pointer;
}

.cert-imgs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(10px, 3.5vw, 16px);
  margin-bottom: 16px;
  overflow: hidden;
}

.cert-imgs img:nth-child(1) {
  width: min(29%, 104px);
}

.cert-imgs img:nth-child(2) {
  width: min(20%, 72px);
}

.cert-imgs img:nth-child(3) {
  width: min(21%, 76px);
}

.cert-card p,
.cert-card span,
.game-card p,
.game-card span {
  display: block;
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
  text-align: center;
  font-size: clamp(14px, 4.1vw, 16px);
  font-weight: 500;
  line-height: 1.5;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.game-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: clamp(14px, 4vw, 18px) clamp(18px, 6vw, 26px);
  width: 100%;
}

.game-logos img:nth-child(1) {
  width: min(25%, 82px);
}

.game-logos img:nth-child(2) {
  width: min(33%, 110px);
}

.game-logos img:nth-child(3) {
  width: min(22%, 72px);
}

.game-logos img:nth-child(4) {
  width: min(55%, 184px);
}

.game-logos img:nth-child(5) {
  width: min(28%, 92px);
}

.legal {
  width: min(100%, 360px);
  max-width: 100%;
  color: rgba(0, 0, 0, 0.7);
  text-align: left;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 500;
  line-height: 1.5;
}

.legal p {
  margin: 0 0 16px;
}

.store-btn.fixed {
  position: fixed;
  right: 0;
  bottom: var(--safe-bottom);
  left: 0;
  z-index: 25;
  width: min(56vw, 225px);
  min-width: 200px;
  height: clamp(52px, 14vw, 58px);
  margin: auto;
  gap: 12px;
  border-radius: 8px;
}

.store-btn.fixed img {
  width: 32px;
  height: 32px;
}

.store-btn.fixed span,
.store-btn.fixed b {
  display: block;
  font-weight: 700;
  line-height: 1.1;
}

.store-btn.fixed span {
  font-size: 10px;
}

.store-btn.fixed b {
  font-size: 20px;
}

.modal {
  visibility: hidden;
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal.visible {
  visibility: visible;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: absolute;
  inset: 0;
  width: min(calc(100vw - 48px), 327px);
  height: auto;
  aspect-ratio: 327 / 240;
  margin: auto;
  border-radius: 16px;
  background: url("assets/modal-bg-mx.png?v=200") center / cover no-repeat;
}

.modal-hit {
  position: absolute;
  left: 4.9%;
  right: 4.9%;
  top: 76.7%;
  height: 16.7%;
  color: transparent;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  left: 50%;
  bottom: -40px;
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  cursor: pointer;
}

@media (max-width: 340px) {
  .brand strong {
    font-size: 18px;
  }

  .store-btn.small {
    min-width: 88px;
    padding-inline: 7px;
  }

  .store-btn.small span {
    font-size: 8px;
  }

  .store-btn.small b {
    font-size: 11px;
  }
}
