/*
Theme Name: yamanekolab 2026 theme
Theme URI: https://kyodopress.co.jp/
Author: Kyodopress.Co.,Ltd
Author URI: https://kyodopress.co.jp/
Version: 1.22.57
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
/* ============================================
   基本設定
============================================ */

:root {
  --bg: #f9f9f9;
  --bg-soft: #F7F5F1;
  --yamaneko-black: #24211E;
  --evergreen: #304A43;
  --cream: #faf7f0;
  --side: 167px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sheet-cut: calc(100vw * 0.034920755); /* tan(2deg) */
  --sheet-overlap: calc(var(--sheet-cut) + 4px);
  /* 紙面の2°と写真マスクの差。FV・紙面との接合に使う */
  --photo-edge: calc(100vw * 0.05030537 + 2px);
  /* 左が上・右が下（右下がり 2°）。clip-path 用は入れ子 var にしない */
  --cut-para: polygon(0 0, 100% calc(100vw * 0.034920755), 100% 100%, 0 calc(100% - 100vw * 0.034920755));
  /* 2°のまま、白い縁だけ 2px 内側へ */
  --cut-para-edge: polygon(0 2px, 100% calc(100vw * 0.034920755 + 2px), 100% calc(100% - 2px), 0 calc(100% - 100vw * 0.034920755 - 2px));
  --cut-para-photo: polygon(0 calc(100vw * 0.015384615), 100% calc(100vw * 0.05030537), 100% calc(100% - 100vw * 0.015384615), 0 calc(100% - 100vw * 0.05030537));
  --reveal-duration: 1.5s;
  --reveal-ease: cubic-bezier(0.22, 0.1, 0.18, 1);
  --reveal-stagger: 0.2s;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background-color: var(--evergreen);
  background-image: url("img/header.jpg");
  background-repeat: no-repeat;
  background-position: center calc(100vw * (294 - 1200) / 2880);
  background-size: 100% auto;
  min-height: 100%;
  min-height: 100dvh;
  min-height: 100lvh;
}
html, body { margin: 0; padding: 0; max-width: 100%; min-height: 100%; min-height: 100dvh; min-height: 100lvh; }

body {
  font-family: "Lora", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: var(--yamaneko-black);
  background-color: transparent;
  line-height: 1.9;
  letter-spacing: 0.07em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main {
  background-color: var(--bg-soft);
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  pointer-events: none;
  z-index: 0;
  display: none;
}
html.is-locked,
body.is-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sp { display: none; }
.pc { display: inline; }
@media (max-width: 768px) {
  .sp { display: inline; }
  .pc { display: none; }
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }

/* ============================================
   背景（.paper / .sheet）
============================================ */
.paper {
  position: relative;
  isolation: isolate;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  background: none;
  /* PC: 区切り写真の下に2°で重なる */
  margin-top: calc(-1 * var(--photo-edge));
  padding-top: var(--sheet-cut);
  padding-bottom: var(--sheet-cut);
}
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg-soft);
  background-image: url("img/bg-texture-2.jpg");
  background-repeat: no-repeat;
  /* 上端の白を vw 指定で確実に枠外へ（％指定は background-position ではほぼ動かない） */
  --tex2-crop: calc(100vw * 320 / 2880);
  background-size: 100% calc(100% + var(--tex2-crop));
  background-position: left calc(-1 * var(--tex2-crop));
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}
.sheet {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: none;
  z-index: 3;
  margin-top: calc(-1 * var(--sheet-overlap));
  padding-top: var(--sheet-cut);
  padding-bottom: var(--sheet-cut);
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: url("img/bg-texture-3.jpg");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: top center;
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}

/* ============================================
   ナビ / ハンバーガー / BGM
============================================ */
.below-fv { position: relative; overflow: visible; z-index: auto; margin-top: calc(-1 * var(--photo-edge)); }
.menu-toggle {
  display: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  background: rgba(247, 245, 241, 0.8);
  color: var(--yamaneko-black);
}
.menu-toggle.is-open {
  background: var(--yamaneko-black);
  color: #F7F5F1;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.3px;
  margin: 0;
  background: currentColor;
  transition: transform 0.45s var(--ease);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

.site-nav {
  position: absolute;
  z-index: 4;
  top: calc(var(--photo-edge) - 115px);
  left: 70px;
  width: var(--side);
  padding: 0 0 28px;
  margin: 0;
  color: var(--yamaneko-black);
  background: transparent;
}
.site-nav__backdrop { display: none; }
.site-nav__panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
}
.site-nav__logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  align-self: stretch;
  flex-shrink: 0;
  margin-left: 12px;
  margin-bottom: 28px;
  transition: opacity 0.35s ease;
}
.site-nav__logo:hover { opacity: 0.55; }
.site-nav__logo picture,
.site-nav__logo img { width: 125px; height: auto; display: block; }

.site-nav__pc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  font-family: "Lora", serif;
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 45px;
}
.site-nav__pc a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 34px;
  box-sizing: border-box;
  padding: 0 18px;
  font-family: "Lora", serif;
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 45px;
  color: var(--evergreen);
  text-align: center;
  border-radius: 999px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  text-shadow: 0 0 0 transparent;
  transition: background 0.45s ease, color 0.45s ease, text-shadow 0.45s ease;
}
.site-nav__pc a:hover,
.site-nav__pc a:active {
  background: var(--evergreen);
  color: var(--cream);
}
@media (min-width: 1361px) {
  .site-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 70px;
    z-index: 6;
    height: fit-content;
    margin: auto 0;
    transform: translateY(-48px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
  }
  .site-nav.is-shown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .site-nav__pc a.is-on-dark {
    color: var(--cream);
    text-shadow: 0 1px 3px rgba(36, 33, 30, 0.55);
  }
  .site-nav__pc a.is-on-dark:hover,
  .site-nav__pc a.is-on-dark:active {
    background: var(--cream);
    color: var(--evergreen);
    text-shadow: none;
  }
  .bgm-toggle.is-on-dark img {
    filter: brightness(0) invert(1);
  }
}

