/* メンサ枠アラート — クリーンライト・単一アクセント */

:root {
  --bg: #fafbfd;
  --surface: #ffffff;
  --text: #1a2033;
  --text-sub: #48506a; /* コントラスト改善（旧 #5a6478 は淡すぎた） */
  --accent: #3451d1;
  --accent-soft: #eef1fc;
  --line-green: #06c755; /* LINE公式ブランド色（友だち追加CTA専用） */
  --border: #e4e8f0;
  --radius: 14px;
  --font-jp: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif;
}

/* キーボード操作の可視フォーカス（a11y） */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
details:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 1.02rem; /* 本文をやや大きく（老眼配慮） */
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; vertical-align: middle; }

a { color: var(--accent); }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand .mark { width: 1.5rem; height: 1.5rem; flex: none; }

.pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}

.header-cta {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--line-green);
  border-radius: 999px;
  padding: 0.6rem 1.1rem; /* タップ領域44px確保 */
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- hero ---------- */

.hero { padding: 3.5rem 0 2.5rem; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lead {
  margin-top: 1.1rem;
  color: var(--text-sub);
  font-size: 1rem;
}

.unofficial-note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: #8a5a00;
  background: #fff4d6;
  border: 1px solid #f0d98a;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  display: inline-block;
}
@media (prefers-color-scheme: dark) {
  .unofficial-note { color: #f0d98a; background: #3a3216; border-color: #574a1c; }
}

.cta-row { margin-top: 1.6rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--line-green);
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.28);
}

.btn-line:hover { filter: brightness(1.05); }

.btn-line .line-ic { width: 1.35rem; height: 1.35rem; }

/* 公開準備中の無効CTA（クリックさせず「準備中」と明示） */
.btn-line.disabled,
.header-cta.disabled {
  background: #b8bec9;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .btn-line.disabled,
  .header-cta.disabled { background: #3a4152; color: #aeb4c4; }
}

.cta-note { font-size: 0.8rem; color: var(--text-sub); }

/* 通知のスマホモック */

.phone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: 0 12px 32px rgba(26, 32, 51, 0.08);
  max-width: 21rem;
  margin: 0 auto;
  width: 100%;
}

.phone .phone-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-sub);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.phone .phone-head .mark { width: 1.15rem; height: 1.15rem; }

.bubble {
  margin-top: 0.8rem;
  background: #e9edf6;
  border-radius: 4px 16px 16px 16px;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-line;
  word-break: break-all;
  color: var(--text);
}

.bubble .b-link { color: var(--accent); text-decoration: underline; font-weight: 700; }

.bubble-time { font-size: 0.65rem; color: var(--text-sub); margin-top: 0.35rem; }

/* ---------- セクション共通 ---------- */

section { padding: 2.6rem 0; }

.sec-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.sec-sub {
  text-align: center;
  color: var(--text-sub);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

/* ---------- 課題（なぜ必要か） ---------- */

.problem { background: var(--surface); border-block: 1px solid var(--border); }

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.p-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem;
  background: var(--bg);
}

.p-card .p-num {
  font-weight: 900;
  color: var(--accent);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.3rem;
}

.p-card p { font-size: 0.88rem; color: var(--text-sub); }

/* ---------- 使い方3ステップ ---------- */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  margin-bottom: 0.7rem;
}

.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }

.step p { font-size: 0.86rem; color: var(--text-sub); }

/* ---------- 特徴 ---------- */

.features { background: var(--surface); border-block: 1px solid var(--border); }

.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.feat {
  display: flex;
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--bg);
}

.feat .f-ic {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat .f-ic svg { width: 1.3rem; height: 1.3rem; }

.feat h3 { font-size: 0.98rem; font-weight: 700; }

.feat p { font-size: 0.85rem; color: var(--text-sub); margin-top: 0.15rem; }

/* ---------- FAQ ---------- */

.faq-list { max-width: 44rem; margin: 0 auto; }

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 1rem 1.2rem;
  list-style: none;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  min-height: 44px;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::before { content: 'Q.'; color: var(--accent); font-weight: 900; }

/* 開閉状態を示すインジケータ（キーボード/視覚の手掛かり） */
.faq-list summary::after {
  content: '▶';
  margin-left: auto;
  color: var(--accent);
  font-size: 0.8em;
  transition: transform 0.15s;
}
.faq-list details[open] summary::after { content: '▼'; }

.faq-list details p {
  padding: 0 1.2rem 1.1rem 2.6rem;
  font-size: 0.95rem;
  color: var(--text-sub);
}

/* ---------- 免責 ---------- */

.disclaimer {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  font-size: 0.83rem;
  color: var(--text-sub);
  max-width: 44rem;
  margin: 0 auto;
}

.disclaimer strong { color: var(--text); }

/* ---------- 広告枠（器のみ・Phase 3で有効化） ---------- */

.ad-slot {
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: #b6bdcc;
  font-size: 0.72rem;
  text-align: center;
  padding: 2rem 1rem;
  max-width: 44rem;
  margin: 0 auto;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 0 2.5rem;
  margin-top: 2rem;
}

.site-footer .links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.site-footer .copy { font-size: 0.75rem; color: var(--text-sub); }

/* ---------- privacy page ---------- */

.doc { max-width: 44rem; margin: 0 auto; padding: 2.5rem 0 1rem; }

.doc h1 { font-size: 1.5rem; font-weight: 900; margin-bottom: 0.4rem; }

.doc .doc-date { font-size: 0.8rem; color: var(--text-sub); margin-bottom: 1.8rem; }

.doc h2 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 0.5rem; }

.doc p, .doc li { font-size: 0.9rem; color: var(--text-sub); }

.doc ul { padding-left: 1.3rem; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .hero { padding: 2.2rem 0 1.8rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 1.8rem; }
  .cards-3, .steps, .feat-grid { grid-template-columns: 1fr; }
  .header-cta { font-size: 0.78rem; padding: 0.4rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-list summary::after { transition: none; }
}

/* ---------- 小さすぎた注釈類の底上げ（老眼・弱視配慮） ---------- */
.p-card p, .step p, .feat p, .disclaimer { font-size: 0.95rem; }
.cta-note { font-size: 0.85rem; }
.hero .lead { font-size: 1.05rem; }
.ad-slot { font-size: 0.8rem; }

/* ---------- 公開準備中リボン（LINEアカウント開設後に削除する） ---------- */
.prelaunch {
  background: #fff4d6;
  border-bottom: 1px solid #f0d98a;
  color: #6b5410;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
}

/* ---------- 運営者・信頼セクション ---------- */
.trust { background: var(--surface); border-block: 1px solid var(--border); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 52rem;
  margin: 0 auto;
}
.trust-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  background: var(--bg);
}
.trust-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}
.trust-card h3 span { color: var(--accent); }
.trust-card p { font-size: 0.95rem; color: var(--text-sub); }

@media (max-width: 760px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- ダークモード（端末設定に追従） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1118;
    --surface: #171a24;
    --text: #e6e9f2;
    --text-sub: #a7aec4;
    --accent: #8098f5;
    --accent-soft: #20263d;
    --border: #2a3042;
  }
  .site-header { background: rgba(23, 26, 36, 0.9); }
  .bubble { background: #222839; }
  .prelaunch { background: #3a3216; border-color: #574a1c; color: #f0d98a; }
  .ad-slot { color: #565d72; }
  img.max, .phone { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
}
