/* =========================================================
   君と、月まで。
   ========================================================= */
:root {
  --bg: #070b22;
  --navy: #0a1031;
  --navy-2: #141c4f;
  --ink: #f3efe4;
  --ink-dim: rgba(243, 239, 228, .64);
  --line: #94acff;
  --line-dim: rgba(148, 172, 255, .45);
  --cobalt: #3d6fe0;
  --pen: #2f2b45;       /* イラストの線の色 */
  --gold: #e8d39c;
  --silver: #dfe1ea;

  --f-display: 'Bodoni Moda', 'Times New Roman', serif;
  --f-jp: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --f-lbl: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-round: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;   /* 読ませる文（丸ゴシック） */

  --gl: 22px;           /* 左の余白 */
  --gr: 52px;           /* 右の余白（ロケットのレール分） */
  --col: 560px;         /* 本文の最大幅 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html.is-locked, html.is-locked body { overflow: hidden; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-jp);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.lbl {
  font-family: var(--f-lbl);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--line);
}

/* ---------- 4方向のキラ星 ---------- */
.spark { fill: var(--ink); display: block; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); } 50% { opacity: .55; transform: scale(.78) rotate(8deg); } }

/* =========================================================
   固定の背景
   ========================================================= */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 110%, #16205a 0%, rgba(22, 32, 90, 0) 60%),
    radial-gradient(90% 60% at 10% -10%, #121a4d 0%, rgba(18, 26, 77, 0) 60%),
    var(--bg);
}
.nebula { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.nebula--a { width: 90vw; height: 90vw; left: -30vw; top: 20vh; background: radial-gradient(circle, rgba(61, 111, 224, .38), rgba(61, 111, 224, 0) 70%); }
.nebula--b { width: 80vw; height: 80vw; right: -30vw; top: 60vh; background: radial-gradient(circle, rgba(150, 120, 220, .26), rgba(150, 120, 220, 0) 70%); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.planet { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; will-change: transform; }
.planet canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; opacity: 0; transition: opacity 1.2s ease; }
.planet canvas.is-ready { opacity: 1; }

.earth__glow { position: absolute; inset: -4%; border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 160, 255, 0) 60%, rgba(120, 160, 255, .26) 66%, rgba(120, 160, 255, 0) 73%); }
.earth::before { /* テクスチャ生成中の仮の地球 */
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5c8ff0, #23448f 55%, #0c1540 80%);
}
.earth__orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.earth__orbit ellipse { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .8; }
.earth__sat { fill: var(--gold); }