.bgm-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 28px;
  margin-left: 18px;
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 0.35s ease;
}
.bgm-toggle:hover { opacity: 0.55; }
.bgm-toggle.is-on:hover { opacity: 1; }
.bgm-toggle .icon-off,
.bgm-toggle .icon-on {
  grid-area: 1 / 1;
  display: block;
  width: 40px;
  height: 40px;
  line-height: 0;
  pointer-events: none;
}
.bgm-toggle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: none;
  filter: brightness(1) invert(0);
  transition: filter 0.45s ease;
}
.bgm-toggle .icon-on {
  opacity: 0;
  visibility: hidden;
}
.bgm-toggle.is-on .icon-off {
  opacity: 0;
  visibility: hidden;
}
.bgm-toggle.is-on .icon-on {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   ファーストビュー（#top / .fv）
============================================ */
.fv {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: var(--yamaneko-black);
  overflow: visible;
}
.fv__bg {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-shrink: 0;
  line-height: 0;
  overflow: visible;
  aspect-ratio: 2880 / 294;
  background-color: #ffffff;
  /* 下端の2°だけ切る。上ははみ出した写真を残してオーバースクロールで続きを見せる */
  -webkit-clip-path: polygon(0 -200vh, 100% -200vh, 100% 100%, 0 calc(100% - 100vw * 0.034920755));
  clip-path: polygon(0 -200vh, 100% -200vh, 100% 100%, 0 calc(100% - 100vw * 0.034920755));
}
.fv__bg picture {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  display: block;
}
.fv__bg img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
}
.fv__content {
  position: relative;
  isolation: isolate;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  width: 100%;
  flex: 1;
  background: none;
  overflow: visible;
  margin-top: calc(-1 * var(--sheet-overlap));
  padding-top: var(--sheet-cut);
  padding-bottom: var(--sheet-cut);
}
.fv__content::before {
  content: "";
  position: absolute;
  /* クリップ縁の欠けが点線に見えないよう、紙面を 3px 外側まで塗る */
  inset: -3px;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: url("img/bg-texture-1.jpg");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: top center;
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}
.fv__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(220px, 48vw);
  margin-bottom: 118.47px;
}
.fv__copy,
.fv__logo {
  grid-area: 1 / 1;
  margin: 0;
}
.fv__copy {
  font-size: 46px;
  font-weight: 500;
  letter-spacing: 0.25em;
  line-height: 92px;
  margin-top: 229px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.fv__copy-no { font-size: 44px; }
.fv__copy-mo { letter-spacing: 0.15em; }
.fv__copy-tte { letter-spacing: 0.11em; }
.fv.is-ready .fv__copy {
  animation: fvCopySwap 3.3s ease-in-out 0.12s forwards;
}
.fv__logo {
  width: 310px;
  height: 397px;
  opacity: 0;
  z-index: 1;
  margin-top: 183px;
}
.fv.is-ready .fv__logo {
  animation: fvLogoSwap 2.4s ease-in-out 3.45s forwards;
}
.fv__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fv__line {
  display: block;
  position: relative;
  width: 2px;
  flex: 1 1 auto;
  height: 314px;
  transform-origin: top center;
  transform: scaleY(0);
  opacity: 0;
  background: rgba(36, 33, 30, 0.5);
  pointer-events: none;
  z-index: 3;
}
.fv__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: calc(var(--sheet-cut) + 24px);
  background: inherit;
}
.fv__line.is-in {
  opacity: 1;
  animation: lineGrow 2.4s var(--ease) forwards;
}
.fv__kicker {
  margin: 0 0 37px;
  font-size: clamp(16px, 2.4vw, 21px);
  font-weight: 500;
  line-height: 83px;
  letter-spacing: 0.2em;
  opacity: 0;
}
.fv__kicker.is-in { animation: fadeRise 2.1s var(--reveal-ease) forwards; }

@keyframes fadeRise { to { opacity: 1; transform: none; } }
@keyframes lineGrow { to { transform: scaleY(1); } }
@keyframes fvCopySwap {
  0% { opacity: 0; }
  39% { opacity: 1; }
  73% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes fvLogoSwap {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* PC: ロゴを画面中央に置き、高さに合わせて伸縮する */
@media (min-width: 769px) {
  .fv {
    --fv-bg-h: calc(100vw * 294 / 2880);
    --fv-logo-h: min(42svh, calc(100svh - 2 * var(--fv-bg-h) - 16px), 520px);
    min-height: 100svh;
  }
  .fv__content {
    min-height: 0;
  }
  .fv__stage {
    flex: 1 1 auto;
    min-height: calc(100svh - 2 * var(--fv-bg-h));
    margin-bottom: clamp(16px, 3vh, 80px);
  }
  .fv__copy {
    margin-top: 0;
  }
  .fv__logo {
    width: auto;
    height: var(--fv-logo-h);
    max-height: 100%;
    aspect-ratio: 620 / 794;
    margin-top: 0;
  }
  .fv__line {
    flex: 0 0 auto;
    height: clamp(72px, 14svh, 220px);
  }
}

/* ============================================
   なぜ山猫研は生まれたのか（#philosophy）
============================================ */
.section { padding: 48px 0 110px; }
.section--origin {
  position: relative;
  z-index: 1;
  padding: 0;
  overflow: visible;
}
.origin__frame {
  position: relative;
  z-index: 1;
  overflow: visible;
}
.origin__band {
  width: 100%;
  height: auto;
  max-width: none;
  aspect-ratio: 2880 / 440;
  margin-top: calc(-6.5689985% - 4px);
  display: block;
  position: relative;
  z-index: 2;
  overflow: hidden;
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}
.origin__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 172px 0 110px;
}

/* ============================================
   セクション共通（余白・見出し・帯写真）
============================================ */
.inner--wide {
  font-size: clamp(17px, 2vw, 19px); 
  font-weight: 500; 
  letter-spacing: 0; 
  line-height: 42px;
  width: min(680px, calc(100% - 80px));
  margin: 0 auto 100px; 
}
.inner--narrow {
  width: min(680px, calc(100% - 50px));
  margin: 0 auto;
}
#philosophy .ribbon,
#approach .ribbon,
#cases .ribbon,
#story .ribbon,
#contact .ribbon { scroll-margin-top: 24px; }
#contact {
  position: relative;
  z-index: 1;
}
#story {
  position: relative;
  z-index: 1;
  background-color: var(--bg-soft);
  margin-top: calc(-1 * var(--sheet-cut));
  padding-top: calc(94px + var(--sheet-cut));
  padding-bottom: var(--sheet-cut);
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}

.ribbon {
  display: block;
  width: min(720px, 92%);
  margin: 0 auto 56px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}
.ribbon img {
  display: block;
  width: 100%;
  max-width: 570px;
  height: auto;
  margin: 0 auto;
}
.ribbon--sm {
  width: 100%;
  margin: 8px auto 28px;
}

/* 帯写真（セクション間の区切り＝固定背景の窓）
   参考: Studio の position:fixed 画像を枠の clip-path から覗く方式。
   background-attachment:fixed は iOS で不安定なため使わない。 */
