:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --text: #2A2520;
  --text-soft: #6E665E;
  --divider: #E8E2D8;
  --primary: #D88673;
  --primary-dark: #B96756;
  --brown: #8A7560;
  --max: 1080px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(138, 117, 96, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* 横スクロール帯がページ全体を横に広げないようにする保険 */
}
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brown);
}
.brand:hover { text-decoration: none; }
.brand-icon {
  width: 36px;
  height: auto;
}
.brand-word {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--brown);
}
.site-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}
.site-nav a { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 30%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 134, 115, 0.18), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.hero-title {
  font-size: 44px;
  line-height: 1.4;
  margin: 0 0 20px;
  color: var(--brown);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.hero-sub {
  font-size: 16px;
  margin: 0 0 32px;
  color: var(--text-soft);
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface);
  color: var(--brown);
  border: 1px solid var(--divider);
}
.btn-secondary:hover {
  text-decoration: none;
  border-color: var(--brown);
}

/* hero phone mockup (contains a dummy-data SVG, safe to publish) */
.hero-phone {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 580px;
}

/* phone の後ろにふわっと浮かぶ装飾カード */
.floating-card {
  position: absolute;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  z-index: 0;
}
.floating-card-1 {
  top: 60px;
  left: 4%;
  width: 180px;
  transform: rotate(-6deg);
}
.floating-card-2 {
  bottom: 80px;
  right: 4%;
  width: 170px;
  transform: rotate(5deg);
}
.floating-card-head {
  height: 30px;
  background: linear-gradient(120deg, #D88673, #E0A04A);
  border-radius: 8px;
  margin-bottom: 12px;
}
.floating-card-head.alt {
  background: linear-gradient(120deg, #4A90E2, #4CAF93);
}
.floating-card-bar {
  height: 9px;
  background: var(--divider);
  border-radius: 6px;
  margin: 8px 0;
}
.floating-card-bar.small { width: 60%; }
.phone { z-index: 1; }
/* Phone bezel + screen.
 * SVG mockup は 360x780 で aspect-ratio 0.4615。
 * 12px padding 込みで outer aspect ratio が同じになるよう調整した
 * 18.6 / 9 (=2.067) を採用。 これで `object-fit: contain` の縦方向
 * letterbox がなくなり、 ベゼルピッタリにスクリーンが収まる。 */
.phone {
  position: relative;
  width: 280px;
  aspect-ratio: 9 / 18.6;
  background: #1a1816;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 30px 60px -10px rgba(42, 37, 32, 0.35),
    0 12px 24px -8px rgba(42, 37, 32, 0.20),
    inset 0 0 0 2px rgba(255, 255, 255, 0.10),
    0 0 0 2px rgba(42, 37, 32, 0.10);
  overflow: hidden;
}
.phone img {
  width: 100%;
  height: 100%;
  /* contain で必ずスクショ全体を表示 (端末が縮んでも左右を切らない)。
   * 端末内寸とスクショの aspect は ほぼ一致するので余白はほぼ出ず、
   * 出ても背景 #FAF7F2 (= アプリ画面の地色) に馴染んで目立たない。 */
  object-fit: contain;
  border-radius: 32px;
  display: block;
  background: #FAF7F2;
}
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 22px;
  background: #1c1816;
  border-radius: 16px;
  z-index: 2;
}

/* ---------- Screens gallery ---------- */
.screens {
  padding: 80px 24px;
  overflow-x: clip;   /* 横スクロール帯がセクション幅を広げない (見出し/サブの中央化を守る) */
}
.screens-sub {
  max-width: 620px;
  margin: -16px auto 44px;
  text-align: center;
  color: var(--text-soft);
}
/* 5枚は2列・3列に割り切れず flex-wrap だと孤立カードが出る。
 * → 折り返さない 1 本の横スクロール帯にする。狭い画面はスワイプ、
 *   広い画面(全部収まる)では中央寄せ。これでどの幅でも崩れない。 */
.screens-scroller {
  max-width: 100%;              /* viewport を絶対に超えない外側スクロール枠 */
  overflow-x: auto;
  padding-bottom: 18px;
  scrollbar-width: none;        /* Firefox: スクロールバー非表示 */
  scroll-snap-type: x proximity;
}
.screens-scroller::-webkit-scrollbar { display: none; }  /* WebKit */
.screens-row {
  display: flex;
  gap: 22px;
  width: max-content;          /* 5枚の実幅。 収まれば中央、 狭ければ左寄せでスクロール */
  margin: 0 auto;
  padding-top: 4px;
}
.screen {
  flex: 0 0 auto;
  width: 200px;
  margin: 0;
  text-align: center;
  scroll-snap-align: center;
}
.screen img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  display: block;
  background: var(--bg);
  border: 1px solid var(--divider);
  box-shadow: 0 18px 40px -12px rgba(42, 37, 32, 0.28);
}
.screen figcaption {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Features ---------- */
.features {
  background: var(--surface);
  padding: 80px 24px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.section-title {
  max-width: var(--max);
  margin: 0 auto 40px;
  font-size: 28px;
  font-weight: 800;
  color: var(--brown);
  text-align: center;
  letter-spacing: 0.02em;
}
.feature-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
}
.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ---------- Download ---------- */
.download {
  max-width: 720px;
  margin: 0 auto 96px;
  padding: 0 24px;
  text-align: center;
}
.download-note {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 28px;
}
.download-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 22px;
  background: var(--text);
  color: #fff;
  border-radius: 12px;
  min-width: 180px;
}
.badge:hover { text-decoration: none; }
.badge-prefix {
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.15em;
}
.badge-text {
  font-size: 18px;
  font-weight: 700;
}
.badge.coming-soon {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px dashed var(--divider);
  cursor: not-allowed;
}
.badge.coming-soon:hover { text-decoration: none; }
.download-contact {
  font-size: 13px;
  color: var(--text-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding: 36px 24px 28px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brown);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
}
.brand-icon-sm {
  width: 24px;
  height: auto;
}
.footer-nav {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.footer-nav a { color: var(--text-soft); }
.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 96px;
}
.legal h1 {
  font-size: 30px;
  color: var(--brown);
  margin: 16px 0 8px;
}
.legal .updated {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.legal h2 {
  font-size: 18px;
  color: var(--text);
  margin: 32px 0 8px;
}
.legal p, .legal li {
  font-size: 14px;
  color: var(--text-soft);
}
.legal ul { padding-left: 22px; }
.legal a { color: var(--primary-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 32px 24px 64px;
  }
  .hero-phone { order: -1; min-height: 480px; }
  .phone { width: 230px; }
  .floating-card-1 { left: 0; top: 30px; width: 150px; }
  .floating-card-2 { right: 0; bottom: 60px; width: 140px; }
  .hero-title { font-size: 36px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  /* phone と装飾カードが重なりやすくなるサイズ帯ではカードを隠す */
  .floating-card { display: none; }
}
@media (max-width: 560px) {
  .site-nav { display: none; }
  .hero-phone { min-height: 460px; }
  .phone { width: 220px; }
  .hero-title { font-size: 30px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
}
