/* デザインコンセプト「リビングのアルバム」(docs/design-concept.md, SharedAlbum/App/Theme.swift)に合わせる。
   色・形は TodoCalendar のサイトとそろえる。柿色は使いすぎない。 */
:root {
  --paper: #faf7f2;
  --card: #ffffff;
  --ink: #2b2a28;
  --sub-ink: #8c877f;
  --rule: #e6e0d6;
  --accent: #e8743b;
  /* 紙の上で文字として読める柿色(コントラスト 3.5 以上)。 */
  --accent-text: #b9531f;
  /* 家族の色: 柿・藍・若竹・山吹・桜・藤 */
  --kaki: #e8743b;
  --ai: #3f6fb5;
  --wakatake: #4e9a6b;
  --yamabuki: #d99a1e;
  --sakura: #d96c8a;
  --fuji: #8a6cc4;
  --radius: 14px;
  --rounded: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1b1a;
    --card: #2a2826;
    --ink: #f2eee8;
    --sub-ink: #a39d94;
    --rule: #3a3733;
    --accent: #f08a55;
    --accent-text: #f08a55;
    --kaki: #f08a55;
    --ai: #6e95d6;
    --wakatake: #6db98a;
    --yamabuki: #ebb445;
    --sakura: #e88da6;
    --fuji: #a88edb;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "PingFang SC", "PingFang TC", "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans", sans-serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-text); text-underline-offset: 2px; }

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--ink);
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: url("icon.png") center / cover;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.9rem; }
.site-nav a {
  color: var(--sub-ink);
  text-decoration: none;
  padding: 2px 10px;
  border-radius: 999px;
}
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--card); font-weight: 600; }

.lang-select label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lang-select select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 12px;
}

/* 本文 */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 56px;
}

h1, h2, h3 { font-family: var(--rounded); line-height: 1.35; }
h1 { font-size: 2rem; margin: 0.8em 0 0.3em; }
h2 { font-size: 1.2rem; margin: 2.2em 0 0.6em; display: flex; align-items: center; gap: 10px; }
p, li, dd { color: var(--ink); }
.muted { color: var(--sub-ink); font-size: 0.9rem; font-family: var(--rounded); }

/* 見出しの頭に、アイコンと同じ角丸の四角(写真)。順に家族の色が変わる。 */
h2::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--dot, var(--kaki));
}
h2:nth-of-type(6n + 2) { --dot: var(--ai); }
h2:nth-of-type(6n + 3) { --dot: var(--wakatake); }
h2:nth-of-type(6n + 4) { --dot: var(--yamabuki); }
h2:nth-of-type(6n + 5) { --dot: var(--sakura); }
h2:nth-of-type(6n + 6) { --dot: var(--fuji); }

/* 規約やポリシーの本文は、紙に書いた1枚として読ませる。 */
section.l10n > p, section.l10n > ul { max-width: 68ch; }

/* よくある質問: 白いカードに、左に人の色の縦線。 */
.faq { margin: 0; }
.faq dt {
  font-family: var(--rounded);
  font-weight: 700;
  margin-top: 12px;
  padding: 14px 16px 2px 20px;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  border-left: 4px solid var(--line, var(--kaki));
}
.faq dd {
  margin: 0;
  padding: 2px 16px 14px 20px;
  background: var(--card);
  border-radius: 0 0 var(--radius) var(--radius);
  border-left: 4px solid var(--line, var(--kaki));
}
.faq dt:nth-of-type(6n + 2), .faq dd:nth-of-type(6n + 2) { --line: var(--ai); }
.faq dt:nth-of-type(6n + 3), .faq dd:nth-of-type(6n + 3) { --line: var(--wakatake); }
.faq dt:nth-of-type(6n + 4), .faq dd:nth-of-type(6n + 4) { --line: var(--yamabuki); }
.faq dt:nth-of-type(6n + 5), .faq dd:nth-of-type(6n + 5) { --line: var(--sakura); }
.faq dt:nth-of-type(6n + 6), .faq dd:nth-of-type(6n + 6) { --line: var(--fuji); }

/* お問い合わせのボタン。柿色はここぞという所だけ。 */
.button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--rounded);
  font-weight: 700;
  text-decoration: none;
}
.pending { color: var(--sub-ink); }

/* ===== トップページ(scripts/build_landing.py で作る) =====
   紙の上に、アイコンと同じ「写真の角丸の四角と、人の丸」を置く。画面は CSS で描いた iPhone で見せる。 */
.page-home main, .page-home .site-header .inner, .page-home .site-footer { max-width: 1040px; }
.page-home main { overflow-x: clip; }

