@charset "UTF-8";

/* ==========================================================================
   トークン（Figma 変数 HATO / Semantic・Header から転記）
   ========================================================================== */
:root {
  --hato-text-primary: #101820;
  --hato-text-secondary: #5a6976;
  --hato-text-inverse: #fff;
  --hato-icon-primary: #17222c;
  --hato-icon-inverse: #fff;
  --hato-border-subtle: #d6dde3;
  --hato-surface-base: #fff;
  --hato-surface-subtle: #f3f6f8;
  --hato-surface-muted: #e8edf1;
  --hato-surface-inverse: #07111f;
  --hato-surface-tint: #ecf9fe; /* TOP のセクション背景（淡い青。Figma 上は変数未割当） */
  --hato-surface-page: #f8fafb; /* 下層ページ・SPメニュー相談ブロックの背景（Figma 上は変数未割当） */
  --hato-focus-ring: #3488f4;
  --hato-text-link: #125fcc; /* 本文中のテキストリンク・「写真を拡大」（Figma HATO / Semantic / Text / Link） */
  --hato-text-error: #c0262d; /* お問い合わせフォームのエラー文・枠（Figma に変数なし。仮置き。白地 5.9:1・--hato-surface-tint 地 5.5:1） */

  --header-height: 72px;
  --header-brand: #0a3b80;
  --header-nav-paddingx: 16px;
  --header-nav-paddingy: 8px;
  --header-nav-text-light: #101820;
  --header-nav-text-overlay: #fff;
  --header-nav-surface-light: #f3f6f8;
  --header-nav-surface-overlay: rgb(255 255 255 / 0.1);

  --font-sans: "Roboto", "Noto Sans JP", sans-serif;

  /* 動き */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* 素早く動き出し、静かに止まる */
  --motion-accent: #007bff; /* ご依頼の流れのイラストと同じ青。暗い背景の上の進捗線だけに使う */

  /* details の高さ（auto）を補間できるようにする（対応ブラウザのみ） */
  interpolate-size: allow-keywords;
}

/* ==========================================================================
   ベース（~/work/DESIGN.md 4章のベースライン）
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--hato-surface-page);
  color: var(--hato-text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  line-break: strict;
  font-kerning: normal;
  font-feature-settings: "palt";
  letter-spacing: 0.05em;
  text-autospace: normal;
  overflow-wrap: anywhere;
}

p {
  max-inline-size: 40ic;
  text-wrap: pretty;
}

h1,
h2,
h3,
.lead {
  line-height: 1.25;
  text-wrap: balance;
  word-break: auto-phrase;
}

/* リンクはすべてポインターにする */
a[href] {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 2px;
}

/* アンカーで移動したとき、固定ヘッダーの下に隠れないようにする（要素側の scroll-margin は、ここに足す余白だけを書く） */
html {
  scroll-padding-top: var(--header-height);
}

/* SPメニュー表示中は背面をスクロールさせない */
html:has(.menu[open]) {
  overflow: hidden;
}

/* 見出しなどで、まとまりの途中では改行させない（改行はまとまりの間でだけ起こる） */
.u-phrase {
  display: inline-block;
}

.u-visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Header
   配色（Light / Overlay）と表示状態（固定・隠す）は別々に管理する。
   - 配色：カスタムプロパティで切り替える。.header--overlay は MV を通過するまで（.is-mv-passed が付くまで）Overlay の配色にする
   - 表示状態：.is-fixed / .is-hidden を header.js が付け外しする
   .menu は開いたときに常に Light の配色で表示するため、同じ値を持たせる。
   ========================================================================== */
.header,
.menu {
  --header-fg: var(--header-nav-text-light);
  --header-icon: var(--hato-icon-primary);
  --header-surface: var(--header-nav-surface-light);
  --header-surface-hover: var(--hato-surface-muted);
  --header-surface-padding: 2px;
  --header-surface-radius: 4px;
  --header-surface-blur: none;
  --logo-mark-color: var(--header-brand);
}

.header {
  /* 自動で隠す動きの調整値（header.js も --header-hide-delay を読む） */
  --header-hide-delay: 1500ms;
  --header-show-duration: 250ms;
  --header-hide-duration: 350ms;
  /* 固定時に下のコンテンツが透けないよう、ページ背景と同じ色を敷く（Figma ではヘッダーの塗りなし。要確認） */
  --header-bar-surface: var(--hato-surface-page);
  /* ナビ項目のホバー（Light：紺地に白文字） */
  --header-link-hover-surface: var(--header-brand);
  --header-link-hover-fg: var(--hato-text-inverse);

  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  block-size: var(--header-height);
  padding-inline: 12px;
  background: var(--header-bar-surface);
  color: var(--header-fg);
  /* Figma のカンプは palt なしで組まれているため、寸法を合わせて解除する */
  font-feature-settings: normal;
  transition: translate var(--header-show-duration) ease-out;
}

.header--overlay {
  /* MV の上に重ねる。JS が無い場合は固定せず、MV と一緒にスクロールさせる */
  position: absolute;
  inset: 0 0 auto;
}

.header--overlay:not(.is-mv-passed) {
  --header-bar-surface: transparent;
  --header-fg: var(--header-nav-text-overlay);
  --header-icon: var(--hato-icon-inverse);
  --header-surface: var(--header-nav-surface-overlay);
  --header-surface-hover: rgb(255 255 255 / 0.16);
  --header-link-hover-surface: rgb(255 255 255 / 0.16);
  --header-link-hover-fg: var(--header-nav-text-overlay);
  --header-surface-padding: 0px;
  --header-surface-radius: 2px;
  --header-surface-blur: blur(6px);
  --logo-mark-color: currentcolor;
}

.header.is-fixed {
  position: fixed;
}

/* 画面上方へ引き込んで隠す。フォーカスが入れば header.js が表示に戻す */
.header.is-hidden {
  translate: 0 -100%;
  transition: translate var(--header-hide-duration) ease-in;
}

@media (prefers-reduced-motion: reduce) {
  /* 移動させず、フェードで出し入れする */
  .header {
    transition: opacity var(--header-show-duration) ease-out;
  }

  .header.is-hidden {
    translate: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--header-hide-duration) ease-in;
  }

  /* ナビのハイライトは項目間をスライドさせず、移動先でフェードさせる */
  .header__nav .header__nav-highlight {
    transition: opacity var(--header-indicator-duration) var(--header-indicator-easing);
  }
}

.header__logo {
  display: block;
  color: inherit;
}

.header__logo-image {
  display: block;
  inline-size: 216px;
  block-size: auto;
}

.header__nav,
.header__contact {
  display: none;
}

.header__nav-list,
.header__contact {
  align-items: center;
  margin: 0;
  padding: var(--header-surface-padding);
  border-radius: 2px;
  background: var(--header-surface);
  backdrop-filter: var(--header-surface-blur);
}

.header__nav-list {
  display: flex;
  list-style: none;
}

/* ホバー・フォーカス中の項目を示すハイライト（JS が一覧を複製して作る装飾用の層）。
   紺地・白文字の一覧を clip-path で切り抜き、切り抜く位置を項目間でスライドさせる。
   背景と文字が同じ切り抜きで動くため、移動中も文字色と背景がずれない */
.header__nav-highlight {
  --header-indicator-duration: 300ms;
  --header-indicator-easing: ease;

  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: var(--header-surface-padding);
  border-radius: 2px;
  background: var(--header-link-hover-surface);
  color: var(--header-link-hover-fg);
  list-style: none;
  clip-path: inset(2px calc(100% - var(--header-indicator-end, 0px)) 2px var(--header-indicator-start, 0px) round 2px);
  opacity: 0;
  pointer-events: none;
  transition:
    clip-path var(--header-indicator-move, var(--header-indicator-duration)) var(--header-indicator-easing),
    opacity var(--header-indicator-duration) var(--header-indicator-easing);
}

.header__nav-highlight.is-visible {
  opacity: 1;
}

.header__nav-link {
  position: relative;
  isolation: isolate;
  display: block;
  padding: var(--header-nav-paddingy) var(--header-nav-paddingx);
  border-radius: 2px;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 300ms ease;
}

/* ホバー・現在地の背景。囲みの端から 2px 内側に置き、項目と囲みの寸法は変えない
   （Light は囲みの padding 2px で、Overlay はこの inset 2px で余白を作る） */
.header__nav-link::before {
  content: "";
  position: absolute;
  inset: calc(2px - var(--header-surface-padding));
  z-index: -1;
  border-radius: 2px;
  transition: background-color 300ms ease;
}

.header__nav-link:hover {
  color: var(--header-link-hover-fg);
}

.header__nav-link:hover::before {
  background: var(--header-link-hover-surface);
}

.header__nav-link[aria-current="page"] {
  color: var(--hato-text-inverse);
}

.header__nav-link[aria-current="page"]::before {
  background: var(--header-brand);
}

/* JS 有効時のナビ一覧：項目ごとのホバー・現在地の表現をやめ、ハイライトの層に任せる。
   現在地は aria-current="page" で保持し、ハイライトは通常そこに置く（ホバー・フォーカス中だけ移動する） */
.header__nav-list.is-enhanced .header__nav-link {
  color: inherit;
}

.header__nav-list.is-enhanced .header__nav-link::before {
  background: none;
}

.header__tel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-inline-size: none;
  margin: 0;
  /* 囲みの内側余白を含めて、端から 16px の位置にそろえる */
  padding-inline: calc(var(--header-nav-paddingx) - var(--header-surface-padding));
  line-height: 1;
  white-space: nowrap;
}

.header__tel-number {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.035em;
}

/* ℡ は Figma の描画（上寄せの小さな TEL）を SVG で再現する */
.header__tel-mark {
  display: block;
  flex-shrink: 0;
}

.header__tel-hours {
  font-size: 0.625rem;
  letter-spacing: 0.05em;
}

.header__menu-button {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--header-surface-radius);
  background: var(--header-surface);
  backdrop-filter: var(--header-surface-blur);
  color: var(--header-icon);
  cursor: pointer;
  transition: background-color 200ms ease-out;
}

.header__menu-button:hover {
  background: var(--header-surface-hover);
}

@media (width > 768px) and (width < 1080px) {
  .header {
    padding-inline: 24px;
  }
}

/* PC/SP の切替幅 1080px は header.js の matchMedia('(width >= 1080px)') と合わせる */
@media (width >= 1080px) {
  .header {
    /* 1440px までは左右 48px、それより広い画面では MV の本文幅（1344px）に揃える */
    padding-inline: max(48px, (100% - 1344px) / 2);
  }

  .header__logo-image {
    inline-size: 234px;
  }

  .header__nav,
  .header__contact {
    display: flex;
  }

  .header__nav {
    position: relative;
  }

  .header__menu-button {
    display: none;
  }
}

/* ==========================================================================
   Menu（SP メニュー／全画面のモーダルダイアログ）
   ========================================================================== */
.menu {
  position: fixed;
  inset: 0;
  inline-size: 100%;
  max-inline-size: none;
  block-size: 100%;
  max-block-size: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--hato-surface-base);
  color: var(--hato-text-primary);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-feature-settings: normal;
}

.menu[open] {
  display: flex;
  flex-direction: column;
  transition: translate 200ms ease-out;
}

@starting-style {
  .menu[open] {
    translate: 100% 0;
  }
}

.menu.is-closing {
  translate: 100% 0;
  transition: translate 160ms ease-in;
}

.menu::backdrop {
  background: transparent;
}

.menu__bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  box-sizing: content-box;
  block-size: var(--header-height);
  padding-inline: 12px;
  border-block-end: 1px solid var(--hato-border-subtle);
  color: var(--header-fg);
}

/* 閉じるボタンをヘッダーのメニューボタンと同じ位置にする */
@media (width > 768px) and (width < 1080px) {
  .menu__bar {
    padding-inline: 24px;
  }
}

.menu__list {
  margin: 0;
  padding: 8px 20px 0;
  list-style: none;
}

.menu__list > li + li {
  border-block-start: 1px solid var(--hato-border-subtle);
}

.menu__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
  color: var(--hato-text-primary);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.menu__link::after {
  content: "";
  flex-shrink: 0;
  inline-size: 16px;
  block-size: 16px;
  margin-inline-start: auto;
  background: rgb(1 1 1 / 0.35);
  mask: url("../img/icon-chevron.svg") center / contain no-repeat;
  rotate: -90deg;
}

/* 現在地：紺の左バー＋紺のラベル、矢印なし */
.menu__link[aria-current="page"] {
  gap: 12px;
  color: var(--header-brand);
}

.menu__link[aria-current="page"]::before {
  content: "";
  align-self: stretch;
  inline-size: 3px;
  background: var(--header-brand);
}

.menu__link[aria-current="page"]::after {
  display: none;
}

.menu__link--sub {
  padding-block: 16px;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.menu__consult {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-block-start: auto;
  padding: 24px 20px 28px;
  background: var(--hato-surface-page);
}

.menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: 64px;
  padding-inline: 16px;
  background: var(--header-brand);
  color: var(--hato-text-inverse);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  word-break: auto-phrase;
}

.menu__tel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.menu__tel-label {
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.menu__tel-number {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--header-brand);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
}

.menu__tel-mark {
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.035em;
}

@media (prefers-reduced-motion: reduce) {
  /* スライドをやめ、フェードのみにする */
  .menu[open] {
    transition: opacity 200ms ease-out;
  }

  @starting-style {
    .menu[open] {
      translate: none;
      opacity: 0;
    }
  }

  .menu.is-closing {
    translate: none;
    opacity: 0;
    transition: opacity 160ms ease-in;
  }
}

/* ==========================================================================
   Footer
   Figma: Footer 62:125。1024px 未満は Mobile（縦積み）、1024px 以上は Tablet / Desktop（横並び）
   ========================================================================== */
.footer {
  display: flex;
  flex-direction: column;
  gap: 48px;
  /* 本文幅 1200px を中央に置き、狭い画面では左右 24px を確保する */
  padding: 48px max(24px, (100% - 1200px) / 2) 24px;
  background: var(--hato-surface-inverse);
  color: var(--hato-text-inverse);
  /* Figma のカンプは palt なしで組まれているため、寸法を合わせて解除する */
  font-feature-settings: normal;
}