.moon::before { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e9eaf1, #a6aabb 60%, #5c6078 95%); }
.moon canvas#moonL { display: none; }
.moon.use-large canvas#moonL { display: block; }
.moon.use-large canvas#moonS { display: none; }

/* ---------- ロケット ---------- */
.rocket { position: fixed; left: 0; top: 0; width: 60px; height: 180px; z-index: 0; /* 本文の後ろ＝背景を飛ぶ */ pointer-events: none;
  transform-origin: 50% 85.667%; will-change: transform; --flame: 0; --legs: 1; }
.rocket svg { width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 55%; transform: rotate(var(--ang, 0deg)); }
.rk-flame { transform-origin: 50px 251px; transform: scaleY(var(--flame)) scaleX(calc(.55 + var(--flame) * .45)); opacity: min(1, calc(var(--flame) * 3)); }
.rk-leg--l { transform-origin: 32.5px 233px; transform: rotate(calc(var(--legs) * -119deg)); }
.rk-leg--r { transform-origin: 67.5px 233px; transform: rotate(calc(var(--legs) * 119deg)); }
.rk-flame__o { transform-box: fill-box; transform-origin: 50% 0; animation: flick .12s ease-in-out infinite alternate; }
.rk-flame__i { transform-box: fill-box; transform-origin: 50% 0; animation: flick .09s ease-in-out infinite alternate-reverse; }
@keyframes flick { from { transform: scaleY(.86); } to { transform: scaleY(1.08); } }

/* ---------- 煙・砂ぼこり ---------- */
.puffs { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 0; pointer-events: none; }
.puffs i { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 40% 35%, #fff, #cfd3e2 60%, rgba(207, 211, 226, 0) 72%); }
.is-launching .puffs--smoke i { animation: puff 2.4s cubic-bezier(.15, .7, .3, 1) forwards; }
.puffs i:nth-child(odd) { --dx: -1; } .puffs i:nth-child(even) { --dx: 1; }
.puffs i:nth-child(1), .puffs i:nth-child(2) { --s: 1.7; --x: 22px; animation-delay: 0s !important; }
.puffs i:nth-child(3), .puffs i:nth-child(4) { --s: 2.4; --x: 46px; animation-delay: .1s !important; }
.puffs i:nth-child(5), .puffs i:nth-child(6) { --s: 3.1; --x: 74px; animation-delay: .2s !important; }
.puffs i:nth-child(7), .puffs i:nth-child(8) { --s: 2.2; --x: 104px; animation-delay: .32s !important; }
@keyframes puff {
  0% { opacity: 0; transform: translate(0, 0) scale(.2); }
  15% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(var(--dx) * var(--x)), -14px) scale(var(--s)); }
}
.puffs--dust i { background: radial-gradient(circle at 40% 35%, #f2f3f7, #b7bbcb 60%, rgba(183, 187, 203, 0) 72%); }
.is-landed .puffs--dust i { animation: puff 2.6s cubic-bezier(.1, .7, .3, 1) forwards; }

/* ---------- 月面のふたり（？）たち ---------- */
.crew { position: absolute; inset: 0; }
.flag, .astro-final { position: absolute; left: 0; top: 0; }
.flag { width: 46px; transform-origin: 10% 98%; opacity: 0; }
.flag svg { display: block; width: 100%; height: auto; }
.is-landed .flag { animation: flagUp 1s 3.1s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes flagUp { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }

.astro-final { opacity: 0; transition: opacity .6s; }
.is-landed .astro-final { opacity: 1; transition-delay: .9s; }
.astro-walk { width: 100%; height: 100%; }
.is-landed .astro-walk { animation: hopIn 2.4s .9s cubic-bezier(.4, 0, .3, 1) both; }
@keyframes hopIn {
  0% { transform: translateX(var(--from-x)) translateY(0); }
  12% { transform: translateX(calc(var(--from-x) * .86)) translateY(-14px); }
  25% { transform: translateX(calc(var(--from-x) * .72)) translateY(0); }
  38% { transform: translateX(calc(var(--from-x) * .56)) translateY(-14px); }
  50% { transform: translateX(calc(var(--from-x) * .4)) translateY(0); }
  63% { transform: translateX(calc(var(--from-x) * .25)) translateY(-14px); }
  76% { transform: translateX(calc(var(--from-x) * .1)) translateY(0); }
  88% { transform: translateX(0) translateY(-6px); }
  100% { transform: translateX(0) translateY(0); }
}

/* ---------- 宇宙飛行士 ---------- */
.astro { display: block; width: 100%; height: 100%; overflow: visible; }
/* 肩・股関節を軸に回す（SVG 200x260 の座標） */
.astro .arm--l { transform-origin: 58px 146px; }
.astro .arm--r { transform-origin: 142px 146px; }
.astro .leg--l { transform-origin: 85px 198px; }
.astro .leg--r { transform-origin: 115px 198px; }
.astro--stand .arm--l { transform: rotate(14deg); }
.astro--stand .arm--r { transform: rotate(-150deg); animation: wave 1.5s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(-150deg); } 50% { transform: rotate(-118deg); } }
.astro--float .arm--l { transform: rotate(48deg); }
.astro--float .arm--r { transform: rotate(-62deg); }
.astro--float .leg--l { transform: rotate(16deg); }
.astro--float .leg--r { transform: rotate(-20deg); }
/* ときどきまばたき */
.astro-eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 4.2s infinite; }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.12); } }

/* ---------- 粒子感（参考サイトのざらっとした質感） ---------- */
.grain { position: fixed; inset: -50%; z-index: 9; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(5) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-1%, 3%); } 80% { transform: translate(3%, 1%); } }

/* ---------- 上部バー ---------- */
.topbar { position: fixed; z-index: 5; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 10px; opacity: 0; pointer-events: none;
  background: linear-gradient(rgba(7, 11, 34, .85), rgba(7, 11, 34, 0)); }
.topbar .lbl { font-size: 10px; }
.topbar__km b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.topbar__mid { position: absolute; left: 50%; transform: translateX(-50%); color: var(--gold); }

/* =========================================================
   本文
   ========================================================= */
main { position: relative; z-index: 1; }
section { position: relative; }

.rv { opacity: 0; transform: translateY(18px); transition: opacity 1s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), transform 1.1s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.is-in .rv, .rv.is-in { opacity: 1; transform: none; }

/* ---------- 1. HERO ---------- */
.hero { height: 100vh; height: 100svh; min-height: 560px; padding: calc(env(safe-area-inset-top) + 14px) var(--gl) 0; overflow: hidden; }
.hero__top { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line-dim); }
.hero__top .lbl:last-child { color: var(--gold); }
.hero__dates { display: flex; align-items: center; gap: 8px; margin-top: min(4.5vh, 30px); }
.pill { border: 1px solid var(--line); border-radius: 99px; padding: 3px 14px 2px; font-size: 10.5px; letter-spacing: .1em; color: var(--ink); }
.hero__dash { flex: 0 0 34px; height: 1px; background: var(--line); }

.hero__mark { position: relative; margin-top: min(2.5vh, 18px); line-height: .82; max-width: var(--col); }
.hero__num { display: block; font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(84px, min(29vw, 15.5vh), 190px); letter-spacing: -.035em; color: var(--ink); margin-left: -.04em; }
.hero__days { display: block; text-align: right; font-family: var(--f-display); font-style: italic; font-size: clamp(36px, min(12vw, 6.6vh), 80px);
  color: var(--gold); margin-top: -.18em; padding-right: 6%; }