.bg-window {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  -webkit-clip-path: inset(0);
  clip-path: inset(0);
}
.bg-window__scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.section--origin > .bg-window__scene {
  background-image: url("img/divider-03.jpg");
}
.photo-slice--origin .bg-window__scene {
  background-image: url("img/sp/divider-03.jpg");
}
.photo-slice--band .bg-window__scene {
  background-image: url("img/sp/divider-04.jpg");
}
.photo-slice--join.bg-window:not(.photo-slice--origin):not(.photo-slice--band) > .bg-window__scene {
  background-image: url("img/divider.jpg");
}
.site-footer__hero > .bg-window__scene {
  background-image: url("img/mountain.jpg");
}
@media (prefers-reduced-motion: reduce) {
  .bg-window__scene {
    position: absolute;
    height: 100%;
  }
}

.photo-slice--join {
  position: relative;
  z-index: 4;
  margin-top: calc(-1 * var(--sheet-overlap));
  margin-bottom: calc(-1 * var(--sheet-overlap));
  line-height: 0;
  overflow: hidden;
  aspect-ratio: 2880 / 440;
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}
.photo-slice--origin { display: none; }
.photo-slice--band { display: none; }
.photo-slice--story {
  width: 100%;
  margin: 0 0 25px;
  line-height: 0;
  overflow: hidden;
  aspect-ratio: 2880 / 180;
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}
.photo-slice--story img {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center;
  -webkit-clip-path: none;
  clip-path: none;
}

/* 本文テキスト */
.lead {
 font-size: clamp(17px, 4vw, 19px);
 line-height: 2.35;
 letter-spacing: .08em;
 font-weight: 500;
 }
.muted { color: var(--yamaneko-black); }
.prose-center { 
  display: flex;
  flex-direction: column;
  gap: 40px;
  text-align: center; 
  }
.prose-center .lead { margin: 0; }
#philosophy .lead__line {
  text-shadow: 0 0 0 transparent;
  transition: color 0.45s ease, text-shadow 0.45s ease;
}
#philosophy .lead__line.is-on-dark {
  color: var(--cream);
  text-shadow: 0 1px 3px rgba(36, 33, 30, 0.55);
}
#philosophy .ribbon img {
  filter: brightness(1) invert(0);
  transition: filter 0.45s ease;
}
#philosophy .ribbon.is-on-dark img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(36, 33, 30, 0.55));
}

/* スクロール出現 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--reveal-duration) var(--reveal-ease), transform var(--reveal-duration) var(--reveal-ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.is-in[data-stagger="1"] { transition-delay: calc(var(--reveal-stagger) * 1); }
.is-in[data-stagger="2"] { transition-delay: calc(var(--reveal-stagger) * 2); }
.is-in[data-stagger="3"] { transition-delay: calc(var(--reveal-stagger) * 3); }
.is-in[data-stagger="4"] { transition-delay: calc(var(--reveal-stagger) * 4); }
.is-in[data-stagger="5"] { transition-delay: calc(var(--reveal-stagger) * 5); }
.is-in[data-stagger="6"] { transition-delay: calc(var(--reveal-stagger) * 6); }
.is-in[data-stagger="7"] { transition-delay: calc(var(--reveal-stagger) * 7); }
.is-in[data-stagger="8"] { transition-delay: calc(var(--reveal-stagger) * 8); }
.is-in[data-stagger="9"] { transition-delay: calc(var(--reveal-stagger) * 9); }
.is-in[data-stagger="10"] { transition-delay: calc(var(--reveal-stagger) * 10); }
.is-in[data-stagger="11"] { transition-delay: calc(var(--reveal-stagger) * 11); }
.is-in[data-stagger="12"] { transition-delay: calc(var(--reveal-stagger) * 12); }

.portrait-frame { aspect-ratio: 1 / 1; overflow: hidden; max-width: 157px; width: 157px; }
.portrait-frame picture,
.portrait-frame img { width: 100%; height: 100%; display: block; }
.portrait-frame img { object-fit: cover; }

/* ============================================
   仕事（#approach）
============================================ */
#approach {
  position: relative;
  padding-top: 72px;
  padding-bottom: 61px;
}
.rail-wrap {
  position: relative;
  max-width: 100%;
  min-width: 0;
}

.work-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 8vw 0;
  width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
}
.work-rail::-webkit-scrollbar { display: none; }
.work-track {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.work-axis {
  line-height: 0;
  flex: 0 0 auto;
}
.work-axis img {
  width: 100%;
  height: auto;
  display: block;
  max-width: none;
}
.work-items {
  display: flex;
  gap: 0;
}
.work-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 240px;
  scroll-snap-align: center;
  text-align: center;
  padding: 0;
  z-index: 1;
}
.work-item > img {
  width: 175px;  object-fit: contain; margin: 0 auto 41px; display: block;
}
.work-item h3 {
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  box-sizing: border-box;
  width: 100%;
  height: 72px;
  margin: 0 0 30px;
  overflow: visible;
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 0;
  color: var(--evergreen);
  text-align: center;
}
.work-item h3 span {
  display: block;
  line-height: 36px;
  white-space: nowrap;
}
.work-item p {
  display: table;
  width: auto;
  max-width: 175px;
  margin: 0 auto;
  font-size: clamp(16px, 2vw, 18px); 
  font-weight: 500;
  color: var(--yamaneko-black); 
  line-height: 30px;
  letter-spacing: 0;
  text-align: left;
}

#approach .rail-wrap {
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto;
}
#approach .work-axis {
  width: calc(180px * 3 + 57px * 3);
  margin: 0 auto 44px;
}
#approach .work-rail {
  padding-left: 0;
  padding-right: 0;
  width: min(100%, calc(175px * 4 + 38px * 3));
  margin: 0 auto;
}
#approach .work-items {
  display: flex;
  gap: 38px;
  justify-content: center;
}
#approach .work-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  max-width: 175px;
  overflow: visible;
}

/* ============================================
   ケーススタディ（#cases）
============================================ */
.cases-note {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 30px;
  color: var(--evergreen);
  margin: -60px 0 -10px;
}
#cases {
  --cases-left: calc(70px + var(--side) + 40px);
  max-width: 100%;
  min-width: 0;
}
#cases .rail-wrap {
  max-width: 100%;
  min-width: 0;
}
.cases-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 370.62px;
  grid-template-rows: auto auto auto;
  column-gap: 25.38px;
  overflow-x: auto;
  overflow-y: clip;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-left: var(--cases-left);
  width: calc(100% - var(--cases-left));
  padding: 32px 8vw 28px 0;
  scroll-padding-left: 0;
  cursor: grab;
  min-width: 0;
  max-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.cases-track::-webkit-scrollbar { display: none; }
