/* TOP の動き（参考：PELLICULE 採用サイトの「画面に入るたびに、文字を打ち出し、絵の部品が別々に動く」型）
   ・見出し：1文字ずつ打つ（top-motion.js）。本文：見出しのあと1文字ずつ浮かぶ
   ・防音工事の場面：家が弾んで建つ → 職人が歩いて来てドリルを使う／飛行機が騒音の輪を出しながら横切る／窓が音を防ぐ光／雲が流れる
   ・リフォームの場面：部屋が出る → 職人が床板を担いで歩いて来る → 新しい床がきらっと光る
   ・事業紹介のカード：横から順に滑り込む
   動きの始まりは、そのセクションに .is-on が付いたとき（site.js） */

/* ---------- 見出しの打ち出し・本文の浮かび ---------- */
.tw .ch { opacity: 0; }
.tw .ch.on { opacity: 1; }
.tw .caret { color: currentColor; }
.rd .ch { opacity: 0; transition: opacity 0.35s ease; }
.rd.is-rd .ch { opacity: 1; transition-delay: var(--d, 0s); }

/* ---------- 場面の箱 ---------- */
.scene { position: relative; width: 100%; aspect-ratio: 640 / 560; margin-left: auto; max-width: 700px; }
.scene--reform { aspect-ratio: 480 / 360; max-width: 560px; margin: 0 auto; }
.scene .sc { position: absolute; display: block; max-width: none; margin: 0; }

/* 防音工事 */
.scene .sc-cloud--a { width: 40%; left: 2%; top: 9%; }
.scene .sc-cloud--b { width: 30%; right: 1%; top: 25%; }
.scene .sc-fly { position: absolute; left: 0; top: 1%; width: 30%; }
.scene .sc-fly .sc-plane { position: relative; width: 100%; }
.scene .sc-noise { position: absolute; left: 38%; top: 60%; width: 0; height: 0; }
.scene .sc-noise i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 3px dashed var(--ink); opacity: 0; }
.scene .sc-house { width: 90%; left: 6%; bottom: 3%; }
.scene .sc-shield { position: absolute; left: 45.4%; top: 67.6%; width: 29.5%; height: 16.2%; border-radius: 6px; box-shadow: 0 0 0 4px var(--white), 0 0 26px 10px rgba(255, 255, 255, 0.9); opacity: 0; pointer-events: none; }
.scene .sc-worker { height: 34%; width: auto; left: 27%; bottom: 2%; transform-origin: 50% 100%; }

