/*
Theme Name: 小渕徹雄税理士事務所
Theme URI: https://obuchi-tax.jp/
Author: AIシステム
Description: 小渕徹雄税理士事務所のコーポレートサイト。金魚モチーフの1ページ構成。静的デザイン(obuchi-tax)からWordPressテーマへ変換。
Version: 1.1.5
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: obuchi-tax
*/

/* ==========================================================
   小渕徹雄税理士事務所 - styles
   ========================================================== */

:root {
  --bg:           #FAF7F2;
  --bg-alt:       #F2EEE4;
  --primary:      #C9A961;
  --primary-dark: #A88A45;
  --accent:       #E8763A;
  --accent-soft:  #F0B58E;
  --water-1:      #EAF3F7;
  --water-2:      #C9DDE6;
  --water-3:      #A8C8DC;
  --text:         #2B2B2B;
  --muted:        #6B6B6B;
  --border:       #E5DFD2;
  --white:        #FFFFFF;
  --shadow-sm:    0 2px 8px rgba(60, 50, 30, 0.06);
  --shadow-md:    0 6px 24px rgba(60, 50, 30, 0.08);
  --radius:       8px;
  --radius-lg:    16px;
  --max-w:        1120px;
  --serif:        'Noto Serif JP', 'Yu Mincho', 'YuMincho', serif;
  --sans:         'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* ----------------------------------------------------------
   日本語の孤立改行（オーファン）対策
   本文の折り返しで、行末に1文字だけ取り残される改行をサイト全体で回避する。
   text-wrap: pretty は最終行が極端に短くなる折り返しを自動で避ける（寸法・レイアウトは不変）。
   ---------------------------------------------------------- */
p, li, dd, h1, h2, h3, h4, h5, h6 {
  text-wrap: pretty;
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  color: var(--text);
  letter-spacing: .06em;
}
.brand-en {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .18em;
  margin-top: 4px;
}

@media (max-width: 560px) {
  .brand-mark { font-size: 22px; }
  .brand-en { font-size: 10px; }
}
.site-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}
.site-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 8px 0;
}
.site-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--primary);
  transform: scaleX(0); transform-origin: center;
  transition: transform .25s;
}
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; padding: 0;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); transition: transform .25s, opacity .25s;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .site-nav.open { max-height: 480px; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .site-nav li { border-top: 1px solid var(--border); }
  .site-nav li:first-child { border-top: none; }
  .site-nav a {
    display: block; padding: 14px 24px;
  }
  .site-nav a::after { display: none; }
}

/* ----------------------------------------------------------
   Hero (水景＋金魚アニメ)
   ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-water {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(168,200,220,.4), transparent 70%),
    linear-gradient(180deg, var(--water-1) 0%, var(--water-2) 60%, #B8D2DD 100%);
  z-index: -1;
}

/* 水面の光の波 */
.hero-water::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 30%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 60px,
      rgba(255,255,255,.18) 60px 65px,
      transparent 65px 130px
    );
  filter: blur(1px);
  opacity: .6;
  animation: water-shine 8s ease-in-out infinite alternate;
}
@keyframes water-shine {
  0%   { transform: translateX(0); opacity: .5; }
  100% { transform: translateX(20px); opacity: .8; }
}

/* 水草 */
.weeds {
  position: absolute; bottom: 0;
  width: 240px; height: 50%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 100%, rgba(78, 130, 92, .55) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(108, 158, 110, .5) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(88, 138, 100, .45) 0%, transparent 50%);
  filter: blur(2px);
  animation: weeds-sway 6s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
.weeds-left  { left: -40px; }
.weeds-right { right: -40px; animation-duration: 7s; }
@keyframes weeds-sway {
  0%   { transform: skewX(-2deg); }
  100% { transform: skewX(2deg); }
}

/* 泡 */
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubbles span {
  position: absolute;
  bottom: -40px;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.3));
  box-shadow: 0 0 4px rgba(255,255,255,.6);
  animation: bubble-rise linear infinite;
  opacity: .8;
}
.bubbles span:nth-child(1)  { left:  8%; width: 10px; height: 10px; animation-duration:  9s; animation-delay: -2s; }
.bubbles span:nth-child(2)  { left: 18%; width: 14px; height: 14px; animation-duration: 11s; animation-delay: -4s; }
.bubbles span:nth-child(3)  { left: 28%; width:  8px; height:  8px; animation-duration:  7s; animation-delay: -1s; }
.bubbles span:nth-child(4)  { left: 38%; width: 12px; height: 12px; animation-duration: 10s; animation-delay: -6s; }
.bubbles span:nth-child(5)  { left: 50%; width:  6px; height:  6px; animation-duration:  8s; animation-delay: 0s;  }
.bubbles span:nth-child(6)  { left: 60%; width: 16px; height: 16px; animation-duration: 12s; animation-delay: -3s; }
.bubbles span:nth-child(7)  { left: 70%; width:  9px; height:  9px; animation-duration:  9s; animation-delay: -5s; }
.bubbles span:nth-child(8)  { left: 80%; width: 11px; height: 11px; animation-duration: 10s; animation-delay: -7s; }
.bubbles span:nth-child(9)  { left: 88%; width:  7px; height:  7px; animation-duration:  8s; animation-delay: -2s; }
.bubbles span:nth-child(10) { left: 95%; width: 13px; height: 13px; animation-duration: 11s; animation-delay: -9s; }
@keyframes bubble-rise {
  0%   { transform: translateY(0)        translateX(0); opacity: 0; }
  10%  { opacity: .8; }
  50%  { transform: translateY(-40vh)    translateX(8px); }
  90%  { opacity: .6; }
  100% { transform: translateY(-90vh)    translateX(-6px); opacity: 0; }
}

