/* =========================================================
   Tetraris 業務改善サービス — 共通スタイル
   カラー正本: tetraris-color-theme.md「8. CSS変数」準拠
   ========================================================= */

:root {
  --color-primary: #36B9C9;
  --color-secondary: #8FD6B5;
  --color-accent: #F28C6F;

  --color-accent-hover: #E77C60;

  --color-background: #FAFBFC;
  --color-surface: #FFFFFF;

  --color-text: #333333;
  --color-text-sub: #333333; /* 2026-07-24 ユーザー指定: 本文系はすべて濃色に統一（元は#666666） */

  --color-border: #DCEBED;

  --font-gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;

  --gradient-brand: linear-gradient(
    135deg,
    #36B9C9 0%,
    #8FD6B5 100%
  );

  --shadow-soft: 0 8px 24px rgba(54, 185, 201, 0.08);
  --shadow-card: 0 6px 20px rgba(51, 51, 51, 0.06);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --maxw: 1120px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font-gothic);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Klee One は 400/600 のみ提供。太字合成を無効化し 600 を上限として扱う */
  font-synthesis: weight style;
  /* 日本語を文節境界で自動改行し、単語の途中での改行を防ぐ（Chrome/Edge対応。非対応環境は通常改行にフォールバック） */
  word-break: auto-phrase;
}

/* 句読点単位の折り返し用（inline-block で句読点位置以外での改行を防ぐ）。
   max-width:100% は「句読点なしの長い文節がモバイル幅を超えて横スクロールする」のを防ぐ安全網 */
.ib { display: inline-block; max-width: 100%; }