.hero__spark { position: absolute; width: clamp(22px, 7vw, 40px); left: 46%; bottom: 2%; fill: var(--gold); }

.hero__jp { margin-top: min(4vh, 30px); font-weight: 500; font-size: clamp(22px, min(6.9vw, 3.7vh), 34px); line-height: 1.55; letter-spacing: .06em; }
.hero__sub { margin-top: min(1.6vh, 12px); font-size: clamp(13px, 3.8vw, 16px); letter-spacing: .16em; color: var(--gold); }

.launch { position: relative; z-index: 2; margin-top: min(3.4vh, 26px); display: flex; align-items: center; gap: 12px; transition: opacity .6s; }
.launch__txt { font-size: 14px; letter-spacing: .18em; }
.launch__arrow { position: relative; width: 1px; height: 26px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.launch__arrow::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold); animation: hintDown 1.6s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes hintDown { to { top: 100%; } }
.launch__lbl { font-size: 9.5px; }
.is-launching .launch { opacity: 0; }

.hero__astro { position: absolute; width: min(clamp(70px, 21vw, 110px), 12vh); aspect-ratio: 200 / 260; left: 9%; bottom: calc(21vh + 4px); pointer-events: none; animation: drift 7s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(-14deg); } 50% { transform: translate(6px, -12px) rotate(-4deg); } }
.hero .s1 { position: absolute; pointer-events: none; width: 14px; right: 30%; top: 30%; animation-delay: -1s; }
.hero .s2 { position: absolute; pointer-events: none; width: 9px; left: 64%; bottom: 33vh; fill: var(--gold); animation-delay: -2s; }