.case-card {
  width: 370.62px;
  max-width: 370.62px;
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  color: inherit;
  cursor: pointer;
}
.case-card.is-in:hover {
  opacity: .78;
  transition-delay: 0s;
  transition-duration: 0.4s;
}
.case-card__frame {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--yamaneko-black);
  background: rgba(255, 255, 255, 0.5);
  padding: 15px 18px 0;
  margin: 0 12px 12px 0;
}
.case-card__frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  background: url("img/cs-shadow.png") no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.case-card__img,
.case-card__bar {
  position: relative;
  z-index: 1;
}
.case-card__bar {
  height: 50px;
}
.case-card__img { width: 324px; height: 240px; overflow: hidden; background: #ddd8cc; }
.case-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.case-card:hover .case-card__img img { transform: scale(1.04); }
.case-card__bar {
  display: flex; justify-content: flex-start; align-items: center;
  gap: 12px; padding: 0;
  border-top: 1px solid var(--evergreen);
  color: var(--evergreen);
  font-size: 19px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: .05em;
}
.case-card__text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: stretch;
  height: 100%;
  margin: 0 2px;
}
.case-card__more { 
  display: inline-flex; 
  align-items: center; 
  flex-shrink: 0;
  gap: 8px; 
  margin-top: auto;
  padding-top: 8px;
  color: #2D2926;
  font-weight: 700; 
  font-size: 15px; 
  font-style: italic; 
  letter-spacing: 0.1em;
}
.case-card__more i {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.case-card__more i img {
  width: 18px;
  height: 18px;
  display: block;
}
.case-card h3 {
  margin: 18px 2px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yamaneko-black);
  font-family: "Shippori Mincho", serif;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  line-height: 34px;
  color: var(--evergreen);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.case-card__excerpt {
  margin: 0; 
  width: 100%; 
  font-size: clamp(16px, 2vw, 19px); 
  font-weight: 500; 
  line-height: 36px; 
  color: var(--yamaneko-black);
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.cases-ctrl {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 91.72px;
  margin: 8px 0 0 var(--cases-left);
}
.cases-arrow {
  width: auto;
  height: 40px;
  display: grid;
  place-items: center;
  line-height: 0;
  color: var(--yamaneko-black);
  transition: opacity .35s ease;
}
.cases-ctrl.is-all-visible .cases-arrow,
.modal__navs.is-all-visible .cases-arrow {
  visibility: hidden;
  pointer-events: none;
}
.cases-arrow img {
  grid-area: 1 / 1;
  width: calc(20px * 236 / 40);
  height: auto;
  display: block;
  max-width: none;
  transition: opacity .35s ease;
}
.cases-arrow__hover {
  opacity: 0;
}
.cases-arrow--prev img { transform: scaleX(-1); }
.cases-arrow:hover { opacity: 1; }
.cases-arrow:hover:not(:disabled) .cases-arrow__idle {
  opacity: 0;
}
.cases-arrow:hover:not(:disabled) .cases-arrow__hover {
  opacity: 1;
}
.cases-arrow:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}
.cases-ctrl__num { display: none; }
.cases-dots,
.work-dots {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 20px;
}
.cases-dots button,
.work-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: rgba(52, 58, 64, 0.3);
  transition: background 0.35s ease, transform 0.35s ease;
}
.cases-dots button.is-active,
.work-dots button.is-active {
  background: var(--evergreen);
  transform: scale(1.15);
}