/* ----- 金魚たち ----- */
.fish {
  position: absolute;
  top: 0;
  pointer-events: none;
  will-change: transform, left;
}
.fish img {
  display: block;
  filter: drop-shadow(0 6px 12px rgba(60, 40, 20, 0.15));
}

/* メイン金魚 */
.fish-main {
  top: 38%;
  z-index: 2;
  animation: swim-ltr 24s linear infinite;
}
.fish-main img {
  width: 280px;
  animation: bob-ltr 3.2s ease-in-out infinite;
}

/* 背景金魚（小さめ・半透明） */
.fish-bg { z-index: 1; }
.fish-bg img { opacity: .55; }

.fish-bg-1 { top: 18%; animation: swim-ltr 36s linear infinite; animation-delay: -8s; }
.fish-bg-1 img { width: 110px; animation: bob-ltr 4.5s ease-in-out infinite; }

.fish-bg-2 { top: 62%; animation: swim-rtl 30s linear infinite; animation-delay: -12s; }
.fish-bg-2 img { width: 140px; animation: bob-rtl 3.8s ease-in-out infinite; }

.fish-bg-3 { top: 30%; animation: swim-rtl 42s linear infinite; animation-delay: -22s; }
.fish-bg-3 img { width: 90px; animation: bob-rtl 5s ease-in-out infinite; }

.fish-bg-4 { top: 78%; animation: swim-ltr 32s linear infinite; animation-delay: -3s; }
.fish-bg-4 img { width: 100px; animation: bob-ltr 4s ease-in-out infinite; }

@keyframes swim-ltr {
  0%   { left: -20%; }
  100% { left: 110%; }
}
@keyframes swim-rtl {
  0%   { left: 110%; }
  100% { left: -20%; }
}

/* 元画像が右向き → ltr (左→右) はそのまま、rtl (右→左) は scaleX(-1) で反転 */
@keyframes bob-ltr {
  0%   { transform: translateY(0)    rotate(-2deg); }
  50%  { transform: translateY(-14px) rotate(2deg); }
  100% { transform: translateY(0)    rotate(-2deg); }
}
@keyframes bob-rtl {
  0%   { transform: scaleX(-1) translateY(0)    rotate(-2deg); }
  50%  { transform: scaleX(-1) translateY(-14px) rotate(2deg); }
  100% { transform: scaleX(-1) translateY(0)    rotate(-2deg); }
}

