/* くらしメモ 紹介サイト。色はアプリのベースカラー（青）にそろえる */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #1c2233;
  --muted: #5d6679;
  --line: #dfe5ef;
  --accent: #3d7bf0;
  --accent-2: #7b6cf0;
  --accent-soft: #e4ecfd;
  --sat: #2f6fe0;
  --sun: #e0405a;
  --shadow: 0 10px 30px rgba(40, 70, 130, 0.10);
  --radius: 18px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #10131a;
    --surface: #181c26;
    --surface-2: #1f2431;
    --text: #e8ecf4;
    --muted: #a0a8b9;
    --line: #2b3242;
    --accent: #6c9bff;
    --accent-2: #a597ff;
    --accent-soft: #1e2a45;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 見出しの帯 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  /* 名前は縮めず折り返さない。狭い画面でも「くらしメモ」が縦に割れないように */
  flex-shrink: 0;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.wordmark {
  /* 名前は和文。Josefin Sans には仮名が無いので和文の書体で描く */
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.wordmark span {
  color: var(--muted);
  opacity: 0.55;
}

.nav {
  display: flex;
  gap: 4px;
  /* 横に流す。縮められないと中身の幅でページごと横にはみ出す */
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- 冒頭 ---------- */
.hero {
  padding: 72px 0 40px;
  text-align: center;
  background:
    radial-gradient(60% 50% at 20% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent),
    radial-gradient(50% 40% at 85% 10%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent);
}

.hero .app-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: 0.06em;
}

.hero h1 span {
  color: var(--muted);
  opacity: 0.45;
}

.hero .lead {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text);
  margin: 0 auto 10px;
  max-width: 640px;
  font-weight: 500;
}

.hero .sub {
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 620px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}

.badge {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

.hero-image {
  /* iPad の画面をそのまま撮った画像に、黒い縁を付けて端末らしく見せる */
  max-width: 900px;
  padding: clamp(8px, 1.6vw, 16px);
  margin: 0 auto;
  border-radius: clamp(18px, 3vw, 32px);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1b1d22;
}

.hero-image img {
  border-radius: clamp(10px, 1.6vw, 18px);
}

/* ---------- 見本データの案内 ---------- */
.welcome {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 8px;
}

.welcome img {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}

@media (max-width: 720px) {
  .welcome {
    grid-template-columns: 1fr;
  }
  .welcome figure {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ---------- ホーム画面のウィジェット ---------- */
.widget-stage {
  /* ホーム画面の壁紙に見立てた地に、3 つの大きさを並べる。幅の比は実物どおり（小は中の半分弱） */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 28px 24px;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 36px);
  border-radius: clamp(18px, 3vw, 32px);
  background:
    radial-gradient(120% 90% at 0% 0%, #c9a679 0%, transparent 55%),
    radial-gradient(110% 100% at 100% 100%, #2b2f3a 0%, transparent 60%),
    linear-gradient(135deg, #8a7158 0%, #4a4651 55%, #262a33 100%);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.widget-stage figure {
  margin: 0;
  text-align: center;
}

.widget-stage img {
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.widget-stage figcaption {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  margin-top: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.widget-small {
  width: 150px;
}

.widget-medium,
.widget-large {
  width: 320px;
}

.widget-notes {
  /* 説明は 4 枚なので 2 × 2 に（3 列だと 1 枚だけ下に余る） */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 4px;
}

@media (max-width: 640px) {
  .widget-small {
    width: 42%;
  }
  .widget-medium,
  .widget-large {
    width: 100%;
  }
  .widget-notes {
    grid-template-columns: 1fr;
  }
  .widget-stage img {
    border-radius: 18px;
  }
}

/* ---------- サポート ---------- */
.support-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.support-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

section.alt .support-link {
  background: var(--bg);
}

.support-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.support-link .emoji {
  font-size: 28px;
}

.support-link strong {
  display: block;
  color: var(--accent);
}

.support-sub {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .support-links {
    grid-template-columns: 1fr;
  }
}

/* ---------- 節 ---------- */
section {
  padding: 72px 0;
}

section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

h2 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.4;
  margin: 0 0 14px;
}

.section-lead {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 36px;
}

h3 {
  font-size: 18px;
  margin: 0 0 6px;
  line-height: 1.5;
}

/* ---------- 特徴のカード ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}

section.alt .card {
  background: var(--bg);
}

.card .emoji {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- 画面の並び ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.screens figure {
  margin: 0;
  text-align: center;
}

.screens img {
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}

.screens figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

/* ---------- 使い方の手順 ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.steps li::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.howto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.tips {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.tips h3 {
  margin-bottom: 8px;
}

.tips ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 15px;
}

.tips li + li {
  margin-top: 6px;
}

/* ---------- データ・AI ---------- */
.data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.data-grid .card ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 15px;
}

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

/* ---------- 拡張機能 ---------- */
.tag {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  text-decoration: none;
}

.pricing {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--accent-2) 14%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--line));
}

.pricing-icon {
  font-size: 34px;
  line-height: 1;
}

.pricing p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.ext-enable {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
}

.ext-enable ol {
  margin: 0 0 18px;
  padding-left: 1.3em;
  color: var(--muted);
  font-size: 15px;
}

.ext-enable li + li {
  margin-top: 6px;
}

.tabbar {
  margin: 0;
}

.tabbar img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.tabbar figcaption,
.shot-row figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.shot-row.two {
  grid-template-columns: repeat(2, 1fr);
  margin: 6px 0 14px;
}

.shot-row figure {
  margin: 0;
}

.shot-row img {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}

.ext-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card.ext .ext-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}

.card.ext .ext-head .emoji {
  margin: 0;
  font-size: 34px;
}

.card.ext .ext-head h3 {
  margin: 0;
  font-size: 20px;
}

.card.ext .ext-sub {
  font-size: 14px;
}

.card.ext ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 15px;
}