/* ============================================
   ケースモーダル
============================================ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  overflow: hidden;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 1.1s var(--reveal-ease), visibility 1.1s;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.8s var(--reveal-ease), visibility 0.8s;
}
.modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
.modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  background: #f7f5f1;
  padding: 48px 195px 40px;
  overflow: visible;
  transform: scale(0.985);
  transition: transform 1.15s var(--reveal-ease);
}
.modal.is-open .modal__panel,
.modal.is-closing .modal__panel {
  transform: none;
}
.modal.is-open .modal__panel {
  transition: transform 0.85s var(--reveal-ease);
}
.case-panel { overflow: hidden; }
#caseModal .case-panel {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: var(--case-panel-w, min(720px, calc(100vw - 48px)));
  height: var(--case-panel-h, auto);
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  transition: opacity 1.45s var(--reveal-ease);
}
#caseModal .case-panel.is-fading {
  opacity: 0;
  pointer-events: none;
  transition-duration: 0.4s;
}
#caseModal .case-panel__end {
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}
#caseModal .wish {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--case-wish-h, auto);
}
.case-panel__cut {
  position: absolute;
  top: 0; left: 0;
  width: min(260px, 46%);
  height: min(168px, 30%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  pointer-events: none;
}
.case-panel__cut img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal__close {
  position: absolute; 
  top: 40px; 
  right: 60px;
  width: 79px;
  padding: 0;
  line-height: 0;
  transition: opacity .3s ease;
}
.modal__close picture {
  display: block;
}
.modal__close img {
  width: 79px;
  height: auto;
  display: block;
}
.modal__close:hover { opacity: .5; }
.modal__navs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 36px auto 0;
}
.modal__num {
  font-family: "Lora", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px; 
  letter-spacing: .05em; 
  color: var(--evergreen); 
  text-align: center; 
}
.modal h2 { 
margin: 8px auto 24px; 
font-family: "Shippori Mincho", serif;
font-size: clamp(18px, 2.4vw, 30px); 
font-weight: 700; 
letter-spacing: 0; 
text-align: left; 
line-height: 34px; 
color: var(--evergreen);
}
.modal__body { font-size: clamp(16px, 2vw, 20px); line-height: 38px; letter-spacing: 0; color: var(--yamaneko-black); }
.modal__body p { margin: 0 0 1.2em; }
.case-emphasis,.modal__body strong {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 38px;
  letter-spacing: 0;
}
.wish {
  position: relative;
  background: var(--evergreen);
  color: var(--cream);
  padding: 27px 48px 40px;
  text-align: center;
  border-radius: 6px;
}
.wish__stars {
  position: absolute; top: 10px; left: 12px;
  width: 48px; mix-blend-mode: screen;
}
.wish__label { font-size: 16px; font-weight: 500; line-height: 34px; letter-spacing: 0.08em; margin-bottom: 12px; }
.wish p { margin: 0; font-size: clamp(17px, 2vw, 24px); font-weight: 500; line-height: 38px; letter-spacing: 0; }
.modal__mark { display: block; width: 72px; margin: 28px auto 0; }

/* ============================================
   物語（#story）手紙スクロール
   本文を常に出し、右レールでスクロールする
============================================ */
.acc-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  column-gap: 22px;
  align-items: stretch;
  margin-bottom: 100px;
}
.acc-shell::before,
.acc-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 36px;
  height: 88px;
  pointer-events: none;
  z-index: 1;
}
.acc-shell::before {
  top: 0;
  background: linear-gradient(180deg, #f7f5f1 12%, rgba(247, 245, 241, 0) 100%);
  opacity: 1;
  transition: opacity .35s ease;
}
.acc-shell.is-at-start::before {
  opacity: 0;
}
.acc-shell::after {
  bottom: 0;
  background: linear-gradient(180deg, rgba(247, 245, 241, 0) 0%, #f7f5f1 88%);
}
.acc {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 0;
  max-height: 725px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 8px 8px 72px 0;
  scrollbar-width: none;
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 42px;
}
.acc::-webkit-scrollbar { width: 0; height: 0; }
.acc-rail {
  position: relative;
  width: 14px;
  min-height: 0;
  cursor: pointer;
}
.acc-rail__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 6px;
  background: #fff;
}
.acc-rail__knob {
  position: absolute;
  top: 0;
  left: 12px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--evergreen);
  cursor: pointer;
}
.acc__panel {
  padding: 0 8px 1.8em 0;
}
.acc__panel:last-child { padding-bottom: 8px; }
.acc__panel strong,
.acc__panel b {
  font-size: clamp(17px, 2vw, 19px);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 700;
}
.acc__panel strong:not(.acc__heading) {
  font-size: clamp(17px, 2vw, 19px);
}
.acc__panel strong.acc__heading {
  display: inline;
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  color: var(--evergreen);
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.75;
  border-bottom: 4px solid #fff;
  padding-bottom: 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.acc__panel strong.acc__heading::before,
.acc__panel strong.acc__heading::after {
  content: "";
  display: block;
}
.acc__panel strong.acc__heading::before { margin-top: 1em; }
.acc__panel strong.acc__heading::after { margin-bottom: 0.7em; }
.acc__panel strong.acc__heading + br {
  display: none;
}

/* 物語イントロ（トラさんからの手紙） */
.story-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  width: min(680px, calc(100% - 50px));
  margin: 0 auto 28px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--evergreen);
}
.story-intro__title {
  margin: 0 0 20px;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 700;
  color: var(--evergreen);
  line-height: 1.52;
  letter-spacing: 0;
}
.story-intro__from {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 13px;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(14.4px, 2vw, 21px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 34px;
  color: var(--yamaneko-black);
}
.story-intro__from-text {
  min-width: 0;
}
.story-intro__ai { letter-spacing: 0.2em; }
.story-intro__feather {
  flex: 0 0 auto;
  display: block;
  width: 46.3px;
  height: 51px;
}
.story-intro__feather img {
  width: 100%;
  max-width: none;
  display: block;
}
.story-preamble {
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 500;
  line-height: 42px;
  letter-spacing: 0;
  margin: 0;
}
.story-end {
  --story-end-x: 0px;
  --story-end-y: -100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 8;
}
.story-end img {
  width: 284px;
  height: auto;
  display: block;
  position: relative;
  left: var(--story-end-x);
  top: var(--story-end-y);
  z-index: 1;
  pointer-events: none;
}

/* ============================================
   お問い合わせ（#contact）
============================================ */
.contact { width: calc(100% - 50px); margin: 0 auto; padding-bottom: 24px; text-align: center; }
.contact-note {
  box-sizing: border-box;
  width: min(760px, 100%);
  margin: 28px auto 0;
  padding: 28px 34px 32px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.05em;
  color: var(--yamaneko-black);
  text-align: center;
}
.contact-note__title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.08em;
}
.contact-note p {
  text-align: left;
  margin: 0;
}
/* フォーム（Contact Form 7） */
.form {
  position: relative;
  margin-top: 48px;
  text-align: left;
  overflow: visible;
}
.form__frame {
  position: relative;
  isolation: isolate;
  margin-right: 12px;
  margin-bottom: 12px;
  padding: 80px 65px 40px;
  border: 2px solid rgba(36, 33, 30, 0.5);
  background: rgba(255, 255, 255, 0.5);
  overflow: visible;
}
.form__frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-style: solid;
  border-color: transparent;
  border-width: 0 10px 11px 0;
  border-image-source: url("img/shadow.png");
  border-image-slice: 0 20 21 0 fill;
  border-image-repeat: stretch;
  pointer-events: none;
  opacity: 0.5;
}
.form__frame > * { position: relative; z-index: 1; }

.form__req {
  position: absolute;
  top: 30px;
  right: 24px;
  margin: 0;
  font-size: clamp(13px, 2vw, 15px);
}

