/* ============================================================
   寮付き工場ナビ LP
   配色は採用画像に合わせる：ターコイズ／ミント・濃紺・黄色・白。
   LINEボタンのみ緑。
   ============================================================ */
:root {
  --navy: #1d2b5a;
  --navy-soft: #4a5884;
  --teal: #18a295;
  --teal-deep: #117f75;
  --turquoise: #3fc8d0;
  --mint-bg: #e3f6f4;
  --mint-line: #cdebe5;
  --yellow: #ffe14d;
  --gold: #f2d35c;       /* 固定ナビ現在地用の落ち着いた黄色 */
  --gold-border: #d9ba45;
  --line-green: #16d363; /* CTAグラデーション上端（LINE公式 #06C755 基調） */
  --line-green-dark: #05b64e; /* CTAグラデーション下端 */
  --line-green-edge: #049a43; /* CTA縁取り */
  --white: #ffffff;
  --content-max: 640px;
  --dock-h: 148px; /* JSが実測値で上書きするフォールバック */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.8;
  background-color: var(--mint-bg);
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: var(--content-max);
  margin: 0 auto;
  background: var(--white);
  /* 固定エリアに隠れないための余白（JSが --dock-h を実測更新） */
  padding-bottom: calc(var(--dock-h) + 24px);
}

/* 本文の外側が見えるPC幅でだけ、背景の柄と影を描く
   （スマホでは見えないのに描画コストだけ掛かるため） */
@media (min-width: 641px) {
  body {
    background-image:
      repeating-linear-gradient(60deg,
        rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) 10px,
        transparent 10px, transparent 150px),
      repeating-linear-gradient(-30deg,
        rgba(255, 225, 77, 0.18) 0, rgba(255, 225, 77, 0.18) 8px,
        transparent 8px, transparent 170px);
  }
  .page { box-shadow: 0 0 24px rgba(29, 43, 90, 0.10); }
}

/* ---------- 画像 ---------- */
.lp-img {
  display: block;
  width: 100%;
  height: auto; /* 縦横比を保持 */
}

/* ---------- 画像間のHTMLブロック ---------- */
.html-block {
  background: var(--white);
  padding: 24px 20px 28px;
}
@media (min-width: 480px) {
  .html-block { padding: 28px 24px 32px; }
}

.html-block p { margin: 0 0 1em; }
.html-block p:last-child { margin-bottom: 0; }

.block-heading {
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 0 0 0.6em;
  padding-left: 12px;
  border-left: 4px solid var(--turquoise);
  font-weight: 700;
}

.note {
  font-size: 0.875rem;
  color: var(--navy-soft);
}

/* ---------- 紹介：リード文（ヒーロー画像下の濃紺帯） ---------- */
.intro-lead {
  background: var(--navy);
  color: var(--white);
  padding: 18px 20px 24px;
}
.intro-lead p {
  margin: 0;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.intro-notes {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- 紹介：案内メニュー（目的別ナビ） ---------- */
.guide {
  position: relative;
  background: #e9f6f2;
  padding: 28px 16px 36px;
  overflow: hidden;
}
@media (min-width: 480px) {
  .guide { padding: 32px 24px 40px; }
}
.guide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.guide-inner {
  position: relative;
  z-index: 1;
}

.guide-eyebrow-wrap {
  margin: 0 0 14px;
  text-align: center;
}
.guide-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(29, 43, 90, 0.10);
}
.guide-eyebrow svg { width: 15px; height: 15px; }

.guide-heading {
  margin: 0;
  text-align: center;
  font-size: clamp(1.4rem, 6.2vw, 1.625rem);
  line-height: 1.45;
  font-weight: 800;
  color: var(--navy);
}
.guide-heading::after {
  content: "";
  display: block;
  width: 76px;
  height: 5px;
  border-radius: 3px;
  background: var(--yellow);
  margin: 10px auto 0;
}

.guide-desc {
  margin: 12px 0 24px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal-deep);
}

