/* ============================================================
   シール通帳 — 配布サイト共通スタイル
   トークンはアプリの DesignSystem/Tokens.swift（design.md §2-1）に合わせる。
   ライト＝ミントブルーの紙、ダーク＝夜の青緑。ぶどうは操作と「譲」の印、
   ミントは「入」、いちごは「求」、レモンは「交換中」の意味だけに使う。
   モチーフは通帳（入・出・残高の罫、ミシン目、地紋、ドット印字）。ハンコは使わない。
   ============================================================ */

:root {
  --page: #e4f2f4;         /* ミントブルーの紙 */
  --surface: #ffffff;
  --surface2: #d6e9ec;
  --ink: #1a2a2e;
  --ink-sub: #4a5e63;
  --line: #c8dfe3;
  --line-strong: #6a8288;
  --perf: #b0cfd4;         /* ミシン目 */
  --grape: #76359f;        /* ぶどう（tint） */
  --on-grape: #ffffff;
  --grape-soft: #f0e5f8;
  --soda: #0b6645;         /* 入 */
  --ichigo: #b02a57;       /* 求 */
  --lemon: #f4c542;        /* 交換中 */
  --on-lemon: #1a2a2e;
  --lemon-text: #805300;
  --shadow: 0 1px 3px rgba(0, 0, 0, .05);
  --phone-shadow: 0 20px 48px rgba(26, 42, 46, .16);
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='14' viewBox='0 0 72 14'%3E%3Cpath d='M0 7 Q18 1 36 7 T72 7' fill='none' stroke='%23d2e7ea' stroke-width='1'/%3E%3C/svg%3E");
  --radius: 16px;
  --maxw: 1040px;
  --maru: "Hiragino Maru Gothic ProN", "ヒラギノ丸ゴ ProN W4", "Zen Maru Gothic", sans-serif;
  --gothic: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Zen Maru Gothic", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a181c;       /* 夜の青緑 */
    --surface: #14252a;
    --surface2: #1e3338;
    --ink: #e6f2f4;
    --ink-sub: #a3bcc1;
    --line: #284045;
    --line-strong: #6c8a91;
    --perf: #37555c;
    --grape: #dbadfd;
    --on-grape: #0a181c;
    --grape-soft: #3e2749;
    --soda: #6fd8b2;
    --ichigo: #ff93b4;
    --lemon-text: #f6cf5e;
    --shadow: none;
    --phone-shadow: 0 20px 48px rgba(0, 0, 0, .5);
    --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='14' viewBox='0 0 72 14'%3E%3Cpath d='M0 7 Q18 1 36 7 T72 7' fill='none' stroke='%23172c31' stroke-width='1'/%3E%3C/svg%3E");
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--gothic);
  color: var(--ink);
  background: var(--page);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- ドット印字（assets/site.js が .dm を 5×7 の点の SVG に置き換える） ---------- */
.dm { font-family: var(--rounded); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .02em; }
.dm svg { display: inline-block; height: .78em; width: auto; vertical-align: baseline; overflow: visible; }

/* ---------- ミシン目・地紋 ---------- */
.perf {
  height: 12px;
  background: radial-gradient(circle, var(--perf) 2.2px, transparent 2.7px) 0 50% / 12px 12px repeat-x;
}
.wave-bg { background-color: var(--page); background-image: var(--wave); background-size: 72px 14px; }