img { max-width: 100%; height: auto; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.4; margin: 0; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--tint { background: var(--color-background); }
.section--surface { background: var(--color-surface); }

.section__head { text-align: center; margin-bottom: 48px; }
.section__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: rgba(54, 185, 201, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.section__title {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 600;
}
.section__lead {
  margin-top: 16px;
  color: var(--color-text-sub);
  font-size: 1.1rem;
}

/* 見出し下のブランドライン */
.brand-underline {
  display: inline-block;
  position: relative;
}
.brand-underline::after {
  content: "";
  display: block;
  height: 6px;
  width: 100%;
  margin-top: 8px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
}

/* マーカー風下線（ヒーロー見出し内） */
.marker {
  background: linear-gradient(transparent 62%, rgba(54, 185, 201, 0.38) 62%);
  padding: 0 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 12px;
  padding: 14px 28px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
}
.btn:hover { text-decoration: none; }
.btn--cta {
  background-color: var(--color-accent);
  color: #FFFFFF;
}
.btn--cta:hover {
  background-color: var(--color-accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.btn--ghost {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}
.btn--ghost:hover { background: rgba(54, 185, 201, 0.06); }
/* 文字サイズは 1.08rem を起点に、ヒーローCTAとの段差 +0.17rem を1段階とする。
   現在は2段階UP（1.08 → 1.25 → 1.42rem）。padding は据え置き。 */
.btn--lg { padding: 17px 40px; font-size: 1.42rem; }

/* ---------- Header / Nav (pill) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  background: rgba(250, 251, 252, 0.82);
  backdrop-filter: saturate(160%) blur(8px);
}
/* ロゴ（左端57px）とナビピル（右端76px）の2要素構成 */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding-left: 57px;
  padding-right: 76px;
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  padding: 10px 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--color-text);
}
.brand:hover { text-decoration: none; }
/* ロゴの読み（2026-08-06 ユーザー指示）。ロゴ字と同サイズだとヘッダーが1526px必要になり
   1440pxノートで2段化するため、小さめの副文字として横に添える。 */
.brand__kana {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  margin-left: -5px; /* .brand の gap:10px を詰めてロゴ字に寄せる */
  letter-spacing: 0.01em;
}
.brand__name {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-family: var(--font-gothic);
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-links a:hover {
  text-decoration: none;
  background: rgba(54, 185, 201, 0.08);
  color: var(--color-primary);
}
.nav-cta { margin-left: 4px; }
.nav-cta .btn { padding: 11px 20px; font-size: 0.92rem; }
/* ハンバーガー（スマホ専用。PCはピル型ナビを使うので出さない・2026-08-12 ユーザー指示） */
.nav-toggle { display: none; }
/* トップのヘッダーCTAは、ヒーロー見出しの手書きアニメが出そろってから現れる。
   最終文字は --i:29 → 2.175s + 0.5s = 2.68s（2026-08-13 「！」削除で再調整）。
   場所は確保したまま見えなくするので、出現時にレイアウトはずれない。 */
.site-header--hero-wait .nav-cta,
.site-header--hero-wait .nav-toggle {
  opacity: 0;
  visibility: hidden;
  animation: navCtaIn 0.45s ease 2.68s forwards;
}
@keyframes navCtaIn {
  from { opacity: 0; visibility: visible; }
  to   { opacity: 1; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header--hero-wait .nav-cta,
  .site-header--hero-wait .nav-toggle { opacity: 1; visibility: visible; animation: none; }
}


/* ---------- 4-square mosaic motif ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 14px;
  aspect-ratio: 1 / 1;
  width: 100%;
}
.sq {
  border-radius: 18px;
  background: rgba(54, 185, 201, 0.12);
}
.sq--grad { background: linear-gradient(200deg, #36B9C9 0%, #8FD6B5 92%); }
.sq--mint { background: rgba(143, 214, 181, 0.26); }
.sq--turq { background: rgba(54, 185, 201, 0.24); }
.sq--coral { background: rgba(242, 140, 111, 0.36); }
.sq--surface { background: var(--color-surface); box-shadow: var(--shadow-card); }
/* spans */
.sq--b { grid-column: span 2; grid-row: span 2; }
.sq--w { grid-column: span 2; }
.sq--h { grid-row: span 2; }

/* ミニ4squareロゴマーク（インラインSVG補助） */
.logo-mark { width: 28px; height: 28px; flex: 0 0 auto; }

/* ---------- ヒーローのイラスト（静止画1枚表示・本文に集中させるため動きを止めた） ---------- */
.hero-illust {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.hero-illust__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* クロスフェード廃止（2026-07-25）: 右の動きが本文の読了を妨げるため静止画に。復活時は下記keyframesをanimationで再指定 */
}
.hero-illust__layer svg { width: 100%; height: 100%; display: block; }
.hero-illust__layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 20px;
}
/* 静止表示するのは2枚目（職場ミーティング＝日本人が明確・「相談」に合う） */
.hero-illust__layer--2 { opacity: 1; }

/* 15秒で3枚を順に: 各レイヤーは約0.5秒フェードイン→約4秒表示→約0.5秒フェードアウト */
@keyframes heroIllustFade {
  0%     { opacity: 0; }
  3.33%  { opacity: 1; }
  26.66% { opacity: 1; }
  33.33% { opacity: 0; }
  100%   { opacity: 0; }
}

/* 静止画のため特別対応は不要だが、他レイヤーの誤表示を防ぐ保険 */
@media (prefers-reduced-motion: reduce) {
  .hero-illust__layer { animation: none; opacity: 0; }
  .hero-illust__layer--2 { opacity: 1; }
}

/* ---------- Hero ---------- */
.hero {
  /* 2026-07-28: CTA「まずは無料で相談する」を初期表示に収めるため上余白を 56→16px
     （下端799px→721px。1600x760・1536x730・1440x780 で完全表示を実測確認） */
  padding: 16px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  grid-template-areas:
    "title  visual"
    "sub    visual"
    "cta    visual";
  /* 1fr auto 1fr: 余白を上下に逃がしてテキスト群を縦中央に保ちつつ、ブロック間隔はマージンで統一制御する */
  grid-template-rows: 1fr auto 1fr;
  /* テキスト↔写真の隙間を5mm(=18.9px)に（2026-07-25ユーザー指定）。列の右端がそのまま隙間になる */
  column-gap: 5mm;
  row-gap: 0;
  align-items: center;
  /* 写真の位置(左端883px)は不変のまま、テキストだけを右へ寄せる。
     padding204 + 列660 + gap18.9 = 882.9。
     2026-07-27: クロージング文を短くした（旧文の1行目688.7pxが最長行だった）ため、
     最長行は見出しの659.5pxになった。列幅はそれに合わせた660px。
     再計算式は 列 = 最長行の実幅W / padding = 864.1 - W（写真left 882.9 を保つ）。
     Wは必ず document.fonts.ready 後に測ること（未ロード時はフォールバック幅で誤る） */
  padding-left: 204px;
  padding-right: 0;
}
.hero__title  { grid-area: title; align-self: end; }
.hero__sub    { grid-area: sub; }
.hero__visual { grid-area: visual; }
.hero__cta    { grid-area: cta; align-self: start; margin-top: 16px; /* サブコピー→CTAの間隔をタイトル→サブコピーと同じに */ }
.hero__title {
  font-family: "Klee One", var(--font-gothic); /* 手書き風はキャッチコピーのみ（2026-07-24ユーザー指定） */
  font-size: clamp(1.85rem, 6.2vw, 2.4rem); /* 見出しを120%に拡大（2.0→2.4rem）。3行構成 */
  font-weight: 700; /* キャッチコピー確定（2026-07-24ユーザー選択）。Klee Oneは600までなので700はブラウザ合成のfaux bold */
  letter-spacing: 0.01em;
}
/* スマホ専用の改行位置（PCでは無効＝1440px基準の3行構成は不変）。
   狭い幅では .ib が内部で折り返して「いい／か分からない」のように
   意味の切れ目とずれるため、768px以下だけ .ib の区切りを解いて
   この <br> で改行させる（2026-08-11 ユーザー指摘）。 */
.hero__title .sp-br { display: none; }
/* ---------- キャッチコピーを1文字ずつ手書きのように出す ---------- */
.hero__title--write .ch {
  display: inline-block;
  opacity: 0;
  animation: chWrite 0.5s ease forwards;
  animation-delay: calc(var(--i) * 0.075s);
}
@keyframes chWrite {
  from { opacity: 0; transform: translateY(0.16em) rotate(-3deg); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0)      rotate(0);     filter: blur(0); }
}
/* マーカーは文字に合わせて左から引く（marker文字は --i:19〜 開始＝約1.43s） */
.hero__title--write .marker {
  background: linear-gradient(transparent 62%, rgba(54, 185, 201, 0.38) 62%) left center no-repeat;
  background-size: 0% 100%;
  animation: markerWipe 0.75s ease forwards;
  animation-delay: 1.43s;
  -webkit-box-decoration-break: clone; /* 折り返しても各行にマーカーを引く（途中で途切れて見えるのを防ぐ保険） */
  box-decoration-break: clone;
}
@keyframes markerWipe { to { background-size: 100% 100%; } }
/* アニメーション無効設定時は即表示 */
@media (prefers-reduced-motion: reduce) {
  .hero__title--write .ch { opacity: 1; animation: none; transform: none; filter: none; }
  .hero__title--write .marker { background-size: 100% 100%; animation: none; }
}
.hero__sub {
  margin-top: 16px;
  color: var(--color-text);
  font-size: 1.05rem;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
/* 2026-07-27: 文字サイズは .btn--lg(1.42rem) と同一に揃える（ユーザー指示）。
   ヒーローの優位性は padding の大きさ(22px 56px)で保つ。 */
.hero__actions .btn { font-size: 1.42rem; padding: 22px 56px; border-radius: 14px; }
.hero__lead { margin: 0 0 8px; font-weight: 600; font-size: 1.25rem; } /* 20px（2026-07-25ユーザー指定） */
.hero__worries {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hero__worries li {
  position: relative;
  padding-left: 30px;
  font-size: 1.25rem;  /* 20px（2026-07-25ユーザー指定） */
  line-height: 1.6;
  font-weight: 500;
}
.hero__worries li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero__sub-closing { margin: 0; font-size: 1.1rem; opacity: 0.85; }
/* ヒーローの見出し以外（サブ・写真・CTA）は、手書きアニメが終わってから順に出す。
   最終文字は --i:29 → 2.68s（2026-08-13 再調整）。場所は保持するのでレイアウトは動かない。 */
.hero__sub, .hero__visual, .hero__cta {
  opacity: 0;
  visibility: hidden;
  animation: heroPartIn 0.55s ease forwards;
}
.hero__sub { animation-delay: 2.75s; }
.hero__visual { animation-delay: 2.9s; }
.hero__cta { animation-delay: 3.05s; }
@keyframes heroPartIn {
  /* transform ではなく translate プロパティを使う（既存の translateX(-50%) 等を打ち消さないため） */
  from { opacity: 0; visibility: visible; translate: 0 8px; }
  to   { opacity: 1; visibility: visible; translate: 0 0; }
}

/* スクロールで現れるブロック（.reveal は js/reveal.js が付与する） */
/* 0.6s/18px では動きが目に留まらないため、ゆっくり長めに（2026-08-12 ユーザー指示） */
.reveal { opacity: 0; translate: 0 28px; transition: opacity 0.9s ease, translate 0.9s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.is-visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .hero__sub, .hero__visual, .hero__cta { opacity: 1; visibility: visible; animation: none; }
  .reveal { opacity: 1; translate: 0 0; transition: none; }
}

/* ヒーロー帯（スマホのみ表示）: 見出し「なんでも聞いてください！」と
   お悩みリストの橋渡し。PCは右カラムの写真があるため出さない（2026-08-11） */
.hero__band { display: none; }


/* ---------- ヒーロー・フルブリードのコラージュ ---------- */
.hero__visual { position: relative; }
.hero__collage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  max-height: 600px;
}
/* メイン大写真（3枚クロスフェード・横長） */
.hero__main {
  position: absolute;
  top: 8%;
  left: 0;
  width: 74%;   /* 写真を80%に縮小（右端固定・左を内側へ）。列拡大でcollageが557pxに縮み、74%=412px。
                   広い画面では画面幅なりに拡大する方針（2026-07-25ユーザー選択・案B） */
  height: 78%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  z-index: 2;
}
.hero-illust--wide { aspect-ratio: auto; height: 100%; }
/* 4squareモザイクタイル（メイン写真の背後・右〜下の余白に広がりを出す）
   すべて z-index:1 で、写真(z2)・テキストには重ならない。端で見切れてよい */
.hero__tile {
  position: absolute;
  z-index: 1;
  border-radius: 22px;
}
/* 大タイル2枚: 写真の背後から右・下へはみ出し「広がり」をつくる（淡色・柔らかい角丸で統一） */
.hero__tile--a { width: 40%; height: 60%; top: 6%;     right: -7%; border-radius: 40px; }
.hero__tile--b { width: 44%; height: 34%; bottom: -8%; left: 30%;  border-radius: 40px; }
/* グラデ中タイル1枚（ブランドグラデはここに限定・アクセント） */
.hero__tile--c { width: 22%; aspect-ratio: 1 / 1; top: 52%;    right: 6%; border-radius: 26px; }
/* 小タイルの散らし（右下〜右端・くっきりした小角丸で大タイルと差をつける） */
.hero__tile--d { width: 9%;  aspect-ratio: 1 / 1; top: 8%;     right: 20%; border-radius: 12px; }
.hero__tile--e { width: 11%; aspect-ratio: 1 / 1; bottom: 22%; right: 0; border-radius: 14px; }
.hero__tile--f { width: 7%;  aspect-ratio: 1 / 1; bottom: 4%;  right: 26%; border-radius: 10px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
/* サービスカードは標準枠(1120px)より横に広げ、題名「自動化・オーダーメイドアプリ開発・AI活用」を2行に収める */
#service .grid--3 {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1340px, calc(100vw - 40px));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.card__badge {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;          /* 左右中央揃え */
  font-size: 1.45rem;           /* バッジを最大に（入口・手段・継続支援） */
  font-weight: 700;
  padding: 7px 24px;
  border-radius: var(--radius-pill);
  background: rgba(54, 185, 201, 0.12);
  color: var(--color-primary);
  text-align: center;
}
.card__badge--mint { background: rgba(143, 214, 181, 0.28); color: #3f8f6c; }
.card__badge--coral { background: rgba(242, 140, 111, 0.18); color: var(--color-accent-hover); }
.card__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }  /* 題名を拡大（バッジより小さく） */
/* 「自動化・オーダーメイドアプリ開発」が1行に収まらない狭い幅では、中黒を改行に置き換える
   （行末に「・」だけが残るのを避ける・2026-07-25ユーザー指定） */
@media (max-width: 439px) {
  .card__title .t-sep { display: block; font-size: 0; line-height: 0; }
}
.card__text { color: var(--color-text-sub); font-size: 1.1rem; margin: 0; }

/* お悩み共感リスト */
.worry-list { display: grid; gap: 14px; }
.worry-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
}
.worry-item__icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.worry-item__text { margin: 0; font-weight: 600; }
.worry-closing {
  text-align: center;
  margin-top: 30px;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ---------- 考え方（対比） ---------- */
/* 横型フローチャート（Tetrarisの流れ・番号＋タイトル＋アイコン＋説明＋→矢印） */
.flow-h {
  /* 標準コンテナ(1120px)より横に広げて画面幅を活かす（左右はビューポート内に収める） */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1340px, calc(100vw - 40px));
  display: flex;
  align-items: stretch;
  gap: 24px;                 /* カード間の余白＝矢印スペース */
  overflow-x: auto;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
}
.flow-h__step {
  position: relative;
  flex: 1 0 150px;
  min-width: 150px;
  min-height: 410px;         /* 高さを従来の約2倍に */
  background: var(--color-surface);
  border: 1px solid rgba(54, 185, 201, 0.22);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;   /* 縦2倍のカード内で番号・タイトル・アイコン・説明を均等配置 */
  gap: 8px;
  text-align: center;
}
/* カード右のシェブロン矢印（最後以外・gap内に配置） */
.flow-h__step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
  transform: translateY(-50%) rotate(45deg);
}
.flow-h__num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.flow-h__title { margin: 0; font-weight: 700; font-size: 1.1rem; line-height: 1.4; }
.flow-h__icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gradient-brand); color: #fff;
  display: grid; place-items: center;
}
.flow-h__icon svg { width: 30px; height: 30px; }
.flow-h__desc { margin: 0; font-size: 1.1rem; color: #5f6b70; line-height: 1.55; }
.flow-note {
  text-align: center;
  margin-top: 30px;
  font-size: 1.1rem;
  font-weight: 600;
}
.flow-note em { font-style: normal; color: var(--color-primary); }

/* ---------- サービス ---------- */
.service-note {
  /* 技術バッジ帯(.tech-band)を削除したため、その上マージン34pxをここで確保する */
  margin: 34px 0 0;
  text-align: center;
  color: var(--color-text-sub);
  font-weight: 600;
  font-size: 1.1rem;
}
.service-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.service-list li {
  position: relative;
  padding-left: 20px;
  font-size: 1.1rem;
  color: var(--color-text-sub);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 8px; height: 8px;
  border-radius: 3px;
  background: var(--gradient-brand);
}

/* ---------- よくあるケース（CONCEPTの上・Before/After 3枚横並び） ----------
   箇条書きの行数がカードごとに違うため、subgrid で
   タグ／BEFORE／矢印／AFTER／成果 の5行を3枚横並びで揃える。 */
.reality-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* 2026-07-31: 「画面いっぱいすぎ・余白を開けて（フォント縮小OK）」の指示で
     1400px→1200pxへ縮小＋画面幅からも最低120px確保（1440pxで左右120pxずつ空く）。
     本文は1.1→1rem。長い項目(20〜21字)は2行に折り返すがぶら下げインデントで可読 */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100vw - 120px));
}
.reality {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 26px 26px;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  gap: 12px;
}
/* 文字サイズはSERVICEの階層に合わせる（タグ=.card__badge / 本文=.card__text 相当） */
.reality__tag {
  justify-self: start;
  font-size: 1.45rem;
  font-weight: 700;
  padding: 7px 24px;
  border-radius: var(--radius-pill);
  background: rgba(143, 214, 181, 0.28);
  color: #3f8f6c;
}
/* subgridで3枚のパネル高さが揃うため、行数の少ないカードは下に空白が溜まる。
   ラベルは上に固定したまま、箇条書きだけを余白の中央へ寄せて均す。 */