/* リフォーム */
.scene .sc-room { width: 96%; left: 2%; bottom: 4%; }
.scene .sc-walker { position: absolute; left: 28%; bottom: 2%; height: 52%; aspect-ratio: 560 / 597; }
.scene .sc-walker .sc-worker2 { position: relative; width: 100%; transform-origin: 50% 100%; }
.scene .sc-spark { position: absolute; left: var(--x); top: var(--y); width: 30px; height: 30px; margin: -15px 0 0 -15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M15 2 L18 12 L28 15 L18 18 L15 28 L12 18 L2 15 L12 12 Z' fill='%23fff100' stroke='%230d2a36' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; opacity: 0; transform: scale(0); }

/* 事業紹介のカード：始まる前は右に退いておく */
[data-rv]:not(.is-on) .bands .band { opacity: 0; transform: translateX(140px); }
/* 大きな英字：ゆっくり左右に流れる */
.sec-en { animation: en-drift 7s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: no-preference) {
  /* 防音工事 */
  .is-on .sc-house { animation: sc-build 0.8s cubic-bezier(0.3, 1.5, 0.5, 1) 0.15s both; }
  .is-on .sc-shield { animation: sc-shield 3.6s ease-in-out 2.2s infinite; }
  .is-on .sc-worker { animation: sc-walkin 0.7s cubic-bezier(0.2, 1, 0.3, 1) 0.8s both, sc-drill 2.4s linear 1.6s infinite; }
  .is-on .sc-cloud--a { animation: sc-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.3s both, sc-drift-a 9s ease-in-out 0.9s infinite alternate; }
  .is-on .sc-cloud--b { animation: sc-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.5s both, sc-drift-b 11s ease-in-out 1.1s infinite alternate; }
  .is-on .sc-fly { animation: sc-fly 9s linear 0.4s infinite both; }
  .is-on .sc-plane { animation: sc-bob 1.6s ease-in-out infinite alternate; }
  .is-on .sc-noise i { animation: sc-noise 1.8s ease-out infinite; }
  .is-on .sc-noise i:nth-child(2) { animation-delay: 0.6s; }
  .is-on .sc-noise i:nth-child(3) { animation-delay: 1.2s; }

  /* リフォーム */
  .is-on .sc-room { animation: sc-build 0.8s cubic-bezier(0.3, 1.5, 0.5, 1) 0.15s both; }
  .is-on .sc-walker { animation: sc-walk 2.2s cubic-bezier(0.25, 0.6, 0.35, 1) 0.7s both; }
  .is-on .sc-worker2 { animation: sc-step 0.36s ease-in-out 0.7s 6 alternate, sc-idle 2.8s ease-in-out 2.9s infinite; }
  .is-on .sc-spark { animation: sc-spark 2.4s ease-in-out calc(3s + var(--d)) infinite; }

  /* 事業紹介 */
  .is-on .bands .band { animation: band-in 0.8s cubic-bezier(0.2, 1, 0.3, 1) both; }
  .is-on .bands .band:nth-child(1) { animation-delay: 0.25s; }
  .is-on .bands .band:nth-child(2) { animation-delay: 0.45s; }
  .is-on .bands .band:nth-child(3) { animation-delay: 0.65s; }

  /* 強みの番号：弾んで出る */
  .is-on .rows-no { animation: sc-pop 0.55s cubic-bezier(0.3, 1.7, 0.5, 1) both; }
  .is-on .rows > li:nth-child(1) .rows-no { animation-delay: 1.15s; }
  .is-on .rows > li:nth-child(2) .rows-no { animation-delay: 1.95s; }
  .is-on .rows > li:nth-child(3) .rows-no { animation-delay: 2.75s; }
}

@keyframes sc-build { 0% { opacity: 0; transform: translateY(26%) scale(0.86); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes sc-pop { 0% { opacity: 0; transform: scale(0.4); } 100% { opacity: 1; transform: none; } }
@keyframes sc-walkin { 0% { opacity: 0; transform: translateX(-90%); } 100% { opacity: 1; transform: none; } }
/* ドリル：2.4秒のうち最初の0.8秒だけ細かく震える */
@keyframes sc-drill {
  0%, 34%, 100% { transform: none; }
  4% { transform: translateX(1px) rotate(-1.2deg); } 8% { transform: translateX(-1px) rotate(1deg); }
  12% { transform: translateX(1px) rotate(-1.2deg); } 16% { transform: translateX(-1px) rotate(1deg); }
  20% { transform: translateX(1px) rotate(-1.2deg); } 24% { transform: translateX(-1px) rotate(1deg); }
  28% { transform: translateX(1px) rotate(-0.6deg); }
}
@keyframes sc-shield { 0%, 55%, 100% { opacity: 0; transform: scale(0.96); } 64% { opacity: 1; transform: scale(1.02); } 80% { opacity: 0.25; transform: scale(1); } }
@keyframes sc-drift-a { from { transform: translateX(0); } to { transform: translateX(14%); } }
@keyframes sc-drift-b { from { transform: translateX(0); } to { transform: translateX(-18%); } }
/* 飛行機：左の外から右の外へ、少し上りながら横切る */
@keyframes sc-fly { 0% { transform: translate(-110%, 30%); } 100% { transform: translate(310%, -20%); } }
@keyframes sc-bob { from { transform: translateY(-3px) rotate(-1deg); } to { transform: translateY(3px) rotate(1deg); } }
@keyframes sc-noise { 0% { opacity: 0.55; transform: scale(0.2); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes sc-walk { 0% { opacity: 0; transform: translateX(-160%); } 12% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes sc-step { from { transform: translateY(0) rotate(-1.5deg); } to { transform: translateY(-4%) rotate(1.5deg); } }
@keyframes sc-idle { 0%, 100% { transform: none; } 50% { transform: translateY(-1.5%); } }
@keyframes sc-spark { 0%, 100% { opacity: 0; transform: scale(0) rotate(0); } 20% { opacity: 1; transform: scale(1) rotate(45deg); } 40% { opacity: 0; transform: scale(0.3) rotate(90deg); } }
@keyframes band-in { 0% { opacity: 0; transform: translateX(140px) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes en-drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

/* スマホ：カードが画面幅いっぱいなので、ずらす量は左右の余白（22px）より小さくし、右から左へ現れる見せ方で横から入る感じを出す（画面の外にはみ出さない） */
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  [data-rv]:not(.is-on) .bands .band { transform: translateX(18px); clip-path: inset(0 0 0 100%); }
  .is-on .bands .band { animation-name: band-in-sp; }
}
@keyframes band-in-sp { 0% { opacity: 0; transform: translateX(18px); clip-path: inset(0 0 0 100%); } 100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }

/* ---------- スワイプの切り替わり（top-motion.js が .is-enter／.is-leave と data-dir を付ける） ----------
   入る画面：中身が進む向きから迫り出す（下へ進むなら下から、戻るなら上から）。色の面の輪も回りながら広がる
   出ていく画面：中身が反対へ退いて薄くなる */
@media (prefers-reduced-motion: no-preference) {
  .is-enter[data-dir="down"] :is(.fv-copy, .fv-slider, .slab-copy, .slab-art, .sec > .wrap, .cta > div) { animation: sw-in-down 0.85s cubic-bezier(0.2, 1, 0.3, 1) both; }
  .is-enter[data-dir="up"] :is(.fv-copy, .fv-slider, .slab-copy, .slab-art, .sec > .wrap, .cta > div) { animation: sw-in-up 0.85s cubic-bezier(0.2, 1, 0.3, 1) both; }
  .is-enter .slab-art, .is-enter .fv-slider { animation-delay: 0.08s; }
  .is-leave :is(.fv-copy, .fv-slider, .slab-copy, .slab-art, .sec > .wrap, .cta > div) { transition: transform 0.55s ease, opacity 0.55s ease; opacity: 0.15; }
  .is-leave[data-dir="down"] :is(.fv-copy, .fv-slider, .slab-copy, .slab-art, .sec > .wrap, .cta > div) { transform: translateY(-90px) scale(0.94); }
  .is-leave[data-dir="up"] :is(.fv-copy, .fv-slider, .slab-copy, .slab-art, .sec > .wrap, .cta > div) { transform: translateY(90px) scale(0.94); }
  .is-enter .slab-ring { animation: ring-in 1.1s cubic-bezier(0.2, 1, 0.3, 1) both; }
  .is-enter .sec-en { animation: en-fly 0.9s cubic-bezier(0.2, 1, 0.3, 1) 0.1s both, en-drift 7s ease-in-out 1s infinite alternate; }
  .cta.is-enter { animation: stripes-in 1.2s cubic-bezier(0.2, 1, 0.3, 1) both; }
  /* 強みの3項目：見出しを打ち終えるころから、1つずつ間をあけてゆっくり出す（ユーザー指示「出てくるスピード変えて」） */
  .is-enter .rows > li { animation: row-in 1s cubic-bezier(0.2, 1, 0.3, 1) both; }
  .is-enter .rows > li:nth-child(1) { animation-delay: 0.9s; }
  .is-enter .rows > li:nth-child(2) { animation-delay: 1.7s; }
  .is-enter .rows > li:nth-child(3) { animation-delay: 2.5s; }
}
@keyframes sw-in-down { 0% { opacity: 0; transform: translateY(110px) scale(0.92); } 100% { opacity: 1; transform: none; } }
@keyframes sw-in-up { 0% { opacity: 0; transform: translateY(-110px) scale(0.92); } 100% { opacity: 1; transform: none; } }
@keyframes ring-in { 0% { transform: scale(0.3) rotate(-90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes en-fly { 0% { opacity: 0; transform: translateY(40%) scale(1.08); } 100% { opacity: 1; transform: translateX(-3%); } }
@keyframes stripes-in { 0% { background-position: -240px 0; } 100% { background-position: 0 0; } }
@keyframes row-in { 0% { opacity: 0; transform: translateY(36px); } 100% { opacity: 1; transform: none; } }

/* 測るとき（deck.js）は動きを止めて仕上がりの形で */
.deck-measure .bands .band { transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  [data-rv]:not(.is-on) .bands .band { opacity: 1; transform: none; }
  .sec-en { animation: none; }
  .sc-shield, .sc-noise i, .sc-spark { display: none; }
  .tw .ch, .rd .ch { opacity: 1; }
}

/* ---------- ローディング画面（TOP の初回）：蛍光黄の地に（11-16 会長「白地を他の色に」）、先方支給の看板の筆文字（写真から輪郭をなぞった SVG）を左から書いていき、上へ抜ける ---------- */
.loader { --ld-bg: var(--key); --ld-fg: var(--ink); --ld-track: rgba(13, 42, 54, 0.18); position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(28px, 6vh, 56px); padding: 0 18px; background: var(--ld-bg); color: var(--ld-fg); transition: clip-path 0.8s cubic-bezier(0.7, 0, 0.2, 1); clip-path: inset(0 0 0 0); }
.loader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
html.is-loading { overflow: hidden; }
.ld-art { position: relative; width: min(92vw, 1040px); container-type: inline-size; }
.ld-svg { display: block; width: 100%; height: auto; }
.ld-rt, .ld-kk { position: absolute; font-family: 'Yuji Syuku', 'Noto Sans JP', serif; line-height: 1; white-space: nowrap; }
.ld-rt { left: 22.5%; top: 10.5%; font-size: 2.3cqw; letter-spacing: 0.35em; }
.ld-kk { left: 10.5%; top: 64.5%; font-size: 2.2cqw; letter-spacing: 0.9em; }
.ld-bar { width: min(56vw, 240px); height: 3px; border-radius: 3px; background: var(--ld-track); overflow: hidden; }
.ld-bar i { display: block; height: 100%; background: currentColor; transform-origin: 0 50%; }
/* 一筆書き調：筆のひと続きの線ごとに、読む順で走らせる（横長の線は左から、縦長の線は上から。--d＝書き始め、--t＝1本の時間） */
@media (prefers-reduced-motion: no-preference) {
  .ld-svg .st { clip-path: inset(0 100% 0 0); animation: ld-stroke var(--t) cubic-bezier(0.6, 0, 0.25, 1) var(--d) both; }
  .ld-svg .st-v { clip-path: inset(0 0 100% 0); animation-name: ld-stroke-v; }
  .ld-rt { animation: ld-fade 0.5s ease 0.9s both; }
  .ld-kk { animation: ld-fade 0.5s ease 1.75s both; }
  .ld-bar i { animation: ld-bar 3.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both; }
}
@keyframes ld-stroke { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -2% 0 0); } }
@keyframes ld-stroke-v { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -2% 0); } }
@keyframes ld-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes ld-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .loader { transition: none; } }

/* =====================================================================
   下層ページ（全ページ同じ水準の動き。ユーザー指示 10-30）
   ===================================================================== */
/* 見出しの帯（.hl）は打ち終えてから出す */
.tw:not(.is-typed) .hl { background: transparent; }
.tw .hl { transition: background-color 0.3s ease; }

/* 場面の置き場所 */
.phero-art .scene { max-width: 620px; margin-left: auto; }
.feat-fig .scene { max-width: 480px; margin: 0 auto; }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .phero-art .scene { max-width: 360px; margin: 0 auto; }
  .feat-fig .scene { max-width: 320px; }
}
.scene--roller, .scene--sash, .scene--docs, .scene--plan { aspect-ratio: 480 / 360; max-width: 520px; margin: 0 auto; }

/* 外装（屋上をローラーで塗る） */
/* 外装：地面に立って、家の外壁（左の壁）にローラーをかける（屋上に立たせると空を塗っているように見える。ユーザー指示） */
.scene .sc-roller { height: 44%; width: auto; left: 10%; bottom: 1%; transform-origin: 50% 100%; }
/* 外壁を塗る（壁が下から白く塗り替わる） */
.scene--roller .sc-wall { position: absolute; left: 42%; right: 4%; top: 6%; bottom: 8%; background: #e9e2d3; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; }
.scene--roller .sc-paint { position: absolute; inset: 0; background: var(--white); clip-path: inset(100% 0 0 0); }
.scene--roller .sc-roller { height: 86%; left: 4%; bottom: 2%; }
/* 防音サッシ（音の輪が窓に当たって止まる） */
.scene .sc-sash { width: 58%; right: 3%; top: 22%; }
.scene .sc-glow { position: absolute; left: 47%; top: 30%; width: 44%; height: 38%; border-radius: 8px; box-shadow: 0 0 0 4px var(--white), 0 0 24px 8px rgba(255, 255, 255, 0.95); opacity: 0; }
.scene--sash .sc-worker { height: 74%; left: 4%; bottom: 2%; }
.scene .sc-arcs { position: absolute; left: 36%; top: 26%; width: 18%; height: 40%; }
.scene .sc-arcs i { position: absolute; inset: 0; border: 4px solid var(--ink); border-left-color: transparent; border-top-color: transparent; border-bottom-color: transparent; border-radius: 50%; opacity: 0; }
/* 書類（配られて、承認の印が押される） */
.scene .sc-doc--form { width: 38%; left: 6%; top: 14%; }
.scene .sc-doc--ok { width: 40%; right: 4%; top: 4%; }
.scene .sc-doc--env { width: 38%; left: 33%; bottom: 3%; }
/* 計画（確認 → 見積り → 引き渡しが順に跳ねる） */
.scene .sc-step { bottom: 28%; }
.scene .sc-step--1 { width: 30%; left: 1%; }
.scene .sc-step--2 { width: 26%; left: 37%; }
.scene .sc-step--3 { width: 27%; right: 1%; }
.scene .sc-dash { position: absolute; bottom: 42%; height: 0; border-top: 3px dashed var(--ink); width: 8%; transform-origin: 0 50%; }
.scene .sc-dash--1 { left: 30%; }
.scene .sc-dash--2 { left: 64%; }

/* 流れ：アイコン付き */
.flow li { grid-template-columns: 86px 84px 1fr; }
.flow-ico { width: 84px; height: 84px; object-fit: contain; }
.flow--row li { grid-template-columns: 1fr; }
.flow--row .flow-ico { width: 92px; height: 80px; }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .flow li { grid-template-columns: 64px 56px 1fr; }
  .flow-ico { width: 56px; height: 56px; }
  .flow--row li { grid-template-columns: 64px 56px 1fr; justify-items: start; text-align: left; }
  .flow--row .flow-ico { width: 56px; height: 56px; }
}
/* 補助金の3列：上に絵を置いて重さをそろえる */
.aid-ico { display: block; height: 120px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto 20px; }

/* 流れ図の右：申込みから施工まで当社が担当することを、横から滑り込むパネルで見せる */
/* 住宅防音工事の一番上：こんなお悩みありませんか？（悩む人の丸いアイコン＋吹き出し、その下に選ばれる理由） */
.sp-only { display: none; }
.wrs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 48px; margin-top: var(--sp-g); }
.wr:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 24px); }
.wr-q { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 16px; }
.wr-ill { width: 116px; height: 116px; object-fit: contain; object-position: 50% 100%; padding: 10px 8px 0; background: #dbeefc; border: 3px solid var(--ink); border-radius: 50%; }
.wr-bubble { position: relative; background: var(--ink); color: var(--white); border-radius: 22px; padding: 16px 24px; font-size: 19px; font-weight: 900; line-height: 1.5; min-height: 89px; display: flex; align-items: center; text-wrap: balance; }
.wr-bubble::before { content: ""; position: absolute; left: -12px; top: 50%; width: 0; height: 0; border-style: solid; border-width: 9px 14px 9px 0; border-color: transparent var(--ink) transparent transparent; transform: translateY(-50%); }
.wr-a { margin: 20px 0 0 132px; font-size: 15.5px; line-height: 1.95; }
/* 回答文は両端そろえの通常の日本語組み（2026-11-14 先方「改行のばらつき・余白」）：句の単位の折り返しをやめ、どの行も右端まで埋める。行頭の句読点は禁止、最終行が数文字だけにならないよう pretty */
.wr-a p:not(.wr-lbl) { word-break: normal; overflow-wrap: normal; line-break: strict; text-align: justify; text-justify: inter-character; text-wrap: pretty; }
.wr-lbl { display: inline-block; margin-bottom: 8px; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; background: var(--key); border: 2px solid var(--ink); border-radius: 100px; padding: 2px 12px; line-height: 1.6; }
.wr-a mark { color: inherit; font-weight: 800; background: linear-gradient(transparent 58%, var(--key) 58%); }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .sp-only { display: inline; }
  .wrs { grid-template-columns: 1fr; gap: 40px; }
  .wr:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .wr-q { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .wr-ill { width: 84px; height: 84px; padding: 7px 6px 0; border-width: 2px; }
  .wr-bubble { font-size: 15.5px; padding: 12px 16px; border-radius: 16px; }
  .wr-bubble::before { left: -9px; border-width: 7px 10px 7px 0; }
  .wr-a { margin: 16px 0 0; font-size: 14.5px; line-height: 1.9; }
}

/* 補助の3枚の下：お客様負担がないことを帯で強く見せる */
.aids-free { display: flex; align-items: center; justify-content: center; gap: 18px; width: fit-content; max-width: 100%; margin: 36px auto 0; padding: 18px 34px 18px 22px; background: var(--key); color: var(--ink); border: 3px solid var(--ink); border-radius: 100px; box-shadow: 0 6px 0 var(--ink); font-size: 22px; font-weight: 900; line-height: 1.45; letter-spacing: 0.02em; }
.aids-free strong { font-weight: 900; background: linear-gradient(transparent 62%, #fff 62%); }
.aids-free-mark { flex: none; position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); }
.aids-free-mark::after { content: ""; position: absolute; left: 14px; top: 13px; width: 17px; height: 9px; border-left: 4px solid var(--key); border-bottom: 4px solid var(--key); transform: rotate(-45deg); }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .aids-free { gap: 12px; margin-top: 26px; padding: 14px 18px 14px 14px; border-radius: 18px; font-size: 16px; text-align: left; }
  .aids-free-mark { width: 34px; height: 34px; }
  .aids-free-mark::after { left: 10px; top: 10px; width: 13px; height: 7px; border-width: 3px; }
}
.sec:has(.flow-wrap) { overflow: clip; }
.flow-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; max-width: 1180px; margin: 0 auto; }
.flow-wrap .flow { max-width: none; margin: 0; }
.flow-side { --pf-dist: 140px; --pf-dur: 900ms; --pf-delay: 200ms; position: sticky; top: calc(var(--hd-h, 72px) + 28px); padding: 34px 30px 30px; background: var(--ink); color: var(--white); border-radius: 22px; overflow: hidden; }
.fs-lead { font-size: 15px; font-weight: 800; letter-spacing: 0.08em; color: var(--key); }
.fs-big { margin-top: 10px; font-size: 40px; font-weight: 900; line-height: 1.25; letter-spacing: -0.01em; }
.fs-big span { color: var(--key); }
.fs-chips { display: grid; gap: 10px; margin-top: 24px; position: relative; z-index: 1; }
.fs-chips li { justify-self: start; font-size: 16px; font-weight: 900; background: var(--key); color: var(--ink); border-radius: 100px; padding: 7px 18px 7px 40px; position: relative; }
.fs-chips li::before { content: ""; position: absolute; left: 16px; top: 50%; width: 12px; height: 7px; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateY(-70%) rotate(-45deg); }
.fs-worker { position: absolute; right: -6px; bottom: 74px; width: 112px; height: auto; }
.fs-txt { margin-top: 26px; font-size: 14.5px; line-height: 1.85; color: rgba(255, 255, 255, 0.86); position: relative; z-index: 1; }
/* 右から滑り込む見え方は、箱を動かさず右端から左へ開いて出す（箱を画面の外へずらさない） */
.flow-side.pf-slide-right { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .flow-side.pf-slide-right { clip-path: inset(0 0 0 100% round 22px); }
  .flow-side.pf-slide-right.is-on { clip-path: inset(0 0 0 0 round 22px); transition: clip-path 0.9s cubic-bezier(0.7, 0, 0.2, 1) 0.2s; }
  .flow-side .fs-chips li { opacity: 0; }
  .flow-side.is-on .fs-chips li { animation: fs-chip 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) calc(0.9s + var(--k) * 0.3s) both; }
  .flow-side.is-on .fs-worker { animation: sc-walkin 0.8s cubic-bezier(0.2, 1, 0.3, 1) 0.8s both; }
}
@keyframes fs-chip { 0% { opacity: 0; transform: translateX(40px) scale(0.8); } 100% { opacity: 1; transform: none; } }
@media (max-width: 1100px) {
  .flow-wrap { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
  .fs-big { font-size: 32px; }
  .fs-worker { width: 88px; }
}
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .flow-wrap { grid-template-columns: 1fr; gap: 28px; }
  .flow-side { position: relative; top: auto; order: -1; padding: 24px 20px 22px; --pf-dist: 80px; }
  .fs-big { font-size: 28px; }
  .fs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-right: 64px; }
  .fs-chips li { font-size: 12.5px; padding: 6px 10px 6px 28px; white-space: nowrap; }
  .fs-chips li::before { left: 10px; width: 9px; height: 5px; border-width: 2px; }
  .fs-worker { width: 70px; right: 8px; top: 14px; bottom: auto; }
  .fs-txt { margin-top: 16px; font-size: 13px; }
}
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) { .aid-ico { height: 92px; margin: 0 auto 18px; } }