.card.ext li + li {
  margin-top: 8px;
}

.card.ext strong {
  color: var(--text);
}

/* ---------- 文書（プライバシーポリシー・お問い合わせ） ---------- */
.doc {
  padding: 56px 0 80px;
}

.doc .wrap {
  max-width: 820px;
}

.doc h1 {
  font-size: clamp(28px, 4.4vw, 38px);
  margin: 0 0 8px;
  line-height: 1.4;
}

.doc .meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 32px;
}

.doc h2 {
  font-size: 21px;
  margin: 40px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.doc p,
.doc li {
  font-size: 15.5px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 12px 0;
  display: block;
  overflow-x: auto;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.doc th {
  background: var(--surface-2);
  white-space: nowrap;
}

.doc .summary {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.doc .summary ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
}

/* お問い合わせ */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin: 24px 0;
}

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}

button.button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* お問い合わせのフォーム */
.contact-form {
  margin-top: 20px;
}

.field {
  margin-bottom: 16px;
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.field .req,
.field .opt {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.field .req {
  color: #fff;
  background: var(--sun);
}

.field .opt {
  color: var(--muted);
  background: var(--surface-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* iPhone で 16px 未満だと入力のたびに拡大される */
  line-height: 1.6;
}

.field textarea {
  min-height: 170px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field [aria-invalid='true'] {
  border-color: var(--sun);
}

.field-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

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

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* 機械よけの欄。画面の外に出す（display: none だと見抜かれやすい） */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 4px;
}

.form-result {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
}

.form-result.ok {
  color: var(--accent);
  background: var(--accent-soft);
}

.form-result.ng {
  color: var(--sun);
  background: color-mix(in srgb, var(--sun) 12%, transparent);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-hint.ok {
  color: var(--accent);
  font-weight: 700;
}

.form-hint.ng {
  color: var(--sun);
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* ---------- 足 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- 狭い画面 ---------- */
@media (max-width: 860px) {
  .screens {
    grid-template-columns: repeat(5, 62%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .screens figure {
    scroll-snap-align: center;
  }

  .howto-grid,
  .data-grid,
  .ext-grid,
  .ext-enable {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header .nav .wide-only {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  section {
    padding: 56px 0;
  }

  .wrap {
    padding: 0 16px;
  }
}

/* ---------- Mac 版 ---------- */
/* Mac の窓の写真。上に信号機の帯を付けて、窓らしく見せる */
.mac-window {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.mac-window::before {
  content: '';
  display: block;
  height: 22px;
  background:
    radial-gradient(circle at 14px 11px, #ff5f57 5px, transparent 5.5px),
    radial-gradient(circle at 32px 11px, #febc2e 5px, transparent 5.5px),
    radial-gradient(circle at 50px 11px, #28c840 5px, transparent 5.5px),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.hero-mac {
  max-width: 960px;
  margin: 0 auto;
}

/* 横長の写真は 2 列。狭い画面では 1 列 */
.screens.wide {
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.screens.wide img,
.shot-row.wide img {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shot-row.wide {
  grid-template-columns: 1fr;
}

@media (max-width: 720px) {
  .screens.wide {
    grid-template-columns: 1fr;
  }
}

/* 入っていない機能の一覧 */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.diff-grid .card ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 720px) {
  .diff-grid {
    grid-template-columns: 1fr;
  }
}

/* ダウンロードの帯 */
.download {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 8px;
}

.requirements {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.85em;
  line-height: 1.6;
  text-align: center;
}

/* ダウンロードのボタン */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin: 26px 0 12px;
}

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

.download-cta {
  margin: 20px 0;
}
