/* トップページ専用（2026-10-17 作り直し・front-page.php からだけ読む）
 *
 * 大樹さんの決めごと（10/17）
 *   ・色はいまの院の藍のまま。差し色は銅（試作で決めた形）
 *   ・🔴大樹さん・佳代さんが写った写真は一切動かさない（拡大・ホバー・ふわっと出る動き、どれもなし）
 *     動かしてよいのは、写真の上の色の幕・額縁の形・銅の線・文字・イラストの額縁だけ
 *   ・イラストはやさしい水彩・後ろ姿（memory feedback_hp_illust_suisai）
 *   ・本文は固定ページ366。文章は管理画面から直せる。ここは見た目だけ
 *
 * ⚠️藍の面（最初の画面・からだはひとつながり）は、暗い表示でも同じ色に固定する（--tp-ai）。
 *   それ以外の面はテーマの変数（--ground --pale --ink）に従うので、暗い表示にも合う。
 */

.tp {
  --tp-ai: #1B3F7A;
  --tp-ai-2: #15325F;
  --tp-dou: #9C5A34;
  --tp-dou-soft: #C8875A;
  --tp-line: #06C755;
  --tp-latin: "Cormorant Garamond", "Times New Roman", serif;
  --tp-rule: color-mix(in srgb, var(--ai) 22%, transparent);
  --hdr: 0px;
  --hdrh: 0px;
}
.tp img { display: block; max-width: 100%; }
.tp .wrap { max-width: 1180px; }

/* ── 見出し（番号と英字は data 属性から出す。本文の見出しの文字は日本語だけ） ── */
.tp h2.tp-h {
  font-family: var(--min); font-weight: 500;
  font-size: clamp(1.55rem, 3.4vw, 2.5rem); line-height: 1.6; letter-spacing: .08em;
  color: var(--ai); margin: 0 0 18px; text-align: left; text-wrap: balance;
}
.tp h2.tp-h::before {
  content: attr(data-no) "  /  " attr(data-en);
  display: block; white-space: pre;
  font-family: var(--tp-latin); font-style: italic; font-weight: 400;
  font-size: 15px; letter-spacing: .08em; line-height: 1; color: var(--tp-dou);
  margin-bottom: 16px;
}
.tp .tp-head { margin-bottom: clamp(32px, 5vw, 56px); }
/* 本文の途中の予約の箱（inc/yoyaku.php が見出しの直前に差し込む）。節の幅いっぱいに置き、見出しとの間をあける */
.tp .tp-head > .yoyaku-mid { max-width: none; width: 100%; margin: 0 0 clamp(64px, 8vw, 104px); }
.tp .tp-lead { color: var(--ink-2); font-size: .95rem; line-height: 2.05; margin: 0; max-width: 36em; }
.tp .tp-sec { padding: clamp(80px, 11vw, 140px) 0; }
.tp .tp-sec.pale { border-block: 0; }
.tp .tp-sec.pale { background: var(--pale); }