/* 流れ：始まる前の形 */
[data-rv]:not(.is-on) .flow li { opacity: 0; transform: translateX(-70px); }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  [data-rv]:not(.is-on) .flow li { transform: translateX(-18px); clip-path: inset(0 100% 0 0); }
}

@media (prefers-reduced-motion: no-preference) {
  /* 外装 */
  .is-on .sc-roller { animation: sc-walkin 0.7s cubic-bezier(0.2, 1, 0.3, 1) 0.8s both, sc-roll 1.4s ease-in-out 1.5s infinite; }
  .is-on .scene--roller .sc-roller { animation: sc-walkin 0.7s cubic-bezier(0.2, 1, 0.3, 1) 0.2s both, sc-roll 1.4s ease-in-out 0.9s infinite; }
  .is-on .sc-paint { animation: sc-paint 6s cubic-bezier(0.45, 0, 0.55, 1) 0.9s infinite; }
  .is-on .sc-wall { animation: sc-build 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) 0s both; }
  /* 防音サッシ */
  .is-on .sc-sash { animation: sc-build 0.8s cubic-bezier(0.3, 1.5, 0.5, 1) 0.1s both; }
  .is-on .scene--sash .sc-worker { animation: sc-walkin 0.7s cubic-bezier(0.2, 1, 0.3, 1) 0.6s both, sc-drill 2.4s linear 1.4s infinite; }
  .is-on .sc-arcs i { animation: sc-arc 2.4s ease-out 1.2s infinite; }
  .is-on .sc-arcs i:nth-child(2) { animation-delay: 2s; }
  .is-on .sc-arcs i:nth-child(3) { animation-delay: 2.8s; }
  .is-on .sc-glow { animation: sc-shield 2.4s ease-in-out 1.6s infinite; }
  /* 書類 */
  .is-on .sc-doc--form { animation: sc-deal-l 0.8s cubic-bezier(0.3, 1.4, 0.5, 1) 0.2s both, sc-float-a 3.6s ease-in-out 1.2s infinite alternate; }
  .is-on .sc-doc--env { animation: sc-deal-r 0.8s cubic-bezier(0.3, 1.4, 0.5, 1) 0.6s both, sc-float-b 4s ease-in-out 1.6s infinite alternate; }
  .is-on .sc-doc--ok { animation: sc-stamp 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 1.1s both, sc-float-a 3.2s ease-in-out 2s infinite alternate; }
  /* 計画 */
  .is-on .sc-step--1 { animation: sc-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.2s both, sc-hop 4.5s ease-in-out 1.8s infinite; }
  .is-on .sc-dash--1 { animation: sc-grow 0.5s ease 0.7s both; }
  .is-on .sc-step--2 { animation: sc-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.9s both, sc-hop 4.5s ease-in-out 3.3s infinite; }
  .is-on .sc-dash--2 { animation: sc-grow 0.5s ease 1.4s both; }
  .is-on .sc-step--3 { animation: sc-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 1.6s both, sc-hop 4.5s ease-in-out 4.8s infinite; }
  /* 流れ：左から1つずつゆっくり。アイコンは着いてから弾む。つなぎの点線は伸びる */
  .is-on .flow li { animation: flow-in 1.1s cubic-bezier(0.2, 1, 0.3, 1) calc(0.3s + var(--i, 0) * 0.38s) both; }
  .is-on .flow-ico { animation: sc-pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) calc(0.75s + var(--i, 0) * 0.38s) both; }
  .is-on .flow li::after { animation: flow-line 0.5s ease calc(0.9s + var(--i, 0) * 0.38s) both; }
  /* 補助金の絵 */
  .is-on .aid-ico { animation: sc-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) calc(0.3s + var(--c, 0) * 0.3s) both, sc-float-a 3.6s ease-in-out calc(1.2s + var(--c, 0) * 0.3s) infinite alternate; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 900px), (prefers-reduced-motion: no-preference) and (max-width: 1100px) and (orientation: portrait) {
  .is-on .flow li { animation-name: flow-in-sp; }
}
@keyframes sc-roll { 0%, 100% { transform: none; } 50% { transform: translateY(-5%) rotate(-2deg); } }
@keyframes sc-paint { 0% { clip-path: inset(100% 0 0 0); } 60% { clip-path: inset(0 0 0 0); } 88% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes sc-arc { 0% { opacity: 0; transform: translateX(-60%) scale(0.6); } 20% { opacity: 0.9; } 70% { opacity: 0.6; transform: translateX(10%) scale(1); } 100% { opacity: 0; transform: translateX(14%) scale(1); } }
@keyframes sc-deal-l { 0% { opacity: 0; transform: translate(-30%, -60%) rotate(-24deg); } 100% { opacity: 1; transform: rotate(-5deg); } }
@keyframes sc-deal-r { 0% { opacity: 0; transform: translate(30%, 60%) rotate(20deg); } 100% { opacity: 1; transform: rotate(3deg); } }
@keyframes sc-stamp { 0% { opacity: 0; transform: scale(1.6) rotate(-8deg); } 100% { opacity: 1; transform: rotate(4deg); } }
@keyframes sc-float-a { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-5%) rotate(-2deg); } }
@keyframes sc-float-b { from { transform: translateY(0) rotate(3deg); } to { transform: translateY(-4%) rotate(5deg); } }
@keyframes sc-hop { 0%, 18%, 100% { transform: none; } 6% { transform: translateY(-14%); } 12% { transform: translateY(0) scale(1.04, 0.96); } }
@keyframes sc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes flow-in { 0% { opacity: 0; transform: translateX(-70px); } 100% { opacity: 1; transform: none; } }
@keyframes flow-in-sp { 0% { opacity: 0; transform: translateX(-18px); clip-path: inset(0 100% 0 0); } 100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@keyframes flow-line { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  [data-rv]:not(.is-on) .flow li { opacity: 1; transform: none; clip-path: none; }
  .tw:not(.is-typed) .hl { background: var(--ink); }
}

/* スマホ：下層ページの場面は箱の外へ出る動き（飛行機・歩いて来る職人）を箱の中で切る（画面の外へはみ出さない） */
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  :is(.phero-art, .feat-fig, .split-fig) .scene { overflow: hidden; overflow: clip; }
}

