:root {
  --navy: #071b3a;
  --blue: #0b3c78;
  --light-blue: #eaf3ff;
  --sky: #f5f9ff;
  --gold: #d8a450;
  --ink: #162237;
  --muted: #5c6879;
  --line: #d8e0ea;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 20px 55px rgba(7, 27, 58, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; font-size: 16px; line-height: 1.75; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f2b441; outline-offset: 3px; }
.container { width: min(100% - 40px, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 40px, 920px); }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 1rem; padding: .7rem 1rem; color: white; background: var(--navy); border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(216, 224, 234, .7); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--navy); font-size: 1rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-size: .8rem; }
.header-line-link { padding: .55rem .85rem; color: var(--navy); border: 1px solid var(--navy); border-radius: 100px; background: white; font-size: .82rem; font-weight: 800; cursor: pointer; }

.hero { overflow: hidden; color: white; background: radial-gradient(circle at 83% 23%, #195ba3 0, #0e3f7b 23%, transparent 45%), linear-gradient(135deg, #06172f 0%, #092d5d 100%); }
.hero-grid { display: grid; grid-template-columns: 1.5fr .75fr; align-items: center; gap: clamp(2.5rem, 7vw, 7rem); min-height: 630px; padding-block: 5rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.eyebrow.center, .section-title.center { text-align: center; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1.4rem; font-size: clamp(2.3rem, 5vw, 4.35rem); line-height: 1.24; letter-spacing: -.04em; }
h1 em { color: #e7bd77; font-style: normal; }
.hero-text { max-width: 590px; margin-bottom: 2rem; font-size: clamp(1rem, 2vw, 1.18rem); color: #dbeaff; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .9rem; min-height: 58px; padding: .85rem 1.2rem; border: 1px solid transparent; border-radius: 10px; font-weight: 800; line-height: 1.3; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #1b2430; background: #efbd66; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.button-primary:hover { background: #f5cb80; }
.button-secondary { color: var(--navy); border-color: var(--navy); background: white; }
.text-link { padding: .5rem 0; color: white; border: 0; border-bottom: 1px solid rgba(255,255,255,.75); background: transparent; font-weight: 700; cursor: pointer; }
.hero-note { margin: 1rem 0 0; color: #bdd0ea; font-size: .78rem; }
.hero-card { padding: 1.7rem; border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius); background: rgba(255,255,255,.1); box-shadow: 0 18px 48px rgba(0,0,0,.13); backdrop-filter: blur(10px); }
.card-label, .result-eyebrow { margin-bottom: .35rem; color: #e7bd77; font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.hero-card h2 { margin-bottom: 1.15rem; font-size: 1.35rem; }
.mini-steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; font-size: .93rem; }
.mini-steps li { display: flex; align-items: center; gap: .7rem; }
.mini-steps span { display: grid; flex: 0 0 auto; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--navy); background: #efbd66; font-size: .8rem; font-weight: 800; }
.card-caption { margin: 1.3rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.3); color: #dbeaff; font-size: .78rem; }

.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-light { background: var(--sky); }
.section-title { margin-bottom: 2rem; color: var(--navy); font-size: clamp(1.75rem, 4vw, 2.7rem); line-height: 1.4; letter-spacing: -.03em; }
.reason-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.reason-card { min-height: 220px; padding: 1.5rem; border: 1px solid #dfe9f5; border-radius: 12px; background: white; }
.reason-number { display: block; margin-bottom: 1.7rem; color: var(--gold); font-size: .85rem; font-weight: 800; letter-spacing: .1em; }
.reason-card h3 { margin-bottom: .65rem; color: var(--navy); font-size: 1.2rem; }
.reason-card p { margin-bottom: 0; color: var(--muted); font-size: .94rem; }
.disclosure { margin: 1.2rem 0 0; color: var(--muted); font-size: .8rem; }
.process-section { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.1rem; }
.section-heading .section-title { margin-bottom: 0; }
.section-heading > p { max-width: 380px; margin: 0; color: var(--muted); font-size: .9rem; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.process-grid article { min-height: 205px; padding: 1.7rem; border-right: 1px solid var(--line); }
.process-grid article:last-child { border: 0; }
.process-grid span { color: var(--gold); font-size: .85rem; font-weight: 800; letter-spacing: .1em; }
.process-grid h3 { margin: .95rem 0 .5rem; color: var(--navy); font-size: 1.15rem; }
.process-grid p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }

.application-section { color: white; background: var(--navy); }
.application-section .section-title, .application-section .form-intro > p { color: white; }
.form-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 8vw, 7rem); align-items: start; }
.form-intro > p:not(.eyebrow) { color: #d7e4f5; }
.privacy-summary { margin-top: 2rem; padding: 1.25rem; border-left: 3px solid var(--gold); background: rgba(255,255,255,.08); font-size: .86rem; }
.privacy-summary strong { display: block; margin-bottom: .45rem; color: #f6cc86; }
.privacy-summary p { margin-bottom: .45rem; color: #e3edfa; }
.privacy-summary a { color: white; }
.application-form { padding: clamp(1.2rem, 4vw, 2.25rem); border-radius: var(--radius); color: var(--ink); background: white; box-shadow: var(--shadow); }
.form-group { margin: 0 0 1.15rem; padding: 0; border: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label, legend { display: block; margin-bottom: .4rem; color: var(--navy); font-size: .9rem; font-weight: 800; }
/* FIX#18: 必須/任意バッジを aria-hidden から class="req" に変更。
   旧セレクタはスクリーンリーダーから「必須」が消えていた（span[aria-hidden="true"] を対象にしていたため） */
label .req, legend .req, .consent-check b { margin-left: .25rem; color: var(--danger); font-size: .75rem; font-weight: 800; }
label small { margin-left: .25rem; color: var(--muted); font-size: .75rem; font-weight: 500; }
input[type="text"], input[type="tel"], input[type="email"], textarea { width: 100%; min-height: 48px; padding: .65rem .75rem; border: 1px solid #b8c5d4; border-radius: 7px; color: var(--ink); background: white; line-height: 1.5; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #8390a0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: #fff8f7; }
.field-help { margin: .3rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.field-error { min-height: 1.1rem; margin: .25rem 0 0; color: var(--danger); font-size: .78rem; font-weight: 700; line-height: 1.4; }
.radio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.radio-grid label { display: flex; align-items: center; justify-content: center; min-height: 43px; margin: 0; padding: .5rem; border: 1px solid #b8c5d4; border-radius: 7px; color: var(--ink); font-size: .82rem; font-weight: 600; cursor: pointer; }
.radio-grid input { margin: 0 .4rem 0 0; accent-color: var(--blue); }
.consent-check { display: flex; align-items: start; gap: .6rem; margin: 1.2rem 0 0; color: var(--ink); font-size: .8rem; font-weight: 500; line-height: 1.65; cursor: pointer; }
.consent-check input { flex: 0 0 auto; margin-top: .35rem; accent-color: var(--blue); }
.button-submit { width: 100%; margin-top: .6rem; }
.form-footnote { margin: .85rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; text-align: center; }

.result-section { padding-top: 0; background: var(--navy); }
.result-box { padding: clamp(1.4rem, 5vw, 2.5rem); border-radius: var(--radius) var(--radius) 0 0; background: white; box-shadow: var(--shadow); }
.result-box h2 { margin-bottom: .7rem; color: var(--navy); font-size: clamp(1.4rem, 3vw, 2rem); }
.result-box > p { color: var(--muted); }
#message-preview { min-height: 210px; margin: .8rem 0 1.15rem; color: var(--ink); background: #f7fafc; font-size: .85rem; }
.result-actions { display: flex; gap: .8rem; }
.result-actions .button { flex: 1; }
.config-note { margin: 1rem 0 0; padding: .8rem; border-left: 3px solid #b9790c; color: #604200; background: #fff8e9; font-size: .8rem; }

.faq-section { background: var(--sky); }
details { margin-bottom: .75rem; padding: 1rem 1.2rem; border: 1px solid #dfe9f5; border-radius: 9px; background: white; }
summary { color: var(--navy); font-weight: 800; cursor: pointer; }
details p { margin: .85rem 0 0; color: var(--muted); font-size: .92rem; }
.privacy-section { background: white; }
.privacy-copy > p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
.placeholder-notice { padding: .9rem 1rem; border: 1px solid #ead9b9; border-radius: 7px; color: #72511c !important; background: #fffaf0; font-size: .82rem !important; }
.site-footer { padding-block: 2rem; color: #c6d5e8; background: #041226; }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2rem; font-size: .78rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 1rem; }
.footer-inner a, .footer-link { padding: 0; color: #c6d5e8; border: 0; background: none; font-size: inherit; text-decoration: underline; cursor: pointer; }
.footer-business { text-align: right; }
dialog { width: min(100% - 40px, 500px); border: 0; border-radius: 14px; box-shadow: 0 24px 80px rgba(0,0,0,.32); }
dialog::backdrop { background: rgba(4,18,38,.7); }
.dialog-content { position: relative; padding: 1.6rem; }
.dialog-content h2 { color: var(--navy); font-size: 1.4rem; }
.dialog-content p { color: var(--muted); font-size: .9rem; }
.dialog-close { position: absolute; top: .75rem; right: .75rem; width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--navy); background: var(--light-blue); font-size: 1.4rem; cursor: pointer; }
code { padding: .05rem .25rem; border-radius: 3px; background: #edf2f7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; }

@media (max-width: 760px) {
  .container, .narrow { width: min(100% - 32px, 920px); }
  .header-inner { min-height: 60px; }
  .brand { font-size: .88rem; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; padding-block: 4rem; }
  .hero-card { max-width: 440px; }
  .reason-grid, .process-grid, .form-layout { grid-template-columns: 1fr; }
  .reason-card { min-height: 0; }
  .section-heading { display: block; }
  /* FIX#3: margin-top:-1rem が本文をH2に押し上げ、スマホで文字が重なっていた。
     負のマージンを廃止し、見出し下の余白で正しく分離する */
  .section-heading .section-title { margin-bottom: .8rem; }
  .section-heading > p { margin-top: 0; }
  .process-grid article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .process-grid article:last-child { border-bottom: 0; }
  .form-intro { margin-bottom: .2rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .radio-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: .7rem; }
  .footer-business { text-align: left; }
}

@media (max-width: 430px) {
  body { font-size: 15px; }
  .header-line-link { padding: .48rem .65rem; font-size: .74rem; }
  .hero-actions, .result-actions { display: grid; grid-template-columns: 1fr; }
  .text-link { justify-self: start; }
  .button { min-height: 55px; }
}

/* ============================================================
   修正パッチ（FIX#18 / FIX#11 / FIX#9 / FIX#2）
   既存ルールを壊さないよう、末尾で上書きする
   ============================================================ */

/* FIX#18: field-help が 0.72rem(約11.5px) と小さすぎたため可読サイズへ */
.field-help { font-size: .8rem; }

/* FIX#11: 「STEP 2 OF 3」の英語表記を日本語に変更したが、
   金文字のままだと紺背景でコントラスト不足（実測 2.4:1）。明るい色へ上書き */
.result-eyebrow { color: #f0c887; font-size: .8rem; letter-spacing: .08em; }

/* FIX#4: 見出し内の語中折り返しを防ぐユーティリティ */
.nowrap { white-space: nowrap; }

/* FIX#4: モバイルで H1 が大きすぎ、語中で改行されていた。clamp の下限を引き下げ */
@media (max-width: 760px) {
  h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); letter-spacing: -.02em; }
  .hero-text br { display: none; } /* スマホでは文節brを無効化し、自然な折り返しに */
}

/* FIX#18: ヘッダーのLINEボタンのタップ領域が 38px しかなかった（44px未満）。
   WCAG 2.5.5 / モバイル操作性の観点で最小 44px を確保 */
.header-line-link { min-height: 44px; }
@media (max-width: 430px) {
  .header-line-link { min-height: 44px; padding: .48rem .7rem; }
  .button { min-height: 48px; }
  /* FIX#18: ラジオのタップ領域も 44px 以上に */
  .radio-grid label { min-height: 46px; }
}

/* FIX#18: ライト背景上の金文字（#d8a450）はコントラスト約2.3:1でAA基準に不合格。
   ライト背景セクションのみ濃い金褐色（約5.2:1）へ変更 */
.section-light .eyebrow,
.section-light .reason-number,
.application-section .eyebrow,
.faq-section .eyebrow { color: #8a6414; }
.process-section .reason-number,
.process-grid span { color: #8a6414; }
.process-section .eyebrow { color: #8a6414; }

/* FIX#9: HERO注記が2行に増えたため行間を確保 */
.hero-note { line-height: 1.65; }

/* FIX#18: エラーメッセージに role="alert" を付けたので、
   空のときは高さを保ちつつ、読み上げ対象にならないよう調整 */
.field-error:empty { min-height: 1.1rem; }

/* FIX#18: 動きの低減設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .button:hover { transform: none; }
}

/* FIX#5: JS無効時の案内 */
.noscript-note {
  margin: 1rem 0 0; padding: .9rem 1rem; border: 1px solid #ead9b9;
  border-radius: 7px; color: #72511c; background: #fffaf0; font-size: .85rem;
}

/* FIX#1: 個人情報セクションを正式なポリシー形式にしたため、見出し・本文の体裁を追加 */
.privacy-copy h3 {
  margin: 2rem 0 .5rem; color: var(--navy); font-size: 1rem; font-weight: 800;
}
.privacy-copy h3:first-of-type { margin-top: 1.4rem; }
.privacy-copy > p { line-height: 1.85; }
/* FIX#2: 免許番号行は目立たせる（記入漏れに気付けるように） */
.license-note {
  padding: .8rem 1rem; border: 1px solid #ead9b9; border-radius: 7px;
  background: #fffaf0; color: #72511c !important; font-size: .88rem !important;
}
.privacy-updated { margin-top: 2rem; color: var(--muted); font-size: .8rem !important; }

/* FIX#2: フッターの事業者情報を3行に増やしたため、行間とサイズを調整 */
.footer-business p { margin: 0; line-height: 1.7; }
.footer-business p:first-child { font-weight: 700; color: #e4ecf7; }
