:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  color: #172033;
  background: #e7ebf3;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: #e7ebf3;
}

.page {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.7svh, 14px);
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  background: #f2f5fb;
}

.page-header {
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: .02em;
}

.version-note {
  margin: 4px 0 0;
  color: #5d6678;
  font-size: .92rem;
  font-weight: 650;
}

.promo {
  display: flex;
  align-items: center;
  min-height: clamp(96px, 18svh, 124px);
  padding: 16px 18px;
  color: #fff;
  text-decoration: none;
  border-radius: 24px;
  background: linear-gradient(135deg, #5f2eea, #b52fa4 52%, #e75b36);
  box-shadow: 0 8px 22px rgb(70 45 115 / 18%);
}

.promo-play {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  margin-right: 14px;
  place-items: center;
  border: 3px solid rgb(255 255 255 / 82%);
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
}

.promo-play svg {
  width: 28px;
  fill: currentColor;
}

.promo strong,
.promo small {
  display: block;
}

.promo strong {
  font-size: 1.42rem;
  line-height: 1.2;
}

.promo small {
  margin-top: 4px;
  font-size: .95rem;
  font-weight: 650;
}

.promo-arrow {
  margin-left: auto;
  padding-left: 8px;
  font-size: 2.4rem;
  line-height: 1;
}

.launcher {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(126px, 1fr));
  gap: 6px 10px;
  align-items: center;
}

.app {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #172033;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.app-icon {
  display: grid;
  width: clamp(60px, 19vw, 78px);
  aspect-ratio: 1;
  margin-bottom: 8px;
  overflow: hidden;
  place-items: center;
  border-radius: 22%;
  box-shadow: 0 5px 13px rgb(36 46 70 / 18%);
}

.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-icon--instagram {
  background: radial-gradient(circle at 30% 105%, #ffd600 0 24%, #ff7a00 38%, #ff0169 60%, #d300c5 76%, #7638fa 100%);
}

.app-icon--instagram img {
  width: 62%;
  height: 62%;
}

.app-icon--facebook {
  border-radius: 50%;
  background: #0866ff;
}

.app-icon--scameter {
  color: #fff;
  background: linear-gradient(145deg, #087f9c, #034b83);
}

.app-icon--scameter svg,
.app-icon--placeholder svg {
  width: 67%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-icon--scameter svg path:first-child {
  fill: rgb(255 255 255 / 12%);
}

.app-icon--placeholder {
  color: #526078;
  background: #dce2ec;
  box-shadow: none;
}

.app-name {
  max-width: 100%;
  font-size: clamp(.98rem, 4.2vw, 1.12rem);
  font-weight: 750;
  line-height: 1.18;
}

.coming-soon {
  margin-top: 4px;
  padding: 2px 7px;
  color: #4e586b;
  border-radius: 999px;
  background: #e1e5ec;
  font-size: .72rem;
  font-weight: 700;
}

.app--disabled {
  color: #4f596c;
}

a:focus-visible {
  outline: 4px solid #ffbf3f;
  outline-offset: 3px;
}

a:active {
  transform: scale(.97);
}

@media (max-height: 620px) {
  .page {
    gap: 7px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .version-note {
    margin-top: 1px;
    font-size: .82rem;
  }

  .promo {
    min-height: 84px;
    padding: 11px 15px;
  }

  .promo-play {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .promo strong {
    font-size: 1.2rem;
  }

  .launcher {
    grid-template-rows: repeat(2, minmax(116px, 1fr));
  }

  .app-icon {
    width: 58px;
    margin-bottom: 5px;
  }

  .app-name {
    font-size: .9rem;
  }

  .coming-soon {
    margin-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  a:active {
    transform: none;
  }
}