/* Hero copy */
.hero-copy {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 24px 24px;
  max-width: 720px;
  background: rgba(250, 247, 242, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  margin: 16px;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: .25em;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: .04em;
}
.hero-lead {
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-cta {
  display: inline-block;
  padding: 14px 36px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  letter-spacing: .08em;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: transform .2s, background .2s;
}
.hero-cta:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .hero { min-height: 70vh; }
  .fish-main img { width: 180px; }
  .fish-bg-1 img { width: 70px; }
  .fish-bg-2 img { width: 90px; }
  .fish-bg-3 img { width: 60px; }
  .fish-bg-4 img { width: 70px; }
}

/* ----------------------------------------------------------
   Sections shared
   ---------------------------------------------------------- */
.section { padding: 96px 0; }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section-head { text-align: center; margin-bottom: 56px; }
.section-en {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: var(--primary);
  margin: 16px auto 0;
}
.section-sub {
  color: var(--muted);
  font-size: 15px;
}

/* ----------------------------------------------------------
   Profile
   ---------------------------------------------------------- */
.section-profile { background: var(--bg); }
.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
}
.profile-photo { position: sticky; top: 96px; }
.profile-photo-frame {
  width: 360px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.profile-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.profile-text p { margin-bottom: 18px; font-size: 15.5px; }
.profile-text p:last-child { margin-bottom: 0; }
.profile-text strong {
  background: linear-gradient(transparent 65%, rgba(232, 118, 58, .25) 65%);
  font-weight: 700;
}

.mf-banner {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
}
.mf-banner-title {
  font-weight: 700; color: var(--primary-dark);
  margin-bottom: 4px;
}
.mf-banner-text p:last-child { font-size: 13px; color: var(--muted); }
.mf-banner-links { display: flex; gap: 16px; flex-wrap: wrap; }
.mf-banner-links a {
  font-size: 13px;
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .profile-photo { position: static; }
  .profile-photo-frame { width: min(320px, 80%); margin: 0 auto; }
  .profile-text { text-align: left; }
}

/* ----------------------------------------------------------
   Services
   ---------------------------------------------------------- */
.section-services { background: var(--bg-alt); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.service-card {
  position: relative;
  background: var(--white);
  padding: 36px 28px 32px;
  border-radius: var(--radius);
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.service-no {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.service-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: .04em;
}
.service-card p { font-size: 14.5px; color: var(--muted); }

@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------
   Pricing
   ---------------------------------------------------------- */
.section-pricing { background: var(--bg); }
.pricing-block { margin-bottom: 48px; }
.pricing-block:last-child { margin-bottom: 0; }
.pricing-cat {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
  letter-spacing: .06em;
}
.pricing-tax-note {
  font-size: 13px;
  color: var(--muted);
  margin: -8px 0 16px;
  letter-spacing: .04em;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 14.5px;
  min-width: 560px;
}
.pricing-table th,
.pricing-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.pricing-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
  letter-spacing: .04em;
}
.pricing-table tbody tr:hover { background: rgba(201, 169, 97, .06); }
.pricing-table td:first-child { font-weight: 700; text-align: left; }
.pricing-note {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  font-size: 14.5px;
  color: var(--text);
  text-align: center;
  line-height: 1.8;
}

.pricing-philosophy {
  margin-bottom: 48px;
  padding: 28px 32px;
  background: var(--white);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.pricing-philosophy .pricing-cat {
  border-left: none;
  padding-left: 0;
  margin-bottom: 14px;
  /* タイトルと分かるよう、文字幅ぶんのゴールド下線を付与（横幅は増えないので1行固定に影響なし） */
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-dark);
}
.pricing-philosophy p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.pricing-list {
  list-style: none;
  display: grid;
  gap: 16px;
}
.pricing-item {
  background: var(--white);
  padding: 22px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  transition: transform .25s, box-shadow .25s;
}
.pricing-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pricing-item-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--primary-dark);
  flex: 0 0 auto;
  min-width: 220px;
}
.pricing-item-price {
  font-size: 15.5px;
  font-weight: 500;
  text-align: right;
  flex: 1 1 auto;
}
.pricing-item-note {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.pricing-sublist {
  list-style: none;
  flex: 1 1 100%;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.pricing-sublist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 14.5px;
}
.pricing-sub-label { color: var(--muted); }
.pricing-sub-price { font-weight: 700; color: var(--text); }

@media (max-width: 640px) {
  .pricing-item { flex-direction: column; align-items: flex-start; }
  .pricing-item-price { text-align: left; }
  .pricing-item-title { min-width: 0; }
}

/* ----------------------------------------------------------
   Koi story
   ---------------------------------------------------------- */
.section-koi {
  background:
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}
.koi-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: center;
}
.koi-text .section-en { text-align: left; }
.koi-text .section-title { display: inline-block; }
.koi-text .section-title::after { margin-left: 0; margin-right: auto; background: var(--primary-dark); width: 56px; height: 3px; }
.koi-text p { margin-bottom: 18px; }

.koi-circle {
  width: 320px; height: 320px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--water-1), var(--water-3));
  display: grid; place-items: center;
  box-shadow: var(--shadow-md), inset 0 0 60px rgba(255,255,255,.5);
  overflow: hidden;
  position: relative;
  margin-left: auto;
}
.koi-circle::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(108,158,110,.4), transparent 60%);
}
.koi-circle img {
  width: 80%;
  position: relative;
  animation: koi-float 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(60, 40, 20, 0.2));
}
@keyframes koi-float {
  0%   { transform: translateY(0)    rotate(-3deg); }
  50%  { transform: translateY(-12px) rotate(3deg); }
  100% { transform: translateY(0)    rotate(-3deg); }
}

@media (max-width: 820px) {
  .koi-inner { grid-template-columns: 1fr; }
  .koi-circle { margin: 0 auto; }
  .koi-text .section-title { display: block; text-align: center; }
  .koi-text .section-en { text-align: center; }
  .koi-text .section-title::after { margin: 16px auto 0; }
}

/* ----------------------------------------------------------
   Contact form
   ---------------------------------------------------------- */
