/* ==========================================================================
   cluckoo.jp — 公園を歩くと、一日が過ぎる。
   画面は固定。スクロールで世界（公園）だけが横に動く。
   ========================================================================== */

:root {
  --world-vw: 1000;          /* 公園の長さ（vw） */
  --ground: 20vh;            /* 地面の線の高さ（画面下から） */
  --panel-bottom: 12vh;      /* 本文パネルの下端（地面の線から） */
  --bg: #FFFFFF;
  --bg-2: #F3F3F1;
  --ink: #111111;
  --ink-2: #4A4A4A;
  --mute: #6B6B67;
  --line: rgba(17, 17, 17, 0.14);
  --far: #CBCBC7;
  --white: #FFFFFF;
  --iri-1: #2F9E7A;
  --iri-2: #6E4FD1;
  --iri-3: #C94FA2;
  --iri: linear-gradient(100deg, var(--iri-1) 0%, var(--iri-2) 55%, var(--iri-3) 100%);
  --font-display: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  --font-body: 'BIZ UDPGothic', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
  --gutter: clamp(16px, 5vw, 72px);
  --maxw: 1440px;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-day: 1.8s;
}
/* 時刻ごとの色 */
:root[data-time="dusk"] { --bg: #E4E4E0; --bg-2: #DADAD6; --far: #B2B2AD; --mute: #5F5F5B; --line: rgba(17, 17, 17, 0.16); }
:root[data-time="night"] {
  --bg: #111111; --bg-2: #1B1B1A; --ink: #F2F2F0; --ink-2: #CFCFCA; --mute: #8F8F8A;
  --line: rgba(242, 242, 240, 0.18); --far: #2C2C2A;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'palt';
  transition: background-color var(--t-day), color var(--t-day);
}
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip; transition: background-color var(--t-day), color var(--t-day); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--iri-2); color: var(--white); }
:focus-visible { outline: 2px solid var(--iri-2); outline-offset: 4px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- 共通タイポ ---------- */
.label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--mute); }
.label::before {
  content: ''; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 13 L7 6 M7 6 L2 1.5 M7 6 L12 1.5 M7 6 L7 1' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M7 13 L7 6 M7 6 L2 1.5 M7 6 L12 1.5 M7 6 L7 1' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/></svg>") center / contain no-repeat;
}
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 44px); line-height: 1.25; letter-spacing: 0.02em; margin-top: 12px; }
.h2 .en { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 0.5em; letter-spacing: 0; color: var(--mute); margin-top: 0.1em; }
html.js [data-split] { opacity: 0; }
/* GSAP が読めない・JS が無効でも本文は見える */
html.no-gsap [data-split], html:not(.js) [data-split], html.no-gsap .panel, html:not(.js) .panel, html.no-gsap [data-hero] { opacity: 1 !important; transform: none !important; transition: none !important; }
.ch { display: inline-block; }
.lead { font-size: clamp(14px, 1.05vw, 16px); line-height: 2; color: var(--ink-2); max-width: 34em; margin-top: 16px; }
.tlink { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; padding-bottom: 4px; border-bottom: 1.5px solid var(--ink); }
.tlink i { font-style: normal; display: inline-block; transition: transform 0.35s var(--ease-out); }
.tlink:hover i { transform: translateX(5px); }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  padding: 13px 22px; border-radius: 999px;
  background: #111; color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; line-height: 1;
  overflow: hidden; isolation: isolate; transition: transform 0.35s var(--ease-out);
}
.btn::before { content: ''; position: absolute; inset: 0; background: var(--iri); transform: translateY(102%); transition: transform 0.5s var(--ease-out); z-index: -1; }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover { transform: translateY(-2px); }
.btn .arrow { width: 18px; height: 18px; transition: transform 0.4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- ローダー ---------- */
.loader { position: fixed; inset: 0; z-index: 1000; background: #fff; display: grid; place-items: center; }
.loader-inner { position: relative; width: clamp(200px, 24vw, 320px); }
.loader-mark { width: 100%; opacity: 0; }
.loader-call { position: absolute; left: 33.6%; top: -32.6%; width: 32.1%; opacity: 0; transform-origin: 10% 90%; }
html.no-gsap .loader { display: none; }

/* ---------- ナビ ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 500; height: var(--nav-h); display: flex; align-items: center; transition: background-color 0.4s; }
html.scrolled .nav { background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav .container { max-width: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: block; height: 52px; }
.nav-logo svg, .nav-logo img { height: 100%; width: auto; transition: filter var(--t-day); }
:root[data-time="night"] .nav-logo img { filter: invert(1); }
.nav-back { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; font-size: 14px; letter-spacing: 0.06em; padding: 6px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--iri); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease-out); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.sound-toggle { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; padding: 8px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.sound-toggle .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound-toggle .bars i { display: block; width: 2px; height: 4px; background: currentColor; border-radius: 1px; transition: height 0.3s; }
.sound-toggle[aria-pressed="true"] .bars i { animation: bars 0.8s ease-in-out infinite alternate; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: 0.15s; }
.sound-toggle[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bars { from { height: 3px; } to { height: 12px; } }
.nav-burger { display: none; width: 44px; height: 44px; position: relative; }
.nav-burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out), background 0.3s; }
.nav-burger span:nth-child(1) { top: 16px; }
.nav-burger span:nth-child(2) { top: 26px; }
html.menu-open .nav-burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
html.menu-open .nav-burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
html.menu-open .nav { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
html.menu-open .nav-logo img { filter: invert(1); }
html.menu-open .nav-burger span { background: #fff; }
.menu { position: fixed; inset: 0; z-index: 400; background: #111; color: #fff; display: grid; align-content: end; padding: var(--nav-h) var(--gutter) 48px; clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path 0.7s var(--ease-in-out), visibility 0s 0.7s; pointer-events: none; }
html.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.7s var(--ease-in-out), visibility 0s 0s; pointer-events: auto; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: flex; align-items: baseline; gap: 18px; font-family: var(--font-display); font-size: clamp(32px, 8.5vw, 60px); font-weight: 700; line-height: 1.35; letter-spacing: 0.02em; }
.menu a small { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.5); }
.menu .menu-foot { margin-top: 32px; font-family: var(--font-mono); font-size: 12px; color: rgba(255, 255, 255, 0.5); }

/* ---------- 舞台（固定） ---------- */
.stage { position: fixed; inset: 0; overflow: clip; z-index: 1; }
.scroller { position: relative; width: 1px; visibility: hidden; pointer-events: none; }
.snap-marks i { position: absolute; left: 0; top: 0; width: 1px; height: 1px; scroll-snap-align: start; }
@media (pointer: coarse) { html { scroll-snap-type: y mandatory; } } /* 指で離した位置から近い駅へ寄る */

.stars { position: absolute; inset: 0 0 50% 0; pointer-events: none; }
.stars span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity 2.4s; }
:root[data-time="night"] .stars span { opacity: var(--o, 0.7); animation: twinkle 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes twinkle { 0%, 100% { opacity: var(--o, 0.7); } 50% { opacity: calc(var(--o, 0.7) * 0.35); } }

.layer { position: absolute; left: 0; bottom: var(--ground); height: calc(100% - var(--ground)); width: 0; will-change: transform; }
.layer--far { z-index: 1; }
.layer--mid { z-index: 3; }
.layer--near { z-index: 4; pointer-events: none; }
.far-strip {
  position: absolute; left: 0; bottom: 0; width: 440vw; height: 24vh;
  background: var(--far);
  -webkit-mask: url(../assets/img/skyline.webp) left bottom / auto 100% repeat-x;
          mask: url(../assets/img/skyline.webp) left bottom / auto 100% repeat-x;
  transition: background-color var(--t-day);
}
.grass { position: absolute; bottom: -1px; width: 3.2vh; height: 1.6vh; color: var(--ink); opacity: 0.85; transition: color var(--t-day); }

.ground-line { position: absolute; left: 0; right: 0; bottom: var(--ground); height: 1.5px; background: var(--ink); z-index: 5; transition: background-color var(--t-day); }
#flock { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: calc(var(--ground) + 420px); z-index: 6; pointer-events: none; }

/* 公園の設備 */
.station { position: absolute; left: 0; bottom: 0; height: 100%; width: 0; }
.obj { position: absolute; left: calc(var(--x) * 1vw); bottom: 0; height: var(--h); color: var(--ink); transition: color var(--t-day), background-color var(--t-day); }
.obj.img {
  aspect-ratio: var(--ar);
  background: var(--ink);
  -webkit-mask: var(--img) center bottom / contain no-repeat;
          mask: var(--img) center bottom / contain no-repeat;
}
svg.obj { width: calc(var(--h) * var(--ar)); max-width: none; }
.gate { overflow: visible; }
.gate-text { fill: var(--bg); transition: fill var(--t-day); }
.gate--exit { transform: scaleX(-1); }
.gate--exit .gate-text { transform: scaleX(-1); transform-origin: 130px 0; }

.swing { cursor: pointer; }
.swing .seat { transform-box: view-box; }

.panda { cursor: pointer; transform-origin: 50% 100%; }

.clock-face { fill: var(--bg); transition: fill var(--t-day); }
.clock-hand { transform-origin: 40px 48px; transform-box: view-box; }
.lamp { aspect-ratio: 60 / 300; }
.lamp svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lamp-glow {
  position: absolute; left: 50%; top: 4.5%; width: 46vh; height: 46vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 252, 240, 0.55) 0%, rgba(255, 252, 240, 0.18) 28%, rgba(255, 252, 240, 0) 62%);
  opacity: 0; transition: opacity 2.6s; pointer-events: none;
}
:root[data-time="night"] .lamp-glow { opacity: 1; animation: lampflicker 7s ease-in-out infinite; }
/* 夜だけ: 街灯の蛾、植え込みの猫の目、夜明けの一瞬の光 */
.moth { position: absolute; left: 50%; top: 4.5%; width: 5px; height: 4px; margin: -2px 0 0 -2.5px; border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity 1.2s; }
:root[data-time="night"] .moth--1 { opacity: 0.9; animation: moth1 2.3s ease-in-out infinite; }
:root[data-time="night"] .moth--2 { opacity: 0.8; animation: moth2 3.1s ease-in-out infinite; }
@keyframes moth1 { 0% { transform: translate(-18px, -8px); } 25% { transform: translate(10px, -16px); } 50% { transform: translate(16px, 6px); } 75% { transform: translate(-8px, 12px); } 100% { transform: translate(-18px, -8px); } }
@keyframes moth2 { 0% { transform: translate(14px, 4px); } 30% { transform: translate(-12px, -12px); } 60% { transform: translate(-16px, 10px); } 100% { transform: translate(14px, 4px); } }
.cat-eyes { width: 16px; opacity: 0; transition: opacity 1.5s; }
.cat-eyes::before, .cat-eyes::after { content: ''; position: absolute; top: 0; width: 4px; height: 100%; border-radius: 50%; background: var(--ink); }
.cat-eyes::before { left: 0; } .cat-eyes::after { right: 0; }
:root[data-time="night"] .cat-eyes { opacity: 0.95; animation: catblink 6s ease-in-out infinite; }
@keyframes catblink { 0%, 86%, 100% { transform: scaleY(1); } 90%, 94% { transform: scaleY(0.08); } }
.stage::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--iri); opacity: 0; }
html.dawn-flash .stage::before { animation: dawnflash 1.4s ease-out; }
@keyframes dawnflash { 0% { opacity: 0; } 30% { opacity: 0.42; } 100% { opacity: 0; } }
@keyframes lampflicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.92; } 52% { opacity: 1; } 55% { opacity: 0.86; } 58% { opacity: 1; } }
.door { overflow: visible; cursor: pointer; }
.vending, .fountain { cursor: pointer; }
/* 扉の向こう: 白黒反転の「もうひとつの公園」 */
.door-inside {
  position: absolute; left: calc(var(--x) * 1vw + var(--h) * var(--ar) * 0.46); bottom: calc(var(--h) * 0.03);
  width: calc(var(--h) * var(--ar) * 0.21); height: calc(var(--h) * 0.84);
  overflow: hidden; background: var(--ink); opacity: 0; transition: opacity 0.7s, background-color var(--t-day); pointer-events: none;
}
.door-inside.is-open { opacity: 1; }
.door-inside img { position: absolute; bottom: 0; left: calc(-40% + var(--dx, 0) * -10px); height: 40%; width: auto; max-width: none; filter: invert(1); transform: scaleX(-1); transition: left 0.25s ease-out; }
:root[data-time="night"] .door-inside img { filter: none; }
.door-pigeon { position: absolute; left: 28%; top: 10%; width: 46%; transform: rotate(180deg); animation: doorwalk 7s ease-in-out infinite; }
.door-pigeon .pigeon { color: var(--bg); transition: color var(--t-day); }
@keyframes doorwalk { 0%, 100% { translate: 0 0; } 50% { translate: 40% 0; } }
.door-light {
  position: absolute; left: 46%; top: 14%; width: 70%; height: 86%;
  background: linear-gradient(90deg, rgba(255, 252, 240, 0.9), rgba(255, 252, 240, 0));
  clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 96%);
  filter: blur(5px);
  opacity: 0; transition: opacity 2s; pointer-events: none;
}
:root[data-time="night"] .door-light { opacity: 1; }

