/* =====================================================================
   辻堂司法書士事務所 専用スキン（site.css）
   ---------------------------------------------------------------------
   旧サイト http://www.matsuzakijimusyo.com/（BiND 製・825px 固定）の見た目を
   corp 正本の上で再現する。正本の style.css / blocks.css は触らず、
   header.php から最後に読み込んでここだけで上書きする（shidasan-dog と同じ方式）。

   旧サイト実測値（2026-09-24 ブラウザで getComputedStyle）
     body 地色 #FFFAFA ／ コンテンツ列 白 825px ／ 本文 ヒラギノ明朝 W3 15px ／
     見出し h2 19.8px W6 下線 #999 ／ h4 12.6px W6 + 四角アイコン ／
     囲み #e6e6e6 ／ ナビ #f3f3f3→#bababa の縦グラデ 51px・現在ページ #7e7e7e 白文字 ／
     ページタイトル帯 #0066ff に白70%の膜 ／ パンくず 9.6px #999
   ===================================================================== */

:root {
  --tj-w: 900px;                                  /* 旧 825px。バナー画像を 2x で用意したので 900 まで拡大可 */
  --tj-serif: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN W3", "Hiragino Mincho Pro", "Noto Serif JP", "Yu Mincho", "游明朝", "MS PMincho", serif;
  --tj-blue: #0066ff;                             /* ページタイトル帯 */
  --tj-blue-soft: #b3d1ff;                        /* #0066ff に白70%を重ねた色 */
  --tj-link: #0066cc;
  --tj-text: #333333;
  --tj-line: #e3e3e3;
  --tj-kakomi: #e6e6e6;
  /* 正本トークンの意味だけ差し替える（名前は据え置き）。黄のアクセントは使わない */
  --bg-base: #FFFAFA;
  --bg-paper: #ffffff;
  --text-main: #333333;
  --gold: #0066ff;
  --gold-light: #4d94ff;
  --gold-ink: #0052cc;
  --font-heading: var(--tj-serif);
  --font-serif: var(--tj-serif);
  --font-sans: var(--tj-serif);
  --line: #d9d9d9;
}

body {
  background: #FFFAFA;
  color: var(--tj-text);
  font-family: var(--tj-serif);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0;
}
a { color: inherit; }
a:hover { color: var(--tj-link); }

/* ---------------------------------------------------------------------
   ヘッダー：固定ヘッダーをやめ、旧サイトと同じ
   「上段の小さな文字＋TEL → 草原の大バナー → グレーのナビ帯」の順に組み直す。
   バナー画像はヘッダー自身の ::before（文字は画像処理で消してある）、
   バナー上の文字はロゴ（店名テキスト）と ::after で重ねる＝画像を作り直さずに済む。
   ★ヘッダーブロックの「ロゴ画像」は設定しないこと（店名テキストをバナー文字に使っている）
   --------------------------------------------------------------------- */
.global-header,
.global-header.is-scrolled {
  position: relative;
  top: auto; left: auto;
  z-index: 10;
  width: 100%;
  max-width: var(--tj-w);
  min-height: 0;
  margin: 0 auto;
  padding: 10px 0 0;
  gap: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "eyebrow tel"
    "banner  banner"
    "nav     nav";
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
  backdrop-filter: none;
  transition: none;
}