.home .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 48px 0 32px;
}
/* 背景のにじみ(家族の色) */
.home .hero::before {
  content: "";
  position: absolute;
  inset: -40px -10vw -60px;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  background:
    radial-gradient(circle at 80% 28%, color-mix(in srgb, var(--kaki) 20%, transparent), transparent 40%),
    radial-gradient(circle at 95% 80%, color-mix(in srgb, var(--ai) 14%, transparent), transparent 36%),
    radial-gradient(circle at 55% 92%, color-mix(in srgb, var(--wakatake) 14%, transparent), transparent 32%);
}
.hero-brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 700 1.1rem/1 var(--rounded); }
.hero-brand img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 4px 14px rgb(43 42 40 / 0.14); }
.hero-tagline { margin: 18px 0 0; color: var(--accent-text); font: 700 0.95rem/1.4 var(--rounded); letter-spacing: 0.02em; }
.home .hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.3; text-wrap: balance; margin: 8px 0 16px; }
.home .lead { font-size: 1.05rem; color: var(--sub-ink); max-width: 30em; margin: 0 0 24px; }
.platform { margin: 10px 0 0; color: var(--sub-ink); font: 0.85rem/1.4 var(--rounded); }

/* CSS で描いた iPhone(ライブラリの画面と、アルバムのカード) */
.mock { position: relative; height: 540px; }
.mock-phone {
  position: absolute;
  right: 14%;
  top: 0;
  width: 260px;
  padding: 9px;
  border-radius: 46px;
  background: #1d1c1b;
  box-shadow: 0 24px 60px rgb(43 42 40 / 0.22), inset 0 0 0 2px #3a3835;
  transform: rotate(3deg);
}
.mock-screen { height: 520px; border-radius: 38px; background: #faf7f2; overflow: hidden; position: relative; padding: 40px 0 0; }
.mock-bar { display: flex; justify-content: space-between; align-items: baseline; padding: 0 14px 8px; }
.mock-title { font: 800 1.35rem/1 var(--rounded); color: #2b2a28; }
.mock-chip { font: 600 0.7rem/1 var(--rounded); color: #2b2a28; background: #fff; border-radius: 999px; padding: 5px 9px; }
.mock-date { padding: 4px 14px 6px; font: 700 0.75rem/1 var(--rounded); color: #2b2a28; }
.mock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.mock-grid i { aspect-ratio: 1; position: relative; background: var(--t1); }
.mock-grid i:nth-child(7n + 1) { --t1: linear-gradient(160deg, #f6c9a8, #e9a27a); }
.mock-grid i:nth-child(7n + 2) { --t1: linear-gradient(160deg, #b9cde9, #7f9fcf); }
.mock-grid i:nth-child(7n + 3) { --t1: linear-gradient(160deg, #cfe3cf, #8fbf9c); }
.mock-grid i:nth-child(7n + 4) { --t1: linear-gradient(160deg, #f3dfa6, #e0b555); }
.mock-grid i:nth-child(7n + 5) { --t1: linear-gradient(160deg, #f4cdd8, #e29ab0); }
.mock-grid i:nth-child(7n + 6) { --t1: linear-gradient(160deg, #ddd2f0, #ab97d6); }
.mock-grid i:nth-child(7n + 7) { --t1: linear-gradient(160deg, #e9e3d8, #c4b9a6); }
/* アルバムに入っている写真の印(柿の小さな丸) */
.mock-grid i.in::after { content: ""; position: absolute; left: 5px; bottom: 5px; width: 8px; height: 8px; border-radius: 50%; background: #e8743b; box-shadow: 0 0 0 1.5px #fff; }
/* 選んだ写真(柿の丸のチェック) */
.mock-grid i.sel::before { content: "✓"; position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 50%; background: #e8743b; color: #fff; font: 700 10px/16px var(--rounded); text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.mock-cta {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 999px;
  background: #e8743b;
  color: #fff;
  font: 700 0.8rem/1 var(--rounded);
  box-shadow: 0 6px 16px rgb(232 116 59 / 0.35);
}
.mock-album {
  position: absolute;
  left: 2%;
  bottom: 24px;
  width: 190px;
  padding: 10px 10px 12px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 44px rgb(43 42 40 / 0.18);
  transform: rotate(-5deg);
}
.mock-cover { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: 10px; overflow: hidden; }
.mock-cover i { aspect-ratio: 1; }
.mock-cover i:nth-child(1) { background: linear-gradient(160deg, #f6c9a8, #e9a27a); }
.mock-cover i:nth-child(2) { background: linear-gradient(160deg, #b9cde9, #7f9fcf); }
.mock-cover i:nth-child(3) { background: linear-gradient(160deg, #cfe3cf, #8fbf9c); }
.mock-cover i:nth-child(4) { background: linear-gradient(160deg, #f3dfa6, #e0b555); }
.mock-album-title { display: block; margin-top: 8px; font: 700 0.95rem/1.3 var(--rounded); color: var(--ink); }
.mock-album-meta { display: flex; align-items: center; gap: 6px; font: 600 0.78rem/1.3 var(--rounded); color: var(--sub-ink); }
.mock-people { display: inline-flex; }
.mock-people b { width: 16px; height: 16px; border-radius: 50%; margin-right: -4px; box-shadow: 0 0 0 1.5px var(--card); }
.mock-people b:nth-child(1) { background: var(--kaki); }
.mock-people b:nth-child(2) { background: var(--ai); }
.mock-people b:nth-child(3) { background: var(--wakatake); }

/* 各ブロック */
.block { margin: 88px 0 0; }
.block > h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin: 0 0 14px; display: block; }
.block > h2::before { display: none; }
.block > p { max-width: 40em; color: var(--sub-ink); font-size: 1.05rem; }
.kicker { margin: 0 0 6px; font: 700 0.9rem/1 var(--rounded); color: var(--accent-text); letter-spacing: 0.04em; }

/* 写真アプリとの違い: 2枚のカードを並べる */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.compare div { background: var(--card); border-radius: var(--radius); padding: 18px 20px; }
.compare strong { display: block; font-family: var(--rounded); margin-bottom: 4px; }
.compare p { margin: 0; color: var(--sub-ink); font-size: 0.95rem; }
.compare .after { box-shadow: inset 0 0 0 2px var(--accent); }
.compare .after strong { color: var(--accent-text); }

/* 使い方の3ステップ: 番号つきの丸 */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; background: var(--card); border-radius: var(--radius); padding: 18px 20px; color: var(--sub-ink); font-size: 0.95rem; }
.steps li::before {
  content: counter(step);
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--step, var(--kaki));
  color: #fff;
  font: 700 1rem/32px var(--rounded);
  text-align: center;
}
.steps li:nth-child(2) { --step: var(--ai); }
.steps li:nth-child(3) { --step: var(--wakatake); }
.steps strong { display: block; color: var(--ink); font-family: var(--rounded); font-size: 1rem; margin-bottom: 4px; }

/* 写真を送らない約束 */
.promise {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  background: var(--card);
  border-radius: 24px;
  padding: 28px;
}
.promise .lock { width: 64px; height: 64px; border-radius: 18px; background: color-mix(in srgb, var(--kaki) 16%, var(--card)); display: grid; place-items: center; }
.promise .lock svg { width: 30px; height: 30px; color: var(--accent); }
.promise h2 { margin: 0 0 6px; font-size: 1.3rem; display: block; }
.promise h2::before { display: none; }
.promise p { margin: 0; color: var(--sub-ink); }

/* 最後の入手ボタン */
.closing {
  margin: 96px 0 24px;
  padding: 56px 24px;
  text-align: center;
  border-radius: 32px;
  background: var(--card);
}
.closing img { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 8px 24px rgb(43 42 40 / 0.14); }
.closing-title { font: 700 clamp(1.3rem, 3vw, 1.8rem)/1.4 var(--rounded); margin: 20px 0 24px; text-wrap: balance; }
.mock { text-align: left; }

@media (max-width: 820px) {
  .home .hero { grid-template-columns: 1fr; text-align: center; padding-top: 28px; gap: 24px; }
  .home .lead { margin-left: auto; margin-right: auto; }
  .mock { height: 500px; max-width: 400px; width: 100%; margin: 0 auto; }
  .mock-phone { right: 4%; width: 240px; }
  .mock-screen { height: 480px; }
  .mock-album { width: 150px; left: 0; bottom: 70px; }
  .compare, .steps { grid-template-columns: 1fr; }
  /* 3ステップは、番号の丸を左に置いて詰める */
  .steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
  .steps li::before { grid-row: span 2; margin: 0; }
  .block { margin-top: 64px; }
  .promise { grid-template-columns: 1fr; justify-items: center; }
  .promise h2 { text-align: center; }
}

/* スマホではヘッダーを2段に(1段目: 名前と言語、2段目: ページ) */
@media (max-width: 600px) {
  .site-header .inner { gap: 4px 12px; padding: 8px 16px; }
  .lang-select { order: 2; }
  .site-nav { order: 3; width: 100%; margin-left: -10px; }
}

/* App Store の入手ボタン(公開前は「まもなく」) */
.get { min-height: 54px; }
/* Apple 公式のバッジは手を加えずに使う(高さ 40px 以上) */
.appstore-badge { display: inline-block; line-height: 0; }
.appstore-badge img { display: block; height: 54px; width: auto; }
.appstore {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1rem/1.2 var(--rounded);
  text-decoration: none;
}
.appstore.soon { background: var(--card); color: var(--sub-ink); border: 1px dashed var(--rule); }

/* 特長は白いカード。左に、家族の色の角丸の四角(写真)。 */
.features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.features li {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 16px 16px 52px;
  color: var(--sub-ink);
  font-size: 0.95rem;
}
.features li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 20px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--stamp, var(--kaki));
}
.features li:nth-child(6n + 2) { --stamp: var(--ai); }
.features li:nth-child(6n + 3) { --stamp: var(--wakatake); }
.features li:nth-child(6n + 4) { --stamp: var(--yamabuki); }
.features li:nth-child(6n + 5) { --stamp: var(--sakura); }
.features li:nth-child(6n + 6) { --stamp: var(--fuji); }
.features strong { display: block; font-family: var(--rounded); margin-bottom: 2px; color: var(--ink); font-size: 1rem; }

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  color: var(--sub-ink);
  font-size: 0.85rem;
  font-family: var(--rounded);
  border-top: 1px solid var(--rule);
}