.form .wpcf7,
.form .wpcf7-form {
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.04em;
  width: min(760px, 100%);
  margin: 60px auto 200px;
}
.form .wpcf7-form > br,
.form .wpcf7-form > p:empty,
.form .form__frame > br {
  display: none;
}
.form .form-group,
.form .form__frame > p:not(.form__req) {
  display: grid;
  grid-template-columns: 10.5em minmax(0, 1fr);
  gap: 0 20px;
  align-items: center;
  margin: 0 0 18px;
}
.form .form-group > p,
.form .form__frame > p:not(.form__req) > p {
  display: block;
  margin: 0;
  line-height: 1.7;
}
.form .form-group:has(.wpcf7-checkbox),
.form .form-group:has(textarea),
.form .form__frame > p:has(.wpcf7-checkbox),
.form .form__frame > p:has(textarea) {
  align-items: start;
  margin: 8px 0 24px;
}
.form .form-group:has(textarea),
.form .form__frame > p:has(textarea),
.form .form__frame > p:has(.wpcf7-checkbox) {
  grid-template-columns: 1fr;
}
.form .form-group:has(.wpcf7-checkbox) > p,
.form .form__frame > p:has(.wpcf7-checkbox) {
  margin: 0 0 3px;
}
.form .form-group:has(.wpcf7-checkbox) > p {
  grid-column: 1 / -1;
}
.form .form-group:has(.wpcf7-checkbox) .wpcf7-form-control-wrap {
  grid-column: 2;
}
.form__req-star {
  color: #FF383C;
  display: inline-block;
  margin-left: -0.1em;
  font-size: 1em;
  line-height: 1;
  vertical-align: super;
}
.form__req .form__req-star {
  margin-left: 0;
  margin-right: 2px;
  font-size: inherit;
  vertical-align: baseline;
}
.form .wpcf7-form-control-wrap {
  display: block;
  min-width: 0;
}
.form .wpcf7-form input[type="text"],
.form .wpcf7-form input[type="email"],
.form .wpcf7-form textarea {
  width: 100%;
  border: 1.5px solid var(--evergreen);
  border-radius: 4px;
  background: #fff;
  padding: 10px 14px;
  color: var(--yamaneko-black);
  font-size: 16px;
  letter-spacing: 0.04em;
}
.form .wpcf7-form input[type="text"],
.form .wpcf7-form input[type="email"] {
  height: 44px;
}
.form .wpcf7-form input:focus,
.form .wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--evergreen);
}
.form .wpcf7-form textarea {
  min-height: 140px;
  line-height: 1.9;
  resize: none;
  overflow: hidden;
}
.form .wpcf7-checkbox {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
}
.form .form__frame > p:has(.wpcf7-checkbox) .wpcf7-checkbox {
  margin-left: calc(10.5em + 20px);
}
.form .wpcf7-list-item,
.form .wpcf7-list-item label,
.form .wpcf7-list-item-label {
  color: var(--yamaneko-black);
  display: block;
  margin: 0;
}
.form .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 0;
  cursor: pointer;
  line-height: 1.7;
}
.form .wpcf7-form input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border: 1px solid var(--yamaneko-black);
  background: #fff;
  cursor: pointer;
}
.form .wpcf7-form input[type="checkbox"]:checked {
  background: var(--evergreen);
  border-color: var(--evergreen);
  box-shadow: inset 0 0 0 2px #fff;
}
.form .form-submit,
.form .wpcf7-form > p:has(> .wpcf7-submit) {
  position: relative;
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 40px 0 0;
}
.form-agree {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 50px 0 0;
}
.form-agree .wpcf7-form-control-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.form-agree label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  line-height: 1.7;
  text-align: left;
}
.form-agree a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}
.form-agree a:hover { opacity: 0.55; }
.form .form-agree input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border: 1px solid var(--yamaneko-black);
  background: #fff;
  cursor: pointer;
}
.form .form-agree input[type="checkbox"]:checked {
  background: var(--evergreen);
  border-color: var(--evergreen);
  box-shadow: inset 0 0 0 2px #fff;
}
.form .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 325.67px;
  height: 48px;
  padding: 0 36px;
  border: 1px solid var(--evergreen);
  border-radius: 999px;
  background: var(--evergreen);
  color: var(--cream);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 34px;
  cursor: pointer;
  transition: opacity .35s ease, transform .35s var(--ease);
}
.form .wpcf7-submit:hover {
  transform: scale(1.05);
}
.form .wpcf7-not-valid-tip {
  display: none !important;
}
.form .wpcf7-form .wpcf7-response-output {
  font-family: "Noto Sans JP", sans-serif;
  margin: 25px 0 0;
  padding: 0;
  border: none;
  text-align: center;
  font-size: clamp(14px, 2vw, 19px);
  line-height: 50px;
  letter-spacing: 0.05em;
  color: #FF383C;
}
.form .wpcf7-form.init .wpcf7-response-output,
.form .wpcf7-form.resetting .wpcf7-response-output,
.form .wpcf7-form.submitting .wpcf7-response-output {
  display: none;
}
.form .wpcf7-form.has-form-notice .wpcf7-response-output,
.form .wpcf7-form.is-multi-invalid .wpcf7-response-output,
.form .wpcf7-form.invalid .wpcf7-response-output,
.form .wpcf7-form.failed .wpcf7-response-output,
.form .wpcf7-form.aborted .wpcf7-response-output,
.form .wpcf7-form.unaccepted .wpcf7-response-output,
.form .wpcf7-form.spam .wpcf7-response-output {
  display: block;
  color: #FF383C;
  border: none;
}
.form .wpcf7-spinner {
  position: absolute;
  top: calc(50% - 12px);
  left: calc(50% + 174.835px);
  margin: 0;
}
.form .wpcf7-turnstile,
.form .cf-turnstile {
  margin: 16px 0 0;
}