/* ボタン */
.tp .tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-weight: 700; letter-spacing: .06em; line-height: 1.4;
  padding: 14px 22px; border-radius: 4px; font-size: 15px; font-family: var(--got);
}
.tp .tp-btn small { font-weight: 400; font-size: 12px; letter-spacing: .04em; }
.tp .tp-btn.line { background: var(--tp-line); color: #08361c; }
.tp .tp-btn.ghost { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.tp .tp-btn.ai { border: 1px solid var(--ai); color: var(--ai); background: transparent; }
.tp .tp-acts { display: flex; flex-wrap: wrap; gap: 10px; }

/* ════════ ① 最初の画面：藍の面＋止まった写真。下へ送ると額縁だけが右へ退き、白い画面に切り替わる ════════ */
.tp-hero { position: relative; height: 170svh; --p: 0; padding: 0; }
.tp-stage {
  /* --hdr＝上のメニューが貼りつくときの高さ（貼りつかないスマホは0）／--hdrh＝メニューの高さ。最初の1画面にちょうど収める */
  position: sticky; top: var(--hdr); height: calc(100svh - var(--hdrh));
  overflow: hidden; background: var(--ground);
}
.tp-panel { position: absolute; inset: 0; background: linear-gradient(160deg, var(--tp-ai), var(--tp-ai-2)); opacity: calc(1 - var(--p) * 1.8); }
.tp-frame {
  position: absolute; inset: 0;
  clip-path: inset(calc(var(--p) * 10%) calc(var(--p) * 6vw) calc(var(--p) * 10%) calc(38vw + var(--p) * 14vw));
}
/* 🔴写真は動かさない：transform も filter もかけない。額縁（clip-path）が閉じるだけ */
.tp-frame img {
  position: absolute; top: 0; bottom: 0; left: 38vw; width: 62vw; height: 100%;
  max-width: none; object-fit: cover; object-position: 30% 78%;
}
.tp-veil {
  position: absolute; top: 0; bottom: 0; left: 38vw; width: 62vw; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(90deg, rgba(27,63,122,.95), rgba(27,63,122,.45) 22%, rgba(27,63,122,.12) 55%, rgba(27,63,122,0));
  opacity: calc(1 - var(--p) * 1.6);
}
svg.tp-thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: calc(1 - var(--p) * 2.2); }
svg.tp-thread path {
  fill: none; stroke: var(--tp-dou-soft); stroke-width: 1.25; vector-effect: non-scaling-stroke;
  stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: tp-draw 2.2s .4s cubic-bezier(.6,0,.2,1) forwards;
}
@keyframes tp-draw { to { stroke-dashoffset: 0; } }

.tp-intro { position: absolute; inset: 0; color: #fff; opacity: calc(1 - var(--p) * 2.4); }
.tp-intro h1 {
  writing-mode: vertical-rl; position: absolute; left: calc(38vw + 2.5vw); top: max(40px, 9%);
  margin: 0; color: #fff; text-align: left;
  font-family: var(--min); font-weight: 500; line-height: 1.75; letter-spacing: .14em;
  font-size: clamp(28px, min(4vw, calc((100svh - var(--hdrh)) * .07)), 58px); font-feature-settings: "vpal";
}
.tp-intro h1 .ln { display: block; overflow: hidden; }
.tp-intro h1 .ln > span { display: inline-block; transform: translateY(-104%); animation: tp-down 1.2s cubic-bezier(.2,.7,.1,1) forwards; }
.tp-intro h1 .ln:nth-child(2) > span { animation-delay: .3s; }
.tp-intro h1 .ai { color: #F0C9A8; }
@keyframes tp-down { to { transform: none; } }
.tp-latin {
  position: absolute; left: clamp(20px, 6vw, 88px); top: max(40px, 9%); margin: 0;
  writing-mode: vertical-rl; font-family: var(--tp-latin); font-style: italic; font-size: 14px; letter-spacing: .08em; color: #E9D9CC;
}
.tp-intro .tp-bottom { position: absolute; left: clamp(20px, 6vw, 88px); bottom: max(32px, 6%); width: min(30vw, 440px); }
.tp-intro .tp-msg { font-size: 15px; line-height: 1.95; margin: 0 0 22px; color: #E6EDF3; letter-spacing: .02em; }
.tp-intro .tp-acts .tp-btn { flex: 1 1 auto; }
.tp-intro .tp-aki { display: inline-block; margin-top: 12px; font-size: 13px; color: #fff; text-underline-offset: 4px; }
.tp-band { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.28); font-size: 12.5px; line-height: 1.85; color: #D3DEE8; letter-spacing: .02em; }
.tp-band span { white-space: nowrap; }
.tp-scroll {
  position: absolute; right: clamp(16px, 3vw, 40px); bottom: max(24px, 5%); writing-mode: vertical-rl;
  font-family: var(--tp-latin); font-size: 12px; letter-spacing: .3em; color: #fff; opacity: calc(.9 - var(--p) * 3);
}
.tp-scroll i { display: block; width: 1px; height: 48px; margin: 10px auto 0; background: linear-gradient(#fff, transparent); animation: tp-drip 2.2s infinite; }
@keyframes tp-drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* 額縁が退いたあとに現れる白い画面 */
.tp-after {
  position: absolute; left: clamp(20px, 6vw, 88px); top: 50%; transform: translateY(-50%);
  width: 40vw; max-width: 560px; display: grid; grid-template-columns: minmax(0,1fr) 120px; gap: 28px; align-items: end;
  opacity: var(--a, 0); pointer-events: none;
}
.tp-after .tp-k { font-family: var(--min); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.6; letter-spacing: .08em; color: var(--ai); margin: 0 0 18px; }
.tp-after .tp-k::before { content: "01  /  Approach"; white-space: pre; display: block; font-family: var(--tp-latin); font-style: italic; font-size: 15px; letter-spacing: .08em; line-height: 1; color: var(--tp-dou); margin-bottom: 16px; }
.tp-after figure { margin: 0; aspect-ratio: 1 / 2; overflow: hidden; }
.tp-after figure img { width: 100%; height: 100%; object-fit: cover; }

/* ════════ ② 施術者：写真は止めたまま、段違いの組み方で見せる ════════ */
.tp-staff { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(28px, 6vw, 96px); max-width: 760px; }
.tp-staff .who:nth-child(2) { margin-top: 72px; }
.tp-staff figure { position: relative; margin: 0 0 26px; aspect-ratio: 3 / 4; }
.tp-staff figure::after { content: ""; position: absolute; inset: 12px -12px -12px 12px; border: 1px solid var(--ai); opacity: .35; z-index: 0; }
.tp-staff figure img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.tp-staff .nm { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 4px; }
.tp-staff h3 { font-family: var(--min); font-weight: 500; font-size: 1.45rem; color: var(--ai); margin: 0; letter-spacing: .12em; }
.tp-staff .en { font-family: var(--tp-latin); font-style: italic; font-size: 15px; color: var(--ink-3); }
.tp-staff .cert { font-size: 12.5px; letter-spacing: .06em; color: var(--tp-dou); margin: 0 0 12px; }
.tp-staff p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 2.05; }
.tp .tp-more { text-align: left; margin: clamp(44px, 6vw, 72px) 0 0; font-size: .9rem; }
.tp .tp-more a { color: var(--ai); text-underline-offset: 4px; }

/* ════════ ③ 藍の面：からだは、ひとつながり ════════ */
.tp-deep { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--tp-ai), var(--tp-ai-2)); color: #fff; --d: 0; }
.tp-deep .in { position: relative; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.tp-deep h2.tp-h { color: #fff; font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 1.5; }
.tp-deep h2.tp-h::before { color: #E7C3A4; }
.tp-deep .tp-lead { color: #D3DEE8; }
.tp-deep .pillars4 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px 32px; margin: 36px 0 0; }
.tp-deep .pillars4 div { border-top: 1px solid rgba(255,255,255,.28); padding-top: 16px; }
.tp-deep .pillars4 h3 { font-family: var(--min); font-weight: 500; font-size: 1.05rem; line-height: 1.7; margin: 0 0 8px; color: #fff; }
.tp-deep .pillars4 p { margin: 0; font-size: .88rem; line-height: 2; color: #D3DEE8; }
.tp-deep .tp-acts { margin-top: 36px; }
.tp-deep .art { position: relative; margin: 0 auto; width: 100%; max-width: 420px; aspect-ratio: 3 / 4; }
.tp-deep .art::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--tp-dou-soft); opacity: .6; z-index: 0; }
.tp-deep .art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.tp-deep svg.long { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tp-deep svg.long path { fill: none; stroke: var(--tp-dou-soft); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--d)); filter: drop-shadow(0 0 6px rgba(200,135,90,.5)); }

/* ════════ ④ こんなお悩み（症状別ページへの入口） ════════ */
.tp-nayami { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.tp-nayami .g + .g { margin-top: 30px; }
.tp-nayami .cat { font-family: var(--min); font-size: 1rem; color: var(--ai); margin: 0 0 12px; letter-spacing: .08em; }
.tp-nayami .tags { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--tp-rule); }
.tp-nayami .tags a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 4px; border-bottom: 1px solid var(--tp-rule); text-decoration: none; color: var(--ink); font-size: .93rem; line-height: 1.6;
}
.tp-nayami .tags a:nth-child(odd) { padding-right: 18px; }
.tp-nayami .tags a:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--tp-rule); }
.tp-nayami .tags a::after { content: "→"; color: var(--tp-dou); font-size: .85em; transition: transform .25s; }
.tp-nayami .tags a:hover::after { transform: translateX(4px); }
.tp-nayami .tags a:hover { color: var(--ai); }
.tp-nayami .note { margin: 28px 0 0; font-size: .93rem; color: var(--ink-2); line-height: 2.05; }
.tp-nayami figure { margin: 0; aspect-ratio: 3 / 4; overflow: hidden; }
.tp-nayami figure img { width: 100%; height: 100%; object-fit: cover; }

/* ════════ ⑤ はじめての日の流れ：4つの枠（雑誌のように線で区切る） ════════ */
.tp-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--tp-rule); border-left: 1px solid var(--tp-rule); }
.tp-steps .step { border-right: 1px solid var(--tp-rule); border-bottom: 1px solid var(--tp-rule); padding: 20px 20px 28px; background: var(--ground); }
.tp-steps figure {
  margin: 0 0 20px; aspect-ratio: 4 / 5; background: #F0F5FB; overflow: hidden; clip-path: inset(0);
  transition: clip-path 1s cubic-bezier(.6,0,.2,1); transition-delay: calc(var(--i) * .12s);
}
html.js .tp-steps figure.pre { clip-path: inset(100% 0 0 0); }
.tp-steps figure img { width: 100%; height: 100%; object-fit: cover; }
.tp-steps figure img.fit { object-fit: contain; }
.tp-steps .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.tp-steps .no { font: 300 44px/1 var(--tp-latin); color: var(--tp-dou); }
.tp-steps .min { font-family: var(--min); font-size: .85rem; color: var(--ink-3); white-space: nowrap; }
.tp-steps h3 { font-family: var(--min); font-weight: 500; font-size: 1.08rem; line-height: 1.65; color: var(--ai); margin: 0 0 8px; }
.tp-steps p { margin: 0; font-size: .86rem; line-height: 1.95; color: var(--ink-2); }
.tp .tp-fine { margin: 32px 0 0; padding: 22px 26px; background: var(--ai-pale); font-size: .9rem; line-height: 2.05; color: var(--ink-2); }
.tp .tp-fine p { margin: 0; }

/* ════════ ⑥ 施術と料金 ════════ */
.tp-price { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.tp-price .rows { border-top: 1px solid var(--tp-rule); }
.tp-price .row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--tp-rule); }
.tp-price .nm { font-family: var(--min); font-size: 1.08rem; color: var(--ink); line-height: 1.6; }
.tp-price .nm span { display: block; font-family: var(--got); font-size: .82rem; color: var(--ink-3); margin-top: 4px; }
.tp-price .yen { font-family: var(--min); font-size: clamp(1.3rem, 2.6vw, 1.6rem); color: var(--ai); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-price .yen small { font-size: .7em; margin-left: 4px; color: var(--ink-3); }
.tp-price .must { border: 1px solid var(--tp-rule); padding: 24px 26px; }
.tp-price .must h3 { font-family: var(--min); font-weight: 500; font-size: 1.05rem; color: var(--ai); margin: 0 0 12px; }
.tp-price .must ul { margin: 0; padding-left: 1.2em; }
.tp-price .must li { font-size: .88rem; line-height: 1.95; color: var(--ink-2); margin: 0 0 8px; }

/* ════════ ⑦ 院のようす（写真は止めたまま） ════════ */
.tp-room { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr); gap: 14px; align-items: end; }
.tp-room figure { margin: 0; overflow: hidden; }
.tp-room figure:nth-child(1) { aspect-ratio: 3 / 4; }
.tp-room figure:nth-child(2) { aspect-ratio: 1 / 1; }
.tp-room figure:nth-child(3) { aspect-ratio: 1 / 1; margin-bottom: 48px; }
.tp-room img { width: 100%; height: 100%; object-fit: cover; }
.tp-room figure:nth-child(3) img { object-position: 50% 20%; }

/* ════════ ⑨ よくあるご質問・⑩ アクセス（中身はテーマの .qa .info をそのまま使う） ════════ */
.tp #qa .qa, .tp #access .info { max-width: 900px; }

/* ════════ スマホ ════════ */
@media (max-width: 899px) {
  .tp-hero { height: 145svh; }
  .tp-panel { top: auto; height: 60%; bottom: 0; }
  .tp-frame { clip-path: inset(calc(var(--p) * 8%) calc(var(--p) * 20px) calc(60% + var(--p) * 2%) calc(var(--p) * 20px)); }
  .tp-frame img, .tp-veil { left: 0; width: 100%; height: 40%; bottom: auto; }
  .tp-frame img { object-position: 40% 82%; }
  .tp-veil { background: linear-gradient(0deg, rgba(27,63,122,.9), rgba(27,63,122,.15) 45%, rgba(27,63,122,0)); }
  svg.tp-thread, .tp-latin, .tp-scroll, .tp-deep svg.long { display: none; }
  .tp-intro { display: flex; flex-direction: column; justify-content: flex-end; padding: 0 20px max(18px, 3%); }
  .tp-intro h1 { writing-mode: horizontal-tb; position: static; font-size: clamp(26px, 7.6vw, 36px); line-height: 1.5; letter-spacing: .06em; margin: 0 0 12px; }
  .tp-intro h1 .ln > span { transform: translateY(104%); }
  .tp-intro .tp-bottom { position: static; width: auto; }
  .tp-intro .tp-msg { font-size: 13.5px; line-height: 1.8; margin: 0 0 14px; }
  .tp-intro .tp-acts { flex-wrap: nowrap; }
  .tp-intro .tp-acts .tp-btn { flex: 1 1 0; padding: 12px 8px; font-size: 14px; }
  .tp-intro .tp-btn.ghost small { display: none; }
  .tp-intro .tp-aki { margin-top: 10px; }
  .tp-band { margin-top: 10px; padding-top: 8px; font-size: 11px; line-height: 1.75; }
  .tp-after { left: 20px; right: 20px; top: calc(42% + 36px); bottom: auto; transform: none; width: auto; grid-template-columns: minmax(0,1fr) 72px; gap: 16px; }
  .tp-after .tp-k { font-size: clamp(1.3rem, 6vw, 1.7rem); }
  .tp-staff { grid-template-columns: minmax(0,1fr); max-width: 360px; }
  .tp-staff .who:nth-child(2) { margin-top: 24px; }
  .tp-deep .in { grid-template-columns: minmax(0,1fr); }
  .tp-deep .art { order: -1; max-width: 260px; margin: 0 0 12px; }
  .tp-deep .pillars4 { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .tp-nayami { grid-template-columns: minmax(0,1fr); }
  .tp-nayami .tags a { font-size: .86rem; }
  .tp-nayami .tags a:nth-child(odd) { padding-right: 10px; }
  .tp-nayami .tags a:nth-child(even) { padding-left: 12px; }
  .tp-nayami figure { max-width: 360px; aspect-ratio: 4 / 3; }
  .tp-steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tp-steps .step { padding: 14px 14px 22px; }
  .tp-steps .no { font-size: 34px; }
  .tp-steps h3 { font-size: .98rem; }
  .tp-steps p { font-size: .82rem; }
  .tp-price { grid-template-columns: minmax(0,1fr); }
  .tp-room { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .tp-room figure:nth-child(1) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .tp-room figure:nth-child(1) img { object-position: 50% 30%; }
  .tp-room figure:nth-child(3) { margin-bottom: 0; }
}
@media (max-width: 380px) {
  .tp-intro .tp-msg { display: none; }
  .tp-nayami .tags { grid-template-columns: minmax(0,1fr); }
  .tp-nayami .tags a:nth-child(n) { padding: 13px 4px; border-left: 0; }
}
@media (max-height: 640px) and (max-width: 899px) { .tp-intro .tp-msg { display: none; } }

/* 動きを減らす設定：最初の画面は止まった1枚にする */
@media (prefers-reduced-motion: reduce) {
  .tp *, .tp *::before, .tp *::after { animation: none !important; transition: none !important; }
  .tp-hero { height: auto; }
  .tp-stage { position: relative; top: 0; height: calc(100svh - var(--hdrh)); }
  .tp-intro h1 .ln > span { transform: none; }
  svg.tp-thread path, .tp-deep svg.long path { stroke-dashoffset: 0; }
  .tp-after { display: none; }
  html.js .tp-steps figure.pre { clip-path: inset(0); }
}

/* 仕上げ（10/17 実際の表示で見て直した所） */
.tp-price .must { margin-top: 0; }
.tp dl.dl .tel a { color: inherit; text-decoration: none; }