.footer__main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer__company {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__logo {
  --logo-mark-color: currentcolor;

  display: flex;
  align-items: center;
  align-self: flex-start;
  block-size: 24px;
  margin-block-end: 6px; /* ロゴと会社情報の間は 12px（gap 6px＋6px） */
  color: inherit;
}

.footer__logo-image {
  display: block;
  inline-size: 140px;
  block-size: auto;
}

.footer__business,
.footer__contact {
  max-inline-size: none;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

/* 幅が足りないときは「、」の後で改行する（Tablet / Mobile の改行位置） */
.footer__phrase {
  display: inline-block;
}

.footer__tel,
.footer__contact-number {
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.footer__tel {
  color: inherit;
  text-decoration: none;
}

.footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__link {
  display: block;
  padding: 2px;
  color: inherit;
  font-size: 0.75rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  white-space: nowrap;
}

.footer__link:hover {
  text-decoration: none;
}

.footer__copyright {
  margin: 0;
  font-size: 0.625rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.footer__copyright small {
  font-size: inherit;
}

@media (width >= 1024px) {
  .footer {
    padding-block-start: 64px;
  }

  .footer__main {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
  }

  .footer__company {
    flex: 1;
    min-inline-size: 0;
  }

  .footer__nav {
    flex-shrink: 0;
  }

  /* PC では発信リンクとして働かせない */
  .footer__tel {
    pointer-events: none;
  }

  .footer__nav-list {
    gap: 16px 32px;
  }

  .footer__link {
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   TOP の動き（2026-10-15 反映）
   JS（/assets/js/top.js）が動く環境だけ、<html> に .is-js を付けて演出の初期状態を有効にする（index.php）。
   JS が無い場合と動きを減らす設定のときは、最初から最終状態で表示する

   動きの仕様（DESIGN.md 7章。目的を一語で言えない動きは作らない）
   | 対象                   | 目的         | きっかけ              | 時間・遅延                         | イージング | 動きを減らす設定のとき       |
   |------------------------|--------------|-----------------------|------------------------------------|------------|------------------------------|
   | ヘッダー               | 入口の提示   | 初期表示              | 800ms／80ms                        | out        | 動かさずに表示               |
   | キャッチ（1 文字ずつ） | 主題の提示   | 初期表示（JS で分割） | 1 文字 640ms・間隔 34ms／260ms     | out        | 分割せずに表示               |
   | リード                 | 補足         | 初期表示              | 1200ms／300ms（位置のみ。LCP 対策）| out        | 動かさずに表示               |
   | 一時停止ボタン         | 操作の提示   | 初期表示              | 800ms／1300ms                      | out        | 動かさずに表示               |
   | 主な製作実績の帯       | 導線の提示   | 初期表示              | 帯 900ms／700ms、各項目 70ms 間隔  | out        | 動かさずに表示               |
   | MV の写真              | 場面の切替   | 6 秒ごと（1 巡で停止）| フェード 1400ms、ゆっくり引く 8s   | ease       | 自動では切り替えない         |
   | MV の写真（退場）      | 次への移行   | スクロール量          | MV が画面から出る間                | linear     | 動かさない                   |
   | 選ばれる理由の歯車     | 噛み合わせ   | スクロール量          | 画面を通過する間に半回転（交互）   | linear     | 動かさない                   |
   | 実績のリンク（帯・カード）| リンクの提示 | ホバー（カードはフォーカス・タップも）| 矢印 200ms（写真は拡大しない）      | ease | 動かさずに切り替え |
   | 対応範囲・会社概要の罫 | 製図の線     | 画面に入ったとき 1 回 | 900ms、間隔 80ms／開始 120ms       | out        | 罫を最初から表示             |
   | ご依頼の流れ           | 工程の順序   | スクロール量          | PC：横送り・矢印が青に／SP：区間ごとに線が青く伸びる | linear | 5 列（PC）・縦（SP）で静止、青は使わない |
   | よくある質問の開閉     | 開閉の連続性 | クリック              | 400ms                              | out        | 高さを補間しない             |
   | 相談導線の歯車         | 余韻         | スクロール量          | 画面を通過する間に 60°             | linear     | 動かさない                   |
   | 相談導線のボタン       | 押せる提示   | ホバー                | 矢印 200ms（.button）              | ease       | 動かさない                   |
   | ヘッダーの出し入れ     | 操作の確保   | 上下のスクロール      | 表示 250ms・非表示 350ms（header.js）| ease    | フェードで出し入れ           |
   | 相談の追従ボタン       | 入口の確保   | ヘッダーの状態・位置  | 表示 250〜300ms・非表示 200ms／ホバーは矢印 200ms | out | フェードのみ           |
   ========================================================================== */

/* ==========================================================================
   MV（TOP のメインビジュアル）
   2026-10-14 採用：案2「全面写真と下端の一覧」（Figma W0cMva… 421:8385 / 423:8385）
   - 画面の高さいっぱいの写真の左下にコピーを置く。色は重ねず、写真のトーンを整え、コピーの背後だけを局所的に暗くする
   - 実績 4 件は下端の濃い帯に並べる（1081px 以上は 1 段、769〜1080px は 2 列 2 段、768px 以下は縦 1 列）
   - 本文幅は 1344px を上限にし、広い画面でも間延びさせない
   ========================================================================== */
.mv {
  --mv-pad: 12px; /* ヘッダー（SP）の左右余白と揃える */
  --mv-gutter: max(var(--mv-pad), (100% - 1344px) / 2);

  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-block-size: clamp(560px, 100svh, 980px);
  /* 写真が下にずれても次のセクションへはみ出さない／帯のフェード中に下地が白く見えない */
  overflow: clip;
  background: var(--hato-surface-inverse);
  color: var(--hato-text-inverse);
  /* Figma のカンプは palt なしで組まれているため、寸法を合わせて解除する */
  font-feature-settings: normal;
}

/* SP：写真はコピーと同じ領域（実績の帯より上）だけに敷き、写真の中央を見せる */
.mv__photo {
  position: relative;
  z-index: -2;
  grid-area: 1 / 1;
  display: block;
  overflow: hidden;
}

/* 写真のトーンを記録写真のように少し落ち着かせる（色は足さない） */
/* 写真の縦横比で領域を広げないよう、写真は領域いっぱいに重ねる */
.mv__image {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 50% 55%;
  filter: brightness(0.86) saturate(0.82) contrast(1.06);
}

/* SP：コピーの背後だけを下から暗くする。写真が見える濃さに抑え、文字の位置で可読性を確保する */
.mv__copy {
  grid-area: 1 / 1;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 16px;
  padding: calc(var(--header-height) + 136px) var(--mv-gutter) 32px;
  background: linear-gradient(0deg, rgb(4 8 12 / 0.6) 0%, rgb(4 8 12 / 0.36) 55%, rgb(4 8 12 / 0) 100%);
}

/* キャッチの文字サイズはブレイクポイントごとに固定する（360px 未満 28px／375px 未満 30px／SP 34px／600〜768px 44px／Tablet 56px／PC 72px・84px。高さの低い PC は 64px・56px） */
.mv__title {
  margin: 0;
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  /* 「1個」の間に自動の和欧間アキを付けない */
  text-autospace: no-autospace;
}

/* 読点の後ろを半角分詰める */
.mv__title-punct {
  letter-spacing: -0.5em;
}

.mv__title-number {
  font-size: 1.2em;
  line-height: 1;
}

/* リードは文節で改行し、行末に 1 語だけ残らないようにする */
.mv__lead {
  max-inline-size: none;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.8;
  letter-spacing: 0.06em;
  word-break: auto-phrase;
}

@media (width < 375px) {
  .mv__title {
    font-size: 1.875rem;
  }
}

/* 360px 未満は、最も長いキャッチ（「出荷まで、一貫して。」）が 2 行に収まる大きさにする */
@media (width < 360px) {
  .mv__title {
    font-size: 1.75rem;
  }
}

@media (width >= 600px) and (width <= 768px) {
  .mv__title {
    font-size: 2.75rem;
  }
}

@media (width > 768px) {
  .mv {
    --mv-pad: 24px; /* 769〜1079px はヘッダーと同じ 24px（Figma 変数 Layout/Page/Padding の Tablet） */
  }

  /* 一時停止ボタンと進捗はコピーの右下に置く */
  .mv__copy {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px 32px;
    padding-block: calc(var(--header-height) + 48px) 40px;
    background: none;
  }

  .mv__titles,
  .mv__lead {
    grid-column: 1;
  }

  .mv__control {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: end;
    justify-self: end;
  }

  /* PC：写真は MV 全体に敷く（実績の帯は不透明なので写真は隠れる） */
  .mv__photo {
    position: absolute;
    inset: 0;
    grid-area: auto;
  }

  /* PC：コピーの背後（左下）だけを暗くする */
  .mv::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(0deg, rgb(4 8 12 / 0.8) 0%, rgb(4 8 12 / 0.5) 38%, rgb(4 8 12 / 0) 70%),
      linear-gradient(90deg, rgb(4 8 12 / 0.56) 0%, rgb(4 8 12 / 0.28) 45%, rgb(4 8 12 / 0) 65%);
  }

  .mv__title {
    font-size: 3.5rem;
    line-height: 1.25;
  }

  .mv__lead {
    font-size: 1rem;
  }
}

@media (width >= 1080px) {
  .mv {
    --mv-pad: 48px;
  }

  .mv__copy {
    row-gap: 28px;
  }

  .mv__title {
    font-size: 4.5rem;
    line-height: 1.2;
  }

  .mv__lead {
    font-size: 1.125rem;
  }
}

@media (width >= 1440px) {
  .mv__title {
    font-size: 5.25rem;
  }
}

/* 高さの低い PC 画面では、実績の帯が画面内に収まるようキャッチを縮める */
@media (width >= 1080px) and (height <= 820px) {
  .mv__title {
    font-size: 4rem;
  }

  .mv__copy {
    row-gap: 20px;
  }

  .mv__lead {
    font-size: 1rem;
  }
}

@media (width >= 1080px) and (height <= 680px) {
  .mv__title {
    font-size: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   MV：写真とキャッチの自動切り替え（top.js）
   - 6 秒ごとに切り替え、1 巡して最初の 1 枚に戻ったら止める（2026-09-30 合意）
   - 写真はフェード、キャッチは行ごとに入れ替える。キャッチは同じ領域に重ね、高さを変えない
   - 一時停止ボタンと進捗の線を置く。画面外・別タブでは止める
   -------------------------------------------------------------------------- */
.mv__slide-photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1400ms ease; /* top.js の leaveDuration と合わせる */
}

.mv__slide-photo.is-active {
  z-index: 1;
  opacity: 1;
}

/* 切り替え中、前の写真は新しい写真の下で表示したままにする（間に下地が見えないように） */
.mv__slide-photo.is-leaving {
  opacity: 1;
  transition: none;
}

/* 769px 以上：主題がキャッチと重ならないよう、写真ごとに拡大して右上へ寄せる（index.php の frame） */
@media (width > 768px) {
  .mv__slide-photo {
    transform: scale(var(--mv-frame-scale, 1));
    transform-origin: var(--mv-frame-origin, 50% 50%);
  }
}

/* SP の写真は 1 枚ごとに見せたい位置で切り抜く（600px 以上は PC 用の写真を使う） */
@media (width < 600px) {
  .mv__slide-photo .mv__image {
    object-position: var(--mv-sp-position, 50% 55%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* 表示中の写真はわずかに引いていき、静止画でも時間の流れを感じさせる */
  .mv__slide-photo.is-active .mv__image {
    animation: mv-settle 8s cubic-bezier(0.25, 0.1, 0.25, 1) both;
  }

  .mv.is-paused .mv__slide-photo .mv__image {
    animation-play-state: paused;
  }
}

@keyframes mv-settle {
  from {
    transform: scale(1.08);
  }
}

/* キャッチは同じ領域に重ね、最も高いものに合わせる（切り替えで高さが変わらない） */
.mv__titles {
  display: grid;
}

.mv__titles > .mv__title {
  grid-area: 1 / 1;
  align-self: end;
  transition: opacity 450ms ease, visibility 0s;
}

/* 表示していないキャッチ。h1 は読み上げの対象に残すため visibility は変えない */
.mv__title:not(.is-active) {
  opacity: 0;
  pointer-events: none;
}

p.mv__title:not(.is-active) {
  visibility: hidden;
  transition: opacity 450ms ease, visibility 0s 450ms;
}

@media (prefers-reduced-motion: no-preference) {
  .mv__title.is-entering .mv__line {
    animation: mv-line-in 900ms var(--ease-out) backwards;
    animation-delay: 300ms;
  }

  .mv__title.is-entering .mv__line + .mv__line {
    animation-delay: 400ms;
  }
}

@keyframes mv-line-in {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

/* 一時停止ボタンと進捗。SP はリードの下、PC はコピーの右下（配置は上の @media (width > 768px)） */
.mv__control {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mv__control[hidden] {
  display: none;
}

.mv__toggle {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 2px;
  background: rgb(4 8 12 / 0.32);
  color: var(--hato-text-inverse);
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.mv__toggle:hover {
  border-color: rgb(255 255 255 / 0.8);
  background: rgb(4 8 12 / 0.56);
}

.mv__toggle-icon {
  grid-area: 1 / 1;
}

.mv__toggle-icon--play,
.mv.is-stopped .mv__toggle-icon--pause,
.mv.is-paused-by-user .mv__toggle-icon--pause {
  display: none;
}

.mv.is-stopped .mv__toggle-icon--play,
.mv.is-paused-by-user .mv__toggle-icon--play {
  display: block;
}

.mv__progress {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mv__progress-item {
  inline-size: 28px;
  block-size: 2px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.32);
}

.mv__progress-bar {
  display: block;
  block-size: 100%;
  background: var(--hato-text-inverse);
  transform: scaleX(0);
  transform-origin: left;
}

.mv__progress-item.is-done .mv__progress-bar,
.mv.is-stopped .mv__progress-item.is-active .mv__progress-bar {
  transform: none;
}

/* 表示時間は進捗の線のアニメーションで数える（終わったら top.js が次へ進める） */
.mv.is-autoplay .mv__progress-item.is-active .mv__progress-bar {
  animation: mv-progress var(--mv-slide-duration, 6s) linear forwards;
}

.mv.is-paused .mv__progress-item.is-active .mv__progress-bar {
  animation-play-state: paused;
}

@keyframes mv-progress {
  to {
    transform: none;
  }
}

/* MV の退場：スクロールで写真がわずかに遅れて下がり、帯と次のセクションが上に重なっていく */
@supports (animation-timeline: view()) {
  @media (width > 768px) and (prefers-reduced-motion: no-preference) {
    .mv__photo {
      animation: mv-exit linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
  }
}

@keyframes mv-exit {
  to {
    transform: translateY(16%);
  }
}

/* --------------------------------------------------------------------------
   MV 内の実績一覧（主要な導線。一覧ページの各製品セクションへ移動する）
   -------------------------------------------------------------------------- */
.mv-works {
  --mv-works-line: rgb(255 255 255 / 0.16);
  --mv-works-sub: rgb(255 255 255 / 0.72);

  padding: 0 var(--mv-gutter) 8px;
  background: var(--hato-surface-inverse);
}

.mv-works__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  border-block-end: 1px solid var(--mv-works-line);
}

.mv-works__heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

/* 件数を示し、残りの実績があることを伝える */
.mv-works__count {
  color: var(--mv-works-sub);
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
}

.mv-works__more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.mv-works__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mv-works__item + .mv-works__item {
  border-block-start: 1px solid var(--mv-works-line);
}

.mv-works__link {
  --mv-works-thumb: 72px; /* 写真の幅 */

  display: grid;
  grid-template-columns: var(--mv-works-thumb) 1fr 16px;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
  color: inherit;
  text-decoration: none;
  transition: background-color 200ms ease;
}

.mv-works__link:hover {
  background: rgb(255 255 255 / 0.06);
}

.mv-works__photo {
  display: block;
  overflow: hidden;
  border-radius: 2px;
}

.mv-works__image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.mv-works__body {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
}

/* 名称・寸法・説明は文節で改行する（語の途中で折り返さない） */
.mv-works__name {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  word-break: auto-phrase;
}

/* 寸法は欧文・等幅数字で示す */
.mv-works__spec {
  font-feature-settings: "tnum";
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* 「外径 φ1,500mm」「2列」などの区切りの途中では改行しない */
.mv-works__spec-part {
  white-space: nowrap;
}

.mv-works__text {
  margin-block-start: 2px;
  color: var(--mv-works-sub);
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
  word-break: auto-phrase;
  text-wrap: pretty;
}

.mv-works__arrow,
.mv-works__more-icon {
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.mv-works__link:hover .mv-works__arrow,
.mv-works__more:hover .mv-works__more-icon {
  transform: translate(2px, -2px);
}

@media (width > 768px) {
  .mv-works {
    padding-block-end: 12px;
  }

  .mv-works__link {
    --mv-works-thumb: 88px;

    gap: 16px;
  }
}

/* 769〜1080px：2 列 2 段 */
@media (width > 768px) and (width <= 1080px) {
  .mv-works__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 32px;
  }

  .mv-works__item:nth-child(2) {
    border-block-start: 0;
  }
}

/* 1081px 以上：4 件を 1 段に並べ、縦の罫で区切る。説明文は写真の下まで広げる */
@media (width > 1080px) {
  .mv-works__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .mv-works__item {
    container-type: inline-size;
  }

  .mv-works__item + .mv-works__item {
    border-block-start: 0;
    border-inline-start: 1px solid var(--mv-works-line);
  }

  /* 項目の幅が狭いとき（1080〜1400px 前後）は、名称と寸法を写真の下に回して文字の幅を確保する */
  .mv-works__link {
    --mv-works-thumb: 96px;

    grid-template-columns: var(--mv-works-thumb) 1fr;
    grid-template-areas:
      "photo arrow"
      "name name"
      "spec spec"
      "text text";
    align-items: start;
    gap: 0 14px;
    padding: 18px 20px;
  }

  .mv-works__item:first-child .mv-works__link {
    padding-inline-start: 0;
  }

  .mv-works__item:last-child .mv-works__link {
    padding-inline-end: 0;
  }

  .mv-works__body {
    display: contents;
  }

  .mv-works__photo {
    grid-area: photo;
  }

  .mv-works__name {
    grid-area: name;
    margin-block-start: 12px;
  }

  .mv-works__spec {
    grid-area: spec;
  }

  .mv-works__text {
    grid-area: text;
    margin-block-start: 10px;
  }

  .mv-works__arrow {
    grid-area: arrow;
    justify-self: end;
  }

  /* 幅が足りるときは、名称と寸法を写真の横に置く */
  @container (width >= 320px) {
    .mv-works__link {
      grid-template-columns: var(--mv-works-thumb) 1fr 16px;
      grid-template-areas:
        "photo name arrow"
        "photo spec arrow"
        "text text text";
    }

    .mv-works__name {
      align-self: end;
      margin-block-start: 0;
    }
  }
}

/* 高さの低い PC 画面では行を詰め、4 件を画面内に収める */
@media (width > 768px) and (height <= 820px) {
  .mv-works__header {
    padding-block: 10px;
  }

  .mv-works .mv-works__link {
    --mv-works-thumb: 72px;

    column-gap: 14px;
    padding-block: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mv-works__arrow,
  .mv-works__more-icon {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   MV：初期表示
   ヘッダー（上から）→ キャッチ（1 文字ずつ）→ リード → 実績の帯（下から）→ 一時停止ボタンの順に、2.1 秒ほどで出そろう。
   ヘッダーの初期表示は transform で動かし、自動で隠す動き（translate）・固定・配色の切り替えとは干渉させない。
   animation-fill-mode: backwards なので、終了後は transform が残らない
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  body:has([data-mv]) .header {
    animation: intro-drop 800ms var(--ease-out) 80ms backwards;
  }

  .mv-works {
    animation: intro-rise 900ms var(--ease-out) 700ms backwards;
  }

  .mv-works__item {
    animation: intro-rise-small 800ms var(--ease-out) backwards;
    animation-delay: calc(820ms + var(--mv-works-index, 0) * 70ms);
  }

  .mv-works__item:nth-child(2) { --mv-works-index: 1; }
  .mv-works__item:nth-child(3) { --mv-works-index: 2; }
  .mv-works__item:nth-child(4) { --mv-works-index: 3; }

  /* リードは LCP の対象になるため（画面全体の写真は対象外、キャッチは 1 文字ずつに分かれる）、
     透明にせず最初から表示し、位置だけを動かす */
  .mv__lead {
    animation: intro-shift 1200ms var(--ease-out) 300ms backwards;
  }

  .mv__control {
    animation: intro-fade 800ms var(--ease-out) 1300ms backwards;
  }

  /* キャッチ：JS が 1 文字ずつに分けるまで隠す。JS が止まっても 1.6 秒後には表示する */
  .is-js .mv__title[data-intro]:not(.is-split) {
    opacity: 0;
    animation: intro-failsafe 0s 1.6s forwards;
  }

  .mv__char {
    display: inline-block;
    animation: intro-char 640ms var(--ease-out) backwards;
    animation-delay: calc(260ms + var(--i) * 34ms);
  }
}

/* キャッチの 1 行と、分割した文字の行。行頭に句読点が来ないよう、句読点は直前の文字と同じ単位にしている（top.js） */
.mv__line,
.mv__title-visual {
  display: block;
}

@keyframes intro-drop {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@keyframes intro-rise {
  from {
    opacity: 0;
    transform: translateY(64px);
  }
}

@keyframes intro-rise-small {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes intro-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes intro-shift {
  from {
    transform: translateY(16px);
  }
}

@keyframes intro-char {
  from {
    opacity: 0;
    transform: translateY(0.32em);
  }
}

@keyframes intro-failsafe {
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   TOP の MV 以降のセクション（共通部品）
   Figma: top(PC) 210:460 / top(Mobile) 210:432（W0cMva…）
   本文幅は最大 1200px（フッターと同じ）。768px 以下は SP の組み方
   ========================================================================== */
.reasons,
.works,
.faq,
.company,
.consult {
  /* Figma のカンプは palt なしで組まれているため、寸法を合わせて解除する */
  font-feature-settings: normal;
}

/* セクション見出し（Figma: HATO / Typography / JP / H2） */
.section-title {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

@media (width > 768px) {
  .section-title {
    font-size: 2rem;
    line-height: 1.4;
  }

  .section-title--center {
    text-align: center;
  }
}

/* 紺のボタン（文言＋矢印の箱） */
.button {
  display: inline-flex;
  gap: 2px;
  border-radius: 2px;
  overflow: hidden;
  color: var(--hato-text-inverse);
  text-decoration: none;
}

.button__label,
.button__icon {
  display: grid;
  place-items: center;
  block-size: 52px;
  background: var(--header-brand);
  transition: background-color 200ms ease;
}

.button__label {
  min-inline-size: 152px;
  padding-inline: 24px;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.button__icon {
  inline-size: 52px;
}

.button__icon svg {
  transition: transform 200ms ease;
}

.button:hover .button__icon svg {
  transform: translate(2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  .button__icon svg {
    transition: none;
  }
}

/* 罫を引く（対応範囲・会社概要で共通） */
@media (prefers-reduced-motion: no-preference) {
  .is-js .works__spec + .works__spec,
  .is-js .company__row + .company__row {
    position: relative;
    border-block-start-color: transparent;
  }

  .is-js .works__spec + .works__spec::before,
  .is-js .company__row + .company__row::before {
    content: "";
    position: absolute;
    inset: -1px 0 auto;
    block-size: 1px;
    background: var(--hato-border-subtle);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 900ms var(--ease-out);
    transition-delay: calc(var(--rule-index, 0) * 80ms + 120ms);
  }

  .works__range.is-inview .works__spec::before,
  .company__table.is-inview .company__row::before {
    transform: none;
  }

  .works__spec:nth-child(3) { --rule-index: 1; }
  .company__row:nth-child(3) { --rule-index: 1; }
  .company__row:nth-child(4) { --rule-index: 2; }
  .company__row:nth-child(5) { --rule-index: 3; }
  .company__row:nth-child(6) { --rule-index: 4; }
  .company__row:nth-child(7) { --rule-index: 5; }
  .company__row:nth-child(8) { --rule-index: 6; }
  .company__row:nth-child(9) { --rule-index: 7; }
  .company__row:nth-child(10) { --rule-index: 8; }
}

/* ==========================================================================
   選ばれる理由（Figma: PC 210:464 / SP 214:632）
   内容量：同格の理由 3 つ（見出し＋2 文）。比べて読める形にする
   - 左右の端は前後のセクション（製作実績・ご依頼の流れ）の本文幅にそろえ、このセクションだけが左に寄って見えないようにする
   - 本文の行長は 25〜35 字に収める（DESIGN.md 4章の狭いカラム）。収まらない幅では組み方を変える
     - 769〜959px：1 列（歯車＋見出し・本文）。本文は 1 文ごとに改行せず続けて組み、行長で右端まで使う
     - 960〜1199px：1 行に「歯車・見出し・本文」を並べる。見出しの列と本文の列に分け、右側の空白を作らない
     - 1200px 以上：3 列。見出しの行をそろえ（subgrid）、本文の書き出しを同じ高さにする。横に並んだ歯車が逆向きに回る
   - 歯車は全幅で 80px（Figma の寸法）に固定し、広い画面でも拡大しない（SP は 56px）
   - 見出しの 1 行目は歯車の中心の高さに置き、番号と見出しを 1 組に見せる
   - 区切りは余白だけで作る（理由の始まりは歯車と番号で分かるため、罫は引かない）
   ========================================================================== */
.reasons {
  display: grid;
  gap: 48px;
  padding: 80px 24px;
  background: var(--hato-surface-page);
}

.reasons__list {
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reasons__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

/* 歯車の中央に番号を重ねる。SP は歯車を小さくして見出しの幅を確保する（「直径2mの」の途中で折れないように） */
.reasons__icon {
  position: relative;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  inline-size: 56px;
  block-size: 56px;
}

.reasons__gear {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

/* スクロール連動（下の @supports）に対応しないブラウザでは、表示されたときに 1 回だけ半回転させる（top.js が .is-inview を付ける）。
   動きを減らす設定では回さない */
@media (prefers-reduced-motion: no-preference) {
  .reasons__item.is-inview .reasons__gear {
    rotate: 180deg;
    transition: rotate 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .reasons__item:nth-child(2).is-inview .reasons__gear {
    transition-delay: 120ms;
  }

  .reasons__item:nth-child(3).is-inview .reasons__gear {
    transition-delay: 240ms;
  }
}

.reasons__number {
  position: relative;
  color: #010101;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
}

.reasons__body {
  display: grid;
  flex: 1;
  gap: 12px;
  min-inline-size: 0;
}

/* SP は 1 行約 14 字にし、「小さな歯車から、直径2mの」を 1 行に収める */
.reasons__heading {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.05em;
  /* 行の長さをそろえず、文節で改行して行数を抑える */
  text-wrap: wrap;
}

.reasons__text {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

/* 375px 未満：歯車を見出しの上に置き、本文の幅を確保する */
@media (width < 375px) {
  .reasons__item {
    flex-direction: column;
    gap: 12px;
  }
}

/* 769px 以上：一覧は本文幅いっぱいに置き、本文は文を続けて組む（行の長さがそろい、右端の空白が文ごとに変わらない） */
@media (width > 768px) {
  .reasons {
    padding: 96px 48px;
  }

  .reasons__list {
    gap: 48px;
  }

  .reasons__item {
    gap: 32px;
  }

  .reasons__icon {
    inline-size: 80px;
    block-size: 80px;
  }

  .reasons__number {
    font-size: 1.25rem;
  }

  /* 見出しの 1 行目（行の高さ 32px）を歯車（80px）の中心にそろえる */
  .reasons__body {
    margin-block-start: 24px;
  }

  .reasons__heading {
    font-size: 1.375rem;
  }

  .reasons__text {
    max-inline-size: 40ic;
    font-size: 1rem;
    line-height: 1.8;
  }
}

/* 960〜1199px：歯車・見出し・本文を 1 行に並べる。本文の列は 26〜34 字（幅の 52%、26ic〜34ic の範囲）。残りを見出しの列にする */
@media (960px <= width < 1200px) {
  .reasons__item {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) clamp(26ic, 52%, 34ic);
    align-items: baseline;
    gap: 32px;
  }

  .reasons__icon {
    align-self: start;
  }

  .reasons__body {
    display: contents;
  }

  /* 見出しの 1 行目を歯車の中心に置き、本文の 1 行目はそのベースラインにそろえる */
  .reasons__heading {
    margin-block-start: 24px;
  }

  .reasons__text {
    max-inline-size: none;
  }
}

@media (width >= 1200px) {
  .reasons {
    gap: 64px;
    padding: 128px max(48px, (100% - 1200px) / 2);
  }

  /* 3 列。各理由は「歯車・見出し・本文」の 3 行を共有し、見出しの高さが違っても本文の書き出しをそろえる */
  .reasons__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    gap: 16px 48px;
  }

  .reasons__item {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    gap: inherit;
  }

  .reasons__body {
    display: contents;
  }

  /* 歯車と見出しの間（24px）より、見出しと本文の間（16px）を狭くし、見出しと本文を 1 つのまとまりに見せる */
  .reasons__icon {
    margin-block-end: 8px;
  }

  .reasons__heading {
    align-self: start;
  }

  .reasons__text {
    max-inline-size: none;
  }
}

/* 歯車：スクロールに合わせて回り、隣り合う歯車は逆向きに回る */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reasons__gear {
      animation: gear-mesh linear both;
      animation-timeline: view();
      animation-range: cover;
    }

    .reasons__item:nth-child(even) .reasons__gear {
      animation-name: gear-mesh-reverse;
    }
  }
}

@keyframes gear-mesh {
  from {
    rotate: -90deg;
  }

  to {
    rotate: 90deg;
  }
}

@keyframes gear-mesh-reverse {
  from {
    rotate: 90deg;
  }

  to {
    rotate: -90deg;
  }
}

/* ==========================================================================
   製作実績（Figma: PC 210:472 / SP 217:669）
   1081px 以上は左に説明・対応範囲、右に写真 3 列。1080px 以下は縦に積む
   よくある質問（.faq）も同じ組み方のため、見出し・リード・外枠を共有する
   写真と品名を 1 枚のカード（1 つのリンク）にする
   - 近接：写真と品名の間（8px）＜ カードの間（横 16px・縦 32px）。品名がどの写真に属するかを距離だけで示す（罫・囲みは使わない）
   - リンクの反応は MV の実績の帯と同じにする：矢印を右上へ 2px（200ms・ease）。写真は拡大しない
     - キーボードフォーカスとタップ中もホバーと同じ状態にする。ホバーの表現はホバーできる端末だけで使う
     - 矢印は常に表示し、ホバーできない端末でもリンクだと分かるようにする
   ========================================================================== */
.works,
.faq {
  display: grid;
  gap: 24px;
  padding: 56px 24px;
  background: var(--hato-surface-tint);
  color: var(--hato-text-secondary);
}

.works__title,
.faq__title {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.works__lead,
.faq__lead {
  max-inline-size: none;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

/* 1 文ごとに改行する */
.works__sentence {
  display: block;
}

.works__range {
  display: grid;
  gap: 10px;
  padding-block-start: 20px;
}

.works__range-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.works__specs {
  margin: 0;
}

.works__spec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}

.works__spec + .works__spec {
  border-block-start: 1px solid var(--hato-border-subtle);
}

.works__spec-label {
  font-size: 0.75rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.works__spec-value {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.works__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.works__item {
  min-inline-size: 0;
}

.works__card {
  display: grid;
  gap: 8px;
  border-radius: 2px;
  color: var(--hato-text-primary);
  text-decoration: none;
}

.works__card:focus-visible {
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 4px;
}

.works__frame {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--hato-surface-muted);
}

/* 品名と矢印。矢印は品名の 1 行目の高さに置く */
.works__name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  word-break: auto-phrase;
}

.works__arrow {
  flex-shrink: 0;
  margin-block-start: 3px;
  color: var(--header-brand);
  transition: transform 200ms ease;
}

.works__image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 165 / 120;
  border-radius: 2px;
  object-fit: cover;
}

.works__more,
.faq__more {
  justify-self: start;
}

@media (width > 600px) {
  .works__gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 16px;
  }

  .works__image {
    aspect-ratio: 240 / 170;
  }
}

@media (width > 768px) {
  .works,
  .faq {
    padding: 72px max(48px, (100% - 1200px) / 2);
  }

  .works__title,
  .faq__title {
    font-size: 1.5rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
  }

  .works__lead,
  .faq__lead {
    font-size: 1rem;
    line-height: 1.75;
  }

  .works__range {
    padding-block-start: 24px;
  }

  .works__range-title {
    font-size: 1rem;
  }

  .works__spec {
    padding-block: 12px;
  }

  .works__spec-label {
    font-size: 0.875rem;
  }

  .works__spec-value {
    font-size: 1rem;
  }

  .works__name {
    font-size: 0.875rem;
  }
}

@media (width > 1080px) {
  .works,
  .faq {
    grid-template-columns: 408px minmax(0, 744px);
    justify-content: center;
    align-items: start;
    column-gap: 48px;
    row-gap: 0;
    padding-block: 144px;
  }

  .works > :not(.works__gallery),
  .faq > :not(.faq__list) {
    grid-column: 1;
  }

  .works__lead,
  .faq__lead {
    margin-block-start: 16px;
  }

  .works__range,
  .works__more,
  .faq__more {
    margin-block-start: 24px;
  }

  /* 写真は左の列全体の高さに対して上下中央に置く */
  .works__gallery {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
  }
}

@media (hover: hover) {
  .works__card:hover .works__arrow {
    transform: translate(2px, -2px);
  }
}

/* キーボードフォーカスとタップ中は、ホバーと同じ状態にする（輪郭はフォーカスの輪で示す） */
.works__card:focus-visible .works__arrow,
.works__card:active .works__arrow {
  transform: translate(2px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  /* MV の帯と同じく、補間せずに切り替える */
  .works__arrow {
    transition: none;
  }
}

/* ==========================================================================
   ご依頼の流れ（.process）
   参考：shikokusenki.com「事業内容」の横送り、Figma W0cMva… 364:7914 の 5 列
   - 既定：SP・Tablet は縦に並べ、左の線がスクロールに合わせて伸びる。PC は 5 列で一覧できる
   - .is-pinned（1080px 以上・高さ 680px 以上・動きを減らす設定でないとき）：画面に固定し、縦スクロールで工程を横に送る
   暗い地にして MV の帯と色を揃え、ページの中盤に区切りを作る
   ========================================================================== */
.process {
  --process-line: rgb(255 255 255 / 0.16);
  --process-sub: rgb(255 255 255 / 0.72);
  --process-p: 0; /* 進み具合（0〜1。process.js が更新） */

  padding: 80px 24px 96px;
  background: var(--hato-surface-inverse);
  color: var(--hato-text-inverse);
  font-feature-settings: normal;
}

.process__stage {
  display: grid;
  gap: 40px;
}

.process__intro {
  display: grid;
  align-content: start;
  gap: 20px;
}

.process__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

/* 納期の目安（本文の「おおよそ1か月が目安」を要約して先に示す） */
.process__leadtime {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-self: start;
  gap: 4px 12px;
  max-inline-size: none;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--process-line);
  border-radius: 2px;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.process__leadtime-label {
  color: var(--process-sub);
}

.process__leadtime-value {
  font-size: 1rem;
  font-weight: 700;
}

.process__leadtime-number {
  font-family: "Roboto", sans-serif;
  font-size: 1.25em;
  margin-inline: 0.1em;
}

.process__leadtime-note {
  color: var(--process-sub);
  font-size: 0.8125rem;
}

.process__progress {
  display: none;
}

.process__steps {
  position: relative;
  display: grid;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
  工程の線の意味（PC・SP 共通）
  - 白・灰の線：工程の順序（まだ読んでいない区間。固定しない 5 列表示・動きを減らす設定では順序だけを示す）
  - 青（--motion-accent）：読み進めた分。進み具合を追う表示（SP・Tablet の縦の線、PC の横送りの矢印と進捗の線）でだけ使う
  縦の線（SP・Tablet）は工程ごとの区間にし、番号から次の工程の番号までを結ぶ。最後の工程の下には引かない（終点を示す）
  区間ごとの進み具合 --process-seg（0〜1）は process.js が更新する
*/
.process__step {
  --process-seg: 0;

  position: relative;
  display: grid;
  grid-template-areas:
    "number illust"
    ".      body";
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
}

.process__step:not(:last-child)::before,
.process__step:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-block: 8px calc(-1 * var(--process-step-gap, 48px));
  inset-inline-start: 19.5px;
  inline-size: 1px;
  background: var(--process-line);
}

.process__step:not(:last-child)::after {
  background: var(--motion-accent);
  transform: scaleY(var(--process-seg));
  transform-origin: top;
}

/* 工程番号。線の上に重ね、地色で線を隠す */
.process__number {
  position: relative;
  z-index: 1;
  grid-area: number;
  align-self: start;
  max-inline-size: none;
  margin: 0;
  padding-block: 4px;
  background: var(--hato-surface-inverse);
  color: var(--process-sub);
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  transition: color 300ms ease;
}

.process__step.is-passed .process__number,
.process__step.is-current .process__number {
  color: var(--hato-text-inverse);
}

.process__illust {
  display: block;
  grid-area: illust;
  inline-size: 100%;
  max-inline-size: 360px;
  block-size: auto;
  aspect-ratio: 245 / 184;
  border-radius: 2px;
  background: #f2f4f7;
}

.process__body {
  display: grid;
  grid-area: body;
  align-content: start;
  gap: 8px;
}

.process__heading {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.process__text {
  margin: 0;
  color: var(--process-sub);
  font-size: 0.875rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 600px 未満：番号と工程名を 1 行にまとめ、何の工程かを図より先に示す（番号・工程名 → 図 → 説明の順に読む） */
@media (width < 600px) {
  .process__step {
    grid-template-areas:
      "number heading"
      ".      illust"
      ".      text";
    align-items: center;
    row-gap: 12px;
  }

  .process__body {
    display: contents;
  }

  .process__number {
    align-self: center;
  }

  .process__heading {
    grid-area: heading;
  }

  .process__text {
    grid-area: text;
  }

  /* 工程の中のリンクは説明の下（番号の列には置かない） */
  .process__link {
    grid-column: 2;
  }
}

/* 600px 以上：イラストと本文を横に並べる */
@media (width >= 600px) {
  .process__step {
    grid-template-areas: "number illust body";
    grid-template-columns: 40px minmax(0, 240px) minmax(0, 1fr);
    column-gap: 24px;
  }
}

/* 769px 以上：見出しと納期の目安を横に並べ、イラストを大きくする（1080px 以上は下で上書き） */
@media (width > 768px) {
  .process {
    padding: 96px 48px 112px;
  }

  .process__title {
    font-size: 2rem;
    line-height: 1.4;
  }

  .process__intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .process__step {
    grid-template-columns: 40px 280px minmax(0, 1fr);
  }

  .process__text {
    font-size: 1rem;
  }
}

/* 1080px 以上（固定しないとき）：Figma 364:7914 の 5 列。番号の右に次の工程への矢印を引く */
@media (width >= 1080px) {
  .process {
    padding: 120px max(48px, (100% - 1200px) / 2) 128px;
  }

  .process__stage {
    gap: 56px;
  }

  .process__steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
  }

  /* 1080px 以上は縦の線を使わない（番号の右の矢印で順序を示す） */
  .process__step:not(:last-child)::before,
  .process__step:not(:last-child)::after {
    display: none;
  }

  .process__step {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .process__number {
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 16px;
    padding: 0;
    background: none;
    color: var(--hato-text-inverse);
    font-size: 2.5rem;
    text-align: start;
  }

  /* 次の工程への矢印（最後の工程には付けない）。右端は次の番号の手前まで伸ばす */
  .process__step:not(:last-child) .process__number::after {
    content: "";
    flex: 1;
    block-size: 10px;
    margin-inline-end: -16px;
    background:
      linear-gradient(rgb(255 255 255 / 0.4), rgb(255 255 255 / 0.4)) left center / calc(100% - 4px) 1px no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23fff' stroke-opacity='.6'/%3E%3C/svg%3E") right center / 6px 10px no-repeat;
  }

  .process__illust {
    max-inline-size: none;
  }

  .process__text {
    font-size: 0.875rem;
  }
}

/* --------------------------------------------------------------------------
   .process--detail：ご依頼の流れ・よくある質問ページの詳細版（guide/index.php）
   TOP（概要）は PC で 5 列・横送りにするが、こちらは工程の説明を縦に並べる
   - 1079px 以下：各工程のイラストを説明のそばに置き、図と説明を 1 組で読めるようにする
   - 線は画面の高さ 60% の位置を基準に、読み進めた区間だけ青く伸ばす（process.js。TOP の SP・Tablet と同じ）
   - 1080px 以上・JS が有効：左に見出し・リード・納期の目安と図（.process__figure）、右に説明を置く。
     左を追従させ、読んでいる工程の図へフェードで切り替える（下の「1080px 以上・JS が有効」の項）
   - 1080px 以上・JS が無い：左に見出し・リード・納期の目安を固定し、右に工程（図と説明）を並べる
   -------------------------------------------------------------------------- */
.process__lead {
  max-inline-size: none;
  margin: 0;
  color: var(--process-sub);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 工程の中のリンク（相談：お問い合わせフォームへ） */
.process__link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-block-size: 44px;
  color: var(--hato-text-inverse);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.process__link:hover {
  text-decoration: none;
}

.process--detail .process__intro {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (width >= 1080px) {
  .process--detail .process__stage {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 0 72px;
  }

  .process--detail .process__intro {
    position: sticky;
    inset-block-start: calc(var(--header-height) + 32px);
  }

  .process--detail .process__steps {
    --process-step-gap: 64px;

    grid-template-columns: minmax(0, 1fr);
    gap: var(--process-step-gap);
  }

  .process--detail .process__step {
    display: grid;
    grid-template-areas: "number illust body";
    grid-template-columns: 40px minmax(0, 280px) minmax(0, 1fr);
    gap: 0 24px;
  }

  .process--detail .process__step:not(:last-child)::before,
  .process--detail .process__step:not(:last-child)::after {
    display: block;
  }

  .process--detail .process__number {
    display: block;
    align-self: start;
    padding-block: 4px;
    background: var(--hato-surface-inverse);
    color: var(--process-sub);
    font-size: 1.25rem;
    text-align: center;
  }

  .process--detail .process__step.is-passed .process__number {
    color: var(--hato-text-inverse);
  }

  .process--detail .process__step:not(:last-child) .process__number::after {
    content: none;
  }

  .process--detail .process__text {
    font-size: 1rem;
  }
}

/* 追従する図は、1080px 以上・JS が有効なときだけ使う */
.process__figure {
  display: none;
}

/*
  1080px 以上・JS が有効：見出し・リード・納期の目安と図を左、説明を右に置き、左を追従させる
  （JS が無いと図を切り替えられないため、scripting で分ける）
  - 高さ 680px 以上：見出しから図までをまとめて追従させる（.process__intro。図は .process__intro の中にある）
  - 高さ 680px 未満：見出しまで入れると図が小さくなりすぎるため、見出しはスクロールで流し、図だけを追従させる
    （.process__intro を display: contents にして、図を左の列の最後の行に置く）
  - 図の高さ --process-figure-h：左の列の幅に収まる高さと、固定ヘッダーの下に上下 32px を空けて画面に収まる高さの小さいほう
    （見出しも追従させるときは、見出しの分を引く）。高さの低い画面では図を縮め、見切れないようにする
  - 見出しの高さ --process-intro-head（見出しの上端〜納期の目安の下端）は process.js が測る。右の工程の列はその分と図までの間隔
    （--process-figure-offset）を上に空け、各工程の区間が図の横に並ぶようにする
  - 各工程の区間は図と同じ高さにし、少ないスクロール量で図が続けて切り替わらないようにする。
    説明は区間の上端に置き、余りは下に回す。区間が図の横に並んだとき、説明の上端が図の上端と揃う（2026-10-16 指示）
  - 切り替えの基準は図の中央の高さ（process.js）。工程の区間の上端がここを越えたら、その工程の図にする。
    スクロールの向きによらず位置だけで決まるため、上へ戻っても説明と図が一致する
  - 追従は左の列の中で行い、最後の工程の区間の下端（セクションの終端）で終える
*/
@media (width >= 1080px) and (scripting: enabled) {
  .process--detail .process__stage {
    --process-col-gap: 64px;
    --process-figure-gap: 32px; /* 納期の目安と図の間 */
    --process-figure-offset: calc(var(--process-intro-head, 168px) + var(--process-figure-gap)); /* 見出しの上端〜図の上端 */
    --process-figure-max: calc((100cqi - var(--process-col-gap)) / 2 * 184 / 245);
    --process-figure-h: min(var(--process-figure-max), 100svh - var(--header-height) - 64px);

    container-type: inline-size;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px var(--process-col-gap);
  }

  /*
    説明は右の列（2026-10-16 指示で図と左右を入れ替えた）。上の余白で工程 1 の区間を図の上端に合わせる。
    工程名の行の上の半行分（(1.4 - 1) / 2 × 20px = 4px）を引き、工程名・番号の文字の上端を図の上端に揃える
  */
  .process--detail .process__viewport {
    grid-column: 2;
    grid-row: 1 / -1;
    padding-block-start: calc(var(--process-figure-offset) - 4px);
  }

  /* 工程の間は空けず、区間の高さ（min-block-size）で間隔を取る。線は区間の下端（次の工程の番号）まで伸ばす */
  .process--detail .process__steps {
    --process-step-gap: 0px;

    gap: 0;
  }

  .process--detail .process__step {
    grid-template-areas: "number body";
    grid-template-columns: 40px minmax(0, 1fr);
    align-content: start;
    min-block-size: var(--process-figure-h);
  }

  .process--detail .process__illust {
    display: none;
  }

  /* 見出しの行の間隔（20px）に足して、納期の目安との間を --process-figure-gap にする */
  .process--detail .process__figure {
    display: block;
    margin-block-start: calc(var(--process-figure-gap) - 20px);
  }

  .process__figure-frame {
    display: grid;
    block-size: var(--process-figure-h);
    max-inline-size: 100%;
    aspect-ratio: 245 / 184;
    overflow: hidden;
    border-radius: 2px;
    background: #f2f4f7; /* .process__illust と同じ。切り替えの途中で暗い地が透けないようにする */
  }

  /* 図は重ねて置き、読んでいる工程の 1 枚だけを表示する（重ねるため、切り替えてもレイアウトは動かない） */
  .process__figure-image {
    grid-area: 1 / 1;
    inline-size: 100%;
    block-size: 100%;
    opacity: 0;
    transition: opacity 250ms ease;
  }

  .process__figure-image.is-active {
    opacity: 1;
  }
}

/* 高さ 680px 以上：見出しから図までをまとめて追従させる。画面の高さに余裕があるときは上下中央に置く（固定ヘッダーの下 32px より上には出さない） */
@media (width >= 1080px) and (height >= 680px) and (scripting: enabled) {
  .process--detail .process__stage {
    --process-figure-h: min(var(--process-figure-max), 100svh - var(--header-height) - 64px - var(--process-figure-offset));
  }

  .process--detail .process__intro {
    grid-column: 1;
    grid-row: 1 / -1;
    inset-block-start: max(var(--header-height) + 32px, (100svh - var(--process-figure-offset) - var(--process-figure-h)) / 2);
  }
}

/* 高さ 680px 未満：見出し・リード・納期の目安は流し、図だけを左の列の最後の行で追従させる */
@media (width >= 1080px) and (height < 680px) and (scripting: enabled) {
  .process--detail .process__stage {
    grid-template-rows: auto auto auto 1fr; /* 工程の列の高さの余りを、図の行（1fr）に回す */
  }

  .process--detail .process__intro {
    display: contents;
  }

  .process--detail .process__title,
  .process--detail .process__lead,
  .process--detail .process__leadtime {
    grid-column: 1;
  }

  .process--detail .process__figure {
    grid-area: 4 / 1;
    align-self: stretch;
  }

  .process__figure-frame {
    position: sticky;
    inset-block-start: max(var(--header-height) + 32px, (100svh - var(--process-figure-h)) / 2);
  }
}

/* --------------------------------------------------------------------------
   .is-pinned：画面に固定し、縦スクロールで工程を横に送る（process.js が付ける）
   左に見出し・納期の目安・現在の工程、右に工程のカード。セクションの高さ＝画面の高さ＋横に送る距離
   -------------------------------------------------------------------------- */
.process.is-pinned {
  --process-illust-h: clamp(220px, calc(100svh - 440px), 380px);
  --process-card: calc(var(--process-illust-h) * 245 / 184);
  --process-gap: 80px;

  /* --process-travel は process.js が渡す、固定中にスクロールする距離（送り始めるまでの距離＋横に送る距離） */
  block-size: calc(100svh + var(--process-travel, 0px));
  padding: 0;
}

.process.is-pinned .process__stage {
  position: sticky;
  top: 0;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  block-size: 100svh;
  padding: calc(var(--header-height) + 16px) 0 40px max(48px, (100% - 1344px) / 2);
  overflow: hidden;
}

.process.is-pinned .process__intro {
  grid-template-columns: none;
  gap: 24px;
  padding-inline-end: 40px;
}

/* 現在の工程：歯車（工程ごとに形が変わり、進むほど回る）・番号・進み具合の線 */
.process.is-pinned .process__progress {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px 20px;
  margin-block-start: 24px;
}

.process__progress-gears {
  display: grid;
  inline-size: 72px;
  block-size: 72px;
  rotate: calc(var(--process-p) * 540deg);
}

.process__progress-gear {
  grid-area: 1 / 1;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
  transition: opacity 300ms ease;
}

.process__progress-gear.is-active {
  opacity: 1;
}

.process__progress-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  line-height: 1;
}

.process__progress-current {
  font-size: 2.5rem;
  font-variant-numeric: tabular-nums;
}

.process__progress-total {
  color: var(--process-sub);
  font-size: 1rem;
}

.process__progress-track {
  grid-column: 1 / -1;
  block-size: 2px;
  background: var(--process-line);
}

.process__progress-bar {
  display: block;
  block-size: 100%;
  background: var(--motion-accent);
  transform: scaleX(var(--process-p));
  transform-origin: left;
}

/* 右のカードの列。左端は地色へ溶かし、送られたカードが見出しの列に重ならないようにする */
.process.is-pinned .process__viewport {
  align-self: stretch;
  display: flex;
  align-items: center;
  min-inline-size: 0;
  overflow: hidden;
  /* 送り始めるまでは最初のカードに掛からないよう、フェードの幅を進み具合に合わせて広げる */
  --process-fade: clamp(1px, calc(var(--process-p) * 4000px), 128px);

  mask-image: linear-gradient(90deg, transparent 0, #000 var(--process-fade));
}

.process.is-pinned .process__steps {
  position: relative; /* カードの位置（offsetLeft）の基準 */
  display: flex;
  gap: 0;
  inline-size: max-content;
  padding-inline-start: 48px;
  will-change: transform;
}

.process.is-pinned .process__step {
  display: flex;
  flex-direction: column;
  gap: 24px;
  inline-size: calc(var(--process-card) + var(--process-gap));
  padding-inline-end: var(--process-gap);
  transition: opacity 400ms ease;
}

/* いま読んでいる工程以外は控えめにする */
.process.is-pinned .process__step:not(.is-current) {
  opacity: 0.4;
}

.process.is-pinned .process__number {
  font-size: 3rem;
}

/* 矢印は、読み進めた分だけ左から青く伸びる（SP の縦の線と同じ「青＝読み進めた分」。--process-seg は process.js が更新） */
.process.is-pinned .process__step:not(:last-child) .process__number::after {
  margin-inline-end: calc(-1 * var(--process-gap) + 16px);
  background:
    linear-gradient(var(--motion-accent), var(--motion-accent)) left center / calc((100% - 4px) * var(--process-seg)) 1px no-repeat,
    linear-gradient(rgb(255 255 255 / 0.4), rgb(255 255 255 / 0.4)) left center / calc(100% - 4px) 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23fff' stroke-opacity='.6'/%3E%3C/svg%3E") right center / 6px 10px no-repeat;
}

/* 次の工程に達したら、矢印の先も青にする */
.process.is-pinned .process__step.is-passed .process__number::after {
  background:
    linear-gradient(var(--motion-accent), var(--motion-accent)) left center / calc(100% - 4px) 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='10' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='%23007bff'/%3E%3C/svg%3E") right center / 6px 10px no-repeat;
}

.process.is-pinned .process__illust {
  inline-size: var(--process-card);
  block-size: var(--process-illust-h);
}

.process.is-pinned .process__body {
  gap: 12px;
  max-inline-size: var(--process-card);
}

.process.is-pinned .process__heading {
  font-size: 1.5rem;
}

.process.is-pinned .process__text {
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  /* 進み具合を追わないため、青い線は出さず順序だけを示す（.process--detail は詳細度が高いため併記する） */
  .process__step:not(:last-child)::after,
  .process--detail .process__step:not(:last-child)::after {
    display: none;
  }

  /* 追従する図は、フェードせずに切り替える */
  .process__figure-image {
    transition: none;
  }

  .process__number,
  .process--detail .process__number {
    color: var(--hato-text-inverse);
  }
}

/* ==========================================================================
   よくある質問（Figma: PC 210:510 / SP 217:754）
   外枠・見出し・リード・ボタンは製作実績と共有（上の .works, .faq）。
   開閉は <details> で行い、JS は使わない。初期状態はすべて閉じる
   ========================================================================== */
.faq__list {
  padding-inline: 16px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.65);
}

.faq__item {
  border-block-end: 1px solid rgb(1 1 1 / 0.15);
}

/* 押せる範囲を行全体に広げるため、項目の上下の余白は質問の行に持たせる */
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-block-size: 79px; /* 下の罫線 1px と合わせて Figma の 80px */
  padding-block: 24px;
  color: var(--hato-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.05em;
  list-style: none;
  cursor: pointer;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "";
  flex-shrink: 0;
  inline-size: 24px;
  block-size: 24px;
  background: var(--hato-icon-primary);
  mask: url("../img/icon-chevron.svg") center / contain no-repeat;
  transition: rotate 200ms ease;
}

.faq__item[open] .faq__question::after {
  rotate: 180deg;
}

/* Figma の「質問の行 → 回答」の間隔 16px（質問の行の下余白 24px から 8px 戻す） */
.faq__answer {
  max-inline-size: none;
  margin: -8px 0 0;
  padding-block-end: 24px;
  color: var(--hato-text-primary);
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

@media (width > 768px) {
  .faq__list {
    padding-inline: 24px;
  }

  .faq__question {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
  }

  /* PC は閉じた状態のカンプのみ。矢印の色は Figma PC（黒 35%）に合わせる */
  .faq__question::after {
    background: rgb(1 1 1 / 0.35);
  }

  /* PC の回答は Figma の非表示レイヤー（幅 600px・16px / 行高 1.75）に合わせる */
  .faq__answer {
    max-inline-size: 600px;
    font-size: 1rem;
    line-height: 1.75;
  }
}

/* 一覧の方が背が高いため、左の見出し・リード・ボタンを一覧の上下中央に寄せる（前後に伸縮する空の行を置く） */
@media (width > 1080px) {
  .faq {
    grid-template-rows: 1fr repeat(3, auto) 1fr;
  }

  .faq__title {
    grid-row: 2;
  }

  .faq__lead {
    grid-row: 3;
  }

  .faq__more {
    grid-row: 4;
  }

  .faq__list {
    grid-column: 2;
    grid-row: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__question::after {
    transition: none;
  }
}

/* 開閉の高さを補間する（::details-content に対応するブラウザのみ。非対応ならそのまま開閉） */
@media (prefers-reduced-motion: no-preference) {
  .faq__item::details-content {
    block-size: 0;
    overflow-y: clip;
    transition:
      block-size 400ms var(--ease-out),
      content-visibility 400ms allow-discrete;
  }

  .faq__item[open]::details-content {
    block-size: auto;
  }

  .faq__item[open] .faq__answer {
    animation: faq-answer 500ms var(--ease-out) 60ms backwards;
  }
}

@keyframes faq-answer {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ==========================================================================
   会社概要（Figma: PC 210:554 / SP 217:809）
   1081px 以上は左に会社概要の表、右に地図。1080px 以下は表 → 地図の順に縦に積む
   ========================================================================== */
.company {
  display: grid;
  gap: 32px;
  padding: 56px 24px;
  background: var(--hato-surface-page);
}

/* SP の見出しは Figma SP どおり 28px・中央揃え */
.company__title {
  font-size: 1.75rem;
  text-align: center;
}

.company__body {
  display: grid;
  gap: 32px;
}

.company__table {
  margin: 0;
}

.company__row {
  display: grid;
  gap: 8px;
  padding-block: 16px;
}

.company__row + .company__row {
  padding-block-start: 15px; /* 罫線 1px と合わせて 16px（Figma は罫線を行の内側に引くため） */
  border-block-start: 1px solid var(--hato-border-subtle);
}

.company__label {
  color: var(--hato-text-primary);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.company__value {
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 改行位置は原稿どおり（1 項目 1 行） */
.company__line,
.company__office-name {
  display: block;
}

.company__office {
  max-inline-size: none;
  margin: 0;
}

/* 事業所どうしの間は 1 行分あける */
.company__office + .company__office {
  margin-block-start: 28px;
}

.company__office-name {
  color: var(--hato-text-primary);
  font-weight: 700;
}

.company__tel {
  color: inherit;
  text-decoration: none;
}

.company__map {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.company__map-frame {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 408 / 289;
  border: 0;
  border-radius: 2px;
  background: var(--hato-surface-muted);
}

.company__map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--header-brand);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.company__map-link:hover {
  text-decoration: none;
}

.company__map-link::after {
  content: "";
  flex-shrink: 0;
  inline-size: 16px;
  block-size: 16px;
  background: currentColor;
  mask: url("../img/icon-external.svg") center / contain no-repeat;
}

.company__more {
  justify-self: start;
}

@media (width > 768px) {
  .company {
    gap: 72px;
    padding: 72px 48px 108px;
  }

  .company__title {
    font-size: 2rem;
  }

  .company__body {
    inline-size: min(100%, 744px);
    margin-inline: auto;
  }

  .company__row {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 32px;
  }

  .company__label {
    font-size: 1.25rem;
  }

  .company__more {
    justify-self: center;
  }
}

/* 600〜1080px は地図が横に広がるため、高さを抑える */
@media (width >= 600px) {
  .company__map-frame {
    aspect-ratio: 2 / 1;
  }
}

/* PC では発信リンクとして働かせない（ヘッダー・フッターと同じ） */
@media (width >= 1024px) {
  .company__tel {
    pointer-events: none;
  }
}

/* 1081px 以上は Figma PC：表 744px（左に 24px の余白）＋地図 408px を横に並べ、地図は表の上下中央に置く */
@media (width > 1080px) {
  .company__body {
    grid-template-columns: minmax(0, 744px) minmax(0, 408px);
    align-items: center;
    gap: 48px;
    inline-size: auto;
    margin-inline: 0;
    justify-content: center;
  }

  .company__table {
    padding-inline-start: 24px;
  }

  .company__map-frame {
    aspect-ratio: 408 / 289;
  }
}

/* ==========================================================================
   相談導線（Figma: PC 210:625 / SP 219:1005）
   濃いパネルに背景の歯車写真（スクリーン合成で薄く重ねる）。
   PC は左に案内、右にお問い合わせボタン。SP はボタンを全幅にし、電話番号を添える
   - 地色：ページの暗い面（MV の実績の帯・ご依頼の流れ）と同じ濃紺にそろえる（Figma は #0a0a0a の黒）
   - 行動の列（見出し・注記・ボタン・電話）は細い縦線で区切り、「読む」列と「押す」列を分ける
   - 動き：背景の歯車がスクロールに合わせてゆっくり回るだけ。ボタンはホバーで矢印だけが動く（.button）
   ========================================================================== */
.consult {
  padding: 24px 12px 64px;
  background: var(--hato-surface-page);
}

.consult__panel {
  position: relative;
  display: grid;
  gap: 32px;
  padding: 24px;
  /* overflow: hidden だとパネルがスクロールの基準になり、歯車がページのスクロールに連動しないため clip にする */
  overflow: clip;
  border-radius: 2px;
  /* 左上をわずかに明るくし、写真の歯車がある右側へ視線を流す（色相は地色と同じ） */
  background:
    radial-gradient(120% 140% at 0% 0%, rgb(255 255 255 / 0.05) 0%, rgb(255 255 255 / 0) 60%),
    var(--hato-surface-inverse);
  color: var(--hato-text-inverse);
  isolation: isolate;
}

/* 背景の歯車：パネルからはみ出す分は切る */
.consult__bg {
  position: absolute;
  top: calc(50% + 97px);
  left: calc(50% + 140px);
  z-index: -1;
  inline-size: 350px;
  block-size: 350px;
  translate: -50% -50%;
  opacity: 0.12;
  mix-blend-mode: screen;
  pointer-events: none;
}

.consult__bg-image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.consult__intro {
  display: grid;
  gap: 16px;
}

.consult__title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.54;
  letter-spacing: 0;
}

.consult__lead {
  max-inline-size: none;
  margin: 0;
  color: rgb(255 255 255 / 0.86);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0;
}

/* 1 文ごとに改行し、幅が足りないときは文節（.u-phrase）の間で改行する */
.consult__sentence {
  display: block;
}

.consult__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* 「お問い合わせをお待ちしております。」は PC のみ（Figma SP にはない） */
.consult__heading {
  display: none;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.consult__note {
  max-inline-size: none;
  margin: 0;
  color: rgb(255 255 255 / 0.76);
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0;
}

.consult__tel {
  display: grid;
  margin-block-start: 24px;
  color: inherit;
  text-decoration: none;
}

.consult__tel-label {
  color: rgb(255 255 255 / 0.76);
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0;
}

.consult__tel-number {
  color: var(--hato-text-inverse);
  font-family: "Roboto", sans-serif;
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

.consult__button:focus-visible {
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 3px;
}

/* SP：ボタンを全幅・高さ 56px にし、注記をボタンの下に置く */
@media (width <= 768px) {
  .consult__button {
    order: -1;
    display: flex;
    align-self: stretch;
  }

  .consult__button .button__label {
    flex: 1;
    block-size: 56px;
    padding-inline: 16px;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0;
  }

  .consult__button .button__icon {
    inline-size: 48px;
    block-size: 56px;
  }
}

@media (width > 768px) {
  .consult {
    padding: 96px 48px;
    background: var(--hato-surface-tint);
  }

  /* 行動の列の文字の幅は 252px（注記「お気軽にお問い合わせください。」が 1 行に収まる）。縦線の左は 24px（左の見出しが 2 行に収まるよう詰める） */
  .consult__panel {
    grid-template-columns: minmax(0, 1fr) calc(252px + 25px);
    gap: 24px;
    padding: 48px;
  }

  .consult__bg {
    top: 50%;
    left: calc(50% + 40.5px);
    inline-size: 465px;
    block-size: 465px;
    opacity: 0.16;
  }

  /* 見出しは上、リードは下にそろえる */
  .consult__intro {
    align-content: space-between;
    gap: 24px;
  }

  .consult__title {
    font-size: 2rem;
    line-height: 1.5;
  }

  .consult__actions {
    gap: 0;
    padding-inline-start: 24px;
    border-inline-start: 1px solid rgb(255 255 255 / 0.16);
  }

  .consult__heading {
    display: block;
  }

  /* 注記が無いとき（TOP）は、見出しとボタンの間を注記があるときと同じくらい空ける */
  .consult__heading + .consult__button {
    margin-block-start: 24px;
  }

  .consult__note {
    margin-block: 16px 24px;
    color: var(--hato-text-inverse);
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: 0.05em;
  }
}

/* PC では発信リンクとして働かせない（ヘッダー・フッターと同じ） */
@media (width >= 1024px) {
  .consult__tel {
    pointer-events: none;
  }
}

@media (width >= 1080px) {
  .consult__panel {
    grid-template-columns: minmax(0, 1fr) calc(252px + 41px);
    gap: 48px;
  }

  .consult__actions {
    padding-inline-start: 40px;
  }

  /* ヘッダーに電話番号が出るため、Figma PC どおり電話番号を出さない */
  .consult__tel {
    display: none;
  }
}

@media (width > 1080px) {
  .consult {
    padding: 144px max(48px, (100% - 1200px) / 2);
  }

  .consult__title {
    font-size: 2.5rem;
  }
}

/* 背景の歯車：スクロールに合わせてゆっくり回る（ページの最後に余韻を残す） */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .consult__bg-image {
      animation: consult-gear linear both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@keyframes consult-gear {
  from {
    rotate: -30deg;
  }

  to {
    rotate: 30deg;
  }
}

/* ==========================================================================
   相談の追従ボタン（.contact-dock。header.js が .is-visible を付け外しする）
   読者：歯車・スプロケットの製作先を探している人。不安は「図面がない」「1 個だけ」「作れる大きさか」「納期・費用」
   文言：「写真・図面で相談する」。押した先（/contact/ のフォーム）でできることを、用意する物と行動で示す。
     SP メニューの CTA（カンプ 09「写真・図面を送って相談する」）とご依頼の流れ 01（「写真・図面をフォームからお送りください」）と同じ表現にそろえる
   役割の分担
     - ヘッダー「お問い合わせ」：全ページ共通のナビ（用件を問わない入口）
     - 追従ボタン：読み進めている途中の入口。製作の相談に絞った言い方にする
     - 下部 CTA：読み終えた人への案内（説明・電話を含む）。見えている間は追従ボタンを出さない
     - フッター：サイトの一覧。見えている間は追従ボタンを出さない
   見た目：ほかの行動ボタン（.button：紺の文言の箱＋矢印の箱）と同じ形にし、ページのほかの行動ボタンと同じものだと分かるようにする
   表示：PC はヘッダーが隠れている間だけ（ヘッダーの入口と同時に出さない）。1079px 以下は MV 通過後に出す
   隠さない工夫：SP は文字・余白を詰めて幅を約 210px に抑える。キーボードで移動したとき、フォーカスした要素がボタンの下に隠れないよう scroll-padding を取る
   ========================================================================== */
html:has(.contact-dock.is-visible) {
  scroll-padding-block-end: 80px;
}

.contact-dock {
  position: fixed;
  inset-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 16px;
  z-index: 9;
  /* 文言と矢印の間の 2px の隙間に見える色（下部 CTA のパネルの上のボタンと同じ見え方にする） */
  border: 1px solid rgb(255 255 255 / 0.24);
  background: var(--hato-surface-inverse);
  box-shadow: 0 8px 24px rgb(7 17 31 / 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease-in, visibility 0s 200ms;
}

.contact-dock[hidden] {
  display: none;
}

.contact-dock.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 250ms ease, transform 300ms var(--ease-out), visibility 0s;
}

.contact-dock:focus-visible {
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 3px;
}

/* SP・Tablet：高さ 48px、文言の左右を詰めて幅を抑える */
.contact-dock .button__label {
  min-inline-size: 0;
  block-size: 46px;
  padding-inline: 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  word-break: keep-all;
}

.contact-dock .button__icon {
  inline-size: 46px;
  block-size: 46px;
}

/* PC：.button と同じ高さ（52px）・文字の大きさ */
@media (width >= 1080px) {
  .contact-dock {
    inset-block-end: 24px;
    inset-inline-end: 24px;
  }

  .contact-dock .button__label {
    block-size: 50px;
    padding-inline: 24px;
    font-size: 0.875rem;
  }

  .contact-dock .button__icon {
    inline-size: 50px;
    block-size: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-dock,
  .contact-dock.is-visible {
    transform: none;
  }
}

/* ==========================================================================
   下層ページ（共通部品）
   Figma: W0cMva… 各ページの初稿（製作実績 270:6172 など）。ヘッダー・フッター・ボタン・相談導線・余白は TOP の採用済みの仕様にそろえる
   - 本文幅は最大 1200px（TOP のセクション・フッターと同じ）。左右の余白は SP 24px／769px 以上 48px
   - カンプは palt なしで組まれているため、TOP の各セクションと同じく解除する
   ========================================================================== */
.page {
  --page-gutter: 24px;
  --page-inline: var(--page-gutter);

  font-feature-settings: normal;
}

@media (width > 768px) {
  .page {
    --page-gutter: 48px;
    --page-inline: max(var(--page-gutter), (100% - 1200px) / 2);
  }
}

/* --------------------------------------------------------------------------
   ページの導入（inc/page-intro.php）：パンくず → 見出し・リード → 図面の基準線
   -------------------------------------------------------------------------- */
.page-intro {
  padding: 16px var(--page-inline) 48px;
  background: var(--hato-surface-page);
}

.page-intro__inner {
  display: grid;
  gap: 24px;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  color: var(--hato-text-primary);
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
  list-style: none;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/" / "";
  margin-inline-end: 8px;
  color: var(--hato-text-secondary);
}

.breadcrumb__link {
  color: var(--header-brand);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.breadcrumb__link:hover {
  text-decoration: none;
}

/* 404 ページの「404」（パンくずの位置に置く） */
.page-intro__status {
  margin: 0;
  color: var(--hato-text-secondary);
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.1em;
}

.page-intro__heading {
  display: grid;
  gap: 16px;
  padding-block-end: 8px;
}

.page-intro__title {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 2rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.page-intro__body {
  display: grid;
  gap: 16px;
}

.page-intro__lead {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
  word-break: auto-phrase;
}

.page-intro__sentence {
  display: block;
}

/* ページ内リンク（ご依頼の流れ・よくある質問へ） */
.page-intro__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-intro__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 8px 16px;
  border-radius: 2px;
  background: var(--header-brand);
  color: var(--hato-text-inverse);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.page-intro__link-icon {
  flex-shrink: 0;
  transition: translate 200ms ease;
}

.page-intro__link:hover .page-intro__link-icon {
  translate: 0 2px;
}

@media (width > 768px) {
  .page-intro {
    padding-block: 24px 64px;
  }

  .page-intro__inner {
    gap: 40px;
  }

  .page-intro__heading {
    padding-block-end: 0;
  }

  .page-intro__title {
    font-size: 2.5rem;
    line-height: 1.3;
  }
}

/* 1080px 以上：見出し（左 480px）とリード（右 600px）を並べる（Figma PC） */
@media (width >= 1080px) {
  .page-intro__heading {
    grid-template-columns: minmax(0, 480px) minmax(0, 600px);
    justify-content: space-between;
    align-items: center;
    column-gap: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-intro__link-icon {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   図面の基準線（inc/drafting-rule.php）
   横線の左端に起点の目盛り、右に基準軸の歯車・中心線・補助円・基準点（SP 48px／769px 以上 72px）
   歯車はスクロールに合わせて回る（TOP の歯車と同じ扱い。2026-10-15 指示）
   -------------------------------------------------------------------------- */
.drafting-rule {
  --drafting-mark: 48px;

  position: relative;
  block-size: 1px;
  background: var(--hato-border-subtle);
}

/* 起点の目盛り */
.drafting-rule::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  inline-size: 1px;
  block-size: 8px;
  translate: 0 -50%;
  background: rgb(10 59 128 / 0.65);
}

.drafting-rule__mark {
  position: absolute;
  inset-inline-end: 16px;
  inset-block-start: 50%;
  inline-size: var(--drafting-mark);
  block-size: var(--drafting-mark);
  translate: 0 -50%;
}

/* 中心線（破線）：歯車の上下に少しはみ出す */
.drafting-rule__mark::before {
  content: "";
  position: absolute;
  inset-block: calc(var(--drafting-mark) * -0.14);
  inset-inline-start: calc(50% - 0.5px);
  inline-size: 1px;
  background: repeating-linear-gradient(to bottom, rgb(10 59 128 / 0.4) 0 4px, transparent 4px 7px);
}

/* 補助円（破線）と中心の基準点 */
.drafting-rule__mark::after {
  content: "";
  position: absolute;
  inset: calc(var(--drafting-mark) / 6);
  border: 1px dashed rgb(10 59 128 / 0.35);
  border-radius: 50%;
  background: radial-gradient(circle, var(--header-brand) 0 1.5px, transparent 1.6px);
}

.drafting-rule__gear {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

@media (width > 768px) {
  .drafting-rule {
    --drafting-mark: 72px;
  }

  .drafting-rule__mark {
    inset-inline-end: 24px;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .drafting-rule__gear {
      animation: drafting-gear linear both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@keyframes drafting-gear {
  from {
    rotate: -90deg;
  }

  to {
    rotate: 90deg;
  }
}

/* --------------------------------------------------------------------------
   下層ページの相談導線（inc/consult.php の variant = page）
   TOP の相談導線（.consult）と同じ部品。違いは Figma 下層の初稿に合わせた次の点だけ
   - 注記はボタンの下。電話番号は PC でも出す（下層ではヘッダー以外に電話の導線がないため）
   - 背景は全幅でページの地色。行動の列はボタンの文言（13 字）が 1 行に収まる幅にする
   -------------------------------------------------------------------------- */
@media (width > 768px) {
  .consult--page {
    padding-block: 72px;
    background: var(--hato-surface-page);
  }

  .consult--page .consult__panel {
    grid-template-columns: minmax(0, 1fr) calc(320px + 25px);
  }

  .consult--page .consult__button {
    display: flex;
  }

  .consult--page .consult__button .button__label {
    flex: 1;
  }

  .consult--page .consult__note {
    margin-block: 8px 0;
    color: rgb(255 255 255 / 0.76);
    font-size: 0.8125rem;
    line-height: 1.7;
    letter-spacing: 0;
  }

  .consult--page .consult__tel {
    margin-block-start: 32px;
  }
}

/* 769〜1079px：行動の列を見出しの下に回す（横に並べると見出しの列が狭くなり、文節の途中で折れるため） */
@media (width > 768px) and (width < 1080px) {
  .consult--page .consult__panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .consult--page .consult__actions {
    padding-block-start: 32px;
    padding-inline-start: 0;
    border-block-start: 1px solid rgb(255 255 255 / 0.16);
    border-inline-start: 0;
  }

  .consult--page .consult__button {
    inline-size: min(100%, 368px);
  }
}

@media (width >= 1080px) {
  .consult--page .consult__panel {
    grid-template-columns: minmax(0, 1fr) calc(320px + 41px);
  }

  .consult--page .consult__tel {
    display: grid;
  }
}

/* --------------------------------------------------------------------------
   仕様のセクション（製作実績の「対応範囲」「材質・加工・品質保証」など）
   見出し・リード → 基準線 → 2 列の群。群は「見出し・補足 → 表・一覧 → 注記」
   -------------------------------------------------------------------------- */
.spec-section {
  padding: 48px var(--page-inline);
  background: var(--hato-surface-base);
}

.spec-section__inner {
  display: grid;
  gap: 40px;
}

.spec-section__heading {
  display: grid;
  gap: 16px;
}

.spec-section__lead {
  max-inline-size: 760px;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
  word-break: auto-phrase;
}

.spec-section__sentence {
  display: block;
}

.spec-section__groups {
  display: grid;
  gap: 48px;
}

.spec-group {
  display: grid;
  align-content: start;
  gap: 24px;
  min-inline-size: 0;
}

.spec-group__heading {
  display: grid;
  gap: 8px;
}

.spec-group__title {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.spec-group__sub,
.spec-group__label {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.spec-group__label {
  font-size: 0.875rem;
}

/* 仕様の表：項目名は左、値は右（欧文・太字） */
.spec-table {
  margin: 0;
  border-block-end: 1px solid var(--hato-border-subtle);
}

.spec-table__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-block-start: 1px solid var(--hato-border-subtle);
}

.spec-table__label {
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.spec-table__value {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

/* 注記（・の箇条書き） */
.note-list {
  display: grid;
  margin: 0;
  padding: 0;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.85;
  letter-spacing: 0.05em;
  list-style: none;
}

.note-list__item {
  display: flex;
}

.note-list__item::before {
  content: "・";
  flex-shrink: 0;
}

/* 一覧（行頭に紺の短い線） */
.dash-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.03em;
  list-style: none;
}

.dash-list--small {
  font-size: 0.9375rem;
}

.dash-list__item {
  display: flex;
  gap: 10px;
}

.dash-list__item::before {
  content: "";
  flex-shrink: 0;
  inline-size: 6px;
  block-size: 1px;
  margin-block-start: calc(0.5lh - 0.5px);
  background: var(--header-brand);
}

/* 各種歯車の種類（図版は差し替え待ち） */
.spec-group__types {
  display: grid;
  gap: 12px;
}

.gear-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gear-types__item {
  display: grid;
  gap: 8px;
}

.gear-types__figure {
  display: grid;
  place-items: center;
  aspect-ratio: 174 / 123;
  border: 1px dashed #98a5b0;
  background: #f5f5f5;
  color: var(--hato-text-secondary);
  font-size: 0.75rem;
  line-height: 1.7;
}

.gear-types__name {
  color: var(--hato-text-primary);
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

.spec-section__extra {
  display: grid;
  gap: 8px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--hato-border-subtle);
}

@media (width > 768px) {
  .spec-section {
    padding-block: 72px;
  }

  .spec-section__inner {
    gap: 56px;
  }

  .spec-section__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 72px;
  }

  .spec-group__title {
    font-size: 1.25rem;
  }

  .spec-table__row {
    padding-block: 14px;
  }

  .spec-table__row:last-child {
    padding-block: 18px;
  }

  .gear-types {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
  }

  .dash-list--columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-template-rows: repeat(5, auto);
    column-gap: 24px;
  }

  .spec-section__extra {
    padding-block-start: 28px;
  }
}

/* ==========================================================================
   製作実績ページ（works/index.php）
   Figma: PC 270:6172 / SP 270:6171。「Works Gallery / Responsive / 240-167」
   - 1 製品＝写真（最大 4 枚）＋仕様のカード。写真は枠に合わせて切り抜き、拡大時（ビューアー）は写真全体を表示する
   - PC：写真は 1 枚なら大きく、2 枚は横並び、3 枚は大 1＋小 2、4 枚は 2×2。仕様のカードは写真の中央の高さに置く
   - SP：大きい写真 1 枚＋サムネイル（2 枚以上のとき）→ 仕様のカード
   - 製品と製品の間に細い罫を引き、写真がどの製品のものかを区切りで示す。写真が 2 枚以上のときは枚数（SP は表示中の番号）を添える
   - 仕様のカードは方眼紙（16px・80px の格子）の上に、品名・寸法・対応内容を置く
   ========================================================================== */
.work-list {
  display: grid;
  gap: 48px;
  padding: 24px var(--page-inline) 64px;
  background: var(--hato-surface-tint);
}

/* 製品の区切り（罫の上下の余白を同じにする） */
.work + .work {
  padding-block-start: 48px;
  border-block-start: 1px solid rgb(10 59 128 / 0.12);
}

.work {
  display: grid;
  gap: 16px;
  /* アンカーで移動したとき：html の scroll-padding（ヘッダーの高さ）に加え、写真の上に少し余白を残す */
  scroll-margin-block-start: 24px;
}

.work__media {
  min-inline-size: 0;
}

.work__photos {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work__photo-item {
  min-inline-size: 0;
}

.work__photo {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--hato-surface-muted);
}

.work__photo:focus-visible {
  outline-offset: 3px;
}

.work__image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  aspect-ratio: 768 / 543;
  object-fit: cover;
}

.work__media-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-block-size: 48px;
}

.work__count {
  margin: 0 auto 0 0;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

/* 枚数：PC と、SP で写真を縦に並べたとき（JS なし）は「写真 4枚」。SP で切り替えるときは「1 / 4」 */
.work__count-current {
  display: none;
  font-family: "Roboto", sans-serif;
}

.work.is-switchable .work__count-total {
  display: none;
}

.work.is-switchable .work__count-current {
  display: inline;
}

.work__zoom {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hato-text-link);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.work__zoom:hover {
  text-decoration: underline;
}

.work__zoom-icon {
  flex-shrink: 0;
}

.work__zoom[hidden],
.work__thumbs[hidden] {
  display: none;
}

/* SP のサムネイル（JS があるときだけ表示し、大きい写真を切り替える） */
.work__thumbs {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work__thumbs > li {
  flex: 0 1 80px;
  min-inline-size: 0;
}

.work__thumb {
  display: block;
  inline-size: 100%;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
}

.work__thumb[aria-pressed="true"] {
  border-color: var(--hato-text-primary);
}

.work__thumb-image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 80 / 57;
  object-fit: cover;
}

/* 仕様のカード。方眼の罫線は区切りが分かる最小限の濃さにとどめ、品名・寸法・説明を主役にする（2026-10-16 に薄くした） */
.work__info {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 24px;
  border-radius: 0 0 2px 2px;
  background-color: var(--hato-surface-base);
  background-image:
    linear-gradient(rgb(10 59 128 / 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgb(10 59 128 / 0.055) 1px, transparent 1px),
    linear-gradient(rgb(10 59 128 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(10 59 128 / 0.025) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: -1px -1px;
}

.work__name {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.5rem;
  line-height: 1.5;
  letter-spacing: 0;
  word-break: auto-phrase;
}

.work__specs {
  display: grid;
  margin: 0;
}

.work__spec {
  display: flex;
  align-items: center;
  gap: 16px;
  min-block-size: 56px;
}

.work__spec-label {
  flex-shrink: 0;
  inline-size: 56px;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* 寸法は数字だけを大きくし、記号・単位は本文の大きさ */
.work__spec-value {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 44px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.work__spec-prefix {
  margin-inline-end: 2px;
}

.work__spec-number {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.work__spec-unit {
  margin-inline-start: 4px;
}

.work__note {
  display: grid;
  gap: 8px;
  padding-block-start: 24px;
}

.work__note-label {
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.work__note-text {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.03em;
}

/* SP：写真が 2 枚以上ある製品は、選んだ 1 枚だけを大きく表示する（JS が無い場合はすべて縦に並べる） */
@media (width <= 768px) {
  .work.is-switchable .work__photo-item:not(.is-current) {
    display: none;
  }

  .work__image {
    aspect-ratio: 3 / 2;
  }
}

@media (width > 768px) {
  .work-list {
    gap: 64px;
    padding-block: 64px;
  }

  .work + .work {
    padding-block-start: 64px;
  }

  .work.is-switchable .work__count-total {
    display: inline;
  }

  .work.is-switchable .work__count-current {
    display: none;
  }

  .work__info {
    padding: 32px;
  }

  /* PC のサムネイルは使わない（写真を並べて表示する） */
  .work__thumbs {
    display: none;
  }

  .work__media--2 .work__photos,
  .work__media--4 .work__photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work__media--2 .work__image,
  .work__media--4 .work__image {
    aspect-ratio: 376 / 266;
  }

  /* 3 枚：左に大きい 1 枚、右に小さい 2 枚 */
  .work__media--3 .work__photos {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, auto);
  }

  .work__media--3 .work__photo-item:first-child {
    grid-row: span 2;
  }

  .work__media--3 .work__photo-item:first-child .work__photo {
    block-size: 100%;
  }

  .work__media--3 .work__photo-item:first-child .work__image {
    aspect-ratio: auto;
  }

  .work__media--3 .work__photo-item:not(:first-child) .work__image {
    aspect-ratio: 240 / 170;
  }
}

/* 960px 以上：写真（左 2/3）と仕様のカード（右 1/3）を並べる。カードは写真の中央の高さ（「写真を拡大」の行を除く） */
@media (width >= 960px) {
  .work {
    grid-template-columns: minmax(0, 768fr) minmax(0, 384fr);
    align-items: center;
    gap: 48px;
  }

  .work__info {
    margin-block-end: 48px;
  }
}

/* ==========================================================================
   写真ビューアー（inc/photo-viewer.php・assets/js/photo-viewer.js）
   Figma: modal 443:8323。暗い背景の上に「品名・寸法・枚数・閉じる」→ 写真 → 「前後・サムネイル・表示方法」
   - 全体表示：写真全体を枠に収める。拡大表示：原寸で表示し、ドラッグ（タッチはスワイプ）で移動する
   - 高さの低い画面でも閉じるボタンと操作部品が切れないよう、写真の枠だけを伸縮させる
   ========================================================================== */
html:has(.viewer[open]) {
  overflow: hidden;
}

.viewer {
  inline-size: 100%;
  max-inline-size: none;
  block-size: 100%;
  max-block-size: none;
  margin: 0;
  padding: 16px 20px 24px;
  border: 0;
  background: rgb(7 17 31 / 0.92);
  color: var(--hato-text-inverse);
  font-feature-settings: normal;
}

.viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}

.viewer::backdrop {
  background: rgb(7 17 31 / 0.4);
  backdrop-filter: blur(6px);
}

.viewer__header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-block-size: 64px;
}

.viewer__identity {
  flex: 1;
  min-inline-size: 0;
}

.viewer__title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.55;
  letter-spacing: 0.03em;
  word-break: auto-phrase;
}

.viewer__spec,
.viewer__count {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.viewer__spec[hidden] {
  display: none;
}

.viewer__count {
  flex-shrink: 0;
  color: rgb(255 255 255 / 0.78);
  font-family: "Roboto", sans-serif;
}

/* 半透明の白のボタン（閉じる・前後・表示方法） */
.viewer__close,
.viewer__step,
.viewer__mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-inline-size: 48px;
  min-block-size: 48px;
  padding: 8px 12px;
  border: 0;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.1);
  color: var(--hato-text-inverse);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.7;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.viewer__close:hover,
.viewer__step:hover:not(:disabled),
.viewer__mode:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.2);
}

.viewer__close {
  flex-shrink: 0;
  padding: 8px;
}

/* SP の閉じるボタンは × だけ（文言は読み上げ用に残す） */
.viewer__close-label {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.viewer__stage {
  min-block-size: 0;
  overflow: hidden;
}

/* 全体表示：写真全体を枠に収める（枠の高さは画面の高さから見出し・操作部品を引いた残り） */
.viewer__image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

/* 拡大表示：原寸で表示し、枠の中をスクロール・ドラッグで動かす */
.viewer.is-zoomed .viewer__stage {
  display: block;
  overflow: auto;
  cursor: grab;
  overscroll-behavior: contain;
}

.viewer.is-zoomed .viewer__stage.is-dragging {
  cursor: grabbing;
}

.viewer.is-zoomed .viewer__image {
  max-inline-size: none;
  block-size: auto;
  margin: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.viewer__controls {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.viewer__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewer__nav[hidden] {
  display: none;
}

.viewer__step:disabled {
  opacity: 0.28;
  cursor: default;
}

.viewer__thumbs {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.viewer__thumb {
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
}

.viewer__thumb[aria-current="true"] {
  border-color: var(--hato-text-inverse);
}

.viewer__thumb-image {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 48 / 33;
  object-fit: cover;
}

.viewer__modes {
  display: flex;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.1);
}

.viewer__mode {
  inline-size: 140px;
  border-radius: 0;
  background: none;
}

.viewer__mode[aria-pressed="true"] {
  background: rgb(255 255 255 / 0.18);
  font-weight: 500;
}

.viewer__mode:disabled {
  color: rgb(255 255 255 / 0.4);
  cursor: default;
}

.viewer__status {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.7;
}

.viewer :focus-visible {
  outline-color: var(--hato-text-inverse);
}

@media (width > 768px) {
  .viewer {
    padding: 32px 48px;
  }

  .viewer[open] {
    gap: 24px;
  }

  .viewer__title {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .viewer__close {
    padding-inline: 16px;
  }

  .viewer__close-label {
    position: static;
    inline-size: auto;
    block-size: auto;
    overflow: visible;
    clip-path: none;
  }

  .viewer__controls {
    gap: 12px;
  }

  .viewer__nav {
    gap: 16px;
  }

  .viewer__thumb {
    inline-size: 80px;
    block-size: 56px;
  }

  .viewer__thumb-image {
    aspect-ratio: 80 / 56;
  }

  .viewer__mode {
    inline-size: 152px;
  }
}

/* 高さの低い画面：説明文を省き、写真の枠を確保する */
@media (height <= 560px) {
  .viewer {
    padding-block: 8px 12px;
  }

  .viewer[open] {
    gap: 8px;
  }

  .viewer__header {
    min-block-size: 48px;
  }

  .viewer__status {
    display: none;
  }

  .viewer__controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .viewer[open] {
    animation: viewer-in 200ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .viewer__close,
  .viewer__step,
  .viewer__mode {
    transition: none;
  }
}

@keyframes viewer-in {
  from {
    opacity: 0;
  }
}

/* ==========================================================================
   ご依頼の流れ・よくある質問ページ（guide/index.php）
   Figma: PC 270:6174 / SP 270:6173
   - よくある質問は見出し・リード（左 480px）と一覧（右 600px）の 2 列（1080px 以上）。SP・Tablet は縦に積む
   - ご依頼の流れは TOP の部品（.process）の詳細版（.process--detail。上の「ご依頼の流れ」の章）
   - よくある質問：罫線で区切った一覧。TOP のよくある質問（パネル）とは別の見せ方（質問数が多いため）
   ========================================================================== */
.page-intro__title-line {
  display: block;
}

.guide-section {
  padding: 56px var(--page-inline) 72px;
  background: var(--hato-surface-page);
}

.guide-section__inner {
  display: grid;
  gap: 32px;
}

.guide-section__heading {
  display: grid;
  align-content: start;
  gap: 16px;
}

.guide-section__lead {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* よくある質問 */
.qa-list {
  border-block-start: 1px solid rgb(1 1 1 / 0.15);
}

.qa {
  border-block-end: 1px solid rgb(1 1 1 / 0.15);
}

.qa__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-block-size: 44px;
  padding-block: 20px;
  color: var(--hato-text-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  list-style: none;
  cursor: pointer;
}

.qa__question::-webkit-details-marker {
  display: none;
}

.qa__question::after {
  content: "";
  flex-shrink: 0;
  inline-size: 24px;
  block-size: 24px;
  background: var(--hato-icon-primary);
  mask: url("../img/icon-chevron.svg") center / contain no-repeat;
  transition: rotate 200ms ease;
}

.qa__question:hover {
  color: var(--header-brand);
}

.qa[open] .qa__question::after {
  rotate: 180deg;
}

/* 質問と回答の間は 12px（質問の下の余白 20px から 8px 戻す） */
.qa__answer {
  max-inline-size: none;
  margin: -8px 0 0;
  padding-block-end: 20px;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

@media (width > 768px) {
  .guide-section {
    padding-block: 72px 96px;
  }

  .qa__question {
    gap: 24px;
    padding-block: 24px;
  }

  .qa__answer {
    padding-block-end: 24px;
  }
}

/* 1080px 以上：左に見出し、右に一覧 */
@media (width >= 1080px) {
  .guide-section__inner {
    grid-template-columns: minmax(0, 480px) minmax(0, 600px);
    justify-content: space-between;
    column-gap: 48px;
  }

  .guide-section__heading {
    gap: 20px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .qa::details-content {
    block-size: 0;
    overflow-y: clip;
    transition:
      block-size 400ms var(--ease-out),
      content-visibility 400ms allow-discrete;
  }

  .qa[open]::details-content {
    block-size: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qa__question::after {
    transition: none;
  }
}

/* ==========================================================================
   会社情報ページ（company/index.php）
   Figma: PC 270:6176 / SP 270:6175
   会社概要（左に見出しと外観写真、右に表）→ お約束（3 列）→ ごあいさつ（2 列）→ 事業所（2 列の地図・主要設備）
   背景はページの地色と淡い青を交互にする
   ========================================================================== */
.split-section,
.company-section {
  padding: 56px var(--page-inline) 72px;
  background: var(--hato-surface-page);
}

.company-section--tint {
  background: var(--hato-surface-tint);
}

.split-section__inner {
  display: grid;
  gap: 32px;
}

.split-section__aside {
  display: grid;
  align-content: start;
  gap: 32px;
}

.split-section__photo {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 480 / 339;
  background: #f5f5f5;
  object-fit: cover;
}

/* 会社概要の表：SP は項目名の下に内容、769px 以上は横に並べる */
.profile-table {
  margin: 0;
  border-block-end: 1px solid var(--hato-border-subtle);
}

.profile-table__row {
  display: grid;
  gap: 4px;
  padding-block: 14px;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.profile-table__row + .profile-table__row {
  border-block-start: 1px solid var(--hato-border-subtle);
}

.profile-table__label {
  color: var(--hato-text-primary);
  font-weight: 700;
}

.profile-table__value {
  margin: 0;
  color: var(--hato-text-secondary);
}

.profile-table__line,
.profile-table__office-name {
  display: block;
}

.profile-table__office {
  max-inline-size: none;
  margin: 0;
}

.profile-table__office + .profile-table__office {
  margin-block-start: 1.75em;
}

.profile-table__office-name {
  color: var(--hato-text-primary);
  font-weight: 700;
}

.profile-table__tel,
.office__tel-link {
  color: inherit;
  text-decoration: none;
}

/* 見出し・リード（お約束・事業所） */
.company-section__inner {
  display: grid;
  gap: 40px;
}

.company-section__heading {
  display: grid;
  gap: 16px;
}

.company-section__lead {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.company-section__sentence {
  display: block;
}

/* お約束 */
.promises {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise {
  display: grid;
  align-content: start;
  gap: 12px;
}

.promise__photo {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 373 / 248;
  margin-block-end: 4px;
  background: #f5f5f5;
  object-fit: cover;
}

.promise__title,
.greeting__name,
.office__name {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.promise__text,
.greeting__text {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* ごあいさつ */
.greetings {
  display: grid;
  gap: 40px;
}

.greeting {
  display: grid;
  gap: 16px;
}

/* 顔写真の枠（差し替え待ち） */
.greeting__photo,
.equipment__photo {
  display: grid;
  place-items: center;
  color: var(--hato-text-secondary);
  font-size: 0.75rem;
  line-height: 1.6;
}

.greeting__photo {
  inline-size: 140px;
  aspect-ratio: 160 / 226;
  border: 1px solid var(--hato-border-subtle);
  background: var(--hato-surface-base);
}

.greeting__body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-inline-size: 0;
}

.greeting__role {
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.greeting__text {
  margin-block-start: 4px;
}

/* 事業所 */
.offices {
  display: grid;
  gap: 40px;
}

.office {
  display: grid;
  align-content: start;
  gap: 12px;
  min-inline-size: 0;
}

.office__address,
.office__tel {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.office__map {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 350 / 248;
  margin-block-start: 4px;
  border: 0;
  background: var(--hato-surface-muted);
}

.office__map-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-block-size: 44px;
  color: var(--header-brand);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.office__map-link:hover {
  text-decoration: none;
}

.office__map-link::after {
  content: "";
  flex-shrink: 0;
  inline-size: 16px;
  block-size: 16px;
  background: currentColor;
  mask: url("../img/icon-external.svg") center / contain no-repeat;
}

.office__work {
  display: grid;
  gap: 4px;
}

.office__work-label {
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.office__work-text {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

/* 主要設備 */
.equipment {
  display: grid;
  gap: 24px;
  padding-block-start: 32px;
  border-block-start: 1px solid var(--hato-border-subtle);
}

.equipment__tables {
  display: grid;
}

/* SP は 1 列に続けて並べるため、列の間の罫を 1 本にする */
.equipment__table + .equipment__table .spec-table__row:first-child {
  border-block-start: 0;
}

.equipment__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.equipment__photo-item {
  display: grid;
  gap: 8px;
}

.equipment__photo {
  aspect-ratio: 282 / 199;
  border: 1px dashed #98a5b0;
  background: #f5f5f5;
}

.equipment__caption {
  color: var(--hato-text-primary);
  font-size: 0.8125rem;
  line-height: 1.7;
}

@media (width > 768px) {
  .split-section,
  .company-section {
    padding-block: 72px 96px;
  }

  .profile-table__row {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    padding-block: 16px;
  }

  .company-section__heading {
    gap: 24px;
  }

  .company-section__inner {
    gap: 64px;
  }

  .promises {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }

  .promise__title,
  .greeting__name,
  .office__name {
    font-size: 1.25rem;
  }

  .greeting {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 32px;
  }

  .greeting__photo {
    inline-size: 100%;
  }

  .offices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office__map {
    aspect-ratio: 580 / 410;
  }

  .equipment__tables {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }

  .equipment__table + .equipment__table .spec-table__row:first-child {
    border-block-start: 1px solid var(--hato-border-subtle);
  }

  .equipment__photos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

/* PC では発信リンクとして働かせない（TOP の会社概要・フッターと同じ） */
@media (width >= 1024px) {
  .profile-table__tel,
  .office__tel-link {
    pointer-events: none;
  }
}

/* 1080px 以上：会社概要は左に見出しと写真（480px）、右に表（600px）。ごあいさつは 2 列 */
@media (width >= 1080px) {
  .split-section__inner {
    grid-template-columns: minmax(0, 480px) minmax(0, 600px);
    justify-content: space-between;
    column-gap: 48px;
  }

  .greetings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
  }

  .company-section__inner {
    gap: 96px;
  }
}

/* ==========================================================================
   下層ページの小さな部品
   ========================================================================== */
/* 本文中のテキストリンク */
.text-link {
  color: var(--header-brand);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.text-link:hover {
  text-decoration: none;
}

/* 電話での相談（inc/tel-block.php） */
.tel-block {
  display: grid;
  gap: 4px;
  max-inline-size: none;
  margin: 0;
}

.tel-block__label {
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.tel-block__number {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  color: var(--header-brand);
  font-family: "Roboto", sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.tel-block__mark {
  flex-shrink: 0;
  margin-block-start: -0.4em;
  color: var(--hato-text-secondary);
}

.tel-block__hours {
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

@media (width >= 1024px) {
  .tel-block__number {
    pointer-events: none;
  }
}

/* ==========================================================================
   お問い合わせページ（contact/index.php）
   Figma: PC 270:6178 / SP 270:6177
   左に「はじめての方へ」と電話、右にフォーム（1080px 以上）。入力欄は高さ 56px・枠 1px・角丸 2px
   ========================================================================== */
.form-section {
  padding: 56px var(--page-inline) 72px;
  background: var(--hato-surface-tint);
}

.form-section__inner {
  display: grid;
  gap: 40px;
}

.form-section__aside {
  display: grid;
  align-content: start;
  gap: 24px;
}

.form-section__title {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.form-section__text {
  max-inline-size: none;
  margin: 0;
  padding-block-end: 24px;
  border-block-end: 1px solid var(--hato-border-subtle);
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.contact-form {
  display: grid;
  gap: 32px;
  min-inline-size: 0;
}

.field {
  --field-gap: 10px; /* ラベル・補足・入力欄の間隔 */

  display: grid;
  gap: var(--field-gap);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* <fieldset> の <legend> は枠の見出しとして特別に配置され、グリッドの並びに入らない（gap が効かない）。
   ほかの項目と同じ間隔を下の余白で取る */
.field > legend.field__label {
  margin-block-end: var(--field-gap);
}

.field[hidden] {
  display: none;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--hato-text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

/* 必須・任意の表示（色だけでなく文言でも示す） */
.field__badge {
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--header-brand);
  color: var(--hato-text-inverse);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.field__badge--optional {
  background: var(--hato-surface-muted);
  color: var(--hato-text-secondary);
}

.field__help {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.field__input {
  inline-size: 100%;
  min-block-size: 56px;
  padding: 13px 16px;
  border: 1px solid var(--hato-border-subtle);
  border-radius: 2px;
  background: var(--hato-surface-base);
  color: var(--hato-text-primary);
  font: inherit;
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.field__input::placeholder {
  color: #7b8794;
  opacity: 1;
}

.field__input:hover {
  border-color: #98a5b0;
}

.field__input:focus-visible {
  border-color: var(--header-brand);
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 1px;
}

.field__input--textarea {
  min-block-size: 200px;
  resize: vertical;
}

/* ご依頼者（法人・個人）：選択肢全体を押せる範囲にする */
.field__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-block-size: 56px;
  padding: 0 16px;
  border: 1px solid var(--hato-border-subtle);
  border-radius: 2px;
  background: var(--hato-surface-base);
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.choice:has(:checked) {
  border: 2px solid var(--header-brand);
  padding-inline: 15px;
  background: #f4f8fd;
  font-weight: 700;
}

.choice:has(:focus-visible) {
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 2px;
}

.choice__input {
  flex-shrink: 0;
  inline-size: 20px;
  block-size: 20px;
  margin: 0;
  accent-color: var(--header-brand);
}

.choice__input:focus-visible {
  outline: 0;
}

/* 添付ファイル：破線の枠の中央に「ファイルを選択」。枠全体が入力欄（クリックでファイルを選ぶ） */
.file-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 12px;
  border: 1px dashed var(--hato-border-subtle);
  border-radius: 2px;
  background: var(--hato-surface-base);
  text-align: center;
}

.file-drop:hover {
  border-color: #98a5b0;
}

.file-drop:has(:focus-visible) {
  outline: 2px solid var(--hato-focus-ring);
  outline-offset: 2px;
}

/* JS が無い場合はブラウザ標準のファイル選択を見せる（選んだファイル名が分かるように）。
   JS がある場合（.is-enhanced）は入力欄を枠いっぱいに透明で重ね、選んだファイルは下の一覧に出す */
.file-drop__input {
  max-inline-size: 100%;
  font: inherit;
  font-size: 0.875rem;
}

.file-drop.is-enhanced .file-drop__input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop__button {
  place-items: center;
  min-block-size: 48px;
  padding: 0 24px;
  border-radius: 2px;
  background: var(--hato-surface-muted);
  color: var(--hato-text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.file-drop:not(.is-enhanced) .file-drop__button {
  display: none;
}

.file-drop.is-enhanced .file-drop__button {
  display: inline-grid;
}

.file-drop__note {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.file-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list[hidden] {
  display: none;
}

.file-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 4px 16px;
  border: 1px solid var(--hato-border-subtle);
  border-radius: 2px;
  background: var(--hato-surface-base);
  font-size: 0.875rem;
  line-height: 1.6;
}

.file-list__name {
  flex: 1;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.file-list__remove {
  flex-shrink: 0;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--header-brand);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-position: from-font;
  cursor: pointer;
}

.file-list__remove:hover {
  text-decoration: none;
}

.contact-form__privacy {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 送信ボタン・ページの主要な行動のボタン（紺・全幅・高さ 64px） */
.contact-form__submit,
.wide-button {
  display: grid;
  place-items: center;
  inline-size: 100%;
  min-block-size: 64px;
  padding: 12px 24px;
  border: 0;
  border-radius: 2px;
  background: var(--header-brand);
  color: var(--hato-text-inverse);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.contact-form__submit:hover,
.wide-button:hover {
  background: #082f66;
}

.contact-form__submit:focus-visible,
.wide-button:focus-visible {
  outline-offset: 3px;
}

.contact-form__after {
  max-inline-size: none;
  margin: -16px 0 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 入力エラー（aform の結果）。色だけでなく文言と、まとめの一覧で伝える */
.form-error {
  display: grid;
  gap: 8px;
  padding: 16px 20px;
  border: 1px solid var(--hato-text-error);
  border-inline-start-width: 4px;
  border-radius: 2px;
  background: var(--hato-surface-base);
}

.form-error__title {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-error);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.form-error__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-inline-start: 1.25em;
  font-size: 0.875rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.field__error {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-error);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.field__input[aria-invalid="true"],
.field[aria-invalid="true"] .choice,
.file-drop:has([aria-invalid="true"]) {
  border-color: var(--hato-text-error);
}

/* 確認画面から戻ったときの添付済みのファイル。JS が無い場合は「削除する」のチェックボックスで選ぶ（JS がある場合は「削除」ボタン） */
.file-list__item[hidden],
.file-list__check[hidden] {
  display: none;
}

.file-list__check {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 0 12px;
  color: var(--hato-text-primary);
  font-size: 0.875rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.file-list__checkbox {
  flex-shrink: 0;
  inline-size: 20px;
  block-size: 20px;
  margin: 0;
  accent-color: var(--header-brand);
}

/* 確認画面（Figma にない画面。入力欄と同じ白地・枠・角丸で、項目名と内容を並べる） */
.confirm-list {
  margin: 0;
  border: 1px solid var(--hato-border-subtle);
  border-radius: 2px;
  background: var(--hato-surface-base);
}

.confirm-list__row {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.confirm-list__row + .confirm-list__row {
  border-block-start: 1px solid var(--hato-border-subtle);
}

.confirm-list__label {
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.confirm-list__value {
  min-inline-size: 0;
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.confirm-list__empty {
  color: var(--hato-text-secondary);
}

.confirm-list__files {
  margin: 0;
  padding: 0;
  list-style: none;
}

.confirm-actions {
  display: grid;
  gap: 32px;
}

.confirm-actions__back {
  justify-self: center;
}

@media (width > 768px) {
  .form-section {
    padding-block: 72px 96px;
  }

  .confirm-list__row {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 24px;
  }

  .choice {
    padding-inline: 20px;
  }

  .choice:has(:checked) {
    padding-inline: 19px;
  }
}

@media (width >= 1080px) {
  .form-section__inner {
    grid-template-columns: minmax(0, 480px) minmax(0, 600px);
    justify-content: space-between;
    column-gap: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-form__submit,
  .wide-button {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   左に見出し・右に本文の 2 列（送信完了・404・個人情報保護方針。会社概要と共通の .split-section）
   -------------------------------------------------------------------------- */
.split-section--tint {
  background: var(--hato-surface-tint);
}

.split-section__aside--text {
  gap: 24px;
}

.split-section__text {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.split-section__sentence {
  display: block;
}

.split-section__tel {
  color: inherit;
  text-decoration: none;
}

.split-section__main {
  display: grid;
  align-content: start;
  gap: 40px;
  min-inline-size: 0;
}

@media (width >= 1024px) {
  .split-section__tel {
    pointer-events: none;
  }
}

/* 注意の囲み（自動返信メールが届かないとき） */
.notice {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--hato-surface-page);
}

.notice__title {
  margin: 0;
  color: var(--hato-text-primary);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.notice__text {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 戻り導線 */
.return-links {
  display: grid;
  gap: 16px;
}

.return-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.return-links__link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

/* 主要ページへのリンクの一覧（404） */
.link-list {
  margin: 0;
  padding: 0;
  border-block-start: 1px solid var(--hato-border-subtle);
  list-style: none;
}

.link-list__item {
  border-block-end: 1px solid var(--hato-border-subtle);
}

.link-list__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  grid-template-areas:
    "label icon"
    "text icon";
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  padding-block: 18px;
  color: inherit;
  text-decoration: none;
}

.link-list__link::after {
  content: "";
  grid-area: icon;
  inline-size: 24px;
  block-size: 24px;
  background: var(--hato-icon-primary);
  mask: url("../img/icon-chevron.svg") center / contain no-repeat;
  rotate: -90deg;
  transition: translate 200ms ease;
}

.link-list__link:hover::after {
  translate: 2px 0;
}

.link-list__label {
  grid-area: label;
  color: var(--header-brand);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.link-list__link:hover .link-list__label {
  text-decoration: underline;
  text-underline-position: from-font;
}

.link-list__text {
  grid-area: text;
  color: var(--hato-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

@media (width > 768px) {
  .notice {
    padding: 28px;
  }

  .link-list__link {
    padding-block: 22px;
  }

  .link-list__label {
    font-size: 1.125rem;
  }

  .link-list__text {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-list__link::after {
    transition: none;
  }
}

/* ==========================================================================
   個人情報保護方針ページ（privacy/index.php）
   Figma: PC 270:6182 / SP 270:6181。左に目次（1080px 以上は画面に固定）、右に本文（罫線で区切る）
   ========================================================================== */
.policy__aside {
  gap: 16px;
}

.toc {
  display: grid;
  gap: 12px;
}

.toc__title {
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.toc__list {
  margin: 0;
  padding: 0;
  border-block-start: 1px solid var(--hato-border-subtle);
  list-style: none;
}

.toc__item {
  border-block-end: 1px solid var(--hato-border-subtle);
}

.toc__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-block-size: 48px;
  padding-block: 10px;
  color: var(--header-brand);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.toc__link:hover {
  text-decoration: underline;
  text-underline-position: from-font;
}

.toc__number {
  flex-shrink: 0;
  min-inline-size: 16px;
  color: var(--hato-text-secondary);
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* 制定日・最終改定日 */
.policy__dates {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 15px;
  border: 1px dashed #98a5b0;
  color: var(--hato-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.policy__date {
  display: flex;
  gap: 12px;
}

.policy__date dd {
  margin: 0;
}

.policy__body {
  min-inline-size: 0;
  border-block-start: 1px solid var(--hato-border-subtle);
}

.policy__section {
  display: grid;
  gap: 10px;
  padding-block: 24px;
  border-block-end: 1px solid var(--hato-border-subtle);
  /* 目次・URL のハッシュで移動したとき：html の scroll-padding（ヘッダーの高さ）に加え、見出しの上に少し余白を残す */
  scroll-margin-block-start: 8px;
}

.policy__title {
  margin: 0 0 4px;
  color: var(--hato-text-primary);
  font-size: 1.125rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.policy__text,
.policy__desk {
  max-inline-size: none;
  margin: 0;
  color: var(--hato-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.policy__list {
  font-size: 1rem;
  line-height: 1.75;
}

.policy__line {
  display: block;
}

.policy__tel {
  color: inherit;
  text-decoration: none;
}

.policy__links {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 44px;
  font-weight: 500;
}

.policy__link--external::after {
  content: "";
  flex-shrink: 0;
  inline-size: 16px;
  block-size: 16px;
  background: currentColor;
  mask: url("../img/icon-external.svg") center / contain no-repeat;
}

@media (width > 768px) {
  .policy__section {
    gap: 12px;
    padding-block: 32px;
  }

  .policy__title {
    font-size: 1.25rem;
  }
}

@media (width >= 1024px) {
  .policy__tel {
    pointer-events: none;
  }
}

/* 目次から見出しへ滑らかに移動する（動きを減らす設定では即時に移動する） */
@media (prefers-reduced-motion: no-preference) {
  html:has(.policy) {
    scroll-behavior: smooth;
  }
}

@media (width >= 1080px) {
  .policy__aside {
    position: sticky;
    inset-block-start: calc(var(--header-height) + 24px);
    align-self: start;
  }
}
