/* CatSign 需要テスト用 LP（a・b 共通）。信頼できる健康アプリの見た目（白地・落ち着いた青・すっきりした書体）に、猫を小さく散りばめる */
:root {
  --bg: #ffffff;
  --bg-2: #f4f7fb;
  --surface: #ffffff;
  --ink: #18222f;
  --muted: #5a6676;
  --line: #e3e8ef;
  --primary: #1f5fd1;
  --primary-dark: #174aa6;
  --primary-soft: #e8f0fd;
  --ok: #138a6b;
  --ok-soft: #e3f4ee;
  --warn: #b85c1a;
  --warn-soft: #fbefe4;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 6px 20px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

a { color: var(--primary); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ヘッダー */
.site-header { padding: 14px 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.92); position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(1.4) blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.logo-img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.header-badge { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 4px 12px; }

/* ヒーロー */
.hero { padding: 48px 0 56px; background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; margin-bottom: 16px; }
.hero h1 { font-size: 42px; line-height: 1.4; margin: 0 0 16px; font-weight: 700; letter-spacing: 0.01em; }
.hero h1 .mark { color: var(--primary); }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 0 0 18px; }
.ai-pill { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 14px; color: var(--ink); }
.ai-pill img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--bg-2); border: 1px solid var(--line); }
.ai-pill b { color: var(--primary); }
.ai-pill .dev { white-space: nowrap; flex: 0 0 auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.trust li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }

.btn {
  display: inline-block; background: var(--primary); color: #fff; font-weight: 700; font-size: 16px; font-family: inherit;
  border: none; border-radius: 12px; padding: 14px 24px; text-decoration: none; cursor: pointer; transition: background 0.15s;
}
.btn:hover { background: var(--primary-dark); }

/* ヒーローの画面サンプル（猫がそっとのぞく） */
.stage { position: relative; display: flex; justify-content: center; }
.peek { position: absolute; top: -34px; right: calc(50% - 168px); width: 70px; height: auto; z-index: 3; }

/* セクション共通 */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-2); }
.section h2 { font-size: 28px; line-height: 1.5; text-align: center; margin: 0 0 10px; font-weight: 700; }
.section .sub { text-align: center; color: var(--muted); margin: 0 0 36px; }
.eyebrow { display: block; text-align: center; color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; margin-bottom: 6px; }
.eyebrow.left { text-align: left; }

/* 困りごと → こう変わる */
.ba { display: grid; gap: 12px; max-width: 880px; margin: 0 auto; }
.ba-row { display: grid; grid-template-columns: 1fr 28px 1fr; gap: 12px; align-items: center; }
.ba-before, .ba-after { border-radius: var(--radius); padding: 16px 18px; font-size: 15px; }
.ba-before { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.ba-after { background: var(--surface); border: 1px solid #cfe0fb; box-shadow: var(--shadow); font-weight: 700; }
.ba-arrow { color: var(--primary); font-weight: 700; text-align: center; }
.ba-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 2px; }
.ba-before .ba-label { color: var(--muted); }
.ba-after .ba-label { color: var(--primary); }

/* 使い方 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; counter-increment: step; position: relative; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 14px; }

/* AIねこ博士に聞ける質問の例 */
.questions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 880px; margin: 0 auto; }
.q { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.q::before { content: "Q"; flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12px; margin-top: 2px; }
.q-note { max-width: 880px; margin: 14px auto 0; font-size: 13px; color: var(--muted); text-align: center; }

/* 作っている人 */
.maker-card { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 32px; max-width: 920px; }
.maker-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.maker-cats img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.maker h2 { text-align: left; font-size: 22px; margin: 4px 0 10px; }
.maker p { color: var(--muted); margin: 0; }
.maker .maker-sign { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ink); }