.reality__panel {
  border-radius: var(--radius-md);
  padding: 13px 12px 14px;
  display: flex;
  flex-direction: column;
}
.reality__panel .reality__list { margin: auto 0; }
.reality__panel--before { background: rgba(51, 51, 51, 0.05); }
.reality__panel--after { background: rgba(54, 185, 201, 0.10); }
.reality__label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.reality__panel--before .reality__label { color: #6E767E; }
.reality__panel--after .reality__label { color: var(--color-primary); }
.reality__list { margin: 0; padding: 0; list-style: none; }
.reality__list li {
  position: relative;
  padding-left: 19px;
  margin-bottom: 7px;
  /* 2026-07-31: 1.1→1rem（余白優先・フォント縮小OKのユーザー指示） */
  font-size: 1rem;
  line-height: 1.9;
}
.reality__list li:last-child { margin-bottom: 0; }
.reality__list li::before {
  position: absolute; left: 0; top: 0;
  font-weight: 700; font-size: 0.85rem;
}
.reality__panel--before .reality__list li::before { content: "✕"; color: #9AA3A8; }
.reality__panel--after .reality__list li::before { content: "✓"; color: var(--color-primary); }
.reality__arrow {
  justify-self: center;
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(90deg); /* 縦積みなので下向き */
}
.reality__result { margin: 0; font-size: 1rem; line-height: 1.9; }
/* ラベルの後ろは全角スペースではなく余白で取る（後続文字で間隔が不揃いになるため） */
.reality__result strong { font-weight: 600; margin-right: 12px; }
.reality__result em { font-style: normal; font-weight: 600; color: var(--color-accent); }

/* ---------- 事例 Before/After ---------- */
/* ---------- 改善事例: トップページ用の要約カード（4枚横並び・詳細はcase.htmlへ） ---------- */
.case-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  /* 標準枠(1120px)より広げて4枚でも各カードに余裕を持たせる */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1340px, calc(100vw - 40px));
}
.case-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 24px 22px;
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.case-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(51, 51, 51, 0.10);
}
/* 分野のラベル。医療＝ミント、SNS＝ターコイズで色分けする
   （アクセントのコーラルは使わない＝CTAと強調に限定するため） */
