/* ==========================================================================
   生成AIガイドラインメーカー -- style
   信頼感重視のライト基調。アクセント: NOVEL NAVY #1a2942 + 抑えめゴールド。
   ライト1テーマ（v1はダーク非対応）。スマホ対応必須。
   ========================================================================== */

:root {
  --navy:       #1a2942;
  --navy-soft:  #2d4066;
  --navy-line:  #d7deea;
  --gold:       #a67c34;
  --gold-soft:  #f3ead6;
  --ink:        #1c2530;
  --ink-soft:   #4a5563;
  --ink-faint:  #7b8697;
  --bg:         #f5f7fa;
  --bg-2:       #eef2f7;
  --card:       #ffffff;
  --line:       #e2e8f0;
  --line-2:     #cbd5e1;
  --ok:         #1a7a52;
  --err:        #b3261e;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(26,41,66,0.06), 0 6px 20px rgba(26,41,66,0.07);
  --shadow-sm:  0 1px 2px rgba(26,41,66,0.08);
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
          "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-soft); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 18px; }

/* ---- ヘッダー ---------------------------------------------------------- */
.site-head { background: var(--navy); color: #fff; }
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { font-weight: 800; letter-spacing: 0.01em; font-size: 1.02rem; color: #fff; }
.head-link { color: #cdd7e6; text-decoration: none; font-size: 0.9rem; }
.head-link:hover { color: #fff; }

/* ---- ヒーロー ---------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 40px 0 34px;
}
.hero h1 { margin: 0 0 12px; font-size: 1.9rem; line-height: 1.35; letter-spacing: 0.01em; color: var(--navy); }
.hero .hl { color: var(--gold); border-bottom: 3px solid var(--gold-soft); }
.hero .lede { margin: 0; max-width: 640px; color: var(--ink-soft); font-size: 1.02rem; }

/* ---- ステッパー ------------------------------------------------------- */
.stepper {
  list-style: none; display: flex; gap: 8px; padding: 0; margin: 26px 0 18px;
  counter-reset: none;
}
.stepper .st {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 0.86rem; color: var(--ink-faint);
  cursor: pointer; user-select: none; font-weight: 600; text-align: center;
}
.stepper .st-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--bg-2);
  color: var(--ink-faint); font-weight: 800; font-size: 0.8rem; flex: 0 0 auto;
}
.stepper .st.is-active { color: var(--navy); border-color: var(--navy); box-shadow: var(--shadow-sm); }
.stepper .st.is-active .st-n { background: var(--navy); color: #fff; }
.stepper .st.is-done { color: var(--ink-soft); }
.stepper .st.is-done .st-n { background: var(--ok); color: #fff; }

/* ---- カード / ステップ ------------------------------------------------ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 20px;
  margin-bottom: 22px;
}
.step-title { margin: 0 0 18px; font-size: 1.2rem; color: var(--navy); }

.field { margin-bottom: 22px; }
.field-label { display: block; font-weight: 700; margin-bottom: 9px; color: var(--ink); font-size: 0.98rem; }
.field-label small { font-weight: 500; color: var(--ink-faint); font-size: 0.8rem; margin-left: 6px; }

.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
  padding: 9px 15px; border-radius: 999px; font-size: 0.92rem; cursor: pointer;
  font-family: inherit; transition: border-color .12s, background .12s, color .12s;
  line-height: 1.3;
}
.opt:hover { border-color: var(--navy-soft); }
.opt.is-sel {
  background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.other-tool { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; max-width: 340px; }
.other-tool label { font-size: 0.84rem; color: var(--ink-soft); }
.other-tool input { padding: 9px 11px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; }
.other-tool input:focus { outline: none; border-color: var(--navy); }

/* ---- ステップナビ ----------------------------------------------------- */
.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 10px; }

.btn {
  font-family: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  border-radius: var(--radius-sm); padding: 11px 20px; border: 1.5px solid transparent;
  transition: opacity .12s, background .12s, border-color .12s;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:not(:disabled):hover { background: var(--navy-soft); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--navy-soft); color: var(--navy); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--bg-2); }
.btn.small { padding: 7px 13px; font-size: 0.85rem; }
.btn.block { width: 100%; margin-top: 6px; }

/* ---- Step 3 結果 ------------------------------------------------------ */
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.result-head .step-title { margin: 0; }

.summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
  background: var(--gold-soft); color: var(--gold); border: 1px solid #e6d5b0;
  border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; font-weight: 600;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.actions .btn { flex: 1 1 auto; min-width: 200px; }

/* ---- 文書プレビュー --------------------------------------------------- */
.doc-layout { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.doc-nav-acc { position: sticky; top: 14px; }
.doc-nav-acc > summary { display: none; }
.doc-nav { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line); padding-left: 4px; }
.doc-nav-link {
  color: var(--ink-soft); text-decoration: none; font-size: 0.82rem; padding: 5px 8px;
  border-radius: 6px; line-height: 1.4;
}
.doc-nav-link:hover { background: var(--bg-2); color: var(--navy); }

.doc-preview {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 38px; box-shadow: var(--shadow-sm);
  font-feature-settings: "palt"; overflow-wrap: break-word;
}
.doc-title { text-align: center; font-size: 1.5rem; margin: 0 0 6px; color: var(--navy); letter-spacing: 0.04em; }
.doc-sub { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 20px; }
.doc-note {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 0.82rem; color: var(--ink-soft); margin: 0 0 26px;
}
.doc-ch {
  font-size: 1.08rem; color: var(--navy); border-bottom: 2px solid var(--navy-line);
  padding-bottom: 5px; margin: 30px 0 14px; scroll-margin-top: 14px;
}
.doc-clause { margin: 0 0 12px; }
.doc-clause strong { color: var(--navy); }
.doc-para { margin: 0 0 12px; }
.doc-items { margin: 0 0 14px; padding-left: 1.6em; }
.doc-items li { margin-bottom: 5px; }

.doc-table-wrap { overflow-x: auto; margin: 0 0 16px; }
.doc-table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
.doc-table th, .doc-table td { border: 1px solid var(--line-2); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; }
.doc-table tbody tr:nth-child(even) { background: var(--bg); }

/* ---- 解説コンテンツ --------------------------------------------------- */
.prose { max-width: 760px; margin: 40px auto; padding: 0 2px; }
.prose h2 { font-size: 1.35rem; color: var(--navy); margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose p { margin: 0 0 14px; color: var(--ink-soft); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.4em; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }
.prose b { color: var(--ink); }

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 16px;
  margin-bottom: 10px; background: #fff;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 12px 0; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.faq p { margin: 0 0 12px; }

/* ---- モーダル（メールゲート） ----------------------------------------- */
.modal { position: fixed; inset: 0; background: rgba(20,30,48,0.55); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: var(--radius); max-width: 420px; width: 100%; padding: 26px 24px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-close { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 1.5rem; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.modal-box h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.2rem; }
.modal-lead { font-size: 0.86rem; color: var(--ink-soft); margin: 0 0 16px; }
.lbl { display: block; font-size: 0.82rem; font-weight: 700; margin: 12px 0 4px; color: var(--ink); }
.req { color: var(--err); font-weight: 700; font-size: 0.72rem; }
.opt { }
.lbl .opt { color: var(--ink-faint); font-weight: 500; font-size: 0.72rem; }
.modal-box input[type=email], .modal-box input[type=text] {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); font: inherit;
}
.modal-box input:focus { outline: none; border-color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gate-status { min-height: 18px; font-size: 0.84rem; margin: 12px 0 2px; color: var(--ink-soft); }
.gate-status.is-err { color: var(--err); }
.modal-fine { font-size: 0.76rem; color: var(--ink-faint); margin: 12px 0 0; text-align: center; }

/* ---- フッター --------------------------------------------------------- */
.site-foot { background: var(--navy); color: #cdd7e6; margin-top: 50px; }
.foot-inner { padding: 26px 18px 30px; }
.foot-cross { margin-bottom: 16px; }
.foot-cross-t { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8ea0bd; margin-bottom: 4px; }
.foot-cross a { color: #fff; text-decoration: none; font-weight: 600; }
.foot-cross a:hover { text-decoration: underline; }
.foot-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.86rem; padding-top: 14px; border-top: 1px solid #2d4066; }
.foot-meta a { color: #cdd7e6; }
.foot-note { font-size: 0.76rem; color: #7f92b0; margin: 14px 0 0; }

/* ---- レスポンシブ ----------------------------------------------------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 1.5rem; }
  .hero { padding: 28px 0 24px; }
  .stepper .st { font-size: 0; gap: 0; padding: 10px 4px; }
  .stepper .st-n { font-size: 0.85rem; }
  .stepper .st.is-active { font-size: 0.8rem; gap: 6px; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-nav-acc { position: static; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
  .doc-nav-acc > summary { display: block; cursor: pointer; padding: 11px 14px; font-weight: 700; color: var(--navy); }
  .doc-nav { border-left: none; padding: 4px 10px 12px; }
  .doc-preview { padding: 22px 18px; }
  .actions .btn { min-width: 0; width: 100%; }
  .actions { flex-direction: column; }
}
