/* TOP ページ（案D「FRAME」＋ AI 表現）専用スタイル — front-page.php でのみ読み込む。
   デザイン検討の正本は fv/inspo/page-d-ai.html（モック）。ここはその移植で、既存 style.css と衝突しないよう
   クラスは d- 接頭辞・セレクタは .d-top 配下に限定している。ヘッダーとフッターは共通パーツ（parts/）をそのまま使う。
   器のルール: 黄フレームを画面に固定／区切りは罫線／左に見出し・右に中身（4:8）／マーカーは 1 セクション 1 語まで。 */

/* ---- 共通パーツ側の調整（TOP だけ）: フレームの内側にヘッダーを収める。フッターの波は罫線デザインと合わないので出さない ---- */
body.home { padding: 12px; background: #fff; }
body.home .header { inset: 12px 12px auto; }
body.home .footer__hill { display: none; }
@media (max-width: 860px) {
  body.home { padding: 8px; }
  body.home .header { inset: 8px 8px auto; }
}
/* 和文の字間: 本文は .05em（約物詰め palt は見出しだけ）。スマホは 400 だと細く見えるので 500（Noto Sans JP 500 を functions.php で読み込む） */
.d-top { letter-spacing: .05em; }
@media (max-width: 860px) { .d-top { font-weight: 500; } }
.d-top ul, .d-top ol { list-style: none; margin: 0; padding: 0; }
.d-top h1, .d-top h2, .d-top h3, .d-top p, .d-top dl, .d-top dd { margin: 0; }
.d-top a { color: inherit; text-decoration: none; }
.d-top button { font-family: inherit; }
.d-top svg { display: block; max-width: 100%; }
.d-top :focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.d-top {
  --y: #FFD100; --y-d: #E8BD00; --k: #000; --g9: #212121; --g7: #454545;
  --ff-d: "Zen Maru Gothic", sans-serif;
  --ff-b: "Noto Sans JP", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
.d-top h1 { font-family: var(--ff-d); font-weight: 700; font-feature-settings: "palt"; letter-spacing: .015em; }
.d-top .d-lead { font-size: 15.5px; line-height: 2.05; max-width: 36em; }
.d-top .d-btn { display: inline-block; padding: 17px 40px; border-radius: 999px; font: 700 16.5px/1 var(--ff-d);
       transition: background .2s; }
.d-top .d-btn--sm { padding: 12px 26px; font-size: 14px; }
.d-top .d-btn--y { background: var(--y); color: var(--g9); }
.d-top .d-btn--y:hover { background: var(--y-d); }
.d-top .d-btn--k { background: var(--k); color: var(--y); }
.d-top .d-btn--k:hover { background: var(--g9); }
.d-top .d-tlink { font: 700 15.5px/1 var(--ff-d); padding-bottom: 7px; border-bottom: 2px solid currentColor; }
.d-top .d-tlink:hover { border-bottom-color: var(--y); }
.d-top .d-cta { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.d-top .d-eyes { transition: transform .14s ease-out; }
.d-top .d-eye { transform-box: fill-box; transform-origin: center; animation: d-blink 5.4s infinite; }
@keyframes d-blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
@media (max-width: 760px) {
  .d-top br.d-pc { display: none; }
  .d-top .d-lead { font-size: 15px; line-height: 2; }
  .d-top .d-cta { gap: 22px; }
  .d-top .d-btn { padding: 16px 34px; font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-top *, .d-top *::before, .d-top *::after { animation: none !important; transition: none !important; }
}
.d-top h2, .d-top h3 { font-family: var(--ff-d); font-weight: 700; font-feature-settings: "palt"; letter-spacing: .03em; }
.d-top .d-h { font-size: clamp(26px, 3vw, 40px); line-height: 1.45; }
.d-top .d-txt { font-size: 15.5px; line-height: 2.05; }
.d-top .d-news a { display: grid; grid-template-columns: 96px 78px 1fr auto; gap: 0 22px; align-items: center;
          padding: 22px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.7; }
.d-top .d-news li:first-child a { border-top: 0; }
.d-top .d-news time { font: 500 14px/1 var(--ff-d); color: var(--sub); }
.d-top .d-news .d-cat { padding: 5px 0; border: 1px solid currentColor; border-radius: 999px; text-align: center;
             font-size: 12px; line-height: 1; color: var(--sub); }
.d-top .d-news .d-new { margin-left: 10px; padding: 2px 7px 3px; border-radius: 4px; background: var(--y); color: var(--k);
             font: 700 11px/1 var(--ff-d); vertical-align: 2px; }
.d-top .d-news i, .d-top .d-more i { font-style: normal; display: inline-block; transition: transform .35s var(--ease); }
.d-top .d-news a:hover i, .d-top .d-more:hover i { transform: translateX(6px); }
.d-top .d-news a:hover .d-ttl { text-decoration: underline; text-underline-offset: 5px; }
.d-top .d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.d-top .d-chips li { padding: 6px 14px; border: 1px solid currentColor; border-radius: 999px; font-size: 13px; line-height: 1; }
.d-top .d-steps h3 { font-size: 20px; line-height: 1.5; }
.d-top .d-steps p { margin-top: 10px; font-size: 14.5px; line-height: 1.95; }
.d-top .d-statement { font: 700 clamp(26px, 3.5vw, 50px)/1.55 var(--ff-d); font-feature-settings: "palt"; letter-spacing: .03em; }
.d-top .d-statement em { font-style: normal; }
.d-top .d-info > div { display: grid; grid-template-columns: 108px 1fr; gap: 0 16px; padding: 17px 0; border-top: 1px solid var(--line);
              font-size: 14.5px; line-height: 1.8; }
.d-top .d-info dt { font: 700 14.5px/1.8 var(--ff-d); }
.d-top .d-contact h2 { font-size: clamp(30px, 4.2vw, 58px); line-height: 1.4; }
.d-top .d-contact .d-txt { margin-top: 22px; }
.d-top .d-contact .d-btn { margin-top: 34px; }
.d-top .d-contact .d-mail { margin-top: 22px; font-size: 13.5px; }
.d-top .d-contact .d-mail a, .d-top .d-note a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) {
  .d-top .d-txt { font-size: 15px; line-height: 2; }
  .d-top .d-steps p { font-size: 15px; }
  .d-top .d-news a { grid-template-columns: auto auto 1fr; gap: 8px 12px; padding: 18px 0; font-size: 14.5px; }
  .d-top .d-news .d-cat { padding: 4px 12px; }
  .d-top .d-news .d-ttl { grid-column: 1 / -1; }
  .d-top .d-news a > i { display: none; }
  .d-top .d-info > div { grid-template-columns: 84px 1fr; }
}
.d-top { --line: #E2E2E2; --sub: var(--g7); --px: 44px; }
.d-top .d-frame { position: fixed; inset: 12px; z-index: 50; pointer-events: none; border-radius: 24px; box-shadow: 0 0 0 40px var(--y); }
.d-top .d-mk { display: inline-block; margin: 0 .08em; padding: 0 .2em .02em; border-radius: .12em; background: var(--y); color: var(--k); transform: rotate(-2deg); }
.d-top .d-fv { --sh: 138px; position: relative; overflow: hidden; display: flex; flex-direction: column;
        min-height: calc(100svh - 24px); background: var(--k); color: #fff; }
.d-top .d-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px var(--px) 40px; }
.d-top h1 { font-size: clamp(38px, min(6.8vw, 12svh), 100px); line-height: 1.34; }
.d-top h1 .d-mk { margin-left: .14em; }
.d-top .d-lead { margin-top: 30px; color: rgba(255,255,255,.88); }
.d-top .d-cta { margin-top: 34px; }
.d-top .d-idx { height: var(--sh); margin: 0 var(--px); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.34); }
.d-top .d-idx a { display: block; padding: 24px 28px 0; border-left: 1px solid rgba(255,255,255,.16); }
.d-top .d-idx a:first-child { padding-left: 0; border-left: 0; }
.d-top .d-idx b { display: flex; align-items: baseline; gap: 12px; font: 700 18px/1.4 var(--ff-d); transition: color .2s; }
.d-top .d-idx b::after { content: "→"; font-family: var(--ff-b); font-weight: 400; transition: transform .35s var(--ease); }
.d-top .d-idx span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.8; color: rgba(255,255,255,.6); }
.d-top .d-idx a:hover b { color: var(--y); }
.d-top .d-idx a:hover b::after { transform: translateX(6px); }
.d-top .d-peek { position: absolute; width: var(--w); height: auto; overflow: visible; }
.d-top .d-peek__body { transition: transform .5s var(--ease); }
.d-top .d-peek:hover .d-peek__body { transform: translateY(32px); }
.d-top .d-peek--fv { --w: 244px; right: 56px; bottom: calc(var(--sh) - var(--w) * .2056); }
.d-top .d-peek--fv .d-peek__body { transform: translateY(48px); animation: d-rise 1s var(--ease) .5s both; }
.d-top .d-peek--fv:hover .d-peek__body { animation: none; }
@keyframes d-rise { to { transform: none; } }
.d-top .d-eye { fill: var(--g9); }
.d-top .d-peek--fv .d-eyes { transform: translate(-1.6px, -.8px); }
.d-top .d-sec { padding: clamp(72px, 9vw, 132px) var(--px); }
.d-top .d-sec--g { background: #FAFAFA; }
.d-top .d-sec--k { --line: rgba(255,255,255,.2); --sub: rgba(255,255,255,.62); background: var(--k); color: #fff; }
.d-top .d-in { max-width: 1320px; margin: 0 auto; }
.d-top .d-row { display: grid; grid-template-columns: 4fr 8fr; gap: 0 48px; align-items: start; }
.d-top .d-row > .d-h { position: sticky; top: 48px; }
.d-top .d-more { display: inline-block; margin-top: 26px; font: 700 15px/1 var(--ff-d); }
.d-top .d-svc-h { margin-bottom: clamp(36px, 4vw, 60px); }
.d-top .d-svc-row { display: grid; grid-template-columns: 4fr 5fr 3fr; gap: 0 48px; align-items: start; padding: clamp(36px, 4vw, 56px) 0;
             border-top: 1px solid var(--k); }
.d-top .d-svc-row:last-child { border-bottom: 1px solid var(--k); }
.d-top .d-svc-row h3 { font-size: clamp(24px, 2.7vw, 36px); line-height: 1.45; }
.d-top .d-svc-row .d-catch { font: 700 17px/1.9 var(--ff-d); }
.d-top .d-svc-row .d-txt { margin-top: 12px; color: var(--g7); }
.d-top .d-svc-row .d-tlink { display: inline-block; margin-top: 26px; font-size: 14.5px; line-height: 1.5; }
.d-top .d-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
.d-top .d-steps li { padding-top: 22px; border-top: 2px solid var(--k); }
.d-top .d-steps .d-n { display: block; margin-bottom: 18px; font: 700 15px/1 var(--ff-d); }
.d-top .d-steps p { color: var(--g7); }
.d-top .d-note { font-size: 16.5px; line-height: 2.05; max-width: 46em; }
.d-top .d-statement { margin-bottom: 36px; }
.d-top .d-about .d-txt { max-width: 38em; color: rgba(255,255,255,.88); }
.d-top .d-info { margin-top: 44px; }
.d-top .d-contact { position: relative; background: #FFF6D1; padding-bottom: clamp(96px, 11vw, 160px); }
.d-top .d-peek--ft { --w: 300px; right: 9%; bottom: calc(var(--w) * -.2056); z-index: 2; }
.d-top .d-peek--ft .d-eyes { transform: translate(-2px, -.6px); }
@media (max-width: 860px) {
  .d-top { --px: 20px; }
  .d-top .d-frame { inset: 8px; border-radius: 20px; }
  .d-top .d-fv { --sh: 196px; min-height: calc(100svh - 16px); }
  .d-top .d-hero { padding: 12px var(--px) 150px; justify-content: flex-start; }
  .d-top .d-lead { margin-top: 22px; }
  .d-top .d-cta { margin-top: 26px; }
  .d-top .d-idx { display: block; }
  .d-top .d-idx span { display: none; }
  .d-top .d-idx a, .d-top .d-idx a:first-child { height: 65px; padding: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.16); display: flex; align-items: center; }
  .d-top .d-idx a:first-child { border-top: 0; }
  .d-top .d-idx b { flex: 1; justify-content: space-between; font-size: 16px; }
  .d-top .d-peek--fv { --w: 132px; right: 24px; }
  .d-top .d-row, .d-top .d-svc-row { display: block; }
  .d-top .d-row > .d-h { position: static; margin-bottom: 28px; }
  .d-top .d-svc-row .d-catch { margin-top: 14px; }
  .d-top .d-svc-row .d-chips { margin-top: 22px; }
  .d-top .d-steps { grid-template-columns: 1fr; gap: 32px; }
  .d-top .d-steps p, .d-top .d-svc-row .d-txt { color: var(--g9); }
  .d-top .d-contact .d-txt br { display: none; }
  .d-top .d-contact { padding-bottom: 170px; }
  .d-top .d-peek--ft { --w: 170px; right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-top .d-peek--fv .d-peek__body { transform: none; }
}
.d-top .d-ask { height: var(--sh); margin: 0 var(--px); padding-right: 306px; display: flex; align-items: center; gap: 18px;
         border-top: 1px solid rgba(255,255,255,.34); }
.d-top .d-ask__bar { flex: 1 1 220px; min-width: 220px; height: 58px; display: flex; align-items: center; padding: 0 26px; border-radius: 999px;
              border: 1px solid rgba(255,255,255,.34); font-size: 15px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; }
.d-top .d-ask__q.d-is-set { color: #fff; }
.d-top .d-caret { display: inline-block; width: 2px; height: 1.25em; margin-left: 3px; background: var(--y); vertical-align: -.22em; animation: d-cur 1s steps(1) infinite; }
@keyframes d-cur { 50% { opacity: 0; } }
.d-top .d-ask__chips { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 8px; }
.d-top .d-ask__chips button { padding: 12px 15px; letter-spacing: .02em; border-radius: 999px; border: 1px solid rgba(255,255,255,.34); background: transparent; color: #fff;
                       font: 700 13.5px/1 var(--ff-d); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.d-top .d-ask__chips button:hover, .d-top .d-ask__chips button[aria-pressed="true"] { background: var(--y); border-color: var(--y); color: var(--k); }
.d-top .d-say { position: absolute; z-index: 3; right: calc(56px + 244px + 30px); bottom: calc(var(--sh) + 40px); width: min(400px, 29vw);
         padding: 20px 24px 22px; border-radius: 20px; background: #fff; color: var(--g9); font-size: 14.5px; line-height: 1.95; }
.d-top .d-say::after { content: ""; position: absolute; right: -7px; bottom: 34px; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); }
.d-top .d-say b { display: block; font: 700 17px/1.7 var(--ff-d); }
.d-top .d-say.d-is-busy p::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; background: var(--g9); vertical-align: -.18em; animation: d-cur 1s steps(1) infinite; }
.d-top .d-say a[hidden] { display: none; }
.d-top .d-say a { display: inline-block; margin-top: 12px; padding-bottom: 5px; border-bottom: 2px solid var(--y); font: 700 14px/1 var(--ff-d); }
@media (max-width: 860px) {
  .d-top .d-fv { --sh: 148px; }
  .d-top .d-hero { padding-bottom: 170px; }
  .d-top .d-ask { display: block; height: var(--sh); padding: 18px 0 0; }
  .d-top .d-ask__bar { height: 50px; padding: 0 20px; font-size: 14px; }
  .d-top .d-ask__chips { margin: 12px -20px 0 0; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-right: 20px; scrollbar-width: none; }
  .d-top .d-ask__chips::-webkit-scrollbar { display: none; }
  .d-top .d-ask__chips button { flex: none; padding: 12px 14px; font-size: 13px; }
  .d-top .d-say { right: calc(24px + 132px + 18px); left: 20px; width: auto; bottom: calc(var(--sh) + 18px); padding: 14px 16px 16px; font-size: 13px; line-height: 1.8; border-radius: 16px; }
  .d-top .d-say b { font-size: 14.5px; }
  .d-top .d-say::after { bottom: 22px; }
}
.d-top .d-stream .d-ch { visibility: hidden; }
.d-top .d-stream .d-ch.d-on { visibility: visible; }
.d-top .d-stream .d-mk:not(.d-on) { background: transparent; }
.d-top .d-mk { transition: background .25s; }
.d-top .d-caret { position: relative; display: inline-block; width: 0; height: 1em; vertical-align: -.12em; }
.d-top .d-caret::after { content: ""; position: absolute; left: .06em; top: 0; width: .09em; min-width: 3px; height: 100%; background: var(--y);
                  animation: d-cur 1s steps(1) infinite; }
.d-top .d-sec:not(.d-sec--k) .d-caret::after, .d-top .d-contact .d-caret::after { background: var(--k); }
@keyframes d-cur { 50% { opacity: 0; } }
.d-top .d-pt { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.d-top .d-hero, .d-top .d-ask { position: relative; z-index: 1; }
.d-top .d-peek--fv { z-index: 2; }
.d-top .d-about { position: relative; overflow: hidden; }
.d-top .d-about .d-in, .d-top .d-contact .d-in { position: relative; z-index: 1; }
.d-top .d-say--ft { right: calc(9% + 300px + 30px); bottom: 56px; width: min(340px, 27vw); border: 2px solid var(--k); }
.d-top .d-say--ft::after { bottom: 30px; right: -9px; border-top: 2px solid var(--k); border-right: 2px solid var(--k); }
.d-top .d-say--ft p { font: 700 15.5px/1.85 var(--ff-d); min-height: 1.85em; }
.d-top .d-steps li { position: relative; border-top-color: #D0D0D0; }
.d-top .d-steps li::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--k);
                      transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); transition-delay: calc(var(--i) * .55s); }
.d-top .d-steps .d-n, .d-top .d-steps h3 { opacity: .35; transition: opacity .5s; transition-delay: calc(var(--i) * .55s + .2s); }
.d-top .d-steps.d-is-in li::before { transform: none; }
.d-top .d-steps.d-is-in .d-n, .d-top .d-steps.d-is-in h3 { opacity: 1; }
.d-top .d-dock { position: fixed; z-index: 40; left: 50%; bottom: 30px; transform: translate(-50%, 160%); transition: transform .55s var(--ease); }
.d-top .d-dock.d-is-on { transform: translate(-50%, 0); }
.d-top .d-dock__bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-radius: 999px; background: var(--k); color: #fff;
               border: 1px solid rgba(255,255,255,.28); box-shadow: 0 10px 28px rgba(0,0,0,.22); white-space: nowrap; }
.d-top .d-dock__face { width: 38px; height: auto; flex: none; overflow: visible; }
.d-top .d-dock__label { font: 700 14px/1 var(--ff-d); }
.d-top .d-dock__chips { display: flex; gap: 6px; }
.d-top .d-dock__chips button, .d-top .d-dock__chips a { padding: 10px 15px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff;
                        font: 700 13px/1 var(--ff-d); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.d-top .d-dock__chips button:hover, .d-top .d-dock__chips a:hover, .d-top .d-dock__chips button[aria-pressed="true"] { background: var(--y); border-color: var(--y); color: var(--k); }
.d-top .d-dock__say { position: absolute; left: 0; right: 0; bottom: calc(100% + 12px); padding: 14px 20px; border-radius: 18px; background: #fff;
               border: 2px solid var(--k); color: var(--g9); font-size: 14px; line-height: 1.85; }
.d-top .d-dock__say[hidden] { display: none; }
.d-top .d-dock__say p, .d-top .d-say p { text-wrap: pretty; word-break: auto-phrase; }
@media (max-width: 860px) {
  .d-top .d-say--ft { right: calc(24px + 170px + 16px); left: 20px; width: auto; bottom: 40px; padding: 12px 14px; }
  .d-top .d-say--ft p { font-size: 13.5px; }
  .d-top .d-dock { left: 16px; right: 16px; bottom: 18px; transform: translateY(170%); }
  .d-top .d-dock.d-is-on { transform: none; }
  .d-top .d-dock__label { display: none; }
  .d-top .d-dock__bar { padding: 7px 8px 7px 12px; }
  .d-top .d-dock__chips { overflow-x: auto; scrollbar-width: none; }
  .d-top .d-dock__chips::-webkit-scrollbar { display: none; }
  .d-top .d-dock__chips button, .d-top .d-dock__chips a { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .d-top .d-steps li::before { transform: none; }
  .d-top .d-steps .d-n, .d-top .d-steps h3 { opacity: 1; }
}

/* ---- 共通ヘッダー（固定・黒帯）ぶんの余白と、フレームの重なり順（ヘッダー 100 より上・ローディング 999 より下） ---- */
.d-top .d-fv { padding-top: var(--header-h); }
.d-top .d-frame { z-index: 110; }
/* キャラのせり上がりはローディング明け（main.js が body.is-loaded を付ける）から */
body:not(.is-loaded) .d-top .d-peek--fv .d-peek__body { animation: none; }
html:not(.js) .d-top .d-peek--fv .d-peek__body { transform: none; }