.case-card__cat {
  align-self: flex-start;   /* 左寄せ */
  font-size: 1.12rem;       /* 題名と同じ大きさ */
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.case-card__cat--med { background: rgba(143, 214, 181, 0.28); color: #3f8f6c; }
.case-card__cat--sns { background: rgba(54, 185, 201, 0.18); color: var(--color-primary); }
/* 題名はカード内の最上部に、淡い面を敷いて見出しとして独立させる
   （case.htmlの各ブロックのバッジと同じ扱い） */
.case-card__title {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: rgba(54, 185, 201, 0.10);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.5;
  /* 題名が1行のカードと2行のカードが混在するため、2行分の高さを確保して
     4枚の本文の開始位置を揃える（= 1.12rem × line-height1.5 × 2行 + 上下padding） */
  min-height: calc(1.12rem * 1.5 * 2 + 20px);
  display: grid;
  place-content: center;
}
.case-card__text { margin: 0 0 16px; font-size: 1.1rem; line-height: 1.85; }
/* 成果の一文。margin-top:auto でカード下端に揃え、高さが違っても並びが崩れない */
.case-card__metric {
  margin: auto 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.7;
}
.case-card__metric em { font-style: normal; color: var(--color-accent); }
.case-card__more {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
}
.case-card__more::after { content: " →"; }
.case-more { text-align: center; margin-top: 30px; }

/* ---------- 改善事例: 1業務につき1ブロック（導入前 › 仕組み › 導入後） ---------- */
.ba-cases { display: grid; gap: 22px; }
.ba-case {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 26px 24px;
}
/* 分野のラベル（左寄せ）。色分けはトップの要約カードと同じ */
.ba-case__cat {
  display: inline-block;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.ba-case__cat--med { background: rgba(143, 214, 181, 0.28); color: #3f8f6c; }
.ba-case__cat--sns { background: rgba(54, 185, 201, 0.18); color: var(--color-primary); }
/* 業務名バッジ。BEFORE/AFTERの見出し(1.6rem)と同じ大きさにし、幅は中身ぶんだけ取って中央へ */
.ba-case__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  background: rgba(54, 185, 201, 0.10);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.6rem;
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  margin: 0 auto 20px;
}
/* BEFORE / AFTER の2パネル。境界は clip-path で矢印形（シェブロン）にし、
   左パネルの頂点が右パネルの凹みに噛み合う。gapのぶんが白い切れ目になる。
   ※clip-path と border-radius は併用できないため、パネル自体の角は直角 */
.ba-ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: stretch;
}
/* 左右で情報量が違っても間延びしないよう、見出しは上に固定して本体を縦中央へ寄せる
   （margin:auto が余った高さを上下に振り分ける） */
.ba-ba__side { padding: 26px 30px 28px; display: flex; flex-direction: column; }
/* 導入前は無彩色寄りの低彩度グレー、導入後はブランドのターコイズ淡 */
.ba-ba__side--before {
  background: rgba(51, 51, 51, 0.06);
  clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 50%, calc(100% - 44px) 100%, 0 100%);
  padding-right: 68px;
}
.ba-ba__side--after {
  background: rgba(54, 185, 201, 0.10);
  clip-path: polygon(44px 0, 100% 0, 100% 100%, 44px 100%, 0 50%);
  padding-left: 68px;
}
/* 見出し: 英字を大きく、日本語は字間を開けて下に添える */
.ba-ba__head { margin: 0 0 18px; text-align: center; }
.ba-ba__en {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.ba-ba__ja {
  display: block;
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-indent: 0.32em;  /* letter-spacingの右余りを打ち消して中央に見せる */
}
.ba-ba__side--before .ba-ba__en,
.ba-ba__side--before .ba-ba__ja { color: #8A9299; }
.ba-ba__side--after .ba-ba__en,
.ba-ba__side--after .ba-ba__ja { color: var(--color-primary); }
/* アイコン＋短いラベル（そのパネルの状態を一言で示す） */
.ba-ba__lead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: auto 0 18px;  /* 上の余白を吸収して本体を中央へ */
}
.ba-ba__lead-text { font-size: 1.02rem; font-weight: 700; line-height: 1.55; }
/* 項目リストは白い面に載せて、✕／✓のマークを頭に置く */
.ba-ba__list {
  list-style: none;
  margin: 0 0 auto;  /* 下の余白を吸収 */
  padding: 18px 20px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  display: grid;
  gap: 11px;
}
.ba-ba__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.94rem;
  line-height: 1.7;
}
/* テキストは必ずこのspanで包む。liを直接flexにするとテキストノードと<em>が
   別々のflexアイテムになり「（87%削減）」のような括弧付き強調が分断される */
.ba-ba__li-text { min-width: 0; }
.ba-ba__list em { font-style: normal; font-weight: 700; color: var(--color-accent); }
.ba-ba__mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
}
.ba-ba__mark--x { background: #8A9299; }
.ba-ba__mark--o { background: var(--color-primary); }
/* 補足のタグ列（自動作成している書類など） */
.ba-ba__docs-label {
  margin: 16px 0 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-primary);
}
.ba-ba__docs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ba-ba__docs li {
  font-size: 0.84rem;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid rgba(54, 185, 201, 0.25);
}
/* 補足事例（別業種）。眼科3件とは区別できるよう破線の枠で囲む */
.ba-case--extra {
  margin-top: 26px;
  border: 1px dashed rgba(54, 185, 201, 0.4);
  background: rgba(54, 185, 201, 0.04);
}
.ba-case--extra .ba-case__badge { font-size: 1.25rem; }
.ba-case__biz {
  display: block;
  width: fit-content;
  margin: -8px auto 14px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: rgba(143, 214, 181, 0.28);
  color: #3f8f6c;
}
.ba-case__intro {
  max-width: 760px;
  margin: 0 auto 20px;
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.9;
}
.case-disclaimer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--color-text-sub);
}

