:root {
  --bg: #ffffff;
  --fg: #1a1c1e;
  --muted: #5b6168;
  --border: #e2e5e9;
  --link: #1b6fd4;
  --card: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --fg: #e6e8ea;
    --muted: #a2a9b0;
    --border: #2c3035;
    --link: #7db4f5;
    --card: #1e2126;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.8;
  font-size: 16px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

header.site {
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

header.site .wrap {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

header.site .title {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
}

header.site nav {
  margin-left: auto;
  display: flex;
  gap: 16px;
  font-size: 14px;
}

h1 {
  font-size: 28px;
  line-height: 1.4;
  margin: 0 0 8px;
}

h2 {
  font-size: 20px;
  line-height: 1.5;
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 17px;
  margin: 28px 0 8px;
}

p, ul, ol { margin: 0 0 16px; }

ul, ol { padding-left: 1.4em; }

li { margin-bottom: 6px; }

a { color: var(--link); }

.updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.lead {
  font-size: 17px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 24px;
}

.card p:last-child, .card ul:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 15px;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th { background: var(--card); font-weight: 600; }

.table-scroll { overflow-x: auto; }

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

footer.site nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 32px;
}

/* --- トップページ（index.html）専用 --- */

/* .wrap の下 80px はセクションの区切りには広すぎるので、ヒーローだけ詰める */
.hero {
  padding-bottom: 8px;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

/* 読点の途中で折れないように、意味の切れ目で折り返させる */
.hero h1 span {
  display: inline-block;
}

.hero .lead {
  color: var(--muted);
  margin-bottom: 28px;
}

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

/* .buttons（flex）の中身。テキストのボタンで作っている。
   公式のストアバッジ画像に差し替えるときはここごと入れ替える。 */
.buttons a {
  display: block;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
}

.buttons a span {
  display: block;
  font-size: 13px;
  font-weight: 400;
}

/* 塗りのボタン。--link は明暗で入れ替わるので、文字色は --bg 側に合わせる */
.buttons a.primary {
  background: var(--link);
  border-color: var(--link);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .buttons a.primary { color: #16181b; }
}

/* スクリーンショットは横スクロール。.wrap の外に置いて画面端まで使う。
   狭い画面では 2 枚目が少し覗く幅にして、横に続くことを見せる。 */
.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 20px 32px;
  max-width: 720px;
  margin: 0 auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shots img {
  /* 720 - 左右の padding 40 = 680。1 画面に 3 枚見える幅（gap 16×2 込み）。
     写真は 5 枚あるので、残りは .shots の横スクロールで送る */
  width: 216px;
  height: auto;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  scroll-snap-align: start;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 26px; }
  .buttons a { flex: 1 1 100%; text-align: center; }
  .shots img { width: min(62vw, 260px); }
}