/* スマホ：飛行機・職人は画面の外から入らず、絵の枠の中で現れて消える（画面の外へはみ出さない） */
@media (prefers-reduced-motion: no-preference) and (max-width: 900px), (prefers-reduced-motion: no-preference) and (max-width: 1100px) and (orientation: portrait) {
  .is-on .sc-fly { animation-name: sc-fly-sp; }
  .is-on .sc-worker, .is-on .scene--sash .sc-worker { animation-name: sc-walkin-sp, sc-drill; }
  .is-on .sc-roller, .is-on .scene--roller .sc-roller { animation-name: sc-walkin-sp, sc-roll; }
  .is-on .sc-walker { animation-name: sc-walk-sp; }
}
@keyframes sc-fly-sp { 0% { opacity: 0; transform: translate(0, 30%); } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(230%, -20%); } }
@keyframes sc-walkin-sp { 0% { opacity: 0; transform: translateX(-12%); } 100% { opacity: 1; transform: none; } }
@keyframes sc-walk-sp { 0% { opacity: 0; transform: translateX(-40%); } 30% { opacity: 1; } 100% { opacity: 1; transform: none; } }

/* =====================================================================
   背景の英字の帯（流れ続ける・輪郭線）と、音の波紋の飾り（motion.js が全セクションに付ける）
   ・英字は文字の後ろ（重なりの一番下）。色の面ごとに線の色を変える
   ===================================================================== */