/* ---------- ナビ ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.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(--maru); font-size: 18px; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; gap: 20px; font-size: 14px; color: var(--ink-sub); }
.nav-links a:hover { color: var(--grape); }
@media (max-width: 560px) { .nav-links { gap: 14px; font-size: 13px; } .nav-links .hide-sm { display: none; } }

/* ---------- ヒーロー ---------- */
.hero { padding: 64px 0 80px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-sub); letter-spacing: .06em; }
.eyebrow .dm { color: var(--ink-sub); font-size: 15px; }
.eyebrow .rule { width: 1px; height: 16px; background: var(--line-strong); opacity: .5; }
.hero h1 { font-family: var(--maru); font-weight: 400; font-size: clamp(34px, 6vw, 54px); line-height: 1.4; margin: 16px 0 14px; }
.hero .second { font-family: var(--maru); font-size: clamp(20px, 3vw, 26px); color: var(--grape); margin-bottom: 18px; line-height: 1.5; }
.hero .lead { color: var(--ink-sub); font-size: 16.5px; max-width: 31em; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 30px; }
.tag { font-size: 13px; padding: 4px 12px; background: var(--surface2); border-radius: 999px; color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--page);
  padding: 10px 20px; border-radius: 12px; font-weight: 600; line-height: 1.2;
}
.badge-soon small { display: block; font-size: 11px; font-weight: 500; opacity: .72; }
.badge-soon svg { width: 20px; height: 24px; }
.hero-note { font-size: 13px; color: var(--ink-sub); }

.hero-visual { position: relative; padding-bottom: 36px; }
.phone {
  width: 100%; max-width: 290px; margin: 0 auto;
  border-radius: 40px; overflow: hidden;
  border: 2px solid var(--line);
  box-shadow: var(--phone-shadow);
  background: var(--surface);
}
.row-card {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-62%);
  width: min(340px, 92%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26, 42, 46, .12);
  padding: 10px 14px 12px;
  font-size: 13px;
}
.row-card .label { font-size: 11px; color: var(--ink-sub); }
.row-card .line1 { display: flex; align-items: baseline; gap: 10px; font-family: var(--rounded); }
.row-card .line1 .dm.date { color: var(--ink-sub); font-size: 16px; }
.row-card .line1 .memo { flex: 1; color: var(--ink); }
.row-card .line2 { display: flex; justify-content: flex-end; gap: 14px; margin-top: 2px; align-items: baseline; }
.row-card .in { color: var(--soda); font-size: 16px; }
.row-card .out { color: var(--ink); font-size: 16px; }
.row-card .bal { color: var(--grape); font-size: 22px; }
.row-card .unit { font-size: 11px; color: var(--ink-sub); margin-right: 2px; }
@media (max-width: 820px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .row-card { transform: translateX(-50%); }
}

/* ---------- セクション ---------- */
.section { padding: 88px 0; }
.section-label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-sub); letter-spacing: .04em; }
.section-label .dm { color: var(--grape); font-size: 18px; }
.section-label .rule { width: 1px; height: 16px; background: var(--line-strong); opacity: .5; }
h2 { font-family: var(--maru); font-weight: 400; font-size: clamp(24px, 4vw, 34px); line-height: 1.5; margin: 10px 0 16px; }
h1, h2 { word-break: keep-all; overflow-wrap: anywhere; }  /* 見出しは <wbr> と句読点の位置でだけ折り返す */
.desc { color: var(--ink-sub); font-size: 16px; }
.center { text-align: center; }
.intro { max-width: 680px; margin: 0 auto 40px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 48px 0; position: relative; }
.feature + .feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; transform: translateY(-6px);
  background: radial-gradient(circle, var(--perf) 2.2px, transparent 2.7px) 0 50% / 12px 12px repeat-x;
}
.feature .phone { max-width: 262px; }
.feature .note { margin-top: 14px; font-size: 13.5px; color: var(--ink-sub); }
.feature .note b { color: var(--ink); font-weight: 600; }
@media (max-width: 820px) {
  .section { padding: 60px 0; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 28px; }
  .feature.reverse > :first-child { order: 2; }  /* 狭い画面では、どの機能も文 → 画面の順に積む */
}