.section-contact { background: var(--bg-alt); }
.contact-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-row { margin-bottom: 24px; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.req {
  display: inline-block;
  font-size: 11px;
  background: var(--accent);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: .04em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, .2);
}
.contact-form textarea { resize: vertical; }
.form-actions {
  text-align: center;
  margin-top: 32px;
}
.submit-btn {
  display: inline-block;
  padding: 14px 56px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .15em;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background .2s, transform .2s;
}
.submit-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.submit-btn:active { transform: translateY(0); }
.form-note { margin-top: 14px; font-size: 12px; color: var(--muted); }
.form-message {
  margin-top: 16px; text-align: center; font-size: 14px; min-height: 1.5em;
}
.form-message.success { color: #4a7a3e; font-weight: 700; }
.form-message.error   { color: var(--accent); font-weight: 700; }

@media (max-width: 600px) {
  .contact-form { padding: 28px 20px; }
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   Access
   ---------------------------------------------------------- */
.section-access { background: var(--bg); }
.access-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 36px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
}
.access-card dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px 24px;
  text-align: left;
  margin-bottom: 20px;
}
.access-card dt {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 14px;
  border-right: 1px solid var(--border);
  padding-right: 16px;
}
.access-card dd { font-size: 15px; }
.access-note {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

/* ----------------------------------------------------------
   Privacy
   ---------------------------------------------------------- */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.privacy-modal[hidden] { display: none; }
.privacy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 28, .55);
  backdrop-filter: blur(2px);
  animation: privacyFadeIn .2s ease-out;
}
.privacy-modal-panel {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--white);
  padding: 48px 48px 40px;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: privacySlideUp .25s ease-out;
}
.privacy-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.privacy-modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}
body.privacy-open { overflow: hidden; }

@keyframes privacyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes privacySlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.privacy-body { margin: 0; }
.privacy-body article { margin-bottom: 28px; }
.privacy-body article:last-child { margin-bottom: 0; }
.privacy-body h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  letter-spacing: .04em;
}
.privacy-body p { font-size: 14px; color: var(--text); margin-bottom: 8px; line-height: 1.9; }
.privacy-body ul { padding-left: 1.4em; margin: 8px 0 12px; }
.privacy-body li { font-size: 14px; line-height: 1.9; margin-bottom: 4px; }
.privacy-body ul ul { margin: 4px 0 8px; padding-left: 1.4em; }