/* ---------- 導入スタッフの声（職種ごとに1ブロック） ---------- */
.voices { display: grid; gap: 22px; max-width: 900px; margin: 0 auto; }
.voice-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 32px 26px;
  box-shadow: var(--shadow-card);
}
.voice-block__role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(143, 214, 181, 0.28);
  color: #3f8f6c;
}
.voice-block__quote {
  margin: 14px 0 16px;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-primary);
}
.voice-block__text { margin: 0 0 12px; font-size: 1.1rem; line-height: 1.9; }
.voice-block__text:last-of-type { margin-bottom: 0; }
/* 「特に役立っている機能」は本文と分けて淡い面に載せ、機能名はタグ状に並べる */
.voice-block__feat {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}
.voice-block__feat-label {
  margin: 0 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-primary);
}
.voice-block__feat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.voice-block__feat-list li {
  font-size: 0.86rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(54, 185, 201, 0.08);
  border: 1px solid rgba(54, 185, 201, 0.25);
}
/* 実在スタッフの発言を掲載しているため、同意取得の事実をセクション末尾に残す */
.voice-note {
  max-width: 900px;
  margin: 18px auto 0;
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--color-text-sub);
}

/* ---------- 改善できる業務（横スライド） ----------
   画面幅いっぱいに広げ、6枚×2セットのトラックを translateX(-50%) まで動かして無限ループ。
   写真は .explore-card__img--<slug> の background-image で差し替える。 */