/* 印（アプリのセルの印と同じ語） */
.marks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mark { font-family: var(--rounded); font-weight: 700; font-size: 13px; padding: 3px 11px; border-radius: 999px; border: 1.5px solid transparent; }
.mark.give { background: var(--grape); color: var(--on-grape); }
.mark.want { color: var(--ichigo); border-color: var(--ichigo); background: var(--surface); }
.mark.trading { background: var(--lemon); color: var(--on-lemon); }
.mark.count { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* ---------- 通帳の表（データの置き場所・無料とPlus） ---------- */
.ledger {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden; text-align: left;
}
.ledger-head, .ledger-row { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; padding: 12px 18px; align-items: baseline; }
.ledger-head { font-size: 12px; color: var(--ink-sub); border-bottom: 1px solid var(--line); background: var(--surface2); }
.ledger-row + .ledger-row { border-top: 1px dashed var(--line); }
.ledger-row .dm { color: var(--ink-sub); font-size: 15px; }
.ledger-row .memo b { display: block; font-weight: 600; }
.ledger-row .memo span { font-size: 13.5px; color: var(--ink-sub); }
.ledger-row .val { font-family: var(--rounded); font-weight: 700; color: var(--soda); white-space: nowrap; font-size: 15px; }
.ledger-row .val.none { color: var(--ink); }
@media (max-width: 520px) {
  .ledger-head, .ledger-row { grid-template-columns: 58px 1fr; }
  .ledger-head > :last-child { display: none; }
  .ledger-row .val { grid-column: 2; }
}

.data-band { padding: 80px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.data-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .data-grid { grid-template-columns: 1fr; gap: 28px; } .data-band { padding: 60px 0; } }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; text-align: left; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 20px; box-shadow: var(--shadow); }
.plan.plus { border-color: var(--grape); }
.plan h3 { font-family: var(--maru); font-size: 22px; font-weight: 400; }
.plan .price { font-family: var(--rounded); color: var(--ink-sub); font-size: 13.5px; margin-bottom: 8px; }
.plan .price strong { color: var(--grape); font-size: 20px; }
.plan ul { list-style: none; }
.plan li { padding: 7px 0 7px 26px; position: relative; font-size: 15px; }
.plan li + li { border-top: 1px dashed var(--line); }
.plan li::before {
  content: "+"; position: absolute; left: 2px; top: 7px;
  font-family: var(--rounded); font-weight: 700; color: var(--soda);
}
@media (max-width: 680px) { .plans { grid-template-columns: 1fr; } }

.disclaimer { font-size: 13px; color: var(--ink-sub); max-width: 640px; margin: 28px auto 0; }

/* ---------- CTA ---------- */
.cta { padding: 80px 0 88px; text-align: center; }
.cta .icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.cta .cta-row { justify-content: center; margin-top: 24px; }

/* ---------- 文書ページ ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 44px 20px 88px; }
.doc-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 36px 46px; box-shadow: var(--shadow); position: relative; }
.doc-sheet::before {
  content: ""; position: absolute; left: 10px; top: 20px; bottom: 20px; width: 12px;
  background: radial-gradient(circle, var(--perf) 2.2px, transparent 2.7px) 50% 0 / 12px 14px repeat-y;
}
.doc h1 { font-family: var(--maru); font-weight: 400; font-size: clamp(28px, 5vw, 34px); margin: 0 0 6px; }
.doc h2 { font-family: var(--gothic); font-weight: 700; font-size: 19px; margin: 36px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc h3 { font-weight: 700; font-size: 16.5px; margin: 26px 0 6px; }
.doc p, .doc li { font-size: 15.5px; }
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 8px 0; }
.doc li { margin: 4px 0; }
.updated { font-family: var(--rounded); font-size: 13px; color: var(--ink-sub); }
.back-home { display: inline-block; font-size: 14px; color: var(--grape); margin-bottom: 14px; }
.callout { background: var(--grape-soft); border-radius: 12px; padding: 16px 18px; margin: 22px 0; font-size: 15px; }
a.inline { color: var(--grape); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.faq-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.faq-index a { font-size: 13px; padding: 3px 12px; background: var(--surface2); border-radius: 999px; }
@media (max-width: 560px) {
  .doc { padding: 28px 16px 64px; }
  .doc-sheet { padding: 22px 16px 30px 32px; }
  .doc-sheet::before { left: 4px; }
}

/* ---------- フッター ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface2); color: var(--ink-sub); padding: 32px 0; font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.footer .brand { font-size: 15px; }
.footer .brand img { width: 26px; height: 26px; border-radius: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--grape); }