.has-marq { position: relative; isolation: isolate; overflow: hidden; --marq: rgba(13, 42, 54, 0.09); --wave-c: rgba(13, 42, 54, 0.16); }
.has-marq:is(.fv, .slab--sky, .sec--sky, .sec--blue, .sec--yellow, .cta) { --marq: rgba(255, 255, 255, 0.62); --wave-c: rgba(255, 255, 255, 0.75); }
.has-marq.pband { --marq: rgba(255, 255, 255, 0.12); --wave-c: rgba(255, 255, 255, 0.2); }
.marq { position: absolute; left: 0; right: 0; bottom: 2%; z-index: -1; overflow: hidden; pointer-events: none; line-height: 1; }
.marq-in { display: flex; width: max-content; white-space: nowrap; }
.marq-in::before, .marq-in::after { content: attr(data-t); font-size: clamp(72px, 11vw, 176px); font-weight: 900; letter-spacing: 0.02em; color: transparent; -webkit-text-stroke: 1.5px var(--marq); text-stroke: 1.5px var(--marq); }
.fv .marq, .phero .marq { bottom: auto; top: calc(var(--hd-h) + 2%); }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .marq-in::before, .marq-in::after { font-size: clamp(54px, 17vw, 96px); -webkit-text-stroke-width: 1.2px; }
}
/* 音の波紋：点線の同心円がゆっくり広がり、回る */
.deco-wave { position: absolute; z-index: -1; width: clamp(180px, 22vw, 340px); aspect-ratio: 1; pointer-events: none; }
.deco-wave--r { right: -6%; top: 8%; }
.deco-wave--l { left: -6%; bottom: 10%; }
.deco-wave i { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed var(--wave-c); }
.deco-wave i:nth-child(2) { inset: 16%; }
.deco-wave i:nth-child(3) { inset: 32%; border-style: solid; border-width: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .marq-in { animation: marq 46s linear infinite; }
  .marq--rev .marq-in { animation-direction: reverse; }
  .deco-wave { animation: deco-spin 40s linear infinite; }
  .deco-wave i { animation: deco-pulse 4.8s ease-in-out infinite; }
  .deco-wave i:nth-child(2) { animation-delay: 0.8s; }
  .deco-wave i:nth-child(3) { animation-delay: 1.6s; }
}
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes deco-spin { to { transform: rotate(360deg); } }
@keyframes deco-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.55; } }