/* 上段左：ページ設定「H1見出し」（旧サイトの「辻堂の歩みとともに〜 since 1986 …」の行に相当） */
.global-header .header-page-eyebrow {
  grid-area: eyebrow;
  position: static;
  width: auto; height: auto;
  margin: 0; padding: 0 0 8px 6px;
  overflow: visible; clip: auto; white-space: normal;
  font-family: var(--tj-serif);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  letter-spacing: .02em;
}
@media (max-width: 900px) {
  .global-header .header-page-eyebrow { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
}

/* 上段右：電話番号（ヘッダーブロックの「電話番号：表示」）。お問い合わせCTAは出さない */
.global-header .header-btns { grid-area: tel; display: flex; justify-content: flex-end; align-items: flex-start; gap: 10px; padding: 0 6px 8px 0; }
.global-header .btn-header-tel { font-family: var(--tj-serif); font-size: 11px; font-weight: 400; color: #333; }
.global-header .btn-header-tel i { font-size: 10px; margin-right: 2px; }
.global-header .btn-header-contact { display: none !important; }

/* 草原バナー（文字なしの画像。2x で用意） */
.global-header::before {
  content: "";
  grid-area: banner;
  display: block;
  width: 100%;
  aspect-ratio: 825 / 217;
  background: url("/image/site/banner_sky_1650x434.jpg") center / cover no-repeat;
  z-index: 0;
}
/* バナー文字。位置計算で重ねると端末のフォント差で行が食い込むので、
   1行目（小）＝ヘッダーの ::after を上端に固定、
   2行目（大）＝ロゴの店名テキスト＋ロゴ ::before「へ」、3行目（小）＝ロゴ ::after を
   flex の order で「店名 → へ → 旧名称」の順に流し込む（重なりが構造上起きない）。 */
.global-header::after {
  content: "相続・登記のご相談は";
  grid-area: banner;
  z-index: 1;
  justify-self: end;
  align-self: start;
  padding: 14px 20px 0 0;
  font-family: var(--tj-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .12em;
  color: #19202f;
  text-shadow: 0 0 8px rgba(255,255,255,.75), 0 0 2px rgba(255,255,255,.9);
  pointer-events: none;
}
.global-header .header-logo,
.global-header.is-scrolled .header-logo {
  grid-area: banner;
  z-index: 1;
  justify-self: end;
  align-self: start;
  margin-top: calc(14px + 16px * 1.4 + 4px);   /* 1行目（::after）の高さぶん下げる */
  padding: 0 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  font-family: var(--tj-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .04em;
  color: #19202f;
  text-shadow: 0 0 8px rgba(255,255,255,.75), 0 0 2px rgba(255,255,255,.9);
  white-space: nowrap;
  text-decoration: none;
  transition: none;
}
.global-header .header-logo::before { content: "へ"; order: 1; }
.global-header .header-logo::after {
  content: "（旧名称　司法書士松崎事務所）";
  order: 2;
  flex-basis: 100%;
  margin-top: 2px;
  text-align: right;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .06em;
}
.global-header .header-logo img { display: none; }

/* ナビ帯（旧サイト：#f3f3f3→#bababa の縦グラデ・高さ51px・縦罫線・現在ページは #7e7e7e） */
.global-header .desktop-nav {
  grid-area: nav;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 51px;
  margin: 0 0 8px;
  background: linear-gradient(180deg, #f3f3f3 0%, #e4e4e4 55%, #d9d9d9 90%, #bababa 100%);
  border: 1px solid #c4c4c4;
  border-radius: 3px;
  overflow: hidden;
}
.global-header .desktop-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  font-family: var(--tj-serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #333;
  border-right: 1px solid #c9c9c9;
  white-space: nowrap;
  transition: background .15s;
}
.global-header .desktop-nav a::after { display: none; }
.global-header .desktop-nav a:hover { background: #ededed; color: #333; }
.global-header .desktop-nav a.active { background: #7e7e7e; color: #fff; }
/* HOME の家アイコン（旧サイトは赤い家の画像） */
.global-header .desktop-nav a:first-child::before {
  content: "\f015";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 14px;
  color: #b3343d;
  margin-right: 6px;
}
.global-header .desktop-nav a.active:first-child::before { color: #ffd6d6; }

/* スマホ：上段（H1＋ハンバーガー）→ バナー。ナビは既存のオーバーレイを使う */
.global-header .menu-trigger { grid-area: trigger; }
@media (max-width: 992px) {
  .global-header,
  .global-header.is-scrolled {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "eyebrow trigger"
      "banner  banner";
    min-height: 0;
    padding: 6px 0 0;
  }
  .global-header .header-page-eyebrow { padding: 6px 0 6px 12px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .global-header .menu-trigger { display: inline-flex; margin: 0 10px 6px 0; align-self: center; }
  .global-header .desktop-nav, .global-header .header-btns { display: none; }
  .global-header::before { aspect-ratio: auto; height: 150px; background-position: 62% center; }
  .global-header::after { padding: 10px 12px 0 0; font-size: 12px; }
  .global-header .header-logo, .global-header.is-scrolled .header-logo { font-size: 22px; margin-top: calc(10px + 12px * 1.4 + 2px); padding: 0 12px 0 0; }
  .global-header .header-logo::after { font-size: 11px; margin-top: 1px; }
}
.mobile-nav-overlay a { font-family: var(--tj-serif); font-size: 18px; }
/* オーバーレイ右上の閉じるボタン。正本は文字色 #333 のままで暗幕の上では見えない */
.mobile-nav-overlay .menu-trigger { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }

/* 断片（custom_html）の出現アニメーションは使わない。旧サイトに演出は無く、
   画面外のセクションが薄いまま残る（IntersectionObserver の取りこぼし）のも防ぐ。 */
.custom-html-wrapper.fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ---------------------------------------------------------------------
   本文の共通部品（custom_html 断片で使う）
   --------------------------------------------------------------------- */
.tj-wrap {
  max-width: var(--tj-w);
  margin: 0 auto;
  padding: 6px 8px 8px;
  background: #fff;
}
.tj-wrap * { box-sizing: border-box; }

/* パンくず（旧：白い枠の中に 9.6px #999） */
.tj-breadcrumb {
  margin: 0 0 8px;
  padding: 4px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
  font-size: 11px;
  color: #999;
}
.tj-breadcrumb a { color: var(--tj-link); border-bottom: 1px dotted #0099cc; }
.tj-breadcrumb a:hover { color: var(--tj-blue); }

/* ページタイトル帯（旧：#0066ff の地に白70%の膜、下に青の帯） */
.tj-page-title {
  margin: 0 0 14px;
  padding: 0 0 6px;                 /* 下の 6px が青い帯として見える */
  background: var(--tj-blue);
  border-radius: 4px;
}
.tj-page-title h2 {
  margin: 0;
  padding: 7px 12px;
  background: var(--tj-blue-soft);
  border: 1px solid #d6e5ff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  font-family: var(--tj-serif);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .04em;
  color: #333;
}

/* 白い囲み枠（旧：frame-1／frame-2 のブロック） */
.tj-box {
  margin: 0 0 12px;
  padding: 14px 18px 16px;
  background: #fff;
  border: 1px solid var(--tj-line);
  border-radius: 6px;
}
.tj-box > :last-child { margin-bottom: 0; }

/* 見出し */
.tj-h2 {
  margin: 0 0 12px;
  padding: 2px 2px 4px;
  border-bottom: 1px solid #999;
  font-family: var(--tj-serif);
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #444;
}
.tj-h2 + * { margin-top: 0; }
.tj-h3 {
  margin: 0 0 10px;
  padding: 0 0 0 10px;
  border-left: 4px solid var(--tj-blue);
  font-family: var(--tj-serif);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #333;
}
.tj-h4 {
  position: relative;
  margin: 14px 0 6px;
  padding: 2px 0 2px 18px;
  font-family: var(--tj-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: #333;
}
/* 旧 h4.gif（10×9 の四角。外枠 #525252・内側 白） */
.tj-h4::before {
  content: "";
  position: absolute;
  left: 0;
  /* 行ボックスの中心（padding-top 2px ＋ 行高 1.4em の半分）に、枠込み 14px の四角の中心を合わせる */
  top: calc(2px + 0.7em - 7px);
  width: 10px; height: 9px;
  border: 2.5px solid #525252;
  background: #fff;
}
.tj-h4:first-child { margin-top: 0; }
.tj-h5 { margin: 12px 0 4px; font-size: 15px; font-weight: 600; color: #333; }

/* 本文・リスト・注記 */
.tj-wrap p { margin: 0 0 10px; font-size: 15px; line-height: 1.7; }
.tj-lead { margin: 0 0 10px; }
.tj-list { margin: 0 0 12px 20px; padding: 0; list-style: none; }
.tj-list li { position: relative; padding: 2px 0 2px 20px; font-size: 15px; line-height: 1.5; }
/* 旧 list_1.png（12px のグレーの丸） */
.tj-list li::before {
  content: "";
  position: absolute;
  left: 0;
  /* 行ボックスの中心（padding-top 2px ＋ 行高 1.5em の半分）に、枠込み 16px の丸の中心を合わせる */
  top: calc(2px + 0.75em - 8px);
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 3px solid #cacaca;
  background: #fff;
}
.tj-list-num { margin: 0 0 12px 4px; padding: 0; list-style: none; }
.tj-list-num li { padding: 2px 0; font-size: 15px; line-height: 1.55; }
.tj-plain { margin: 0 0 12px 4px; padding: 0; list-style: none; }
.tj-plain li { padding: 1px 0; font-size: 15px; line-height: 1.55; }
.tj-note { margin: 6px 0 12px; padding-left: 1em; text-indent: -1em; font-size: 14px; line-height: 1.6; color: #333; }
.tj-fee { margin: 0 0 8px 4px; font-size: 15px; line-height: 1.7; }

/* 囲み（旧 kakomi：#e6e6e6 の地・1px 枠） */
.tj-kakomi {
  margin: 6px 10px 14px;
  padding: 8px 12px;
  background: var(--tj-kakomi);
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.65;
}
.tj-kakomi p { margin: 0; font-size: 14px; }

/* 区切り線（旧 .hr：#ccc の細線） */
.tj-hr { height: 0; margin: 10px 0; border: 0; border-top: 1px solid #ccc; }

/* ---------------------------------------------------------------------
   TOP
   --------------------------------------------------------------------- */
.tj-top-head { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; }
.tj-top-logo { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.tj-top-logo p { margin: 0; line-height: 1.35; }
.tj-top-tagline { font-size: 17px; letter-spacing: .04em; color: #222; }
.tj-top-name { font-size: 24px; font-weight: 600; letter-spacing: .06em; color: #222; }
.tj-top-old { font-size: 12px; color: #555; }
.tj-top-pencils { width: 200px; height: auto; display: block; }
.tj-top-tel { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 1.6; white-space: nowrap; }
.tj-top-tel img { width: 56px; height: 56px; flex: 0 0 auto; }
.tj-top-tel strong { font-size: 19px; letter-spacing: .04em; }
.tj-top-tel a { color: #222; text-decoration: none; }

.tj-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 12px; padding: 4px 8px 10px; }
.tj-banners a { display: block; line-height: 0; }
.tj-banners img { width: 100%; height: auto; display: block; border: 1px solid #ddd; transition: opacity .2s; }
.tj-banners a:hover img { opacity: .85; }

.tj-greet { display: grid; grid-template-columns: 200px 1fr; gap: 12px 24px; align-items: start; }
.tj-greet + .tj-greet { margin-top: 16px; padding-top: 16px; border-top: 1px solid #ccc; }
.tj-greet-photo { width: 100%; height: auto; display: block; border: 1px solid #ddd; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 20%; }
.tj-greet-text p { font-size: 15px; line-height: 1.75; text-indent: 0; }   /* 1行目の字下げは無し（折り返し行と左端を揃える・2026-09-25 ユーザー要望） */
.tj-greet-name { margin: 0 !important; text-align: right; text-indent: 0 !important; font-size: 14px !important; color: #444; }
.tj-greet-name strong { font-size: 16px; margin-left: .5em; }

.tj-features-title { margin: 0 0 12px; text-align: center; font-size: 20px; font-weight: 600; letter-spacing: .06em; }

.tj-access { display: grid; grid-template-columns: 1fr 340px; gap: 12px 24px; align-items: start; }
.tj-map { width: 100%; height: 340px; border: 1px solid #ddd; }
.tj-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.tj-map-link { margin: 6px 0 0 !important; font-size: 12px !important; text-align: right; }
.tj-map-link a { color: var(--tj-link); }

/* ---------------------------------------------------------------------
   事務所案内
   --------------------------------------------------------------------- */
.tj-office-row { display: grid; grid-template-columns: 1fr 240px; gap: 8px 24px; align-items: start; padding: 4px 0 14px; }
.tj-office-row + .tj-office-row { border-top: 1px solid #e0e0e0; padding-top: 14px; }
.tj-office-row img { width: 100%; height: auto; display: block; border: 1px solid #ddd; }
/* 所長・副所長の写真は正方形（2026-09-25 ユーザー要望。外観・内観の横長写真には当てない） */
.tj-office-row img[src*="_sq"], .tj-office-row img[src*="matsuzaki"], .tj-office-row img[src*="jodai"] { aspect-ratio: 1 / 1; object-fit: cover; object-position: center 20%; }
.tj-office-row .tj-plain li { display: grid; grid-template-columns: 10.5em 1fr; gap: 0 .5em; }
.tj-office-row .tj-plain.tj-narrow li { grid-template-columns: 4em 1fr; }
.tj-office-row .tj-plain.tj-wide li { grid-template-columns: 8em 1fr; }

/* ---------------------------------------------------------------------
   フッター：正本の濃色フッターは隠し、断片（90_footer.html）で旧デザインを出す。
   フローティングの電話ボタンはスマホでだけ残す。
   --------------------------------------------------------------------- */
.global-footer, .footer-copy-text, .footer-copy { display: none !important; }
.tj-footer { max-width: var(--tj-w); margin: 0 auto; padding: 8px 8px 14px; background: #fff; }
.tj-pagetop { text-align: right; font-size: 10px; letter-spacing: .16em; color: #666; margin: 0 0 6px; }
.tj-pagetop a { color: #666; }
.tj-footer-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 10px 0; padding: 0 6px; }
.tj-footer-banners img { width: 100%; height: auto; display: block; }
.tj-footer-blue {
  aspect-ratio: 383 / 115;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 6px 10px;
  background: linear-gradient(180deg, #355b9d 0%, #5174af 30%, #436aac 50%, #5379b3 75%, #557cb9 100%);
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0,0,0,.35);
  line-height: 1.35;
}
.tj-footer-blue .l1 { font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.tj-footer-blue .l2 { font-size: 16px; font-weight: 600; letter-spacing: .08em; margin-bottom: 4px; }
.tj-footer-blue .l3 { font-size: 12px; }
.tj-copy { margin: 8px 0 0; text-align: center; font-size: 10.5px; letter-spacing: .04em; color: #555; }

@media (min-width: 769px) { .fc-floating-actions { display: none !important; } }
@media (max-width: 768px) {
  .fc-floating-actions { background: rgba(255,255,255,.96); border-top: 1px solid #ccc; }
  .fc-floating-action { font-family: var(--tj-serif); background: #f0f0f0; color: #333; border: 1px solid #c9c9c9; }
  .fc-floating-action:hover { background: #e2e2e2; color: #333; }
}

/* gmap ブロックを使う場合の寄せ（断片側で iframe を置くので通常は未使用） */
.gmap-section { padding: 0 8px 12px; background: transparent; }
.gmap-container { max-width: calc(var(--tj-w) - 16px); }
.gmap-frame-wrap { border-radius: 0; aspect-ratio: 16 / 7; min-height: 300px; }
.gmap-frame-wrap iframe { filter: none; }

/* ---------------------------------------------------------------------
   スマホ（旧サイトは非対応。列を1本にする）
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
  body { font-size: 14.5px; }
  .tj-wrap { padding: 6px 8px 8px; }
  .tj-box { padding: 12px 12px 14px; }
  .tj-top-head { grid-template-columns: 1fr; gap: 12px; }
  .tj-top-logo { grid-template-columns: 1fr; }
  .tj-top-pencils { width: 160px; }
  .tj-top-tel { white-space: normal; }
  .tj-banners { grid-template-columns: 1fr; gap: 10px; }
  .tj-greet { grid-template-columns: 1fr; }
  .tj-greet-photo { width: 62%; max-width: 220px; margin: 0 auto; }
  .tj-access { grid-template-columns: 1fr; }
  .tj-map { height: 280px; }
  .tj-office-row { grid-template-columns: 1fr; }
  .tj-office-row img { max-width: 360px; }
  .tj-office-row .tj-plain li { grid-template-columns: 1fr; }
  .tj-office-row .tj-plain.tj-narrow li, .tj-office-row .tj-plain.tj-wide li { grid-template-columns: 1fr; }
  .tj-footer-banners { grid-template-columns: 1fr; }
  .tj-h2 { font-size: 18px; }
  .tj-h4 { font-size: 16px; }
  .tj-kakomi { margin: 6px 0 14px; }
}