/* 機能 */
.features { display: grid; gap: 72px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature-text .num { display: inline-block; color: var(--primary); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; }
.feature-text h3 { font-size: 24px; line-height: 1.5; margin: 8px 0 12px; }
.feature-text p { color: var(--muted); margin: 0; }
.feature-phone { display: flex; justify-content: center; position: relative; }
.hakase-side { position: absolute; right: calc(50% - 190px); bottom: -14px; width: 96px; height: auto; z-index: 3; }

/* スマホ画面のサンプル */
.phone { width: 270px; height: 540px; border-radius: 44px; background: #0f172a; padding: 9px; box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18); position: relative; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 76px; height: 20px; transform: translateX(-50%); background: #0f172a; border-radius: 12px; z-index: 2; }
.screen { width: 100%; height: 100%; border-radius: 36px; background: var(--bg-2); overflow: hidden; position: relative; font-size: 12px; line-height: 1.5; }
.status { display: flex; justify-content: space-between; padding: 18px 26px 6px; font-size: 11px; font-weight: 700; }
.app-bar { padding: 12px 16px 10px; display: flex; align-items: center; gap: 10px; }
.app-bar .t { font-weight: 700; font-size: 15px; }
.app-bar .s { font-size: 10px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.card { background: var(--surface); border-radius: 14px; margin: 0 12px 10px; padding: 12px 14px; border: 1px solid var(--line); }
.card-title { font-weight: 700; font-size: 12px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.big { font-size: 26px; font-weight: 700; line-height: 1.2; }
.big small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row.total { font-weight: 700; }
.chip { display: inline-block; font-size: 10px; border-radius: 6px; padding: 1px 7px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.chip.peach { background: var(--warn-soft); color: var(--warn); }
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 10px; font-size: 10px; color: var(--muted); margin-top: 4px; }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

/* 撮影 → 記録に貼られる */
.scan-area { margin: 4px 12px 12px; height: 168px; border-radius: 16px; background: #e9eef5; position: relative; display: grid; place-items: center; }
.paper { width: 64%; background: #fff; border-radius: 6px; padding: 12px; display: grid; gap: 7px; box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12); rotate: -3deg; }
.paper i { display: block; height: 6px; background: var(--line); border-radius: 3px; }
.paper i.s { width: 55%; }
.tape { display: none; }
.mini-cat { position: absolute; right: 10px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.done-pill { position: absolute; left: 12px; bottom: 12px; background: var(--ok); color: #fff; font-weight: 700; font-size: 11px; border-radius: 6px; padding: 3px 8px; }

/* 経過（タイムライン） */
.tl { position: relative; padding-left: 16px; margin-left: 6px; border-left: 2px solid var(--line); }
.tl-item { position: relative; padding: 0 0 11px; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--surface); }
.tl-item.hosp::before { background: var(--primary); }
.tl-date { font-size: 10px; color: var(--muted); }
.who { display: inline-block; width: 16px; height: 16px; border-radius: 50%; font-size: 9px; color: #fff; text-align: center; line-height: 16px; vertical-align: 1px; }

/* AI に相談 */
.chat { padding: 4px 12px 0; display: grid; gap: 8px; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 11.5px; line-height: 1.55; }
.msg.me { justify-self: end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.refs { display: inline-block; margin-left: 4px; font-size: 10px; color: var(--ok); background: var(--ok-soft); border-radius: 6px; padding: 0 6px; }
.chat-actions { display: flex; gap: 6px; }
.chat-note { position: absolute; left: 12px; right: 12px; bottom: 14px; text-align: center; font-size: 10px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 6px; }

/* よくある質問 */
.faq { max-width: 760px; margin: 24px auto 0; display: grid; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2px 18px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 28px 14px 0; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; position: absolute; right: 0; top: 14px; color: var(--primary); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 16px; color: var(--muted); }

/* 登録フォーム（最初の画面と最後の2か所） */
.signup-form { display: grid; gap: 10px; max-width: 520px; margin-top: 20px; }
.signup-form .inline { display: flex; gap: 8px; }
.signup-form input[type="email"] { flex: 1; min-width: 0; font-size: 16px; font-family: inherit; padding: 13px 14px; border: 1px solid #c9d3e0; border-radius: 12px; color: var(--ink); background: #fff; }
.signup-form input[type="email"]:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.signup-form .btn { white-space: nowrap; }
.signup-form .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); }
.signup-form .consent input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.signup { padding: 72px 0 80px; background: #0f2a57; color: #fff; }
.signup .cat-signup { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto 8px; }
.signup h2 { color: #fff; text-align: center; font-size: 28px; margin: 0 0 10px; }
.signup .sub { color: rgba(255, 255, 255, 0.85); text-align: center; margin: 0 0 28px; }
.signup .signup-form { margin: 0 auto; }
.signup .signup-form input[type="email"] { border-color: transparent; }
.signup .signup-form .btn { background: #fff; color: var(--primary); }
.signup .signup-form .btn:hover { background: var(--primary-soft); }
.signup .signup-form .consent { color: rgba(255, 255, 255, 0.85); }
.signup .signup-form .consent a { color: #fff; }

/* フッター */
.site-footer { padding: 28px 0 40px; font-size: 12px; color: var(--muted); text-align: center; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }

/* 文書ページ（取り扱い・お礼） */
.doc { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
.doc h1 { font-size: 26px; }
.doc h2 { font-size: 18px; margin-top: 32px; }
.doc .cat-doc { display: block; width: 100%; max-width: 420px; height: auto; margin: 8px auto 0; }

/* スクロールに合わせて、ふわっと出す（対応ブラウザだけ。非対応ではそのまま表示） */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  @keyframes reveal { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
}

/* スマホで画面の下に出す登録ボタン */
.sticky-cta { display: none; }

/* 動きを減らす設定の人には動かさない */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 820px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .stage { margin-top: 40px; }
  .ba-row { grid-template-columns: 1fr; gap: 6px; }
  .ba-arrow { transform: rotate(90deg); }
  .steps { grid-template-columns: 1fr 1fr; }
  .questions { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-child(even) .feature-text { order: 0; }
  .section h2, .signup h2 { font-size: 22px; }
  .feature-text h3 { font-size: 20px; }
  .feature-text h3 br, .maker h2 br { display: none; }
  .maker-card { grid-template-columns: 1fr; padding: 22px; }
  .maker-cats { grid-template-columns: repeat(4, 1fr); max-width: 240px; }
  .maker h2 { font-size: 19px; }
  .hakase-side { right: 4px; width: 80px; }
  .signup-form .btn { padding: 13px 16px; font-size: 15px; }
  .sticky-cta {
    display: block; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 50; text-align: center;
    background: var(--primary); color: #fff; font-weight: 700; text-decoration: none; border-radius: 12px; padding: 15px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25); transition: opacity 0.2s, translate 0.2s;
  }
  .sticky-cta.is-hidden { opacity: 0; translate: 0 120%; pointer-events: none; }
  body { padding-bottom: 80px; }
}

/* ===== スマホ特化（2026-10-24）: どの画面幅でも1列・最大480px。PC ではスマホアプリのような細長い表示にする ===== */
html { background: #e9eef5; }
body { max-width: 480px; margin: 0 auto; min-height: 100vh; box-shadow: 0 0 40px rgba(15, 23, 42, 0.08); padding-bottom: 88px; }
.wrap { max-width: none; padding: 0 18px; }
.site-header { padding: 10px 0; }
.logo { font-size: 18px; }

.hero { padding: 24px 0 36px; }
.hero .wrap { display: block; }
.hero h1 { font-size: 30px; line-height: 1.38; }
.hero p.lead { font-size: 16px; }
.ai-pill { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.trust { gap: 4px 14px; }
.stage { margin-top: 36px; }
.peek { right: 6px; top: -36px; width: 64px; }

/* 入力とボタンを大きく（指で押しやすく） */
.signup-form .inline { flex-direction: column; gap: 10px; }
.signup-form input[type="email"] { padding: 16px; font-size: 17px; }
.signup-form .btn { width: 100%; padding: 16px; font-size: 17px; }
.signup-form .consent { font-size: 13px; }
.signup-form .consent input { width: 20px; height: 20px; margin-top: 2px; }

.section { padding: 48px 0; }
.section h2 { font-size: 22px; }
.section .sub { font-size: 14px; margin-bottom: 24px; }

/* 画面サンプルは枠を描かず、アプリの画面をそのままカードで見せる */
.phone { width: 100%; max-width: 420px; height: auto; padding: 0; background: none; border-radius: 0; box-shadow: none; margin: 0 auto; }
.phone::before { display: none; }
.screen { height: auto; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); padding-bottom: 12px; font-size: 13px; }
.status { display: none; }
.app-bar { padding: 14px 14px 10px; }
.msg { font-size: 13px; }
.chat-note { position: static; margin: 10px 12px 0; }
.scan-area { height: 150px; }

/* 困った → こう変わる: 1枚のカードに「いままで」と「CatSign で」を重ねる */
.ba { gap: 10px; }
.ba-row { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ba-before, .ba-after { border: none; border-radius: 0; box-shadow: none; padding: 12px 16px; }
.ba-before { background: var(--bg-2); font-size: 14px; }
.ba-after { font-size: 15px; }
.ba-arrow { display: none; }

/* 使い方: 縦に番号でつなぐ */
.steps { display: grid; grid-template-columns: 1fr; gap: 0; }
.steps li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; border: none; border-radius: 0; background: none; padding: 0 0 18px; }
.steps li::before { grid-row: 1 / span 2; margin: 0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 32px; bottom: 2px; width: 2px; background: var(--line); }

/* 質問の例: 会話の吹き出しのように */
.questions { grid-template-columns: 1fr; gap: 8px; }
.q { border-radius: 16px 16px 16px 4px; font-size: 14px; padding: 12px 14px; }

.feature { display: block; }
.features { gap: 48px; }
.feature-text { margin-bottom: 18px; }
.feature-text h3 { font-size: 20px; }
.feature-text h3 br, .maker h2 br { display: none; }
.hakase-side { right: 4px; bottom: auto; top: -30px; width: 72px; }

.maker-card { display: block; padding: 22px; }
.maker-cats { grid-template-columns: repeat(4, 1fr); max-width: 220px; margin-bottom: 14px; }
.maker h2 { font-size: 19px; }

.faq-item summary { padding: 16px 28px 16px 0; }
.signup { padding: 48px 0 56px; }
.signup h2 { font-size: 22px; }

/* 画面の下の登録ボタンは常に出す（フォームが見えている間だけ隠す） */
.sticky-cta {
  display: block; position: fixed; bottom: 12px; z-index: 50; text-align: center;
  left: max(14px, calc(50% - 226px)); right: max(14px, calc(50% - 226px));
  background: var(--primary); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; border-radius: 14px; padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25); transition: opacity 0.2s, translate 0.2s;
}
.sticky-cta.is-hidden { opacity: 0; translate: 0 120%; pointer-events: none; }