/* 番号付きルート線でつなぐカードリスト */
.guide-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 48px;
  position: relative;
  display: grid;
  gap: 20px;
}
/* ルート線（番号円の中心 x=20px を通る縦線） */
.guide-list::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 46px;
  bottom: 46px;
  width: 4px;
  border-radius: 2px;
  background: #2db3a7;
}
.guide-item { position: relative; }
/* カード間の小さな停留点 */
.guide-item + .guide-item::before {
  content: "";
  position: absolute;
  left: -31.5px;
  top: -14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2db3a7;
}
.guide-num {
  position: absolute;
  left: -48px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid #2db3a7;
  box-shadow: inset 0 0 0 2.5px var(--white);
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--navy);
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 14px 12px 14px 14px;
  background: var(--white);
  border: 1px solid #d9efe9;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(29, 43, 90, 0.08);
  color: var(--navy);
  text-decoration: none;
}
@media (min-width: 480px) {
  .guide-card { gap: 14px; padding: 16px 16px 16px 18px; }
}
.guide-card:hover {
  border-color: var(--teal);
  box-shadow: 0 6px 18px rgba(29, 43, 90, 0.12);
}
.guide-card:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}
.guide-icon {
  flex: none;
  width: clamp(42px, 11.5vw, 52px);
  height: clamp(42px, 11.5vw, 52px);
}
.guide-icon svg { width: 100%; height: 100%; display: block; }
.guide-text { flex: 1; min-width: 0; }
.guide-title {
  display: block;
  font-size: clamp(1.02rem, 4.5vw, 1.125rem);
  font-weight: 800;
  line-height: 1.4;
}
.guide-sub {
  display: block;
  margin-top: 3px;
  font-size: clamp(0.72rem, 3.3vw, 0.8125rem);
  line-height: 1.55;
  color: var(--navy-soft);
}
.guide-arrow {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 6px rgba(24, 162, 149, 0.35);
  display: grid;
  place-items: center;
}
.guide-arrow svg { width: 15px; height: 15px; }

/* ---------- よくあるご質問（相談セクション内） ---------- */
.faq {
  --faq-navy: #052647;
  --faq-turquoise: #23c9c7;
  --faq-yellow: #fff234;
  --faq-mint: #f0fbf8;
  --faq-answer: #1d4154;
  position: relative;
  background: var(--faq-turquoise);
  padding: 30px 16px 28px;
  overflow: hidden;
}
@media (min-width: 480px) {
  .faq { padding: 38px 28px 34px; }
}
.faq-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.faq-inner {
  position: relative;
  z-index: 1;
}

/* 見出し：濃紺カプセルが白パネルに少し重なる */
.faq-label-wrap {
  margin: 0 0 -17px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.faq-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 20px;
  border-radius: 999px;
  background: var(--faq-navy);
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
}
.faq-label svg { width: 16px; height: 16px; color: var(--faq-yellow); }

.faq-head {
  background: var(--white);
  border-radius: 22px;
  padding: 32px 16px 20px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(5, 38, 71, 0.10);
}
.faq-heading {
  margin: 0;
  font-size: 1.6875rem; /* 27px */
  line-height: 1.4;
  font-weight: 800;
  color: var(--faq-navy);
}
@media (min-width: 600px) {
  .faq-heading { font-size: 1.9375rem; } /* 31px */
}
.faq-marker {
  background: linear-gradient(transparent 68%, var(--faq-yellow) 68%, var(--faq-yellow) 94%, transparent 94%);
  padding: 0 4px;
}
.faq-desc {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--faq-navy);
}

/* 質問カード */
.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.faq-item {
  background: var(--white);
  border-radius: 19px;
  box-shadow: 0 3px 10px rgba(5, 38, 71, 0.10);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
  color: var(--faq-navy);
  font-weight: 700;
  font-size: 0.9375rem; /* 15px */
  line-height: 1.55;
}
@media (min-width: 400px) {
  .faq-q { font-size: 1rem; }
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:focus-visible {
  outline: 3px solid var(--faq-navy);
  outline-offset: -3px;
  border-radius: 19px;
}
.faq-qmark {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--faq-yellow);
  display: grid;
  place-items: center;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1;
}
.faq-qtext { flex: 1; min-width: 0; }

/* 開閉アイコン：閉＝淡いミントに濃紺「＋」／開＝濃紺の丸に白「−」 */
.faq-toggle {
  flex: none;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2f6f3;
  color: var(--faq-navy);
}
.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}
.faq-toggle::before { width: 12px; height: 2px; }
.faq-toggle::after { width: 2px; height: 12px; }
.faq-item[open] .faq-toggle {
  background: var(--faq-navy);
  color: var(--white);
}
.faq-item[open] .faq-toggle::after { display: none; }