/* 本文パネル */
.panel {
  position: absolute; left: calc(var(--x) * 1vw); bottom: var(--panel-bottom);
  width: var(--pw); max-width: 680px;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.panel.is-in { opacity: 1; transform: none; }
.panel--message, .panel--about { max-width: 980px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4vw; align-items: start; }
.panel--message .message-text { margin-top: 0; }
.panel--about .about-table { margin-top: 0; }
.message-text { font-family: var(--font-display); font-weight: 600; font-size: clamp(15px, 1.3vw, 21px); line-height: 1.85; letter-spacing: 0.03em; margin-top: 22px; }
.message-text p { margin-bottom: 0.9em; }
.message-text p:last-child { margin-bottom: 0; }
.message-text .q { font-weight: 800; }
.message-text em { white-space: nowrap; } /* “ちょっとヘン” などの引用句を行の途中で切らない */
.message-text em { font-style: normal; background: var(--iri); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
:root[data-time="night"] .message-text em { background: linear-gradient(100deg, #4FD1A6, #9C86F2 55%, #E07AC9); -webkit-background-clip: text; background-clip: text; }
.devices { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.devices li { list-style: none; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }

/* ヒーロー（入口） */
.hero { position: absolute; left: 6vw; bottom: 23vh; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--mute); margin-bottom: 1.6vh; }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(46px, 8.8vw, 150px); line-height: 1.06; letter-spacing: 0.01em; }
.hero-title .line { display: block; white-space: nowrap; }
.period { position: relative; display: inline-block; }
.perch-period { position: absolute; width: 0.5em; left: 0; bottom: 0.33em; pointer-events: auto; cursor: pointer; }
.wobble { display: inline-block; padding-inline: 0.02em; cursor: pointer; }
.wobble:not(:has(.ch)), .wobble .ch { background: var(--iri); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.wobble .ch:nth-child(1) { background-position: 0% 0; }
.wobble .ch:nth-child(2) { background-position: 50% 0; }
.wobble .ch:nth-child(3) { background-position: 100% 0; }
.hero-foot { display: flex; align-items: flex-end; gap: 3vw; margin-top: 2.6vh; }
.hero-lead { font-size: 14.5px; line-height: 1.9; letter-spacing: 0.02em; color: var(--ink-2); max-width: 30em; }
.hero-links { display: flex; gap: 24px; padding-bottom: 6px; white-space: nowrap; }

/* 掲示板 */
.board { position: absolute; left: calc(var(--x) * 1vw); bottom: 0; display: flex; flex-direction: column; align-items: center; }
.board-roof { width: calc(100% + 36px); height: 12px; background: var(--ink); border-radius: 3px 3px 0 0; transition: background-color var(--t-day); }
.cards { display: flex; gap: 14px; padding: 14px; background: var(--ink); transition: background-color var(--t-day); }
.board-legs { width: 70%; height: 9vh; display: flex; justify-content: space-between; }
.board-legs i { display: block; width: 12px; height: 100%; background: var(--ink); transition: background-color var(--t-day); }
.peek {
  --mx: 50%; --my: 50%; --mr: 0px;
  position: relative; display: grid; width: 300px; min-height: 300px; border-radius: 6px;
  background: #F3F3F1; overflow: hidden; isolation: isolate;
  transition: transform 0.6s var(--ease-out);
}
.peek:hover { transform: translateY(-3px); }
.peek-alt {
  grid-area: 1 / 1; position: relative; background: #111;
  -webkit-mask: radial-gradient(circle var(--mr) at var(--mx) var(--my), #000 98%, transparent 100%);
          mask: radial-gradient(circle var(--mr) at var(--mx) var(--my), #000 98%, transparent 100%);
  overflow: hidden;
}
.peek-alt::before {
  content: ''; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 50% at 70% 30%, rgba(201, 79, 162, 0.6), transparent 70%),
    radial-gradient(40% 50% at 20% 80%, rgba(47, 158, 122, 0.55), transparent 70%),
    radial-gradient(50% 60% at 60% 70%, rgba(110, 79, 209, 0.6), transparent 70%);
  filter: blur(22px); animation: drift 10s ease-in-out infinite alternate;
}
.station:not(.is-in) .peek-alt::before { animation-play-state: paused; }
@keyframes drift { from { transform: translate(-3%, -2%) rotate(0deg); } to { transform: translate(3%, 2%) rotate(6deg); } }
.peek-alt img { position: absolute; right: -3%; bottom: -3%; width: 46%; height: auto; max-width: none; filter: invert(1); opacity: 0.55; }
.peek-alt img.wide { width: 54%; right: -5%; bottom: -8%; opacity: 0.42; }
.peek-body { grid-area: 1 / 1; position: relative; z-index: 2; padding: 24px 22px 20px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; mix-blend-mode: difference; }
.peek .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; }
.peek h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.45; letter-spacing: 0.02em; margin-top: 10px; }
.peek .desc { font-size: 13px; line-height: 1.85; margin-top: 10px; opacity: 0.8; }
.peek.is-hover .desc { opacity: 1; }
.peek-foot { position: relative; margin-top: 20px; min-height: 2.2em; }
.peek-foot span { display: block; transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.peek-foot .foot-base { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; opacity: 0.7; }
.peek-foot .foot-alt { position: absolute; left: 0; top: 0; font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.6; letter-spacing: 0.02em; opacity: 0; transform: translateY(8px); }
.peek.is-hover .foot-base { opacity: 0; transform: translateY(-6px); }
.peek.is-hover .foot-alt { opacity: 1; transform: none; transition-delay: 0.25s; }
.peek-tag { position: absolute; right: 18px; top: 20px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; padding: 5px 9px; border: 1px solid currentColor; border-radius: 999px; opacity: 0; transition: opacity 0.4s var(--ease-out) 0.2s; }
.peek.is-hover .peek-tag { opacity: 0.9; }

/* 会社概要（奥付風） */
.about-table { border-top: 1px solid var(--ink); margin: 18px 0 0; }
.about-row { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.about-row dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--mute); padding-top: 4px; }
.about-row dt span { display: block; font-family: var(--font-body); font-weight: 700; font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink); margin-top: 1px; }
.about-row dd { margin: 0; font-size: 14.5px; line-height: 1.8; }
.about-row dd a { border-bottom: 1px solid var(--line); }

/* お問い合わせ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 3vw; align-items: end; }
.form-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.panel--contact { max-width: 980px; bottom: 9vh; }
.contact-side .mail { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 16px; border-bottom: 1.5px solid var(--ink); }
.form-card {
  --ink: #111111; --ink-2: #4A4A4A; --mute: #6B6B67; --line: rgba(17, 17, 17, 0.14);
  position: relative; color: #111; background: #fff; border-radius: 18px; padding: clamp(16px, 2vw, 28px);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.14), 0 30px 60px -40px rgba(0, 0, 0, 0.5);
}
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; }
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label-text { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; }
.field label .req { color: var(--iri-3); margin-left: 4px; font-family: var(--font-mono); }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: #111; background: transparent; border: 0; border-bottom: 1.5px solid rgba(17, 17, 17, 0.14); padding: 5px 0; border-radius: 0; transition: border-color 0.3s; cursor: auto; }
.field textarea { resize: vertical; min-height: 44px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #111; }
.field select { -webkit-appearance: none; appearance: none; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%23111111' stroke-width='1.6'/></svg>") right center / 16px no-repeat; padding-right: 24px; }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radios label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.14); cursor: pointer; transition: box-shadow 0.3s, background 0.3s; }
.radios input { position: absolute; opacity: 0; width: 0; height: 0; }
.radios label:has(input:checked) { background: #111; color: #fff; box-shadow: inset 0 0 0 1px #111; }
.radios label:has(input:focus-visible) { outline: 2px solid var(--iri-2); outline-offset: 2px; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.form-foot small { font-size: 11.5px; color: #8A8A86; }
.form-foot small a { border-bottom: 1px solid rgba(17, 17, 17, 0.14); }
.form-status { grid-column: 1 / -1; font-size: 12.5px; color: var(--iri-2); }
.form-status:empty { display: none; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.carrier { position: absolute; left: calc(806 * 1vw + 3.7vh - 32px); bottom: calc(19vh - 3px); width: 64px; height: 52px; pointer-events: none; color: var(--ink); transition: color var(--t-day); }
.carrier .pigeon { position: absolute; left: 0; bottom: 0; width: 64px; }
.carrier .envelope { position: absolute; left: 0; top: 0; width: 40px; opacity: 0; }
.carrier.is-gone { opacity: 0; }
.form-thanks { text-align: center; padding: 16px 0 6px; }
.form-thanks .en { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: #8A8A86; }
.form-thanks h3 { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: 0.02em; margin-top: 10px; outline: none; }
.form-thanks p { margin-top: 12px; color: #4A4A4A; font-size: 14px; }
#contact-form.is-sent .form-grid { display: none; }

/* 出口（フッター） */
.panel--exit .wordmark { width: clamp(180px, 16vw, 260px); height: auto; transition: filter var(--t-day); }
:root[data-time="night"] .panel--exit .wordmark { filter: invert(1); }
.panel--exit .tagline { font-family: var(--font-display); font-size: clamp(18px, 1.8vw, 26px); font-weight: 700; letter-spacing: 0.02em; margin-top: 18px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; list-style: none; margin: 16px 0 0; padding: 0; font-size: 13px; }
.footer-links a { border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.footer-links a:hover { border-color: var(--ink); }
.footer-bottom { display: grid; gap: 4px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; color: var(--mute); letter-spacing: 0.02em; }
.footer-meta { font-variant-numeric: tabular-nums; }
.footer-meta .clock { color: var(--ink); }

/* HUD・ヒント */
.hud { position: absolute; left: var(--gutter); bottom: 16px; z-index: 7; display: flex; gap: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--mute); }
.hud-time { color: var(--ink); font-variant-numeric: tabular-nums; }
.scroll-hint { position: absolute; right: var(--gutter); bottom: 16px; z-index: 7; display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--mute); }
.scroll-hint i { position: relative; display: block; width: 40px; height: 1px; background: var(--line); overflow: hidden; }
.scroll-hint i::after { content: ''; position: absolute; inset: 0; background: var(--ink); animation: scrollline 1.8s var(--ease-in-out) infinite; }
@keyframes scrollline { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* 吹き出し・飛行・波紋・カーソル */
.coo-bubble { position: fixed; z-index: 600; transform: translate(-50%, -100%); background: #fff; color: #111; font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: 0.06em; padding: 7px 13px; border-radius: 999px; box-shadow: 0 0 0 1.5px #111; pointer-events: none; white-space: nowrap; transform-origin: 50% 100%; }
.coo-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 9px; height: 9px; background: #fff; border-bottom: 1.5px solid #111; border-right: 1.5px solid #111; transform: translateX(-50%) rotate(45deg); }
.flyer { position: fixed; z-index: 1001; width: 96px; pointer-events: none; color: var(--ink); }
.flyer .pigeon { width: 100%; }
.pigeon { color: var(--ink); width: 100%; height: auto; transition: color var(--t-day); }
.ripple-ring { position: fixed; z-index: 900; width: 420px; height: 420px; border-radius: 50%; will-change: transform, opacity; background: conic-gradient(from 0deg, var(--iri-1), var(--iri-2), var(--iri-3), var(--iri-1)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px)); pointer-events: none; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label { cursor: none; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 950; pointer-events: none; opacity: 0; mix-blend-mode: difference; }
html.has-cursor.cursor-in .cursor-dot, html.has-cursor.cursor-in .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #fff; rotate: var(--tilt, 0deg); transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), margin 0.3s var(--ease-out), background 0.3s, box-shadow 0.3s, opacity 0.3s, rotate 0.25s var(--ease-out); }
.cursor-ring.is-link { width: 56px; height: 56px; margin: -28px 0 0 -28px; box-shadow: inset 0 0 0 1.5px transparent; background: rgba(255, 255, 255, 0.35); }
.cursor-ring.is-feed {
  width: 30px; height: 30px; margin: -15px 0 0 -15px; box-shadow: none; mix-blend-mode: normal; border-radius: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'><path d='M3 12C3 6.5 7.5 3.2 11 5.6C12.2 2.6 15.8 2.6 17 5.6C20.5 3.2 25 6.5 25 12V22Q25 25 22 25H6Q3 25 3 22Z' fill='white' stroke='%23111111' stroke-width='1.8' stroke-linejoin='round'/><path d='M6 13C6 9.5 9 7.5 11.5 9C12.5 7 15.5 7 16.5 9C19 7.5 22 9.5 22 13V21Q22 22.5 20.5 22.5H7.5Q6 22.5 6 21Z' fill='none' stroke='%23111111' stroke-width='1.2' opacity='0.45'/><circle cx='11' cy='16' r='1.15' fill='%23111111'/><circle cx='17' cy='16' r='1.15' fill='%23111111'/><path d='M12.6 18.4Q14 19.9 15.4 18.4' fill='none' stroke='%23111111' stroke-width='1.2' stroke-linecap='round'/><ellipse cx='9.2' cy='18.4' rx='1.7' ry='1' fill='rgba(201,79,162,0.32)'/><ellipse cx='18.8' cy='18.4' rx='1.7' ry='1' fill='rgba(201,79,162,0.32)'/></svg>") center / contain no-repeat;
}
.cursor-ring.is-text { opacity: 0; }
.cursor-ring.is-grab { width: 48px; height: 48px; margin: -24px 0 0 -24px; box-shadow: inset 0 0 0 2px #fff; background: transparent; mix-blend-mode: difference; border-radius: 50%; }

/* ---------- 下層ページ ---------- */
.page { position: relative; z-index: 2; padding-top: calc(var(--nav-h) + 8vh); padding-bottom: 120px; }
.page .prose { max-width: 44em; margin-top: 48px; }
.page .prose h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em; margin: 40px 0 12px; }
.page .prose p, .page .prose li { font-size: 15px; line-height: 2; color: var(--ink-2); }
.page .prose ul { padding-left: 1.3em; }
.footer { position: relative; padding: 40px 0 32px; }
.footer .footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; border-top: 0; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1024px) {
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 12px; }
  .panel--message, .panel--about { grid-template-columns: 1fr; gap: 10px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .contact-side .lead { display: none; }
  .panel--contact { width: 70vw; }
}
@media (max-width: 768px) {
  :root { --nav-h: 64px; --ground: 14vh; --panel-bottom: 12vh; } /* 本文の下端は地面の線から 12vh 上（鳩の頭より上） */
  .nav-links, .nav-right .sound-toggle .sound-label { display: none; }
  .nav-burger { display: block; }
  .nav-logo { height: 40px; }
  .hide-sm { display: none; }
  #flock { height: calc(var(--ground) + 320px); }
  .hero { left: 6vw !important; bottom: 34vh; }
  .hero-title { font-size: clamp(40px, 12.5vw, 84px); }
  .hero-foot { display: flex; margin-top: 14px; }
  .hero-links { display: none; }
  .hero-lead { font-size: 13.5px; line-height: 1.8; max-width: 86vw; }
  .tree { --h: 12vh !important; }
  .swing { --h: 12vh !important; } /* 本文の最終行に骨組みが重ならない高さ */
  .panel--product { bottom: calc(var(--panel-bottom) + 40px); } /* 鳴き声の吹き出しとも重ねない */
  .devices { gap: 2px 12px; margin-top: 10px; } /* タグは 1 行の小さな文字に */
  .devices li { padding: 0; box-shadow: none; font-size: 11px; letter-spacing: 0.06em; color: var(--mute); }
  .panel--news { bottom: calc(var(--panel-bottom) + 40px); }
  .panel--exit { bottom: calc(var(--panel-bottom) + 50px); }
  .fountain { --h: 9vh !important; }
  .gate--exit { --h: 12vh !important; }
  .panel--exit { left: calc(907 * 1vw); width: 86vw; }
  .about-row dt { font-size: 0; }
  .about-row dt span { font-size: 12px; margin-top: 0; }
  .about-row { padding: 5px 0; }
  .panel { width: 86vw; }
  /* 止まり位置（駅の data-anchor）から 7vw に本文の左端を揃え、右端のはみ出しを防ぐ */
  .panel--message { left: calc(157 * 1vw); }
  .panel--about { left: calc(534 * 1vw); width: 80vw; }
  .panel--news { left: calc(707 * 1vw); width: 74vw; } /* 街灯の右側に */
  .lamp { --h: 40vh !important; }
  .panel--contact { left: calc(807 * 1vw); }
  .park-clock { --x: 518 !important; --h: 24vh !important; }
  .h2 { font-size: clamp(24px, 7vw, 34px); }
  .message-text { font-size: 16px; line-height: 1.8; margin-top: 14px; }
  .lead { font-size: 13.5px; margin-top: 10px; }
  .about-row { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; }
  .about-row dd { font-size: 13.5px; }
  .board-legs { height: 6vh; }
  .panel--contact { width: 86vw; bottom: 9vh; } /* 送信ボタンの行が鳩の頭に触れず、見出しがナビに潜らない高さ */
  .about-row { padding: 6px 0; }
  .about-row dd { font-size: 13px; line-height: 1.6; }
  /* 掲示板は画面幅いっぱいにして、カードは横に指でめくる（止まり位置 400vw で 1 枚目が丸ごと見える） */
  .board { left: calc(407 * 1vw); width: 86vw; }
  .board-roof { width: calc(100% + 24px); }
  .cards { width: 100%; box-sizing: border-box; flex-direction: column; }
  .cards { gap: 8px; padding: 8px; }
  .peek { flex: none; width: 100%; min-height: 0; }
  .peek-body { padding: 12px 14px 10px; }
  .peek h3 { font-size: 15px; margin-top: 4px; line-height: 1.4; }
  .peek h3 br { display: none; }
  .peek .desc { font-size: 12.5px; line-height: 1.6; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .peek-foot { margin-top: 8px; min-height: 1.6em; }
  .peek-foot .foot-alt { font-size: 12px; }
  .peek-tag { display: none; }
  .contact-side .mail { display: none; }
  .contact-side .h2 { font-size: 22px; }
  .contact-grid { gap: 8px; }
  .form-foot small { font-size: 10.5px; }
  .form-foot .btn { margin-left: auto; } /* 折り返したときも送信ボタンは右端に */
  .form-card { padding: 14px; border-radius: 14px; }
  .form-grid { gap: 6px 14px; }
  .field textarea { min-height: 36px; }
  .panel--exit { width: 86vw; }
  .hud { gap: 10px; font-size: 10px; }
  .hud-place { display: none; }
}

@media (pointer: coarse) {
  /* iOS は 16px 未満の入力欄でズームする */
  .field input, .field select, .field textarea { font-size: 16px; }
}
@media (max-width: 768px) {
  /* 動く世界の上の backdrop-filter はモバイルで重い */
  html.scrolled .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint i::after, .peek-alt::before, .sound-toggle .bars i, .stars span, .lamp-glow, .moth, .cat-eyes, .stage::before, .door-pigeon { animation: none; }
  .btn, .btn::before, .peek, .panel { transition: none; }
}

/* 画面の高さが足りないとき（Safari のバーが出ている状態・小さい iPhone）: 長い本文をナビに潜らせない */
@media (max-width: 768px) and (max-height: 830px) {
  .panel--about { bottom: 60px; }
  .panel--about .h2 { font-size: 26px; }
  .panel--about .en { display: none; }
  .about-row { padding: 4px 0; }
  .about-row dd { font-size: 12.5px; }
  .panel--contact { bottom: 60px; }
  .contact-side { display: none; }
  .form-card { padding: 10px; }
  .form-grid { gap: 2px 10px; }
  .field input, .field select { padding: 3px 0; }
  .field textarea { min-height: 24px; }
  .form-foot { margin-top: 0; }
  .btn { padding: 9px 14px; }
}
@media (max-width: 768px) and (max-height: 700px) {
  .panel--message { bottom: 60px; }
  .message-text { font-size: 15px; line-height: 1.7; }
  .message-text p { margin-bottom: 0.6em; }
  .board-legs { height: 7vh; }
  .cards { gap: 6px; }
  .peek-body { padding: 10px 12px 8px; }
  .peek .desc { -webkit-line-clamp: 1; }
  .peek-foot { margin-top: 6px; min-height: 1.2em; }
}
