/* ClipBridge LP — アプリ本体（app/web/style.css）と同じトーン
   - 配色・角丸・影・フォントはアプリの変数をそのまま使う（ライト / ダーク対応）
   - 320px 〜 デスクトップまで横スクロールなし。間隔は --gap / --pad で伸縮させる */
:root {
  color-scheme: light dark;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #15202b;
  --muted: #5b6b7c;
  --line: #dde3ea;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --accent-soft: #e8efff;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --phone: #15202b;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(21, 32, 43, 0.06);
  --shadow-lg: 0 30px 60px rgba(21, 32, 43, 0.16);
  --gap: clamp(14px, 3vw, 24px);
  --pad: clamp(16px, 4.2vw, 24px);
  --section: clamp(56px, 9vw, 112px);
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b;
    --card: #161e27;
    --text: #eef2f6;
    --muted: #9fb0c1;
    --line: #2a3542;
    --accent: #7ab8ff;
    --accent-text: #0b1a2c;
    --accent-soft: #1c2c44;
    --ok: #6ee7a0;
    --ok-soft: #10301f;
    --phone: #2a3542;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
  padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.85rem, 5.2vw, 3.1rem); line-height: 1.22; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2.2vw, 1.2rem); }
p { margin: 0; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 50; background: var(--card); color: var(--text); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }

/* 共通パーツ（アプリと同じ見た目） */
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.1rem); }
.hint { color: var(--muted); font-size: 0.9rem; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
  font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.ok::before { background: var(--ok); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--text);
  font-weight: 700; font-size: 1rem; line-height: 1.3; text-align: center; text-decoration: none;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.big { min-height: 58px; padding: 12px 24px; font-size: clamp(1rem, 2vw, 1.1rem); }
@media (hover: hover) {
  .btn:hover { filter: brightness(0.97); }
  .btn.primary:hover { filter: brightness(1.07); }
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions.center { justify-content: center; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(10px, 2.4vw, 14px);
  min-width: 0;
}
.card > * { min-width: 0; overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.checks .icon { font-size: 1.1rem; line-height: 1.5; }
.num {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 0.95rem;
}
details.help summary { cursor: pointer; font-weight: 700; min-height: 28px; }
details.help[open] summary { margin-bottom: 8px; }
details.help ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
details.help p { margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--accent-soft); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 0.85rem; font-weight: 600; }

/* ヘッダー（アプリと同じ固定バー） */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--pad) 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.topbar > * { min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.nav { display: flex; gap: clamp(10px, 2vw, 22px); }
.nav a { color: var(--muted); font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions .btn { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }

/* 本文の幅 */
main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) calc(24px + env(safe-area-inset-bottom, 0px)); }
.section { padding: var(--section) 0 0; display: grid; gap: var(--gap); }
.section-head { display: grid; gap: 10px; max-width: 720px; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ヒーロー */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 64px); align-items: center;
  padding: clamp(32px, 6vw, 72px) 0 0;
}
.hero-copy { display: grid; gap: clamp(14px, 2.4vw, 22px); }
.hero-copy .lead { max-width: 560px; }
.hero-checks { font-size: 0.95rem; }
.hero-figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
.hero-figure figcaption, .setup-figure figcaption, .shot figcaption { color: var(--muted); font-size: 0.85rem; }

/* 端末フレーム */
.phone {
  width: min(100%, 320px); border-radius: 44px; padding: 10px; background: var(--phone);
  box-shadow: var(--shadow-lg);
}
.phone img { width: 100%; border-radius: 34px; }
.phone.small { width: min(100%, 260px); border-radius: 36px; padding: 8px; }
.phone.small img { border-radius: 28px; }
.window {
  width: 100%; border-radius: 16px; border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.window-bar span { margin-left: 10px; color: var(--muted); font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.window img { width: 100%; display: block; }

/* できること */
.features { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.feature { gap: 12px; }
.feature-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* 画面ギャラリー */
.gallery { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.shot { margin: 0; display: grid; gap: 14px; justify-items: center; }
.shot figcaption { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--muted); font-size: 0.92rem; width: 100%; max-width: 360px; }
.shot figcaption strong { color: var(--text); font-size: 1rem; }

/* はじめ方 */
.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--gap); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.step-head { display: flex; align-items: center; gap: 12px; }
.step p { color: var(--muted); }
.setup-figure { margin: 0; display: grid; gap: 10px; position: sticky; top: 92px; }

/* 安心・FAQ・CTA */
.faq { display: grid; gap: 10px; }
.faq .card { padding: 14px var(--pad); gap: 0; }
.faq .card p { color: var(--muted); }
.cta-card { justify-items: center; text-align: center; padding: clamp(28px, 6vw, 56px) var(--pad); gap: 14px; }
.cta-card img { width: 56px; height: 56px; border-radius: 14px; }
.cta-card .lead { max-width: 560px; }

/* フッター */
.footer {
  max-width: var(--maxw); margin: var(--section) auto 0; padding: 24px var(--pad) calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--muted); font-size: 0.85rem;
}
.footer .brand { font-size: 1rem; }
.footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-left: auto; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer small { flex-basis: 100%; font-size: 0.8rem; }

/* 画面幅ごとの調整 */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; }
  .phone { width: min(100%, 280px); }
  .setup { grid-template-columns: minmax(0, 1fr); }
  .setup-figure { position: static; }
}
@media (max-width: 820px) {
  .nav { display: none; }
}
@media (max-width: 520px) {
  .topbar-actions .pill { display: none; }
  .actions .btn.big { flex: 1 1 100%; }
  .hero-figure { order: 1; }
}
@media (max-width: 360px) {
  .brand { font-size: 1rem; }
  .btn { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* 料金 */
.pricing { align-items: stretch; }
.plan { display: grid; gap: 14px; align-content: start; }
.plan h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plan.pro { border-color: var(--accent); }
.price { margin: 0; font-size: 1.15rem; }
.note { color: var(--muted); font-size: 0.88rem; margin: 0; }
.price .note { display: block; margin-top: 2px; }
.plan form { display: contents; }

/* 特定商取引法に基づく表記 */
.legal h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; }
.legal-list { display: grid; grid-template-columns: minmax(9em, 14em) minmax(0, 1fr); gap: 0; margin: 0; }
.legal-list dt, .legal-list dd { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.legal-list dt { font-weight: 700; padding-right: 16px; }
.legal-list dt:first-of-type, .legal-list dt:first-of-type + dd { border-top: 0; padding-top: 0; }
.legal-list .note { display: inline-block; margin-top: 2px; }
.legal-list dd ul { margin: 6px 0; padding-left: 1.3em; }
.legal-list dd li { margin: 2px 0; }
@media (max-width: 640px) {
  .legal-list { grid-template-columns: minmax(0, 1fr); }
  .legal-list dd { border-top: 0; padding-top: 0; }
  .legal-list dt { padding-bottom: 4px; }
  .legal-list dt:first-of-type + dd { padding-top: 0; }
}