/* ---------- DEPARTURE ---------- */
.departure { min-height: 100vh; padding: 22vh var(--gr) 16vh var(--gl); overflow: hidden; }
.departure__rings { position: absolute; left: 50%; top: 8vh; width: min(80vw, 420px); height: 84%; transform: translateX(-50%); opacity: .5; }
.departure__rings ellipse { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.departure__lbl { position: relative; }
.departure__type { position: relative; margin-top: 18px; font-family: var(--f-lbl); font-weight: 500; font-size: clamp(40px, 13.4vw, 84px); line-height: .98; letter-spacing: -.02em; color: var(--line); max-width: var(--col); }
.departure__type span { display: block; }
.departure__type .r { text-align: right; }
.departure__type .c { text-align: center; color: var(--ink); font-family: var(--f-display); font-style: italic; font-weight: 400; padding: .1em 0; }
.departure__type .spark.inline { display: inline-block; width: .5em; margin-right: .2em; vertical-align: .05em; fill: var(--gold); }
.departure__jp { position: relative; margin-top: 7vh; font-size: 16px; letter-spacing: .14em; line-height: 2; }
.departure__meta { position: relative; margin-top: 16px; display: flex; gap: 20px; }
.departure__meta b { font-weight: 500; color: var(--ink); }

/* ---------- 2. 思い出 ---------- */
.journey { padding: 6vh var(--gr) 10vh var(--gl); }
.memory { position: relative; padding: 9vh 0 11vh; max-width: var(--col); margin: 0 auto; }
.memory__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.memory__date { font-family: var(--f-display); font-weight: 400; font-size: clamp(50px, 15.5vw, 92px); line-height: .9; letter-spacing: -.02em; color: var(--ink); }
.memory__no { padding-bottom: 8px; }
.memory:nth-child(even) .memory__head { flex-direction: row-reverse; }

.memory__fig { position: relative; margin-top: 4vh; }
.frame { position: relative; }
.frame__win { position: relative; z-index: 1; overflow: hidden;   /* 線や点の飾りより前に写真を出す */
  background: var(--navy-2); clip-path: circle(0% at 50% 50%);
  transition: clip-path 1.8s cubic-bezier(.22, .7, .12, 1); }
.memory.is-in .frame__win { clip-path: circle(75% at 50% 50%); }
.frame__win img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); transition: transform 2.6s cubic-bezier(.2, .7, .1, 1); filter: saturate(.92) contrast(1.02); }
.memory.is-in .frame__win img { transform: scale(1); }
.frame__deco { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.frame__deco .ln { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.frame__deco .ln-thin { fill: none; stroke: var(--line); stroke-width: .7; vector-effect: non-scaling-stroke; opacity: .7; }
.frame__deco .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s cubic-bezier(.3, .6, .2, 1) .5s; }
.memory.is-in .frame__deco .draw { stroke-dashoffset: 0; }
.frame__deco .dot { fill: var(--bg); stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.frame__deco .bolt { fill: var(--gold); }
.frame__deco .sp { fill: var(--ink); }
.frame__deco .spg { fill: var(--gold); }

/* 丸窓（ロケットの窓） */
.frame--porthole { width: 80%; aspect-ratio: 1; }
.frame--porthole .frame__win { width: 100%; height: 100%; border-radius: 50%; }
/* 角括弧の枠 */
.frame--bracket { width: 78%; aspect-ratio: 4 / 5; }
.frame--bracket .frame__win { width: 100%; height: 100%; }
/* アーチ窓 */
.frame--arch { width: 70%; aspect-ratio: 3 / 4; }
.frame--arch .frame__win { width: 100%; height: 100%; border-radius: 999px 999px 4px 4px; }

.memory:nth-child(even) .frame { margin-left: auto; }
.memory--bracket .frame { margin-left: 6%; }
.memory:nth-child(even).memory--bracket .frame { margin-left: auto; margin-right: 6%; }

.tag { position: absolute; z-index: 2; max-width: 52%; padding: 6px 8px 5px; background: var(--cobalt); color: #fff;
  font-family: var(--f-lbl); font-size: 9.5px; font-weight: 500; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; }
.memory .tag { right: 0; bottom: -2%; }
.memory:nth-child(even) .tag { right: auto; left: 0; }

/* 写真がまだ無いときの仮の枠 */
.frame__win.is-empty { background:
  radial-gradient(circle at 30% 25%, rgba(148, 172, 255, .25), rgba(148, 172, 255, 0) 55%),
  linear-gradient(160deg, #1a2460, #0c1238); }
.frame__ph { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.is-empty .frame__ph { display: flex; }
.frame__ph b { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 34px; color: var(--ink); letter-spacing: .02em; }
.frame__ph span { font-family: var(--f-lbl); font-size: 10px; letter-spacing: .12em; color: var(--line); }

.memory__body { margin-top: 5vh; display: grid; gap: 14px; }
.memory:nth-child(even) .memory__body { text-align: right; }
.memory__label { display: flex; gap: 14px; flex-wrap: wrap; }
.memory:nth-child(even) .memory__label { justify-content: flex-end; }
.memory__label .km { color: var(--gold); }
/* 一言：写真から出るふきだし */
.memory__text { position: relative; justify-self: start; max-width: 100%; margin-top: 4px; padding: 11px 18px 10px;
  font-family: var(--f-round); font-weight: 700; font-size: clamp(15px, 4.3vw, 21px); line-height: 1.5; letter-spacing: .03em; text-align: left;
  color: var(--pen); background: #fbf8ef; border: 1.5px solid var(--pen); border-radius: 18px; box-shadow: 0 8px 22px rgba(3, 6, 24, .45); }
.memory__text::before { content: ''; position: absolute; top: -9px; left: 26px; width: 15px; height: 15px; background: inherit;
  border: inherit; border-width: 1.5px 0 0 1.5px; border-radius: 3px 0 0 0; transform: rotate(45deg); }
.memory:nth-child(even) .memory__text { justify-self: end; }
.memory:nth-child(even) .memory__text::before { left: auto; right: 26px; }

/* 中間地点 */
.interlude { position: relative; padding: 14vh 0 16vh; text-align: center; max-width: var(--col); margin: 0 auto; }
.interlude__astro { width: 124px; aspect-ratio: 200 / 260; margin: 0 auto 5vh; animation: spinDrift 14s ease-in-out infinite; }
@keyframes spinDrift { 0% { transform: translate(-30px, 0) rotate(-20deg); } 50% { transform: translate(30px, -16px) rotate(24deg); } 100% { transform: translate(-30px, 0) rotate(-20deg); } }
.interlude__km { font-family: var(--f-display); font-style: italic; font-size: clamp(44px, 13vw, 76px); line-height: 1; margin: 12px 0 10px; }
.interlude__tether { position: absolute; left: 50%; top: 0; height: 14vh; width: 1px; background: linear-gradient(var(--line-dim), rgba(148, 172, 255, 0)); }

/* ---------- ステッカー ---------- */
.sticker { position: absolute; z-index: 3; width: min(var(--w), 170px); cursor: pointer; -webkit-tap-highlight-color: transparent;
  opacity: 0; transform: rotate(calc(var(--rot) - 18deg)) scale(.3);
  transition: opacity .35s ease, transform .9s cubic-bezier(.3, 1.7, .45, 1); }
.sticker.is-in { opacity: 1; transform: rotate(var(--rot)) scale(1); }
.sticker img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none;
  animation: stickerFloat 5.5s ease-in-out var(--fd, 0s) infinite alternate; }
@keyframes stickerFloat { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-7px) rotate(2deg); } }
.sticker.is-wiggle img { animation: stickerWiggle .65s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stickerWiggle { 0% { transform: scale(1); } 30% { transform: scale(1.14) rotate(-8deg); } 60% { transform: scale(.96) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------- 3. 月が近づく ---------- */
.approach { height: 160vh; padding: 16vh var(--gr) 0 var(--gl); }
.approach__type { margin-top: 14px; font-family: var(--f-display); font-weight: 400; font-size: clamp(78px, 26vw, 170px); line-height: .82; letter-spacing: -.03em; }
.approach__type em { color: var(--gold); padding-left: .4em; }
.approach__meta { margin-top: 22px; }

/* ---------- 4. 着陸 ---------- */
.landing { height: 200vh; }
.pause { height: 70vh; }

.caption { position: fixed; z-index: 4; left: 0; right: 0; top: 22vh; text-align: center; pointer-events: none; opacity: 0; transform: translateY(10px);
  transition: opacity 1.4s ease, transform 1.4s ease; }
.is-landed .caption { opacity: 1; transform: none; transition-delay: 1.4s; }
.is-final .caption { opacity: 0; transform: translateY(-10px); transition-delay: 0s; }
.caption__big { margin: 12px 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 12vw, 72px); line-height: .98; }
.caption__big em { color: var(--gold); }

/* ---------- 5. 最後のメッセージ ---------- */
.final { height: 340vh; }
.final__stick { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(env(safe-area-inset-top) + 9vh) var(--gl) 0; max-width: calc(var(--col) + 44px); margin: 0 auto; }
.final__lbl { opacity: 0; transition: opacity 1.6s; }
.is-final .final__lbl { opacity: 1; }
/* 月からの手紙：半透明のカードに丸ゴシックで */
.final__lines { margin-top: 2.6vh; padding: 18px 20px 17px; font-family: var(--f-round); font-weight: 500;
  font-size: clamp(14.5px, min(4.1vw, 2.4vh), 19px); line-height: 1.95; letter-spacing: .03em; word-break: auto-phrase;
  background: rgba(10, 16, 49, .58); border: 1px solid rgba(243, 239, 228, .16); border-radius: 20px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 14px 40px rgba(3, 6, 24, .45);
  opacity: 0; transition: opacity 1.6s; }
.is-final .final__lines { opacity: 1; }
.fl:first-child { margin-bottom: .35em; font-weight: 700; font-size: 1.32em; line-height: 1.5; color: #fff; }
.fl { display: block; opacity: 0; filter: blur(6px); transform: translateY(8px);
  transition: opacity 2.4s ease, filter 2.4s ease, transform 2.4s cubic-bezier(.2, .7, .2, 1); }
.fl.on { opacity: 1; filter: blur(0); transform: none; }
.fl--gap { height: 1.1em; }
.fl:last-child { margin-top: .3em; font-weight: 700; font-size: 1.18em; color: var(--gold); }

.final__sign { position: absolute; left: 0; right: 0; bottom: max(3.5vh, calc(env(safe-area-inset-bottom) + 12px)); text-align: center; color: #1a2350; text-shadow: none;
  opacity: 0; transition: opacity 2.4s ease; }
.final__sign.on { opacity: 1; }
.final__happy { font-family: var(--f-display); font-style: italic; font-size: clamp(22px, 6.6vw, 34px); line-height: 1.1; }
.final__from { margin-top: 6px; font-family: var(--f-lbl); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.final__replay { margin-top: 10px; color: #3d6fe0; font-size: 10px; padding: 6px 10px; pointer-events: auto; }
.final__replay:hover { text-decoration: underline; }

/* ---------- オープニング ---------- */
.intro { position: fixed; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 20px; cursor: pointer; overflow: hidden;
  background: radial-gradient(circle at 50% 44%, #18215a 0%, #0a1031 45%, #050817 80%);
  transition: opacity 1.3s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.intro.is-out { opacity: 0; transform: scale(1.12); pointer-events: none; }
.intro__lbl { opacity: 0; animation: introFade .9s .25s forwards; letter-spacing: .16em; }
.intro__num { margin-top: 14px; font-family: var(--f-display); font-style: italic; font-weight: 400; line-height: .9;
  font-size: clamp(86px, 29vw, 210px); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums;
  opacity: 0; animation: introFade .8s .35s forwards; }
.intro__days { font-family: var(--f-display); font-style: italic; color: var(--gold); font-size: clamp(30px, 9vw, 58px); line-height: 1;
  opacity: 0; animation: introFade .8s .5s forwards; }
.intro.is-hit .intro__num { opacity: 1; color: var(--gold); text-shadow: 0 0 28px rgba(232, 211, 156, .55), 0 0 80px rgba(232, 211, 156, .25);
  animation: numPop 1s cubic-bezier(.3, 1.7, .45, 1) both; transition: color .3s; }
@keyframes numPop { 0% { transform: scale(1); } 35% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes introFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.intro__happy { margin-top: 30px; font-family: var(--f-display); font-size: clamp(26px, 7.6vw, 44px); line-height: 1.1;
  opacity: 0; transform: translateY(16px); transition: opacity 1s .35s, transform 1.1s cubic-bezier(.2, 1.4, .4, 1) .35s; }
.intro__happy em { color: var(--gold); }
.intro__jp { margin-top: 12px; font-size: 16px; letter-spacing: .5em; padding-left: .5em;
  opacity: 0; transform: translateY(10px); transition: opacity 1s .75s, transform 1s .75s; }
.intro.is-hit .intro__happy, .intro.is-hit .intro__jp { opacity: 1; transform: none; }
.intro__ring { position: absolute; left: 50%; top: 44%; width: 46vmin; height: 46vmin; margin: -23vmin 0 0 -23vmin; border-radius: 50%;
  border: 1.5px solid var(--gold); opacity: 0; pointer-events: none; }
.intro__ring--2 { border-color: var(--line); }
.intro.is-hit .intro__ring { animation: ringOut 1.8s cubic-bezier(.15, .7, .3, 1) forwards; }
.intro.is-hit .intro__ring--2 { animation-delay: .22s; }
@keyframes ringOut { from { transform: scale(.25); opacity: .95; } to { transform: scale(3.2); opacity: 0; } }
.intro__skip { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 26px); left: 0; right: 0; font-size: 9px; opacity: 0; animation: introFade 1s 1.4s forwards; color: rgba(148, 172, 255, .55); }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }
.confetti.is-behind { z-index: 0; }

/* オープニングのあと、最初の画面の文字が順に現れる */
.hero > * { transition: opacity 1s cubic-bezier(.2, .7, .2, 1) var(--hd, 0s), transform 1.2s cubic-bezier(.2, .7, .2, 1) var(--hd, 0s); }
html.is-intro .hero > * { opacity: 0; transform: translateY(26px); }
html.is-intro .hero > .hero__mark { opacity: 1; transform: none; }
.hero__top { --hd: .1s; } .hero__dates { --hd: .25s; } .hero__jp { --hd: .95s; } .hero__sub { --hd: 1.15s; } .launch { --hd: 1.35s; } .hero__astro { --hd: 1.2s; }
.hero__num .ch { display: inline-block; transition: opacity .7s calc(.3s + var(--i) * .08s), transform 1.1s cubic-bezier(.2, 1.5, .4, 1) calc(.3s + var(--i) * .08s); }
html.is-intro .hero__num .ch { opacity: 0; transform: translateY(.45em) rotate(8deg) scale(.85); }
.hero__days { transition: opacity 1s .85s, transform 1.2s cubic-bezier(.2, 1.4, .4, 1) .85s; }
html.is-intro .hero__days { opacity: 0; transform: translateX(24px); }
.hero__spark { transition: opacity .6s 1.1s; }
html.is-intro .hero__spark { opacity: 0; }

/* =========================================================
   地上（年表のあいだ）：空・太陽・丘と街・発射塔
   ========================================================= */
.sky { position: absolute; inset: 0; background: linear-gradient(#1d2f72, #6d6fb8 58%, #f6b48f 92%); will-change: opacity; }
.sun { position: absolute; left: 0; top: 0; width: min(30vw, 150px); aspect-ratio: 1; margin: calc(min(30vw, 150px) / -2) 0 0 calc(min(30vw, 150px) / -2);
  border-radius: 50%; will-change: transform; transition: opacity .8s;
  background: radial-gradient(circle, #fff8e2 0 22%, #ffe2a0 27%, rgba(255, 206, 140, .38) 40%, rgba(255, 190, 120, 0) 68%); }
.ground { position: absolute; left: 0; right: 0; bottom: 0; will-change: transform; --night: 0; }
.ground__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.g-far { fill: #2a3876; opacity: .55; }
.g-mid { fill: #1b2660; opacity: .85; }
.g-bld { fill: #141d4e; } .g-b1 { fill: #18225a; } .g-b2 { fill: #101943; } .g-b3 { fill: #1d2864; }
.g-win { fill: #ffd98a; opacity: calc(.15 + var(--night) * .85); }
.g-near { fill: #0b1236; }
.g-tower path, .g-tw-frame { fill: none; stroke: #3c4a8c; stroke-width: 1.4; }
.g-tw-arm { stroke-width: 2.4 !important; }
.g-tw-light { fill: #ff7b7b; animation: twinkle 1.6s ease-in-out infinite; }
.g-pad { fill: #2c3770; }
.ground__astro { position: absolute; transition: opacity .5s; }

.topbar.is-earth { background: linear-gradient(rgba(12, 18, 56, .82) 55%, rgba(12, 18, 56, 0)); padding-bottom: 22px; }
.topbar.is-earth .topbar__mid { color: #fff; }
.topbar b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 年表：出来事ごとの場面 ---------- */
.timeline { padding: 22vh var(--gl) 4vh; }
.timeline__head { max-width: var(--col); }
.timeline__title { margin-top: 14px; font-weight: 500; font-size: clamp(26px, 7.6vw, 40px); line-height: 1.5; letter-spacing: .05em; }
.timeline__sub { margin-top: 16px; font-size: 14.5px; line-height: 2; letter-spacing: .08em; color: var(--ink); }
.tl-list { list-style: none; margin: 4vh 0 0; padding: 0; max-width: var(--col); }
.tl { position: relative; min-height: 80vh; padding-top: 6vh; }

/* 大きな年号（下2けたを細い線の大きな数字に） */
.tl__big { position: relative; display: flex; align-items: flex-start; pointer-events: none; will-change: transform; text-shadow: none; }
.tl--r .tl__big { justify-content: flex-end; }
.tl__c { font-family: var(--f-display); font-style: italic; font-size: clamp(22px, 6.4vw, 36px); line-height: 1; color: var(--gold);
  margin: .5em .12em 0 0; opacity: 0; transition: opacity 1s .2s; }
.tl__yy { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(104px, 31vw, 210px); line-height: .78;
  letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.2px rgba(243, 239, 228, .9); overflow: hidden; padding: 0 .06em .04em 0; }
.tl__yy i { display: inline-block; font-style: inherit; transform: translateY(70%) rotate(6deg); opacity: 0;
  transition: transform 1.3s cubic-bezier(.2, .8, .2, 1) calc(.1s + var(--k) * .14s), opacity .9s calc(.1s + var(--k) * .14s); }
.tl.is-in .tl__yy i { transform: none; opacity: 1; }
.tl.is-in .tl__c { opacity: 1; }

/* 本文：背景のイラストと同じ、紺の線でふちどった紙のカード */
.tl { --acc: #a9c8f2; }
.tl:nth-child(5n+1) { --acc: #f7b8ac; }
.tl:nth-child(5n+2) { --acc: #a9c8f2; }
.tl:nth-child(5n+3) { --acc: #a8dcb9; }
.tl:nth-child(5n+4) { --acc: #f8dc86; }
.tl:nth-child(5n+5) { --acc: #cdb8ef; }
.tl__body { position: relative; width: min(90%, 410px); margin-top: calc(min(31vw, 210px) * -0.16); padding: 0 0 15px;
  background: #fbf8ef; color: var(--pen); border: 1.5px solid var(--pen); border-radius: 14px; box-shadow: 4px 5px 0 var(--pen); text-shadow: none;
  opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.tl.is-in .tl__body { opacity: 1; transform: none; }
.tl--r .tl__body { margin-left: auto; margin-right: 5px; }
.tl__body > * { margin-left: 16px; margin-right: 16px; }

/* カードの頭：場面ごとの色の帯に、番号・タグ・年 */
.tl__body > .tl__meta { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 16px 8px; background: var(--acc);
  border-bottom: 1.5px solid var(--pen); border-radius: 12.5px 12.5px 0 0; }
.tl__no { color: var(--pen); opacity: .75; }
.tl__tag { display: inline-block; padding: 3px 9px 2px; background: #fff; color: var(--pen); border: 1.2px solid var(--pen); border-radius: 99px;
  font-family: var(--f-lbl); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; line-height: 1.2; }
.tl__when { margin-left: auto; color: var(--pen); font-weight: 600; font-size: 11.5px; }
.tl__title { margin-top: 13px; font-weight: 700; font-size: clamp(19px, 5.4vw, 23px); line-height: 1.45; letter-spacing: .04em; text-wrap: balance; word-break: auto-phrase; }
.tl__text { margin-top: 6px; font-size: 13.5px; line-height: 1.8; letter-spacing: .04em; color: #5f5b74; }

/* 10,000日のうち、どこまで来たか */
.tl__life { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1.5px dashed rgba(47, 43, 69, .22); }
.tl__life .lbl { color: #5f5b74; }
.tl__life b { font-weight: 700; color: var(--pen); }
.tl__bar { position: relative; flex: 1; height: 7px; min-width: 40px; background: #ece5d3; border: 1.2px solid var(--pen); border-radius: 99px; }
.tl__bar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: #f5cf4a; border-radius: 99px;
  transform: scaleX(0); transform-origin: left; transition: transform 1.8s cubic-bezier(.3, .7, .2, 1) .6s; }
.tl__bar i::after { content: ''; position: absolute; right: -5px; top: 50%; width: 9px; height: 9px; margin-top: -5.7px; border-radius: 50%;
  background: #fff; border: 1.2px solid var(--pen); }
.tl.is-in .tl__bar i { transform: scaleX(1); }

/* 本人のこと：付せんのようなラベル */
.tl__note { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 5px 13px 4px 10px; background: #fff1b8; color: var(--pen);
  border: 1.2px solid var(--pen); border-radius: 99px; box-shadow: 2px 2px 0 var(--pen); font-weight: 700; font-size: 12.5px; letter-spacing: .03em;
  max-width: calc(100% - 32px); text-align: left; transform: rotate(-2deg); }
.tl--r .tl__note { transform: rotate(2deg); }
.tl__spark { flex: 0 0 12px; width: 12px; fill: #f06a6a; animation: none; }
.tl.is-in .rv { opacity: 1; transform: none; }
.tl.is-in .tl__note.rv { transform: rotate(-2deg); }
.tl.is-in.tl--r .tl__note.rv { transform: rotate(2deg); }

/* 背景の場面（js/scenes.js） */
.sun { display: none; }
.scenes { position: absolute; left: 0; right: 0; bottom: 0; height: 48vh; }
.scn { position: absolute; inset: 0; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.scn svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.s-far { fill: #2a3876; opacity: .6; }
.s-mid { fill: #1b2660; }
.s-near { fill: #0b1236; }
.s-bld { fill: #141d4e; } .s-bld2 { fill: #1d2864; }
.s-tower { fill: #1d2864; } .s-tower2 { fill: #2a3678; }
.s-fuji { fill: #24346e; }
.s-tree { fill: #16224f; } .s-trunk { fill: #101943; }
.s-trunk-line, .s-branch { fill: none; stroke: #16204c; stroke-linecap: round; }
.s-trunk-line { stroke-width: 3.2; } .s-branch { stroke-width: 3.6; }
.s-light { fill: #ffd98a; } .s-win { fill: #ffd98a; opacity: .8; }
.s-white { fill: #f3f1ea; } .s-moon { fill: #f6efd8; }
.s-ink { fill: #141d4e; } .s-ink-line { fill: none; stroke: #141d4e; stroke-width: 1.6; stroke-linecap: round; }
.s-pink { fill: #f4a9c0; } .s-pink2 { fill: #fbd3df; }
.s-acc { fill: #5b8cff; } .s-acc2 { fill: #e8d39c; }
.s-sun { fill: #fff3d0; } .s-glow { fill: #ffd27a; } .s-glowsoft { fill: #ffe3a6; opacity: .28; }
.s-faint { opacity: .45; }
.s-beam { fill: #fff8dc; opacity: .13; }
.s-cloud { fill: #fff; opacity: .75; }
.s-water { fill: #22306b; opacity: .85; }
.s-stroke { fill: none; stroke: #2c3a7e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-thick { stroke-width: 3.2; } .s-thin { stroke-width: 1.2; } .s-dash { stroke-dasharray: 3 5; }
.s-wood { fill: none; stroke: #3a2f5e; stroke-width: 11; } .s-wood2 { fill: none; stroke: #2c2550; stroke-width: 8; }
.s-fw1 { stroke: #ffd27a; stroke-width: 1.6; stroke-linecap: round; } .s-fw2 { stroke: #f4a9c0; stroke-width: 1.6; stroke-linecap: round; }

/* 雪の街・恋ダンスの場面 */
.s-snow { fill: #eef2fb; } .s-snowfar { fill: #c9d3ee; opacity: .85; }
.s-flake { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; opacity: .9; }
.s-figure { fill: #141d4e; } .s-figure-line { fill: none; stroke: #141d4e; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.s-note circle { fill: #ffd98a; } .s-note path { fill: none; stroke: #ffd98a; stroke-width: 1.8; stroke-linecap: round; }

/* キラキラの場面 */
.s-rb1, .s-rb2, .s-rb3, .s-rb4 { fill: none; stroke-width: 11; opacity: .6; }
.s-rb1 { stroke: #f4a9c0; } .s-rb2 { stroke: #e8d39c; } .s-rb3 { stroke: #9fd4c4; } .s-rb4 { stroke: #94acff; }

/* ステージ・花畑の場面 */
.s-pl1 { fill: #ff5a6e; stroke: #ff5a6e; } .s-pl2 { fill: #5b8cff; stroke: #5b8cff; } .s-pl3 { fill: #4fd18b; stroke: #4fd18b; }
.s-pl4 { fill: #ffd84d; stroke: #ffd84d; } .s-pl5 { fill: #b77bff; stroke: #b77bff; }
.s-plline { stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 0 2px currentColor); }
.s-crowd { fill: #0b1236; }
.s-meadow { fill: #2e5862; }

/* ---------- 打ち上げ ---------- */
.liftoff { height: 230vh; padding: 24vh var(--gl) 0; text-align: center; }
.liftoff > .lbl:first-child { color: var(--gold); }
.liftoff__big { margin-top: 18px; font-weight: 500; font-size: clamp(26px, 7.8vw, 42px); line-height: 1.6; letter-spacing: .06em; }
.liftoff__sub { margin-top: 3.5vh; font-size: 15.5px; line-height: 2; letter-spacing: .1em; color: var(--gold); }
.liftoff__go { margin-top: 5vh; }
/* 打ち上げ前の文（日付・「そして、10,000日目の今日。」・「ここからは、君と出会ってからの話。」）は非表示。戻すときはこの行を消す */
.liftoff > p:not(.liftoff__go) { display: none; }

/* ---------- 画面が広いとき ---------- */
@media (min-width: 760px) {
  :root { --gl: 40px; --gr: 80px; }
  .hero { padding-left: max(var(--gl), calc(50vw - 300px)); padding-right: max(var(--gl), calc(50vw - 300px)); }
  .hero__mark, .hero__top, .hero__dates { max-width: 600px; }
  .departure { padding-left: max(var(--gl), calc(50vw - 300px)); }
}

@media (prefers-reduced-motion: reduce) {
  .intro, .intro *,
  .sticker img,
  .spark, .grain, .launch__arrow::after, .hero__astro, .interlude__astro, .astro--stand .arm--r { animation: none !important; }
}