.explore-slider {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  /* 100vw ちょうどだと実機のスクロールバー幅ぶんはみ出すため、既存の .flow-h と同じく余白を引く */
  width: calc(100vw - 40px);
  overflow: hidden;
  /* 左右端をフェードさせて「まだ続いている」ことを示す */
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.explore-track {
  display: flex;
  gap: 22px;
  width: max-content;
  /* 9枚に増やしたので1周を長めに（スクロール速度は6枚時と同等に保つ） */
  animation: exploreScroll 68s linear infinite;
}
.explore-slider:hover .explore-track { animation-play-state: paused; }
@keyframes exploreScroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 11px)); } /* gapの半分ぶんを引いて継ぎ目を合わせる */
}
.explore-card {
  flex: 0 0 268px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.explore-card__img {
  display: block;
  aspect-ratio: 16 / 10;
  /* 写真が入るまでのプレースホルダ（ブランドの淡色） */
  background: linear-gradient(135deg, rgba(54, 185, 201, 0.18), rgba(143, 214, 181, 0.28));
  background-size: cover;
  background-position: center;
}
.explore-card__label {
  margin: 0;
  padding: 15px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}
/* 写真（GPT生成・原本は1586x992のPNG。800x500のJPEG品質85に最適化して配置＝9.0MB→452KB） */
.explore-card__img--shorui   { background-image: url("../assets/img/explore-shorui.jpg"); }
.explore-card__img--zaiko    { background-image: url("../assets/img/explore-zaiko.jpg"); }
.explore-card__img--hacchu   { background-image: url("../assets/img/explore-hacchu.jpg"); }
.explore-card__img--kyoyu    { background-image: url("../assets/img/explore-kyoyu.jpg"); }
.explore-card__img--schedule { background-image: url("../assets/img/explore-schedule.jpg"); }
.explore-card__img--ai       { background-image: url("../assets/img/explore-ai.jpg"); }
.explore-card__img--seikyu   { background-image: url("../assets/img/explore-seikyu.jpg"); }
.explore-card__img--excel    { background-image: url("../assets/img/explore-excel.jpg"); }
.explore-card__img--shift    { background-image: url("../assets/img/explore-shift.jpg"); }
@media (prefers-reduced-motion: reduce) {
  .explore-track { animation: none; }
  .explore-slider { overflow-x: auto; }
}
.tag-closing {
  text-align: center;
  margin-top: 30px;
  color: var(--color-text-sub);
  font-weight: 600;
}

/* ---------- 代表プロフィール ---------- */
.profile {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.profile__photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}
.profile__body p { color: var(--color-text-sub); }
.profile__body p:not(.profile__lead) { font-size: 1.1rem; }
.profile__lead {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text) !important;
  margin-bottom: 18px;
}

/* ---------- 選ばれる理由 (2x2 = Tetra) ---------- */
.reasons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.reason-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* 数字は左上（2026-07-25ユーザー指定・元は右上）。題名と本文は数字ぶんだけ
   左に余白を取って左端を揃える */
.reason-card__no {
  position: absolute;
  top: 26px; left: 28px;
  font-size: 2.9rem;
  font-weight: 600;
  line-height: 1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
/* フォントを2段階UP: 題名 1.12→1.375rem(22px) / 本文 0.95→1.2rem(19.2px) / 数字 2.4→2.9rem */
.reason-card__title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 10px;
  padding-left: 82px;
  /* 題名が1行/2行で混在するため2行分を確保し、4枚の本文の開始位置を揃える */
  min-height: calc(1.375rem * 1.4 * 2);
}
.reason-card__text { color: var(--color-text-sub); font-size: 1.2rem; margin: 0; padding-left: 82px; }

/* ---------- 料金 ---------- */
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.price-table th, .price-table td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.price-table thead th {
  background: rgba(54, 185, 201, 0.08);
  font-weight: 600;
  color: var(--color-text);
  font-size: 1rem;
}
.price-table td { font-size: 1.1rem; }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table td.price { font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.price-note {
  text-align: center;
  margin-top: 22px;
  color: var(--color-text-sub);
  font-size: 1rem;
}
.table-scroll { overflow-x: auto; }
/* 狭幅端末（〜479px）で料金表がコンテナ幅を超え、料金列が見切れていた。
   td.price は nowrap のため、セル余白と文字サイズを詰めて内側に収める。 */
@media (max-width: 479px) {
  .price-table th, .price-table td { padding: 14px 12px; }
  .price-table thead th { font-size: 0.85rem; }
  .price-table tbody td { font-size: 0.95rem; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; max-width: 800px; margin: 0 auto; }
.faq details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px 24px;
  box-shadow: var(--shadow-card);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 18px 34px 18px 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q";
  color: var(--color-primary);
  font-weight: 600;
  margin-right: 12px;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 16px;
  font-size: 1.4rem;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq__answer {
  padding: 0 0 20px 26px;
  color: var(--color-text-sub);
  font-size: 1.1rem;
  margin: 0;
}

/* ---------- クロージング ---------- */
.closing {
  position: relative;
  background: linear-gradient(160deg, rgba(143, 214, 181, 0.22), rgba(54, 185, 201, 0.1));
  overflow: hidden;
}
.closing__inner { text-align: center; position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.closing__title { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 600; margin-bottom: 20px; }
.closing__text { color: var(--color-text); font-size: 1.1rem; }
.closing__strong { font-weight: 600; font-size: 1.12rem; display: block; margin: 18px 0; }
.closing__deco {
  position: absolute;
  opacity: 0.5;
  width: 180px;
  z-index: 1;
}
.closing__deco--tl { top: -30px; left: -20px; }
.closing__deco--br { bottom: -40px; right: -20px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 54px 0 30px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--color-text-sub); font-size: 0.92rem; margin-top: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-nav__col h4 { font-size: 0.9rem; margin-bottom: 12px; }
.footer-nav__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav__col a { color: var(--color-text-sub); font-size: 0.9rem; }
.footer-nav__col a:hover { color: var(--color-primary); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-sub);
  font-size: 0.85rem;
}

/* ---------- 下層ページ共通 ---------- */
.page-hero {
  background: linear-gradient(160deg, rgba(54, 185, 201, 0.08), rgba(143, 214, 181, 0.12));
  padding: 60px 0;
  text-align: center;
}
.page-hero__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.page-hero__title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 600; }
.page-hero__lead { margin-top: 14px; color: var(--color-text-sub); }

.prose { max-width: 800px; margin: 0 auto; }
.prose h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--color-text); }
.prose strong { color: var(--color-text); font-weight: 600; }
.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 40px 0;
}
.prose ul { padding-left: 1.3em; color: var(--color-text-sub); }
.prose li { margin-bottom: 6px; }