/* ============================================
   フッター
============================================ */
.site-footer {
  margin-top: calc(-1 * var(--sheet-overlap));
  position: relative;
  z-index: 5;
  overflow: visible;
  box-shadow:
    0 100vh 0 0 var(--evergreen),
    0 100lvh 0 0 var(--evergreen);
}
.site-footer__bar::after {
  content: "";
  display: block;
  position: sticky;
  bottom: 0;
  height: 3px;
  margin-top: -3px;
  background-color: var(--evergreen);
  pointer-events: none;
}
.site-footer__hero {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 2880 / 1460;
  -webkit-clip-path: var(--cut-para);
  clip-path: var(--cut-para);
}
.site-footer__hero > .bg-window__scene {
  z-index: 0;
}
.site-footer__logo {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  width: 242px;
  mix-blend-mode: screen;
}
.site-footer__bar {
  position: relative;
  z-index: 1;
  background: var(--evergreen);
  color: var(--cream);
  margin-top: calc(-1 * var(--sheet-overlap));
  padding: calc(28px + var(--sheet-cut)) 40px calc(71px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px; letter-spacing: .14em;
  -webkit-clip-path: polygon(0 0, 100% calc(100vw * 0.034920755), 100% 100%, 0 100%);
  clip-path: polygon(0 0, 100% calc(100vw * 0.034920755), 100% 100%, 0 100%);
}
.site-footer__name {
  letter-spacing: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 42px;
  color: #F7F5F1;
}
.site-footer__links { display: flex; gap: 28px; justify-content: center; }
.site-footer__links a {
  transition: opacity .3s ease;
  font-size: clamp(9.8px, 2vw, 11px);
  line-height: 58.8px;
  letter-spacing: 0.1em;
  color: #F7F5F1;
  text-decoration: none;
 }
.site-footer__links a:hover { 
  text-decoration: 1px underline;
 }
.site-footer__copy {
  font-family: "Lora", sans-serif; 
  font-size: clamp(9px, 2vw, 11px);
  font-style: italic;
  letter-spacing: .1em; 
  line-height: 42px;
  opacity: .85; }

/* ============================================
   タブレット（〜1360px）
============================================ */
@media (max-width: 1360px) {
  .story-intro { grid-template-columns: minmax(0, 1fr) auto; }
  .modal__panel { padding: 48px 25px 36px; width: min(720px, 100%); }
  .site-footer__bar { grid-template-columns: 1fr; text-align: center; }
  .site-footer__copy { text-align: center; }
  .site-footer__links { justify-content: center; flex-wrap: wrap; }

  /* ナビ（タブレット〜スマホはハンバーガー） */
  .menu-toggle {
    display: flex;
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: 18px;
    z-index: 99;
  }
  .site-nav {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: auto;
    z-index: 90;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    --nav-move: 1.4s;
    --nav-fade: 1.3s;
  }
  .site-nav.is-open,
  .site-nav.is-closing {
    opacity: 1;
    visibility: visible;
  }
  .site-nav.is-open {
    pointer-events: auto;
  }
  .site-nav.is-closing {
    pointer-events: none;
  }
  .site-nav.is-shown:not(.is-open):not(.is-closing) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .site-nav__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 18, 0.28);
    cursor: pointer;
    opacity: 0;
  }
  .site-nav.is-open .site-nav__backdrop,
  .site-nav.is-closing .site-nav__backdrop {
    transition: opacity var(--nav-fade) var(--reveal-ease);
  }
  .site-nav.is-open .site-nav__backdrop {
    opacity: 1;
  }
  .site-nav.is-closing .site-nav__backdrop {
    opacity: 0;
  }
  .site-nav__panel {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(82vw, 360px);
    height: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--evergreen);
    color: var(--cream);
    justify-content: flex-start;
    padding: max(72px, env(safe-area-inset-top) + 16px) 40px max(20px, env(safe-area-inset-bottom));
    opacity: 0;
    transform: translateX(40px);
  }
  .site-nav.is-open .site-nav__panel,
  .site-nav.is-closing .site-nav__panel {
    transition: transform var(--nav-move) var(--reveal-ease), opacity var(--nav-fade) var(--reveal-ease);
  }
  .site-nav.is-open .site-nav__panel {
    opacity: 1;
    transform: none;
  }
  .site-nav.is-closing .site-nav__panel {
    opacity: 0;
    transform: translateX(40px);
  }
  .site-nav__logo {
    margin-bottom: clamp(8px, 2.2vh, 28px);
  }
  .site-nav__logo img {
    mix-blend-mode: screen;
  }
  .site-nav__logo,
  .site-nav__pc a {
    opacity: 0;
    transform: translateX(50%);
  }
  .site-nav.is-open .site-nav__logo,
  .site-nav.is-open .site-nav__pc a,
  .site-nav.is-closing .site-nav__logo,
  .site-nav.is-closing .site-nav__pc a {
    transition: transform var(--nav-move) var(--reveal-ease), opacity var(--nav-fade) var(--reveal-ease);
  }
  .site-nav.is-open .site-nav__logo,
  .site-nav.is-open .site-nav__pc a {
    opacity: 1;
    transform: none;
  }
  .site-nav.is-closing .site-nav__logo,
  .site-nav.is-closing .site-nav__pc a {
    opacity: 0;
    transform: translateX(50%);
  }
  .site-nav__pc {
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.2em;
    flex-shrink: 0;
  }
  .site-nav__pc a {
    height: clamp(28px, 5svh, 40px);
    padding: 0 12px;
    color: var(--cream);
    transition: background 0.35s ease, color 0.35s ease;
  }
  .site-nav.is-open .site-nav__pc a {
    transition: transform var(--nav-move) var(--reveal-ease), opacity var(--nav-fade) var(--reveal-ease), background 0.35s ease, color 0.35s ease;
  }
  .site-nav__pc a:hover,
  .site-nav__pc a:active {
    background: var(--cream);
    color: var(--evergreen);
    opacity: 1;
  }
  .site-nav .bgm-toggle {
    margin-top: clamp(8px, 2.2vh, 25px);
    margin-left: 12px;
    transform: translateX(50%);
  }
  .site-nav.is-open .bgm-toggle,
  .site-nav.is-closing .bgm-toggle {
    transition: transform var(--nav-move) var(--reveal-ease);
  }
  .site-nav.is-open .bgm-toggle {
    transform: none;
  }
  .site-nav.is-closing .bgm-toggle {
    transform: translateX(50%);
  }
  @media (hover: hover) {
    .site-nav.is-open .bgm-toggle:hover { opacity: 0.55; }
    .site-nav.is-open .bgm-toggle.is-on:hover { opacity: 1; }
  }
}

