:root {
  --ink: #eaf2ff; --muted: #a9bde6; --night: #0a1838; --panel: #132a5e; --line: #2a4a94; --gold: #ffb62e; --gold-ink: #5c3000; --blue: #7ab6ff;
  --red: #ff565c; --green: #48f080; --sky: #5c9cff; --hell: #ff6048; --hell-night: #2a0606; --rim: #0b1c4a;
  --round: "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Nunito", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans CJK JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--night); transition: background-color 1s;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; line-height: 1.9; font-size: 16px; }
body.in-hell { background: var(--hell-night); }
a { color: var(--blue); }

/* 星くず（カーソルの尾） */
.dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

/* 光の道：画面に張りついた1枚の絵に、上から下までの光を描く */
.board { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* いちばん上：はじめの門 */
.hero { position: relative; cursor: pointer; touch-action: pan-y; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; user-select: none; -webkit-user-select: none;
  background: linear-gradient(#050d2c, #0d2466 55%, #1f4fc0); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; opacity: .6;
  background: #040a22; clip-path: polygon(0 100%, 0 46%, 9% 20%, 17% 44%, 27% 8%, 37% 50%, 46% 30%, 55% 62%, 64% 24%, 73% 52%, 83% 4%, 92% 40%, 100% 22%, 100% 100%); }
.hero .title { position: absolute; z-index: 2; top: 8%; left: 0; right: 0; text-align: center; pointer-events: none; padding: 0 16px; }
.hero h1 { margin: 0; font-family: var(--round); font-weight: 800; font-size: clamp(46px, 9.5vw, 112px); line-height: 1.2; letter-spacing: .08em;
  text-shadow: 0 0 28px rgba(140, 190, 255, .75), 0 5px 0 rgba(0, 0, 0, .25); }
.hero .tagline { margin: 2px 0 0; font-family: var(--round); font-weight: 700; font-size: clamp(16px, 2.4vw, 26px); letter-spacing: .3em; color: #cfe0ff; }
.hero .hint { display: inline-block; margin: 16px 0 0; padding: 3px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink);
  background: rgba(10, 24, 56, .55); border: 1px solid rgba(160, 196, 255, .35); transition: opacity .6s; animation: breathe 2.4s ease-in-out infinite; }
.hero.lit .hint { opacity: 0; }
.hero .cta { position: absolute; z-index: 2; left: 0; right: 0; bottom: 5%; display: flex; gap: 12px; align-items: center; justify-content: center; pointer-events: none; }
.hero .cta a { pointer-events: auto; }
.hero .cta img { border-radius: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.store { display: inline-block; padding: 9px 20px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 15px; line-height: 1.5;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25); text-decoration: none; }
.dawn .outro .store { animation: shine 1.6s ease-in-out infinite; }
.again { position: absolute; z-index: 3; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(160, 196, 255, .4);
  background: rgba(10, 24, 56, .6); color: var(--ink); cursor: pointer; padding: 0; }
.again svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.top { position: absolute; z-index: 5; top: 14px; right: 16px; }
.langs { position: relative; font-size: 13px; font-weight: 700; }
.langs summary { list-style: none; cursor: pointer; padding: 2px 14px; border-radius: 999px; background: rgba(10, 24, 56, .6); border: 1px solid rgba(160, 196, 255, .4); }
.langs summary::-webkit-details-marker { display: none; }
.langs div { position: absolute; right: 0; top: calc(100% + 6px); display: grid; min-width: 150px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.langs a { padding: 2px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.langs a:hover, .langs a[aria-current] { background: rgba(122, 182, 255, .2); }

/* 門：石に光を当てると、下の見どころが現れる */
main { overflow-x: clip; }
.gate { position: relative; height: calc(var(--cell, 60px) * 5); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

/* 見どころ：光の落ちる場所（--beam-x）から丸く広がって現れる */
.feature { --ray: #fff; --beam-x: 50%; position: relative; z-index: 2; max-width: 1080px; min-height: 86vh; margin: 0 auto; padding: 60px 24px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; }
.feature .words, .feature .stand { position: relative; z-index: 1; }
.feature h2 { margin: 0; font-family: var(--round); font-weight: 800; font-size: clamp(30px, 4.6vw, 58px); line-height: 1.3; letter-spacing: .02em;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.dark .feature { clip-path: circle(0 at var(--beam-x) 0); transition: clip-path 1.2s cubic-bezier(.3, 0, .2, 1); }
.dark .feature.lit { clip-path: circle(150% at var(--beam-x) 0); }
.feature h2 span { display: block; transition: opacity .7s .35s, transform .7s .35s; }
.feature h2 span + span { transition-delay: .55s; }
.dark .feature:not(.lit) h2 span { opacity: 0; transform: translateY(26px); transition: none; }
.feature h2 b { color: var(--gold); font-size: 1.5em; line-height: 1; font-variant-numeric: tabular-nums; }
.feature:nth-of-type(even) .words { order: 2; }
.stand { display: flex; justify-content: center; }
.phone { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; position: relative; width: min(300px, 66vw); border: 8px solid var(--rim); border-radius: 42px; overflow: hidden;
  background: var(--rim); transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s, box-shadow .8s .7s;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.phone.held { transition: transform .08s, box-shadow .8s; }
.feature.lit .phone { box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 60px -6px var(--ray); }
.phone img { display: block; width: 100%; height: auto; }
.glare { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .42), transparent 46%); }
.phone.held .glare { opacity: 1; }

.feature.color { isolation: isolate; }
.feature.color.lit .phone { box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 60px -6px #fff; }
.spot { position: absolute; left: 0; top: 0; width: clamp(220px, 36vw, 440px); aspect-ratio: 1; border-radius: 50%; mix-blend-mode: screen; pointer-events: none; z-index: 0; opacity: .7; }
.spot.red { background: radial-gradient(circle, #ff2a3c 0 20%, transparent 68%); }
.spot.green { background: radial-gradient(circle, #1eea5a 0 20%, transparent 68%); }
.spot.blue { background: radial-gradient(circle, #2b62ff 0 20%, transparent 68%); }
.feature.stages { --ray: var(--gold); }
.feature.daily { --ray: var(--sky); }
.days { display: grid; grid-template-columns: repeat(7, 38px); gap: 7px; margin-top: 26px; }
.days i { height: 38px; border-radius: 11px; font-style: normal; font-weight: 800; font-size: 13px; line-height: 38px; text-align: center; color: rgba(234, 242, 255, .45);
  background: rgba(19, 42, 94, .8); border: 1px solid var(--line); transition: background .3s, color .3s, box-shadow .3s; }
.days i.on { color: #0b1c4a; border-color: transparent; animation: pop .35s; }
.days i.g1 { background: linear-gradient(#b8ffd0, #48e088); box-shadow: 0 0 14px rgba(72, 240, 128, .6); }
.days i.g2 { background: linear-gradient(#cfe4ff, #70b6ff); box-shadow: 0 0 14px rgba(112, 182, 255, .6); }
.days i.g3 { background: linear-gradient(#fff0c0, #ffc85c); box-shadow: 0 0 14px rgba(255, 200, 92, .6); }
.feature.hell { --ray: var(--hell); }
.feature.hell h2 { color: #ffd9d0; text-shadow: 0 0 26px rgba(255, 96, 72, .9), 0 4px 0 rgba(0, 0, 0, .35); }
.feature.hell.lit h2 { animation: flicker 3.2s infinite; }
.feature.hell .phone { border-color: #2a0606; background: #2a0606; }

/* しめくくり：最後の石（アイコン）がともると夜が明ける */
.finale { position: relative; padding-bottom: 150px; }
.finale::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 2.4s;
  background: linear-gradient(transparent, #27409f 30%, #7f63b8 55%, #e98a9a 74%, #ffb86b 90%, #ffe6a8); }
.dawn .finale::before { opacity: 1; }
.finale::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 150px; background: var(--night);
  clip-path: polygon(0 100%, 0 46%, 9% 20%, 17% 44%, 27% 8%, 37% 50%, 46% 30%, 55% 62%, 64% 24%, 73% 52%, 83% 4%, 92% 40%, 100% 22%, 100% 100%); }
.goal { position: absolute; z-index: 2; left: var(--goal-x, 50%); top: var(--goal-y, 50%); width: calc(var(--cell, 60px) * 1.5); height: auto; transform: translate(-50%, -50%);
  border-radius: 24%; pointer-events: none; transition: filter 1s, box-shadow 1s, transform .6s; }
.dark .goal { filter: brightness(.38) saturate(.3); }
.dawn .goal { filter: none; transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 50px 8px rgba(255, 214, 120, .8); }
.outro { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; padding: 40px 24px 20px; text-align: center; transition: opacity 1.2s .5s, transform 1.2s .5s; }
.dark .outro:not(.lit) { opacity: 0; transform: translateY(26px); pointer-events: none; transition: none; }
.outro h2 { font-family: var(--round); font-size: 34px; letter-spacing: .08em; margin: 14px 0 12px; }
.outro dl { margin: 30px 0 0; padding: 8px 22px; border-radius: 20px; background: rgba(19, 42, 94, .7); border: 1px solid var(--line); text-align: left; }
body.in-hell .outro dl { background: rgba(70, 14, 14, .7); border-color: #7a2a20; }
.outro dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.outro dl div + div { border-top: 1px solid rgba(160, 196, 255, .18); }
.outro dt { color: var(--muted); }
.outro dd { margin: 0; font-weight: 700; text-align: right; }
footer { position: relative; z-index: 2; text-align: center; margin: 0; padding: 20px 20px 48px; font-size: 13px; }
footer p { color: var(--muted); margin: 4px 0; }

/* 文字だけのページ（プライバシー・サポート） */
.wrap { position: relative; max-width: 760px; margin: 0 auto; padding: 28px 20px 16px; }
.wrap header { text-align: center; padding: 12px 0 8px; }
.wrap h1 { font-size: 30px; line-height: 1.4; margin: 18px 0 4px; letter-spacing: .06em; }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin: 16px 0; }
.card h2 { font-size: 19px; margin: 0 0 8px; }
.card p { color: #d5e2fb; margin: 0 0 6px; }
.notice { font-size: 13px; color: var(--muted); }

@keyframes breathe { 50% { transform: scale(1.05); border-color: rgba(200, 224, 255, .8); } }
@keyframes shine { 50% { box-shadow: 0 4px 0 rgba(0, 0, 0, .25), 0 0 34px 8px rgba(255, 214, 120, .9); transform: scale(1.06); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.2); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 46% { opacity: 1; } 47% { opacity: .55; } 49% { opacity: 1; } 51% { opacity: .7; } 53% { opacity: 1; } }

@media (max-width: 720px) {
  /* 長い言葉の案内とかさならないよう、やり直しは案内の上へ */
  .again { bottom: calc(5% + 72px); }
  .feature { grid-template-columns: 1fr; min-height: 0; padding: 70px 20px; text-align: center; gap: 30px; }
  .feature:nth-of-type(even) .words { order: 0; }
  .days { justify-content: center; }
  .hero .title { top: 7%; }
  .hero .tagline { letter-spacing: .22em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .hint, .dawn .outro .store, .feature.hell.lit h2, .days i.on { animation: none; }
  .feature h2 span, .phone, .goal, .outro, .finale::before { transition: none; }
}