@media (max-width: 600px) {
  .privacy-modal-panel { padding: 40px 24px 28px; }
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.site-footer {
  background: #2B2722;
  color: #DDD4C5;
  padding: 48px 24px;
  text-align: center;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 8px;
  color: var(--white);
}
.footer-addr {
  font-size: 13px;
  margin-bottom: 24px;
  color: #B8AE9C;
}
.footer-copy {
  font-size: 11px;
  letter-spacing: .15em;
  color: #807767;
}

/* 近くの税理士事務所Navi バナー（画像のみ） 2026-09-08 */
.footer-media-banner {
  display: block;
  width: min(360px, 100%);
  margin: 0 auto 28px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: opacity 0.2s ease;
}
.footer-media-banner img { display: block; width: 100%; height: auto; }
.footer-media-banner:hover { opacity: 0.85; }

/* ----------------------------------------------------------
   Back-to-top
   ---------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   Reduced motion (アクセシビリティ)
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fish-main { left: 35%; }
  .fish-bg-1 { left: 10%; }
  .fish-bg-2 { left: 70%; }
  .fish-bg-3 { left: 50%; }
  .fish-bg-4 { left: 25%; }
}

/* ----------------------------------------------------------
   Strength (創業支援先の黒字化率) — PDF修正で追加
   ---------------------------------------------------------- */
.section-strength { background: var(--bg-alt); }
.section-strength .section-inner { text-align: center; }
.strength-head { margin-bottom: 36px; }
.strength-lead {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.strength-figure {
  font-family: var(--serif);
  color: var(--primary-dark);
  line-height: 1;
}
.strength-num { font-size: clamp(64px, 12vw, 120px); font-weight: 700; letter-spacing: .02em; }
.strength-unit { font-size: clamp(20px, 3vw, 32px); font-weight: 700; margin-left: 6px; }
.strength-figure::after {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: var(--primary);
  margin: 20px auto 0;
}
.strength-body { max-width: 720px; margin: 0 auto; }
.strength-body p { font-size: 15.5px; line-height: 1.9; color: var(--text); margin-bottom: 14px; text-wrap: pretty; }
.strength-body p:last-child { margin-bottom: 0; }
/* 文末などを分割禁止にして「1文字だけの孤立改行」を防ぐユーティリティ */
.nobr { white-space: nowrap; }

/* ----------------------------------------------------------
   白い金魚（らんちゅう）— 背景で赤金魚と半々に泳ぐ（PDF修正で追加）
   ---------------------------------------------------------- */
.fish-bg-5 { top: 46%; animation: swim-rtl 34s linear infinite; animation-delay: -6s; }
.fish-bg-5 img { width: 120px; animation: bob-rtl 4.3s ease-in-out infinite; }
/* 白い金魚は淡色のため、薄い背景でも視認できるよう不透明度を上げる */
.fish-bg.fish-white img { opacity: .85; }
@media (max-width: 640px) { .fish-bg-5 img { width: 80px; } }
@media (prefers-reduced-motion: reduce) { .fish-bg-5 { left: 85%; } }

/* ----------------------------------------------------------
   WordPress 管理バー対応（スクロール時のヘッダー見切れ対策）
   ログイン中は上部固定の管理バー(32px/モバイル46px)が固定ヘッダーに
   重なるため、その分だけ sticky ヘッダーの top をずらす。
   ---------------------------------------------------------- */
.admin-bar .site-header { top: 32px; }
.admin-bar { scroll-padding-top: 104px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ----------------------------------------------------------
   Access map (Googleマップ埋め込み)
   ---------------------------------------------------------- */
.access-map {
  max-width: 600px;
  margin: 24px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  line-height: 0;
}
.access-map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
}
.access-maplink { text-align: center; margin-top: 14px; font-size: 13px; }

/* ----------------------------------------------------------
   らんちゅう実写（円形フレームいっぱいに表示）
   ---------------------------------------------------------- */
.koi-circle.koi-photo { background: none; }
.koi-circle.koi-photo::before { display: none; }
.koi-circle.koi-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: none;
  filter: none;
}

/* ----------------------------------------------------------
   モバイル最適化（狭幅での崩れ・改行の見直し）
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  /* ヒーロー: コピー枠の余白を詰めて本文幅を確保＋枠の縦幅を縮小し背景の金魚を見せる */
  .hero-copy { padding: 16px 14px; margin: 8px; }
  /* 題目を縮小（28px→20px）して背景の金魚が泳ぐ面積を広げる */
  .hero-title { font-size: 20px; line-height: 1.35; margin-bottom: 12px; }
  .hero-eyebrow { margin-bottom: 8px; }
  .hero-lead { margin-bottom: 16px; }
  /* 料金の内訳（顧問料の規模別）は縦積みにして折り返しの崩れを防ぐ */
  .pricing-item { padding: 20px 18px; }
  .pricing-item-title { min-width: 0; }
  .pricing-sublist li { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (max-width: 380px) {
  /* ヘッダーの屋号が2行に折り返さないよう縮小 */
  .brand-mark { font-size: 18px; white-space: nowrap; }
  .brand-en   { font-size: 9px; letter-spacing: .12em; }
  .header-inner { gap: 12px; padding: 12px 16px; }
}

/* ----------------------------------------------------------
   料金内訳のモバイル横はみ出し修正
   flex-direction:column + flex-wrap:wrap が「縦に入りきらない要素を
   2列目へ回り込ませ」右へはみ出していた。nowrapで1列固定＋内訳を全幅に。
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .pricing-item { flex-wrap: nowrap; align-items: stretch; }
  .pricing-item-title { min-width: 0; }
  .pricing-sublist { width: 100%; flex-basis: auto; }
}
/* 金魚の円（固定320px）が狭幅で右にはみ出すのを防ぐ（レスポンシブ化） */
@media (max-width: 400px) {
  .koi-circle { width: min(320px, calc(100vw - 48px)); height: auto; aspect-ratio: 1 / 1; }
}

/* ----------------------------------------------------------
   特定見出しを必ず1行に固定
   「料金に対する考え方」 .pricing-philosophy .pricing-cat
   「らんちゅうと、経営と。」.koi-text .section-title
   ---------------------------------------------------------- */
.pricing-philosophy .pricing-cat,
.koi-text .section-title {
  white-space: nowrap;
}
/* 狭い画面でも1行を保ったまま、はみ出さないようフォントを自動縮小（min で上限を固定） */
@media (max-width: 480px) {
  .koi-text .section-title { font-size: min(24px, 5.6vw); }
  .pricing-philosophy .pricing-cat { font-size: min(22px, 5.2vw); }
}

/* ----------------------------------------------------------
   1.1.0 (2026-10-14)
   ① 相続専用ページ（page-souzoku.php）＋トップの誘導バナー
   ② 代表あいさつの SNS リンク
   ③ ファビコンは header.php の <link> で対応（CSSなし）
   ---------------------------------------------------------- */

/* 改行制御: PC幅だけ <br class="pc-only"> を効かせる */
.pc-only { display: inline; }
@media (max-width: 640px) { .pc-only { display: none; } }

/* --- トップ: 業務案内 04 カードのリンク --- */
.service-more { margin-top: 12px; font-size: 14px; }
.service-more a { color: var(--primary-dark); font-weight: 700; }
.service-more a:hover { color: var(--accent); }

/* --- トップ: 相続への誘導バナー --- */
/* バナーは業務案内から少し離し、料金案内に寄せる（2026-10-16 調整） */
.section-souzoku-cta { padding: 48px 0 24px; background: var(--bg); }
.section-pricing { padding-top: 48px; }
.souzoku-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  padding: 32px 36px;
  background: linear-gradient(135deg, var(--water-1) 0%, var(--water-2) 100%);
  border: 1px solid var(--water-3);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform .25s, box-shadow .25s;
}
.souzoku-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.souzoku-cta-en { font-size: 12px; letter-spacing: .3em; color: var(--primary-dark); font-weight: 700; margin-bottom: 6px; }
.souzoku-cta-title { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; letter-spacing: .06em; margin-bottom: 8px; }
.souzoku-cta-lead { font-size: 14.5px; color: var(--muted); line-height: 1.8; }
.souzoku-cta-btn {
  flex: 0 0 auto;
  display: inline-block;
  padding: 14px 28px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .2s;
}
.souzoku-cta:hover .souzoku-cta-btn { background: var(--primary-dark); }
@media (max-width: 720px) {
  .section-souzoku-cta { padding: 36px 0 16px; }
  .souzoku-cta { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
}

/* --- 代表あいさつ: SNS リンク --- */
.profile-sns { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.profile-sns-lead { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.profile-sns-links { display: flex; flex-wrap: wrap; gap: 12px; }
.profile-sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background .2s, color .2s, border-color .2s;
}
.profile-sns-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }
.profile-sns-btn svg { flex: 0 0 auto; }
@media (max-width: 720px) { .profile-sns-links { justify-content: flex-start; } }

/* --- 相続ページ: ヒーロー --- */
.souzoku-hero {
  position: relative;
  padding: 88px 0 72px;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.7), transparent 55%),
    linear-gradient(180deg, var(--water-1) 0%, var(--water-2) 100%);
  border-bottom: 1px solid var(--water-3);
  text-align: center;
}
.souzoku-hero-en { font-size: 12px; letter-spacing: .3em; color: var(--primary-dark); font-weight: 700; margin-bottom: 12px; }
.souzoku-hero-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4.2vw, 40px);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  margin-bottom: 20px;
}
.souzoku-hero-title::after {
  content: '';
  display: block;
  width: 48px; height: 2px;
  background: var(--primary);
  margin: 18px auto 0;
}
.souzoku-hero-lead { max-width: 720px; margin: 0 auto 28px; font-size: 15.5px; line-height: 1.9; color: var(--text); }
.souzoku-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; }
.souzoku-hero-sub { font-size: 14px; font-weight: 700; color: var(--primary-dark); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.souzoku-hero-sub:hover { color: var(--accent); }
@media (max-width: 640px) {
  .souzoku-hero { padding: 56px 0 48px; }
  .souzoku-hero-lead { font-size: 14.5px; }
}

/* --- 相続ページ: サポート3ステップ --- */
.section-souzoku-service { background: var(--bg); }
.souzoku-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.souzoku-step {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
  transition: transform .25s, box-shadow .25s;
}
.souzoku-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.souzoku-step-no { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 12px; }
.souzoku-step h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .04em; margin-bottom: 12px; }
.souzoku-step p { font-size: 14.5px; line-height: 1.9; color: var(--text); margin-bottom: 14px; }
.souzoku-step ul { list-style: none; display: grid; gap: 6px; }
.souzoku-step li { position: relative; padding-left: 18px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.souzoku-step li::before { content: ''; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
@media (max-width: 900px) { .souzoku-steps { grid-template-columns: 1fr; } }

.souzoku-who {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
}
.souzoku-who-title { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-bottom: 14px; }
.souzoku-who-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.souzoku-who-list li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.8; }
.souzoku-who-list li::before {
  content: '';
  position: absolute; left: 0; top: .5em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23000'/%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.7' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23000'/%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.7' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.souzoku-who-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 720px) {
  .souzoku-who { padding: 22px 20px; }
  .souzoku-who-list { grid-template-columns: 1fr; }
}

/* --- 相続ページ: MyKomon 見出し組込み --- */
.section-souzoku-info { background: var(--bg-alt); }
.souzoku-info-box {
  background: var(--white);
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
/* 組込み手順書 P12 に倣い #mkcontents の文字サイズをサイトに合わせる */
#mkcontents { font-size: 15px; line-height: 1.8; color: var(--text); }
#mkcontents table { font-size: 15px; line-height: 1.8; max-width: 100%; }
#mkcontents img { max-width: 100%; height: auto; }
#mkcontents a { color: var(--primary-dark); }
#mkcontents a:hover { color: var(--accent); }
#mkcontents:empty { display: none; }
.souzoku-info-note { margin-top: 20px; font-size: 13.5px; color: var(--muted); }
#mkcontents:empty + .souzoku-info-note { margin-top: 0; }
@media (max-width: 640px) { .souzoku-info-box { padding: 20px 16px; } }

/* --- 相続ページ: 問い合わせ導線 --- */
.section-souzoku-contact { background: var(--bg); }
.souzoku-contact-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--water-1) 0%, var(--water-2) 100%);
  border: 1px solid var(--water-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.souzoku-contact-title { font-family: var(--serif); font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: .06em; margin-bottom: 16px; }
.souzoku-contact-card > p { font-size: 15px; line-height: 1.9; margin-bottom: 24px; }
.souzoku-contact-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; margin-bottom: 20px; }
.souzoku-contact-tel { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .04em; }
.souzoku-contact-tel:hover { color: var(--accent); }
.souzoku-contact-back { font-size: 13px; }
.souzoku-contact-back a { color: var(--muted); }
@media (max-width: 640px) { .souzoku-contact-card { padding: 32px 20px; } }