/* 回答 */
.faq-a {
  display: flex;
  gap: 12px;
  padding: 15px 16px 18px 14px;
  background: var(--faq-mint);
  border-top: 2px solid var(--faq-turquoise);
}
.faq-amark {
  flex: none;
  width: 32px;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.75;
  color: #0c9d9b;
}
.faq-a p {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--faq-answer);
  overflow-wrap: anywhere;
}
@media (min-width: 400px) {
  .faq-a p { font-size: 1rem; }
}

/* FAQ下部の案内 */
.faq-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: 19px;
  box-shadow: 0 3px 10px rgba(5, 38, 71, 0.10);
}
.faq-more-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff8a8;
  color: var(--faq-navy);
  display: grid;
  place-items: center;
}
.faq-more-icon svg { width: 18px; height: 18px; }
.faq-more p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--faq-answer);
}
.faq-more strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--faq-navy);
}

/* ---------- LINEボタン ---------- */
.cta-wrap { margin: 20px 0; }

/* 深いエメラルドの控えめなグラデーション。
   細い縁取り＋上端の薄いハイライト＋浅い影のみ（強い光沢・発光なし） */
.btn-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--line-green) 0%, var(--line-green-dark) 100%);
  border: 1px solid var(--line-green-edge);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 6px rgba(4, 140, 70, 0.25);
}
.btn-line:hover[href] { filter: brightness(1.06); }
.btn-line:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}
/* LINE URL未設定時（hrefなし）は押せない見た目に */
.btn-line[aria-disabled="true"] {
  cursor: default;
  opacity: 0.85;
}

.btn-line-icon {
  flex: none;
  width: 29px;
  height: 29px;
  display: block;
}

/* 右端の矢印（細い円で囲む） */
.btn-line-chevron {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.btn-line-chevron svg { width: 15px; height: 15px; display: block; }

/* ---------- 次セクションへのリンク ---------- */
.next-link-wrap { text-align: center; margin-top: 20px; }
.next-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--turquoise);
  text-decoration-thickness: 2px;
}
.next-link:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

/* ---------- フッター ---------- */
.footer {
  padding: 28px 20px 20px;
  background: var(--white);
  border-top: 1px solid var(--mint-line);
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--navy-soft);
  text-align: center;
}
.footer p { margin: 0 0 10px; }
.footer p:last-child { margin-bottom: 0; }
.footer-company {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- 画面下の固定エリア ---------- */
.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--content-max); /* PCでも本文幅に合わせる */
  background: var(--white);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid #e4efeb;
  box-shadow: 0 -4px 14px rgba(29, 43, 90, 0.10);
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
}

/* 上段：4項目ナビ＋ルート線 */
.dock-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 8px;
}
.dock-route {
  position: absolute;
  top: 19px; /* ピン円の中心高さ */
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  border-radius: 1px;
  background: #d8ece7;
}
.dock-stop {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 48px;
  padding: 2px 4px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--navy-soft);
}
.dock-stop:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
}
/* アイコンはすべて濃紺・同一サイズ／線幅 */
.dock-pin {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid #d3e8e2;
  color: var(--navy);
}
.dock-pin svg { width: 18px; height: 18px; }
.dock-pin .ic-active { display: none; }
.dock-label {
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 400;
}

/* 現在地：落ち着いた黄色のピン＋濃紺の太字（形・太さでも区別） */
.dock-stop.is-active { color: var(--navy); }
.dock-stop.is-active .dock-label { font-weight: 700; }
.dock-stop.is-active .dock-pin {
  background: var(--gold);
  border-color: var(--gold-border);
}
.dock-stop.is-active .dock-pin .ic-base { display: none; }
.dock-stop.is-active .dock-pin .ic-active { display: block; width: 19px; height: 19px; }

/* 下段：固定LINEボタン（右端の円囲み矢印の分だけ左右余白を確保） */
.dock-cta .btn-line {
  min-height: 56px;
  font-size: 1.0625rem;
  padding-left: 44px;
  padding-right: 44px;
}

/* ---------- ユーティリティ ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* アンカー移動時は、前のセクションを残さず画像の先頭にぴたりと合わせる */
.section { scroll-margin-top: 0; }
.section:focus { outline: none; }