/* 代表挨拶の「保有資格・経歴」（2026-08-12 追加） */
.cred__label {
  margin: 22px 0 8px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.02rem;
}
.cred__list { list-style: none; padding-left: 0; }
.cred__list li {
  position: relative;
  padding-left: 22px;
  color: var(--color-text);
}
.cred__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.info-table th, .info-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  font-size: 0.95rem;
}
.info-table th {
  width: 32%;
  background: rgba(54, 185, 201, 0.06);
  font-weight: 600;
  color: var(--color-text);
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }
/* 狭幅端末では2列のままだと必要幅383.7pxがコンテナ312pxを超え、ページごと横スクロールしていた。
   項目名の下に内容を置く縦積みへ切り替える（.info-table は tokushoho.html 専用）。 */
@media (max-width: 599px) {
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td {
    display: block;
    width: auto;
  }
  .info-table tr { border-bottom: 1px solid var(--color-border); }
  .info-table tr:last-child { border-bottom: none; }
  .info-table th {
    padding: 14px 18px 4px;
    border-bottom: none;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.85rem;
  }
  .info-table td { padding: 0 18px 16px; border-bottom: none; }
}

/* ---------- フォーム ---------- */
.form-wrap {
  max-width: 680px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
.form-field { margin-bottom: 24px; }
.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.form-field .req {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
}
.form-field .opt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-sub);
  background: rgba(51,51,51,0.06);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-background);
  transition: border-color 0.2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
}
.form-field textarea { min-height: 150px; resize: vertical; }
/* プルダウン（ご相談の概要・2026-08-12 追加）。矢印はSVGで自前描画し、OS標準の見た目に依存させない */
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2336B9C9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
.form-hint { font-size: 0.86rem; color: var(--color-text-sub); margin: 6px 0 0; }
.form-actions { text-align: center; margin-top: 8px; }
.form-actions .btn { width: 100%; max-width: 340px; }

/* ---------- レスポンシブ ---------- */
/* 中間幅(901〜1439px)。ヒーローのテキスト列は1440px基準の固定値(padding82/781px)のままだと
   残りのビジュアル列が痩せて写真だけが小さくなるため、テキスト列を幅に連動して詰める。
   1440px以上は従来どおり固定値（見え方は不変）。 */
@media (min-width: 901px) and (max-width: 1439px) {
  .hero__grid {
    /* 列の上限を最長行（2026-07-27時点は見出しの659.5px）に合わせると列幅ぴったりに収まり、
       column-gap(5mm)がそのまま隙間になる。それ未満の幅では列が痩せて最長行が折り返すため、
       行末に余りが出て隙間は5mmより広くなる。
       ※paddingは据え置き。この帯で右へ寄せると写真が痩せるため */
    padding-left: clamp(32px, 4.4vw, 82px);
    grid-template-columns: minmax(0, clamp(480px, 54.2vw, 660px)) minmax(0, 1fr);
  }
}

/* ヘッダー: ピル型ナビの自然幅は855px。ロゴ131 + 左右padding133 + gap20 = 1139px を下回ると
   CTAが2段目へ折り返してロゴと重なるため、1200px未満では余白・文字を詰めて1段に収める。
   ※flex-wrapは触らない（768px以下のモバイル縦積みを壊さないため） */
@media (max-width: 1357px) {
  .header-inner { padding-left: 24px; padding-right: 24px; gap: 12px; }
  .nav-pill { gap: 10px; padding: 8px 10px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 8px 8px; font-size: 0.86rem; }
  .nav-cta { margin-left: 0; }
  .nav-cta .btn { padding: 10px 14px; font-size: 0.86rem; }
}

/* ヘッダー: 詰めても1段に収まらない幅では、
   ロゴを上・ナビピルを下段いっぱいに置く段組みへ切り替える。※以前は768px以下のみに適用しており、
   769〜909pxではCTAだけが2段目に折れてロゴと重なっていた */
@media (max-width: 1108px) {
  .header-inner {
    flex-wrap: wrap;
    padding-left: 20px;
    padding-right: 20px;
    gap: 12px;
  }
  .nav-pill { width: 100%; justify-content: center; padding: 8px 12px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 6px 8px; font-size: 0.85rem; }
}

/* 改善事例の要約カード: 4列 → 2列（1100px以下）→ 1列（600px以下） */
/* よくあるケース: 3枚横並びが窮屈になる幅で縦積みへ（subgridも解除） */
@media (max-width: 980px) {
  .reality-cards { grid-template-columns: 1fr; width: calc(100vw - 40px); }
  .reality { grid-template-rows: none; grid-row: auto; }
}

