/* ============================================================
   ちいさな金庫 — 公開ページ共通スタイル
   デザイントークンはアプリ（docs-internal/design.md §4）と同じ
   外側は深い緑の扉、内側は生成り色の内張り
   ============================================================ */

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --ink: #1c2622;
  --ink-sub: #56625d;
  --accent: #1f5a48;
  --on-accent: #ffffff;
  --brass: #a8843a;
  --brass-text: #7a5e22;
  --door: #15302a;
  --on-door: #ede6d6;
  --border: #dcd6ca;
  --warn: #8a5a00;
  --radius: 20px;
  --maxw: 1040px;
  --rounded: ui-rounded, "SF Pro Rounded", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1412;
    --surface: #1a211e;
    --ink: #e9ede9;
    --ink-sub: #a2ada8;
    --accent: #6fc2a2;
    --on-accent: #0f1412;
    --brass: #d2ae5e;
    --brass-text: #d8b76a;
    --door: #0b1a16;
    --border: #2c3531;
    --warn: #f0b45a;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1412;
  --surface: #1a211e;
  --ink: #e9ede9;
  --ink-sub: #a2ada8;
  --accent: #6fc2a2;
  --on-accent: #0f1412;
  --brass: #d2ae5e;
  --brass-text: #d8b76a;
  --door: #0b1a16;
  --border: #2c3531;
  --warn: #f0b45a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a.inline { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

/* ---------- ナビ（扉の色） ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--door);
  color: var(--on-door);
  border-bottom: 1px solid rgba(168, 132, 58, 0.35);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--rounded); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links a { opacity: 0.78; }
.nav-links a:hover { opacity: 1; }
@media (max-width: 640px) { .nav-links a.hide-sm { display: none; } }

/* ---------- ヒーロー（扉） ---------- */
.hero {
  background: radial-gradient(120% 90% at 70% 20%, #1f4a3d 0%, var(--door) 60%);
  color: var(--on-door);
  padding: 56px 0 64px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 32px; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .eyebrow { font-family: var(--rounded); color: var(--brass); font-weight: 700; letter-spacing: 0.08em; font-size: 14px; }
.hero h1 { font-family: var(--rounded); font-size: clamp(30px, 5.4vw, 50px); font-weight: 700; line-height: 1.35; margin-top: 10px; }
.hero .lead { margin-top: 18px; font-size: clamp(15px, 2vw, 18px); opacity: 0.85; }
.promises { list-style: none; margin-top: 26px; display: grid; gap: 8px; }
.promises li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.promises .mark {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--brass); color: var(--brass);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 2px;
}
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--on-door); color: #15302a;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-family: var(--rounded);
}
.badge-soon small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1.2; }
.hero-note { font-size: 13px; opacity: 0.7; }
.hero-phone { display: flex; justify-content: center; }

.phone {
  width: min(300px, 78vw);
  border-radius: 44px;
  padding: 10px;
  background: #0b0f0d;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(168, 132, 58, 0.5);
}
.phone img { display: block; width: 100%; border-radius: 34px; }

/* ---------- セクション（内張り） ---------- */
.section { padding: 72px 0; }
.section-label {
  display: inline-block; font-family: var(--rounded); font-weight: 700; font-size: 13px;
  color: var(--brass-text); letter-spacing: 0.06em;
}
.section h2 { font-family: var(--rounded); font-size: clamp(24px, 3.6vw, 34px); line-height: 1.45; margin-top: 8px; }
.desc { color: var(--ink-sub); margin-top: 14px; font-size: 16px; }
.center { text-align: center; }
.narrow { max-width: 720px; margin: 0 auto; }

.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; margin-top: 72px; }
.feature.reverse > :first-child { order: 2; }
.feature-media { display: flex; justify-content: center; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 28px; margin-top: 56px; }
  .feature.reverse > :first-child { order: 0; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 32px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.card b { display: block; font-family: var(--rounded); font-size: 16px; }
.card span { display: block; color: var(--ink-sub); font-size: 14px; margin-top: 6px; }

.price-band { background: var(--door); color: var(--on-door); padding: 64px 0; }
.price-band h2 { font-family: var(--rounded); font-size: clamp(24px, 3.6vw, 34px); line-height: 1.45; }
.price-table { width: 100%; max-width: 640px; margin: 28px auto 0; border-collapse: collapse; font-size: 15px; }
.price-table th, .price-table td { padding: 12px 10px; border-bottom: 1px solid rgba(237, 230, 214, 0.18); text-align: left; }
.price-table th { font-weight: 500; opacity: 0.8; }
.price-table td { font-weight: 700; }
.price-note { max-width: 640px; margin: 18px auto 0; font-size: 14px; opacity: 0.8; }

/* ---------- 文書ページ ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 16px 80px; }
.doc h1 { font-family: var(--rounded); font-size: clamp(26px, 4vw, 34px); line-height: 1.4; }
.doc h2 { font-family: var(--rounded); font-size: 20px; margin-top: 36px; padding-top: 12px; border-top: 1px solid var(--border); }
.doc h3 { font-family: var(--rounded); font-size: 17px; margin-top: 26px; }
.doc p, .doc ul, .doc ol { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li { margin-top: 4px; }
.doc .updated { color: var(--ink-sub); font-size: 14px; margin-top: 6px; }
.doc .back-home { color: var(--accent); font-size: 14px; }
.callout {
  margin-top: 22px; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brass);
}
.callout.warn { border-left-color: var(--warn); }
.doc code { font-family: var(--mono); font-size: 0.9em; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 0 5px; overflow-wrap: anywhere; }
.doc pre {
  margin-top: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre;
}
.doc pre code { border: 0; padding: 0; background: none; font-size: inherit; }
.table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font-weight: 700; white-space: nowrap; }
details.faq { margin-top: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
details.faq summary { cursor: pointer; font-weight: 700; font-family: var(--rounded); }
details.faq p { color: var(--ink-sub); }

/* ---------- フッター ---------- */
.footer { background: var(--door); color: var(--on-door); padding: 28px 0; font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { opacity: 0.8; }
.footer-links a:hover { opacity: 1; }