/* --- 汎用固定ページ（page.php） --- */
.page-inner { max-width: 800px; }
.page-content p { margin-bottom: 18px; font-size: 15.5px; }
.page-content h2, .page-content h3 { font-family: var(--serif); margin: 32px 0 12px; }
.page-content ul, .page-content ol { padding-left: 1.4em; margin-bottom: 18px; }

/* MyKomon 本文ページ（template.html）用: ヒーローを低めに */
.souzoku-hero-compact { padding: 56px 0 44px; }
.souzoku-hero-compact .souzoku-hero-lead { margin-bottom: 0; }
.section-souzoku-info .souzoku-contact-back { margin-top: 20px; text-align: center; }
/* 「相続のご相談は、お早めに。」を1行固定（狭幅は自動縮小） */
.souzoku-contact-title { white-space: nowrap; }
@media (max-width: 480px) { .souzoku-contact-title { font-size: min(22px, 5.6vw); } }

/* ----------------------------------------------------------
   代表イラスト（2026-10-15）— 相続ページのヒーローとトップの相続バナーに配置
   ふわっと浮く・手を振るように揺れる・吹き出しの文言が入れ替わる
   ---------------------------------------------------------- */
.souzoku-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px 48px;
  align-items: center;
  text-align: left;
}
.souzoku-hero-grid .souzoku-hero-title::after { margin-left: 0; }
.souzoku-hero-grid .souzoku-hero-lead { margin-left: 0; }
.souzoku-hero-grid .souzoku-hero-actions { justify-content: flex-start; }