@media (max-width: 1100px) {
  .case-cards {
    grid-template-columns: repeat(2, 1fr);
    position: static;
    left: auto;
    transform: none;
    width: auto;
  }
}
@media (max-width: 600px) {
  .case-cards { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr; }
  #service .grid--3 { position: static; left: auto; transform: none; width: auto; }
  /* 横型フローを縦積みに切替。widen/縦2倍はリセット。矢印は下向きに */
  .flow-h { position: static; left: auto; transform: none; width: auto; flex-direction: column; overflow-x: visible; gap: 26px; }
  .flow-h__step { flex: 1 1 auto; width: 100%; min-height: 0; padding: 24px 20px; justify-content: flex-start; gap: 12px; }
  .flow-h__step:not(:last-child)::after {
    right: 50%;
    top: auto;
    bottom: -19px;
    transform: translateX(50%) rotate(135deg);
  }
  .profile { grid-template-columns: 1fr; padding: 30px; }
  .reasons { grid-template-columns: 1fr; }
  /* 改善事例: BEFORE/AFTERを縦積みにし、噛み合う矢印を下向きに向け直す */
  .ba-ba { grid-template-columns: 1fr; gap: 6px; }
  .ba-ba__side--before {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 50% 100%, 0 calc(100% - 32px));
    padding: 24px 22px 54px;
  }
  .ba-ba__side--after {
    clip-path: polygon(0 32px, 50% 0, 100% 32px, 100% 100%, 0 100%);
    padding: 54px 22px 26px;
  }
}

@media (max-width: 768px) {
  /* スマホではナビ項目を出さず、CTAだけを画面幅いっぱいに置く（2026-08-04 ユーザー指示）。
     ナビ2行＋CTAでヘッダーが225pxを占めていたため。セクションへの導線はフッターナビが担う。
     白いピルの枠は消して、オレンジのボタンだけが見える形にする。 */
  /* ハンバーガーで開閉する（2026-08-12）。ヘッダー下に重ねるドロップダウン。
     開閉でページを押し出さない＝閉じた瞬間にアンカー位置がずれない。 */
  .nav-links {
    display: block;
    position: absolute;
    top: calc(100% - 6px);
    left: 16px;
    right: 16px;
    width: auto;
    margin: 0;
    padding: 0 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    z-index: 60;
    transition: max-height 0.32s ease, opacity 0.25s ease, visibility 0.32s ease;
  }
  .nav-links.is-open {
    max-height: 70vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    padding: 6px 12px; /* 閉じている間は上下paddingを持たせない（白い帯が残るため） */
  }
  /* 閉じている間はキーボードのTab順からも外す（JS無効時は <noscript> のstyleで通常表示に戻す） */
  .nav-links:not(.is-open) { visibility: hidden; }
  .nav-links li { border-bottom: 1px solid var(--color-border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 14px 8px; font-size: 1rem; border-radius: 10px; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 11px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
  }
  .nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--color-text);
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-pill {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .nav-cta { width: 100%; margin-left: 0; }
  .nav-cta .btn { width: 100%; padding: 15px 20px; font-size: 1.05rem; }

  .section { padding: 60px 0; }
  /* ヘッダーCTAと見出しの間を詰める（元 32px → 0。残る隙間はヘッダー下padding16pxのみ・2026-08-12ユーザー指示） */
  html { scroll-padding-top: 152px; } /* 2段ヘッダー(136px)に隠れないように */
  .hero { padding: 0 0 48px; }
  /* キャッチコピーは .ib のブロック区切りを解き、.sp-br で意味の切れ目に改行を置く。
     「いいか分からない——」までを1行にして、マーカーの「そのままご相談ください」が
     1行に収まる（＝マーカーが分断されない）ようにする。 */
  .hero__title .ib { display: inline; }
  .hero__title .sp-br { display: inline; }
  /* マーカー行「なんでも聞いてください！」12文字が1行に収まる上限（6.9vw）。
     320/375/390px いずれでも折り返さない＝マーカーが分断されない（2026-08-11） */
  .hero__title { font-size: min(1.85rem, 6.9vw); }
  /* 下層ページの見出しは .ib の塊（例:「「システムを作る」のではなく、」15文字）が
     内部で折り返さない上限まで縮める。320/375/390px いずれも塊が保たれる（2026-08-12） */
  .page-hero__title { font-size: min(1.6rem, 5.6vw); }
  .hero__band {
    display: block;
    margin: 0 0 16px;
  }
  .hero__band img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 20px;
  }
  /* モバイル: 見出し → サブ → メイン写真 → バッジ → CTA の順で縦積み */
  .hero__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* 写真を列幅いっぱいに伸ばす（center継承だと潰れる） */
    gap: 24px;
    padding: 0 24px; /* デスクトップのフルブリード用paddingを打ち消し、左右に余白 */
  }
  .hero__visual { width: 100%; }
  .hero__title  { order: 1; align-self: auto; }
  .hero__sub    { order: 2; }
  .hero__visual { order: 3; }
  .hero__cta    { order: 4; margin-top: 0; }
  /* コラージュはメイン写真のみ・コンテナ幅・4:3。装飾タイルは非表示 */
  .hero__collage { aspect-ratio: auto; max-height: none; }
  .hero__main {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .hero__tile { display: none; }
  .grid--2 { grid-template-columns: 1fr; }
  /* 選ばれる理由: 番号を静的・小さくして本文との衝突を防ぐ */
  .reason-card { padding: 26px 24px; }
  .reason-card__no {
    position: static;
    display: block;
    font-size: 1.5rem;
    margin-bottom: 6px;
    opacity: 1;
  }
  .reason-card__title { padding-right: 0; }
  .brand { font-size: 1.05rem; }
  .footer-grid { flex-direction: column; }
  .form-wrap { padding: 26px; }
}
