:root {
  color-scheme: dark;
  --background: #0f1015;
  --surface: #191a21;
  --text: #f6f4f1;
  --muted: #aaa8b2;
  --accent: #eda03d;
  --border: #2e3039;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 70% 5%, #282018 0, transparent 30rem),
    var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.65;
}

main {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.lang-switch {
  margin: -40px 0 24px;
  text-align: right;
  font-size: 0.9rem;
}

.lang-switch a { color: var(--muted); }
.lang-switch a:hover { color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 56px;
}

/*
  先頭の画像。広い幅はバナー（hero-banner.webp）、狭い幅はアイコン。切り替えは<picture>の<source media>で、
  下の`max-width: 640px`と対にしてある。HTMLでは文章の後ろにあるので、orderで先頭に出す。
  背景が純黒で、ページの背景より暗いので、枠で囲む。
  hero-banner.webp は、app-store-assets/app_store_header_3840x1646.png（元画像は変えていない）から作った
  派生：黒レベルを6にして暗がりを純黒にそろえ（元画像は中央の背景が3前後、両端が0で、縦の帯が見える）、
  表示幅880pxの2倍の1760x754へ縮め、WebPのquality 90にした（2.3MB→約15KB）。
*/
.hero-visual { order: -1; }
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 1760 / 754;
  border: 1px solid var(--border);
  border-radius: 18px;
}

/* 広い幅では、名前・キャッチを左、ストアバッジ・リンクを右に置いて、バナーの下を縦に積み上げすぎない */
@media (min-width: 821px) {
  .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 40px;
    row-gap: 12px;
    align-items: center;
  }
  .hero-copy h1 { grid-area: 1 / 1; }
  .hero-copy .tagline { grid-area: 2 / 1; }
  .hero-copy .actions { margin-top: 0; justify-content: flex-end; }
  .hero-copy .actions.badges { grid-area: 1 / 2; }
  .hero-copy .actions:not(.badges) { grid-area: 2 / 2; }
}

h1, h2 { line-height: 1.2; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.75rem); }
h2 { margin: 0 0 16px; font-size: 1.35rem; }
p { margin: 0 0 16px; }
.tagline { margin: 10px 0 0; color: var(--muted); font-size: 1.15rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}

.button.primary { border-color: var(--accent); color: var(--accent); }
.button:hover { border-color: var(--accent); }

.actions.badges { align-items: center; }
.actions.badges img { display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgb(25 26 33 / 85%);
}

ul { margin: 0; padding-left: 1.25rem; }
li + li { margin-top: 8px; }

.screenshots { margin-top: 56px; }

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shots li + li { margin-top: 0; }

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { color: var(--muted); }

@media (max-width: 640px) {
  main { padding-top: 40px; }
  .lang-switch { margin-top: -16px; }
  .hero { gap: 20px; text-align: center; }
  /* 狭い幅では、アイコンを96pxで置く（Solo + Usの紹介ページと揃える） */
  .hero-visual img { width: 96px; height: 96px; aspect-ratio: 1; border: 0; border-radius: 22px; box-shadow: 0 8px 24px rgb(0 0 0 / 38%); margin: 0 auto; }
  .actions { justify-content: center; }
  .grid { grid-template-columns: 1fr; }
  .shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 70%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .shots li { scroll-snap-align: start; }
}