.souzoku-hero-figure { position: relative; padding-top: 56px; }
.souzoku-illust {
  position: relative;
  width: 300px;
  margin: 0 auto;
  animation: illust-float 4.5s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.souzoku-illust img, .souzoku-illust picture { display: block; width: 100%; height: auto; }
.souzoku-illust::before {
  /* 足元の影（浮遊に合わせて伸び縮み） */
  content: '';
  position: absolute; left: 15%; right: 15%; bottom: -14px;
  height: 22px; border-radius: 50%;
  background: rgba(60, 50, 30, .14);
  filter: blur(6px);
  animation: illust-shadow 4.5s ease-in-out infinite;
}
@keyframes illust-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-10px) rotate(1.2deg); }
}
@keyframes illust-shadow {
  0%, 100% { transform: scaleX(1); opacity: .9; }
  50%      { transform: scaleX(.82); opacity: .55; }
}

/* キラッと光る小さな星 */
.souzoku-sparkle {
  position: absolute;
  width: 14px; height: 14px;
  background: var(--primary);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: sparkle 3s ease-in-out infinite;
}
.souzoku-sparkle-1 { top: 8%;  left: -4%;  animation-delay: 0s; }
.souzoku-sparkle-2 { top: 2%;  right: 6%;  animation-delay: 1s; width: 10px; height: 10px; }
.souzoku-sparkle-3 { top: 30%; right: -6%; animation-delay: 2s; }
@keyframes sparkle {
  0%, 60%, 100% { opacity: 0; transform: scale(.4) rotate(0); }
  30%           { opacity: 1; transform: scale(1) rotate(20deg); }
}