/* ============================================
   スマホ（〜768px）
============================================ */
@media (max-width: 768px) {
  :root { --side: 120px; }
  section.is-in {
    background-color: var(--bg-soft);
  }
  .inner--wide, .story-intro { width: calc(100% - 32px); }
  .inner--wide { line-height: 32px; }
  .inner--narrow { width: calc(100% - 69px); }
  .story-intro { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 23px; }
  .story-intro__copy { order: 2; }
  .story-intro .portrait-frame { order: 1; }
  .story-intro__from {
    position: relative;
    width: 100%;
    display: block;
    line-height: 28.8px;
    text-align: center;
  }
  .story-intro__from-text {
    display: block;
    text-align: center;
  }
  .story-intro__feather {
    position: absolute;
    right: 30px;
    bottom: 5px;
  }
  .portrait-frame { margin: 0 auto 8px; width: min(155px, 56vw); max-width: 155x; }

  /* FV: 780×325 のうち下 160 を窓にする。上は白 */
  .fv__bg {
    --fv-bg-h: calc(100vw * 160 / 780);
    --fv-img-h: calc(100vw * 325 / 780);
    aspect-ratio: auto;
    height: var(--fv-bg-h);
    background-color: #ffffff;
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 100vw * 0.034920755));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 100vw * 0.034920755));
  }
  .fv__bg picture {
    height: var(--fv-img-h);
  }
  html {
    background-image: url("img/sp/header.jpg");
    background-position: center top;
  }
  body::before {
    display: block;
  }
  .fv,
  .fv__content::before,
  .below-fv {
    background-image: url("img/sp/bg-texture-1.jpg");
    background-repeat: no-repeat;
    background-position: top center;
    background-color: var(--bg);
  }
  .fv,
  .below-fv { background-size: 100% auto; }
  .fv__content::before { background-size: 100% 100%; }
  .fv { padding: 0; }
  .fv__logo {
    width: 174.38px;
    height: 223.32px;
    margin-top: 119px;
  }
  .fv__kicker { line-height: 34px; letter-spacing: 0.1em; }
  .fv__line {
    width: 1px;
    flex: 1 1 auto;
    min-height: 110px;
    height: auto;
  }
  .fv__line::after {
    height: 0;
  }
  .fv__copy {
    font-size: clamp(25.88px, 5vw, 46px);
    letter-spacing: .14em;
    line-height: 2.15;
    margin-top: 145px;
  }
  .fv__copy-no { font-size: inherit; }
  .fv__copy-mo,
  .fv__copy-tte { letter-spacing: inherit; }

  /* PHILOSOPHY・紙面・帯写真 */
  .section--origin.bg-window {
    background: none;
  }
  .section--origin > .bg-window__scene {
    display: none;
  }
  .photo-slice--join.bg-window:not(.photo-slice--origin):not(.photo-slice--band) > .bg-window__scene {
    background-image: url("img/sp/divider-05.jpg");
  }
  .site-footer__hero > .bg-window__scene {
    background-image: url("img/sp/mountain.jpg");
  }
  .origin__band { display: none; }
  .origin__body { padding: 0; }
  .lead { text-align: left; line-height: 26px; letter-spacing: 0; }
  .lead--center {
    text-align: center;
    font-size: clamp(17px, 4vw, 19px);
    line-height: 30px;
    letter-spacing: .05em;
  }
  .ribbon { margin-bottom: 40px; }
  #cases .ribbon { margin-bottom: 15px; }
  #story .ribbon { margin-bottom: 25px; }
  .cases-note { margin: 0; }
  .modal__body { line-height: 31px; }
  .paper {
    margin-top: calc(-1 * var(--sheet-overlap));
    padding-top: 0;
  }
  .paper::before,
  .sheet::before {
    background-image: none;
    background-color: var(--bg-soft);
  }
  .photo-slice--join {
    margin-top: calc(-1 * var(--sheet-cut) - 8px);
    margin-bottom: calc(-1 * var(--sheet-cut) - 8px);
    aspect-ratio: 780 / 220;
  }
  .photo-slice--origin {
    display: block;
  }
  .photo-slice--band {
    display: block;
  }

  .section {
    padding: 70px 0 80px;
  }
  /* 仕事 */
  #approach .rail-wrap { width: 100%; }
  #approach .work-rail {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 25vw;
    width: 100%;
  }
  #approach .work-track {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: max-content;
  }
  #approach .work-items {
    display: flex;
    gap: 0;
    width: max-content;
    margin-left: 0;
    justify-content: flex-start;
  }
  #approach .work-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 56vw;
    width: 56vw;
    max-width: none;
  }
  .work-dots,
  #cases .cases-dots { display: flex; margin-top: 16px; }
  #approach .work-axis {
    width: calc(56vw * 4);
    max-width: none;
    margin: 0 0 16px;
    padding: 0 calc(40vw / 2);
    box-sizing: border-box;
  }

  /* ケーススタディ */
  #cases { --cases-left: 0px; }
  #cases .cases-track {
    margin-left: 0;
    width: 100%;
    --case-w: 78vw;
    --case-gap: 20px;
    --case-pad: calc((100vw - var(--case-w)) / 2);
    grid-auto-columns: var(--case-w);
    column-gap: var(--case-gap);
    padding: 32px var(--case-pad) 28px;
    scroll-padding-inline: var(--case-pad);
    box-sizing: border-box;
  }
  #cases .cases-ctrl {
    display: none;
  }
  .case-card {
    width: var(--case-w);
    max-width: var(--case-w);
    scroll-snap-align: center;
    box-sizing: border-box;
    padding: 0;
  }
  .case-card__frame {
    margin: 0 auto 12px;
  }
  .case-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 324 / 240;
  }
  .case-card__excerpt {
    line-height: 31px;
  }
  .modal__close {
    top: 15px;
    right: 20px;
    width: auto;
  }
  .modal__close img {
    width: 45px;
  }
  .case-panel__cut {
    width: min(260px, 32%);
    height: min(130px, 17%);
  }
  .modal__body strong {
    font-size: 16px;
  }
  #caseModal .wish {
    min-height: 0;
  }
  .wish {
    padding: 27px 30px 40px;
  }
  .wish p {
    line-height: 30px;
  }

  /* フォーム */
  .form {
    padding: 0;
    margin-top: 70px;
    margin-right: 0;
    margin-bottom: 0;
  }
  .form-agree {
    margin-top: 40px;
  }
  .form .form-submit {
    margin: 20px 0 0;
  }
  .form__frame {
    padding: 0;
    border: 0;
    background: transparent;
    margin-right: 0;
    margin-bottom: 0;
  }
  .form__frame::before { content: none; }
  .form .form-group,
  .form .form__frame > p:not(.form__req) {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    margin-bottom: 25px;
  }
  .form .wpcf7,
  .form .wpcf7-form {
    width: 100%;
    line-height: 0;
    letter-spacing: 0;
    margin: 24px auto 40px;
  }
  .form .wpcf7-submit {
    width: 246px;
  }
  .form .wpcf7-spinner {
    left: calc(50% + 135px);
  }

.form .wpcf7-form .wpcf7-response-output {
  margin: 0;
}
  .form__req { top: -10px; right: 14px; }
  .form .form-group:has(.wpcf7-checkbox) > p,
  .form .form-group:has(.wpcf7-checkbox) .wpcf7-form-control-wrap {
    grid-column: auto;
  }
  .form .form-group:has(.wpcf7-checkbox) > p,
  .form .form__frame > p:has(.wpcf7-checkbox) {
    letter-spacing: -0.05em;
    white-space: nowrap;
    line-height: 1.4;
  }
  .form .wpcf7-checkbox { width: auto; margin: 0 0 20px; gap: 20px; }
  .form .form__frame > p:has(.wpcf7-checkbox) .wpcf7-checkbox { margin-left: 0; }
  .contact-note {
    margin: 28px auto 0;
    padding: 20px;
  }
  .contact-note__title {
    font-size: 15px;
  }
  .form .form-group:has([data-name="your-name"]) > p,
  .form .form-group:has([data-name="text-729"]) > p {
    letter-spacing: 0.25em;
  }
  .form .form-group:has([data-name="your-message"]) > p {
    margin: 0;
  }

  /* フッター */
  .site-footer__hero {
    aspect-ratio: 780 / 820;
  }
  .site-footer__bar {
    padding: calc(24px + var(--sheet-cut)) 20px calc(74px + env(safe-area-inset-bottom, 0px));
  }
  .site-footer__logo {
    width: 116px;
  }

  /* 物語手紙スクロール */
  #story {
    padding-top: 70px;
  }
  .acc-shell,.acc {
    max-height: calc(100svh - 220px);
  }
  .acc-shell {
    min-height: 0;
    margin-top: 24px;
    column-gap: 10px;
  }
  .acc {
    min-height: 0;
    padding: 20px 0 80px;
    line-height: 32px;
  }
  .acc__panel {
    padding: 0 0 20px;
  }
  .acc-shell::before,
  .acc-shell::after {
    height: 56px;
  }
  .photo-slice--story {
    margin-top: 20px;
    aspect-ratio: 780 / 95;
  }
  .story-preamble {
    line-height: 32px;
  }
  .story-end {
    width: 207px;
    --story-end-y: -70px;
  }
}

@media (prefers-color-scheme: dark) {
  body::before,
  .fv__bg {
    background-color: #000000;
  }
}

/* ============================================
   動きを減らす
============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .fv__logo { opacity: 1; transform: none; }
  .fv__copy { opacity: 0; transform: none; }
  .fv__kicker { opacity: 1; transform: none; }
  .fv__line { opacity: 1; transform: scaleY(1); }
}
