/* Soto Phone
   色は紙・墨・朱の3つだけ。書体は明朝（見出し）、ゴシック（本文）、Inter Tight（ロゴと数字）の3つだけ。 */
:root {
  color-scheme: light;
  --bg: #f4f2ec;
  --paper-ink: #1f1e1c;
  --paper-dim: rgba(31, 30, 28, .72);
  --paper-line: rgba(31, 30, 28, .16);
  --accent: #a94c2f;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --latin: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--paper-ink);
  font-family: var(--sans); font-weight: 400; line-height: 2; letter-spacing: .04em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
br.pc { display: inline; }
/* キーボードで操作したときに、今どこにいるかが見えるようにする */
:focus-visible { outline: 2px solid var(--paper-ink); outline-offset: 3px; border-radius: 2px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--paper-ink); color: #fff; font-size: 14px; }
.skip:focus { top: 12px; }
br.sp { display: none; }

/* ---------- ナビ ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 48px);
  transition: background .4s, padding .4s, box-shadow .4s;
}
.nav.is-scrolled { background: rgba(244, 242, 236, .86); backdrop-filter: blur(10px); padding-top: 14px; padding-bottom: 14px; box-shadow: 0 1px 0 var(--paper-line); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%;
  font-family: var(--serif); font-size: 17px;
}
.logo-word { font-family: var(--latin); font-weight: 500; letter-spacing: .32em; font-size: 14px; }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 14px; align-items: center; }
.nav-links a { opacity: .78; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-links .lang { font-size: 13px; letter-spacing: .08em; }
.nav-cta { border: 1px solid currentColor; padding: 6px 16px; border-radius: 999px; opacity: 1 !important; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 999px;
  background: var(--paper-ink); color: var(--bg); font-size: 14px; font-weight: 500; letter-spacing: .12em;
  transition: transform .25s, opacity .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--paper-ink); outline-offset: 3px; }

/* ---------- セクションの共通 ---------- */
.panel { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding: 120px clamp(16px, 6vw, 96px) 48px; }
.hero-copy { position: relative; }
.sec { padding: clamp(110px, 16vh, 180px) 0; }
.sec + .sec { border-top: 1px solid var(--paper-line); }
.wrap { --gutter: clamp(20px, 6vw, 96px); width: min(100% - var(--gutter) * 2, 1120px); margin-inline: auto; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow { font-family: var(--latin); font-weight: 500; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--paper-dim); margin-bottom: 26px; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.45; letter-spacing: .06em; text-wrap: balance; word-break: auto-phrase; }
h2 { font-size: clamp(30px, 4.4vw, 56px); margin-bottom: 36px; }
h2 .nw { white-space: nowrap; }
.split h2 { font-size: clamp(28px, 3.6vw, 48px); }
.body { font-size: clamp(15px, 1.3vw, 17px); max-width: 36em; margin-bottom: 18px; }
.lead { font-family: var(--serif); font-size: clamp(19px, 2vw, 26px); line-height: 1.8; }
.note { font-size: 13px; color: var(--paper-dim); max-width: 40em; margin-top: 28px; }
.source { font-size: 12px; color: var(--paper-dim); margin-top: 18px; }

/* ---------- 2. はじまり ---------- */
/* 数字と言葉は中央に。絵は絵本のように、絵の下に一行ずつ */
#problem .wrap:first-child { text-align: center; display: flex; flex-direction: column; align-items: center; }
.stat { display: flex; align-items: baseline; justify-content: center; gap: .12em; line-height: 1; margin-bottom: 28px; }
.stat-n { font-family: var(--latin); font-weight: 800; font-size: clamp(110px, 18vw, 240px); letter-spacing: -.04em; }
.stat-u { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 48px); }
.scenes-drawn { display: flex; flex-direction: column; align-items: center; gap: clamp(80px, 13vh, 150px); margin-top: clamp(110px, 16vh, 170px); }
.drawn { display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 3vh, 36px); width: 100%; text-align: center; }
.drawn > figure { width: min(100%, 520px); }
.drawn > .swipe-art { width: min(100%, 420px); }
.drawn figure { margin: 0; }
.drawn-art img, .room-art > img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.drawn-line { word-break: auto-phrase; text-wrap: pretty; font-family: var(--serif); font-size: clamp(19px, 2vw, 26px); line-height: 2; }
.drawn-line .nw { white-space: nowrap; }
.turn { margin: clamp(100px, 16vh, 170px) 0 0; font-size: clamp(30px, 4.6vw, 60px); }