/* 吹き出し: 3つの文言を順番に表示 */
.souzoku-bubble {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  min-height: 44px;
  padding: 11px 18px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  z-index: 2;
  animation: bubble-pop .6s cubic-bezier(.34,1.56,.64,1) both;
}
.souzoku-bubble::after {
  content: '';
  position: absolute; left: 50%; bottom: -9px;
  width: 14px; height: 14px;
  background: var(--white);
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateX(-50%) rotate(45deg);
}
.souzoku-bubble-line {
  display: block;
  grid-area: 1 / 1;
  opacity: 0;
  animation: bubble-text 9s ease-in-out infinite;
}
.souzoku-bubble { display: grid; }
.souzoku-bubble-line:nth-child(2) { animation-delay: 3s; }
.souzoku-bubble-line:nth-child(3) { animation-delay: 6s; }
@keyframes bubble-text {
  0%, 30%  { opacity: 1; transform: translateY(0); }
  33%, 97% { opacity: 0; transform: translateY(-4px); }
  98%      { opacity: 0; transform: translateY(4px); }
  100%     { opacity: 1; transform: translateY(0); }
}
@keyframes bubble-pop {
  from { opacity: 0; transform: translateX(-50%) scale(.6); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

@media (max-width: 900px) {
  .souzoku-hero-grid { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .souzoku-hero-grid .souzoku-hero-title::after { margin-left: auto; }
  .souzoku-hero-grid .souzoku-hero-actions { justify-content: center; }
  .souzoku-hero-figure { order: -1; padding-top: 52px; }
  .souzoku-illust { width: 210px; }
  .souzoku-bubble { font-size: 13px; padding: 9px 14px; max-width: 240px; }
}

/* トップの相続バナーにも小さく登場 */
.souzoku-cta-illust {
  flex: 0 0 auto;
  align-self: flex-end;          /* 足元を枠の下辺にぴったり付ける */
  width: 168px;
  margin: -40px 0 -32px 0;       /* 下は枠の padding ぶん戻す */
  transform-origin: 50% 100%;
  animation: illust-sway 4.5s ease-in-out infinite;  /* 足元固定で軽く揺れる（浮かない） */
}
.souzoku-cta-illust img, .souzoku-cta-illust picture { display: block; width: 100%; height: auto; }
@keyframes illust-sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50%      { transform: rotate(1.5deg); }
}
@media (max-width: 720px) {
  /* 縦積み: 文言→ボタン→イラスト（右下に、枠の下辺にぴったり） */
  .souzoku-cta { padding-bottom: 0; }
  .souzoku-cta-illust { order: 3; align-self: flex-end; width: 150px; margin: -8px 0 0 0; }
}

/* ----------------------------------------------------------
   代表イラスト ポーズ違い（2026-10-15）
   ---------------------------------------------------------- */
/* 相続サポート3ステップ: カード右上に小さく、スクロールで順番にひょこっと出る */
.souzoku-step { position: relative; overflow: visible; }
.souzoku-step-illust {
  position: absolute;
  top: -34px; right: 16px;
  width: 104px;
  transform-origin: 50% 100%;
  animation: illust-float 5s ease-in-out infinite;
}
.souzoku-step:nth-child(2) .souzoku-step-illust { animation-delay: -1.6s; }
.souzoku-step:nth-child(3) .souzoku-step-illust { animation-delay: -3.2s; }
.souzoku-step-illust img, .souzoku-step-illust picture { display: block; width: 100%; height: auto; }
.souzoku-step:hover .souzoku-step-illust { animation: illust-hop .6s ease-out; }
@keyframes illust-hop {
  0%   { transform: translateY(0) rotate(0); }
  35%  { transform: translateY(-14px) rotate(-4deg); }
  70%  { transform: translateY(0) rotate(3deg); }
  100% { transform: translateY(0) rotate(0); }
}
@media (max-width: 900px) {
  .souzoku-step-illust { width: 88px; top: -26px; right: 14px; }
}

/* 相続ページの問い合わせ枠: 右下にグッドサイン */
.souzoku-contact-card { position: relative; overflow: visible; }
.souzoku-contact-illust {
  position: absolute;
  right: 18px; bottom: 0;
  width: 150px;
  transform-origin: 50% 100%;
  animation: illust-float 4.5s ease-in-out infinite;
}
.souzoku-contact-illust img, .souzoku-contact-illust picture { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .souzoku-contact-illust { position: static; width: 140px; margin: 0 auto 8px; }
}

/* トップのお問い合わせ見出し: 胸に手を当てたポーズ */
.section-head-illust { position: relative; }
.contact-illust {
  width: 150px;
  margin: 0 auto 8px;
  transform-origin: 50% 100%;
  animation: illust-float 4.5s ease-in-out infinite;
}
.contact-illust img, .contact-illust picture { display: block; width: 100%; height: auto; }
@media (max-width: 640px) { .contact-illust { width: 120px; } }

/* 相続お役立ち情報: 相続Instagram への誘導（2026-10-16） */
.souzoku-ig { margin-top: 28px; text-align: center; }
.souzoku-ig-lead { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