/* タブレット（iPad の縦など 600〜1100px）：下層ページの FV がスマホの配置のままだと絵と見出しが小さく寂しいので大きくする */
@media (min-width: 600px) and (max-width: 900px), (min-width: 600px) and (max-width: 1100px) and (orientation: portrait) {
  .phero-ttl { font-size: 42px; }
  .phero-sub { font-size: 22px; }
  .phero-lead { font-size: 16px; max-width: 40em; }
  .phero-art .scene { max-width: 560px; }
  .phero .fv-btns { flex-wrap: nowrap; max-width: 620px; align-self: stretch; }
  .phero .fv-btns .btn-big { flex: 1 1 0; height: 62px; font-size: 15px; }
  .feat-fig .scene { max-width: 440px; }
}

/* 助成の対象となる住宅：自社開発のエリアマップの案内（白い枠にピンの絵、下にお問合せのボタン） */
.area-call { margin-top: 28px; padding: 24px 28px 26px; background: var(--white); border: 3px solid var(--ink); border-radius: 22px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 20px; align-items: center; }
.area-call-ico { width: 76px; height: 76px; }
.area-call-txt { font-size: 19px; font-weight: 900; line-height: 1.7; }
.area-call-txt mark { color: #e8402a; background: linear-gradient(transparent 58%, var(--key) 58%); }
.area-call-btn { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .area-call { padding: 20px 18px 22px; grid-template-columns: 44px minmax(0, 1fr); gap: 6px 10px; }
  .area-call-ico { width: 44px; height: 44px; }
  .area-call-txt { font-size: 16px; }
  .area-call-btn { justify-self: stretch; min-width: 0; }
}

.ld-kk .kk-svg { height: 3.4cqw; }

/* 先方修正 2026-11-13：悩みの回答・対象住宅の文は、先方の改行案どおり広い PC では行を固定する（それより狭い画面は句ごとの折り返し） */
.pc-br { display: none; }
@media (min-width: 1240px) and (min-height: 500px) { .pc-br { display: inline; } }
.split--tg { grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr); gap: 56px; }
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
  .split--tg { grid-template-columns: 1fr; gap: 34px; }
}
.txt.tg-lead { display: block; }