/* データから物語へのつなぎ */
.year { margin-top: clamp(90px, 14vh, 150px); }
.year.reveal { opacity: 1; transform: none; }
.year-lead { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); letter-spacing: .1em; margin-bottom: 34px; }
.year-lead b { font-weight: 600; }
.year-dots { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; justify-content: center; }
.year-dots i { width: 9px; height: 9px; border-radius: 2px; background: rgba(31, 30, 28, .1); }
.year-dots i.on { transition: background .5s ease; transition-delay: calc(var(--k) * 45ms + .3s); }
.year.is-in .year-dots i.on { background: var(--paper-ink); }
.year-cap { font-size: 13px; color: var(--paper-dim); margin-top: 22px; max-width: 34em; }
.bridge { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 28px); letter-spacing: .14em; margin-top: clamp(80px, 12vh, 130px); opacity: 0; transform: translateY(12px); transition: opacity 1.4s ease 2.4s, transform 1.4s ease 2.4s; }
.year.is-in .bridge { opacity: 1; transform: none; }
.year + .scenes-drawn { margin-top: clamp(70px, 10vh, 110px); }

/* 終わりのないフィードをスワイプし続ける絵 */
.swipe-art { position: relative; width: 100%; max-width: 640px; justify-self: center; }
.swipe-art > img { width: 100%; height: auto; display: block; }
/* スマホの画面（絵の中の位置に合わせた割合） */
.swipe-screen { position: absolute; left: 40.2%; top: 35.9%; width: 16.3%; height: 27.1%; overflow: hidden; }
.swipe-feed { display: block; width: 100%; height: auto; animation: feed 6.4s infinite; }
.swipe-feed path, .swipe-feed circle { fill: none; stroke: var(--paper-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.swipe-feed text { font-family: var(--sans); font-size: 8px; fill: var(--paper-ink); }
@keyframes feed {
  0%, 10% { transform: translateY(0); animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  15.5%, 35% { transform: translateY(-12.5%); animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  40.5%, 60% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  65.5%, 85% { transform: translateY(-37.5%); animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  90.5%, 100% { transform: translateY(-50%); }
}
/* 指：フィードが動くたびに下から上へ */
.swipe-thumb { position: absolute; left: 50.5%; top: 52%; width: 5.5%; overflow: visible; animation: thumb 1.6s infinite; opacity: 0; }
.swipe-thumb path { fill: #ecebe6; stroke: var(--paper-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes thumb {
  0%, 28% { opacity: 0; transform: translateY(30%); }
  36% { opacity: 1; transform: translateY(30%); }
  40% { transform: translateY(30%); animation-timing-function: cubic-bezier(.3, .6, .3, 1); }
  62% { opacity: 1; transform: translateY(-55%); }
  74%, 100% { opacity: 0; transform: translateY(-60%); }
}
.swipe-art > img { mix-blend-mode: multiply; }

/* 朝から夜までの部屋（絵の中だけがゆっくり動き続ける） */
.room-art { position: relative; }
/* 暗くなるのは家の中だけ（壁の線に沿った形で切り抜く） */
.room-dark {
  position: absolute; inset: 0; pointer-events: none;
  clip-path: polygon(16.6% 17%, 77.3% 15%, 84.4% 95%, 21% 94%, 17% 90%);
}
.room-window { position: absolute; left: 47%; top: 27%; width: 19%; overflow: visible; pointer-events: none; }
.rw-sky { fill: #f3f2ed; }
.rw-frame { fill: none; stroke: var(--paper-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rw-sun circle, .rw-sun path { fill: none; stroke: var(--paper-ink); stroke-width: 2.2; stroke-linecap: round; }
.rw-night { opacity: 0; }
.rw-night circle, .rw-moon { fill: #ecebe6; }

/* ---------- 背景：上は紙、Soto Phone からは水彩。絵はゆっくり動き、線の絵が重なる ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.bg-layer.is-active { opacity: 1; }
.bg-move { position: absolute; inset: -6% -4%; transform: translateY(var(--py, 0px)); transition: transform .2s linear; }
.bg-move > img, .bg-move > .ov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-layer.is-active .bg-move > img, .bg-layer.is-active .bg-move > .ov { animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1.6%, -1%); } }
.ov path, .ov ellipse, .ov circle { fill: none; }
/* 雲：ゆっくり横に流れる */
.cl { fill: rgba(255, 255, 255, .42) !important; filter: blur(18px); }
.c1 { animation: cloud 46s linear infinite; }
.c2 { animation: cloud 64s linear infinite reverse; }
@keyframes cloud { from { transform: translateX(-160px); } 50% { transform: translateX(160px); } to { transform: translateX(-160px); } }
/* 川：水面の光が流れていく */
.fl { stroke: rgba(255, 255, 255, .6); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 26 120; animation: flow 5.5s linear infinite; }
.f2 { stroke-dasharray: 14 170; animation-duration: 7s; animation-delay: -2s; stroke-width: 5; }
.f3 { stroke-dasharray: 34 200; animation-duration: 8.5s; animation-delay: -4s; stroke: rgba(255, 255, 255, .4); }
@keyframes flow { to { stroke-dashoffset: -292; } }
/* 温泉：湯気がゆらぎながら立ちのぼる */
.st { stroke: rgba(60, 56, 50, .55); stroke-width: 3; stroke-linecap: round; opacity: 0; animation: steam 6s ease-in-out infinite; }
.s2 { animation-delay: -2s; } .s3 { animation-delay: -4s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(40px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120px); } }
/* 夕日：光がふくらみ、水面がきらめき、鳥が渡っていく */
.glow { fill: rgba(255, 170, 120, .32) !important; filter: blur(30px); animation: glow 6s ease-in-out infinite alternate; transform-origin: 962px 672px; }
@keyframes glow { from { opacity: .5; transform: scale(.9); } to { opacity: 1; transform: scale(1.08); } }
.gl { stroke: rgba(255, 236, 200, .9); stroke-width: 3; stroke-linecap: round; opacity: 0; animation: glint 4s ease-in-out infinite; }
.g2 { animation-delay: -1s; } .g3 { animation-delay: -2.2s; } .g4 { animation-delay: -3.1s; }
@keyframes glint { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.bd { stroke: rgba(50, 46, 42, .75); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.b1 { animation: fly 34s linear infinite; }
.b2 { animation: fly 42s linear infinite; animation-delay: -18s; }
@keyframes fly { from { transform: translate(-80px, 320px); } to { transform: translate(2000px, 200px); } }

/* 色がついてからのセクション：水彩の上に、紙を一枚のせて読みやすく */
.on-color { padding: clamp(70px, 12vh, 140px) 0; }
.sec.on-color + .sec.on-color, .day-panel + .sec, .sec + .day-panel { border-top: 0; }
.card { background: rgba(244, 242, 236, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 10px; padding: clamp(36px, 6vw, 80px); box-shadow: 0 20px 60px rgba(31, 30, 28, .08); }
.card.center { text-align: center; }
.day-panel { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; justify-content: center; padding: 0 20px clamp(80px, 16vh, 160px); }
.day-cap { word-break: auto-phrase; text-wrap: balance; font-family: var(--serif); font-size: clamp(24px, 3.4vw, 44px); line-height: 1.6; text-align: center; letter-spacing: .08em; padding: .5em 1.2em; border-radius: 10px; background: rgba(244, 242, 236, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.day-cap .day-time { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .4em; color: var(--paper-dim); }

/* ---------- 白黒から色へ：黄色が紙からふわっと広がる（スクロールで進む） ---------- */
.ink-scene { position: relative; height: 340vh; }
.ink-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; padding: 0 20px; }
.ink-text { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.2em; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 28px); line-height: 2; will-change: opacity, filter; }
.drawn-box { padding: .5em 1.4em; border: 1.5px solid var(--paper-ink); border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px; }
.ink-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ink-svg circle, .ink-svg path { fill: #f3d77a; }
.ink-core circle { fill: url(#ink-grad); }
.ink-halo { opacity: .28; }
/* 落ちる一滴と飛び散る粒は描かない（滴が血に見えるという声があったため） */
.ink-drop, .ink-splash { display: none; }
.ink-line { position: absolute; left: 0; right: 0; top: 50%; text-align: center; display: flex; flex-direction: column; gap: 12px; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); letter-spacing: .12em; opacity: 0; }
.ink-line2 { font-weight: 600; }

/* ---------- 5. 機能：絵で見せる ---------- */
.inout-h { font-size: 12px; letter-spacing: .3em; color: var(--paper-dim); margin: 8px 0 18px; }
.icons { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 22px 12px; margin-bottom: 36px; }
.icons li { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; text-align: center; }
.icons svg { width: 52px; height: 52px; fill: none; stroke: var(--paper-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icons.out li { color: var(--paper-dim); position: relative; }
.icons.out svg { stroke: rgba(31, 30, 28, .38); }
/* 入っていないものには、絵の上に一本線 */
.icons.out li::after { content: ""; position: absolute; top: 26px; left: 50%; width: 64px; height: 1.8px; background: var(--accent); transform: translate(-50%, -50%) rotate(-35deg); border-radius: 2px; }

/* ---------- 6. ポイント：流れの絵 ---------- */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); margin: 8px 0 40px; counter-reset: f; }
.flow li { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.flow li + li::before { content: "→"; position: absolute; left: calc(-1 * clamp(16px, 3vw, 40px) / 2); top: 44px; transform: translateX(-50%); color: var(--paper-dim); font-size: 18px; }
.flow figure { margin: 0 0 6px; background: rgba(255, 255, 255, .55); border-radius: 8px; padding: 10px; }
.flow svg { display: block; width: 100%; height: auto; fill: none; stroke: var(--paper-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow .step-n { font-family: var(--latin); font-weight: 500; font-size: 13px; letter-spacing: .2em; color: var(--accent); }
.flow strong { font-family: var(--serif); font-weight: 400; font-size: clamp(18px, 1.6vw, 21px); }
.flow .step-b { font-size: 14px; color: var(--paper-dim); }
.flow .step-b b { color: var(--accent); font-weight: 500; }
.calc { font-family: var(--serif); font-size: clamp(16px, 1.5vw, 19px); letter-spacing: .06em; text-align: center; padding: 16px 20px; border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); margin: 0 0 32px; }
.calc b { color: var(--accent); font-weight: 600; }
.calc .nw { white-space: nowrap; }
.why { background: rgba(255, 255, 255, .55); border-radius: 8px; padding: 20px 24px; margin-bottom: 20px; font-size: 15px; line-height: 1.9; }
.why-q { font-family: var(--serif); font-size: 17px; margin-bottom: 6px; }

/* ---------- 7. 先行体験 ---------- */
#trial .body { margin-bottom: 36px; }

/* ---------- 8. 手紙 ---------- */
.letter { max-width: 680px; }
.letter-body { font-family: var(--serif); font-size: clamp(17px, 1.6vw, 19px); line-height: 2.2; display: flex; flex-direction: column; gap: 1.4em; }
.sign { margin-top: 40px; font-family: var(--serif); font-size: 15px; color: var(--paper-dim); }

/* ---------- 9. 先行予約 ---------- */
.reserve-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 14px; max-width: 620px; margin-top: 12px; align-items: end; }
.reserve-form .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; letter-spacing: .2em; color: var(--paper-dim); }
.reserve-form select, .reserve-form input[type=email] {
  width: 100%; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--paper-line);
  background: rgba(255, 255, 255, .6); color: var(--paper-ink); font: inherit; font-size: 15px;
}
.reserve-form select { appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--paper-ink) 50%), linear-gradient(135deg, var(--paper-ink) 50%, transparent 50%);
  background-position: right 22px center, right 16px center; background-size: 6px 6px; background-repeat: no-repeat; }
.reserve-form input:focus, .reserve-form select:focus { outline: none; border-color: var(--paper-ink); }
.check-field { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; padding-bottom: 12px; }
.check-field input { width: 18px; height: 18px; accent-color: var(--paper-ink); }
.reserve-form .btn { grid-column: 1 / -1; justify-self: start; border: 0; cursor: pointer; }
.reserve-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.form-fine { grid-column: 1 / -1; font-size: 12px; color: var(--paper-dim); }
.form-msg { margin-top: 16px; font-size: 14px; min-height: 1.5em; color: var(--paper-dim); }

/* ---------- フッター ---------- */
.footer { border-top: 1px solid var(--paper-line); padding: 72px 0 48px; font-size: 14px; color: var(--paper-dim); }
.footer-logo { display: flex; align-items: center; gap: 12px; font-family: var(--serif); color: var(--paper-ink); font-size: 18px; margin-bottom: 12px; }
.footer .small { font-size: 12px; margin-top: 12px; }
.footer .small a, .footer-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-size: 13px; }

/* ---------- プライバシーポリシー・利用規約 ---------- */
.legal-page { background: var(--bg); }
.legal { padding: 140px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: .06em; margin-bottom: 8px; }
.legal-date { font-size: 13px; color: var(--paper-dim); margin-bottom: 32px; }
.legal h2 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 44px 0 12px; scroll-margin-top: 90px; }
.legal h3 { font-size: 15px; font-weight: 500; margin: 20px 0 8px; }
.legal p, .legal li { font-size: 15px; line-height: 1.95; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 1.3em; margin: 8px 0; }
.legal li + li { margin-top: 4px; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal-back { margin-top: 56px; }

/* ---------- 表示アニメーション ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.is-in { opacity: 1; transform: none; }
/* 絵と写真は一枚ずつ目に入るように：まず絵がぼかしから浮かび上がり、少し遅れて言葉が出る */
.drawn.reveal { opacity: 1; transform: none; transition: none; }
.drawn > figure {
  opacity: 0; transform: translateY(48px) scale(.96); filter: blur(8px);
  transition: opacity 1.5s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1), filter 1.5s ease;
}
.drawn > .drawn-line {
  opacity: 0; transform: translateY(14px);
  transition: opacity 1.2s ease .6s, transform 1.2s ease .6s;
}
.drawn.is-in > figure, .drawn.is-in > .drawn-line { opacity: 1; transform: none; filter: none; }

/* ---------- スマホ ---------- */
@media (max-width: 820px) {
  .nav-links a:not(.nav-cta):not(.lang) { display: none; }
  .inout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .split { flex-direction: column; align-items: stretch; }
  .reserve-form { grid-template-columns: 1fr; }
  .year-dots { gap: 2px; }
  .year-dots i { width: 4px; height: 4px; border-radius: 1px; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow strong { font-size: 16px; letter-spacing: .02em; }
  .why { padding: 18px 18px; }
  .why-q { font-size: 16px; }
  .flow li + li::before { display: none; }
  .icons { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 6px; }
  .icons li { font-size: 12px; }
  .day-cap { font-size: 21px; }
  br.pc { display: none; }
  br.sp { display: inline; }
}
/* ---------- 最初の訪問：通知の嵐 → 扉が開いて、静かな画面へ ---------- */
html.intro-pending, html.intro-pending body { background: #141413; overflow: hidden; }
html.intro-pending body > :not(.intro) { visibility: hidden; }
html.intro-pending .hero-door *, html.intro-pending .hero-door { animation-play-state: paused !important; }
.intro {
  position: fixed; inset: 0; z-index: 200; overflow: hidden; background: #141413; color: #f4f2ec;
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
  font-family: var(--sans); -webkit-tap-highlight-color: transparent;
}
.intro.is-out { opacity: 0; transition: opacity .45s ease; }
.intro-clock { margin-top: clamp(56px, 11vh, 110px); text-align: center; opacity: 0; animation: intro-in .6s ease forwards; }
.intro-date { font-size: 14px; letter-spacing: .12em; color: rgba(244, 242, 236, .7); }
.intro-time { font-family: var(--latin); font-weight: 500; font-size: clamp(64px, 14vw, 104px); line-height: 1.05; letter-spacing: -.01em; }
.intro-list { width: min(92vw, 380px); margin-top: clamp(22px, 4vh, 40px); display: flex; flex-direction: column; gap: 8px; }
.intro-n {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 12px; align-items: center;
  padding: 11px 14px; border-radius: 16px; background: rgba(244, 242, 236, .1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: intro-drop .32s cubic-bezier(.2, .8, .2, 1);
  transition: transform .9s cubic-bezier(.5, 0, .9, .4), opacity .7s ease;
}
.intro-n i { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; background: var(--c, #6b6a66); }
.intro-n b { font-weight: 500; font-size: 13px; color: rgba(244, 242, 236, .75); }
.intro-n em { font-style: normal; font-size: 12px; color: rgba(244, 242, 236, .5); }
.intro-n span { grid-column: 2 / 4; font-size: 14px; line-height: 1.45; }
.intro-skip {
  position: absolute; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); padding: 10px 14px;
  font-size: 12px; letter-spacing: .14em; color: rgba(244, 242, 236, .6); background: none; border: 0; cursor: pointer; font-family: inherit;
}
/* 扉：真ん中に小さく現れ、開いて、光が画面いっぱいに広がる */
.intro-door {
  position: absolute; left: 50%; top: 54%; width: 84px; height: 140px; margin: -70px 0 0 -42px;
  border-radius: 42px 42px 3px 3px; z-index: 2; background: #f4f2ec; opacity: 0; transform: scale(.6);
  box-shadow: 0 0 90px 24px rgba(244, 242, 236, .22);
  transition: opacity .3s ease, transform .3s ease;
  perspective: 300px;
}
.intro-door::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: #2f5f8c;
  transform-origin: 0 50%; transition: transform .55s cubic-bezier(.6, .02, .3, 1);
}
.intro.is-door .intro-door { opacity: 1; transform: scale(1); }
.intro.is-open .intro-door::before { transform: rotateY(-78deg); }
.intro.is-through .intro-door { transform: scale(40); transition: transform .8s cubic-bezier(.7, 0, .84, 0); }
.intro.is-through .intro-door::before { opacity: 0; transition: opacity .2s ease; }
.intro-list { transition: filter .5s ease, opacity .5s ease; }
.intro.is-door .intro-list { opacity: .28; filter: blur(3px); }
.intro.is-through .intro-n { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) rotate(var(--fr, 0deg)); }
.intro.is-through .intro-clock { opacity: 0; transition: opacity .4s ease; }
@keyframes intro-in { to { opacity: 1; } }
@keyframes intro-drop { from { opacity: 0; transform: translateY(-14px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .year-dots i.on { background: var(--paper-ink); transition: none; }
  .bridge { opacity: 1; transform: none; transition: none; }
  .drawn > * { opacity: 1; transform: none; filter: none; transition: none; }
  .bg-move > img, .bg-move > .ov, .ov * { animation: none !important; }
  .ink-scene { height: auto; }
  .ink-stage { position: relative; height: auto; display: flex; flex-direction: column; gap: 32px; padding-block: 120px; }
  .ink-svg { display: none; }
  .ink-line { position: static; opacity: 1; }
  .swipe-feed, .swipe-thumb { animation: none; }
}

/* ---------- 1枚目：SOTO の最後の O が、外へ出る扉になっている ---------- */
/* 扉の位置は Inter Tight 800 の「O」の内側の穴に合わせた値（1em あたり：穴の左 0.212、右 0.547、上 0.583） */
.hero-door {
  justify-content: space-between; align-items: center; text-align: center;
  padding-top: clamp(96px, 14vh, 140px); padding-bottom: clamp(28px, 5vh, 56px);
  overflow: hidden;
}
.hd-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.hd-eyebrow {
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .46em; text-transform: uppercase;
  color: var(--paper-dim); margin-bottom: clamp(18px, 3vh, 30px);
}
.hd-motto {
  font-family: var(--latin); font-weight: 500;
  font-size: clamp(12px, .95vw, 14px); line-height: 1.2; letter-spacing: .2em; color: #3f6b45;
}
.hero-door .hd-copy {
  font-family: var(--serif); font-weight: 400; font-size: clamp(17px, 1.5vw, 21px);
  letter-spacing: .22em; line-height: 1.6; margin: .35em 0 0 .22em; color: var(--paper-ink);
}
/* SOTO の下、登録欄の上に置くメッセージ */
.hd-message { text-align: center; margin-bottom: clamp(20px, 3.4vh, 32px); }

.hd-mark {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  margin-top: clamp(14px, 3vh, 36px); padding-bottom: clamp(36px, 8vh, 96px);
}
.hd-word {
  position: relative; z-index: 0; display: inline-block;
  font-family: var(--latin); font-weight: 800;
  font-size: clamp(72px, 16vw, 236px); line-height: 1; letter-spacing: -.035em; color: var(--paper-ink);
}
.hd-o { position: relative; }
/* 高さゼロの目印を「O」の左端・ベースラインに置き、扉と床をそこから配置する */
.hd-anchor { position: relative; display: inline-block; width: 0; height: 0; vertical-align: baseline; }
/* 床（文字が立つ一本の線） */
.hd-anchor::before {
  content: ""; position: absolute; z-index: -1; top: .012em; left: -100vw; width: 200vw; height: 1px;
  background: var(--paper-line); font-size: inherit;
}
.hd-door {
  position: absolute; z-index: 2; left: .2295em; bottom: -.012em; width: .3em; height: .585em;
  border-radius: .15em .15em 0 0; overflow: hidden;
}
/* 扉の向こう：サイトの他の絵と同じ水彩の景色。最初は淡く、開くと色が戻る */
.hd-view {
  position: absolute; inset: 0;
  background: #c9d2d3 url(images/w5-mountain.jpg) 50% 40% / auto 210% no-repeat;
  filter: grayscale(1) contrast(.85) brightness(1.08);
  animation: hd-color 2.6s ease-out 1.5s forwards;
}
/* 枠と敷居は描かない（文字と同じ、平らな面だけで見せる） */
.hd-frame, .hd-step { display: none; }
/* 扉の板：飾りのない一枚の面。色はコピーと同じ朱。左の蝶番を軸に、こちら側へ開く */
.hd-leaf {
  position: absolute; z-index: 3; left: .2295em; bottom: -.012em; width: .3em; height: .585em;
  border-radius: .15em .15em 0 0; transform-origin: 0 50%;
  transform: perspective(1.7em) rotateY(0deg);
  background: #2f5f8c;
  animation: hd-open 2.2s cubic-bezier(.6, .02, .2, 1) .9s forwards;
}
.hd-knob {
  position: absolute; right: 12%; top: 58%; width: .024em; height: .024em; border-radius: 50%;
  background: #f6f4ef;
}
/* 開いた扉から床にこぼれる光：ぼかさず、紙を切り抜いたような一枚の形 */
.hd-spill {
  position: absolute; z-index: -1; left: .2295em; top: .012em; width: .42em; height: .17em;
  background: rgba(255, 252, 244, .5);
  clip-path: polygon(24% 0, 71.4% 0, 100% 100%, 36% 100%);
  opacity: 0; animation: hd-spill 1.6s ease-out 1.8s forwards;
}
/* 松の丘：キャッチコピーと SOTO のあいだ。日本画の黒松が並び、すやり霞がゆっくり流れる。どちらの文字にもかからない */
.hd-grove { width: 100vw; margin: clamp(4px, 1.5vh, 16px) calc(50% - 50vw) 0; height: clamp(80px, 15vh, 170px); pointer-events: none; }
.hd-grove svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pn-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: pn-sway 9s ease-in-out infinite alternate; }
.pn.far .pn-sway { animation-name: pn-sway-far; }
@keyframes pn-sway { from { transform: rotate(-1.1deg); } to { transform: rotate(1.1deg); } }
@keyframes pn-sway-far { from { transform: rotate(-.5deg); } to { transform: rotate(.5deg); } }
.kasumi { animation: kasumi 26s ease-in-out infinite alternate; }
.k2, .k4 { animation-duration: 32s; animation-direction: alternate-reverse; }
.k5 { animation-duration: 22s; }
@keyframes kasumi { from { transform: translateX(-28px); } to { transform: translateX(28px); } }
.hd-phone {
  font-family: var(--latin); font-weight: 500;
  font-size: clamp(20px, 2.3vw, 36px); line-height: 1; margin-left: .45em; color: var(--paper-ink);
}
@keyframes hd-open { to { transform: perspective(1.7em) rotateY(-70deg); } }
@keyframes hd-color { to { filter: grayscale(0) contrast(1) brightness(1.02); } }
@keyframes hd-spill { to { opacity: 1; } }

.hd-foot {
  width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.hd-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(100%, 420px); }
.hd-form {
  display: flex; width: 100%; padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--paper-line);
  transition: border-color .2s, box-shadow .2s;
}
.hd-form:focus-within { border-color: var(--paper-ink); box-shadow: 0 0 0 4px rgba(31, 30, 28, .08); }
.hd-form input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 18px;
  font: inherit; font-size: 14px; letter-spacing: .04em; color: var(--paper-ink); outline: none;
}
.hd-form input::placeholder { color: rgba(31, 30, 28, .45); }
.hero-door .hd-form .btn { border: 0; cursor: pointer; white-space: nowrap; padding: 10px 20px; font-size: 13px; }
.hero-door .hd-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.hd-fine { font-size: 11px; letter-spacing: .06em; color: var(--paper-dim); }
.hd-fine a, .form-fine a, .check-field a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hd-msg { font-size: 14px; letter-spacing: .06em; color: var(--paper-ink); min-height: 0; }
.hd-msg:empty { display: none; }

@media (max-width: 760px) {
  .hd-mark { padding-bottom: 72px; }
  .hd-word { font-size: 25vw; }
  .hd-phone { margin-left: .25em; font-size: 18px; }
  .hero-door .hd-copy { letter-spacing: .14em; margin-left: .14em; font-size: 17px; }
  .hd-form input { padding: 0 12px; font-size: 14px; }
  .hero-door .hd-form .btn { padding: 11px 16px; font-size: 13px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  .hd-leaf { animation: none; transform: perspective(1.7em) rotateY(-70deg); }
  .hd-view { animation: none; filter: none; }
  .hd-spill { animation: none; opacity: 1; }
  .pn-sway, .kasumi { animation: none; }
  .intro-n, .intro-clock { animation: none; opacity: 1; }
  .intro-door, .intro-door::before, .intro.is-through .intro-door { transform: none !important; transition: opacity .4s ease; }
  .intro.is-through .intro-n { transform: none; }
}
